Fast Predictive Uncertainty for Classification with Bayesian Deep Networks

Marius Hobbhahn, Agustinus Kristiadi, Philipp Hennig

Introduction

Standard deep learning models are notoriously overconfident, often assigning high probabilities to incorrect predictions or out-of-distribution data. Bayesian Neural Networks (BNNs) offer a principled solution by treating model weights as distributions, but they introduce a significant computational bottleneck. Converting Gaussian distributions in "logit space" to probability distributions in "output space" via the softmax function is non-linear and lacks a closed-form solution. Traditionally, researchers rely on Monte Carlo (MC) sampling—running the model hundreds of times for a single input—which is too slow for real-time applications like autonomous driving or medical diagnostics.

This paper introduces a sampling-free alternative using the Laplace Bridge (LB). By analytically mapping Gaussian distributions to Dirichlet distributions, the authors achieve Bayesian uncertainty estimates with negligible computational overhead.

The Laplace Bridge Framework

The core innovation is the revival and refinement of the Laplace Bridge, a mathematical tool that provides an analytic map between the parameters of a Gaussian distribution (mean $\mu$, covariance $\Sigma$) and a Dirichlet distribution (concentration parameters $\alpha$).

High-level sketch of the Laplace Bridge process, mapping from parameter space to logit space, and finally to the Dirichlet output space.

Methodology

  1. Last-Layer Laplace: To maintain efficiency, the authors apply the Laplace approximation specifically to the last layer of the network. This captures the most critical predictive uncertainty while keeping the Hessian matrix manageable.
  2. The Bridge: The LB transforms the logit-space Gaussian into a Dirichlet distribution in the output space. This allows for a "sampling-free" approximation of the predictive distribution.
  3. The LB-norm Correction: The authors identified that the standard Laplace Bridge fails when variance is high, leading to overconfidence. They propose a normalization fix (LB-norm) that rescales the variance, ensuring the approximation remains accurate even in highly uncertain regions.

Experimental Evaluation

The method was tested across various scales, from 2D toy datasets to ImageNet.

  • OOD Detection: Using benchmarks like MNIST, CIFAR-10, and SVHN, the authors demonstrated that the corrected LB-norm matches or exceeds the performance of expensive Monte Carlo sampling in detecting out-of-distribution inputs.
  • Scalability: On ImageNet, using a pre-trained DenseNet-121, the Laplace Bridge enabled "uncertainty-aware" ranking. The model can adaptively return a longer list of candidate classes when it is uncertain, improving reliability in complex classification tasks.

Key Results and Insights

The Laplace Bridge is approximately 100x faster than Monte Carlo sampling with 100 samples, yet it maintains comparable quality in uncertainty estimation.

Comparison of predictive uncertainty on toy data across different methods: MAP, Monte Carlo (MC), Laplace Bridge (LB), and the proposed LB-norm.

As shown in the visualization above, standard Maximum A Posteriori (MAP) estimates produce overconfident decision boundaries. While standard Laplace Bridge (LB) approximations can sometimes struggle to capture the full uncertainty profile, the proposed LB-norm correction (bottom row) closely mirrors the high-quality uncertainty contours of Monte Carlo sampling (top row) across diagonal, Kronecker, and full-covariance approximations.

Furthermore, the use of Dirichlet distributions allows for elegant mathematical properties, such as closed-form marginals. This enables the model to instantly calculate the combined probability of specific class subsets without additional forward passes.

Conclusion

The Laplace Bridge provides a path toward "Bayesian uncertainty for free." By replacing slow sampling with a fast analytic mapping, this approach makes Bayesian deep learning viable for large-scale, real-time systems. While the LB-norm correction is currently motivated by empirical success, future work may provide a more rigorous theoretical derivation and extend the bridge to full-network approximations.

Summary updated

BibTeX
@inproceedings{hobbhahn2022fast,
  author = {Marius Hobbhahn and Agustinus Kristiadi and Philipp Hennig},
  title = {{Fast Predictive Uncertainty for Classification with Bayesian Deep Networks}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=jqktbuYWrN2},
}
Figure