TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Detecting Out-of-Distribution Examples with In-distributio...

Detecting Out-of-Distribution Examples with In-distribution Examples and Gram Matrices

Chandramouli Shama Sastry, Sageev Oore

2019-12-28Out of Distribution (OOD) DetectionOut-of-Distribution Detection
PaperPDFCodeCodeCode(official)CodeCode

Abstract

When presented with Out-of-Distribution (OOD) examples, deep neural networks yield confident, incorrect predictions. Detecting OOD examples is challenging, and the potential risks are high. In this paper, we propose to detect OOD examples by identifying inconsistencies between activity patterns and class predicted. We find that characterizing activity patterns by Gram matrices and identifying anomalies in gram matrix values can yield high OOD detection rates. We identify anomalies in the gram matrices by simply comparing each value with its respective range observed over the training data. Unlike many approaches, this can be used with any pre-trained softmax classifier and does not require access to OOD data for fine-tuning hyperparameters, nor does it require OOD access for inferring parameters. The method is applicable across a variety of architectures and vision datasets and, for the important and surprisingly hard task of detecting far-from-distribution out-of-distribution examples, it generally performs better than or equal to state-of-the-art OOD detection methods (including those that do assume access to OOD examples).

Results

TaskDatasetMetricValueModel
Out-of-Distribution DetectionCIFAR-10 vs CIFAR-100AUROC79.7ResNet + diagonal elements of Gram matrix
Out-of-Distribution DetectionCIFAR-100 vs CIFAR-10AUROC76.6ResNet + diagonal elements of Gram matrix
Out-of-Distribution DetectionCIFAR-100 vs CIFAR-10AUROC70.1DenseNet + diagonal elements of Gram matrix

Related Papers

ZClassifier: Temperature Tuning and Manifold Approximation via KL Divergence on Logit Space2025-07-14Safe Domain Randomization via Uncertainty-Aware Out-of-Distribution Detection and Policy Adaptation2025-07-08FA: Forced Prompt Learning of Vision-Language Models for Out-of-Distribution Detection2025-07-06Out-of-distribution detection in 3D applications: a review2025-07-01Generative Adversarial Evasion and Out-of-Distribution Detection for UAV Cyber-Attacks2025-06-26Enclosing Prototypical Variational Autoencoder for Explainable Out-of-Distribution Detection2025-06-17A Variational Information Theoretic Approach to Out-of-Distribution Detection2025-06-17FindMeIfYouCan: Bringing Open Set metrics to $\textit{near} $, $ \textit{far} $ and $\textit{farther}$ Out-of-Distribution Object Detection2025-06-16