HyperAIHyperAI

Command Palette

Search for a command to run...

4 months ago

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

Kimin Lee; Kibok Lee; Honglak Lee; Jinwoo Shin

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

Abstract

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.

Code Repositories

caotians1/OD-test-master
pytorch
Mentioned in GitHub
pokaxpoka/deep_Mahalanobis_detector
Official
pytorch
Mentioned in GitHub
kimjeyoung/Mahalanobis-BERT
pytorch
Mentioned in GitHub
lancopku/avg-avg
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
out-of-distribution-detection-on-ms-1m-vs-ijbResNeXt 50 + Maha distance
AUROC: 82.5

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
A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attacks | Papers | HyperAI