Particle-based Online Bayesian Sampling

Yifan Yang, Chang Liu, Zheng ZhangarXiv 2023 · DOI

Abstract

This paper introduces Online Particle-based Variational Inference (OPVI), a novel framework for performing Bayesian inference on streaming data. By updating a set of particles using a "sublinear increasing batch-size" strategy and analyzing the process as a gradient flow in Wasserstein space, the authors provide the first theoretical dynamic regret bounds for online particle-based sampling, outperforming traditional methods in both accuracy and uncertainty quantification.

Introduction

In real-world applications, data often arrives in continuous streams. Standard machine learning models struggle in this "online" setting because retraining on the entire history is computationally prohibitive. Bayesian models are ideal for these tasks as they provide a distribution rather than a point estimate, enabling better uncertainty quantification and robustness. However, updating a Bayesian posterior online is difficult: Variational Inference (VI) is fast but often inaccurate; Markov Chain Monte Carlo (MCMC) is accurate but slow; and Particle-based Variational Inference (ParVI) has lacked a robust theoretical framework for shifting target distributions.

Methodology

The proposed OPVI framework treats the evolution of particles as a Wasserstein gradient flow. This approach allows for a rigorous analysis of how a set of particles can track a sequence of changing optimal posteriors.

Conceptual framework of OPVI showing particle updates as a Wasserstein gradient flow.

Key Innovations

  • Sublinear Increasing Batch-Size: To mitigate noise from stochastic updates, OPVI employs a batch size $B_t$ that increases sublinearly over time (e.g., $B_t \propto t^{0.55}$). This ensures that gradient error shrinks sufficiently to allow convergence to the moving target.
  • Dynamic Regret Analysis: The authors utilize dynamic regret to measure how effectively particles track the sequence of changing posteriors, providing a more relevant metric for online learning than static regret.
  • Wasserstein Space Framework: Grounded in $\mathcal{P}_2(\mathcal{W})$, the space of probability distributions, the method uses Riemannian structure to prove that particle updates minimize KL-divergence to the true posterior over time.
  • Improved Diffusion: For high-dimensional stability, the authors introduced a scaled diffusion term ($0.1 \cdot \nabla K$) that significantly improves performance in complex models like Neural Networks.

Experimental Evaluation

The algorithm was evaluated on three benchmarks: a synthetic mixture of Gaussians for visualization, the Kin8nm dataset for Bayesian Neural Networks (BNNs), and MNIST for high-dimensional scalability.

OPVI performance on a synthetic moving posterior task using a sublinear batch size.

Key Results and Insights

  • Superior Tracking: OPVI demonstrated significantly better tracking of moving posteriors compared to standard SVGD or Langevin Dynamics. In synthetic tests, the sublinear batch size strategy allowed particles to remain concentrated on the evolving target distribution.
  • BNN Performance: On the Kin8nm task, OPVI achieved an 11.8% improvement in RMSE and a 20.1% improvement in Log-Likelihood over baseline methods.
  • Efficiency and Stability: OPVI matched the performance of "full-batch" methods while using less than half the computation time. It also maintained stability in high-dimensional tasks like MNIST, where standard SVGD often fails due to diffusion term approximations.

Conclusion

OPVI bridges the gap between frequentist online optimization and Bayesian inference by viewing particle sampling as an optimization problem in the space of distributions. While it requires the target distribution not to change too abruptly, it offers a powerful and theoretically grounded approach for online Bayesian learning.

Summary updated

BibTeX
@misc{yang2023particle,
  author = {Yifan Yang and Chang Liu and Zheng Zhang},
  title = {{Particle-based Online Bayesian Sampling}},
  year = {2023},
  eprint = {2302.14796},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.14796},
}
Figure