NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Asynchronous Gibbs Sampling

Alexander Terenin, Daniel Simpson, David Draper

Gibbs sampling has long been a cornerstone of Bayesian inference, yet its inherently sequential nature presents a significant hurdle for modern large-scale computation. Standard implementations require variables to be updated in a strict order, leading to "worker starvation" on compute clusters where nodes must wait for network updates before proceeding. In their AISTATS 2020 paper, Terenin, Simpson, and Draper introduce a theoretical framework for Asynchronous Gibbs Sampling, enabling workers to operate independently and out-of-sync while maintaining convergence guarantees.

The Parallelization Problem

The traditional Gibbs sampler relies on the Markov property, where the next state depends only on the current state. In a parallel environment, enforcing this property usually requires global synchronization. While practitioners in fields like Natural Language Processing have occasionally used "Asynchronous Gibbs" by simply ignoring update sequences, this approach lacks a theoretical safety net and can lead to divergence or convergence to incorrect distributions if variables are tightly coupled.

Proposed Methodology

The authors propose two variants of the algorithm to address these issues:

  1. Approximate Asynchronous Gibbs: Workers update variables using the most recent available information, regardless of whether other workers have modified the global state in the interim.
  2. Exact Asynchronous Gibbs: This novel approach introduces a Metropolis-Hastings (MH) correction step. When a worker receives a remote update, it performs an MH test to ensure the update is statistically consistent with the local state.

Crucially, the authors prove a convergence theorem for the "Exact" version, ensuring it reaches the correct target distribution despite the chaotic nature of asynchronous communication. For many hierarchical models common in big data, this MH test simplifies into a "Single Data Point" trick, where validating an update only requires looking at the specific data point associated with that variable, rather than the entire dataset.

Key Insights and Diagnostics

A significant contribution of the paper is the observation of Phase Transitions. When the approximate algorithm fails, it often shifts from a sampling behavior to an optimization-like behavior, collapsing onto a single peak. Interestingly, the authors also identified a Latency Paradox: higher network latency can sometimes improve the accuracy of the approximate version by acting as a buffer against the bias of out-of-order updates.

To help practitioners, the authors propose Diagnostic A: calculating MH ratios even when running the faster approximate version. If these ratios remain concentrated near 1.0, the approximate results are likely reliable.

Distribution of Metropolis-Hastings ratios across different model types and algorithm versions.

Empirical Results and Scalability

The framework was evaluated on several challenging scenarios, including a Gaussian Process regression with $n = 71,500$ and a massive mixed-effects regression using a million-row dataset from eBay Inc.

In the eBay application, the asynchronous sampler achieved a 12x speedup, completing in just one hour compared to the twelve hours required by a standard sequential-scan sampler. Despite the asynchronous nature, the MH rejection rate in the "Exact" version was only approximately 2%, demonstrating that the safety of the correction step comes with minimal efficiency loss.

Comparison of runtime between sequential and asynchronous algorithms on the eBay dataset.

Conclusion

By providing a rigorous theoretical foundation for asynchronous updates, this work transforms Gibbs sampling from a sequential bottleneck into a scalable tool for massive datasets. While challenges remain for models with extreme variable correlation (near-singularities), the introduction of the MH correction step and practical diagnostics provides a robust path forward for Bayesian computation on modern distributed hardware.

Summary updated

BibTeX
@inproceedings{terenin2020asynchronous,
  author = {Alexander Terenin and Daniel Simpson and David Draper},
  title = {{Asynchronous Gibbs Sampling}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2020},
}
Figure