Abstract
The Supervised Hierarchical Dirichlet Process (sHDP) is a nonparametric Bayesian model designed to jointly learn latent topics in grouped data while simultaneously predicting a response variable. Unlike parametric models like Supervised Latent Dirichlet Allocation (sLDA), which require a pre-defined number of topics, sHDP automatically adjusts its complexity based on the data. This flexibility allows the model to capture fine-grained, predictive features that fixed-topic models often overlook. Our evaluation across multiple datasets demonstrates that sHDP achieves superior or competitive performance compared to well-tuned parametric alternatives, particularly in noisy real-world scenarios.
Introduction
In topic modeling, researchers frequently encounter grouped data—such as collections of documents—where each group is associated with a label or response variable, like a sentiment score or a category. Traditional unsupervised methods, such as Latent Dirichlet Allocation (LDA), identify thematic structures but ignore these labels. Supervised LDA (sLDA) improved upon this by training topics to be predictive of the response. However, sLDA is parametric, forcing practitioners to guess the "right" number of topics ($K$). Choosing an incorrect $K$ leads to either underfitting (missing nuances) or overfitting (modeling noise).
The Supervised Hierarchical Dirichlet Process (sHDP) addresses this "Goldilocks problem" by utilizing Bayesian nonparametrics. By allowing for an infinite number of potential topics, sHDP lets the data dictate the appropriate level of model complexity needed to explain both the content and the associated response variables.
The sHDP Model
The sHDP extends the Hierarchical Dirichlet Process (HDP) by adding a supervision layer. In this framework, each topic is characterized not only by a distribution over words but also by a regression coefficient.
The generative process, as illustrated in the graphical model above, involves a global distribution of topics $G_0$ and document-specific distributions $G_i$. For each document $i$, the response variable $y_i$ is modeled as a function of the average regression coefficients of the topics assigned to its words. Key technical features include:
- Generalized Linear Model (GLM) Integration: The model can accommodate various response types, such as continuous values (Gaussian) or binary labels (Binomial), through a GLM framework.
- Non-Conjugate Inference: The inclusion of the response variable breaks the mathematical conjugacy of the Dirichlet process. To handle this, the authors implement a collapsed Gibbs sampling algorithm using Neal’s "Algorithm 8" (auxiliary variable sampling), which allows the model to efficiently propose and adopt new topics during the training process.
Experimental Evaluation
The model was evaluated on four diverse real-world datasets:
- Newswire Classification: Predicting S&P 500 stock price movements based on Reuters news articles.
- Movie Snippet Classification: Binary sentiment analysis of short Rotten Tomatoes reviews.
- Movie Review Regression: Predicting continuous 0-1 ratings for full-length reviews.
- Document Popularity Regression: Predicting the number of votes ("Diggs") for submissions on the Digg website.
Results and Discussion
The sHDP demonstrated significant advantages over parametric models:
- Performance in Noisy Environments: On the Newswire dataset, where the relationship between text and stock prices is indirect and noisy, sHDP significantly outperformed sLDA. Its ability to isolate subtle signals allowed it to find predictive features that fixed-topic models missed.
- Efficiency and Scalability: sHDP performed as well as or better than the best-tuned versions of sLDA across all datasets. This eliminates the need for the computationally expensive trial-and-error process of searching for an optimal $K$.
- Qualitative Interpretability: The nonparametric approach often identifies highly specific topics. For instance, in movie reviews, sHDP might isolate a topic for a specific director or actor whose presence strongly correlates with a review's rating, whereas sLDA might group these into a broader, less predictive "action movie" category.
- Importance of Joint Learning: Comparisons with a "2-step" approach (unsupervised topic learning followed by regression) showed that joint learning is essential. The supervision must influence topic discovery to identify truly predictive features.
Conclusion and Future Work
The Supervised Hierarchical Dirichlet Process provides a robust framework for supervised topic modeling without the constraints of fixed topic counts. While powerful, the model's reliance on MCMC-based inference can be computationally intensive. Future research could explore variational inference techniques to scale the model to even larger datasets. Additionally, while the GLM framework is flexible, further work is needed to explicitly handle multi-class categorical outcomes more efficiently. Despite these challenges, sHDP represents a significant step forward in creating models that can truly "let the data decide" the complexity of latent structures.
Summary updated