Prior matters: simple and general methods for evaluating and improving topic quality in topic modeling

Angela Fan, Finale Doshi‐Velez, Luke Miratrix · DOI

Abstract

Latent Dirichlet Allocation (LDA) models trained without stopword removal often produce topics with high posterior probabilities on uninformative words, obscuring the underlying corpus content. Even when canonical stopwords are manually removed, uninformative words common in that corpus will still dominate the most probable words in a topic. In this work, we first show how the standard topic quality measures of coherence and pointwise mutual information act counter-intuitively in the presence of common but irrelevant words, making it difficult to even quantitatively identify situations in which topics may be dominated by stopwords. We propose an additional topic quality metric that targets the stopword problem, and show that it, unlike the standard measures, correctly correlates with human judgements of quality. We also propose a simple-to-implement strategy for generating topics that are evaluated to be of much higher quality by both human assessment and our new metric. This approach, a collection of informative priors easily introduced into most LDA-style inference methods, automatically promotes terms with domain relevance and demotes domain-specific stop words. We demonstrate this approach's effectiveness in three very different domains: Department of Labor accident reports, online health forum posts, and NIPS abstracts. Overall we find that current practices thought to solve this problem do not do so adequately, and that our proposal offers a substantial improvement for those interested in interpreting their topics as objects in their own right.

Introduction

Latent Dirichlet Allocation (LDA) is the standard tool for discovering latent themes in large text corpora. However, practitioners frequently encounter the "stopword problem": topics are often dominated by uninformative, high-frequency words. While common stopwords like "the" or "and" are typically removed during preprocessing, domain-specific "junk" words (e.g., "patient" in medical texts or "report" in legal documents) persist. The traditional solution—manual, iterative construction of stopword lists—is labor-intensive, subjective, and difficult to reproduce.

This paper identifies a deeper issue: the metrics used to evaluate topic quality, such as Coherence and Pointwise Mutual Information (PMI), are fundamentally flawed in the presence of these words. The authors propose a new metric, Log Lift, and a method for using informative asymmetric priors to automatically sequester stopwords, resulting in cleaner, more interpretable topics.

The Metric Trap: Why Coherence Fails

Standard automated measures of topic quality rely on word co-occurrence. Because stopwords appear frequently and together across many documents, topics filled with stopwords actually achieve higher scores on Coherence and PMI. This creates a paradox where a model that looks mathematically "good" is actually uninterpretable to a human.

To address this, the authors introduce Log Lift. Lift is the ratio of a word’s probability within a topic to its probability in the entire corpus. By taking the log of this ratio, the metric penalizes globally frequent words and rewards words that are specific to a particular theme. Experimental results show that Log Lift has a consistent negative association with stopword rates and a positive association with human-judged relevance, whereas Coherence and PMI fail this critical test.

Methodology: Informative Asymmetric Priors

Rather than deleting words and losing potential context, the authors propose modifying the LDA generative process by introducing structure into the word-topic prior $\eta$.

The standard generative process for LDA, where the authors focus on modifying the word-topic prior $\eta$ to improve topic quality.

By moving away from a symmetric prior, the model can be guided to handle different types of words through three strategies:

  1. Stopword Topics: A small subset of topics is given a flat prior to "soak up" high-frequency, uninformative words, effectively sequestering them from the informative topics.
  2. TF-IDF Priors: Domain topics use priors weighted by the average TF-IDF score of words, pushing distinctive, low-frequency terms to the top of the distribution.
  3. Keyword Seeding: If a general list of domain terms exists (e.g., a medical dictionary), those words are given a "boost" in the prior to encourage the model to group them into coherent themes.

Experimental Evaluation

The effectiveness of these priors was tested across three distinct domains:

  • ASD Corpus: ~657,000 posts from online autism support forums, characterized by informal and noisy vocabulary.
  • OSHA Corpus: ~50,000 workplace accident reports, containing short, structured text.
  • NIPS Corpus: 403 research abstracts from the 2015 NIPS conference, representing highly technical text with a low stopword count.

Key Results

The proposed methods yielded significant improvements in both quantitative metrics and human interpretability:

  • Stopword Reduction: In the ASD dataset, a baseline model without deletion had a 76% stopword rate among its top words. Implementing the TF-IDF Prior reduced this to 10%, and Keyword Seeding further reduced it to 9%.
  • Human Preference: Human evaluators consistently preferred topics generated with informative priors. For example, in the OSHA dataset, the prior-based model successfully isolated a specific topic regarding "tree-related accidents" (using terms like collapses, trees, lacerations, wooden) which was previously buried under generic reporting terminology.
  • Reproducibility: Unlike manual stopword lists that must be tailored to every dataset, TF-IDF and Keyword Seeding priors can be generated automatically, making the modeling process more robust and reproducible.

Conclusion

Current practices for handling stopwords in topic modeling are often inadequate and misleading. By shifting the focus from manual deletion to informative priors and more accurate evaluation metrics like Log Lift, researchers can produce topics that are significantly more relevant to human users. This approach allows stopwords to be explained by the model rather than ignored, leading to a more faithful representation of the underlying data.

Summary updated

Abstract

Latent Dirichlet Allocation (LDA) models trained without stopword removal often produce topics with high posterior probabilities on uninformative words, obscuring the underlying corpus content. Even when canonical stopwords are manually removed, uninformative words common in that corpus will still dominate the most probable words in a topic. In this work, we first show how the standard topic quality measures of coherence and pointwise mutual information act counter-intuitively in the presence of common but irrelevant words, making it difficult to even quantitatively identify situations in which topics may be dominated by stopwords. We propose an additional topic quality metric that targets the stopword problem, and show that it, unlike the standard measures, correctly correlates with human judgements of quality. We also propose a simple-to-implement strategy for generating topics that are evaluated to be of much higher quality by both human assessment and our new metric. This approach, a collection of informative priors easily introduced into most LDA-style inference methods, automatically promotes terms with domain relevance and demotes domain-specific stop words. We demonstrate this approach's effectiveness in three very different domains: Department of Labor accident reports, online health forum posts, and NIPS abstracts. Overall we find that current practices thought to solve this problem do not do so adequately, and that our proposal offers a substantial improvement for those interested in interpreting their topics as objects in their own right.
BibTeX
@article{fan2019prior,
  author = {Angela Fan and Finale Doshi‐Velez and Luke Miratrix},
  title = {{Prior matters: simple and general methods for evaluating and improving topic quality in topic modeling}},
  journal = {Stat. Anal. Data Min.},
  year = {2019},
  doi = {10.1002/sam.11415},
}
Figure