Lightweight Detection of Out-of-Distribution and Adversarial Samples via Channel Mean Discrepancy

04/23/2021
by   Xin Dong, et al.
6

Detecting out-of-distribution (OOD) and adversarial samples is essential when deploying classification models in real-world applications. We introduce Channel Mean Discrepancy (CMD), a model-agnostic distance metric for evaluating the statistics of features extracted by classification models, inspired by integral probability metrics. CMD compares the feature statistics of incoming samples against feature statistics estimated from previously seen training samples with minimal overhead. We experimentally demonstrate that CMD magnitude is significantly smaller for legitimate samples than for OOD and adversarial samples. We propose a simple method to reliably differentiate between legitimate samples from OOD and adversarial samples using CMD, requiring only a single forward pass on a pre-trained classification model per sample. We further demonstrate how to achieve single image detection by using a lightweight model for channel sensitivity tuning, an improvement on other statistical detection methods. Preliminary results show that our simple yet effective method outperforms several state-of-the-art approaches to detecting OOD and adversarial samples across various datasets and attack methods with high efficiency and generalizability.

READ FULL TEXT
research
09/25/2019

Probabilistic Modeling of Deep Features for Out-of-Distribution and Adversarial Detection

We present a principled approach for detecting out-of-distribution (OOD)...
research
08/09/2023

Unsupervised Out-of-Distribution Dialect Detection with Mahalanobis Distance

Dialect classification is used in a variety of applications, such as mac...
research
05/25/2019

Hyperparameter-Free Out-of-Distribution Detection Using Softmax of Scaled Cosine Similarity

The ability of detecting out-of-distribution (OOD) samples is important ...
research
07/10/2018

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

Detecting test samples drawn sufficiently far away from the training dis...
research
05/25/2023

Detecting Adversarial Data by Probing Multiple Perturbations Using Expected Perturbation Score

Adversarial detection aims to determine whether a given sample is an adv...
research
06/07/2021

Multi-task Transformation Learning for Robust Out-of-Distribution Detection

Detecting out-of-distribution (OOD) samples plays a key role in open-wor...
research
05/05/2017

Detecting Adversarial Samples Using Density Ratio Estimates

Machine learning models, especially based on deep architectures are used...

Please sign up or login with your details

Forgot password? Click here to reset