Abstract
Topic models provide a useful method for dimensionality reduction and exploratory data analysis in large text corpora. Most approaches to topic model inference have been based on a maximum likelihood objective. Efficient algorithms exist that approximate this objective, but they have no provable guarantees. Recently, algorithms have been introduced that provide provable bounds, but these algorithms are not practical because they are inefficient and not robust to violations of model assumptions. In this paper we present an algorithm for topic model inference that is both provable and practical. The algorithm produces results comparable to the best MCMC implementations while running orders of magnitude faster.
Introduction
Topic modeling, such as Latent Dirichlet Allocation (LDA), is a staple of data science used to discover hidden themes in massive collections of documents. However, the standard way to solve these models—Maximum Likelihood Estimation—is NP-hard. In practice, researchers rely on heuristics like Markov Chain Monte Carlo (MCMC) or Variational Inference. While these work well, they are slow and offer no guarantees that they will ever converge to the true model parameters.
This paper, a collaboration involving researchers from Princeton, NYU, and IAS, represents a landmark bridge between theoretical computer science and practical machine learning. It transforms a "provably correct but slow" theoretical approach into a high-performance tool for modern text analysis.
The Challenge of Topic Modeling
Previous "provable" algorithms existed, but they were fragile: they relied on unstable matrix inversions that produced nonsensical results (like negative probabilities) when faced with the "noise" of real-world data. The goal of this work is to provide an algorithm that is both mathematically guaranteed to find the correct parameters in polynomial time and runs orders of magnitude faster than standard methods.
Methods
The paper builds on the separability assumption: the idea that for every topic, there exists at least one "anchor word" that belongs only to that topic (e.g., "puck" for hockey, "stethoscopes" for medicine). The authors introduce two key algorithmic innovations, structured within a high-level framework shown in Figure 2:
- FastAnchorWords: Instead of using thousands of slow Linear Programs to find anchor words, they use a greedy combinatorial algorithm. It projects word co-occurrence data into a lower-dimensional space and iteratively finds the points furthest from the current span—essentially finding the "corners" of the data's geometric shape.
- Probabilistic Recovery (RecoverKL/L2): Previous methods used algebraic matrix inversion (see Algorithm 2 in Figure 2) to reconstruct topics from anchor words. This paper replaces that with a convex optimization approach. They use an Exponentiated Gradient algorithm to minimize the KL-divergence (or L2 loss) between the observed word co-occurrences and the model's predictions. This ensures the resulting topic distributions are always valid probabilities.
Key Insights and Results
The authors evaluated their algorithm on both synthetic and real-world data, including the New York Times (NYT) corpus (~295,000 documents) and NIPS Abstracts (~1,100 documents).
- Speed and Scalability: The algorithm is orders of magnitude faster than optimized Gibbs sampling. For example, on the NIPS dataset, it runs in seconds while Gibbs takes nearly an hour. Furthermore, the L2 version of the recovery step can be "kernelized," making the computation time independent of the vocabulary size.
- Robustness through Optimization: By moving from "solving equations" (matrix inversion) to "minimizing error" (gradient descent), the algorithm becomes remarkably robust to noise and violations of model assumptions. It works even when topics are highly correlated (e.g., "politics" and "economics" appearing together).
- Quality: On the New York Times dataset, the "RecoverKL" algorithm produced topics with higher semantic coherence than Gibbs sampling.
Conclusion
This work demonstrates that topic modeling can be both provable and practical. By reframing topic discovery as a geometric problem of finding "anchor words" and using robust optimization for parameter recovery, the authors achieve state-of-the-art results with a fraction of the computational cost. While the algorithm relies on the existence of anchor words, it is robust to minor violations, making it a powerful tool for large-scale text analysis.
Summary updated