On out-of-distribution detection with Bayesian neural networks
Not on the map. Why?
Abstract (arXiv)
The question whether inputs are valid for the problem a neural network is trying to solve has sparked interest in out-of-distribution (OOD) detection. It is widely assumed that Bayesian neural networks (BNNs) are well suited for this task, as the endowed epistemic uncertainty should lead to disagreement in predictions on outliers. In this paper, we question this assumption and show that proper Bayesian inference with function space priors induced by neural networks does not necessarily lead to good OOD detection. To circumvent the use of approximate inference, we start by studying the infinite-width case, where Bayesian inference can be exact due to the correspondence with Gaussian processes. Strikingly, the kernels derived from common architectural choices lead to function space priors which induce predictive uncertainties that do not reflect the underlying input data distribution and are therefore unsuited for OOD detection. Importantly, we find the OOD behavior in this limiting case to be consistent with the corresponding finite-width case. To overcome this limitation, useful function space properties can also be encoded in the prior in weight space, however, this can currently only be applied to a specified subset of the domain and thus does not inherently extend to OOD data. Finally, we argue that a trade-off between generalization and OOD capabilities might render the application of BNNs for OOD detection undesirable in practice. Overall, our study discloses fundamental problems when naively using BNNs for OOD detection and opens interesting avenues for future research.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 36 of its 66 references that are in the map. First posted on arXiv 12 Oct 2021.
Builds on
36 of 66 references.
References · 36
- 2016Overcoming catastrophic forgetting in neural networkscited by 4,787
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,385
- 2018Continual Lifelong Learning with Neural Networks: A Reviewcited by 1,330
- 2019Normalizing Flows for Probabilistic Modeling and Inferencecited by 1,323
- 2019Can You Trust Your Model's Uncertainty? Evaluating Predictive Uncertainty Under Dataset Shiftcited by 1,287
- 2017Continual Learning with Deep Generative Replaycited by 1,158
- 2018Deep Anomaly Detection with Outlier Exposurecited by 942
- 2019Aleatoric and Epistemic Uncertainty in Machine Learning: An Introduction to Concepts and Methodscited by 913
- 2017Deep Neural Networks as Gaussian Processescited by 622
- 2019A Simple Baseline for Bayesian Uncertainty in Deep Learningcited by 560
- 2020Bayesian Deep Learning and a Probabilistic Perspective of Generalizationcited by 480
- 2018Do Deep Generative Models Know What They Don't Know?cited by 443
24 more
- 2018Gaussian Process Behaviour in Wide Deep Neural Networkscited by 317
- 2021What Are Bayesian Neural Network Posteriors Really Like?cited by 308
- 2019Continual learning with hypernetworkscited by 273
- 2016A Kernelized Stein Discrepancy for Goodness-of-fit Tests and Model Evaluationcited by 236
- 2020Being Bayesian, Even Just a Bit, Fixes Overconfidence in ReLU Networkscited by 231
- 2017Multiplicative Normalizing Flows for Variational Bayesian Neural Networkscited by 157
- 2019Functional Variational Bayesian Neural Networkscited by 127
- 2021Repulsive Deep Ensembles are Bayesiancited by 104
- 2021Priors in Bayesian Deep Learning: A Reviewcited by 101
- 2016PAC-Bayesian Theory Meets Bayesian Inferencecited by 88
- 2017Bayesian Hypernetworkscited by 66
- 2020All You Need is a Good Functional Prior for Bayesian Deep Learningcited by 61
- 2021Posterior Meta-Replay for Continual Learningcited by 45
- 2020Understanding Variational Inference in Function-Spacecited by 40
- 2019A Unifying Bayesian View of Continual Learningcited by 38
- 2021Dangers of Bayesian Model Averaging under Covariate Shiftcited by 31
- 2017Implicit Weight Uncertainty in Neural Networkscited by 30
- 2018Learning Gaussian Processes by Minimizing PAC-Bayesian Generalization Boundscited by 24
- 2018Neural-net-induced Gaussian process regression for function approximation and PDE solutioncited by 22
- 2019Expressive Priors in Bayesian Neural Networks: Kernel Combinations and Periodic Functionscited by 22
- 2020The Ridgelet Prior: A Covariance Function Approach to Prior Specification for Bayesian Neural Networkscited by 20
- 2017Invariance of Weight Distributions in Rectified MLPscited by 12
- 2020An Infinite-Feature Extension for Bayesian ReLU Nets That Fixes Their Asymptotic Overconfidencecited by 11
- 2020RegFlow: Probabilistic Flow-based Regression for Future Predictioncited by 7
Built on by
Citing papers per year: 2022: 1; 2023: 1; 2024: 1; 2025: 1; 2026: 2.
6 papers.
- 2023Beyond Deep Ensembles: A Large-Scale Evaluation of Bayesian Deep Learning under Distribution Shiftcited by 20
- 2024PViT: Prior-augmented Vision Transformer for Out-of-distribution Detectioncited by 3
- 2025Improving the adaptive and continuous learning capabilities of artificial neural networks: Lessons from multi-neuromodulatory dynamicscited by 2
- 2026JAF: Judge Agent Forestcited by 1
- 2022An out-of-distribution discriminator based on Bayesian neural network epistemic uncertaintycited by 0
- 2026Epistemic Uncertainty Is Not the Reducible Kindcited by 0
- 2026Epistemic Uncertainty Is Not the Reducible Kind10 Jun 2026
- 2026JAF: Judge Agent Forest29 Jan 2026
- 2025Improving the adaptive and continuous learning capabilities of artificial neural networks: Lessons from multi-neuromodulatory dynamics12 Jan 2025
- 2024PViT: Prior-augmented Vision Transformer for Out-of-distribution Detection27 Oct 2024
- 2023Beyond Deep Ensembles: A Large-Scale Evaluation of Bayesian Deep Learning under Distribution Shift21 Jun 2023
- 2022An out-of-distribution discriminator based on Bayesian neural network epistemic uncertainty18 Oct 2022