IP Library › Granted Patent US 12,688,676
Granted Patent B2
US 12,688,676 · App. 18/325,436 · Granted Jul 21, 2026

Out-of-distribution detection using a neural network

Inventors: Ibrahima Ndiour (Portland, OR); Nilesh Ahuja (Cupertino, CA); Ranganath Krishnan (Hillsboro, OR); Mahesh Subedar (Portland, OR); Omesh Tickoo (Portland, OR); Ergin Genc (Portland, OR)
Assignee: Intel Corporation
G06V10/7715G06V10/80G06V10/82
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,688,676
App. No.
18/325,436
Granted
Jul 21, 2026
Kind
B2
Abstract

Features extracted from one or more layers of a trained deep neural network (DNN) are used to detect out-of-distribution (OOD) data, such as anomalies. An OOD detection process includes transforming a feature output from a layer of the DNN from a relatively high-dimensional feature space to a lower-dimensional space, and then performing a reverse transformation back to the higher-dimensional feature space, resulting in a reconstructed feature. A feature reconstruction error is calculated based on a difference between the reconstructed feature and the original feature output from the DNN. The OOD detection process may further include calculating a score based on the feature reconstruction error and generating a visual representation of the feature reconstruction error.

Claims (62)

1 . A computer-implemented method, comprising:

receiving an output feature map output by an intermediate layer of a neural network, the neural network comprising a first layer to receive a representation of an input image and at least one intermediate layer following the first layer;

applying a forward transformation to the output feature map to generate an embedding, the forward transformation reducing a dimensionality of the output feature map, wherein applying the forward transformation to the output feature map to generate the embedding comprises vectorizing the output feature map to generate a vectorized feature, the vectorized feature having a lower rank than the output feature map, and reducing a dimensionality of the vectorized feature to generate the embedding, wherein the embedding has fewer elements than the vectorized feature;

performing a reverse transformation of the embedding to generate a reconstructed feature map, the reconstructed feature map having a same dimensionality as the output feature map;

determining a feature reconstruction error representing a difference between the output feature map and the reconstructed feature map; and

determining a detection score based on the feature reconstruction error, the detection score indicating whether the input image includes out-of-distribution data.

2 . The computer-implemented method of claim 1 , wherein applying the forward transformation to the output feature map to generate the embedding comprises:

performing an orthogonal linear transformation on the output feature map, the orthogonal linear transformation calculated from a training dataset using principal component analysis.

3 . The computer-implemented method of claim 1 , wherein applying the forward transformation to the output feature map to generate the embedding comprises:

applying a transformation learned from a training dataset using a nonlinear manifold learning technique.

4 . The computer-implemented method of claim 1 , wherein performing the reverse transformation of the embedding comprises:

applying a pseudo-inverse of the forward transformation to the embedding, wherein the pseudo-inverse has a same dimensionality as the output feature map.

5 . The computer-implemented method of claim 1 , the method further comprising:

generating a localization map of the feature reconstruction error, the localization map having dimensions corresponding to the input image, the localization map indicating where, in the input image, the out-of-distribution data is located.

6 . The computer-implemented method of claim 5 , wherein the feature reconstruction error is an error vector, and generating the localization map of the feature reconstruction error comprises:

rearranging the error vector to an error tensor, the error tensor having a same dimension as the output feature map;

performing a channel-wise averaging of the error tensor to generate the localization map; and

resizing the localization map to match the dimensions of the input image.

7 . The computer-implemented method of claim 5 , the method further comprising:

determining a second feature reconstruction error based on a second output feature map, the second output feature map obtained from an output of a second intermediate layer of the neural network;

generating a second localization map of the second feature reconstruction error; and

combining the localization map and the second localization map into a combined error localization map.

8 . The computer-implemented method of claim 7 , wherein combining the localization map and the second localization map comprises calculating a pixel-wise geometric average of the localization map and the second localization map.

9 . One or more non-transitory computer-readable media storing instructions executable to perform operations, the operations comprising:

receiving an output feature map output by an intermediate layer of a neural network, the neural network comprising a first layer to receive a representation of an input image and at least one intermediate layer following the first layer;

applying a forward transformation to the output feature map to generate an embedding, the forward transformation reducing a dimensionality of the output feature map, wherein applying the forward transformation to the output feature map to generate the embedding comprises vectorizing the output feature map to generate a vectorized feature, the vectorized feature having a lower rank than the output feature map, and reducing a dimensionality of the vectorized feature to generate the embedding, wherein the embedding has fewer elements than the vectorized feature;

performing a reverse transformation of the embedding to generate a reconstructed feature map, the reconstructed feature map having a same dimensionality as the output feature map;

determining a feature reconstruction error representing a difference between the output feature map and the reconstructed feature map; and

determining a detection score based on the feature reconstruction error, the detection score indicating whether the input image includes out-of-distribution data.

