Abstract
Adversarial training (AT) is the primary defense against malicious perturbations, yet it suffers from a unique failure mode known as "robust overfitting." Unlike standard training, where performance typically improves with more epochs, robust test accuracy often plummets following a learning rate decay. This paper provides a mechanistic explanation for this phenomenon by modeling Momentum SGD as a discrete-time dynamical system. We show that robust overfitting is driven by a "posterior collapse" where model parameters become trapped in increasingly sharp regions of the loss landscape. By tracking Hessian eigenvalues and a proposed weight-curvature index, we demonstrate how the balance between stochastic noise and loss curvature determines generalization performance.
The Problem: Robust Overfitting
In standard deep learning, longer training generally leads to better generalization. However, in the context of Adversarial Training (AT), models often exhibit a striking divergence: after a learning rate decay, the model’s performance on new adversarial examples (robust test accuracy) starts to plummet, even as training error continues to decrease. While empirical fixes like early stopping or Adversarial Weight Perturbation (AWP) exist, a fundamental "under the hood" explanation of the training dynamics has been missing. Existing theories often rely on static snapshots, failing to capture the time-varying nature of the training process.
Theoretical Framework: PAC-Bayesian Dynamics
To address this, we treat Momentum SGD as a dynamical system and derive time-resolved generalization bounds using a PAC-Bayesian framework. This approach allows us to track the evolution of the model's "posterior"—the distribution of its weights—over time.
Key components of our methodology include:
- Closed-form Tracking: We provide solutions for how the mean and covariance of model weights change in response to the learning rate, local "sharpness" (Hessian) of the loss, and mini-batch gradient noise.
- Spectral Estimation: To apply this theory to large-scale networks like PreActResNet-18, we developed an efficient per-epoch spectral estimation protocol. This allows us to monitor the top-20 most significant directions of the loss landscape (Hessian eigenvalues, $\lambda$) throughout training.
The Mechanism: The Tug-of-War and Posterior Collapse
Our analysis reveals that robust generalization is a delicate balance between loss curvature and stochastic noise. Noise from SGD pushes the model toward "flat" regions, while curvature pulls it toward "sharp" ones.
When the learning rate drops, the "noise" that previously kept the model in flatter regions effectively disappears. Consequently, the model's weight distribution "collapses" into very sharp directions. While this sharpening initially aids optimization, the curvature eventually becomes so high that it amplifies variance, leading to a massive generalization gap. Interestingly, we find that fitting robust features actually requires exploring these high-curvature regions, a fundamental departure from standard training where models naturally gravitate toward flatter minima.
Experimental Validation
We validated our theory across standard benchmarks including CIFAR-10, CIFAR-100, and SVHN. The empirical results closely match our theoretical bounds, particularly in tracking the "progressive sharpening" of Hessian eigenvalues.
As shown in the figure above, different training regimes exhibit distinct behaviors:
- Standard Training (ST): Curvature remains low throughout training, and no robust overfitting occurs.
- Adversarial Training (AT): Following the learning rate drop at epoch 100, there is a massive spike in both the top eigenvalues ($\lambda_1$) and the weight-curvature index ($\gamma$). This coincides exactly with the rise in test error (robust overfitting).
- Adversarial Weight Perturbation (AWP): AWP successfully suppresses this curvature growth. By penalizing sharpening, it maintains a stable test error, though it may slightly hinder the model's ability to perfectly minimize training loss.
Conclusion and Future Work
This work establishes that robust overfitting is not a random occurrence but a predictable consequence of training dynamics. The "posterior collapse" into sharp minima explains why larger batch sizes (which reduce noise) often exacerbate overfitting.
Future research will focus on developing "selective penalization" schemes. Current methods like AWP may over-penalize sharpness; a more refined approach would suppress the "bad" sharpness that hurts generalization while permitting the "good" sharpness necessary for learning robust features. Additionally, extending this dynamical analysis to Vision Transformers (ViTs) will be crucial to see if these geometric principles hold across different architectures.
Summary updated