Introduction
The field of adversarial machine learning is currently a "Wild West" where comparing gradient-based attacks—algorithms designed to trick AI models with subtle input perturbations—is fraught with inconsistency. Researchers often report performance based on varying computational budgets, inconsistent library implementations, and narrow metrics like Attack Success Rate at a single noise level. AttackBench addresses these issues by introducing a standardized evaluation framework that enforces fairness and reproducibility through a fixed query budget and a novel optimality metric.
Methodology
To bring order to adversarial attack evaluation, the authors developed a five-stage pipeline designed to eliminate common research biases.
- Model Zoo: A diverse set of target models, including undefended architectures and those with state-of-the-art defenses (e.g., adversarial training, certified defenses).
- Fixed Query Budget: Instead of varying iterations, AttackBench limits every attack to exactly 2,000 queries (forward and backward passes) to ensure a level playing field.
- Optimality Metric: Since the theoretical "perfect" attack is unknown, AttackBench constructs an empirical optimum by ensembling the results of over 100 tested attacks. An attack's "Local Optimality" (LO) measures how closely its performance curve tracks this ensemble.
- Global Optimality (GO): LO scores are averaged across multiple models to prevent architecture-specific overfitting.
- Leaderboard: Attacks are ranked by their GO scores across different noise norms ($\ell_0, \ell_1, \ell_2, \ell_\infty$).
The framework was evaluated using standard computer vision benchmarks: the full CIFAR-10 test set and a 5,000-sample subset of the ImageNet validation set.
Implementation Challenges and Bugs
A critical finding of the study is that the specific implementation of an algorithm often matters more than the underlying theory. For instance, the APGD attack's optimality plummeted from 90.9% in its original codebase to just 26% when using the ART library, primarily due to differences in default initialization settings. Furthermore, the researchers identified five major programming errors in popular libraries like Foolbox and TorchAttacks that led to crashes or incorrect results.
Successful attacks typically share two characteristics: dynamic or adaptive step sizes (such as cosine annealing) and gradient normalization. These features allow attacks to converge more effectively within the strict 2,000-query budget.
Experimental Results
The researchers conducted 815 experiments across 102 attack implementations. The results highlight that no single attack dominates every scenario, necessitating the ensemble-based empirical optimum to define the state-of-the-art.
- Top Performers: For $\ell_0$ and $\ell_2$ norms, $\sigma$-zero and DDN (Decoupled Direction and Norm) were most effective. For $\ell_1$ and $\ell_\infty$ norms, APGD and PDPGD led the rankings.
- Efficiency vs. Scalability: Some attacks like VFGA are highly efficient with low query counts but fail to scale effectively to complex datasets like ImageNet.
- Library Quality: Implementations from AdvLib, Foolbox, or the original authors' code generally provided the highest optimality scores compared to general-purpose libraries.
Conclusion
AttackBench provides a much-needed "ground truth" for the adversarial ML community. By standardizing budgets and introducing the optimality metric, it exposes the significant gap between theoretical algorithms and their practical implementations. While currently focused on image models and gradient-based untargeted attacks, the authors plan to maintain AttackBench as a living leaderboard, expanding it to other domains like NLP and audio to ensure continuous, fair comparison of new defenses and attacks.
Summary updated