[Paper Review] The Peril of Popular Deep Learning Uncertainty Estimation Methods
This paper reveals a critical failure in popular deep learning uncertainty estimation methods: Monte Carlo Dropout (MCDropout) and Bayesian Neural Networks (BNNs) often assign low uncertainty to out-of-distribution (OOD) samples, contrary to the expected behavior. In contrast, Gaussian Processes (GPs) correctly identify such samples with high uncertainty. The study demonstrates this flaw empirically on 2D toy data and real-world datasets like MNIST and CIFAR-10, showing that MCDropout and BNNs fail to detect OOD inputs, while GPs succeed due to their kernel-based distance awareness.
Uncertainty estimation (UE) techniques -- such as the Gaussian process (GP), Bayesian neural networks (BNN), Monte Carlo dropout (MCDropout) -- aim to improve the interpretability of machine learning models by assigning an estimated uncertainty value to each of their prediction outputs. However, since too high uncertainty estimates can have fatal consequences in practice, this paper analyzes the above techniques. Firstly, we show that GP methods always yield high uncertainty estimates on out of distribution (OOD) data. Secondly, we show on a 2D toy example that both BNNs and MCDropout do not give high uncertainty estimates on OOD samples. Finally, we show empirically that this pitfall of BNNs and MCDropout holds on real world datasets as well. Our insights (i) raise awareness for the more cautious use of currently popular UE methods in Deep Learning, (ii) encourage the development of UE methods that approximate GP-based methods -- instead of BNNs and MCDropout, and (iii) our empirical setups can be used for verifying the OOD performances of any other UE method. The source code is available at https://github.com/epfml/uncertainity-estimation.
Motivation & Objective
- To investigate the reliability of widely used uncertainty estimation (UE) methods—MCDropout and BNNs—in detecting out-of-distribution (OOD) samples.
- To compare their performance against the gold standard, Gaussian Processes (GPs), which are known for accurate OOD detection.
- To demonstrate empirically that MCDropout and BNNs fail to assign high uncertainty to OOD inputs in real-world scenarios.
- To provide analytical and empirical justification for why GP-based methods are more robust in OOD detection due to their kernel-based similarity modeling.
Proposed method
- The study uses a 2D toy dataset to visually and quantitatively compare uncertainty estimates from GP, MCDropout, and BNNs across in-distribution and OOD regions.
- For real-world evaluation, the paper trains ResNet-18 on CIFAR-10 and uses CIFAR-100 samples not seen during training as OOD data, measuring uncertainty via output entropy.
- BNNs are trained using both Mean-Field Variational Inference (MFVI) and Hamiltonian Monte Carlo (HMC) to assess the impact of inference method on uncertainty estimation.
- The GP model uses a Laplace approximation for classification, with predictive uncertainty derived from the variance of the posterior distribution over function values.
- Uncertainty is quantified using the entropy of the predicted class distribution: $\mathcal{H}({\bm{x}},{\bm{\omega}}) = -\sum_{c\in C}\hat{{\bm{y}}}_{c}\log\hat{{\bm{y}}}_{c}$.
- Theoretical analysis shows that when the kernel vector $\mathbf{k}_{\star}$ between a test point and training points is small (i.e., the test point is far from training data), GP uncertainty approaches maximum (entropy ≈ 1 in binary classification), ensuring high uncertainty for OOD inputs.
Experimental results
Research questions
- RQ1Do MCDropout and BNNs reliably assign high uncertainty to out-of-distribution (OOD) samples, as required for safe deployment?
- RQ2Why do MCDropout and BNNs fail to detect OOD inputs, while Gaussian Processes (GPs) succeed?
- RQ3Is the failure of MCDropout and BNNs a theoretical limitation or an artifact of specific architectures or training procedures?
- RQ4Can the kernel-based distance awareness of GPs be formally linked to their superior OOD detection performance?
- RQ5How do uncertainty estimates from MCDropout and BNNs compare to those from GPs on real-world datasets like MNIST and CIFAR-10?
Key findings
- On a 2D toy dataset, MCDropout and BNNs assign low uncertainty to OOD samples, while Gaussian Processes (GPs) assign high uncertainty, correctly identifying them as out of distribution.
- On MNIST, when training on digits 0 and 1 and testing on digits 2–9, MCDropout and BNNs assign low average uncertainty to digits 2–9, indicating poor OOD detection.
- On CIFAR-10, when training a ResNet-18 on CIFAR-10 and testing on CIFAR-100 samples not in the training set, MCDropout and BNNs again assign low uncertainty, failing to detect OOD inputs.
- Theoretical analysis confirms that GPs assign high uncertainty to OOD points because the kernel vector $\mathbf{k}_{\star}$ becomes small, leading to a predictive variance approaching $k(\mathbf{x}_{\star},\mathbf{x}_{\star})$ and entropy approaching 1.
- The failure of MCDropout and BNNs is not due to poor training or hyperparameters, as the issue persists even with HMC inference in BNNs and multiple MC samples in MCDropout.
- The results suggest that current UE methods should be replaced with GP-like approaches that explicitly model input similarity via kernels, rather than relying on weight-space uncertainty from BNNs or dropout.
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.