NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Unified Survey on Anomaly, Novelty, Open-Set, and Out-of-Distribution Detection: Solutions and Future Challenges

Mohammadreza Salehi, Hossein Mirzaei, Dan Hendrycks, Yixuan Li, Mohammad Hossein Rohban, Mohammad Sabokrou

In the traditional "closed-set" paradigm of machine learning, models are developed under the assumption that the data encountered during deployment will mirror the distribution of the training set. However, real-world environments are inherently unpredictable. Whether it is a self-driving vehicle encountering an unconventional pedestrian costume or a medical diagnostic AI facing a rare, undocumented pathology, the failure of the closed-set assumption can lead to catastrophic outcomes. This paper addresses the critical need for models that can identify when they are operating outside their expertise.

The Fragmentation of the "Unknown"

Historically, the research community has addressed the challenge of identifying unfamiliar data through several distinct sub-fields. However, this has led to a "Tower of Babel" effect where terminology is often overlapping or inconsistent:

  • Anomaly Detection (AD): Focuses on identifying "abnormal" samples within a dataset that is predominantly "normal," typically in an unsupervised manner.
  • Novelty Detection (ND): Aims to identify new patterns or classes not present during training, usually assuming the training set is "clean" (free of anomalies).
  • Open-Set Recognition (OSR): Requires a model to classify known classes accurately while simultaneously rejecting samples from "unknown" classes.
  • Out-of-Distribution (OOD) Detection: Specifically targets the detection of samples that are semantically distinct from the training distribution.
Conceptual comparison of Novelty Detection (ND), Open-Set Recognition (OSR), and Out-of-Distribution (OOD) Detection, illustrating how they differ in their handling of known and unknown data spaces.

By unifying these fields, the authors argue that researchers can move past siloed benchmarks and leverage shared core methodologies to build more reliable AI systems for open-world settings.

A Unified Taxonomy of Methods

The survey categorizes existing solutions into two primary families based on their underlying modeling approach and the degree of supervision required.

1. Discriminative Modeling

Discriminative approaches focus on learning boundaries between classes or between "in-distribution" and "out-of-distribution" data.

  • Classification-based: These methods often utilize the internal states of a standard classifier. Techniques like ODIN apply temperature scaling to softmax scores, while Energy-based models map model outputs to a scalar energy value, providing a more robust signal for separating in-liers from out-liers than simple probability scores.
  • Self-Supervised Learning (SSL): Models are trained on auxiliary tasks, such as predicting image rotation. A model's inability to perform these tasks on a new sample serves as a proxy for detecting novelty.

2. Generative Modeling

Generative models attempt to learn the underlying distribution of the training data itself.

  • Autoencoders (AEs) & VAEs: These models are trained to reconstruct their inputs. High reconstruction error typically indicates that a sample is an anomaly.
  • Generative Adversarial Networks (GANs): These use a discriminator to differentiate between real training data and synthetic data, which can be adapted to identify OOD samples.
  • Flow-based Models: These provide explicit probability density estimation, theoretically allowing for direct detection of low-probability regions.
The taxonomy of explained methods, categorizing them into discriminative and generative approaches, and illustrating the spectrum of increasing supervision.

Key Insights: The Likelihood Paradox

A significant contribution of this survey is the highlight of the "likelihood paradox" in generative models. Counter-intuitively, models like VAEs or Flow-based models often assign higher likelihoods to OOD data than to the data they were trained on. For instance, a model trained on the complex images of CIFAR-10 might assign a higher probability to a simple digit from the SVHN dataset. This phenomenon suggests that many generative models prioritize low-level statistics (like local pixel smoothness) over high-level semantic content, a critical flaw for robust OOD detection.

Another vital insight is the efficacy of Outlier Exposure. The research shows that exposing a model to any diverse, auxiliary dataset during training—even if it is unrelated to the task—drastically improves its ability to reject unknown samples during deployment.

Benchmarking and Results

The paper provides an extensive evaluation across various benchmarks, including semantic-level shifts (CIFAR, ImageNet) and pixel-level industrial/medical shifts (MVTec AD). Key findings include:

  • Scoring Functions: Energy-based scores and Mahalanobis distance (which measures a sample's distance from class means in feature space) consistently outperform standard Softmax confidence.
  • Architecture Matters: Vision Transformers (ViTs) exhibit superior inherent OOD detection capabilities compared to traditional CNNs, particularly when paired with self-supervised pre-training.
  • Task Difficulty: While current methods achieve near-perfect results on "easy" OOD tasks (e.g., distinguishing digits from natural images), they still struggle with "near-OOD" tasks where the unknown data is semantically similar to the training set (e.g., CIFAR-10 vs. CIFAR-100).

Future Challenges

Despite progress, several frontiers remain. Explainability is paramount; a system must not only flag a sample as OOD but also explain why (e.g., is it a sensor failure or a genuinely new object?). Furthermore, Fairness is a growing concern, as detection models must not inadvertently flag underrepresented demographic groups as "anomalous." Finally, the field must address Adversarial Robustness, ensuring that OOD detectors cannot be bypassed by samples specifically engineered to appear normal while being out-of-distribution.

Summary updated

BibTeX
@article{salehi2022unified,
  author = {Mohammadreza Salehi and Hossein Mirzaei and Dan Hendrycks and Yixuan Li and Mohammad Hossein Rohban and Mohammad Sabokrou},
  title = {{A Unified Survey on Anomaly, Novelty, Open-Set, and Out-of-Distribution Detection: Solutions and Future Challenges}},
  journal = {Accepted by TMLR},
  year = {2022},
  url = {https://openreview.net/forum?id=aRtjVZvbpK},
}
Figure