TL;DR
Why does early stopping improve the transferability of adversarial examples? This paper refutes the popular belief that early stopped models rely on "more robust features," demonstrating instead that transferability peaks when learning rate decay causes loss sharpness to plunge. Leveraging this insight, the authors train surrogates with Sharpness-Aware Minimization (SAM) configured with unusually large perturbation radii ($\rho$), drastically outperforming early stopping and rivaling adversarial training at a fraction of the compute cost.
What Problem Does This Paper Address?
In transfer-based black-box attacks, an adversary crafts adversarial examples against a local "surrogate" model hoping they fool unknown target models. Prior work established an intriguing empirical trick: early stopping the surrogate's training significantly boosts adversarial transferability compared to using a fully converged model.
The standard explanation was the Robust vs. Non-Robust Features (RF/NRF) hypothesis—the intuition that neural networks learn generalizable, robust features early on and brittle, non-transferable features later. However, this paper investigates whether that explanation holds up under scrutiny and asks what underlying optimization mechanics actually dictate surrogate transferability.
Methods
- Empirical Deconstruction of the Feature Hypothesis: The authors train surrogates and evaluate targets on synthetic datasets designed to isolate robust vs. non-robust features.
- Loss Surface Dynamics Analysis: Using Hessian metrics (the top eigenvalue for worst-case directional sharpness and the Hessian trace for average sharpness), they track weight-space curvature and optimization behaviors (using the gradient-step alignment metric $\alpha$) across training epochs and learning rate (LR) decay events.
- Sharpness Minimization for Surrogates: The authors evaluate flat-minima optimizers—principally SAM (Sharpness-Aware Minimization) and its variants (GSAM, ASAM, AGSAM, LookSAM, and SWA)—to optimize surrogates directly for weight-space flatness.
- Large-Neighborhood SAM (l-SAM): Crucially, while standard SAM uses a perturbation radius $\rho \approx 0.05$ to boost clean validation accuracy, the authors discover that transferability demands much larger neighborhoods (e.g., $\rho = 0.3$–$0.4$ for SAM, $\rho = 4.0$ for adaptive variant AGSAM), actively preventing the optimizer from settling into narrow, sharp minima.
Datasets
- CIFAR-10 and ImageNet-1k: Standard computer vision benchmarks for natural evaluation and adversarial attacks across diverse architectures (ResNets, DenseNets, VGGs, Inception, ViT, and Swin Transformers).
- Robust ($D_R$) and Non-Robust ($D_{NR}$, $D_{rand}$, $D_{det}$) Datasets: Modified CIFAR-10 datasets from Ilyas et al. (2019) used specifically to isolate whether early stopping benefits robust or non-robust feature learning.
Key Insights and Ideas
- The Feature Hypothesis is Incomplete: Early stopping boosts transferability even when training surrogates solely on non-robust data ($D_{NR}$) or attacking targets trained only on non-robust features. The benefit does not arise from trading off non-robust features for robust ones.
- The LR Decay Connection: Transferability does not steadily decline; it spikes sharply immediately after learning rate step decays. Before decay, the optimizer bounces across the loss valley ("crossing the valley"). Once the step size drops, the trajectory moves down into the valley, and loss sharpness precipitously falls.
- Late-Stage Overfitting into Sharp Holes: As standard SGD continues post-decay, it crawls into deep, sharp local minima. These sharp minima yield representations overly tailored to the surrogate, degrading transferability.
- Flatness $\neq$ Natural Generalization: Unlike traditional SAM tuning—which optimizes for clean test accuracy—transferability benefits specifically from very large flat neighborhoods ($\text{l-SAM}$). In fact, this heavy regularization often slightly degrades clean classification accuracy while dramatically enhancing adversarial transferability. Standard regularizers like weight decay do not replicate this effect.
Key Results
- Beating Early Stopping: On CIFAR-10 ($\epsilon = 4/255$), early stopped SGD achieves $70.2\%$ transfer success against 10 target models (up from $56.1\%$ for fully trained SGD). Surrogates trained with l-SAM achieve $85.5\%$, and l-AGSAM achieves $85.7\%$.
- Competitive with Adversarial Training at Lower Cost: On ImageNet ($\epsilon = 4/255$), l-AGSAM achieves $53.1\%$ transfer success versus $49.7\%$ for Slight Adversarial Training (SAT), while cutting training overhead in half ($\times 2$ vs. $\times 4$ forward-backward passes).
- Compute-Efficient Alternative: l-LookSAM (which calculates the sharpness perturbation only once every 5 iterations) achieves $77.5\%$ on CIFAR-10 and $33.2\%$ on ImageNet with only a $\approx 1.22\times$ computational overhead over standard SGD.
- Strong Complementarity: Combining an l-SAM base model with existing transferability techniques (e.g., Diverse Inputs [DI], Variance Tuning [VT], Momentum [MI], Ghost Networks [GN]) improves attack success across the board—surpassing standard SGD surrogates by up to $35.5$ percentage points.
Limitations and Future Work
- Trade-Off with Clean Accuracy: Extremely large $\rho$ values intentionally over-regularize the model, causing a minor drop in clean test accuracy (e.g., ResNet-18 ImageNet top-1 drops from $69.8\%$ to $67.9\%$).
- Friction with Certain Model-Augmentation Methods: When combining l-SAM with LGV (which explores trajectories using SGD with high learning rates), transferability slightly degraded on a few targets, likely due to a clash between SGD trajectory sampling and SAM's flat basin. Adapting LGV-style collection directly to SAM remains open.
- Vision Transformers Remain Challenging: While transferability across CNN architectures scaled significantly, attacks transferring from CNN surrogates to Vision Transformers (ViT, Swin) remained relatively low across all methods.
Summary updated