Interactive Topic Modeling

Yuening Hu, Jordan L. Boyd-Graber, Brianna SatinoffACL 2011

Abstract

Topic models have been used extensively as a tool for corpus exploration, and a cottage industry has developed to tweak topic models to better encode human intuitions or to better model data. However, creating such extensions requires expertise in machine learning unavailable to potential end-users of topic modeling software. In this work, we develop a framework for allowing users to iteratively refine the topics discovered by models such as latent Dirichlet allocation (LDA) by adding constraints that enforce that sets of words must appear together in the same topic. We incorporate these constraints interactively by selectively removing elements in the state of a Markov Chain used for inference; we investigate a variety of methods for incorporating this information and demonstrate that these interactively added constraints improve topic usefulness for simulated and actual user sessions.

Introduction

Probabilistic topic models like Latent Dirichlet Allocation (LDA) are powerful tools for exploring massive text collections, but they often produce "junk" topics that fail to align with human intuition. A model might split a single concept across two topics or group unrelated words together simply because they co-occur statistically. While researchers have developed "constrained" models to fix these issues, these solutions are typically a priori—requiring the user to know exactly what they want before running the model. Furthermore, implementing these constraints usually requires significant expertise in Bayesian inference.

Interactive Topic Modeling (ITM) aims to bridge this gap, putting the human back in the loop while the model is running. This framework allows non-experts (e.g., historians or journalists) to steer the model in real-time by providing simple "must-link" constraints.

Methodology

The authors build upon the concept of Dirichlet Forest priors. Instead of the standard flat prior over words in LDA, they represent the vocabulary as a tree structure.

When a user groups words together, these words become siblings under a new internal node in the tree. This forces the model to correlate their probabilities: if one word has a high probability in a topic, its "must-link" partners likely will too. To keep inference simple and unique, the authors assume constraints are transitive (if A links to B, and B to C, then A links to C).

Figure 2: The evolution of the tree-structured topic prior as must-link constraints are added, moving from an empty set to grouping related terms.

The Ablation Strategy

The core technical innovation is the Ablation Strategy. When a user adds a constraint mid-stream, the model's current state (the topic assignments for every word in the corpus) is partially "broken" or ablated to allow it to move to a better configuration. They test four strategies:

  1. All: Restart the sampler from scratch (slow, loses all previous progress).
  2. Doc: Unassign all words in any document that contains a word from the new constraint.
  3. Term: Unassign only the specific tokens of the words added to the constraint.
  4. None: Keep all assignments and just change the underlying model structure.

Experimental Results

The framework was evaluated using the New York Times Editorials (1987–1996) for qualitative analysis, the 20 Newsgroups dataset for quantitative benchmarking, and Mechanical Turk for real-world human studies.

Quantitative Performance

In simulations on the 20 Newsgroups dataset, the Doc ablation strategy consistently outperformed other interactive methods. By unassigning entire documents containing constraint words, the model is given enough "freedom" to re-evaluate the context of those words without the total chaos of a full restart. This allows the model to not just move the constraint words, but to re-learn which other words should follow them into the new, refined topic.

Figure 5: Classification error across different ablation strategies and iteration counts (10, 20, 30, 50, 100). The Doc strategy (red line) consistently provides the best balance of speed and accuracy.

Interactivity and Convergence

A key finding was that a model does not need to fully converge to be useful. The authors found that just 30 iterations of Gibbs sampling after a user update was enough to show meaningful improvement while remaining fast enough for a "live" feel. If enough states are not unassigned (the None strategy), the model often gets stuck in its old, "wrong" configuration because the Markov Chain has too much inertia to escape local optima.

Conclusion

ITM demonstrates that interactive refinement can significantly improve topic usefulness. Qualitative results showed the ability to merge disparate topics (e.g., merging Soviet and post-Soviet Russia topics) and "clean up" noise by pushing non-relevant words out. While the current work focuses on "must-link" constraints, future work remains to efficiently implement "cannot-link" constraints and scale the "Doc" strategy to billion-word corpora. Ultimately, the success of ITM highlights that interface design is as critical as the algorithm; helping users identify which words to group is a significant part of the modeling process.

Summary updated

BibTeX
@inproceedings{hu2011interactive,
  author = {Yuening Hu and Jordan L. Boyd-Graber and Brianna Satinoff},
  title = {{Interactive Topic Modeling}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2011},
  url = {https://openreview.net/forum?id=BJVcwsxO-B},
}
Figure