10 . The one or more non-transitory computer-readable media of claim 9 , wherein applying the forward transformation to the output feature map to generate the embedding comprises:

performing an orthogonal linear transformation on the output feature map, the orthogonal linear transformation calculated from a training dataset using principal component analysis.

11 . The one or more non-transitory computer-readable media of claim 9 , wherein applying the forward transformation to the output feature map to generate the embedding comprises:

applying a transformation learned from a training dataset using a nonlinear manifold learning technique.

12 . The one or more non-transitory computer-readable media of claim 9 , wherein performing the reverse transformation of the embedding comprises:

applying a pseudo-inverse of the forward transformation to the embedding, wherein the pseudo-inverse has a same dimensionality as the output feature map.

13 . The one or more non-transitory computer-readable media of claim 9 , the operations further comprising:

generating a localization map of the feature reconstruction error, the localization map having dimensions corresponding to the input image, the localization map indicating where, in the input image, the out-of-distribution data is located.

14 . The one or more non-transitory computer-readable media of claim 13 , wherein the feature reconstruction error is an error vector, and generating the localization map of the feature reconstruction error comprises:

rearranging the error vector to an error tensor, the error tensor having a same dimension as the output feature map;

performing a channel-wise averaging of the error tensor to generate the localization map; and

resizing the localization map to match the dimensions of the input image.

15 . The one or more non-transitory computer-readable media of claim 13 , the operations further comprising:

determining a second feature reconstruction error based on a second output feature map, the second output feature map obtained from an output of a second intermediate layer of the neural network;

generating a second localization map of the second feature reconstruction error; and

combining the localization map and the second localization map into a combined error localization map.

16 . The one or more non-transitory computer-readable media of claim 15 , wherein combining the localization map and the second localization map comprises calculating a pixel-wise geometric average of the localization map and the second localization map.

17 . An apparatus, comprising:

a computer processor for executing computer program instructions; and

a computer-readable memory storing computer program instructions executable by the computer processor to perform operations comprising:

receiving an output feature map output by an intermediate layer of a neural network, the neural network comprising a first layer to receive a representation of an input image and at least one intermediate layer following the first layer;

applying a forward transformation to the output feature map to generate an embedding, the forward transformation reducing a dimensionality of the output feature map, wherein applying the forward transformation to the output feature map to generate the embedding comprises vectorizing the output feature map to generate a vectorized feature, the vectorized feature having a lower rank than the output feature map, and reducing a dimensionality of the vectorized feature to generate the embedding, wherein the embedding has fewer elements than the vectorized feature;

performing a reverse transformation of the embedding to generate a reconstructed feature map, the reconstructed feature map having a same dimensionality as the output feature map;

determining a feature reconstruction error representing a difference between the output feature map and the reconstructed feature map; and

determining a detection score based on the feature reconstruction error, the detection score indicating whether the input image includes out-of-distribution data.

18 . The apparatus of claim 17 , the operations further comprising:

generating a localization map of the feature reconstruction error, the localization map having dimensions corresponding to the input image, the localization map indicating where, in the input image, the out-of-distribution data is located.

19 . The apparatus of claim 17 , the operations further comprising:

generating a localization map of the feature reconstruction error, the localization map having dimensions corresponding to the input image, the localization map indicating where, in the input image, the out-of-distribution data is located.

20 . The apparatus of claim 19 , wherein the feature reconstruction error is an error vector, and generating the localization map of the feature reconstruction error comprises:

rearranging the error vector to an error tensor, the error tensor having a same dimension as the output feature map;

performing a channel-wise averaging of the error tensor to generate the localization map; and

