Supervised Hierarchical Dirichlet Processes with Variational Inference

Cheng Zhang, Carl Henrik Ek, Xavi Gratal, Florian T. Pokorny, Hedvig Kjellström

Introduction

Topic modeling has long been a cornerstone of machine learning for discovering latent themes in unstructured data like text, images, and video. However, traditional models like Latent Dirichlet Allocation (LDA) face a significant "Goldilocks" problem: practitioners must manually specify the number of topics ($K$) beforehand. If $K$ is too small, the model underfits; if it is too large, it overfits and becomes computationally burdensome.

While the Hierarchical Dirichlet Process (HDP) addressed this by allowing the data to dictate the number of topics, it was primarily designed for unsupervised tasks. This paper introduces Supervised Hierarchical Dirichlet Processes (SHDP), a framework that combines the non-parametric flexibility of HDP with the label-aware power of Supervised LDA (SLDA). By utilizing variational inference, the authors provide a scalable model that matches the performance of perfectly tuned parametric models without the manual guesswork.

The SHDP Framework

The core innovation of SHDP is the integration of downstream supervision into the infinite topic space of HDP. In this model, document labels are treated as response variables that depend on the internal distribution of topics.

Graphical representations of SHDP: (a) Bayesian representation and (b) Stick-breaking construction.

Key technical components include:

  • Stick-Breaking Construction: To manage the "infinite" nature of the model, the authors employ a stick-breaking representation. This treats the topic distribution as a unit-length stick broken into infinitely many pieces, where the size of each piece represents a topic's prevalence.
  • Downstream Supervision: Labels are incorporated via a soft-max function, making the model suitable for multi-class classification tasks.
  • Variational Inference (VI): To avoid the slow convergence of Markov Chain Monte Carlo (MCMC) methods, the authors derive a variational inference algorithm. This approximates the complex posterior distribution and optimizes a lower bound on the likelihood, enabling faster training.
  • Online Learning: The model is further extended to an online setting, allowing it to process massive datasets in mini-batches.

Experimental Evaluation

The authors evaluated SHDP on two distinct computer vision benchmarks to demonstrate its versatility:

  1. Natural Scene Classification: A dataset consisting of four scene classes (coast, forest, mountain, and open country) represented as "bags-of-visual-words."
  2. KTH Action Dataset: A video dataset for classifying human actions (boxing, clapping, and waving) using Space-Time Interest Points (STIP).

Results and Discussion

The experimental results highlight SHDP's primary advantage: automatic complexity tuning. In both benchmarks, SHDP achieved performance levels equivalent to the best-case scenarios for SLDA, but without the need for extensive hyperparameter tuning.

Classification performance and confusion matrices for scene (left) and action (right) datasets.

In the Natural Scene Classification task, SHDP reached an accuracy of 86.68%. As shown in the performance plots, SLDA only matched this accuracy when manually tuned to a specific range of topics (100-200). Similarly, for Action Classification, SHDP achieved 86.67% accuracy, consistently outperforming SLDA across most topic counts.

These results demonstrate that the "infinite" topic space of HDP does not conflict with classification goals. Instead, label information helps guide the discovery of more discriminative topics, providing a stable and robust alternative to parametric models.

Limitations and Future Work

Despite its strengths, SHDP introduces some computational hurdles. The update equations for certain parameters (such as the softmax parameter $\mu$) lack closed-form solutions, requiring non-linear optimization techniques like the conjugate gradient method. Additionally, the model currently relies on "bag-of-words" features. Future research may explore factorizing the model to better separate discriminative signals from background noise and extending the framework to handle multi-modal data, such as simultaneous image and text analysis.

Summary updated

BibTeX
@inproceedings{zhang2013supervised,
  author = {Cheng Zhang and Carl Henrik Ek and Xavi Gratal and Florian T. Pokorny and Hedvig Kjellström},
  title = {{Supervised Hierarchical Dirichlet Processes with Variational Inference}},
  booktitle = {Workshops @ ICCV},
  year = {2013},
  doi = {10.1109/iccvw.2013.41},
}
Figure