Exploring Memorization in Adversarial Training

Yinpeng Dong, Ke Xu, Xiao Yang, Tianyu Pang, Zhijie Deng, Hang Su, Jun Zhu

Deep neural networks possess a surprising capacity to memorize training data, even when labels are completely randomized. While this phenomenon is well-documented in standard training, its implications for Adversarial Training (AT)—the premier defense against malicious input perturbations—are far more complex. This paper investigates the memorization effect in AT to uncover the root causes of a pervasive issue known as robust overfitting, where a model's defensive capabilities against unseen attacks degrade significantly late in the training process.

The Problem: Robust Overfitting and Memorization

Adversarial training is currently the most effective method for building robust deep learning models. However, practitioners frequently encounter a frustrating quirk: after a certain epoch, the model continues to improve its defense against the training set while its performance on the test set plummets.

While it is known that deep neural networks (DNNs) can easily memorize standard datasets with random labels, it was previously unclear if they could achieve the same feat for adversarial examples, which require navigating much more complex decision spaces. The authors hypothesize that this immense memorization capacity might be the underlying cause of robust overfitting, and they seek to explain why different AT methods (like PGD-AT versus TRADES) exhibit vastly different convergence behaviors during learning.

Comparison of decision boundaries for standard and adversarial training when trained on true versus random labels.

Methodology

To dissect this phenomenon, the researchers structured their investigation into three primary stages:

  1. Empirical Memorization Study: The team trained models using PGD-AT and TRADES on datasets (CIFAR-10, CIFAR-100, SVHN) where labels were replaced with pure random noise. This extreme condition acts as a stress test for the absolute limits of model capacity.
  2. Convergence Analysis: They conducted theoretical and empirical analyses of gradient stability. Notably, they proved that the adversarial loss in PGD-AT is inherently more unstable than standard cross-entropy loss, explaining its failure to converge when forced to fit random labels.
  3. The Mitigation Algorithm (AT+TE): To combat robust overfitting, the authors integrated Temporal Ensembling (TE) into the AT framework. Instead of forcing the model to fit a "hard" one-hot label—which becomes "noisy" if an adversarial perturbation pushes an image across a natural decision boundary—they utilize an exponential moving average of the model's own past predictions to provide a smoother, more reliable target.

Key Insights

The study yields several critical insights into how models learn—and overfit—in adversarial settings:

  • Capacity is Not the Bottleneck: DNNs have ample capacity to memorize adversarial examples even with random labels. The limiting factor is the algorithm used to navigate the loss landscape.
  • PGD-AT vs. TRADES: When trained on random labels, PGD-AT fails to converge, whereas TRADES succeeds. The critical difference is that TRADES incorporates a "clean" loss term that acts as a stabilizer, allowing the model to learn natural features before attempting to fit complex adversarial ones.
  • The Danger of "Noisy" One-Hot Labels: In standard training, a one-hot label represents absolute ground truth. In adversarial training, a perturbation might push an image of a "cat" into a feature space that genuinely resembles a "dog." Forcing the model to classify it as a "cat" with 100% confidence effectively forces it to memorize noise, directly triggering robust overfitting.
  • Complexity Measures Fall Short: Traditional metrics for measuring model complexity (such as spectral norms) fail to explain why models generalize well in adversarial settings, highlighting the need for new theoretical tools to understand robust generalization.

Results and Mitigation

The proposed AT+TE (Adversarial Training with Temporal Ensembling) method effectively mitigates robust overfitting across multiple datasets and network architectures (including ResNet-18, Wide ResNet, and VGG-16).

  • Eliminating the Performance Gap: In standard PGD-AT on CIFAR-10, robust accuracy typically drops by about 7.7% between its peak and the end of training. By applying Temporal Ensembling, this catastrophic drop is reduced to a mere 0.96%.
  • Superior Overall Robustness: AT+TE consistently outperformed baselines like standard PGD-AT, TRADES, and Label Smoothing against rigorous evaluations like AutoAttack. On CIFAR-10, PGD-AT+TE achieved a final AutoAttack accuracy of 49.62%, significantly higher than PGD-AT's 41.84%.
  • Broad Consistency: These improvements held true across different perturbation budgets (both $\ell_\infty$ and $\ell_2$ norms) and varying network depths.

Limitations and Future Directions

While this research provides a compelling empirical and partial theoretical explanation for robust overfitting, several avenues remain open for future exploration. Computationally, Temporal Ensembling requires maintaining a memory bank of predictions for the entire training set, which increases overhead. Theoretically, while the authors demonstrate the inadequacy of existing complexity measures for robust generalization, proposing a definitive replacement remains an open challenge. Finally, the study primarily focuses on gradient-based $\ell_p$ norm attacks; understanding how memorization impacts defenses against non-$\ell_p$ attacks (such as spatial rotations or color shifts) will be crucial for developing universally robust models.

Summary updated

BibTeX
@inproceedings{dong2022exploring,
  author = {Yinpeng Dong and Ke Xu and Xiao Yang and Tianyu Pang and Zhijie Deng and Hang Su and Jun Zhu},
  title = {{Exploring Memorization in Adversarial Training}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=PMKv7L39nxZ},
}
Figure