Organizations: Department of Computer Science, University of Exeter, Exeter, UK · National Mobile Communications Research Laboratory, Southeast University, Nanjing, China · Department of Computer Science, University of Liverpool, Liverpool, UK
Adversarial training has emerged as a highly effective way to improve the robustness of deep neural networks (DNNs). It is typically conceptualized as a min-max optimization problem over model weights and adversarial perturbations, where the weights are optimized using gradient descent methods, such as SGD. In this paper, we propose a novel approach by treating model weights as random variables, which paves the way for enhancing adversarial training through Second-Order Statistics Optimization (S2O) over model weights. We challenge and relax a prevalent, yet often unrealistic, assumption in prior PAC-Bayesian frameworks: the statistical independence of weights. From this relaxation, we derive an improved PAC-Bayesian robust generalization bound. Our theoretical developments suggest that optimizing the second-order statistics of weights can substantially tighten this bound. We complement this theoretical insight by conducting an extensive set of experiments that demonstrate that S2O not only enhances the robustness and generalization of neural networks when used in isolation, but also seamlessly augments other state-of-the-art adversarial training techniques. The code is available at https://github.com/Alexkael/S2O.
Figures & tables
Fig. 1: Illustration of the theoretical framework: perturbation bound with consideration of correlated weights. Under this framework, a standard generalization bound is extended to a robust generalization bound with weight correlation matrix, and further to a bound with weight correlation matrix estimated over both clean data and adversarial data.
Fig. 2: Illustration of the optimization framework: Theorem III.2 and Theorem III.5 show the influence of the second-order statistics of weights, over clean and adversarial data, on the robust generalization performance. In Section IV-A , we demonstrate that these statistics can be approximately optimized using the Frobenius norm of the correlation matrix. To simplify this optimization process, we employ the Laplace approximation in Section IV-B and propose our adversarial training methodology, S 2 O, in Section IV-C .
Fig. 3: We sample 10000 9-dimensional correlation matrices and demonstrate (a) ∥Rl,x∥F2 , ∥Rl,x′∥F2 w.r.t Λl,maxc or Λl,maxr ; (b) ∥Rl,x∥F2 , ∥Rl,x′∥F2 w.r.t Λl,minklΛl,maxh2−kl ; (c) ∥Rl,x∥F2 , ∥Rl,x′∥F2 w.r.t Λl,maxc or Λl,maxr ; (d) ∥Rl,x∥F2 , ∥Rl,x′∥F2 w.r.t Λl,minklΛl,maxh2−kl . Note that the horizontal axis represents both ∥Rl,x∥F2 and ∥Rl,x′∥F2 .
Fig. 4: We train PreAct ResNet18 with AT and AT+S 2 O on CIFAR-10, and show the results of partial weights. The results estimated from adversarial data are presented in the top figures , while the bottom figures show the results estimated from clean data. (a) shows the normalized spectral norm of Rc , Rr , and the determinant of R , with sampling estimation and Laplace approximation respectively. (b) and (c) demonstrate the absolute correlation matrix of partial weights, for AT and AT+S 2 O respectively.
Threat
Method
CIFAR-10
CIFAR-100
SVHN
Model
Clean
PGD
Time
Clean
PGD
Time
Clean
PGD
Time
ℓ∞
AT
82.41
52.77
309s
58.02
28.02
307s
93.17
60.91
509s
AT+S 2 O
83.65
55.11
368s
58.45
30.58
371s
93.39
64.83
595s
ℓ2
AT
88.83
68.83
292s
64.21
42.20
290s
94.02
66.76
477s
AT+S 2 O
89.57
69.42
364s
65.32
44.07
366s
94.93
76.19
586s
TABLE I: Adversarial training across datasets on PreAct ResNet18 (%).
Dataset
Method
Model
DDPM Data
Clean
AA
CIFAR-10
Lee et al. (2020) [ 35 ]
WRN-34-10
-
92.56
39.70
Wang et al. (2020) [ 56 ]
WRN-34-10
-
83.51
51.10
Rice et al. (2020) [ 47 ]
WRN-34-20
-
85.34
53.42
Zhang et al. (2020) [ 64 ]
WRN-34-10
-
84.52
53.51
Pang et al. (2021) [ 44 ]
WRN-34-20
-
86.43
54.39
Jin et al. (2023) [ 28 ]
WRN-34-20
-
85.98
54.20
TABLE III: Experiments with DDPM generated data under ℓ∞ attack (%).
Radius
Method
Clean
ℓ∞
ℓ2
ℓ1
Union
ℓ∞:2552ℓ2:0.5ℓ1:12
Croce et al. (2022) [ 11 ]
87.2
73.3
64.1
55.4
55.4
Tramer et al. (2019) [ 55 ]
85.6
72.1
63.6
56.4
56.4
Jiang et al. (2024) [ 25 ]
86.3
73.3
64.9
59.1
59.1
+ S 2 O
87.1
73.6
65.3
59.9
59.9
ℓ∞:2558ℓ2:1.5ℓ1:12
Croce et al. (2022) [ 11 ]
83.5
41.0
25.5
52.9
25.5
Tramer et al. (2019) [ 55 ]
74.6
42.9
35.7
50.3
35.6
TABLE IV: Experiments on CIFAR-10 with multiple ℓp attacks (%).
Method
CIFAR-10
CIFAR-100
Clean
AA
Sum
Clean
AA
Sum
AT
86.06
46.26
132.32
59.83
23.94
83.77
Suzuki et al. (2023) [ 51 ]
90.24
50.20
140.44
73.05
24.32
97.37
Waseda et al. (2025) [ 58 ]
90.89
50.77
141.66
72.51
24.18
96.70
+S 2 O
90.45
53.16
143.61
72.36
27.09
99.45
TABLE V: Experiments on CIFAR to measure the trade-off ( ℓ∞ , %).
Despite being widely adopted as a canonical framework for learning robust models, adversarial training suffers from robust overfitting. Existing empirical and theoretical explorations fail to provide a satisfactory mechanistic interpretation of the phenomenon. By modeling adversarial training with momentum SGD as a discrete-time dynamical system, we propose a PAC-Bayesian analytical framework that proves time-resolved robust generalization bounds. Specifically, our framework tracks the closed-form evolution of the posterior mean and covariance under both stationary and non-stationary transient regimes, connecting the model's robust generalization performance to learning rate, local loss geometry, and mini-batch stochastic gradients. By estimating the key quantities associated with the bound, we illustrate the underlying mechanism of robust overfitting. Our framework also shows how adversarial weight perturbation reduces robust generalization gaps by suppressing dominant loss-curvature modes, while suggesting that excessive penalization can be sub-optimal for optimization.
Yuelin Xu, Xiao Zhang
CISPA Helmholtz Center for Information Security, Saarbrücken, Germany
Adversarial Training (AT) is a leading defense against adversarial examples but often suffers from Catastrophic Overfitting (CO) in efficient single-step variants, where robustness to multi-step attacks collapses despite high single-step performance. We address this failure mode with two contributions. First, we formalize Epsilon Overfitting (EO), a perspective in which fixed perturbation magnitudes and directions exacerbate CO, and show that introducing perturbation variability significantly improves robust generalization across different architectures and datasets. Second, we propose PertAlign (Perturbation Alignment), a theoretically grounded, computationally negligible metric that predicts CO onset by measuring gradient alignment across attack stages. Leveraging these insights, we introduce SORA, an adaptive step-size AT method that dynamically adjusts perturbations based on loss surface geometry. SORA consistently prevents CO, achieves state-of-the-art robustness and clean accuracy, and generalizes across datasets and architectures using a single fixed set of hyperparameters, which is essential for applicability in fast AT. Extensive experiments on diverse datasets and architectures show that SORA matches or surpasses the robustness of prior methods while delivering higher clean accuracy and superior efficiency. Code is available at https://github.com/SecondOrderAT/SORA.
Building on a probabilistic perspective in which adversarial examples arise from the overlap between a distance-based distribution pdis and a victim-classifier-induced distribution pvic, we start from a simple intuition: adversarial examples become harder to generate when these two distributions are pushed apart, as their overlap becomes smaller, thereby increasing robustness. This intuition naturally motivates a KL-based robustness objective. We then prove that KL(pdis∥pvic)−logZvic is a lower bound on probabilistic robustness (PR), where Zvic denotes the normalizing constant of pvic. Since PR is generally intractable to compute directly, maximizing this KL-based lower bound provides a tractable surrogate objective for improving PR. We further show that this objective recovers a scaled form of adversarial training, offering a probabilistic interpretation of adversarial training and a principled route to robustness improvement. We call the resulting method probabilistic adversarial training. Experiments show that it consistently improves PR, and ablation studies demonstrate that the induced scaling factor can even enhance the PR of non-probabilistic adversarial training methods.