Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networks
Shiyu LiangYixuan LiR. Srikant
Proposes ODIN, a post-hoc method that significantly lowers false positive rates in out-of-distribution image detection using only temperature scaling and small input perturbations without retraining the neural network.
Modern neural networks generalize effectively on data drawn from the same distribution as their training set but often assign high-confidence predictions to unrecognizable or irrelevant inputs. This creates safety risks in real-world visual recognition tasks where testing distributions cannot be fully controlled.
The article sets out to develop and evaluate a practical method for detecting out-of-distribution images on already-trained networks without any retraining.
The authors introduce ODIN, which combines temperature scaling in the softmax function with small, controlled input perturbations. They test the approach on DenseNet and Wide ResNet models trained on CIFAR-10 and CIFAR-100, measuring performance against multiple out-of-distribution sets including cropped and resized TinyImageNet and LSUN images plus synthetic noise, using metrics such as false-positive rate at 95 percent true-positive rate, AUROC, and AUPR.
ODIN consistently lowers the false-positive rate by large margins relative to the prior baseline; for example, it reduces the rate from 34.7 percent to 4.3 percent on a DenseNet trained on CIFAR-10 when distinguishing TinyImageNet crop images at 95 percent true-positive rate. Similar gains appear across architectures and dataset pairs, with performance remaining strong even when hyperparameters are transferred across validation sets. Larger distributional distances between in- and out-of-distribution data correlate with easier detection.
These results indicate that simple post-processing can substantially improve a network’s ability to flag unfamiliar inputs, lowering the chance that erroneous high-confidence predictions reach downstream decisions. The approach adds negligible computational cost at inference time and preserves accuracy on in-distribution examples.
The method can be applied immediately to existing models in safety-critical settings. Further validation on additional domains such as speech and natural-language processing would strengthen confidence before broad deployment. Performance degrades when out-of-distribution images closely resemble in-distribution data, and optimal hyperparameters require a modest validation set; results are therefore most reliable when such a set is available.
- Paper: A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks, Dan Hendrycks et al. (2017). This work establishes the fundamental baseline and evaluation protocol for detecting out-of-distribution examples using maximum softmax probabilities, which ODIN explicitly targets and improves upon.
- Paper: On Calibration of Modern Neural Networks, Chuan Guo et al. (2017). This paper introduces temperature scaling to calibrate modern neural network confidences, providing one of the core algorithmic components utilized in ODIN's post-processing method.
- Paper: Explaining and Harnessing Adversarial Examples, Ian J. Goodfellow et al. (2015). This foundational text introduces gradient-based input perturbations, directly inspiring ODIN's strategy of applying small, controlled perturbations to separate in-distribution from out-of-distribution images.
- Paper: Deep neural networks are easily fooled: High confidence predictions for unrecognizable images, Anh Nguyen et al. (2014). This paper demonstrates that deep neural networks assign high confidence to unrecognizable images, defining the core safety vulnerability that motivates ODIN's out-of-distribution detection method.
- Paper: A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks, Kimin Lee et al. (2018). This work directly compares against and outperforms ODIN by proposing a unified Mahalanobis distance framework across intermediate feature layers for detecting out-of-distribution and adversarial samples.
- Paper: Energy-based Out-of-distribution Detection, Weitang Liu et al. (2020). This paper advances out-of-distribution detection beyond ODIN's softmax temperature scaling by proposing a theoretically grounded energy-based scoring framework.
- Paper: Deep Anomaly Detection with Outlier Exposure, Dan Hendrycks et al. (2019). This study extends post-hoc out-of-distribution detection techniques like ODIN by introducing Outlier Exposure to train models directly on auxiliary anomalous data.
- Paper: Can You Trust Your Model's Uncertainty? Evaluating Predictive Uncertainty Under Dataset Shift, Yaniv Ovadia et al. (2019). This benchmark provides a comprehensive evaluation of predictive uncertainty and post-hoc temperature scaling methods under real-world dataset shift.
- Paper: Failing Loudly: An Empirical Study of Methods for Detecting Dataset Shift, Stephan Rabanser et al. (2019). This empirical study broadens sample-level out-of-distribution detection to evaluating and characterizing broader dataset-level distribution shifts.
