Microcanonical Langevin Ensembles: Advancing the Sampling of Bayesian Neural Networks
Emanuel Sommer, Jakob Robnik, Giorgi Nozadze, Uros Seljak, David Rügamer
TL;DR
This work tackles the bottleneck of sampling-based Bayesian inference for large, multimodal neural posteriors by introducing Microcanonical Langevin Ensembles (MILE), which embed an adapted Microcanonical Langevin Monte Carlo (MCLMC) within an ensemble framework initialized by deep optimization. By combining three-phase tuning (step size, energy-variance scheduling, and ESS targeting), deep ensemble initialization, and deterministic gradient steps, MILE delivers up to an order-of-magnitude speedup over NUTS-based approaches while preserving or improving predictive performance and uncertainty quantification. Extensive UCI, CNN, and attention-based benchmarks demonstrate strong scalability and consistent resource predictability, with clear advantages in higher-dimensional models and larger datasets. The method reduces runtime variability, enables parallelization, and provides a practical, auto-tuned option for sampling-based BNN inference, marking a significant step toward scalable probabilistic deep learning. Future work could extend MILE with stochastic-gradient variants and explore alternative priors to broaden applicability.
Abstract
Despite recent advances, sampling-based inference for Bayesian Neural Networks (BNNs) remains a significant challenge in probabilistic deep learning. While sampling-based approaches do not require a variational distribution assumption, current state-of-the-art samplers still struggle to navigate the complex and highly multimodal posteriors of BNNs. As a consequence, sampling still requires considerably longer inference times than non-Bayesian methods even for small neural networks, despite recent advances in making software implementations more efficient. Besides the difficulty of finding high-probability regions, the time until samplers provide sufficient exploration of these areas remains unpredictable. To tackle these challenges, we introduce an ensembling approach that leverages strategies from optimization and a recently proposed sampler called Microcanonical Langevin Monte Carlo (MCLMC) for efficient, robust and predictable sampling performance. Compared to approaches based on the state-of-the-art No-U-Turn Sampler, our approach delivers substantial speedups up to an order of magnitude, while maintaining or improving predictive performance and uncertainty quantification across diverse tasks and data modalities. The suggested Microcanonical Langevin Ensembles and modifications to MCLMC additionally enhance the method's predictability in resource requirements, facilitating easier parallelization. All in all, the proposed method offers a promising direction for practical, scalable inference for BNNs.
