Skip to content

An alternative surrogate loss for PGD adversarial testingAn Alternative Surrogate Loss for PGD-based Adversarial Testing

arXiv· arXiv:1910.09338· Sven Gowal, Jonathan Uesato, Chongli Qin, Po-Sen Huang, Timothy Mann, Pushmeet KohliDeepMindIndexed by this site · 27 days ago· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose MultiTargeted as an alternative surrogate loss for PGD, and state that it ranks first on all three leaderboards: MadryLab white-box Mnist, Cifar-10, and TRADES.

Threat modelWhite-box attack: the attacker knows the model parameters and uses PGD-type methods within the ℓ∞ norm ball S(x) = {ξ : ‖ξ − x‖∞ ≤ ϵ} to find a perturbation that causes the input to be misclassified, with the goal of solving the inner maximization of the Madry saddle-point problem to accurately estimate adversarial risk.

Questions
PGD-based adversarial testing is used to find norm-bounded perturbations to estimate a model's adversarial risk, but if the attack fails to find all failure samples it gives a false sense of security; the authors believe that PGD's hyperparameters (optimizer, step size, surrogate loss) have a large impact yet are often used fixed.
Methods
The authors systematically review the choice of optimizer, surrogate loss, step size, and number of restarts for PGD, and propose MultiTargeted: changing the target class on each restart and using the logit difference as the surrogate loss; theoretically, for linear models and convex adversarial input sets, it is guaranteed to find the optimal attack.
Experiments and results
The authors report that MultiTargeted ranks first on the MadryLab white-box Mnist (88.36%, ϵ=0.3), Cifar-10 (44.03%, ϵ=8/255), and TRADES Cifar-10 (53.07%, ϵ=0.031) leaderboards; it outperforms conventional PGD under the same budget on Cifar-10 and ImageNet, and is slightly worse on Mnist.
Limitations and future work
The authors state that the analysis is limited to the ℓ∞ threat model, and evaluation of ℓ1 and ℓ2 is left for future work; under non-convex adversarial input sets, MultiTargeted does not guarantee being better (Appendix B gives a counterexample); the Madry model on Mnist is locally nonlinear, and the number of restarts matters more than the choice of loss.
Experimental setupMadry et al. (MNIST)、Ours (MNIST) et al. · MadryLab white-box Mnist leaderboard、MadryLab white-box Cifar-10 leaderboard et al. · accuracy under attack、success rate
Evaluated models
Madry et al. (MNIST)Ours (MNIST)Ours (small) (MNIST)Madry et al. (CIFAR-10)Zhang et al. (CIFAR-10, TRADES)Uesato et al. (CIFAR-10, UAT)Ours (CIFAR-10)Xie et al. (ImageNet ResNet-152)Denoise by Xie et al. (ImageNet)Ours (ImageNet)
Benchmarks
MadryLab white-box Mnist leaderboardMadryLab white-box Cifar-10 leaderboardTRADES leaderboardImageNet
Metrics
accuracy under attacksuccess rate
AI summaryResearchers propose the MultiTargeted adversarial testing method using an alternative surrogate loss, ranking first on the MadryLab white-box MNIST, CIFAR-10 leaderboards and the TRADES leaderboard. The paper analyzes the impact of hyperparameters such as the optimizer, step size and surrogate loss on PGD-based adversarial testing, and explains under what conditions MultiTargeted can guarantee finding the optimal perturbation. The authors claim that this method outperforms more complex methods and often requires fewer iterations than other PGD variants in the literature. In specific results, MultiTargeted reduces the accuracy of the MadryLab MNIST model to 88.36% (ℓ∞ perturbation ε=0.3), the CIFAR-10 model accuracy to 44.03% (ε=8/255), and the TRADES CIFAR-10 model accuracy to 53.07% (ε=0.031).

