Skip to main content
QUICK REVIEW

[Paper Review] Bag of Tricks for Adversarial Training

Tianyu Pang, Xiao Yang|arXiv (Cornell University)|Oct 1, 2020
Adversarial Robustness in Machine LearningComputer Science111 references12 citations
TL;DR

This paper identifies that adversarial robustness is highly sensitive to basic training hyperparameters like weight decay, batch normalization mode, and PGD initialization, which are often overlooked in prior work. Through systematic ablation on CIFAR-10, the authors show that minor hyperparameter changes can degrade robust accuracy by over 7%, and by re-optimizing training settings, they achieve new state-of-the-art results on AutoAttack, demonstrating that many prior defenses were under-estimated due to suboptimal training configurations.

ABSTRACT

Adversarial training (AT) is one of the most effective strategies for promoting model robustness. However, recent benchmarks show that most of the proposed improvements on AT are less effective than simply early stopping the training procedure. This counter-intuitive fact motivates us to investigate the implementation details of tens of AT methods. Surprisingly, we find that the basic settings (e.g., weight decay, training schedule, etc.) used in these methods are highly inconsistent. In this work, we provide comprehensive evaluations on CIFAR-10, focusing on the effects of mostly overlooked training tricks and hyperparameters for adversarially trained models. Our empirical observations suggest that adversarial robustness is much more sensitive to some basic training settings than we thought. For example, a slightly different value of weight decay can reduce the model robust accuracy by more than 7%, which is probable to override the potential promotion induced by the proposed methods. We conclude a baseline training setting and re-implement previous defenses to achieve new state-of-the-art results. These facts also appeal to more concerns on the overlooked confounders when benchmarking defenses.

Motivation & Objective

  • To investigate why many proposed adversarial training improvements show limited gains compared to simple early stopping.
  • To identify overlooked training hyperparameters and implementation details that significantly affect adversarial robustness.
  • To establish a standardized, effective training recipe for PGD- and TRADES-based adversarial training on CIFAR-10.
  • To demonstrate that re-implementing prior defenses with optimized hyperparameters can achieve new state-of-the-art performance.
  • To highlight the risk of confounding factors in benchmarking adversarial defenses due to inconsistent training settings.

Proposed method

  • Systematically evaluate the impact of 10+ training tricks (e.g., weight decay, learning rate schedule, batch size, BN mode, PGD initialization, early stopping, warmup, optimizer choice) on PGD-AT and TRADES.
  • Re-implement prior defenses (e.g., TRADES, PGD-AT) using a standardized, optimized hyperparameter recipe on CIFAR-10.
  • Use consistent evaluation protocols: AutoAttack, PGD-1000, SPSA, and C&W attacks under ℓ∞ constraints.
  • Compare robust accuracy across different weight decay values (e.g., 2×10⁻⁴ vs. 5×10⁻⁴), BN modes (train vs. eval), and initialization strategies (uniform vs. Gaussian).
  • Conduct ablation studies on WRN-34-10 and ResNet-18 to isolate the effects of each hyperparameter.
  • Report results across 5 random seeds to ensure statistical reliability.

Experimental results

Research questions

  • RQ1How do common training hyperparameters like weight decay and batch normalization mode affect the robust accuracy of adversarially trained models?
  • RQ2Why do many proposed adversarial training improvements show limited gains compared to simple early stopping?
  • RQ3Can re-implementing prior defenses with optimized training settings achieve new state-of-the-art performance on standard benchmarks?
  • RQ4To what extent do implementation details such as PGD initialization and learning rate warmup influence model robustness?
  • RQ5How do different optimizers (e.g., Adam, AdamW, SGD-GC) compare in training robust models under the same setup?

Key findings

  • A change in weight decay from 2×10⁻⁴ to 5×10⁻⁴ reduced robust accuracy by over 7% on PGD-AT, demonstrating extreme sensitivity to this hyperparameter.
  • Using eval mode for batch normalization during adversarial example generation improved robust accuracy by ~5% compared to train mode.
  • Switching from uniform to Gaussian PGD initialization (δ₀ ~ N(0, αI)) improved robust accuracy by ~5% on the same model.
  • The retrained TRADES model with weight decay = 5×10⁻⁴, eval BN mode, and ReLU activation achieved 54.39% robust accuracy on AutoAttack (ℓ∞, ε=8/255), setting a new SoTA.
  • The same model achieved 53.94% ± 0.10% robust accuracy on AutoAttack with ε=0.031, outperforming prior works including Rice et al. (2020) and Zhang et al. (2019b).
  • The choice of optimizer significantly affects performance: AdamW yielded 45.79% robust accuracy on AutoAttack, while SGD-GC achieved 51.65%, highlighting the importance of optimization strategy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.