Fast is better than free: Revisiting adversarial training

Eric Wong, Leslie Rice, J. Zico Kolter

Abstract

Adversarial training is the gold standard for building robust deep networks, but its high computational cost has long hindered practical adoption. This paper demonstrates that by simply adding random initialization to the "weak" Fast Gradient Sign Method (FGSM) and leveraging modern training optimizations, we can train robust models in minutes rather than days. We achieve state-of-the-art results on CIFAR-10 and ImageNet with minimal computational overhead, proving that robustness does not have to be a bottleneck.

Introduction

Deep neural networks are notoriously fragile; small, intentional perturbations to an input (adversarial examples) can easily flip a model's prediction. To counter this, researchers use adversarial training, where the model is trained on these "attack" images.

The primary challenge is that generating high-quality adversarial examples using the standard Projected Gradient Descent (PGD) method is computationally grueling, often making training 10 to 100 times slower than standard training. While recent "free" adversarial training methods reduced this cost, they remained significantly slower than standard training and often required hundreds of epochs to converge. This work demonstrates that adversarial training can be made nearly as fast as standard training.

Methods: Making FGSM Robust

The authors revisit the Fast Gradient Sign Method (FGSM), a single-step attack once dismissed as too weak for robust training. They introduce three key components to make it effective:

  1. FGSM with Random Initialization: Instead of starting the adversarial perturbation at zero, they initialize it to a random point within the allowed perturbation "ball" ($\epsilon$). This simple change prevents the model from "cheating" and over-optimizing against a deterministic single-step attack.
  2. DAWNBench Optimizations: They incorporate high-performance training techniques popularized by the DAWNBench competition, specifically Cyclic Learning Rates and Mixed-Precision Arithmetic. Cyclic learning rates allow for much higher learning rates and faster convergence, while mixed-precision utilizes hardware like NVIDIA Tensor Cores for speed.
  3. Catastrophic Overfitting Detection: They identify a failure mode where a model suddenly loses all PGD-robustness while appearing robust to FGSM. They propose using a small PGD-evaluated validation set to perform early stopping before this collapse occurs.
Cyclic learning rate schedules used for CIFAR-10 and ImageNet to accelerate convergence.

Key Results and Insights

The speedups achieved are an order of magnitude better than previous state-of-the-art "fast" methods. The most surprising finding is that a "strong" multi-step adversary (like PGD) is not required during training to defend against one at test time; a single-step attack is sufficient if it is non-deterministic.

  • CIFAR-10: The authors trained a model to 45% robust accuracy (against a 50-step PGD attack) in just 6 minutes. For context, standard PGD training takes ~80 hours, and the previous "free" method took ~10 hours to reach the same threshold.
  • ImageNet: They achieved 43% robust accuracy in 12 hours, compared to 50 hours for the "free" method.
Comparison of training dynamics between FGSM, PGD, and "Free" training. The dashed lines indicate the point of catastrophic overfitting or optimal stopping.

Conclusion

By combining FGSM with DAWNBench tricks, the authors show that the cost of robustness is essentially just the cost of one extra backward pass per iteration. While "Catastrophic Overfitting" remains a phenomenon to be monitored, the proposed random initialization and early stopping provide a practical path toward training robust models at scale. Robustness is no longer a luxury reserved for those with massive compute resources; it is now "cheap."

Summary updated

BibTeX
@inproceedings{wong2020fast,
  author = {Eric Wong and Leslie Rice and J. Zico Kolter},
  title = {{Fast is better than free: Revisiting adversarial training}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=fDIp_X1khq},
}
Figure