Abstract
Deep learning models deployed in open-world environments require robust Out-of-Distribution (OOD) detectors to identify inputs that deviate from the training distribution. However, standard OOD detectors are highly susceptible to adversarial perturbations. This paper presents ALOE (Adversarial Learning with inliner and Outlier Exposure), a unified framework designed to harden detectors against both "inlier attacks" and "outlier attacks." By employing a min-max optimization strategy during training, ALOE significantly enhances the robustness of OOD detection, achieving substantial gains in AUROC under adversarial conditions without compromising performance on clean data.
Introduction
In real-world deployments, such as autonomous driving, neural networks must distinguish between known classes (in-distribution) and unknown inputs (out-of-distribution). An OOD detector acts as a "gatekeeper," preventing the downstream classifier from making potentially dangerous predictions on unfamiliar data.
Despite their success on clean datasets, existing OOD detectors are remarkably fragile. This research identifies two primary adversarial threats:
- Outlier Attacks: Small perturbations are added to OOD samples to trick the detector into classifying them as in-distribution.
- Inlier Attacks: Legitimate in-distribution samples are perturbed to be rejected as OOD, effectively causing a denial-of-service.
Empirical evidence shows that even state-of-the-art methods like Outlier Exposure (OE) can fail catastrophically under these attacks, with False Positive Rates (FPR) rising from near 0% to over 95% with minimal perturbations.
Methods: The ALOE Framework
To address these vulnerabilities, the authors propose ALOE, which treats robust OOD detection as an adversarial optimization problem. The framework utilizes a min-max game during the training phase:
- In-distribution Robustness: For in-distribution data, the algorithm identifies perturbations within a small $\epsilon$-ball that maximize classification loss. The model is then trained to correctly classify these "worst-case" inliers.
- Outlier Robustness: Using an auxiliary unlabeled dataset (e.g., a deduplicated version of the 80 Million Tiny Images set), ALOE searches for perturbations that minimize the model's uncertainty. The training objective is to maintain high uncertainty (low confidence) even on these disguised outliers.
By exposing the model to adversarially crafted examples, ALOE learns a more resilient decision boundary between known and unknown data.
Experimental Results
The framework was evaluated using standard benchmarks, including GTSRB, CIFAR-10, and CIFAR-100 as inliers, and SVHN, Textures, and Places365 as OOD test sets.
ALOE demonstrates massive performance improvements under attack:
- CIFAR-10: AUROC improved by 58.4% compared to the previous state-of-the-art (OE+ODIN) under adversarial conditions.
- CIFAR-100: AUROC improved by 46.59% under attack.
As shown in the qualitative analysis, standard detectors (OE) fail to separate inliers and outliers when attacked, as their confidence distributions merge. In contrast, ALOE maintains a clear separation, ensuring the detector remains functional even in hostile environments. Importantly, ALOE preserves high performance on clean data, maintaining an AUROC of 98.55% on CIFAR-10.
Conclusion
ALOE provides the first unified defense against adversarial inliers and outliers in OOD detection. While the method introduces additional computational costs due to the iterative nature of adversarial training, it offers a critical security layer for safety-critical AI systems. Future work may explore broader classes of semantic-preserving perturbations beyond the $\epsilon$-ball constraint.
Summary updated