[Paper Review] Detecting Out-of-Distribution Inputs in Deep Neural Networks Using an Early-Layer Output
The paper introduces an OOD detector that uses a one-class classifier on the early (optimal OOD discernment) layer’s features of a pretrained classifier, avoiding OOD data or retraining, with optional input preprocessing to boost performance.
Deep neural networks achieve superior performance in challenging tasks such as image classification. However, deep classifiers tend to incorrectly classify out-of-distribution (OOD) inputs, which are inputs that do not belong to the classifier training distribution. Several approaches have been proposed to detect OOD inputs, but the detection task is still an ongoing challenge. In this paper, we propose a new OOD detection approach that can be easily applied to an existing classifier and does not need to have access to OOD samples. The detector is a one-class classifier trained on the output of an early layer of the original classifier fed with its original training set. We apply our approach to several low- and high-dimensional datasets and compare it to the state-of-the-art detection approaches. Our approach achieves substantially better results over multiple metrics.
Motivation & Objective
- Motivate the need to detect out-of-distribution inputs in DNNs for safety-critical tasks.
- Propose a detector that does not require retraining the classifier or access to OOD samples.
- Identify and leverage an optimal early-layer latent space (OODL) where ID and OOD distributions are well separated.
- Evaluate the method across multiple low- and high-dimensional datasets against state-of-the-art detectors.
Proposed method
- Define a latent space via an early layer (OODL) whose features separate ID and OOD distributions.
- Search for the OODL by evaluating detection error across layers using a one-class SVM (OSVM) trained on training data features.
- Use a one-class detector on the OODL features to distinguish ID vs. OOD inputs at inference.
- For convolutional layers, reduce feature map dimensionality by channel-wise mean pooling before OSVM.
- Optionally apply input preprocessing (as in ODIN) to perturb inputs and improve detection, though the method already performs well without it.
Experimental results
Research questions
- RQ1Can an early layer of a fixed classifier provide a latent space where ID and OOD distributions are separable enough for detection without OOD samples?
- RQ2Which layer in a given network serves as the optimal OOD discernment layer (OODL) for robust OOD detection?
- RQ3Does a one-class detector on OODL features outperform existing max-softmax, ODIN, and MD-based detectors across datasets?
- RQ4What is the impact of input preprocessing on the proposed method’s performance?
Key findings
- The proposed approach yields substantially better detection performance than baseline and state-of-the-art methods on multiple metrics.
- The optimal OOD discernment layer (OODL) is typically a low-level layer, consistent across different OOD datasets but varying with ID dataset and architecture.
- Using OSVM on reduced-dimension early-layer features enables effective high-dimensional OOD detection without requiring OOD data during training.
- Input preprocessing can further enhance detection, but the method already achieves strong results without it.
- The detector is applicable to existing pretrained classifiers without retraining and without access to OOD samples.
Better researchstarts right now
From paper design to paper writing, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.