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

Accelerated Markov Chain Monte Carlo Using Adaptive Weighting Scheme

Yan‐Bo Wang, Wenyu Chen, Shimin ShanarXiv 2024 · DOI

Abstract

Gibbs sampling is a cornerstone of Markov Chain Monte Carlo (MCMC) methods, traditionally relying on systematic or uniform random scans to update latent variables. However, these approaches often ignore the underlying geometry of the target distribution, leading to inefficient mixing in high-dimensional or "stretched" probability landscapes. This paper introduces a Weighted Gibbs Sampler that employs a non-uniform random scan. By optimizing selection probabilities to maximize the Expected Squared Jumping Distance (ESJD), we derive an elegant analytic solution: the optimal sampling frequency for a variable is proportional to the square root of its marginal variance. Our adaptive algorithm estimates these variances during execution, significantly accelerating convergence. We validate this approach through synthetic Gaussian tests, image denoising tasks, and Latent Dirichlet Allocation (LDA) for text processing.

Introduction: The Geometry of Sampling

Gibbs sampling operates by updating one variable at a time while conditioning on all others. While simple and effective, its performance is highly sensitive to the order and frequency of these updates. Traditional methods—systematic scans (sequential updates) and random scans (uniform selection)—treat all dimensions as equally important.

In practice, probability distributions are rarely uniform in their scale. Consider a distribution shaped like a long, thin ellipsoid. If a sampler spends equal time updating the narrow width and the long length, it wastes computational resources on dimensions that change minimally while failing to traverse the primary axis of variation efficiently. This mismatch results in slow "mixing" times and prolonged burn-in periods, where the sampler takes a long time to reach the high-probability regions of the target distribution.

The Weighted Gibbs Sampler

To address these inefficiencies, we propose a non-uniform random scan where each latent variable $x_i$ is assigned a selection probability $q_i$. The goal is to find a set of weights that maximizes the efficiency of the chain.

Optimization via ESJD

Directly optimizing the Effective Sample Size (ESS)—the gold standard for MCMC efficiency—is mathematically intractable. Instead, we utilize the Expected Squared Jumping Distance (ESJD) as a surrogate objective. By maximizing ESJD under the constraint that all selection probabilities sum to one, we can derive the optimal weighting scheme.

The Analytic Solution

Under a mean-field assumption (which treats variables as approximately independent for the purpose of weight calculation), we derived a simple and powerful rule:

$$q_i \propto \sqrt{Var(x_i)}$$

This suggests that variables with higher marginal variance—those that carry more information about the global structure—should be visited more frequently. To implement this in practice, the algorithm uses an Adaptive Estimation approach:

  1. Empirical Tracking: The sampler tracks the variance of each variable during the run.
  2. Periodic Updates: Weights are recalculated periodically based on current estimates.
  3. Regularization: A parameter $\lambda$ is included to ensure that no variable's selection probability drops to zero, maintaining the ergodicity of the Markov chain.

Experimental Validation

We tested the Weighted Gibbs Sampler across three distinct domains to evaluate its robustness and speed.

1. Synthetic Gaussian Distributions

In high-dimensional Gaussian settings with heterogeneous variances, the weighted sampler reached the target distribution significantly faster than both systematic and uniform random scans. It effectively prioritized the "long" dimensions of the distribution, reducing the number of iterations required for burn-in.

2. Image Denoising (Grid-lattice MRF)

Using the CMU Face Images dataset, we modeled image denoising as a Markov Random Field. An interesting emergent behavior was observed: the algorithm naturally assigned higher weights to pixels located near the boundaries of objects. Because edge pixels have higher uncertainty (variance) compared to pixels in uniform regions, the sampler focused its energy where the most information was needed to resolve the image structure, resulting in lower reconstruction errors.

3. Topic Modeling (LDA)

We applied the sampler to Latent Dirichlet Allocation using the Reuters-21578 dataset. The weighted approach achieved lower perplexity—a measure of how well the model predicts the data—within the first few iterations compared to standard baselines. Furthermore, we observed that the stability of the weights correlated with document length, suggesting the method naturally scales its confidence based on available data density.

Conclusion and Future Work

The Weighted Gibbs Sampler provides a computationally inexpensive way to leverage the geometry of a distribution to speed up MCMC. By focusing on high-variance dimensions, the sampler achieves faster burn-in and better mixing with negligible overhead.

Future research will explore extending this framework to asynchronous sampling in parallel computing environments and developing formal mathematical bounds for the mixing time improvements provided by this non-uniform scheme. While the current derivation utilizes a mean-field approximation, its strong performance in correlated settings like image processing suggests a broad applicability for complex Bayesian inference tasks.

Summary updated

BibTeX
@misc{wang2024accelerated,
  author = {Yan‐Bo Wang and Wenyu Chen and Shimin Shan},
  title = {{Accelerated Markov Chain Monte Carlo Using Adaptive Weighting Scheme}},
  year = {2024},
  eprint = {2408.12888},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.12888},
}

Loading related content...

Figure