NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Encoding the Latent Posterior of Bayesian Neural Networks for Uncertainty Quantification

Gianni Franchi, Andrei Bursuc, Emanuel Aldea, Séverine Dubuisson, Isabelle Bloch

Introduction

Deep Neural Networks (DNNs) are notoriously overconfident, often making "confidently wrong" predictions when faced with out-of-distribution data. Bayesian Neural Networks (BNNs) address this by learning a distribution over weights rather than point estimates, allowing for principled uncertainty quantification. However, standard BNNs struggle with scalability and often rely on the restrictive "mean-field" assumption, which ignores correlations between weights.

The Latent-Posterior BNN (LP-BNN)

To overcome these hurdles, the authors propose the Latent-Posterior BNN (LP-BNN). This method leverages the efficiency of BatchEnsemble (BE)—which shares a "slow" weight matrix and uses "fast" rank-1 vectors for ensemble members—but replaces point estimates with a learned latent space.

Conceptual comparison of standard NNs, BNNs, and the proposed LP-BNN which uses a VAE latent space for weight distributions.

LP-BNN employs a Variational Autoencoder (VAE) at each layer to compress the distribution of these fast weights into a low-dimensional latent space. This approach offers several advantages:

  • Implicit Correlation: The VAE captures complex weight dependencies that mean-field BNNs miss.
  • Stability: The VAE's reconstruction loss acts as a regularizer, making training significantly more stable than traditional BNNs.
  • Scalability: By performing inference in a tiny latent space (e.g., size 32), the method scales to large architectures like ResNet-50.

Experimental Results

The authors evaluated LP-BNN across computer vision benchmarks including CIFAR-10/100, their corrupted variants (CIFAR-C), and semantic segmentation tasks (StreetHazards).

Calibration and Robustness

LP-BNN demonstrates superior calibration, especially under dataset shift. On CIFAR-10, it achieved an Expected Calibration Error (ECE) of 0.0094, nearly matching the performance of expensive Deep Ensembles (0.0093) at zero skew, and showing even greater robustness as data corruption increases.

Expected Calibration Error (ECE) vs. skew intensity, showing LP-BNN's superior robustness compared to BatchEnsemble and Deep Ensembles.

Efficiency

A key advantage of LP-BNN is its computational efficiency. For a ResNet-50 model on the StreetHazards dataset, training LP-BNN required only 1.33x the time of a single vanilla network. In contrast, a Deep Ensemble of four models requires 4x the training and memory resources.

Conclusion

LP-BNN provides a scalable path for Bayesian inference in deep learning. By encoding weight distributions into a latent space, it captures essential correlations and provides high-quality uncertainty estimates at a fraction of the cost of traditional ensemble methods. Future work may explore more expressive generative models, such as Normalizing Flows, to further enhance the latent posterior.

Summary updated

BibTeX
@article{franchi2020encoding,
  author = {Gianni Franchi and Andrei Bursuc and Emanuel Aldea and Séverine Dubuisson and Isabelle Bloch},
  title = {{Encoding the Latent Posterior of Bayesian Neural Networks for Uncertainty Quantification}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2020},
  doi = {10.1109/tpami.2023.3328829},
}
Figure