Anomalous Example Detection in Deep Learning: A Survey

Saikiran Bulusu, Bhavya Kailkhura, Bo Li, Pramod K. Varshney, Dawn Song

Abstract

Deep Learning (DL) is vulnerable to out-of-distribution and adversarial examples resulting in incorrect outputs. To make DL more robust, several posthoc (or runtime) anomaly detection techniques to detect (and discard) these anomalous samples have been proposed in the recent past. This survey provides a structured and comprehensive overview of the research on anomaly detection for DL-based applications. We provide a taxonomy for existing techniques based on their underlying assumptions and adopted approaches. We discuss various techniques in each of the categories and provide the relative strengths and weaknesses of the approaches. Finally, we highlight the unsolved research challenges while applying anomaly detection techniques in DL systems and present some high-impact future research directions.

Introduction: The Vulnerability of Deep Learning

Deep Learning (DL) models are notoriously overconfident. They are typically designed under the "closed-world" assumption: that the data encountered during deployment will come from the same distribution as the training data. In real-world applications, this assumption frequently fails, leading to potentially catastrophic outcomes in "high-regret" domains like autonomous driving, healthcare, and cybersecurity.

The authors identify two primary categories of anomalous threats:

  1. Unintentional (OOD/Novelty): Natural shifts in data caused by noise, sensor degradation, or encountering categories the model was never trained on (e.g., a "dog" classifier seeing a "tractor").
  2. Intentional (Adversarial): Maliciously crafted inputs designed to appear normal to humans but engineered to trigger specific, incorrect behaviors in a model.
Conceptual visualization of training data, OOD test points, and adversarial points relative to model decision boundaries.

A Taxonomy of Detection Approaches

The survey organizes the vast landscape of detection research into a clear taxonomy based on label availability. This categorization helps researchers understand the requirements and constraints of different detection strategies.

Taxonomy of OOD and adversarial example detection approaches categorized by label availability.

1. Supervised Approaches

These methods treat anomaly detection as a binary classification problem. They require labeled examples of both "normal" and "anomalous" data. While highly accurate for known threats, they often struggle to generalize to "unknown unknowns"—anomalies that differ significantly from the training set.

2. Semi-supervised Approaches

These techniques utilize labeled "normal" data alongside a pool of unlabeled "contaminated" data. The goal is to learn boundaries that effectively push the unlabeled anomalies away from the known data manifold.

3. Unsupervised Approaches

The most flexible category, unsupervised methods rely solely on in-distribution data. They learn the underlying distribution or "essence" of normal data—often via reconstruction error in Autoencoders/GANs or density estimation—and flag any input that deviates significantly from this learned representation.

Key Insights and Technical Strategies

The survey highlights several critical technical observations that have shaped the field:

  • The Softmax Trap: Standard Softmax outputs are poor indicators of uncertainty. Many surveyed papers focus on "Temperature Scaling" or "Input Squeezing" to extract more reliable confidence scores.
  • Manifold Projection: High-performing methods often project a test image onto a "benign manifold" (using GANs). If the projection differs significantly from the original, it is flagged as an anomaly.
  • Internal Trajectories: For adversarial detection, the path an input takes through hidden layers is often more revealing than the final output. Anomalies tend to "jump" between manifolds in ways that natural data does not.
  • Self-Supervision as a Defense: Forcing a model to perform auxiliary tasks (e.g., predicting image rotation) during training makes it significantly better at detecting OOD samples, as it develops a deeper understanding of structural "normalcy."

Datasets and Benchmarks

The paper catalogs the standard benchmarks used to evaluate these detectors:

  • Vision Benchmarks: MNIST, CIFAR-10/100, ImageNet, SVHN, and STL-10.
  • OOD Pairs: Common setups involve training on one dataset (e.g., CIFAR-10) and testing detection on another (e.g., SVHN).
  • Domain-Specific Data: Datasets for Android malware, credit card fraud, and medical imaging (e.g., chest X-rays).
  • Adversarial Benchmarks: Evaluation against standard attack algorithms like FGSM, PGD, and C&W.

Challenges and Future Directions

Despite significant progress, several open challenges remain:

  • The "Unknown-Unknown" Problem: Most current research still relies on some prior knowledge of anomalies. Better methods are needed for completely novel, unforeseen data shifts.
  • Theoretical Foundations: There is a lack of a unified mathematical theory explaining why deep models are so susceptible to these anomalies in high-dimensional space.
  • Beyond Images: The majority of research focuses on Computer Vision. There is a critical need for more work on time-series (IoT), graphs, and tabular data.
  • Standardized Evaluation: The authors call for more rigorous, less biased evaluation frameworks to prevent over-fitting detectors to specific, narrow attack types.

Summary updated

BibTeX
@inproceedings{bulusu2020anomalous,
  author = {Saikiran Bulusu and Bhavya Kailkhura and Bo Li and Pramod K. Varshney and Dawn Song},
  title = {{Anomalous Example Detection in Deep Learning: A Survey}},
  booktitle = {IEEE Access},
  year = {2020},
  url = {https://openreview.net/forum?id=uV38G_pmTpg},
}
Figure