Overview
Supervised Latent Dirichlet Allocation (sLDA) is a statistical model that discovers topics in a text collection while simultaneously learning to predict a specific outcome, such as a movie rating or a "like" count. By tying topic discovery directly to a response variable, sLDA outperforms traditional two-stage methods and standard regularized regression for predictive tasks.
The Problem with Unsupervised Topics
In Natural Language Processing, Latent Dirichlet Allocation (LDA) is a classic unsupervised tool used to find "topics"—groups of words that frequently appear together—within a large corpus. However, standard LDA is "blind" to external data.
If you run standard LDA on movie reviews, it might find topics based on genres (e.g., "space, alien, laser" for Sci-Fi). But if your goal is to predict whether a review is positive or negative, these genre-based topics might be useless. You need topics that distinguish between "excellent" and "terrible." To address this gap, sLDA finds latent structures that are specifically predictive of a labeled response.
How sLDA Works
sLDA extends the generative process of standard LDA. While LDA only models the words, sLDA pairs each document with a response variable ($y$).
- The Generative Process: For each document, the model draws topic proportions. For each word, it chooses a topic and then a word from that topic. Crucially, it then draws a response variable based on the average of the topics actually used in that specific document.
- Variational Inference: Because calculating the exact relationship between words, topics, and responses is mathematically intractable, sLDA uses variational EM (Expectation-Maximization) to approximate the best parameters.
- Generalized Linear Models (GLMs): While initially derived for continuous numbers (like a 1-5 star rating), sLDA extends to work with GLMs. This allows the model to handle binary labels, counts, and other data types by changing the "link function."
Key Insights: Joint Modeling and Sentiment Topics
The core innovation of sLDA is joint modeling: the response variable actively guides the discovery of the topics. The model is forced to find word clusters that correlate with the labels, making the resulting topics more interpretable for the specific task at hand.
This acts as a form of supervised dimension reduction. Turning thousands of words into a few targeted topics is far more efficient than reducing dimensions blindly and attempting to fit a regression model afterward. For example, in a movie review dataset, sLDA successfully identified topics that weren't just about plot points, but about quality. It found a distinct "bad movie" topic containing words like problem, unfortunately, worse, flat, and dull.
Datasets and Results
The authors evaluated sLDA on two real-world datasets:
- Movie Reviews: 5,006 reviews where the goal was to predict the number of stars a reviewer gave based on their text.
- Digg.com Popularity: 4,078 technology-related web page descriptions, predicting the number of "diggs" (votes) a story would receive in its first week.
sLDA consistently outperformed the baseline "unsupervised LDA + regression" pipeline. It also beat Lasso (a state-of-the-art regularized regression method) in terms of predictive $R^2$. Specifically, sLDA showed an 8.0% relative improvement over Lasso on the Digg dataset and a 9.4% relative improvement on the movie data.
Interestingly, supervising the topics didn't degrade the model's ability to represent the text. The "held-out likelihood" (a measure of how well the model understands the language) remained as good as or better than unsupervised LDA.
Limitations and Future Work
- Computational Constraints: In the sLDA E-step, the topic assignments for words cannot be updated in parallel because they all depend on the document's overall response. This makes it computationally more intensive than standard LDA.
- Complexity of Digg Data: Predicting web popularity is significantly harder than sentiment analysis. Digg descriptions are short, and the "tech" category is highly homogeneous, making it harder for the model to find distinct predictive topics.
- Link Functions: The paper primarily explores canonical link functions for GLMs. Future work could relax these constraints to allow for even more flexible response modeling.
Summary updated