Adversarial robustness through local linearizationAdversarial Robustness through Local Linearization
The authors propose Local Linearity Regularization (LLR) to suppress gradient obfuscation, and report 47% adversarial accuracy under ImageNet 4/255 white-box attacks with a 5× training speedup.
The defender trains a classifier network robust to norm-bounded adversarial perturbations, focusing on l∞ perturbations with p=∞ (ε=8/255 for CIFAR-10, 4/255 and 16/255 for ImageNet). Evaluation uses untargeted, strong, white-box attacks (Untargeted, Multi-Targeted, Random-Targeted), with the attacker using gradient-based optimization (Adam, multiple random restarts) to maximize the loss.
- Adversarial training is costly, and models trained with weak attacks (few PGD steps) fail under strong attacks; the authors attribute this to gradient masking: the loss surface is highly nonlinear near the training point, making it hard for gradient-based attacks to find adversarial examples that still exist.
- Proposes Local Linearity Regularization (LLR): penalizes the deviation γ(ε,x) of the loss function from its first-order Taylor expansion in the neighborhood of the training points, as well as the gradient term, encouraging the loss surface to be locally linear; the inner loop requires only 2 PGD steps (ImageNet 4/255).
- The authors report: ImageNet ResNet-152 under ε=4/255 white-box Untargeted attack, LLR reaches 47% adversarial accuracy (ADV 39.70%), training 7 hours vs 36 hours; CIFAR-10 under the strongest Multi-Targeted attack, LLR 52.81%; LLR with 2-step PGD still has 44.50%, whereas 2-step PGD adversarial training is 0%.
- The authors note that at ε=16/255 all methods have adversarial accuracy below 8%, and LLR's nominal accuracy drops to 51.20%; the authors consider the perturbation at this radius already perceptible to the naked eye; TRADES failed to reproduce competitive results on ImageNet 4/255 and was not included as a baseline.
- Evaluated models
- LLR
- Benchmarks
- CIFAR-10ImageNet
- Metrics
- adversarial accuracynominal accuracyattack success ratelocal linearity measure γ(ε, x)
Researchers propose a regularization term that encourages the loss to remain linear near the training data, used to penalize gradient obfuscation, and train deep neural networks robust to bounded adversarial perturbations. Extensive experiments on CIFAR-10 and ImageNet show that models trained with this regularization term avoid gradient obfuscation and train significantly faster than adversarial training. The authors claim that on ImageNet, under l∞ untargeted strong white-box attacks with radius 4/255, this method achieves 47% adversarial accuracy, exceeding the best level at the time, and under the 8/255 perturbation setting matches the best result on CIFAR-10.
Paper analysis
What problem does this paper attempt to solve?
Adversarial training is costly, and training with weak attacks leads to gradient masking; the authors propose local linear regularization to address both at once.
Core question: how to train classification networks that are truly robust under strong white-box attacks and do not rely on gradient obfuscation, at a cost far below adversarial training.
- Problem setting: The authors call adversarial training the empirically best robust training method, but each mini-batch requires multi-step gradient optimization to solve the inner maximization, and the cost grows with model size and input dimension; effective adversarial training on ImageNet is expensive to the point of being nearly infeasible.
- Shortcomings of existing methods: When trained with cheaper weak attacks (fewer PGD steps), the model is robust only to weak attacks and fails under strong attacks; the authors attribute this to gradient obfuscation—the loss surface is highly nonlinear near the training samples, making gradient-based attacks hard to succeed, even though adversarial examples still exist (Figure 1).
- Core observation: The authors empirically find that during adversarial training, the more PGD steps used for the inner maximization, the smaller the local linearity measure γ(ε,x) (on the order of about 10 at 1–2 steps, and about 0.1 at 4 or more steps, Figure 2); if the loss surface is close to linear near the training points, gradient obfuscation cannot occur.
- What the paper proposes: Local Linearity Regularization (LLR), which penalizes the deviation of the loss from its first-order Taylor expansion, and gives a theoretical upper bound (Proposition 4.1); large-scale consistent evaluations are conducted on CIFAR-10 and ImageNet.
- Threat model:
- Defense goal: train classifiers robust to l∞-norm-bounded perturbations (CIFAR-10 ε=8/255, ImageNet ε=4/255 and 16/255).
- Attacker knowledge and capability: the evaluation uses untargeted, strong, white-box attacks, with gradient-based optimization (Adam) plus multiple random restarts.
- Victim systems: Wide-ResNet (CIFAR-10) and ResNet-152 (ImageNet) classification networks.
- Success criterion: an attack succeeds if it finds a perturbation within B(ε) that changes the predicted class; the defender is measured by test accuracy after attack (adversarial accuracy).
What related research exists?
Related work is divided into four groups: adversarial training and its cost, regularization-based defenses, gradient masking and attack evaluation, and other defense ideas.
Adversarial training and its variants
- Madry et al. [16], Kurakin et al. [14]—adversarial training, which the authors call the empirically best robust training algorithm, but the computational cost of the inner maximization (PGD, Eq 4) grows linearly with the number of steps, and is the source of the cost this paper aims to reduce.
- Zhang et al. (TRADES) [30]—explicitly trades off robustness and accuracy via regularization; a paper footnote notes that the 55% reported by TRADES is against a weaker attack, and under this paper's strongest attack it is 52.5%.
- Ding et al. [7]—adaptively increases the perturbation radius to find the minimal perturbation that changes the label.
Regularization and curvature-based methods
- Moosavi-Dezfooli et al. (CURE) [19]—points out that adversarial training reduces the curvature of the loss with respect to the input, and proposes an algorithm that simulates this effect at lower cost; the authors say this paper is closely related to it.
- Simard et al. [23]—earlier work using gradient information for regularization.
Attack evaluation and gradient obfuscation
- Uesato et al. [27], Athalye et al. [1], Carlini & Wagner [4]—point out the danger of evaluating with weak attacks and the false sense of security caused by gradient obfuscation; Papernot et al. [20] also observed the highly curled, nonlinear phenomenon of the loss surface.
- Szegedy et al. [25]—first pointed out the vulnerability of neural networks to imperceptible adversarial perturbations.
Other defense ideas
- Xie et al. (DENOISE) [28]—improves ImageNet robustness through an architectural change of feature denoising, and is one of this paper's ImageNet baselines.
- Distillation [21], thermometer encoding [2], random activation pruning [6], PixelDefend [24], etc. are mentioned together as "many proposed methods" without individual discussion.
Baselines and benchmarks: the comparison baselines are ADV [16], TRADES [30], CURE [19] (CIFAR-10, reproduced by the authors) and ADV, DENOISE [28] (ImageNet); the datasets are CIFAR-10 and ImageNet. The authors position this paper as: following the same regularization line as CURE, but directly enforcing that the loss is well approximated by its linear Taylor expansion, and re-evaluating each method at scale under consistent strong white-box attacks.
How does the paper address this problem?
Uses the local linearity measure γ(ε,x) to construct a regularization term that penalizes nonlinearity of the loss surface, requiring only very few inner PGD steps.
Overall idea: since strong adversarial training makes the loss surface approach linearity near the training points (the empirical observation in Figure 2), directly use a Local Linearity Regularizer (LLR) to penalize nonlinearity, thereby avoiding gradient obfuscation, so that weak attacks can reliably evaluate and the number of steps needed for the inner optimization decreases accordingly.
Local linearity measure
- For a perturbation δ∈B(ε), define g(δ; x) = |ℓ(x+δ) − ℓ(x) − δT ∇x ℓ(x)|, i.e., the absolute deviation of the loss from its first-order Taylor expansion.
- Define the local linearity measure γ(ϵ, x) = maxδ ∈ B(ϵ) g(δ; x), which measures the degree of linearity of the loss surface within the B(ε) neighborhood; 50-step PGD (Adam, step size 0.1) is used to approximately solve this maximum.
Theoretical basis
- Proposition 4.1: for a once-differentiable loss, |ℓ(x+δ) − ℓ(x)| ≤ |δT ∇x ℓ(x)| + γ(ϵ, x), i.e., the adversarial loss is jointly upper-bounded by the gradient term and the local linearity measure (proof in Appendix B).
- Appendix C further upper-bounds the gradient term also by γ(ε,x) under the GGN quadratic approximation for squared-error and softmax cross-entropy losses (Propositions C.1, C.2); on this basis the authors argue that minimizing only γ(ε,x) and the nominal loss is theoretically sufficient.
Training objective and algorithm
- Objective (Eq 8): L(D) = ED[ℓ(x) + λγ(ϵ,x) + μ|δLLRT ∇x ℓ(x)|], where δ_LLR = argmax g(δ;x), and λ, µ are hyperparameters.
- The inner loop uses gradient descent to find δ_LLR (pseudocode in Appendix E: δ initialized uniformly in [−ε,ε], M projected update steps); the authors state that the number of steps required is far fewer than for adversarial training (only 2 PGD steps for ImageNet 4/255).
- Training details: softplus activation (to ensure the loss is smooth); Batch Normalization uses local batch statistics at the nominal point; the perturbation radius is slowly increased from 0 to the target value early in training (15 epochs for CIFAR-10, 20 epochs for ImageNet 4/255).
- Hyperparameters: on CIFAR-10, λ=4, µ=3, nominal weight 2, batch 256, with 10/15-step PGD for WRN-28-8/40-8 respectively; on ImageNet 4/255, λ=3, µ=6, nominal weight 3, batch 512, 2-step PGD; on 16/255, µ=9, 10-step PGD.
Evaluation protocol
- Three attack losses (Table 1): Untargeted, Multi-Targeted (iterate over all classes and take the maximum logit difference; success if any succeeds), Random-Targeted; the metrics are adversarial accuracy and attack success rate respectively.
- Attack optimization uses Adam rather than the gradient sign (which the authors call empirically stronger); Multi-Targeted runs 200 steps with step size 0.1, Untargeted/Random-Targeted use step-size decay 0.1→0.01→0.001 for 200 steps in total; 20 random restarts, and the attack is considered successful if any restart succeeds.
What experiments did the paper conduct?
Comparing ADV/TRADES/CURE/DENOISE on CIFAR-10 and ImageNet, LLR achieves the highest adversarial accuracy under the strongest attack.
Experimental setup
- Models evaluated: CIFAR-10 uses Wide-ResNet-28-8 and Wide-ResNet-40-8 (ε=8/255), plus Wide-ResNet-28-10 for the PGD step analysis (Table 4); ImageNet uses ResNet-152 (ε=4/255 and 16/255).
- Baselines: ADV [16], TRADES [30], CURE [19] (CIFAR-10, reproduced by the authors, softplus activation denoted (S), released ReLU models denoted (R)); for ImageNet 4/255, ADV and DENOISE [28] reproduced by the authors; for 16/255, the published ADV and DENOISE from the literature.
- Datasets and scale: CIFAR-10 is evaluated on the full 10K test set; ImageNet is evaluated only on the first 1K images of the test set due to compute limits.
- Metrics: nominal accuracy, adversarial accuracy (after Untargeted/Multi-Targeted attacks), Random-Targeted attack success rate; FGSM-20 (weak attack) is also reported for reference.
- Attack configuration: Adam optimization, 20 random restarts, step-size decay (Appendix F.1); Multi-Targeted is the strongest attack, and was not run on ImageNet because it requires iterating over 1000 classes and takes several days on 50 GPUs.
- Number of repetitions: the paper does not report the number of repetitions or variance for training or evaluation.
Main results
According to Table 2 (CIFAR-10, ε=8/255) and Table 3 (ImageNet, ResNet-152):
Swipe horizontally to read the table
Model/Method Setting Nominal Adversarial accuracy under strongest attack WRN-28-8 + LLR(S) CIFAR-10, Multi-Targeted 86.83% 51.13% WRN-28-8 + ADV(S) CIFAR-10, Multi-Targeted 85.11% 48.79% WRN-28-8 + TRADES(S) CIFAR-10, Multi-Targeted 87.40% 49.48% WRN-40-8 + LLR(S) CIFAR-10, Multi-Targeted 86.28% 52.81% WRN-40-8 + ADV(S) CIFAR-10, Multi-Targeted 85.27% 49.79% WRN-40-8 + TRADES(S) CIFAR-10, Multi-Targeted 88.11% 50.53% ResNet-152 + LLR ImageNet 4/255, Untargeted 72.70% 47.00% ResNet-152 + ADV ImageNet 4/255, Untargeted 69.20% 39.70% - The authors state that LLR achieves the best CIFAR-10 result of 52.81% under the strongest attack (Multi-Targeted), and reaches 47% on ImageNet 4/255, 7.30% higher than DENOISE and ADV, and call both new state of the art.
- The authors point out that Multi-Targeted consistently gives the lowest adversarial accuracy, and that ADV differs between this attack and Untargeted by 49.79% vs 55.26%; the authors believe this suggests some degree of obfuscation may exist in adversarial training.
- At 16/255, all methods have Untargeted adversarial accuracy below 8% (LLR 6.10%, ADV 6.30%, DENOISE 7.50%), and LLR's nominal accuracy drops to 51.20%; the authors conjecture that this radius is too large for the robustness problem, and the perturbations are already perceptible to the naked eye (Figure 8).
Training speed
- For ImageNet 4/255 on 128 TPUv3 cores, LLR trains for 110 epochs in 7 hours, versus 36 hours for ADV, which the authors call a 5× speedup; LLR uses only 2 inner PGD steps, versus 30 for ADV.
Accuracy degradation under weak vs strong attacks
- Figure 3a (CIFAR-10): when the attack is strengthened from Untargeted to Multi-Targeted, LLR drops from 53.32% to 51.14% (-2.18%), and ADV drops from 54.43% to 48.79% (-5.64%); the authors state that LLR degrades more gradually.
- Figure 3b (ImageNet 4/255): as the attack strengthens, LLR stays at 47.20%, 7.5% higher than ADV (39.70%).
- The authors' explanation: LLR explicitly linearizes the loss surface, so weak attacks can accurately predict performance under strong attacks.
Resistance to gradient obfuscation
- Table 6 (WRN-28-8, ε=8/255): when trained with only 1–2 PGD steps, ADV-1/ADV-2 have 0.00% adversarial accuracy under the strongest attack, LLR-2 reaches 44.50% (Untargeted 46.47%), and LLR-1 also has 1.60%.
- Figure 4 shows that the loss surfaces of ADV-1/ADV-2 are jagged, while those of LLR-1/LLR-2 are smooth; the histograms in Figure 7 show that the γ(ε,x) distribution of LLR-2 is similar to that of 20-step PGD adversarial training, while ADV-2 has higher γ values.
- In Figure 6, the adversarial perturbations of ADV-2 resemble random noise, which the authors say is often a sign of gradient obfuscation.
Other ablations and analyses
- Removing the gradient term µ|δ_LLR^T ∇ℓ(x)| (Table 5): CIFAR-10 Multi-Targeted drops from 51.13% to 49.38%, and ImageNet 4/255 Untargeted drops from 47.00% to 41.30%.
- PGD step sweep (Table 4, WRN-28-10): with 1–2 steps of adversarial training, adversarial accuracy is 0.0%, and from 4 steps on it is about 45.91%–46.14%.
- Published TRADES (WRN-34-10, main-text footnote): 52.58% under Multi-Targeted; under the weak DeepFool attack, LLR(S) 65.87%, ADV(S) 64.29%.
What are some points that can be further explored?
The authors note that the 16/255 radius is too large and that TRADES was not successfully reproduced on ImageNet; the experiments cover only two image datasets.
Limitations and future directions noted by the authors
- The problem of defining robustness at the 16/255 radius (Sec 5.2): all methods have adversarial accuracy below 8% on ImageNet 16/255, and LLR pays a large nominal accuracy cost; the authors observe that at this radius perturbations can overlay faint images on white backgrounds and erase objects (Figure 8), and argue that "what constitutes robustness on ImageNet" needs finer-grained discussion and is an important topic of debate.
- TRADES was not successfully reproduced on ImageNet (Sec 2 footnote and Sec 5 footnote): the authors state that they currently cannot obtain consistent and competitive results with TRADES on ImageNet ε=4/255, so they omit it from the ImageNet baselines.
- Error term of the theoretical approximation (Appendix C Remark): the upper bound on the gradient term relies on the premise that the error ε(δ) of the local quadratic approximation is negligible; the authors note that the conclusion holds under this condition.
- The paper has no dedicated Limitations or Future Work section; the above is scattered across the main text and appendices.
Scope of experiments
- The architectures evaluated are Wide-ResNet-28-8/40-8/28-10 (CIFAR-10) and ResNet-152 (ImageNet), 4 in total; the datasets are two image classification benchmarks, CIFAR-10 and ImageNet.
- The perturbation model covers only l∞: CIFAR-10 ε=8/255, ImageNet ε=4/255 and 16/255; no other norms are considered.
- The evaluated attacks are the paper's three custom gradient-based white-box attacks (Untargeted, Multi-Targeted, Random-Targeted) plus FGSM-20 and DeepFool; Multi-Targeted was not run on ImageNet (the paper says it requires iterating over 1000 classes and takes several days).
- ImageNet evaluation uses only the first 1K images of the test set (the paper cites compute limits), while CIFAR-10 uses the full 10K test set.
- The paper does not report the number of repetitions, random seeds, or variance of results for training and evaluation.
Summarize the main content of the paper
LLR avoids gradient obfuscation by linearizing the loss surface, and with 2-step PGD reaches and exceeds the strong-attack robustness of adversarial training.
An adversarial robustness defense paper (NeurIPS 2019, DeepMind/Google) that addresses two problems—the high cost of adversarial training and gradient masking produced by training with weak attacks—and proposes local linear regularization (LLR).
- Motivation: The authors empirically find that the more PGD steps used in adversarial training, the closer the loss surface is to locally linear (γ(ε,x) drops from about 10 to about 0.1, Figure 2); gradient masking is essentially high nonlinearity of the loss surface near the training point.
- Method: They define a local linearity measure γ(ε,x) (the maximum deviation between the loss and its first-order Taylor expansion), prove that it together with the gradient term upper-bounds the adversarial loss (Proposition 4.1), and construct a regularization term accordingly; the inner optimization requires only very few steps (2-step PGD for ImageNet 4/255).
- ImageNet results: Under ResNet-152, ε=4/255, white-box Untargeted attack, LLR achieves 47.00% adversarial accuracy, versus 39.70% for ADV and 38.90% for DENOISE (Table 3); training takes 7 hours vs 36 hours for ADV, which the authors call a 5× speedup.
- CIFAR-10 results: Under WRN-40-8, ε=8/255, strongest Multi-Targeted attack, LLR reaches 52.81%, higher than 49.79% for ADV(S) and 50.53% for TRADES(S) (Table 2).
- Evidence against masking: When trained with only 2-step PGD, LLR-2 still achieves 44.50% under the strongest attack, while ADV-2 achieves 0.00% (Table 6); when the attack is strengthened, LLR accuracy drops only 2.18%, while ADV drops 5.64% (Figure 3a).
- Authors' conclusion: Promoting local linearity can reduce gradient masking, thereby reducing the number of inner optimization steps; the authors also note that at radius 16/255 the perturbation already affects visual perception, and argue that a reasonable definition of ImageNet robustness deserves further discussion.
Related papers
- Ensemble Adversarial Training: Attacks and DefensesDefensesarXiv