An intertopic distance map is a dimensionality-reduction visualization that projects the high-dimensional topic centroids of a model like LDA onto a 2D plane using multidimensional scaling (MDS). Each bubble represents a topic, with its size proportional to the topic's prevalence in the corpus. The spatial distances between bubbles approximate the semantic similarity between topics, allowing rapid assessment of model quality.
Glossary
Intertopic Distance Map

What is an Intertopic Distance Map?
An intertopic distance map is a two-dimensional visualization component of pyLDAvis that projects topic centroids using multidimensional scaling, enabling users to assess topic overlap, distinctness, and semantic relationships within a fitted topic model.
Developed as part of the pyLDAvis library, the map uses the Jensen-Shannon divergence between topic-word distributions to compute the intertopic distance matrix before projection. Overlapping or closely clustered bubbles indicate potential topic redundancy, while well-separated, distinct bubbles suggest a model with high topic diversity. This visual diagnostic helps data scientists tune the number of topics (K) hyperparameter.
Key Features of the Intertopic Distance Map
The Intertopic Distance Map is the primary visualization component of pyLDAvis, projecting high-dimensional topic centroids into a 2D plane to allow immediate assessment of topic overlap, distinctness, and semantic relationships.
Multidimensional Scaling (MDS) Projection
The map uses Principal Coordinate Analysis (PCoA) to project topic-topic distance matrices into two dimensions. The distance between any two topic centroids is calculated using Jensen-Shannon divergence between their word distributions. This preserves the original high-dimensional inter-topic relationships as faithfully as possible in a 2D plane, allowing you to visually identify which topics are semantically proximal and which are distinct.
Circle Area and Topic Prevalence
Each topic is represented as a circle whose area is proportional to the marginal topic prevalence in the corpus. Larger circles indicate topics that appear more frequently across documents. This visual encoding provides an immediate, intuitive sense of which themes dominate the corpus without needing to inspect numerical tables. A large, isolated circle suggests a dominant, well-defined theme; a small circle overlapping others suggests a niche or less coherent topic.
Assessing Topic Overlap and Distinctness
The spatial proximity of circles directly reflects semantic similarity. Overlapping circles indicate topics that share many high-probability words and may be redundant. Isolated circles represent highly distinct, interpretable topics. This visual diagnostic helps determine if the chosen Number of Topics (K) is appropriate: excessive overlap suggests K is too high, while a few massive circles suggest K is too low.
Salient Terms and Relevance Metric
Clicking a topic circle reveals a horizontal bar chart of its salient terms, ranked by a tunable relevance metric (λ). This metric balances a term's frequency within the topic against its exclusivity:
- λ = 1: Ranks by purely by probability within the topic (frequent, potentially generic words)
- λ = 0: Ranks by lift over the corpus-wide background frequency (highly exclusive, potentially rare words) Adjusting λ helps analysts interpret what makes a topic unique.
Interactivity and Diagnostic Workflow
The map is fully interactive, enabling a systematic diagnostic workflow:
- Hover over circles to see the top terms for each topic instantly
- Click a circle to lock the term bar chart and inspect word distributions in detail
- Identify overlapping clusters that may indicate the need to merge topics or reduce K
- Validate that isolated topics correspond to semantically coherent themes by examining their top-ranked exclusive terms at λ ≈ 0.3
Relationship to Topic Coherence
While the Intertopic Distance Map provides a qualitative visual assessment, it complements quantitative metrics like Topic Coherence and C_V Coherence. A well-structured map with distinct, non-overlapping circles typically correlates with high coherence scores. Conversely, a map showing a diffuse cloud of overlapping small circles often indicates low semantic interpretability, prompting a re-evaluation of preprocessing steps, the number of topics, or the choice of model hyperparameters like Alpha and Beta.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Explore the most common questions about interpreting and generating intertopic distance maps, the core visualization component of pyLDAvis used to assess topic model quality through multidimensional scaling.
An intertopic distance map is a two-dimensional visualization that projects the centroids of discovered topics onto a plane using multidimensional scaling (MDS) , allowing analysts to assess topic overlap, distinctness, and semantic relationships. The map is generated by first computing the Jensen-Shannon divergence between every pair of topic-word distributions, creating a distance matrix that quantifies how dissimilar topics are from one another. Principal component analysis (PCA) is then used to initialize the MDS projection, which iteratively optimizes the 2D coordinates to preserve the original high-dimensional distances as faithfully as possible. Each topic is represented as a circle whose area is proportional to its prevalence in the corpus, and the distance between any two circles reflects their semantic similarity—topics that share many high-probability words will appear closer together. This visualization is the default view in pyLDAvis, an interactive library designed by Carson Sievert and Kenny Shirley to aid in interpreting Latent Dirichlet Allocation (LDA) models.
Related Terms
The Intertopic Distance Map is a core component of the pyLDAvis library. Understanding the related metrics and algorithms used to construct and validate this visualization is essential for interpreting the quality and distinctness of discovered topics.
Multidimensional Scaling (MDS)
The dimensionality reduction algorithm used to project high-dimensional topic centroids onto the 2D plane of the Intertopic Distance Map. MDS attempts to preserve the pairwise distances between topics so that their proximity in the visualization accurately reflects their semantic similarity. The input to MDS is typically a distance matrix calculated from the topic-word distributions.
Topic Coherence
A quantitative evaluation metric that measures the semantic interpretability of a topic. It quantifies the degree of co-occurrence between a topic's top-ranked words in a reference corpus. High coherence scores generally correlate with topics that appear more distinct and less overlapping on the Intertopic Distance Map. Common measures include C_V coherence and UMass coherence.
Salient Terms & Relevance Metric
The terms displayed for each topic in pyLDAvis are ranked by a tunable relevance metric (λ). This metric balances a term's probability within a topic against its lift (the ratio of its topic probability to its overall corpus probability). Adjusting λ allows users to filter between terms that are highly specific to a topic (low λ) and terms that are frequent within the topic (high λ).
Topic Diversity
A metric assessing the uniqueness of topics by calculating the percentage of unique words across the top-N terms of all discovered topics. A high diversity score indicates minimal overlap in the top terms, which should visually correspond to well-separated, non-overlapping circles on the Intertopic Distance Map. It is a complementary measure to topic coherence.
Jensen-Shannon Divergence
A symmetric distance metric often used to compute the pairwise distances between topic-word probability distributions. This distance matrix serves as the direct input for the multidimensional scaling algorithm that generates the Intertopic Distance Map. It measures the similarity between two probability distributions, providing a principled way to quantify topic overlap.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us