[Paper Review] Uncertainty-based out-of-distribution detection requires suitable function space priors.
This paper challenges the assumption that Bayesian neural networks (BNNs) inherently excel at out-of-distribution (OOD) detection due to epistemic uncertainty. It demonstrates that standard neural network architectures induce function space priors—via their kernels—that fail to reflect data distribution shifts, even in the infinite-width limit, rendering BNNs ineffective for OOD detection without explicit prior design.
The need to avoid confident predictions on unfamiliar data 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 induced under common architectural choices lead to uncertainties that do not reflect the underlying data generating process and are therefore unsuited for OOD detection. Importantly, we find this OOD behavior to be consistent with the corresponding finite-width networks. Desirable function space properties can be encoded in the prior in weight space, however, this currently only applies 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.
Motivation & Objective
- To investigate whether Bayesian neural networks (BNNs) naturally provide reliable uncertainty estimates for out-of-distribution (OOD) data.
- To examine the role of function space priors induced by neural network architectures in determining OOD detection performance.
- To determine whether exact Bayesian inference in the infinite-width limit of neural networks still suffers from poor OOD detection due to kernel-induced priors.
- To explore whether suitable function space priors can be encoded in weight space to improve OOD detection, and under what conditions.
- To assess the practical trade-off between generalization and OOD detection capabilities in BNNs.
Proposed method
- Analyzes the infinite-width limit of Bayesian neural networks, where exact Bayesian inference is possible via the correspondence with Gaussian processes.
- Derives the induced kernel functions from common neural network architectures (e.g., ReLU, SELU) and evaluates their function space prior properties.
- Evaluates the uncertainty estimates produced by these kernels on OOD data, comparing them to the true data-generating process.
- Extends findings from the infinite-width case to finite-width networks, showing consistent OOD behavior.
- Explores the possibility of encoding desirable function space properties in the weight-space prior, though only over a limited domain.
- Identifies a fundamental trade-off between model generalization and OOD detection performance in BNNs.
Experimental results
Research questions
- RQ1Do standard Bayesian neural networks with common architectures provide reliable uncertainty estimates for out-of-distribution inputs?
- RQ2How do the function space priors induced by neural network kernels affect OOD detection performance in the infinite-width limit?
- RQ3Is the poor OOD detection behavior observed in finite-width BNNs a consequence of approximate inference or inherent to the kernel structure?
- RQ4Can desirable function space properties for OOD detection be encoded in the weight-space prior, and if so, over what domain?
- RQ5To what extent does a trade-off between generalization and OOD detection limit the practical utility of BNNs for OOD detection?
Key findings
- Common neural network architectures induce kernel functions in the infinite-width limit that produce epistemic uncertainty estimates inconsistent with the true data-generating process, undermining OOD detection.
- The OOD detection failure is not an artifact of approximate inference but persists under exact Bayesian inference in the infinite-width regime.
- The observed OOD behavior in finite-width networks is consistent with their infinite-width counterparts, indicating that the issue is structural rather than approximation-related.
- While desirable function space properties can be encoded in the weight-space prior, this is currently limited to a specified subset of the input domain and does not generalize to OOD data.
- A fundamental trade-off between model generalization and OOD detection capability may render BNNs suboptimal for OOD detection in practice.
- Naive application of BNNs for OOD detection is therefore problematic due to inherent flaws in the induced function space priors, even under exact inference.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.