Scalable Bayesian Inference via Stochastic Gradient MCMC

This direction is split into other directions: auxiliary variable decoupling (split Gibbs sampling), data-parallel Gibbs sampling, MCMC scalability bottleneck, computational cost of Bayesian inference. Its last version stays readable and citable here.

Version 1 of 11,882 papers2,014 conceptsfrozen 2026-10-04

Bayesian methods are prized for their ability to quantify uncertainty, but they have historically struggled with "Big Data." Traditional Markov Chain Monte Carlo (MCMC) algorithms require a full pass over the entire dataset to perform a single update. As datasets grew to millions or billions of observations, this linear scaling became a computational wall.

To break through, researchers developed Stochastic Gradient MCMC (SG-MCMC). This family of algorithms bridges the gap between fast stochastic optimization (like SGD) and rigorous Bayesian sampling, allowing models to explore the posterior distribution using only small "mini-batches" of data.

The Scalability Bottleneck

In standard Bayesian inference, we want to sample from a posterior distribution $p(\theta | X) \propto p(X | \theta)p(\theta)$. Algorithms like the Metropolis-Hastings test require evaluating the likelihood of every single data point in $X$ to decide whether to accept a new parameter proposal.

As noted by Anoop Korattikara and Max Welling in Austerity in MCMC Land: Cutting the Metropolis-Hastings Budget, this requirement makes exact inference "computationally prohibitive" for modern datasets. The goal of SG-MCMC is to replace these full-batch evaluations with stochastic estimates without losing the statistical guarantees of MCMC.

From Optimization to Sampling: SGLD

The foundation of this field is Stochastic Gradient Langevin Dynamics (SGLD), introduced by Max Welling and Yee Whye Teh in Bayesian Learning via Stochastic Gradient Langevin Dynamics.

SGLD looks remarkably like Stochastic Gradient Descent (SGD), but with two critical modifications:

  1. Injected Noise: It adds a specific amount of Gaussian noise to the gradient update.
  2. Step-size Annealing: It decays the learning rate over time.

The intuition is elegant: early in the process, the large step sizes allow the algorithm to behave like SGD, quickly finding the high-probability regions (the "modes") of the distribution. As the step size decays, the injected noise begins to dominate the inherent noise of the mini-batches. At this point, the algorithm transitions from optimization to sampling, naturally wandering around the posterior distribution rather than settling at a single point.

Adding Momentum: SGHMC and the Friction Term

While SGLD is simple, it suffers from the same "random walk" inefficiencies as basic Langevin dynamics. To speed up exploration, researchers turned to Hamiltonian Monte Carlo (HMC), which uses momentum to glide through the parameter space.

However, Michael Betancourt proved in The Fundamental Incompatibility of Scalable Hamiltonian Monte Carlo and Naive Data Subsampling that simply swapping full gradients for mini-batch gradients in HMC fails. The stochastic noise acts like a constant source of heat, causing the "particle" to fly off to infinity and destroying the geometric properties that make HMC work.

To fix this, Tianqi Chen and Emily Fox introduced Stochastic Gradient Hamiltonian Monte Carlo (SGHMC) in Stochastic Gradient Hamiltonian Monte Carlo. They introduced a friction term to the physical simulation. This friction counteracts the "heat" (variance) introduced by the mini-batch gradients, stabilizing the system and allowing for efficient, large-scale sampling.

Taming the Noise: Variance Reduction

The primary enemy of SG-MCMC is the high variance of the stochastic gradient. If the gradient estimate is too noisy, the sampler will take a long time to converge or may produce biased results.

Researchers have adapted variance reduction techniques from the optimization world to solve this:

Modern Frontiers and Applications

The reach of SG-MCMC continues to expand into complex architectures and high-dimensional physics:

By trading a small, controlled amount of bias for a massive reduction in computational cost, SG-MCMC has transformed Bayesian inference from a boutique method for small data into a scalable tool for modern machine learning.

Papers in this version

Showing 60 of 1,882 papers.

History & citationVersion 1 · 2026-10-04

Split into other directions · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_scalable_bayesian_inference_via_stochast_cd35610e,
  title = {Scalable Bayesian Inference via Stochastic Gradient MCMC},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/scalable-bayesian-inference-via-stochastic-gradient-mcmc/rdr_cd35610e40314a3aaf23aead2fd52f18},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_scalable_bayesian_inference_via_stochast_cd35610e_v1,
  title = {Scalable Bayesian Inference via Stochastic Gradient MCMC},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/scalable-bayesian-inference-via-stochastic-gradient-mcmc/rdr_cd35610e40314a3aaf23aead2fd52f18/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}