HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Extremely Simple Activation Shaping for Out-of-Distribution Detection

Andrija Djurisic Nebojsa Bozanic Arjun Ashok Rosanne Liu

Extremely Simple Activation Shaping for Out-of-Distribution Detection

Abstract

The separation between training and deployment of machine learning models implies that not all scenarios encountered in deployment can be anticipated during training, and therefore relying solely on advancements in training has its limits. Out-of-distribution (OOD) detection is an important area that stress-tests a model's ability to handle unseen situations: Do models know when they don't know? Existing OOD detection methods either incur extra training steps, additional data or make nontrivial modifications to the trained network. In contrast, in this work, we propose an extremely simple, post-hoc, on-the-fly activation shaping method, ASH, where a large portion (e.g. 90%) of a sample's activation at a late layer is removed, and the rest (e.g. 10%) simplified or lightly adjusted. The shaping is applied at inference time, and does not require any statistics calculated from training data. Experiments show that such a simple treatment enhances in-distribution and out-of-distribution distinction so as to allow state-of-the-art OOD detection on ImageNet, and does not noticeably deteriorate the in-distribution accuracy. Video, animation and code can be found at: https://andrijazz.github.io/ash

Code Repositories

andrijazz/ash
Official
pytorch
Mentioned in GitHub
litianliu/fdbd-ood
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
out-of-distribution-detection-on-imagenet-1k-10ASH-S (ResNet-50)
AUROC: 97.6
FPR95: 11.93
out-of-distribution-detection-on-imagenet-1k-12ASH-S (ResNet-50)
AUROC: 95.12
FPR95: 22.8
out-of-distribution-detection-on-imagenet-1k-3ASH-S (ResNet-50)
AUROC: 97.87
FPR95: 11.49
out-of-distribution-detection-on-imagenet-1k-8ASH-S (ResNet-50)
AUROC: 94.02
FPR95: 27.98
out-of-distribution-detection-on-imagenet-1k-9ASH-S (ResNet-50)
AUROC: 90.98
FPR95: 39.78

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
Extremely Simple Activation Shaping for Out-of-Distribution Detection | Papers | HyperAI