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

A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks

About

Detecting test samples drawn sufficiently far away from the training distribution statistically or adversarially is a fundamental requirement for deploying a good classifier in many real-world machine learning applications. However, deep neural networks with the softmax classifier are known to produce highly overconfident posterior distributions even for such abnormal samples. In this paper, we propose a simple yet effective method for detecting any abnormal samples, which is applicable to any pre-trained softmax neural classifier. We obtain the class conditional Gaussian distributions with respect to (low- and upper-level) features of the deep models under Gaussian discriminant analysis, which result in a confidence score based on the Mahalanobis distance. While most prior methods have been evaluated for detecting either out-of-distribution or adversarial samples, but not both, the proposed method achieves the state-of-the-art performances for both cases in our experiments. Moreover, we found that our proposed method is more robust in harsh cases, e.g., when the training dataset has noisy labels or small number of samples. Finally, we show that the proposed method enjoys broader usage by applying it to class-incremental learning: whenever out-of-distribution samples are detected, our classification rule can incorporate new classes well without further training deep models.

Kimin Lee, Kibok Lee, Honglak Lee, Jinwoo Shin• 2018

Related benchmarks

TaskDatasetResultRank
Semantic segmentationCityscapes (test)
mIoU81.4
1154
Out-of-Distribution DetectioniNaturalist
AUROC99.54
219
Out-of-Distribution DetectionSUN OOD with ImageNet-1k In-distribution (test)
FPR@9547.82
204
Out-of-Distribution DetectionTextures
AUROC0.9733
168
Out-of-Distribution DetectionPlaces
FPR9553.77
142
Out-of-Distribution DetectionImageNet OOD Average 1k (test)
FPR@9532.15
137
Out-of-Distribution DetectionImageNet-1k ID iNaturalist OOD
FPR9597.1
132
OOD DetectionCIFAR-10 (IND) SVHN (OOD)
AUROC0.9819
131
Out-of-Distribution DetectionOpenOOD average of NINCO, iNat, SSB-Hard, OpenImages-O, Textures
FPR @ 95%25.3
130
Out-of-Distribution DetectionCIFAR-10
AUROC93.23
121
Showing 10 of 431 rows
...

Other info

Code

Follow for update