Data-Driven Lipschitz Continuity: A Low-Cost Approach to Improve Adversarial RobustnessData-Driven Lipschitz Continuity: A Cost-Effective Approach to Improve Adversarial Robustness
The authors propose a data-driven forged function that can be inserted into adversarially trained models with a single scan of the data; the authors state it achieves top results on RobustBench's CIFAR10/100 and ImageNet.
Defense-side paper. The evaluation uses a white-box attack setting: the attacker has full access to the victim model and uses AutoAttack (L∞ norm, ϵ=8/255 for CIFAR10/100, ϵ=4/255 for ImageNet) to generate adversarial examples; the victim systems are adversarially trained image classification models on RobustBench.
- Adversarial training improves DNN robustness, but methods that introduce external or generated data have high training costs (the authors state the dataset needs to be more than 100 times larger), making them hard to deploy in practice.
- Based on Lipschitz continuity, the authors propose a forged function: values below a threshold in the input to each linear layer are compressed according to a scaling function; the threshold is determined by a single scan of the training data, requiring no gradient computation or fine-tuning, and it can be inserted directly into already-trained models.
- Combined with 5 adversarially trained models on CIFAR10/100, AutoAttack robust accuracy improves by about 1–2 percentage points or more; after combination with [43] (WRN-70-16) and [32] (Swin-L), it achieves top results on three RobustBench datasets (as claimed by the authors).
- The authors state that future directions include adapting to more activation functions, architectures, and larger-scale datasets, as well as explaining the theoretical basis for the standard accuracy improvement. The experiments only cover image classification under the L∞ threat model, and the cr candidates are only the three levels 2^-8, 2^-7, 2^-6.
- Evaluated models
- RST-AWPDefEATLTDAWPTRADESEffAugDKLD[43] (WRN-70-16)[32] (Swin-L)
- Benchmarks
- CIFAR10CIFAR100ImageNetRobustBench
- Metrics
- accnataccAAcertified robustness (randomized smoothing)
The researchers propose a low-cost method based on data-driven Lipschitz continuity that improves the adversarial robustness of deep neural networks without requiring additional generated data. The method requires only a single pass over the dataset and no gradient estimation to achieve robustness comparable to models trained with large amounts of supplementary data, and it can be seamlessly combined with existing adversarial training frameworks. Experiments show that it maintains or improves the defensive capability of robust neural networks while reducing computational overhead.
Paper analysis
What problem does this paper attempt to solve?
How to improve the adversarial robustness of adversarially trained models at very low additional computational cost, without relying on additional generated data.
Core problem: Adversarial training and its enhanced methods (introducing external data or generated data) are too computationally expensive, hindering the practical deployment of robust DNNs; the authors attempt to achieve comparable robustness with low-cost means.
- Problem setting and importance: After DNNs enter sensitive applications, adversarial examples (small input perturbations causing incorrect predictions) become a major threat; the authors state that adversarial training is effective, but its training cost is about ten times that of standard training, and no certified model has been commercially deployed.
- Shortcomings of existing methods: The authors state that methods that improve robustness by supplementing data through external datasets or generative models require more than 100 times the data volume of the original dataset, with computational demands rising by several orders of magnitude; certified training and Lipschitz-constrained methods have scalability issues.
- Core observation and hypothesis: The authors consider that the largest singular value is only a loose upper bound of the Lipschitz constant, because adversarial examples only lie within a small-radius ϵ-ball rather than the entire input space; therefore, remapping the input domain of the linear layer to a restricted range can yield a bounded Lipschitz constant and improve robustness when specific conditions are satisfied.
- Method proposed in the paper: A data-driven forged function inserted into the linear layers of an already trained model, with the threshold determined by a single scan of the dataset, requiring no gradient estimation, retraining, or fine-tuning; the authors claim it can be directly combined with existing adversarially trained models.
- Threat model:
- Attacker goal: Inject small perturbations into the input so that the victim DNN outputs incorrect predictions with high confidence.
- Attacker knowledge: The evaluation uses a white-box setting, where the attacker has full access to victim model information.
- Attacker capability: Uses AutoAttack with an L∞ norm constraint (ϵ=8/255 for CIFAR10/100, ϵ=4/255 for ImageNet).
- Victim system: Adversarially trained image classification models on RobustBench (CIFAR10, CIFAR100, ImageNet).
What related research exists?
Related work is divided into three groups: adversarial attacks, adversarial training and its cost reduction, and Lipschitz methods; baselines are adversarially trained models on RobustBench.
Adversarial attacks
- PGD [34] and AutoAttack [17]: white-box attacks that use the gradient direction to generate adversarial examples; AutoAttack is the ensemble attack used for evaluation in this paper.
- Square Attack [2] and ZO-NGD [54]: black-box attacks that generate adversarial examples by querying model output predictions.
- Transfer attacks [13, 41]: generating adversarial examples on architecturally similar models and transferring them to other models.
Adversarial training and cost reduction
- Adversarial training [34]: generating adversarial examples online during training and optimizing the weights; the authors state its training cost is generally about ten times that of standard training.
- Fast adversarial training [9, 53]: pursuing higher robustness under a limited budget; the paper notes that such methods may fail to generate sufficient adversarial examples, leading to catastrophic overfitting [39].
- Additional data augmentation [8, 24, 43]: introducing data from other datasets or generative models to improve robustness; the authors state such methods require more than 100 times the data of the original dataset and have high computational costs.
- Data pruning [11, 52]: removing some adversarial examples without losing robust accuracy to reduce training cost.
Lipschitz and certification methods
- Certified training [23, 26, 35, 36]: providing theoretical upper bounds on prediction error; the paper notes that such methods often face scalability issues.
- Lipschitz-constrained methods [56] and spectral norm regularization [21, 50]: constraining the Lipschitz constant through regularization or complex objectives; the authors consider it difficult to balance robustness and performance, whereas this paper does not retrain and only remaps the input domain.
Baselines and benchmarks
- Baseline methods: RST-AWP [45], DefEAT [11], LTD [10], AWP [45], TRADES [51] (CIFAR10); EffAug [1], DKLD [19], DefEAT, LTD, AWP (CIFAR100); and RobustBench-listed models such as [43] (WRN-70-16) and [32] (Swin-L).
- Benchmark: the RobustBench [18] leaderboard, with datasets CIFAR10, CIFAR100, and ImageNet.
The authors position this paper as follows: unlike Lipschitz/adversarial training approaches that constrain the network or add data during training, this paper remaps the input domain in a data-driven way before inference, and can be stacked on existing models at almost no additional cost.
How does the paper address this problem?
A data-driven forged function is used to compress the input of the linear layer into a restricted range; a single scan of data determines the threshold, with no need for gradients or fine-tuning.
Overall idea: Based on Lipschitz continuity theory, a forged function is inserted before each layer's linear transformation to compress small-magnitude inputs, thereby shrinking the reachable space of adversarial examples and lowering the upper bound of the Lipschitz constant; the threshold is determined by a single scan of the training data.
Problem Formulation
- For a composite network F(x) = (f1 ∘ f2 ∘ ⋯ ∘ fL)(x), the upper bound of the overall Lipschitz constant is the product of the per-layer constants kF ≤ ∏i=1L ki; reducing the output difference of each layer reduces the overall upper bound.
- Under the L2 norm, minimizing the Lipschitz constant of a linear layer is equivalent to minimizing the largest singular value σmax(W) of the weight matrix; the authors consider this upper bound loose because adversarial examples only lie within a small-radius ϵ-ball.
Forged Function Design
- For the i-th layer, define the forge function: when |x| ≤ cth_i, output f_masked(x)·x, otherwise output as is; f_masked is a scaling function taking values in [0,1], cth_i is the threshold for that layer, and when cth_i=0 it degenerates to the original function.
- Scaling function candidates: step function (the authors note that discontinuity leads to unreliable gradients and may expose to BPDA attacks [3]), smooth function 1/(1+exp(−ax+b)) (a controls the slope, b determines the position of the transition region), piecewise linear function (d ∈ [0,1], linear within the transition region).
- Insertion positions (Figure 1): In ResNet, placed before the convolutional layers of each residual block; in vision transformers, adapted into the MLP layers; the Q/K/V linear projections of attention are not inserted, which the authors state is because the implementation is more complex.
Theoretical Basis
- Using the Gershgorin Circle Theorem (Theorem 1): the eigenvalues of a matrix lie within disks centered at the diagonal elements with radii equal to the sum of the absolute values of the off-diagonal elements.
- Lemma 2: Setting the first h elements of the input vector to zero is equivalent to setting the corresponding columns of A = W†W to zero to obtain A′, in which case the centers of the first h disks move toward zero and the radii of all disks shrink, so λmax(A′) ≤ λmax(A); the authors accordingly claim that robustness can be improved when condition (13) is satisfied. The proof holds separately for each input, and A′ need not be explicitly computed at inference time.
Data-Driven Threshold Algorithm
- Threshold formula: cth_i = cr · max(F1→i(x)), where x is taken from all or a subset of the training set S; each layer has an independent cth_i but shares the hyperparameter cr ∈ [0,1].
- Algorithm 1: In tracking mode, update the maximum value b of each layer without modifying the input; in inference mode, freeze b and mask the input element-wise according to (7). The default is inference mode, and when b and cr are 0 it degenerates to the identity function.
- Implementation points: The threshold only requires scanning S once in tracking mode, with no gradient computation; the authors claim it usually takes only a few minutes on a consumer-grade GPU. Selection of cr: first find the value with the highest standard accuracy, then select candidates in a small range around it; the authors suggest candidates 2^-8, 2^-7, 2^-6 (at cr=2^-5, the standard accuracy of all models drops substantially, losing evaluation significance).
What experiments did the paper conduct?
Evaluating AutoAttack robustness by stacking on 9 adversarially trained models across the three RobustBench datasets, along with cost, gradient masking, and ablation analyses.
Experimental Setup
- Models tested: On CIFAR10, RST-AWP, DefEAT, LTD, AWP, TRADES (all WRN-34-10 + ReLU except RST-AWP, which uses WRN-28-10); on CIFAR100, EffAug, DKLD, DefEAT, LTD, AWP; also tested are the top RobustBench combinations [43] (WRN-70-16 + SiLU, CIFAR10/100) and [32] (Swin-L + GELU, ImageNet). Baseline models are all taken from the public RobustBench repository.
- Datasets: CIFAR10, CIFAR100, ImageNet; thresholds are determined using the full CIFAR10/100 training sets (no data augmentation), and for ImageNet approximately 5,000 training images are randomly sampled.
- Attack and metrics: In the white-box setting, AutoAttack is used with the L∞ norm, ϵ=8/255 for CIFAR10/100 and ϵ=4/255 for ImageNet; the metrics are standard accuracy accnat and AutoAttack robust accuracy accAA.
- Hyperparameters: cr candidates are 2^-8, 2^-7, 2^-6; in the main experiments (Table 1), cr is set to 2^-7.
- Number of repetitions: Not reported in the paper.
Main Results
Table 1 (cr=2^-7, AutoAttack, according to Table 1a/1b):
Swipe horizontally to read the table
Model Dataset accnat original accnat +Ours accAA original accAA +Ours RST-AWP CIFAR10 88.25 89.50 60.04 62.76 DefEAT CIFAR10 86.54 87.40 57.30 59.55 LTD CIFAR10 85.21 85.98 56.94 59.25 AWP CIFAR10 85.36 86.19 56.17 57.85 TRADES CIFAR10 85.34 85.78 52.86 53.80 EffAug CIFAR100 68.75 69.14 31.85 32.57 DKLD CIFAR100 64.08 64.26 31.65 32.58 DefEAT CIFAR100 64.32 66.42 31.13 32.11 LTD CIFAR100 64.07 64.29 30.59 31.95 AWP CIFAR100 60.38 60.63 28.86 29.72 - The authors claim that on CIFAR10, the robust accuracy of RST-AWP, DefEAT, and LTD improves by more than 2 percentage points, and the other models by about 1–1.5 percentage points; on CIFAR100, each model improves by at least 1 percentage point.
- The authors note that standard accuracy improves for all models on both datasets, and hypothesize that the reason is that the output range of ReLU is close to that of this function; the paper states that this cannot be directly explained by Lemma 2.
- Cost comparison (as claimed by the authors): AWP + WRN-34-10 trains for about 20 hours on a V100, methods using larger models and additional data exceed 200 hours, whereas scanning the full CIFAR10/100 training set or part of the ImageNet training set takes less than 5 minutes on a V100; hyperparameter search takes about 1–3 hours.
Top RobustBench Combinations
According to Table 2a/2b/2c:
Swipe horizontally to read the table
Dataset Method Architecture accnat accAA CIFAR10 [43]+Ours WRN-70-16 93.20 71.70 CIFAR10 [37] (1st place) WRN-70-16 93.27 71.07 CIFAR100 [43]+Ours WRN-70-16 74.97 44.00 CIFAR100 [43] (1st place) WRN-70-16 75.22 42.67 ImageNet [32]+Ours Swin-L 78.88 60.04 ImageNet [32] (1st place) Swin-L 78.92 59.56 - The authors claim that after combination, all three datasets surpass the original top place, with robust accuracy improving by at least 0.9%, but standard accuracy slightly decreasing; the authors speculate that the granularity of the newly added hyperparameter is insufficient to optimize all layers.
- The authors claim that the method was originally designed for ReLU, and these results show that it also applies to SiLU, GELU, and transformer architectures.
Gradient Masking Verification
- Checks: Following [3, 7], 5 rules are listed (white-box should be stronger than black-box, iterative attacks should be stronger than single-step, robust accuracy should gradually decrease to zero as ϵ increases, should be able to defend against adversarial examples generated from the original model, randomized smoothing certified robustness).
- Results: Table 9 shows that for adversarial examples generated from the original model, the robust accuracy of all model combinations is not lower than that of the original model; Table 10/11 show that FGSM (single-step) robust accuracy is always higher than PGD (iterative), and under PGD robust accuracy gradually decreases to 0 as ϵ increases; Figure 2 shows that randomized smoothing certified robustness slightly improves except for AWP.
- Authors' interpretation: They consider that the method does not exhibit gradient masking on CIFAR10/100 across different hyperparameters and models; for the AWP exception, the authors state that the input distribution of randomized smoothing may differ from the observed data, causing robustness fluctuations.
Other Ablations and Analyses
- cr selection (Table 3/4/5): With cr=2^-8, both standard and robust accuracy are relatively good; with cr=2^-6, robust accuracy is higher but standard accuracy may be lower than the original; the authors consider 2^-7 to balance the two, and choose 2^-6 when robustness is emphasized. The authors report two counterexamples where standard accuracy does not monotonically decrease as cr increases for cr=2^-7 and 2^-8, and offer a guess of saddle point oscillation, stating that further evidence is still needed.
- ImageNet scan scale (Table 6): When scanning 5,000/10,000/20,000 images, accAA is 60.04/59.97/59.81 respectively, all higher than the original model's 59.56.
- CW attack (Table 7a/7b): Under the L∞ norm CW attack, the robust accuracy of each model at all three cr values is higher than Origin.
- Weight-zeroing variant (Table 8): The accAA of [32]+Ours+Weight is 59.71, higher than the original model's 59.56 but lower than the proposed method's 60.04; the authors state the reason is that the proposed method can remap at the sample granularity.
- Empirical Lipschitz analysis (Figure 3, Appendix C): The proportion of activations pruned in the FC1 layer is about 20% (except the last layer), and in the FC2 layer 30%–95%; the authors claim that after applying the method, the worst-case eigenvalue is about 95% of the original, and emphasize that a high pruning rate does not necessarily greatly reduce the empirical Lipschitz constant.
What are some points that can be further explored?
The authors list future directions such as adapting to more activation functions and architectures; the experiments only cover image classification under the L∞ threat and three cr levels.
Limitations and future directions noted by the authors
- Adapting to more components: exploring combining this remapping function with different activation functions, model architectures, or larger-scale datasets (Section 5 Conclusion).
- Explaining the standard accuracy improvement: seeking a theoretical basis for the standard accuracy improvement brought by the method (Section 5).
- More specialized function design: designing more specialized functions for different activation functions to further optimize performance (Section 4.2).
- Hyperparameter granularity: the authors conjecture that the added hyperparameter may lack sufficient granularity to effectively optimize all layers of the target model (Section 4.2).
- Combining with pruning: studying the effect of iterative or post-training pruning techniques on robustness, or combining them with this paper's method (Section 4.4 Discussion).
- Explaining the cr counterexample: at cr=2^-7 and 2^-8 standard accuracy does not decrease monotonically; the authors offer a saddle-point conjecture and state that further research and evidence are needed (Appendix A.1).
Scope of experiments
- A total of 9 adversarially trained models were tested (five on CIFAR10, five on CIFAR100, with DefEAT/LTD/AWP reused across both sets), plus the RobustBench top combinations [43] (WRN-70-16) and [32] (Swin-L), all image classification models.
- The threat model is the L∞ norm: the main evaluation uses AutoAttack (ϵ=8/255 for CIFAR10/100, ϵ=4/255 for ImageNet), with CW (L∞), FGSM, PGD, and randomized smoothing certification added in the appendix.
- Only three cr candidates were used: 2^-8, 2^-7, 2^-6; the ImageNet threshold was determined using only about 5,000–20,000 sampled images, without scanning all 1.2 million training images.
- Gradient masking validation was performed on CIFAR10/100; the full validation of Appendix B was not done on ImageNet.
- The paper does not report the number of experimental repetitions or variance, nor complete evaluation numbers for the combined models under black-box attacks (such as Square Attack) (only comparisons via the black-box sub-attacks included in AutoAttack).
Summarize the main content of the paper
The data-driven forged function is superimposed on adversarially trained models at near-zero cost, and the authors claim it achieves first place on three RobustBench datasets.
An adversarial robustness defense paper addressing the problem that adversarial training and its data augmentation methods are computationally expensive and hard to deploy.
- Method: Based on Lipschitz continuity, the authors propose a forged function, inserted before each linear layer, that compresses small-magnitude inputs according to a scaling function; the threshold is determined by a single scan of the training data (tracking mode), requiring no gradient computation, retraining, or fine-tuning. The authors state that scanning the dataset takes under 5 minutes on a V100 and hyperparameter search takes about 1–3 hours. Theoretically, using the Gershgorin circle theorem, they prove that when the condition is satisfied the upper bound on the largest eigenvalue is tightened (Lemma 2).
- Main results: At cr=2^-7, on CIFAR10 the AutoAttack robust accuracy of RST-AWP rises from 60.04% to 62.76%, DefEAT from 57.30% to 59.55%, and LTD from 56.94% to 59.25%; on CIFAR100 five models improve by at least 1 percentage point (Table 1).
- Top combinations: Combined with [43] (WRN-70-16), accAA reaches 71.70% on CIFAR10 and 44.00% on CIFAR100; combined with [32] (Swin-L), it reaches 60.04% on ImageNet; the authors state these all exceed the previous top entries on RobustBench (Table 2).
- Validation: Checks including FGSM/PGD/ϵ sweeps, transfer of adversarial examples from the original model, and randomized smoothing certification did not show gradient masking (the certified robustness of AWP is an exception, which the authors attribute to distribution differences).
- Authors' conclusion: The method can be seamlessly combined with various adversarial training techniques, achieving robustness comparable to or better than models using large amounts of supplementary data with a model that uses no additional generated data, pointing to a direction for reducing the cost of training robust models; future work includes adapting to more activation functions and architectures and explaining the theoretical basis for the standard accuracy improvement.
Related papers
Show 3 more papers
- A Note on Implementation Errors in Recent Adaptive Attacks Against Multi-Resolution Self-EnsemblesAnalysis / interpretabilityarXiv