English

Sampling from Bayesian Neural Network Posteriors with Symmetric Minibatch Splitting Langevin Dynamics

Machine Learning 2025-03-12 v2 Machine Learning Numerical Analysis Numerical Analysis Probability Computation Methodology

Abstract

We propose a scalable kinetic Langevin dynamics algorithm for sampling parameter spaces of big data and AI applications. Our scheme combines a symmetric forward/backward sweep over minibatches with a symmetric discretization of Langevin dynamics. For a particular Langevin splitting method (UBU), we show that the resulting Symmetric Minibatch Splitting-UBU (SMS-UBU) integrator has bias O(h2d1/2)O(h^2 d^{1/2}) in dimension d>0d>0 with stepsize h>0h>0, despite only using one minibatch per iteration, thus providing excellent control of the sampling bias as a function of the stepsize. We apply the algorithm to explore local modes of the posterior distribution of Bayesian neural networks (BNNs) and evaluate the calibration performance of the posterior predictive probabilities for neural networks with convolutional neural network architectures for classification problems on three different datasets (Fashion-MNIST, Celeb-A and chest X-ray). Our results indicate that BNNs sampled with SMS-UBU can offer significantly better calibration performance compared to standard methods of training and stochastic weight averaging.

Keywords

Cite

@article{arxiv.2410.19780,
  title  = {Sampling from Bayesian Neural Network Posteriors with Symmetric Minibatch Splitting Langevin Dynamics},
  author = {Daniel Paulin and Peter A. Whalley and Neil K. Chada and Benedict Leimkuhler},
  journal= {arXiv preprint arXiv:2410.19780},
  year   = {2025}
}

Comments

33 pages, 7 figures. The first two authors contributed equally