Abstract
Machine learning models often encounter samples that diverge from the training distribution. Failure to recognize an out-of-distribution (OOD) sample, and consequently assigning it a known label, significantly compromises model reliability. This problem is critical for safely deploying models in open-world settings. Detecting OOD samples is challenging due to the intractability of modeling all possible unknown distributions. To date, several research domains tackle this problem, including anomaly detection, novelty detection, one-class learning, open-set recognition, and OOD detection. Despite shared concepts, these avenues have largely been investigated independently, creating research barriers. This survey provides a cross-domain, comprehensive review of eminent works in these areas, identifying commonalities and discussing future research lines to bring these fields closer together.
Defining the Problem Space
Most machine learning models operate under a "closed-set" assumption, expecting test data to mirror the training distribution. In real-world applications, however, models encounter "unknowns"—samples that do not belong to any known category or are fundamentally different from the training set. Historically, the research community has addressed this through four distinct lenses:
- Anomaly Detection (AD): Identifying "abnormal" samples within a dataset that is predominantly "normal."
- Novelty Detection (ND): Detecting new, unseen classes in a one-class setting where only one category is known during training.
- Open-Set Recognition (OSR): Classifying known classes while simultaneously rejecting unknown ones.
- Out-of-Distribution (OOD) Detection: Identifying samples from a different semantic distribution than the training set, often involving multi-class classifiers.
As shown in the figure above, these tasks differ in their training objectives and the types of "unknowns" they target. For instance, ND typically utilizes one-class classification loss, whereas OSR and OOD detection rely on multi-class classification losses to define boundaries between known and unknown spaces.
A Unified Taxonomy of Solutions
To break down research silos, the authors categorize existing solutions into a unified taxonomy based on the underlying modeling approach and the level of supervision required.
Generative Modeling
These methods attempt to model the distribution of "normal" data directly. Common architectures include:
- Autoencoders (AEs): These measure reconstruction error, assuming that anomalies or OOD samples will not reconstruct as accurately as in-distribution data.
- Generative Adversarial Networks (GANs): These utilize discriminator scores or latent space mapping to identify outliers.
- Flow-based Models: These estimate exact data density to flag low-probability regions.
Discriminative Modeling
Discriminative methods focus on the boundaries between classes or the characteristics of the feature space:
- Classification-based: These leverage the confidence scores of standard classifiers (e.g., Maximum Softmax Probability) or distance-based metrics like the Mahalanobis distance to class centroids.
- Self-Supervised Learning (SSL): A dominant trend where models are trained on "proxy" tasks, such as predicting image rotation or detecting synthetic artifacts. Failure on these tasks during inference serves as a strong indicator of an outlier.
- Outlier Exposure: This technique involves explicitly training models on a large, diverse dataset of "known unknowns" to help the model learn a more robust boundary for the "known" world.
Benchmarking the Unknown
The survey reviews a wide array of benchmarks essential for evaluating these systems:
- Semantic-level (Object-based): Standard datasets like MNIST, CIFAR-10/100, and more complex ones like LSUN and TinyImageNet.
- Pixel-level (Industrial/Medical): Specialized datasets such as MVTec AD for industrial defect detection and medical imaging benchmarks like Retinal-OCT.
- Semantic Shift Benchmark (SSB): A newer benchmark designed to evaluate a model's ability to detect semantic novelty rather than simple low-level pixel shifts.
Key Insights: The Generative Paradox and Agnostophobia
A critical finding highlighted in the survey is the Generative Paradox: generative models often assign higher likelihoods to OOD data than to in-distribution data. For example, a model trained on CIFAR-10 might find simple SVHN digits "more likely" due to their lower local complexity. This suggests that density estimation alone is insufficient for robust detection.
Furthermore, models often suffer from "Agnostophobia"—a lack of fear of the unknown. Standard classifiers are frequently overconfident in their predictions for samples they have never seen. Successful mitigation strategies often involve forcing models to project data into tight, low-dimensional compressed representations, where anomalies naturally fall far from the learned clusters.
Landmark Results and State-of-the-Art
- Post-hoc Methods: Techniques like ODIN and Mahalanobis distance significantly outperform simple softmax baselines by applying temperature scaling and input perturbations to pre-trained models.
- SSL Supremacy: In Anomaly Detection, self-supervised methods like CSI and CutPaste have set new state-of-the-art records, proving that learning "what makes an image look real" is often more effective than direct distribution modeling.
- Vision Transformers (ViTs): ViTs show immense potential for OOD performance, though their efficacy is heavily tied to the diversity and scale of their pre-training data.
Future Directions and Open Challenges
The survey identifies several frontiers for future research:
- Adversarial Robustness: Most current OOD detectors are vulnerable to imperceptible perturbations that can trick them into accepting outliers as in-distribution.
- Fairness and Bias: Biased training data can lead models to incorrectly flag minority groups as anomalies, raising significant ethical concerns.
- Explainability: Moving beyond binary detection to explain why a sample is flagged (e.g., identifying specific defect regions) is crucial for trust.
- Multi-modal OOD: Future systems must handle complex, multi-modal data (text, image, and sensor) to function reliably in open-world environments like autonomous driving.
Summary updated