How many perturbations break this model? Evaluating robustness beyond adversarial accuracy

Raphael Olivier, Bhiksha Raj

This paper, presented at ICML 2023, challenges the binary way we currently evaluate machine learning robustness and proposes a more nuanced metric: Adversarial Sparsity.

TL;DR

Standard adversarial accuracy only tells us if a model can be broken by any small perturbation; it doesn't tell us how many such perturbations exist. This paper introduces "adversarial sparsity" to quantify the volume of a model's vulnerabilities, revealing that many "broken" defenses actually provide partial protection and that data augmentation can improve robustness even without adversarial training.

What Problem Does This Paper Address?

In the world of adversarial machine learning, the gold standard for evaluation is adversarial accuracy: the percentage of inputs for which no perturbation within a certain budget (like an $L_p$ ball) can change the model's prediction.

The authors argue this is a "worst-case" metric that leaves a lot of information on the table. Imagine two models:

  1. Model A: Can be broken by 99% of all possible directions of noise.
  2. Model B: Can be broken by only 1% of noise directions.

Under standard evaluation, if a strong attack finds even one failure point for both, they both receive a score of 0% accuracy and are labeled "broken." This binary view ignores the fact that Model B is significantly harder to fool in real-world, non-adversarial settings. The authors seek a metric that captures this "partial effectiveness."

Figure 1. Representation of the decision boundary of some binary classification task (regions in green and orange) around point x in two cases. In both cases, the model is not robust around x with the represented L2 radius ϵ. However, there are many more adversarial perturbations on the right than on the left. Adversarial accuracy evaluates both cases at 0, but α, the angle between fixed direction u and the closest adversarial perturbation, is smaller on the right. Adversarial sparsity is the expected value of α when sampling u uniformly.

Methods

The authors introduce Adversarial Sparsity (AS). Instead of asking "is there an attack?", they ask "how large must a random subset of the perturbation space be to find an attack?"

  • For $L_2$ perturbations: They measure the expected angle $\alpha$ of a spherical cap (a cone-like region) required to find a successful perturbation. A larger angle means the adversarial examples are "sparser" in the space.
  • For $L_\infty$ perturbations: They measure the number of dimensions $k$ (pixels) that an attacker must be allowed to modify to find a successful perturbation.

To calculate this, they developed Constrained PGD. Unlike standard Projected Gradient Descent, which searches the entire $\epsilon$-ball, this version is restricted to a specific geometric subset (like a spherical cap). By using binary search over the size of these subsets across multiple random directions, they can estimate the average sparsity of a model.

Datasets

The primary evaluations were conducted on:

  • CIFAR-10: A standard benchmark for adversarial robustness research.
  • ImageNet: Used to demonstrate that the sparsity metric scales to high-dimensional, real-world image data.

They evaluated a wide range of architectures, including ResNet-18, ResNet-50, WideResNet, and Vision Transformers (ViT).

Key Insights and Ideas

  • Accuracy $\neq$ Sparsity: Surprisingly, among state-of-the-art robust models, higher adversarial accuracy does not always correlate with higher sparsity. Some models improve accuracy by fixing "almost robust" points but leave the remaining vulnerable points just as easy to break as before.
  • Redeeming "Broken" Defenses: Several early defenses (like JPEG compression or Spatial Smoothing) were dismissed because strong attacks could eventually break them (0% accuracy). Sparsity analysis shows these defenses actually significantly reduce the number of successful perturbations, meaning they offer real, albeit incomplete, protection.
  • Data Augmentation is a "Free" Robustness Boost: The authors found that standard data augmentation techniques (like RICAP or Mixup) increase a model's adversarial sparsity even when the model is trained normally (without adversarial training). This suggests that generalized learning naturally leads to a "cleaner" decision boundary.
  • A Smoother Evaluation Metric: Adversarial accuracy often drops to zero abruptly as the attack radius $\epsilon$ increases. Sparsity decays much more slowly, providing a way to compare models even in high-noise regimes where accuracy is no longer informative.

Key Results

The authors compared various state-of-the-art (SOTA) models and "broken" defenses.

Model / Defense $L_2$ Sparsity ($\epsilon=0.5$) $L_\infty$ Sparsity ($\epsilon=0.03$)
Undefended ResNet-18 0.180 56.8
SOTA Adversarial Training ~0.550 ~220.0
JPEG Compression 0.161 80.9
RICAP Augmentation 0.272 105.0
  • Table 1 (SOTA Models): While all SOTA models have much higher sparsity than the baseline, the ranking by sparsity often differs from the ranking by accuracy.
  • Table 2 ("Broken" Defenses): JPEG compression increased $L_\infty$ sparsity from 56.8 to 80.9, proving it eliminates a non-negligible subset of adversarial examples despite having 0% adversarial accuracy.
  • Table 3 (Augmentation): RICAP nearly doubled the $L_\infty$ sparsity of a standard model without any expensive adversarial training steps.
Figure 2. Sparsity as a function of adversarial accuracy for all robust models, in both L2 norm (blue) and L∞norm (red). The values used are the same as in Table 1

Limitations and Future Work

  • Computational Cost: Estimating sparsity requires running multiple constrained attacks per image, which is significantly slower than calculating standard adversarial accuracy.
  • Local Radius Assumption: The mathematical link between sparsity and the number of perturbations assumes that adversarial regions have a similar "local radius" across models, which may not always hold.
  • Future Directions: The authors suggest extending sparsity to other threat models, such as human-perception-based attacks or common image corruptions (fog, snow, etc.), where binary accuracy is often an insufficient metric.

Summary updated

BibTeX
@inproceedings{olivier2023how,
  author = {Raphael Olivier and Bhiksha Raj},
  title = {{How many perturbations break this model? Evaluating robustness beyond adversarial accuracy}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=3m9c6uYKK7},
}
Figure