NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Topic Modeling in Embedding Spaces.

Adji B. Dieng, Francisco J. R. Ruiz, David M. BleiTrans. Assoc. Comput. Linguistics 2019 · DOI

Introduction

Traditional topic models like Latent Dirichlet Allocation (LDA) have long served as the standard for discovering latent themes in document collections. However, LDA treats words as discrete "one-hot" indices, failing to recognize semantic relationships between terms like "cat" and "kitten" unless they co-occur frequently. This limitation often necessitates aggressive vocabulary pruning—removing rare words that carry significant niche meaning—to maintain model performance.

The Embedded Topic Model (ETM) addresses this by marrying the generative structure of LDA with the semantic richness of word embeddings. By representing both words and topics as vectors in a shared continuous space, ETM remains robust and interpretable even when dealing with massive, "heavy-tailed" vocabularies that typically break standard models.

Methodology: The Embedded Topic Model

ETM modifies the generative process of LDA to incorporate word embeddings. While it retains the document-level topic distributions, it replaces the discrete word-topic distributions with a log-linear model based on vector similarity.

  1. Shared Embedding Space: Every word in the vocabulary is represented by a fixed vector. Similarly, each topic is defined as a vector in the same embedding space.
  2. Word Generation: The probability of a word given a topic is proportional to the exponentiated inner product of their respective embeddings. Words closer to a topic vector are more likely to be generated by that topic.
  3. Inference: To handle large-scale datasets, ETM employs amortized variational inference via an inference network (similar to a Variational Autoencoder), allowing for fast, stochastic optimization.
Figure 1: Visualization of the shared embedding space, showing topics and words clustered by semantic similarity.

Experimental Setup and Results

The model was evaluated on the 20Newsgroups corpus and a large-scale New York Times dataset (1.8 million articles). To test robustness, researchers used vocabulary sizes ranging from 3,000 to over 212,000 words.

Predictive Performance

ETM consistently outperforms LDA in predictive accuracy, measured by perplexity. As shown in Figure 2, while LDA's performance degrades sharply as the vocabulary expands, ETM's perplexity remains stable and even improves. This robustness allows researchers to model the "long tail" of language without arbitrary information loss from pruning.

Figure 2: Comparison of coherence-normalized perplexity between LDA and ETM as vocabulary size increases.

Topic Quality

Beyond predictive metrics, ETM excels in qualitative measures:

  • Topic Coherence and Diversity: ETM produces topics that are both more internally consistent and more distinct from one another compared to LDA and the Neural Variational Document Model (NVDM).
  • Handling Stop Words: Unlike traditional models that can be "confused" by frequent function words, ETM naturally isolates stop words into specific "stop topics" within the embedding space, effectively isolating them from content-heavy topics.

Discussion and Future Directions

ETM represents a significant advancement in making topic models scalable to real-world, unpruned vocabularies. By leveraging semantic bridges, the model can infer the topic of rare words based on their proximity to known terms in the embedding space.

While ETM is computationally more intensive than basic LDA, the trade-off in robustness and semantic depth makes it a powerful tool for modern natural language processing. Future work may involve extending ETM to dynamic settings to track topic evolution over time or moving beyond the "bag-of-words" assumption to incorporate more complex document structures.

Summary updated

BibTeX
@article{dieng2019topic,
  author = {Adji B. Dieng and Francisco J. R. Ruiz and David M. Blei},
  title = {{Topic Modeling in Embedding Spaces.}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2019},
  doi = {10.1162/tacl\_a\_00325},
}
Figure