Parallel Gibbs Sampling: From Colored Fields to Thin Junction Trees

Joseph Gonzalez, Yucheng Low, Arthur Gretton, Carlos Guestrin

Abstract

Gibbs sampling is a cornerstone of probabilistic inference but suffers from slow sequential updates. While parallelization via synchronous updates is common, it often lacks theoretical convergence guarantees. This paper introduces two mathematically sound parallel Gibbs sampling methods: the Chromatic sampler and the Splash sampler. The Chromatic sampler leverages graph coloring for high-throughput updates in weakly coupled models, while the Splash sampler employs adaptive blocking and junction trees to handle strong correlations. We demonstrate significant speedups on multi-core systems across synthetic and real-world datasets, providing a robust framework for scalable inference.

Introduction

Gibbs sampling traditionally updates variables one at a time, making it a bottleneck for large-scale machine learning models. Simple parallelization, such as Synchronous Gibbs (updating all variables simultaneously), often breaks the mathematical property of ergodicity, leading to incorrect target distributions. This research addresses the challenge of achieving high-performance parallel sampling without sacrificing theoretical validity.

Methods

The authors propose two distinct yet complementary strategies for parallelization.

1. The Chromatic Sampler

This method utilizes graph coloring to identify sets of conditionally independent variables. In a Markov Random Field (MRF), variables sharing the same color can be sampled in parallel given the values of other colors. By iterating through colors, the Chromatic sampler provides a direct, ergodic parallelization of sequential Gibbs sampling.

2. The Splash Sampler

In models with high correlation ("tightly coupled"), single-variable updates lead to poor mixing. The Splash sampler introduces "blocking," where groups of variables called "Splashes" are sampled jointly.

  • Incremental Junction Trees: Splashes are constructed as bounded tree-width junction trees, enabling exact joint sampling within each block.
  • Markov Blanket Locking: To prevent interference between concurrent Splashes, a locking protocol ensures that no two Splashes modify overlapping Markov blankets.
  • Vanishing Adaptation: The algorithm uses a likelihood-ratio heuristic to grow Splashes in high-correlation regions, eventually transitioning to random growth to maintain long-term ergodicity.
The Splash sampler algorithm for parallel joint sampling of variable blocks.

Key Insights

A significant theoretical contribution is the "Secret of Synchronous Gibbs." The authors prove that for 2-colorable models (such as grids or bipartite graphs), the non-ergodic Synchronous Gibbs sampler is equivalent to running two independent, ergodic Chromatic samplers. This explains its empirical success despite theoretical flaws.

Comparison between a Synchronous Chain and two independent Ergodic Chains, illustrating the theoretical equivalence in 2-colorable models.

The paper also highlights the trade-off between throughput and mixing. While the Chromatic sampler offers massive throughput (samples per second), the Splash sampler provides faster mixing per sample in complex models. Furthermore, the Splash sampler can achieve super-linear speedups because increasing the number of processors reduces individual Splash sizes, accelerating the internal junction-tree inference.

Results and Evaluation

Evaluations on a 32-core system using synthetic image denoising and the CORA-1 Markov Logic Network (MLN) demonstrated the following:

  • Scalability: Both samplers scaled effectively, with the Chromatic sampler achieving near-linear increases in sample generation rates.
  • Model-Specific Performance: The Splash sampler excelled on the high-connectivity CORA-1 dataset, reaching high-likelihood states faster than the Chromatic sampler. Conversely, for simpler denoising tasks, the Chromatic sampler's high throughput led to faster variance reduction.

Conclusion

This work bridges the gap between theoretical ergodicity and practical parallel performance. While challenges remain in optimal graph coloring and managing the overhead of complex blocking, these methods represent a major step forward for scalable probabilistic inference. Future research may focus on continuous adaptation techniques that maintain ergodicity without the "vanishing" constraint.

Summary updated

BibTeX
@article{gonzalez2011parallel,
  author = {Joseph Gonzalez and Yucheng Low and Arthur Gretton and Carlos Guestrin},
  title = {{Parallel Gibbs Sampling: From Colored Fields to Thin Junction Trees}},
  journal = {AISTATS},
  year = {2011},
}
Figure