Neural Network OOD Detection With Gradient Projection Features
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Deep Neural Networks (DNNs) struggle to effectively detect and differentiate between in-distribution (ID) and out-of-distribution (OOD) inputs, particularly when faced with intentional and unintentional perturbations, leading to erroneous decisions and a lack of comprehensive frameworks for unified detection across semantic and non-semantic shifts.
Innovation Solution
The proposed Framework for Out-Of-Distribution Detection (FOOD) utilizes gradient-based characterization of the loss manifold by perturbing inputs with Gaussian noise, performing de-noising, and measuring changes in gradient norms to distinguish between different types of OOD samples, without requiring access to OOD data during training.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If robust training with augmentations is used to improve DNN robustness, then resistance to certain perturbations improves, but detection capability for out-of-distribution samples deteriorates
Solution Approach 1:
The method segments the detection process into two distinct phases: (1) training phase using robust training with augmentations to build robustness, and (2) detection phase using gradient norm analysis to detect OOD samples. This segmentation allows the system to maintain robustness while gaining detection capability through a dedicated detection mechanism that operates independently during inference.
Solution Approach 2:
The gradient norm serves as an intermediary metric that bridges the gap between robust training and OOD detection. By analyzing the magnitude of gradients during forward propagation, the system can identify OOD samples without requiring separate detection models or sacrificing the robustness gained from training with augmentations.
2Measurement precision
If separate detection methods are used for intentional and unintentional perturbations, then detection specificity for each perturbation type improves, but overall detection complexity increases
Solution Approach 1:
The gradient norm-based detection method is universal and can detect both intentional perturbations (adversarial examples) and unintentional perturbations (corruptions) using the same mechanism. During inference, the system computes the gradient norm for any input sample, and a single threshold determines whether the sample is OOD, eliminating the need for separate detection pipelines for different perturbation types.
3Adaptability or versatility
If comprehensive OOD detection framework is implemented to detect all perturbation types, then detection coverage improves, but computational overhead increases
Solution Approach 1:
The detection mechanism leverages the forward propagation process itself to compute gradients, which are already necessary for obtaining predictions. By analyzing the gradient norms during this existing computational process, the system achieves comprehensive OOD detection without requiring additional forward passes or separate detection computations, thus minimizing computational overhead.
Data Source
AI summary
A method of detecting an out-of-distribution input to a deep neural network (DNN) comprises perturbing a sample input, de-noising the perturbed sample input, and extracting gradient projection features of the sample input from each layer of the DNN, and concatenating the one or more gradient projection features of the sample input from the layers of the DNN into a feature vector for the sample input. The method comprises extracting gradient projection features of the de-noised sample input from each layer of the DNN, and concatenating the gradient projection features of the de-noised sample input from the layers of the DNN into a single feature vector for the denoised sample input. The method comprises generating a projected density score based on the feature vector for the sample input and the single feature vector the de-noised sample input and determining that the sample input is out-of-distribution when the score exceeds a threshold.


