Neural Network OOD Detection With Gradient Projection Features

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improverobustness to perturbationVSAvoiddetection capability for OOD samples
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

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.

Inventive Principle:
Principle #1Segmentation

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.

Inventive Principle:
Principle #24Intermediary (Mediator)

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

Engineering Contradiction:
Improvedetection specificityVSAvoiddetection framework complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

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.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Adaptability or versatility

If comprehensive OOD detection framework is implemented to detect all perturbation types, then detection coverage improves, but computational overhead increases

Engineering Contradiction:
Improvedetection coverageVSAvoidcomputational overhead
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

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.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS20250292101A1FOOD: Effective Detection of Out-of-Distribution Inputs in Neural Networks
Publication Date: 2025.09.18 NORTHEASTERN UNIV (US)
  • US20250292101A1 patent drawing
  • US20250292101A1 patent drawing
  • US20250292101A1 patent drawing

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.