Learning Topic Models by Belief Propagation

Jia Zeng, William K. Cheung, Jiming Liu · DOI

TL;DR

This paper reformulates Latent Dirichlet Allocation (LDA) and its variants as factor graphs within a Markov Random Field (MRF) framework, enabling the use of loopy Belief Propagation (BP) for topic modeling. By operating on unique word indices rather than individual word tokens, this approach delivers a learning scheme that is both faster and statistically more accurate (lower perplexity) than standard Variational Bayes and Gibbs Sampling.

What Problem Does This Paper Address?

Probabilistic topic models like Latent Dirichlet Allocation (LDA) are standard tools for uncovering latent themes in large text collections. However, because of the complex, loopy dependencies inherent in these hierarchical Bayesian models, exact inference is impossible.

Currently, researchers rely on approximations like Variational Bayes (VB) or Collapsed Gibbs Sampling (GS). Both have drawbacks: VB introduces structural biases and is slowed down by the calculation of complex digamma functions, while GS must sample a topic for every single word token in a corpus. This token-by-token sweep makes GS computationally expensive and difficult to scale when documents are long or datasets are massive. The authors aim to bridge this gap by providing an inference method that doesn't compromise on either speed or accuracy.

Methods

The authors transform the traditional directed graphical model of LDA into an undirected, two-layer factor graph. They achieve this by integrating out the multinomial parameters (the document-topic distributions $\theta$ and topic-word distributions $\phi$) using Dirichlet-Multinomial conjugacy. This mathematical pivot allows them to treat topic modeling as a classic MRF labeling problem.

Fig. 1. Three-layer graphical representation of LDA [1].

With the model recast as a factor graph, the authors apply the classic loopy Belief Propagation (BP) algorithm to pass messages between latent topic variables and factor nodes.

Fig. 2. Factor graph of LDA and message passing.

They also introduce Simplified BP (siBP), which approximates the message updates as a simple product of document-topic and topic-word distributions. This variant closely resembles Probabilistic Latent Semantic Analysis (PLSA) but retains smoothing hyperparameters to prevent overfitting. Crucially, the authors demonstrate the generality of this framework by extending it to two complex LDA variants: the Author-Topic Model (ATM) and the Relational Topic Model (RTM).

Datasets

The authors evaluated their approach on four standard, large-scale document datasets:

  • CORA: Research paper abstracts including citation links.
  • MEDL: Biomedical paper abstracts from the MEDLINE database.
  • NIPS: Full conference papers, characterized by a high volume of text per document.
  • BLOG: A collection of political blogs.

Key Insights and Ideas

  • Tokens vs. Indices: While Gibbs Sampling must iterate through every single word token ($N_d$) in a document, BP operates on unique word indices ($W_d$). In corpora with long documents (where the token-to-index ratio $N_d/W_d$ is high, such as NIPS), message passing over indices yields massive computational savings without any loss in accuracy.
  • The Digamma Bottleneck: The paper reveals that VB’s slowness is largely an implementation artifact rather than a conceptual flaw: calculating expensive digamma functions bogs it down. BP completely avoids these functions, matching or beating VB's speed.
  • Perplexity vs. Interpretability: An interesting "aha moment" occurs during qualitative evaluation. Even though BP achieves significantly lower predictive perplexity (a better statistical fit), the top-10 words for the inferred topics look nearly identical across BP, VB, and GS. This highlights the known disconnect in topic modeling where statistical optimization does not necessarily translate to better human interpretability.

Key Results

  • Lower Perplexity: BP consistently achieves the lowest predictive perplexity across all datasets, outperforming VB by approximately 11% and GS by 6% on average.
  • Faster Execution: BP proves significantly speedier than GS, especially on datasets with long documents. It also runs faster than standard VB implementations.
  • Superior Relational Modeling: When extended to the Relational Topic Model (RTM) for link prediction (e.g., predicting paper citations), the BP-based approach achieved a 15% higher F-measure than Gibbs Sampling, showing it is highly effective at capturing structural dependencies in networks.

Limitations and Future Work

  • Convergence Guarantees: As is typical with loopy Belief Propagation on graphs with cycles, convergence to a fixed point is not theoretically guaranteed, even though the algorithm converged reliably in all of the authors' experiments.
  • Manual Hyperparameter Tuning: In the RTM formulation, a balancing weight ($\xi$) is used to trade off text content against network link information. Currently, this weight must be tuned manually; the authors note that automating this via MRF structure learning is an important next step.
  • Massive Scaling: While faster than traditional sampling, adapting this BP framework to streaming data (online learning) or distributed architectures (like MapReduce) remains an open challenge for future research.

Summary updated

BibTeX
@article{zeng2013learning,
  author = {Jia Zeng and William K. Cheung and Jiming Liu},
  title = {{Learning Topic Models by Belief Propagation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2013},
  url = {https://openreview.net/forum?id=rss-F4Sl_pS},
}
Figure