Instance adaptive adversarial training: Improved accuracy tradeoffs in neural nets

Yogesh Balaji, Tom Goldstein, Judy HoffmanarXiv 2019

Deep neural networks are notoriously fragile. Tiny, human-imperceptible perturbations—known as adversarial attacks—can flip a model's prediction from "bird" to "deer." While Adversarial Training (AT) is the gold standard for defending against these attacks, it typically imposes a heavy "robustness tax," often resulting in a 10-15% drop in accuracy on clean, unperturbed images. This paper introduces Instance Adaptive Adversarial Training (IAAT), a method that learns custom robustness margins for individual images to significantly mitigate this tradeoff.

The Problem: One-Size-Fits-All Robustness

Standard adversarial training uses a fixed perturbation radius ($\epsilon$) for every training sample. The authors argue that this uniform approach is fundamentally flawed. Some images are naturally closer to the decision boundary than others. Forcing a large, fixed margin around these ambiguous samples creates distorted boundaries that generalize poorly to clean data.

Figure 1: Conceptual illustration of adaptive margins. Ambiguous samples near class boundaries (like the bird on the left) receive smaller epsilon values to prevent class overlap, while prototypical samples (like the deer on the right) can support much larger margins.

As shown in Figure 1, for common $\epsilon$ values (like 8/255), the "adversarial balls" around different classes can actually overlap. Standard AT tries to force the model to assign different labels to the same point in space, which is mathematically impossible and leads to poor generalization. IAAT resolves this by allowing $\epsilon$ to vary per instance.

Instance Adaptive Adversarial Training (IAAT)

Instead of a global $\epsilon$, IAAT assigns every training sample $x_i$ its own $\epsilon_i$. The core of the method is a simple but effective heuristic to update these values after each epoch:

  1. Attack Success: If a Projected Gradient Descent (PGD) attack successfully finds an adversarial version of an image within the current $\epsilon_i$, the margin is considered too large or ambiguous and is decreased.
  2. Attack Failure: If the attack fails to flip the label, the margin is increased.
  3. Stabilization: To ensure training stability, the model uses a "warmup" period of standard AT and applies an exponential moving average to update the $\epsilon_i$ values.

Empirical Results

The authors evaluated IAAT across CIFAR-10, CIFAR-100, and ImageNet. The results demonstrate that IAAT effectively shifts the Pareto frontier, achieving better clean accuracy at the same level of robustness as standard AT.

Figure 2: Comparison of clean samples, standard adversarial perturbations (fixed epsilon), and adaptive perturbations. IAAT (bottom row) assigns very small epsilons to ambiguous cases (left columns) and larger epsilons to clear cases (right columns).

Key Performance Gains:

  • CIFAR-10: Clean accuracy improved by ~4% (from 83.2% to 87.2%) with identical robustness.
  • CIFAR-100: Clean accuracy jumped by ~9% (from 59.5% to 68.8%).
  • ImageNet: On ResNet-152, clean accuracy improved by over 10% compared to the adversarial baseline.

Interpretability and Discussion

The learned $\epsilon_i$ values provide intuitive insights into the dataset. Images that receive a small $\epsilon$ are often visually ambiguous (e.g., a bird that shares features with a frog). Conversely, images that receive a large $\epsilon$ are clear, prototypical examples of their class. This suggests that IAAT leads to more naturally shaped decision boundaries, which is further supported by the model's improved performance on common corruptions like motion blur or snow.

While IAAT introduces some computational overhead—requiring the tracking of per-image margins—it offers a principled path forward for building robust models that do not sacrifice performance on real-world, clean data.

Summary updated

BibTeX
@misc{balaji2019instance,
  author = {Yogesh Balaji and Tom Goldstein and Judy Hoffman},
  title = {{Instance adaptive adversarial training: Improved accuracy tradeoffs in neural nets}},
  year = {2019},
  eprint = {1910.08051},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.08051},
}
Figure