TL;DR
This paper introduces a novel adaptive thinning scheme that makes Piecewise Deterministic Markov Process (PDMP) samplers computationally practical for large-scale Bayesian Neural Networks (BNNs). By enabling efficient data subsampling without the restrictive independence assumptions of variational inference, the proposed method achieves superior posterior exploration, better calibration, and more reliable uncertainty estimates.
What Problem Does This Paper Address?
Bayesian Neural Networks (BNNs) offer a principled way to handle uncertainty, but performing inference on them is notoriously difficult. Researchers typically choose between two extremes:
- Variational Inference (VI): Fast and scalable but relies on "mean-field" assumptions—treating all parameters as independent—which fails to capture the complex correlations inherent in neural networks.
- Markov Chain Monte Carlo (MCMC): Theoretically accurate but computationally expensive. Standard methods like Hamiltonian Monte Carlo (HMC) cannot easily use mini-batches (subsampling), making them prohibitively slow for modern datasets.
Piecewise Deterministic Markov Processes (PDMPs) are a newer class of samplers that can use mini-batches. However, they require sampling from an Inhomogeneous Poisson Process (IPP) to determine when the sampler's "velocity" should change. Sampling from these IPPs is usually model-specific and mathematically grueling, which has limited their use in deep learning.
Methods
The authors propose a generic and adaptive thinning scheme to sample from these difficult IPPs.
- Adaptive Envelopes: Instead of requiring a manually derived upper bound for the IPP rate (which is impossible for complex BNNs), the algorithm builds a piecewise-linear "envelope" on the fly through interpolation.
- Thinning Algorithm: This envelope acts as a proposal distribution. Proposed event times are either accepted or used to refine the envelope further, ensuring the sampler stays efficient even as it explores new regions of the parameter space.
- Sampler Variants: They evaluate three PDMP types: the Bouncy Particle Sampler (BPS), a Preconditioned BPS ($\sigma$BPS), and the Boomerang Sampler, which uses non-linear dynamics and a Gaussian reference measure to better match the target posterior.
- Implementation: The authors released TPDMP, a GPU-accelerated Python package built on TensorFlow Probability, to make these methods accessible for general models.
Datasets
The methods were rigorously tested across several benchmarks:
- Synthetic Data: Simple regression and binary classification tasks to visualize predictive uncertainty.
- UCI Regression: Boston Houses, Naval, Energy, Yacht, and Concrete datasets.
- Image Classification: MNIST, Fashion-MNIST, SVHN, CIFAR-10, and CIFAR-100 using architectures like LeNet5 and ResNet20.
Key Insights and Ideas
-
Capturing Correlations: Unlike Variational Inference, PDMPs successfully capture the high correlations between parameters in a BNN layer, which is crucial for accurate posterior representation. Correlations between parameters in the first layer of a BNN.
-
The Boomerang Advantage: The Boomerang sampler emerged as a clear winner. By incorporating a Gaussian reference measure, it achieves much better "mixing" (exploring the posterior faster) than standard BPS or Stochastic Gradient Langevin Dynamics (SGLD).
- Avoiding Posterior Collapse: While SGLD often collapses to a single point estimate (similar to standard SGD) as its learning rate decays, PDMPs continue to explore the posterior distribution, providing more "honest" uncertainty.
- Out-of-Distribution (OOD) Robustness: PDMPs show a desirable increase in aleatoric uncertainty (higher entropy) when faced with OOD data, whereas SGLD remains overly confident in its errors.
Key Results
- Efficiency: On the Boston Houses dataset, the Boomerang sampler achieved an Effective Sample Size (ESS) of ~901, compared to just ~2.9 for SGLD and SGHMC.
- Calibration: On complex image tasks like CIFAR-10, PDMP samplers provided more calibrated predictions (lower Expected Calibration Error) than SGLD methods.
- Predictive Performance: PDMPs maintained competitive accuracy with SGLD while offering significantly better uncertainty quantification, especially for "difficult-to-classify" samples that lie near decision boundaries.
Limitations and Future Work
- Hyperparameter Sensitivity: The performance of PDMPs is sensitive to the choice of the "refreshment rate" and the variance of the auxiliary velocity distribution. If these are set poorly, the sampler may fail to explore or may diverge.
- Approximate Bounds: The thinning scheme uses an approximate upper bound. While the authors include a rejection condition to mitigate bias, a strictly "exact" bound for neural networks remains an open challenge.
- Memory Overhead: Storing enough samples to represent the posterior for massive models (like ResNet-50) requires significant memory, which currently limits the scale of these methods.
- Future Directions: The authors suggest investigating non-local preconditioning methods and bespoke model architectures that are easier for samplers to traverse.
Summary updated