A Stochastic approximation method for inference in probabilistic graphical models

Peter Carbonetto, Matthew King, Firas HamzeNeurIPS 2009

Introduction

Probabilistic inference—calculating the posterior distribution of hidden variables given observed data—is the engine driving many modern machine learning models. However, for complex models like Latent Dirichlet Allocation (LDA), exact inference is mathematically intractable. This paper introduces a hybrid inference framework that combines the optimization-driven approach of variational inference (VI) with the flexibility of Sequential Monte Carlo (SMC). By using stochastic approximation to minimize Kullback-Leibler (K-L) divergence, the method automatically generates a sequence of distributions for sampling. This results in posterior estimates that are more stable, accurate, and less biased than traditional mean-field or standard SMC methods.

The Inference Dilemma

When dealing with intractable models, researchers typically must choose between two flawed approaches:

  1. Monte Carlo methods (MCMC/SMC): These methods are theoretically unbiased but often suffer from high variance. They can easily get stuck in local modes or require hand-tuned "tempering" schedules that are notoriously difficult to design.
  2. Variational Inference (VI): VI is fast and reframes inference as an optimization problem. However, it usually requires assuming a "tractable" (simplified) family of distributions, such as a mean-field approximation. This simplification introduces a permanent bias because the true posterior rarely fits these simple, independent shapes.

The authors aim to bridge this gap. They propose a method that optimizes a variational objective but is not permanently restricted to simple, biased distribution families.

Conceptual illustration showing the proposed approximation method escaping the restricted set of tractable probabilities to better match the true distribution.

A Hybrid Stochastic Approximation Framework

To overcome the limitations of standard VI and MCMC, the authors propose a stochastic approximation framework. The core components of this approach include:

  • The Variational Objective: The primary goal is to minimize the K-L divergence between an approximating distribution and the true target posterior.
  • Stochastic Gradient Descent: Because the exact gradient of the K-L divergence cannot be computed, the method uses Monte Carlo samples to estimate it. The parameters are then updated using a Robbins-Monro style stochastic approximation step.
  • SMC Integration: As the parameters change at each iteration, the samples and their importance weights must be updated. The framework uses Sequential Monte Carlo (SMC) to smoothly "migrate" the particles from the old distribution to the new one.
  • The Variance Safeguard: A key technical contribution of this paper is a mechanism to prevent weight "degeneration"—a common SMC failure mode where a single sample accumulates all the importance weight. The authors introduce a safeguard that calculates a maximum allowable step size during optimization to keep the variance of the weights strictly under control.
  • Exponential Family Restriction: By restricting the approximating distributions to the exponential family, the framework maintains a clean, principled way to calculate gradients without requiring the variables to be fully independent (as in mean-field methods).

Key Insights

A major advantage of this approach is automatic tempering. In standard SMC, practitioners must manually design a sequence of distributions (e.g., slowly increasing a "temperature" parameter). In this new method, the sequence of distributions is a direct, automatic byproduct of the optimization process; the algorithm naturally "finds" the optimal path to the target.

Furthermore, the framework offers a principled way to trade the high variance of importance sampling for the bias of a variational approximation. By tuning the number of iterations and the strictness of the variance safeguard, users can explicitly manage this bias-variance trade-off.

Experimental Validation

The authors evaluate their method on two primary fronts: Latent Dirichlet Allocation (LDA) for text modeling, and a mathematically similar but notoriously difficult problem in population genetics. Using simulated genetic data, the goal is to infer the ancestry and admixture of individuals—a task where MCMC often struggles due to highly sensitive, multi-modal posteriors.

Comparison of maximum variance across different admixture levels (K), demonstrating the superior stability of the Stochastic Approximation (S.A.) method over MCMC and A.I.S.

The proposed Stochastic Approximation (S.A.) method was compared against standard MCMC and Annealed Importance Sampling (AIS). The results demonstrated significant improvements:

  • Consistency and Stability: In the population genetics trials, the stochastic approximation method produced significantly more consistent results across independent runs. As shown in the variance comparisons, MCMC often produced wildly different answers for the same data, whereas S.A. maintained near-zero maximum variance.
  • Accuracy: The proposed method was better at recovering the true "admixture distance," accurately measuring how different two individuals' ancestries are.
  • Honest Uncertainty: While MCMC was often overconfident in incorrect answers, the new method correctly exhibited high variance and uncertainty in cases where the underlying data was truly ambiguous. This makes it far more reliable for sensitive, real-world applications.

Limitations and Future Work

While promising, the framework has a few limitations. The algorithm's behavior can be sensitive to the total number of iterations, which directly impacts the bias-variance trade-off. Additionally, while it is less restrictive than mean-field methods, its success still relies on selecting a reasonably "good" variational approximation family. Finally, the "variance safeguard" is currently a heuristic; while it performs exceptionally well in practice, it requires further independent validation across a wider variety of probabilistic graphical models beyond LDA-like structures.

Summary updated

BibTeX
@inproceedings{carbonetto2009stochastic,
  author = {Peter Carbonetto and Matthew King and Firas Hamze},
  title = {{A Stochastic approximation method for inference in probabilistic graphical models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2009},
  url = {https://openreview.net/forum?id=HJ-hTOWdbB},
}
Figure