Universal Adversarial Training

Ali Shafahi, Mahyar Najibi, Zheng Xu, John P. Dickerson, Larry S. Davis, Tom Goldstein

Introduction

Adversarial attacks typically involve crafting a unique noise pattern for every specific input image. However, research has shown the existence of Universal Adversarial Perturbations (UAPs)—static noise patterns that, when added to almost any image, cause a neural network to misclassify it with high probability. While these universal attacks are a significant security threat, they have historically been computationally expensive to generate and even harder to defend against.

A single universal perturbation added to different images causes misclassification across various classes.

The Challenge of Universal Attacks

Generating UAPs previously relied on iterative methods like DeepFool, which are slow. More critically, defending against them via adversarial training—the gold standard for robustness—was considered impractical for large-scale datasets like ImageNet. Standard adversarial training requires an expensive "inner loop" optimization to find a new perturbation for every training batch, multiplying training time by factors of 10 to 100.

Proposed Methods

The authors introduce three algorithmic innovations to make universal attacks and defenses practical:

  1. Stochastic Gradient UAP: UAP generation is reformulated as a simple optimization problem solved via Stochastic Gradient Descent (SGD). A clipped loss function is used to prevent "easy-to-fool" images from dominating the gradient, ensuring the resulting pattern is truly universal.
  2. Universal Adversarial Training (UAT): The defense is framed as a min-max game where the network weights and a shared universal perturbation are updated iteratively.
  3. Low-cost UAT: By updating model weights and the global perturbation simultaneously during a single backward pass, the authors achieve robustness with virtually zero additional computational cost compared to standard training.
Comparison of different optimizers (SGD, MSGD, ADAM, PGD) in reducing model accuracy on a training mini-batch to generate universal perturbations.

Key Results and Insights

The proposed methods demonstrate significant improvements in both speed and efficiency:

  • Speed: The new UAP generation method is 13x faster on average than previous DeepFool-based approaches.
  • Efficiency: The "low-cost" training method achieved 86.1% robustness on CIFAR-10 without increasing training time.
  • Scalability: On ImageNet, a standard AlexNet's accuracy plummeted to 3.9% under attack, whereas the UAT-hardened version maintained 42.0% accuracy.
  • Geometric Patterns: The study found that UAPs for standard models often exhibit structured geometric textures, while those for robust models appear more like random noise, indicating smoother decision boundaries.

Conclusion

This work demonstrates that universal adversarial robustness can be achieved "for free" by leveraging the image-agnostic nature of UAPs. While a gap remains between clean and adversarial accuracy, these methods provide a practical path toward securing large-scale vision models against broad-spectrum adversarial threats.

Summary updated

BibTeX
@inproceedings{shafahi2020universal,
  author = {Ali Shafahi and Mahyar Najibi and Zheng Xu and John P. Dickerson and Larry S. Davis and Tom Goldstein},
  title = {{Universal Adversarial Training}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i04.6017},
}
Figure