resizing the localization map to match the dimensions of the input image.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 30, 2023
From: NDIOUR, IBRAHIMA; AHUJA, NILESH; KRISHNAN, RANGANATH; SUBEDAR, MAHESH; TICKOO, OMESH; GENC, ERGIN
To: INTEL CORPORATION
Reel/Frame 063794/0914 →
Continuity (2)
Provisional Application 63379515 · Oct 14, 2022
Related Publication 20230298322A1 · Sep 21, 2023
References Cited (30)
US 12141238B2 · Sallee · 2024 [cited by examiner]
US 20190019061A1 · Trenholm · 2019 [cited by examiner]
US 20220245422A1 · Wu · 2022 [cited by examiner]
US 20230230228A1 · Liu · 2023 [cited by examiner]
US 20250103898A1 · Zhao · 2025 [cited by examiner]
Zhou et al., “Anomaly Detection with Robust Deep Autoencoders,” KDD 2017 Research paper, Aug. 13-17, 2017, Halifax, NS, Canada, 10 pages. [cited by applicant]
Ahuja et al., Probabilistic Modeling of Deep Features for Out-of-Distribution and Adversarial Detection, arXiv:1909.11786v1 [stat.ML] Sep. 25, 2019, 10 pages. [cited by applicant]
Akcay et al., “GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training,” arXiv:1805.06725v3 [cs.CV] Nov. 13, 2018, 16 pages. [cited by applicant]
Baldi et al., “Neural Networks and Principal Component Analysis: Learning from Examples Without Local Minima,” Neural Networks, vol. 2, pp. 53-58, 1989, 0893-6080/89, Copyright (c) 1989 Pergamon Press plc, 6 pages. [cited by applicant]
Bergman et al., “MVTec AD—A Comprensive Real-World Dataset for Unsupervised Anomaly Detection,” Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2019, 9 pages. [cited by applicant]
Bourlard et al., Auto-Association by Multilayer Perceptrons and Singular Value Decomposition, Biol. Cybern. 559, 291-294 (1988), Biological Cybernetics (c) Spring-Verlag 1988, 4 pages. [cited by applicant]
C ̌at ̌alin Ristea et al., “Self-Supervised Predictive Convolutional Attentive Block for Anomaly Detection,” Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2022, 11 pages. [cited by applicant]
Cohen et al., “Sub-Image Anomaly Detection with Deep Pyramid Correspondences,” arXiv:2005.02357v3 [cs.CV] Feb. 3, 2021, 17 pages. [cited by applicant]
Defard et al., “PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization,” arXiv:2011.08785v1 [cs.CV] Nov. 17, 2020, 7 pages. [cited by applicant]
Denoeux et al., Principal Component Analysis of Fuzzy Data Using Auto-Associative Neural Networks, Universite de Technologie de Compiegne, U.M.R. Cnrs 6599 Heudiasyc, Centre de Recherches de Royalleiu, BP 20529-F-60205 … [cited by applicant]
Gal et al., “Dropout as a Bayesian Approximation”, arXiv:1506.02157v5 [stat.ML] May 25, 2016, 20 pages. [cited by applicant]
Gong et al., “Memorizing Normality to Detect Anomaly: Memory-augmented Deep Autoencoder for Unsupervised Anomaly Detection,” Proceedings of the IEEE/CVF international conference on computer vision. 2019, 10 pages. [cited by applicant]
Hendrycks et al., “A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks,” arXiv:1610.02136v3 [cs.NE] Oct. 3, 2018, published as a conference paper at ICLR 2017, 12 pages. [cited by applicant]
Hendrycks et al., “Deep Anomaly Detection with Outlier Exposure,” arXiv:1812.04606v3 [cs.LG] Jan. 28, 2019, published as a conference paper at ICLR 2019, 18 pages. [cited by applicant]
Kwon et al., “Novelty Detection Through Model-Based Characterization of Neural Networks”, 27th IEEE International Conference on Image Processing (ICIP), Abu Dhabi, UAE, 2020, arXiv:2008.06094v1 [cs.CV] Aug. 13, 2020, 6 … [cited by applicant]
Lee et al., “A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks,” 32nd Conference on Neural Information Processing Systems (NeurIPS 2018), Montreal, Canada, 11 pages. [cited by applicant]
Liang et al., “Enhancing the Reliability of Out-of-Distribution Image Detection in Neural Networks”, arXiv:1706.02690v5 [cs.LG] Aug. 30, 2020, 15 pages. [cited by applicant]
Ndiour et al., “Subspace Modeling for Fast Out-of-Distribution and Anomaly Detection,” arXiv:220310422v1 [cs.CV] Mar. 20, 2022, 5 pages. [cited by applicant]
Oord et al., Conditional Image Generation with Pixel CNN Decoders, 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain, 9 pages. [cited by applicant]
Ren et al., “Likelihood Ratios for Out-of-Distribution Detection,” 33rd Conference on Neural Information Processing Systems (NeurIPS 2019), Vancouver, Canada, 12 pages. [cited by applicant]
Roth et al., “Towards Total Recall in Industrial Anomaly Detection,” Roth, Karsten, et al. “Towards total recall in industrial anomaly detection.” Proceedings of the IEEE/CVF conference on computer vision and pattern re… [cited by applicant]
Rudolph et al., “Asymmetric Student-Teacher Networks for Industrial Anomaly Detection,” Proceedings of the IEEE/CVF winter conference on applications of computer vision. 2023, 11 pages. [cited by applicant]
Rudolph et al., “Same Same But DifferNet: Semi-Supervised Defect Detection with Normalizing Flows,” Proceedings of the IEEE/CVF winter conference on applications of computer vision. 2021, 10 pages. [cited by applicant]
Tenenbaum et al., “A Global Geometric Framework for Nonlinear Dimensionality Reduction”, www.sciencemag.org, Science vol. 290, Dec. 22, 2000, 8 pages. [cited by applicant]
Zavrtanik et al., “DR/EM—A discriminatively training reconstruction embedding for surface anomaly detection,” Proceedings of the IEEE/CVF international conference on computer vision. 2021, 10 pages. [cited by applicant]