Out-of-Distribution Data: An Acquaintance of Adversarial Examples - A Survey

Naveen Karunanayake, Ravin Gunawardena, Suranga Seneviratne, Sanjay Chawla

TL;DR

Deep learning models often fail when they encounter data they weren't trained on (Out-of-Distribution) or data specifically designed to trick them (Adversarial Examples). This survey explores the emerging intersection of these two fields, introducing a framework for Robust OOD Detection and Unified Robustness to build AI systems that are reliable in the messy, unpredictable real world.

What Problem Does This Paper Address?

In the "closed-world" of a lab, AI models perform beautifully. But in the "open-world"—like an autonomous car navigating a snowy street it’s never seen—models tend to be dangerously overconfident. Traditionally, researchers have treated two threats as separate silos:

  1. Out-of-Distribution (OOD) Detection: Identifying when an input belongs to a completely new category (e.g., a "kangaroo" when the model only knows "cars" and "trucks").
  2. Adversarial Robustness: Defending against "hacked" inputs where tiny, invisible perturbations are added to an image to force a wrong prediction.

The authors argue that these are actually two sides of the same coin: distributional shifts. The gap they address is the lack of a unified perspective. What happens when an attacker tries to hide an OOD sample by making it look like "In-Distribution" (ID) data? Or how can we build a single defense that handles both threats without doubling the computational cost?

Methods

The paper establishes a new taxonomy based on the nature of the shift:

  • Semantic Shifts: Changes in the meaning of the data (OOD detection, open set recognition).
  • Covariate Shifts: Subtle modifications to the appearance or style (adversarial attacks, domain shifts).

The survey then categorizes defenses into two main research directions:

  • Robust OOD Detection: These methods ensure the "security guard" (the OOD detector) isn't fooled. Even if an OOD sample is adversarially manipulated to look like training data, the detector should still flag it.
  • Unified Robustness: These methods aim for a "one-stop-shop" defense. Instead of having two separate modules, the model is trained to be simultaneously robust against adversarial perturbations and capable of rejecting OOD inputs.

Key techniques discussed include Outlier Exposure (training the model on a "trash" dataset of OOD samples), Self-Supervised Learning (teaching the model to recognize rotations or contrasts to learn better features), and Score-based methods (using statistical distances like Mahalanobis distance to flag anomalies post-training).

Datasets

The survey reviews work using standard benchmarks, but notes a lack of a single "Gold Standard" for the intersection.

  • In-Distribution (ID): CIFAR-10, CIFAR-100, ImageNet, MNIST, and SVHN.
  • OOD Benchmarks: SVHN, LSUN, iSUN, Textures, Places365, and CelebA.
  • Newer Benchmarks: The authors highlight the OpenOOD library for standardized OOD evaluation and RobustBench for adversarial metrics. They also mention specialized datasets like notMNIST and Fashion-MNIST used in digit classification tasks.

Key Insights and Ideas

  • The "Adversarial OOD" Threat: Standard OOD detectors are surprisingly fragile. A simple gradient-based attack can make a "far-OOD" sample (like a random texture) look perfectly normal to a model.
  • Economy of Mechanism: The authors advocate for unified defenses because they are easier to maintain, have lower latency, and align with safety regulations that require "explainable" robustness.
  • Mutual Reinforcement: Interestingly, training for adversarial robustness often helps OOD detection, and vice versa. By forcing the model to learn "robust" features that don't rely on brittle pixel-level patterns, the model naturally becomes better at spotting things that don't belong.
  • Relative Mahalanobis Distance (RMDS): One "aha" moment in the literature is that looking at the relative distance between class-specific distributions is much more robust against attacks than looking at absolute distance.

Key Results

  • ATOM (Adversarial Training with informative Outlier Mining): This method achieved a 53% reduction in False Positive Rate (FPR95) on CIFAR-10 when facing adversarial OOD attacks.
  • Score-based Vulnerability: The survey notes that standard OOD baselines like Maximum Softmax Probability (MSP) can see their performance (AUROC) drop by ~57% under even simple adversarial attacks like FGSM.
  • PixMix: This data augmentation technique (mixing images with fractals) was shown to provide near Pareto-optimal performance, reducing adversarial error by 3.9% while significantly boosting OOD detection.

Limitations and Future Work

  • The Benchmark Gap: Unlike standard OOD detection, there is no unified "leaderboard" for Robust OOD detection. Researchers are currently using different attack strengths and datasets, making head-to-head comparisons difficult.
  • Scalability: Most existing research is performed on small datasets like CIFAR. Scaling these complex, unified training regimes to ImageNet-1K remains a significant computational challenge.
  • Certified Defenses: While empirical defenses (like adversarial training) work well in practice, they are a "cat-and-mouse" game. The authors call for more research into Provable/Certified Robustness, which provides mathematical guarantees that a model cannot be fooled within a certain range.
  • Real-world Complexity: Most current work assumes "constrained" perturbations. In the real world, adversarial OOD inputs could be unconstrained (e.g., a physical patch on a stop sign), requiring more flexible defense strategies.

Summary updated

BibTeX
@article{karunanayake2025out,
  author = {Naveen Karunanayake and Ravin Gunawardena and Suranga Seneviratne and Sanjay Chawla},
  title = {{Out-of-Distribution Data: An Acquaintance of Adversarial Examples - A Survey}},
  journal = {ACM Computing Surveys},
  year = {2025},
  doi = {10.1145/3719292},
}
Figure