This work investigates the critical role of activation function curvature -- quantified by the maximum second derivative max∣σ′′∣ -- in adversarial robustness. Using the Recursive Curvature-Tunable Activation Family (RCT-AF), which enables precise control over curvature through parameters α and β, we systematically analyze this relationship. Our study reveals a fundamental trade-off: insufficient curvature limits model expressivity, while excessive curvature amplifies the normalized Hessian diagonal norm of the loss, leading to sharper minima that hinder robust generalization. This results in a non-monotonic relationship where optimal adversarial robustness consistently occurs when max∣σ′′∣ falls within 4 to 10, a finding that holds across diverse network architectures, datasets, and adversarial training methods. We provide theoretical insights into how activation curvature affects the diagonal elements of the hessian matrix of the loss, and experimentally demonstrate that the normalized Hessian diagonal norm exhibits a U-shaped dependence on max∣σ′′∣, with its minimum within the optimal robustness range, thereby validating the proposed mechanism.
Figures & tables
Figure 1: Comparison of RCT-AF activation functions with tunable rectification strength via α parameter ( α=1,5,10,15,20 ). (a) β=0 : Baseline form. (b) β=1 : First-order variant. (c) β=2 : Second-order variant. Across all configurations, increasing α systematically strengthens the asymmetric treatment of negative versus positive inputs, enabling precise control over the activation function’s rectification characteristics.
Figure 2: Second derivative analysis of symmetric RCT-AF activation functions for α∈{1,5,10,15,20} . (a) β=0 : σβ=0′′(x) yields a single extremum at x=0 with value α/4 . (b) β=1 : σβ=1′′(x) produces three critical points: a maximum at x=0 ( α/2 ) and two symmetric minima. (c) β=2 : σβ=2′′(x) exhibits five critical points: a central maximum at x=0 ( α ) and four symmetric extremal points. All functions are even and symmetric about the y -axis.
Figure 3: Robustness analysis of RCT-AF activations under DAJAT adversarial training on CIFAR-10 with ResNet-18. (a) Robust accuracy vs. α for β=0,1,2 , with α varying from 1 to 50 in steps of 1. The curves differ significantly across β values, indicating that α alone does not determine robustness. (b) Robust accuracy vs. maxxσ′′(x) for the same models, where maxxσ′′(x)=α/4 for β=0 , α/2 for β=1 , and α for β=2 . When maxxσ′′(x)<15 , the curves nearly overlap, showing that maximum curvature, not β , primarily governs robustness.
Figure 4: Adversarial robustness vs. maximum second derivative max∣σ′′∣ for ResNet-18 and WideResNet-28-10 trained with TRADES on CIFAR-10 using RCT-AF ( β=1 ). Both architectures exhibit the same inverted-U relationship, with robustness peaking when max∣σ′′∣ lies between 4 and 10. The wider network (WideResNet-28-10) achieves higher absolute robust accuracy but follows an identical dependence on activation curvature, demonstrating that the identified optimal curvature range is architecture-agnostic.
Figure 5: Comparison of adversarial robustness vs. max∣σ′′∣ across three adversarial training methods—DAJAT, DKL, and TRADES—on CIFAR-10 with ResNet-18 and RCT-AF ( β=1 ). All methods exhibit the same qualitative behavior: robustness improves with curvature up to an optimum ( max∣σ′′∣≈4–10 ) and declines thereafter.
Figure 6: Adversarial robustness vs. maximum second derivative max∣σ′′∣ evaluated on CIFAR-100 using ResNet-18 trained with DAJAT and RCT-AF ( β=1 ). Despite the increased complexity of CIFAR-100 (100 classes), the non-monotonic relationship persists, and optimal performance consistently occurs within max∣σ′′∣∈[4,10] .
Figure 7: (a) Measured normalized Hessian diagonal norm ∥diag(∇θ2L^)/p∥2 versus max∣σ′′∣ for models trained with standard (non-adversarial) training using the SGD optimizer on CIFAR-10 using ResNet-18 ( β=0,1,2 ). Here, p denotes the total number of model parameters. The plot reveals that when max∣σ′′∣ lies between 4 and 10, ∥diag(∇θ2L^)/p∥2 reaches its minimum values across all β values. When max∣σ′′∣ exceeds 10, further increases lead to marked rises in the norm, indicating sharper loss landscapes. Conversely, when max∣σ′′∣ falls below 4, further reductions in curvature also lead to increased norm, suggesting that insufficient curvature can similarly sharpen the landscape. (b) Clean accuracy versus max∣σ′′∣ for the same set of models shown in (a) (standard training, ResNet-18 on CIFAR-10). When max∣σ′′∣ falls below 4, further reductions in curvature lead to a clear decrease in clean accuracy, demonstrating that insufficient curvature limits model capacity due to weak rectification and near-linear behavior. Together, these panels—measured from the same models under identical conditions—illustrate the dual effects of activation curvature: insufficient curvature impairs expressivity, while excessive curvature sharpens the loss landscape.
Activation Function
Standard Accuracy
Robust Accuracy
max∣σ′′∣
ReLU
85.23
51.37
∞
Leaky ReLU
84.52
51.24
∞
ELU
78.39
43.11
1.0
GELU
84.88
51.69
0.798
Swish
82.53
48.08
0.5
Mish
82.63
48.75
0.362
Table 1: Comparison of activation functions in adversarial training on CIFAR-10 with ResNet-18. All models are trained with DAJAT and evaluated using AutoAttack. RCT-AF uses optimal parameters: max∣σ′′∣=7 . Note: Leaky ReLU uses a negative slope of 0.01.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Activation Function
GPU Memory (GB)
Training Time (min)
ReLU
0.73
5.88
LeakyReLU
0.73
5.92
ELU
0.73
5.83
SELU
0.73
5.88
GELU
0.99
7.92
Mish
1.25
6.98
Appendix
Table 2: Computational overhead comparison of activation functions under identical training settings (ResNet-18, CIFAR-10, batch size 128, 20 epochs). GPU memory usage and training time are measured on an NVIDIA 2080Ti.
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
Deep neural networks (DNNs) are highly vulnerable to adversarial attacks. Ideally, a robust model should perform well on both perturbed training data and unseen perturbed test data. While DNNs can fit perturbed training data, generalizing to perturbed test data remains a significant challenge. This motivates the study of generalization guarantees from a learning theory perspective. This paper focuses on adversarial Rademacher complexity (ARC), first introduced by Khim and Loh (2018) and Yin et al. (2019). Their work primarily addressed linear functions and highlighted the open question of how to bound ARC for neural networks. Since then, several attempts have been made, with the latest results applying ARC only to two-layer neural networks. The main challenge arises from the dynamic nature and unknown closed-form solution of adversarial examples. In this paper, we resolve this issue and provide the first bound on ARC for deep neural networks. Our bound is qualitatively comparable to Rademacher complexity bounds in similar settings. The key ingredient is a new concept we introduce, termed intermediate adversarial examples, along with a framework for calculating the covering number that is compatible with them. Finally, we present experiments to analyze poor robust generalization, demonstrating that the weight norm is a crucial factor influencing the robust generalization gap.
Jiancong Xiao, Yanbo Fan, Ruoyu Sun +1
The Chinese University of Hong Kong, Shenzhen Shenzhen, China · Nanjing University Suzhou, China
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.
Gaojie Jin, Xinping Yi, Wei Huang +2
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