Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Extremely Simple Activation Shaping for Out-of-Distribution Detection

About

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

Andrija Djurisic, Nebojsa Bozanic, Arjun Ashok, Rosanne Liu• 2022

Related benchmarks

TaskDatasetResultRank
Out-of-Distribution DetectioniNaturalist
AUROC97.9
219
Out-of-Distribution DetectionSUN OOD with ImageNet-1k In-distribution (test)
FPR@9522.08
204
Out-of-Distribution DetectionTextures
AUROC0.969
168
Out-of-Distribution DetectionPlaces
FPR9539.84
142
Out-of-Distribution DetectionImageNet OOD Average 1k (test)
FPR@9522.73
137
Out-of-Distribution DetectionImageNet-1k ID iNaturalist OOD
FPR9511.49
132
OOD DetectionCIFAR-10 (IND) SVHN (OOD)
AUROC0.9865
131
Out-of-Distribution DetectionCIFAR-10
AUROC95.13
121
OOD DetectionCIFAR-10 (ID) vs Places 365 (OOD)
AUROC85.65
117
Out-of-Distribution DetectionTexture
AUROC97.6
113
Showing 10 of 153 rows
...

Other info

Code

Follow for update