Overview
This paper introduces BP-sLDA, a method to train supervised Latent Dirichlet Allocation (LDA) models end-to-end using backpropagation. By unrolling the iterative topic inference process into a differentiable deep architecture, the authors enable fully discriminative training that outperforms traditional topic models and standard deep neural networks on large-scale text regression and classification tasks.
The Challenge with Supervised LDA
Latent Dirichlet Allocation (LDA) is a staple for discovering "topics" in large text corpora. In supervised settings (sLDA), we want to use these topics to predict a label, such as a star rating or a sentiment category.
Historically, this has been a two-step or loosely coupled process: first, infer the topics (generative), then train a classifier on those topics (discriminative). Even existing supervised LDA variants often rely on variational bounds or Gibbs sampling, which are computationally expensive and don't allow for true "end-to-end" gradient-based optimization. This separation limits the model's ability to learn topic representations that are specifically optimized for the final prediction task.
Methods: Bridging Topic Models and Deep Learning
The authors bridge the gap between probabilistic topic modeling and deep learning through two key innovations:
- MAP Inference via Mirror Descent: Instead of trying to calculate the full, complex posterior distribution of topics, the authors focus on Maximum A Posteriori (MAP) inference. They show that under certain conditions, this is a convex optimization problem that can be solved efficiently using the Mirror Descent Algorithm (MDA).
- The "Deep" Unrolling: The iterative steps of the MDA are "unrolled" into a layered architecture. Each iteration of the inference algorithm acts like a layer in a deep neural network. Because these steps are differentiable, the entire system—from the word-topic distributions ($\Phi$) to the final classification weights ($U$)—can be trained simultaneously using standard Backpropagation.
This results in two models: BP-sLDA (supervised) and BP-LDA (unsupervised), both of which benefit from the efficiency and discriminative power of backprop.
Datasets
The researchers evaluated their approach on three large-scale, real-world datasets:
- Amazon Movie Reviews (AMR): A massive dataset of 7.9 million reviews used for a regression task (predicting star ratings).
- Multi-domain Sentiment (MultiSent): 342,000 reviews across 25 product categories for binary sentiment classification.
- Proprietary Business Dataset: 1.2 million documents for a large-scale binary classification task.
Key Insights and Ideas
- Inference as a Layer: The most powerful idea here is treating an optimization-based inference process as a differentiable component of a neural network. This allows the model to "learn how to infer" topics that are most useful for the specific label being predicted.
- Discriminative Advantage: By maximizing the conditional likelihood $p(label|text)$ rather than the joint likelihood $p(text, label)$, the model becomes more robust to "model mismatch"—situations where the rigid assumptions of the generative LDA model don't perfectly fit real-world data.
- Sparsity is Maintained: Unlike standard neural networks, this architecture retains the interpretability of LDA. By tuning the Dirichlet parameter $\alpha$, the model can be encouraged to learn sparse topic distributions, which is often desirable in text analysis.
- Efficiency through Sparsity: Because the bag-of-words input is sparse, the "deep" MDA layers are computationally efficient, allowing the model to scale to millions of documents and hundreds of topics far more easily than traditional Gibbs sampling.
Key Results
- Superior Accuracy: On the AMR regression task, BP-sLDA achieved a predictive $R^2$ of 78.3%, significantly outperforming traditional sLDA, MedLDA, and even a standard 200x200 Deep Neural Network (76.2%).
- Classification Gains: On the proprietary dataset, BP-sLDA showed a 31% relative improvement in AUC over logistic regression and an 18% improvement over a standard neural network.
- Scalability: The training time for BP-sLDA on 7.9 million documents was shown to scale linearly with the number of topics, making it practical for production-scale environments.
Limitations and Future Work
- Point Estimates: The method relies on MAP inference (a point estimate) rather than the full posterior distribution. While this is faster and works well for prediction, it discards some of the uncertainty information provided by full Bayesian methods.
- Fixed Hyperparameters: The Dirichlet parameter $\alpha$ is treated as a fixed hyperparameter in this study. The authors suggest that learning $\alpha$ directly from the data via backprop is a promising next step.
- Inference Speed: While efficient, the authors note that exploring "accelerated" versions of mirror descent could further reduce the number of "layers" (iterations) needed for convergence.
- Semi-Supervised Learning: The framework is naturally suited for expansion into semi-supervised learning, where only a fraction of the documents have labels.
Summary updated