TL;DR
Existing out-of-distribution (OOD) detectors can be easily fooled by tiny, imperceptible perturbations that either cause outliers to be accepted or valid in-distribution samples to be rejected. To fix this, the authors introduce ALOE (Adversarial Learning with Inlier and Outlier Exposure), a min-max robust training framework that exposes neural networks to adversarially perturbed inliers and outliers during training. On CIFAR-10, ALOE boosts adversarial OOD detection AUROC from 34.29% to 92.69% without sacrificing clean classification accuracy.
What Problem Does This Paper Address?
In high-stakes machine learning deployments (e.g., autonomous driving), models rely on OOD detectors to flag unknown inputs rather than make high-confidence, erroneous predictions. While modern OOD detectors succeed on clean benchmarks, they are notoriously vulnerable to adversarial manipulation.
Crucially, prior research focused almost exclusively on outlier attacks—perturbing an OOD image so the detector mistakes it for an inlier. This paper highlights that the reverse is equally dangerous: inlier attacks, where an attacker slightly perturbs a valid in-distribution sample (e.g., a stop sign) to force the detector to reject it, inducing a denial-of-service failure. Under minimal adversarial noise ($\epsilon = 1/255$), state-of-the-art detectors fail catastrophically at distinguishing between in-distribution and out-of-distribution inputs.
Outlier Attack: OOD Image + ε-noise ──> Detector accepts as Inlier (False Positive)
Inlier Attack: Inlier Image + ε-noise ──> Detector rejects as Outlier (False Negative)
Methods
The authors introduce ALOE (Adversarial Learning with Inlier and Outlier Exposure), framing robust OOD training as a unified min-max objective:
$$\min_{\theta} \; \mathbb{E}_{(x, y) \sim \mathcal{D}_{\text{in}}} \left[ \max_{\delta \in \mathcal{B}(x, \epsilon)} -\log F_\theta(x + \delta)_y \right] + \lambda \cdot \mathbb{E}_{x \sim \mathcal{D}_{\text{out}}^{\text{OE}}} \left[ \max_{\delta \in \mathcal{B}(x, \epsilon)} \mathcal{L}_{\text{CE}}(F_\theta(x + \delta), \mathcal{U}_K) \right]$$
- Adversarial Inlier Training: Uses Projected Gradient Descent (PGD) inside an $L_\infty$ $\epsilon$-ball to maximize classification loss (negative log-likelihood), training the network to maintain confident, correct predictions on perturbed inliers.
- Adversarial Outlier Exposure: Uses an auxiliary unlabeled dataset ($\mathcal{D}_{\text{out}}^{\text{OE}}$). The inner maximization searches for perturbations that push the prediction away from a uniform distribution $\mathcal{U}_K$ (maximizing cross-entropy / KL divergence). Training penalizes this, forcing the network to maintain high entropy (low confidence) across all reachable perturbed outlier representations.
- Inference Compatibility: The ALOE-trained backbone seamlessly plugs into existing post-hoc detection algorithms, such as Maximum Softmax Probability (MSP) or ODIN temperature scaling.
Datasets
- In-Distribution Benchmarks: CIFAR-10, CIFAR-100, and the German Traffic Sign Recognition Benchmark (GTSRB).
- Auxiliary Outlier Dataset (Training): A deduplicated subset of 80 Million Tiny Images (filtered to remove CIFAR overlaps).
- Evaluation OOD Datasets: Evaluated against six distinct image datasets: SVHN, Textures (DTD), Places365, LSUN-Crop, LSUN-Resize, and iSUN (with CIFAR-10 replacing SVHN when GTSRB is the inlier task).
Key Insights and Ideas
- Inlier Fragility is a Overlooked Blindspot: Standard Outlier Exposure (OE) learns sharp decision boundaries around training clusters. A tiny adversarial step ($\epsilon = 1/255$) can easily shift inlier predictions toward uniform entropy, rendering the detector useless.
- Adversarial Inliers are Still Inliers: The authors test standard adversarial examples (those designed to fool the image classifier $f(x)$) on OOD detectors. They show that low-budget adversarial examples retain their original semantic identity and should not be treated as OOD samples.
- Both Halves of Training are Necessary:
- Standard adversarial training alone (ADV) protects inliers but fails to calibrate outliers.
- Adversarial training with clean outlier exposure (AOE) leaves outliers open to attack.
- Only joint adversarial exposure (ALOE) stabilizes the decision boundary from both sides.
Key Results
Under an $L_\infty$ white-box PGD attack ($\epsilon = 1/255$, $m = 10$ steps):
- Classic Detectors Collapse: On CIFAR-10, the False Positive Rate at 95% True Positive Rate (FPR @ 95% TPR) of the leading baseline (OE+ODIN) jumps from 4.17% (clean) to 99.02% (attacked), while AUROC plummets to 34.29%.
- ALOE Restores Robustness:
- CIFAR-10: ALOE alone achieves 91.26% AUROC; combined with ODIN (ALOE+ODIN), it reaches 92.69% AUROC (a +58.40% gain over OE+ODIN) and cuts FPR @ 95% TPR to 41.59%.
- CIFAR-100: ALOE+ODIN improves AUROC from 20.02% to 66.61% (+46.59%).
- GTSRB: ALOE+ODIN achieves 98.98% AUROC and a 0.69% FPR @ 95% TPR under attack.
- No Tax on Clean Accuracy: On CIFAR-10, ALOE achieves 93.89% clean classification accuracy (vs. 94.08% for the unperturbed baseline) while dramatically increasing classification robustness against PGD attacks (84.02% vs. 25.38%).
Limitations and Future Work
- Auxiliary Data Dependence: ALOE requires access to a diverse, representative auxiliary outlier dataset ($\mathcal{D}_{\text{out}}^{\text{OE}}$) during pre-training, which may not always be accessible in niche or non-vision domains.
- Threat Model Scope: The defense and attacks are formulated around $L_\infty$-bounded perturbations. Real-world semantic shifts, common corruptions, or larger geometric transformations remain to be systematically addressed.
- Computational Cost: Solving inner PGD maximizations for both inliers and outliers during every training step doubles the adversarial training overhead relative to standard adversarial classification defenses.
Summary updated