Skip to main content
QUICK REVIEW

[Paper Review] Stochastic Variational Inference

Matt Hoffman, David M. Blei|arXiv (Cornell University)|Jun 29, 2012
Bayesian Methods and Mixture ModelsComputer Science99 references27 citations
TL;DR

This paper introduces stochastic variational inference (SVI), a scalable method for approximate Bayesian inference in large probabilistic models. By replacing batch optimization with stochastic gradient updates using mini-batches of data, SVI enables efficient inference on massive datasets—demonstrated on topic models with up to 3.8 million documents—outperforming traditional variational inference in speed and scalability while maintaining accuracy.

ABSTRACT

We develop stochastic variational inference, a scalable algorithm for approximating posterior distributions. We develop this technique for a large class of probabilistic models and we demonstrate it with two probabilistic topic models, latent Dirichlet allocation and the hierarchical Dirichlet process topic model. Using stochastic variational inference, we analyze several large collections of documents: 300K articles from Nature, 1.8M articles from The New York Times, and 3.8M articles from Wikipedia. Stochastic inference can easily handle data sets of this size and outperforms traditional variational inference, which can only handle a smaller subset. (We also show that the Bayesian nonparametric topic model outperforms its parametric counterpart.) Stochastic variational inference lets us apply complex Bayesian models to massive data sets.

Motivation & Objective

  • To address the scalability limitations of traditional variational inference when applied to massive datasets.
  • To develop a general-purpose inference algorithm that scales to large collections of documents and other high-dimensional data.
  • To enable the use of complex Bayesian models, including nonparametric ones, on data sets too large for standard inference methods.
  • To demonstrate the effectiveness of the method on real-world, large-scale topic modeling tasks using data from Nature, The New York Times, and Wikipedia.

Proposed method

  • The method replaces batch coordinate ascent in variational inference with stochastic optimization using noisy gradient estimates from mini-batches of data.
  • It employs natural gradient updates in the variational parameter space to improve convergence and stability.
  • For models with global and local latent variables, the algorithm alternates between updating local variational parameters and stochastic updates of global parameters using subsampled data.
  • The algorithm is derived for exponential family exponential family models, allowing efficient computation of sufficient statistics and expectations.
  • A key innovation is the use of unbiased stochastic gradients to update global parameters, with step sizes that decay over time to ensure convergence.
  • The method supports both parametric and nonparametric Bayesian models, including latent Dirichlet allocation and the hierarchical Dirichlet process topic model.

Experimental results

Research questions

  • RQ1Can variational inference be scaled to massive data sets where traditional batch methods are computationally infeasible?
  • RQ2How can stochastic optimization be effectively combined with variational inference to maintain accuracy while improving speed?
  • RQ3Does the proposed method outperform standard variational inference in terms of convergence speed and final model quality on large-scale data?
  • RQ4Can stochastic variational inference be applied to nonparametric Bayesian models, such as the hierarchical Dirichlet process, and does it improve performance?
  • RQ5What are the theoretical and empirical properties of the stochastic gradient updates in the context of posterior approximation?

Key findings

  • Stochastic variational inference successfully scales to data sets of up to 3.8 million documents, including 1.8 million from The New York Times and 300,000 from Nature.
  • The method achieves faster convergence and lower training time compared to traditional batch variational inference, which struggles with data sets larger than a few hundred thousand documents.
  • The Bayesian nonparametric topic model (hierarchical Dirichlet process) outperforms its parametric counterpart (LDA) in terms of predictive likelihood and topic coherence on large data.
  • Stochastic updates with decaying step sizes ensure convergence to a stationary point of the evidence lower bound (ELBO).
  • The algorithm maintains high-quality posterior approximations even when using small mini-batches, due to the use of unbiased stochastic gradients and natural parameter updates.
  • Empirical results show that SVI achieves comparable or better performance than batch methods while reducing training time by orders of magnitude on large-scale text corpora.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.