Abstract
This paper mathematically derives an analytic solution of the adversarial perturbation on a ReLU network, and theoretically explains the difficulty of adversarial training. Specifically, we formulate the dynamics of the adversarial perturbation generated by the multi-step attack, which shows that the adversarial perturbation tends to strengthen eigenvectors corresponding to a few top-ranked eigenvalues of the Hessian matrix of the loss w.r.t. the input. We also prove that adversarial training tends to strengthen the influence of unconfident input samples with large gradient norms in an exponential manner. Besides, we find that adversarial training strengthens the influence of the Hessian matrix of the loss w.r.t. network parameters, which makes the adversarial training more likely to oscillate along directions of a few samples, and boosts the difficulty of adversarial training. Crucially, our proofs provide a unified explanation for previous findings in understanding adversarial training.
Introduction
While deep neural networks are powerful, they are easily fooled by imperceptible adversarial perturbations. Adversarial training (AT)—incorporating these "attack" images into the training loop—is the most effective defense, but it comes at a high cost: it is much harder to optimize, prone to severe overfitting, and results in a "sharper" loss landscape compared to standard training. Until now, many of these difficulties were understood primarily through empirical observations. This paper seeks to bridge the gap by providing a theoretical foundation, aiming to answer why the optimization dynamics change so drastically when switching from vanilla to adversarial training.
Theoretical Framework
The authors focus on ReLU networks and derive an analytic solution for the adversarial perturbation ($\delta$) generated by multi-step attacks. Their approach relies on the assumption that an idealized adversarial perturbation does not significantly flip the "gating states" (on/off status) of the ReLU layers. Using this framework, the study formulates attack dynamics, showing how perturbations align with top eigenvectors of the input Hessian, and analyzes weight updates to see how $\delta$ alters the learning trajectory. This provides a unified explanation for various findings in adversarial research, such as gradient masking and the effectiveness of early stopping.
Empirical Validation
The theoretical derivations were verified using 16 different ReLU architectures, including MLPs, CNNs, VGG-11, AlexNet, and ResNet-18. The derived analytic solution for the perturbation ($\hat{\delta}$) was found to be a very close fit for real-world perturbations measured in practice, with a low average error metric $\kappa \approx 0.097$.
Experiments confirmed that both the gradient norm and the perturbation norm increase exponentially with the number of attack steps, exactly as predicted by the theoretical formulation. This exponential growth underscores why adversarial examples can so easily disrupt model performance.
Insights into Adversarial Training Dynamics
The paper reveals several key reasons for the difficulty of AT:
- The "Rich Get Richer" Perturbation: Adversarial perturbations exponentially strengthen the gradient components along the directions where the model is most sensitive (the top eigenvalues of the input Hessian).
- Extreme Sample Imbalance: AT exponentially strengthens the influence of "unconfident" samples (those with large gradient norms). This can cause the training process to be dominated by a tiny fraction of "hard" examples, while the majority of "easy" samples are ignored.
- The Oscillation Trap: AT boosts the influence of the Hessian matrix with respect to network parameters. This makes the loss landscape "sharper" and causes the optimization to oscillate wildly, explaining the convergence difficulties.
As shown in the experimental results, weight changes in adversarial training have a significantly more massive impact on the loss gradient than in vanilla training, confirming the theory that AT "boosts" the parameter Hessian. This explains why AT is so difficult to converge compared to standard training.
Conclusion and Limitations
This work provides a rigorous mathematical explanation for the challenges of adversarial training. It explains why $L_2$ and $L_\infty$ constraints are beneficial beyond just keeping perturbations small—they act as a form of regularization that alleviates the extreme influence of hard samples. However, the core derivation assumes that ReLU gating states remain mostly constant during an attack. While experimental evidence suggests the theory holds even when states change, future work could account for state-flipping. Additionally, the analysis is specifically tailored to ReLU-based networks; exploring other activation functions remains an open area for research.
Summary updated