HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

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

Chandramouli Shama Sastry Sageev Oore

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

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).

Code Repositories

zeroshot-ood/ood-detection
pytorch
Mentioned in GitHub
joelsimonoff/gram-adversary-detection
pytorch
Mentioned in GitHub
VectorInstitute/gram-ood-detection
Official
pytorch
Mentioned in GitHub
nazim1021/OOD-detection-using-OECC
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
out-of-distribution-detection-on-cifar-10-vsResNet + diagonal elements of Gram matrix
AUROC: 79.7
out-of-distribution-detection-on-cifar-100-vsResNet + diagonal elements of Gram matrix
AUROC: 76.6
out-of-distribution-detection-on-cifar-100-vsDenseNet + diagonal elements of Gram matrix
AUROC: 70.1

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp