Spectral Learning for Supervised Topic Models.

Yong Ren, Yining Wang, Jun Zhu

TL;DR

This paper introduces the first provably correct spectral learning algorithms for Supervised Latent Dirichlet Allocation (sLDA). By leveraging the "method of moments" and tensor decomposition, the authors bypass the local optima issues that plague traditional variational and sampling-based inference, offering a faster, more reliable way to train topic models that predict response variables (like star ratings) from text.

What Problem Does This Paper Address?

Topic models like LDA are workhorses for finding "themes" in large document collections. Supervised versions (sLDA) add a layer of utility by linking these themes to a response variable—for example, predicting a movie's rating based on the topics discussed in a review.

Traditionally, these models are trained using Maximum Likelihood Estimation (MLE) via Variational Inference or Gibbs Sampling. However, the objective functions for these methods are highly non-convex. This means the training process often gets stuck in "local optima"—suboptimal solutions that depend heavily on how the algorithm was initialized.

While "spectral methods" (which use linear algebra and tensor decomposition to recover parameters) have been successful for unsupervised LDA, extending them to the supervised case is tricky. You have to accurately recover not just the word-topic distributions, but also the regression weights, and ensure they are correctly "matched" to the right topics.

Methods

The authors propose two distinct spectral approaches:

  1. Two-Stage Spectral Method:
    • Stage 1: Use standard spectral techniques (whitening and robust tensor power methods) to recover the topic-word distributions from word co-occurrence data.
  2. Stage 2: Use a novel "power update" method to recover regression parameters. This avoids the "matching problem" (figuring out which regression weight belongs to which topic) by reusing the eigenvectors found in the first stage.
  3. Joint (Single-Phase) Spectral Method: This is the paper's primary innovation. Instead of treating topics and supervision separately, the authors construct a "joint" vector that combines word counts and the response variable. By performing a single tensor decomposition on the moments of this joint vector, the algorithm recovers topics and regression weights simultaneously. This allows the supervision signal to actually influence the "shape" of the discovered topics.

To make these methods scale to real-world vocabularies, the authors incorporate Randomized Whitening (using random projections) to reduce the dimensionality of the word-occurrence matrices before processing.

Datasets

The researchers evaluated their algorithms on three types of data:

  • Synthetic Datasets: Used to verify the theoretical "sample complexity" bounds (proving that the error goes to zero as you add more data).
  • Hotel Review Dataset: 18,000 reviews from TripAdvisor, where the task is to predict a 1-5 star rating.
  • Amazon Movie Reviews: A massive, large-scale dataset containing approximately 7.9 million reviews. This served as a benchmark for both prediction accuracy and computational efficiency.

Key Insights and Ideas

  • Provable Correctness: Unlike Gibbs sampling, which might never reach the "true" parameters in a finite number of iterations, these spectral methods have a "sample complexity bound." This means the authors can mathematically prove how much data is needed to reach a specific level of accuracy.
  • Supervision Improves Topics: The joint method is superior because it uses the response variable (the "label") to help find the topics. This results in topics that are more "discriminative"—better at distinguishing between a 1-star and a 5-star review.
  • The Power of Tensors: The core "aha" moment is realizing that the relationship between words and ratings can be captured in a third-order tensor (a 3D data array). Decomposing this tensor reveals the underlying latent structure of the model directly.
  • Parallelization: Because spectral methods rely on computing moments (counting word pairs/triplets), they are "embarrassingly parallel." The authors demonstrate nearly linear speedup as more CPU threads are added.

Key Results

  • Performance: On the large-scale Amazon dataset, the single-phase spectral algorithm achieved results comparable to or better than state-of-the-art methods like MedLDA and Gibbs-sLDA.
  • Speed: Spectral methods were significantly faster than Gibbs sampling. On a synthetic dataset with 160,000 documents, the spectral method finished in ~90 seconds, while Gibbs sampling took over 20 minutes.
  • Stability: The spectral methods showed much lower variance in performance across different runs compared to sampling methods, which are prone to the "luck of the draw" in initialization.
  • Identifiability: The paper provides a formal proof for the "identifiability" of sLDA, establishing the conditions under which a model's parameters can be uniquely recovered from data.

Limitations and Future Work

  • Linear Assumption: The current model assumes a linear relationship between topic distributions and the response variable. The authors note that exploring non-linear regression models within a spectral framework is a promising next step.
  • Hyperparameter Sensitivity: The joint method introduces a noise variance parameter ($\sigma$) that needs to be tuned via cross-validation, whereas the two-stage method can estimate it more directly.
  • Tensor Dimensionality: While randomized whitening helps, third-order tensors still face a "curse of dimensionality" when the number of topics ($k$) becomes very large, potentially requiring more advanced stochastic gradient methods for the decomposition step.

Summary updated

BibTeX
@article{ren2018spectral,
  author = {Yong Ren and Yining Wang and Jun Zhu},
  title = {{Spectral Learning for Supervised Topic Models.}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2018},
  url = {https://openreview.net/forum?id=BXRV1uHluaB},
}
Figure