A Unified Particle-Optimization Framework for Scalable Bayesian Sampling

Changyou Chen, Ruiyi Zhang, Wenlin Wang, Bai Li, Liqun Chen

Abstract

This paper introduces a unified framework that bridges the gap between two major Bayesian sampling techniques: Stochastic Gradient MCMC (SG-MCMC) and Stein Variational Gradient Descent (SVGD). By reframing sampling as an optimization problem on the space of probability measures—specifically using Wasserstein Gradient Flows (WGF)—the authors develop new "particle-interactive" algorithms. These methods, including $w$-SGLD and $\pi$-SGLD, produce higher-quality samples with significantly less computational overhead by leveraging repulsive forces to prevent mode collapse.

Introduction

In Bayesian machine learning, characterizing the posterior distribution is a fundamental challenge. Traditionally, Stochastic Gradient MCMC (SG-MCMC) has been the workhorse for this task. However, SG-MCMC often produces highly correlated samples that "clump" together, requiring a large number of iterations to represent the target distribution accurately. Stein Variational Gradient Descent (SVGD) emerged as a particle-based alternative, pushing a fixed set of particles to match the target. Despite its empirical success, the theoretical connection between these two paradigms remained elusive. This work provides that missing link, establishing a framework that treats sampling as a deterministic optimization process in the space of probability distributions.

Methodology: Sampling as Wasserstein Gradient Flow

The core of the proposed framework is the use of Wasserstein Gradient Flows (WGF). Instead of analyzing the trajectory of individual points, WGF describes the evolution of an entire probability density toward a target. The authors prove that the density evolution in SG-MCMC is a gradient flow of the KL-divergence functional in Wasserstein space.

To translate this continuous theory into practical algorithms, the authors employ two key numerical techniques:

  1. Discrete Gradient Flows: Solving the optimization step-by-step for a finite set of particles.
  2. Blob Methods: Borrowed from fluid dynamics, this technique treats discrete particles as "blobs" of density. This allows for the calculation of "repulsive forces" that prevent particles from collapsing into local modes.
Comparison of particle evolution across different sampling methods on multi-modal toy distributions.

The resulting samplers, such as Particle Interactive SGLD ($\pi$-SGLD), combine the exploration capabilities of MCMC with the efficiency of particle interaction. By introducing interaction (repulsive and attractive forces), the particles "negotiate" their positions to cover the distribution more effectively than standard MCMC samples, which do not communicate with one another.

Experimental Evaluation

The framework was evaluated across a diverse range of tasks, including synthetic toy distributions, image classification, and language modeling.

Toy Distributions and Image Classification

On multi-modal toy distributions, the proposed methods successfully captured all modes where standard SGLD failed with the same particle count. In image classification tasks, $\pi$-SGLD consistently outperformed baseline samplers. On MNIST, it achieved a test error of 1.30%, compared to 1.40% for SVGD and 1.41% for SGLD. On CIFAR-10, it reached 89.52% accuracy, a significant improvement over standard ADAM optimization (86.76%).

Accuracy as a function of the regularization parameter $W_2^2$ for varying particle counts $M$.

As shown in the figure above, the accuracy is sensitive to both the number of particles ($M$) and the interaction strength (regularized by $W_2^2$). Increasing the particle count generally improves performance, while the Wasserstein regularization prevents the "clumping" behavior seen in non-interactive samplers.

Language Modeling

The framework was also applied to Recurrent Neural Networks (RNNs) for language modeling. Across three text corpora (APNEWS, IMDB, and BNC), $\pi$-SGLD achieved the lowest perplexity scores, demonstrating its scalability to high-dimensional parameter spaces. For instance, on APNEWS, it reached a perplexity of 59.83, significantly lower than SGLD's 63.01.

Conclusion and Future Directions

By unifying SG-MCMC and SVGD under the umbrella of Wasserstein Gradient Flows, this work provides a principled foundation for developing interactive particle samplers. While these methods introduce additional computational complexity that scales with the number of particles ($M$), the gains in sample quality and model accuracy are substantial. The authors suggest mitigating memory overhead by treating only a subset of parameters (such as the final layer of a neural network) as particles. Future research will focus on improving the efficiency of these interactions and exploring automated hyperparameter tuning for the interaction kernels.

Summary updated

BibTeX
@inproceedings{chen2018unified,
  author = {Changyou Chen and Ruiyi Zhang and Wenlin Wang and Bai Li and Liqun Chen},
  title = {{A Unified Particle-Optimization Framework for Scalable Bayesian Sampling}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2018},
}
Figure