Skip to main content
QUICK REVIEW

[Paper Review] Principled Detection of Out-of-Distribution Examples in Neural Networks.

Shiyu Liang, Yixuan Li|arXiv (Cornell University)|Jun 8, 2017
Adversarial Robustness in Machine LearningComputer Science78 citations
TL;DR

ODIN is a principled, post-hoc method for detecting out-of-distribution (OOD) inputs in neural networks without retraining. It uses temperature scaling and input perturbations to separate softmax score distributions, significantly improving OOD detection—reducing false positive rate from 34.7% to 4.3% at 95% true positive rate on DenseNet/CIFAR-10.

ABSTRACT

We consider the problem of detecting out-of-distribution examples in neural networks. We propose ODIN, a simple and effective out-of-distribution detector for neural networks, that does not require any change to a pre-trained model. Our method is based on the observation that using temperature scaling and adding small perturbations to the input can separate the softmax score distributions of in- and out-of-distribution samples, allowing for more effective detection. We show in a series of experiments that our approach is compatible with diverse network architectures and datasets. It consistently outperforms the baseline approach[1] by a large margin, establishing a new state-of-the-art performance on this task. For example, ODIN reduces the false positive rate from the baseline 34.7% to 4.3% on the DenseNet (applied to CIFAR-10) when the true positive rate is 95%. We theoretically analyze the method and prove that performance improvement is guaranteed under mild conditions on the image distributions.

Motivation & Objective

  • To develop a reliable, post-hoc method for detecting out-of-distribution inputs in neural networks without modifying the model.
  • To improve the separation between in-distribution and out-of-distribution softmax score distributions.
  • To ensure compatibility across diverse architectures and datasets.
  • To provide theoretical justification for performance gains under mild distributional assumptions.

Proposed method

  • The method applies temperature scaling to the final softmax layer to sharpen or soften confidence scores.
  • Small, input-specific perturbations are added to test inputs to amplify differences in softmax outputs.
  • The perturbation is computed using the gradient of the loss with respect to the input, scaled by a small epsilon.
  • The approach is applied after model training, requiring no retraining or architectural changes.
  • The method leverages the fact that OOD samples are more sensitive to perturbations than in-distribution samples.
  • It uses the resulting softmax scores after perturbation to classify inputs as in- or out-of-distribution.

Experimental results

Research questions

  • RQ1Can temperature scaling and input perturbations improve OOD detection without retraining?
  • RQ2Does the method generalize across different neural network architectures and datasets?
  • RQ3What is the theoretical basis for the observed performance improvement?
  • RQ4How does the method compare to existing baselines in terms of false positive and true positive rates?

Key findings

  • ODIN reduces the false positive rate from 34.7% to 4.3% on DenseNet trained on CIFAR-10 when the true positive rate is 95%.
  • The method consistently outperforms the baseline approach across diverse network architectures and datasets.
  • The performance improvement is theoretically guaranteed under mild conditions on the input distributions.
  • Temperature scaling and input perturbations effectively separate softmax score distributions for in- and out-of-distribution samples.
  • The method is compatible with any pre-trained neural network, requiring no architectural or training modifications.
  • The approach establishes a new state-of-the-art for OOD detection in neural networks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.