OODRobustBench: benchmarking and analyzing adversarial robustness under distribution shift

Lin Li, Yifei Wang, Chawin Sitawarin, Michael W. Spratling · DOI

Abstract

Adversarial robustness is typically evaluated in-distribution (ID), yet real-world applications frequently encounter distribution shifts. We introduce OODRobustBench, a large-scale benchmark comprising over 700 models and 60,000 evaluations to study the "robustness gap" under dataset and threat model shifts. Our analysis reveals a "Robustness on the Line" phenomenon: out-of-distribution (OOD) robustness correlates strongly and linearly with in-distribution (ID) performance. However, our findings reveal a significant performance ceiling, suggesting that current adversarial training paradigms are insufficient for achieving true reliability in real-world, shifting environments.

Introduction

While the field of adversarial machine learning has made strides in defending against specific attacks on static datasets, these "robust" models often remain fragile in the wild. A model trained to resist pixel-level perturbations might fail when faced with natural variations like rain, fog, or different camera angles (Dataset Shift), or when an attacker employs a novel technique not seen during training (Threat Shift).

Existing benchmarks like RobustBench focus primarily on ID robustness. To address this, we present OODRobustBench, a framework designed to quantify how well adversarial defenses generalize when the environment or the attack strategy changes.

Methodology and Datasets

OODRobustBench evaluates 706 robust models across a vast array of scenarios:

  • Dataset Shift ($OOD_d$): Includes 23 naturalistic shifts (e.g., ImageNet-A, ImageNet-R) and 15 common corruptions (e.g., noise, blur, weather) across multiple severity levels.
  • Threat Shift ($OOD_t$): Evaluates models against 6 unforeseen adversarial threat models, including different $p$-norms and non-$L_p$ attacks like spatial transformations.

To handle this scale, we utilized the Multi-Margin 5-step (MM5) attack, which offers high evaluation fidelity at a fraction of the computational cost of standard methods like AutoAttack. We then applied linear regression analysis to determine how effectively ID performance predicts OOD outcomes.

Key Insights: Robustness on the Line

Our primary finding is the "Robustness on the Line" phenomenon. Similar to clean accuracy, OOD adversarial robustness exhibits a strong linear correlation with ID robustness ($R^2 > 0.9$ in many cases). This suggests that OOD performance is highly predictable if the ID performance is known.

Figure 1: OOD Robustness vs ID Robustness for natural shifts, demonstrating the "Robustness on the Line" phenomenon with high correlation ($R^2=0.99$).

However, this correlation also reveals a sobering reality: current $L_p$-based adversarial training (AT) is hitting a ceiling. Extrapolating these linear trends shows that even a model with 100% ID robustness would only achieve roughly 43% OOD robustness on ImageNet. Furthermore, while scaling model size (e.g., moving to large ViTs) improves performance under natural dataset shifts, it can paradoxically degrade robustness against unforeseen threat models.

Figure 4: Comparison of robustness against seen ($L_p$) vs. unseen (non-$L_p$) threat models. Unseen threats show lower correlation and significantly lower absolute robustness.

Results and Analysis

  • The Robustness Gap: On average, adversarial robustness drops by 18% to 31% when transitioning from ID to OOD settings.
  • ViT Generalization: Vision Transformers (ViTs) consistently exhibit higher "effective robustness"—performance that exceeds the predicted linear trend—compared to traditional ResNet architectures.
  • Data over Augmentation: Training with additional real-world data provides a more significant boost to OOD robustness than synthetic data or complex data augmentation techniques.
  • AT Stability: Adversarially trained models show a more stable linear correlation under corruption shifts than standard models, suggesting that AT helps regularize model behavior across diverse noise types.

Conclusion and Future Directions

OODRobustBench demonstrates that simply scaling current adversarial training methods is unlikely to yield truly reliable models. The community must move beyond moving along the current linear trend and instead focus on "breaking the line"—developing novel training paradigms that shift the entire correlation upward. Future research should prioritize methods that improve generalization across both natural variations and diverse adversarial threat models simultaneously.

Summary updated

BibTeX
@inproceedings{li2024oodrobustbench,
  author = {Lin Li and Yifei Wang and Chawin Sitawarin and Michael W. Spratling},
  title = {{OODRobustBench: benchmarking and analyzing adversarial robustness under distribution shift}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=kAFevjEYsz},
}
Figure