Researchers propose the MultiTargeted adversarial testing method using an alternative surrogate loss, ranking first on the MadryLab white-box MNIST, CIFAR-10 leaderboards and the TRADES leaderboard. The paper analyzes the impact of hyperparameters such as the optimizer, step size and surrogate loss on PGD-based adversarial testing, and explains under what conditions MultiTargeted can guarantee finding the optimal perturbation. The authors claim that this method outperforms more complex methods and often requires fewer iterations than other PGD variants in the literature. In specific results, MultiTargeted reduces the accuracy of the MadryLab MNIST model to 88.36% (ℓ∞ perturbation ε=0.3), the CIFAR-10 model accuracy to 44.03% (ε=8/255), and the TRADES CIFAR-10 model accuracy to 53.07% (ε=0.031).

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to use PGD-type methods to more accurately solve the inner maximization of adversarial risk, avoiding weak attacks overestimating model robustness.

    Core question: how to make PGD-based adversarial testing more efficient and more accurately find norm-bounded perturbations that cause neural networks to misclassify, thereby accurately estimating adversarial risk.

    • Why it matters: The authors point out that failing to find the worst input ξ* only yields a lower bound on adversarial risk (i.e., an upper bound on robust accuracy), which may give a false sense of security; many defenses in the literature target only specific attacks and are broken by a different attacker (the authors cite Athalye et al., 2018; Uesato et al., 2018).
    • Shortcomings of existing methods: The authors argue that attack methods are becoming increasingly complex and hard to adapt to different models and scenarios; recent work often runs a PGD baseline with a fixed set of hyperparameters, and the authors report that the commonly used parameters of FGSMK are not optimal on any of the datasets and models they tested.
    • Core observation: When conventional PGD uses margin or cross-entropy surrogate losses, attack success depends on whether the random initialization falls in a "good" region; checking the logit differences of each class one by one avoids this problem (the toy example in Figure 1).
    • What the paper proposes: A PGD tuning guide (choice of optimizer, step size, surrogate loss), and MultiTargeted—a PGD variant that changes the target class on each restart and uses the logit difference as the surrogate loss—along with conditions under which finding the optimal attack is guaranteed for linear models.
    • Threat model:
      • Goal: solve the inner maximization of the saddle-point problem of Madry et al. (2017), finding the worst input within the adversarial input set.
      • Knowledge: white-box (the title of Algorithm 1 is "White-box PGD-based attack"); the attacker uses model gradients.
      • Capability: perturb the input within the ℓ∞ ball S(x) = {ξ : ‖ξ − x‖∞ ≤ ϵ}, with ϵ given in advance.
      • Victim system: image classification neural networks (convolutional networks on Mnist, Cifar-10, Svhn, ImageNet).
  2. What related research exists?

    The paper develops along the PGD lineage of FGSM→FGSMK→CW, and compares with leaderboard methods such as DAA, Interval Attack, and FAB.

    PGD-family attack methods

    • Goodfellow et al. (2014)—proposed FGSM, replacing the 0-1 loss with cross-entropy to generate ℓ∞-bounded adversarial examples in a single step.
    • Kurakin et al. (2016)—proposed the multi-step variant FGSMK, performing K steps of projected gradient on the surrogate loss.
    • Carlini and Wagner (2017b)—systematically studied the effect of different optimization methods and losses on attack quality, proposing the use of the Adam optimizer and giving 7 candidate losses; Uesato et al. (2018) likewise use Adam.

    Other attacks and leaderboard methods

    • Zheng et al. (2018)—Distributionally Adversarial Attack (DAA), which optimizes over the data distribution space and previously ranked first on the MadryLab white-box Mnist and Cifar-10 leaderboards.
    • Wang et al. (2019)—Interval Attack, which surpassed DAA on the Mnist leaderboard; Croce and Hein (2019)—Fast Adaptive Boundary Attack (FAB), which surpassed DAA on the Cifar-10 leaderboard. The paper compares directly with these two in Table 1.
    • Brendel et al. (2017, 2019)—decision-based boundary attack and its efficient version; the paper notes that efficiency is not the focus of this work. Chen et al. (2018), Moosavi-Dezfooli et al. (2016), Papernot et al. (2016), etc. are classified as weaker attacks or attacks that optimize other norms.

    Robust training and analysis of model behavior

    • Madry et al. (2017)—proposed the saddle-point adversarial training formulation, which is the target framework tested in this paper; Zhang et al. (2019)'s TRADES and Uesato et al. (2019)'s UAT provide the models tested.
    • Moosavi-Dezfooli et al. (2018), Qin et al. (2019)—observed that robust classifiers obtained by adversarial training are approximately linear in the neighborhood of training samples; the paper uses this to explain why MultiTargeted is more effective on robust models.

    Baselines and benchmarks: The baseline methods are conventional PGD tuned under the same budget (including FGSMK, denoted PGDK1×Nr, with grid-search tuning) and the combined variant PGD+MT; the benchmarks are the MadryLab white-box Mnist and Cifar-10 leaderboards and the TRADES leaderboard, with additional evaluation on three ImageNet models.

    The authors position this paper as: rather than pursuing more complex attacks, returning to PGD and, by changing the surrogate loss (MultiTargeted) and tuning, matching and exceeding the results of these more complex methods.

  3. How does the paper address this problem?

    Decompose PGD into four choices—optimizer, surrogate loss, step size, and restart/step count—and then replace the single surrogate loss with a per-target-class logit difference loss.

    Overall approach: first formalize the PGD attack as a general procedure with replaceable components (Algorithm 1) and analyze the choices of each component; then propose MultiTargeted: each restart targets a different target class, using the logit difference as the surrogate loss, and give the conditions under which it guarantees finding the optimal attack on locally linear models.

    Problem setting and formalization

    • The goal is to solve the inner maximization of the Madry saddle point problem: maxξ ∈ S(x) L(fθ(ξ), y), where L is the 0-1 loss and S(x) is the ℓ∞ ball.
    • Since the 0-1 loss is non-differentiable, PGD performs K steps of projected gradient ascent on a differentiable surrogate loss L̂, repeated over Nr restarts, each starting from a random point sampled from S(x).

    Component choices of PGD (Section 2)

    • Optimizer: options include the sign function, Adam, and Momentum; the authors report that Adam gives the most stable results and is insensitive to step size, but sign is more efficient on models with saturating activations such as sigmoid.
    • Surrogate loss: commonly cross-entropy (Eq. 5) and margin loss (Eq. 6); the authors state that the two are comparable on most models, with margin sometimes slightly better.
    • Step size: the authors recommend a step-size decay schedule to mitigate the effect of gradient obfuscation; their common starting point is Adam + initial step size 0.1, decayed by a factor of 10 at K/2 and 3K/4 + margin loss, but they emphasize that it needs to be tuned per model.
    • Trade-off between restarts and steps: with limited compute, first tune parameters with a single restart, then increase the number of restarts as much as possible.

    MultiTargeted method (Section 3)

    • The surrogate loss is set to L̂(r)(z, y) = −zy + zt, i.e., the difference between the logit of the true class and the logit of target class t; each restart selects a new target class from T = {1,…,C} \ {y}.
    • For a fair comparison with single-loss PGD, each target class uses only ⌊Nr / |T|⌋ restarts, keeping the total number of iterations the same (Algorithm 2).
    • A top-T truncation (Eq. 8) can be used to attack only the T non-true classes with the highest logits, reducing runtime.
    • The combined variant PGD+MT (Algorithm 3, Appendix A) alternates between the logit difference loss and the margin loss, with 10 surrogate losses in total on Mnist/Cifar-10, using about 11% more compute than MultiTargeted.

    Theoretical analysis (Section 3.1)

    • Toy example (Figure 1): on a one-dimensional 3-class linear classifier, the success of the margin loss depends on where the initialization lands, with a 75% success rate over 2 restarts (only 25% in the more extreme example of Figure 1b), whereas MultiTargeted is 100%.
    • Theorem 3.1: for a globally linear model, convex S(x), and number of restarts Nr ≥ C−1, MultiTargeted guarantees finding the optimal attack; the proof idea is that the margin/cross-entropy loss is convex in ξ, whether conventional PGD finds the global maximum depends on initialization, whereas the per-logit differences cover the hyperplane where the global maximum lies.
    • Theorem 3.2: the conclusion also holds when the model is locally linear in a neighborhood of x (linear transformations preserve the convexity of Z(x)).
    • Deep models: no guarantee is possible when Z(x) is non-convex; Appendix B constructs artificial examples where conventional PGD is better and where MultiTargeted is better; the authors hypothesize that MultiTargeted is more effective when the model is close to locally linear, and test this with singular value analysis (Appendix C).
  4. What experiments did the paper conduct?

    Compare MultiTargeted with tuned PGD under the same budget on 10 models across Mnist, Cifar-10, and ImageNet, and compete on three public leaderboards.

    Experimental Setup

    • Models under test: four WideResNet variants on Cifar-10 (the Madry et al. adversarially trained model, the Zhang et al. TRADES model, the Uesato et al. UAT model (106 layers), and the authors' own trained model); three models on ImageNet (the Xie et al. ResNet-152, the Xie et al. ResNet-152 with denoise blocks added, and the authors' own trained model); three models on Mnist (the Madry et al. model, the authors' own trained model of the same size, and the authors' own trained small model).
    • Datasets and perturbation budgets: Mnist (ϵ=0.3), Cifar-10 (ϵ=8/255 or 0.031), ImageNet (ϵ=16/255), all ℓ∞.
    • Baselines: conventional PGD tuned under the same compute budget (PGDK1×Nr, including FGSMK, tuned by grid search), satisfying K1×Nr = K2×Ni×T; additionally the combined attack PGD+MT.
    • MultiTargeted fixed configuration: Adam optimizer, initial step size 0.1, decayed to 0.01 and 0.001 at K2/2 and 3K2/4; the authors state that because it is less sensitive to hyperparameters than conventional PGD, no grid search is performed.
    • Metrics: accuracy under attack (lower means a stronger attack) and attack success rate; the paper does not report the number of repetitions or confidence intervals.
    • Evaluation scale: ImageNet clean accuracy is computed on the first 1000 test images; for other experiments the paper does not state the number of evaluation samples.

    Main Results

    Table 1: accuracy under attack of leaderboard models (lower is better)

    Swipe horizontally to read the table

    ModelϵPGD (tuned)MTPGD+MTAggregatedPrevious best
    Mnist Madry et al.0.388.21% (1000×1800)88.43% (1000×200)88.36% (1000×200)88.18%88.42% (Wang et al.)
    Cifar-10 Madry et al.8/25544.51% (1000×180)44.05% (1000×20)44.03% (1000×20)44.03%44.51% (Croce & Hein)
    Cifar-10 Zhang et al.0.03153.70% (1000×180)53.07% (1000×20)53.07% (1000×20)53.05%53.44% (Croce & Hein)
    • The authors state that MultiTargeted ranks first on all three leaderboards: MadryLab white-box Mnist, Cifar-10, and TRADES; according to Table 1, on Mnist what exceeds the previous best is PGD+MT (88.36% vs. 88.42%), while MT alone is 88.43%.
    • The authors point out that on Mnist conventional PGD under the same budget outperforms MT, whereas on Cifar-10 the opposite holds, reflecting the complementarity of the two; the gap between the aggregated column and the best single attack is very small, from which the authors conclude that the best attack misses only a small number of adversarial samples.
    • The authors explain that the Madry model on Mnist is not linear or smooth in the neighborhood of data points (Appendix C), and Z(x) may be highly non-convex, so the number of restarts matters more than the choice of loss.

    T-value sweep on Cifar-10 and ImageNet

    • Cifar-10 (Figure 3a): MT200×20×T versus PGD200×(20·T), ϵ=8/255; the authors state that MultiTargeted is the strongest attack on all four models, and except for the Madry model, attacking only the top-2 classes already outperforms conventional PGD; conventional PGD's accuracy plateaus as restarts are added, which the authors consider consistent with the initialization difficulty in Figure 1b.
    • Steps and restarts (Figure 3b): on the Madry model, MTK×Ni saturates as K and Ni increase; the authors state that MultiTargeted with a single restart outperforms conventional PGD with hundreds of restarts (text annotation in the figure; specific values are not legible in the figure).
    • ImageNet (Figure 4): MT200×20×T versus PGD200×(20·T), ϵ=16/255; the authors state that from T≥2 onward MultiTargeted is better on all three models, and that the standard and denoise versions of Xie et al. perform on par under MT, whereas under conventional PGD the denoise version appears stronger; the authors explain this by "the denoise model has fewer confusable classes" (analysis in Section 3.1).

    Degree of linearity and attack effectiveness (Appendix C)

    • Singular value analysis (Figure 6): singular value decomposition is performed on the logit gradient matrices of 100 random inputs around each of 10 test points; the Mnist small model's curve is steeper (closer to linear), and the three Cifar-10 models are overall closer to linear than the Mnist models.
    • Comparison of three Mnist models (Table 2, ϵ=0.3): on the small model, MT1000×20 reaches 73.56%, better than PGD1000×180's 74.13%; on the Madry model (88.89% vs. 88.49%) and the authors' same-size model (92.96% vs. 91.98%), MT is instead worse; after increasing restarts per target to 180 (MT1000×180), the three are 88.45%, 92.05%, and 73.11%, respectively, on par with or better than conventional PGD.
    • The authors' interpretation: the closer a model is to locally linear, the more effective MultiTargeted is; for strongly nonlinear models, the number of restarts should be increased first.

    Other ablations and analyses

    • Tuned PGD100×50 reaches 89.03% on the Madry Mnist model, better than the 89.62% originally reported on the leaderboard (Section 4).
    • Tuned PGD20×10 reaches 45.18% on the Madry Cifar-10 model, close to the 45.21% originally reported on the leaderboard (Section 4).
    • Tuned PGD50×20 reaches 54.05% on the TRADES model, better than the 56.53% of FGSM1000 listed on the leaderboard (Section 4).
    • ImageNet clean accuracy (first 1000 test images): the authors' own trained model 51.4%, the denoise model 66.8%, the Xie et al. standard model 64.1% (Section 4).
    • Random linear classifier simulation (Section 3.1.2, 1 million repetitions): with 3 classes and 2 restarts, conventional PGD's success rate is 96.16%; with 2 confusable classes it is 100%, and with 1 it is 92.39%; Figure 2 shows that the fewer the confusable classes, the lower conventional PGD's success rate, while MultiTargeted is 100% in all cases.
  5. What are some points that can be further explored?

    The authors leave evaluation of ℓ1 and ℓ2 threat models to future work, and note that MultiTargeted is not guaranteed to dominate under non-convex input sets.

    Limitations and future directions noted by the authors

    • The analysis is limited to the ℓ∞ threat model; the authors state that the analysis is expected to transfer to ℓ1 and ℓ2 attacks, but leave evaluation of these threat models to future work (Section 1.2).
    • For deep models, when the propagated adversarial input set Z(x) is non-convex, the efficiency of MultiTargeted cannot be proven; Appendix B constructs artificial examples where conventional PGD is better and where MultiTargeted is better (Section 3.1.3, Appendix B).
    • For models with local nonlinearity (such as Madry's Mnist model), the number of restarts matters more than the choice of surrogate loss, and in this case a single loss with more restarts is more suitable (Appendix C).
    • The authors emphasize that the given hyperparameters are only a starting point for common models and datasets, that tuning must be done separately for each model, and that fixed values from the literature should not be reused directly (Section 2, Section 5).

    Scope of experiments

    • 10 models were tested: four WideResNet variants on Cifar-10, three ResNet-152 variants on ImageNet, and three adversarially trained models on Mnist (Section 4, Appendix C).
    • Only the ℓ∞ threat model was evaluated, with perturbation budgets Mnist ϵ=0.3, Cifar-10 ϵ=8/255 and 0.031, ImageNet ϵ=16/255 (Section 4).
    • The comparison baselines are conventional PGD tuned under the same compute budget (including FGSMK) and the combined attack PGD+MT; the leaderboard comparisons are with Interval Attack (Mnist) and FAB (Cifar-10) (Table 1).
    • ImageNet clean accuracy is computed on the first 1000 test images; the paper does not state the evaluation sample size, number of repetitions, or statistical significance tests for the remaining experiments (Section 4).
    • The theoretical guarantees cover globally linear models (Theorem 3.1) and locally linear models (Theorem 3.2) with S(x) convex; the linearity analysis in Appendix C is based on gradient singular values of 10 test points with 100 random inputs each.
  6. Summarize the main content of the paper

    A PGD tuning guide plus the MultiTargeted attack: optimizing the logit difference per target class, ranking first on three white-box leaderboards.

    An adversarial testing paper from DeepMind that studies how to use PGD-type methods to more accurately estimate a model's adversarial risk, avoiding weak attacks overestimating robustness.

    • Problem: when solving the inner maximization of the Madry saddle point problem, conventional PGD uses margin or cross-entropy surrogate losses, attack success depends on random initialization, and the literature commonly uses fixed hyperparameters; the authors report that these parameters are non-optimal on all datasets and models they tested.
    • Method: systematically review PGD's optimizer (Adam recommended), step size (decay schedule recommended), surrogate loss, and restart/step trade-off; propose MultiTargeted—each restart targets one non-true class, using the logit difference −zy + zt as the surrogate loss, with total iterations equal to single-loss PGD; Theorems 3.1 and 3.2 give conditions guaranteeing finding the optimal attack for linear or locally linear models, convex input sets, and number of restarts ≥ C−1.
    • Leaderboard results (Table 1): PGD+MT reaches 88.36% on the MadryLab white-box Mnist model (ϵ=0.3), 44.03% on the MadryLab Cifar-10 model (ϵ=8/255), and MT reaches 53.07% on the TRADES Cifar-10 model (ϵ=0.031); the authors state that all three rank first on the leaderboard.
    • Comparison with conventional PGD: on Cifar-10 and ImageNet, MultiTargeted is better under the same budget (Figure 3a, Figure 4); on the Madry model on Mnist, conventional PGD is better under the same budget (88.21% vs. 88.43%), which the authors attribute to the model's local nonlinearity and the greater importance of the number of restarts.
    • Mechanistic evidence: in a random linear classifier simulation (1 million repetitions), the success rate of conventional PGD decreases as the number of confusable classes decreases, while MultiTargeted is always 100%; the singular value analysis in Appendix C shows that the advantage of MultiTargeted is more pronounced on models closer to local linearity.
    • Authors' conclusion: ordinary PGD with tuned parameters can itself reach the top of the leaderboard (Mnist 88.21%), and literature hyperparameters should not be blindly reused; MultiTargeted is a stronger attack on locally approximately linear robust models.

Related papers

Show 3 more papers
Read originalarxiv.org