Skip to content

Automatically discovering adaptive attacks against adversarial defensesAutomated Discovery of Adaptive Attacks on Adversarial Defenses

arXiv· arXiv:2102.11860· Chengyuan Yao, Pavol Bielik, Petar Tsankov, Martin VechevDepartment of Computer Science, ETH Zürich; LatticeFlowIndexed by this site · 27 days ago· Originally publishedSelected ToolsSelectedAttention38

Quick read

Attacks

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

The authors propose A3, which formalizes the building blocks of adaptive attacks as a search space and searches automatically, evaluated on 24 defenses; the authors claim that on 10 models it produces 3.0%–50.8% more adversarial examples than AutoAttack.

Threat modelimplementation-knowledge adversary: the attacker has full access to the model implementation (e.g., computation graph) at inference time but does not know the training dataset or training algorithm; this threat model is weaker than a perfect-knowledge adversary. The victim system is a CIFAR-10 classification model with an unknown defense, the attack capability is L∞ perturbation (ε=4/255 or 8/255), and the objective is to maximize misclassification (when a detector is present, the detector must be passed).

Questions
Reliable evaluation of adversarial defenses relies on experts hand-crafting adaptive attacks, or on fixed attack ensembles such as AutoAttack; the former is labor-intensive, while the latter's attacks are fixed in advance and may not apply to a specific defense, causing defense robustness to be overestimated.
Methods
The authors decompose existing adaptive attacks into reusable building blocks—backbone attacks and parameters, network transformations (layer removal, BPDA), loss functions—formalized as a search space, then use greedy sequence search plus TPE parameter estimation and successive halving to automatically search for the strongest attack, implemented as the tool A3.
Experiments and results
Compared with AutoAttack on 24 CIFAR-10 defenses: the authors claim that on 10 models A3 produces 3.0%–50.8% more adversarial examples, and on the remaining 14 the attack strength is similar but typically about 2 times faster; A3 also reproduces or improves the results of three hand-crafted adaptive attacks not included in the search space.
Limitations and future work
In the Conclusion, the authors note: the search space is incomplete, and new types of attacks still require expert design; the search algorithm does not model attack runtime, and including expensive attacks may be too costly. Experiments were conducted only on 24 CIFAR-10 image defenses under the L∞ threat model.
Experimental setupA1 Madry et al. (2018)、A2 Buckman et al. (2018) et al. · 24 个 CIFAR-10 对抗防御模型(Block A:ε=4/255;Block B:RobustBench 顶部模型;Block C:ε=8/255) · Robust Accuracy (1 - Rerr)、Runtime (min) et al.
Evaluated models
A1 Madry et al. (2018)A2 Buckman et al. (2018)A3 Das et al. (2017) + Lee et al. (2018)A4 Metzen et al. (2017)A5 Guo et al. (2018)A6 Pang et al. (2019)A7 Papernot et al. (2015)A8 Xiao et al. (2020)A9 Xiao et al. (2020)ADVB10 Gowal et al. (2021)B11 Wu et al. (2020)RTSB12 Zhang et al. (2021)B13 Carmon et al. (2019)B14 Sehwag et al. (2020)C15 Stutz et al. (2020)C16 Zhang & Wang (2019)C17 Grathwohl et al. (2020)C18 Xiao et al. (2020)ADVC19 Wang et al. (2019)C20 B11 + Defense in A3C21 C17 + Defense in A3C22 B11 + Random RotationC23 C17 + Random RotationC24 Hu et al. (2019)
Benchmarks
24 个 CIFAR-10 对抗防御模型(Block A:ε=4/255;Block B:RobustBench 顶部模型;Block C:ε=8/255)
Metrics
Robust Accuracy (1 - Rerr)Runtime (min)Speed-up
AI summaryand selection rationaleResearchers from ETH Zürich and other institutions propose A³ (Adaptive AutoAttack), a tool for automatically discovering adaptive attacks. It decomposes the common techniques of existing adaptive attacks into three types of reusable components—attack algorithms and parameters, network transformations, and loss functions—and formalizes them as a search space, automatically finding strong attacks for unknown defenses through greedy search, TPE parameter estimation, and successive halving. In an evaluation on 24 adversarial defenses, A³ generates 3.0%-50.8% more adversarial examples than AutoAttack on 10 models, and on the remaining 14 models the attack strength is similar or slightly stronger, usually about 2 times faster; against gradient-obfuscation defenses it reduces robust accuracy by up to 47.21%, and against the detector-based defense C15 by 50.77%. The authors state that A³ can partially reproduce and even improve upon human-designed adaptive attacks outside the search space. Code is open-sourced at https://github.com/eth-sri/adaptive-auto-attack。

Researchers from ETH Zürich and other institutions propose A³ (Adaptive AutoAttack), a tool for automatically discovering adaptive attacks. It decomposes the common techniques of existing adaptive attacks into three types of reusable components—attack algorithms and parameters, network transformations, and loss functions—and formalizes them as a search space, automatically finding strong attacks for unknown defenses through greedy search, TPE parameter estimation, and successive halving. In an evaluation on 24 adversarial defenses, A³ generates 3.0%-50.8% more adversarial examples than AutoAttack on 10 models, and on the remaining 14 models the attack strength is similar or slightly stronger, usually about 2 times faster; against gradient-obfuscation defenses it reduces robust accuracy by up to 47.21%, and against the detector-based defense C15 by 50.77%. The authors state that A³ can partially reproduce and even improve upon human-designed adaptive attacks outside the search space. Code is open-sourced at https://github.com/eth-sri/adaptive-auto-attack。

Why it was selectedThe authors formalized common techniques of adaptive attacks as a searchable space, finding 3.0%-50.8% more adversarial examples than AutoAttack across 10 models among 24 adversarial defenses.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How to automatically find adaptive attacks for unknown adversarial defenses, replacing the two existing evaluation approaches of expert hand-crafting and fixed attack ensembles.

    Core problem: reliable evaluation of adversarial defenses is hard—many defenses initially appear effective and are later bypassed by new attacks designed specifically against them, while hand-crafted adaptive attacks depend on experts, and fixed attack ensembles may not apply to a specific defense.

    • Problem setting: The authors note that adversarial attacks (small perturbations to inputs causing misclassification) have been extensively studied, but many defenses were only broken after being proposed, by attacks designed specifically for them (citing Carlini & Wagner 2017, Athalye et al. 2018, Tramer et al. 2020).
    • Shortcomings of existing methods: The hand-crafted adaptive attacks of Tramer et al. (2020) require substantial manual effort and are limited by expert knowledge—the authors note that the adaptive attacks accompanying each of its 13 defenses proved insufficiently strong in hindsight; the four fixed attacks of AutoAttack (Croce & Hein 2020b) require no manual effort, but the attacks are fixed in advance, do not exploit information about the defense, and cover only a small part of the attack space (Figure 1).
    • Core observation: The authors' key observation is that adaptive attacks consist of reusable building blocks (attack algorithms and parameters, network transformations, loss functions), which can be formalized as a search space, thereby automatically searching for attacks against unknown defenses.
    • The paper proposes: the method Adaptive AutoAttack (A3)—it defines an attack search space and gives a search algorithm, evaluated on 24 defenses; the authors claim that on 10 models it produces 3.0%–50.8% more adversarial examples than AutoAttack, with attack strength similar or slightly stronger on the remaining models.
    • Threat model:
      • Objective: maximize the number of adversarial examples satisfying criterion c (e.g., misclassification) under the attack capability constraint d(x',x)≤ε (Eq. 1).
      • Knowledge: implementation-knowledge adversary—full access to the model implementation (e.g., computation graph) at inference time; the authors state this is weaker than a perfect-knowledge adversary (which also knows the training dataset and algorithm).
      • Capability: apply L∞ perturbations to inputs (ε=4/255 or 8/255 in the evaluation); for defenses with detectors, a zero knowledge detector is used—attacks in the search space do not know the detector exists.
      • Victim system: a K-class classification model with an unknown defense (24 CIFAR-10 models in the evaluation).
  2. What related research exists?

    Related work falls into three categories: hand-crafted adaptive attacks, fixed attack ensembles and attack composition search, and AutoML/NAS search techniques; the baseline is AutoAttack.

    Hand-crafted adaptive attacks

    • Tramer et al. (2020)—propose a process in which experts hand-craft adaptive attacks for each defense (tuning parameters, replacing network components, changing loss functions), breaking the 13 defenses they consider; the paper points out that its drawback is requiring a large amount of manual work and being limited by expert knowledge.
    • Athalye et al. (2018)—propose techniques such as BPDA and EOT to bypass gradient obfuscation; this paper includes the three BPDA approximations and EOT in the search space.
    • Carlini & Wagner (2017)—the C&W attack, included in the search space as one of the backbone attacks.

    Fixed attack ensembles and attack composition

    • AutoAttack (Croce & Hein 2020b)—evaluates robustness with an ensemble of four fixed attacks: APGDCE, APGDDLR, FAB, SQR; the paper points out that its limitation is that the attacks are fixed in advance and unaware of the specific defense. The main comparison baseline of this paper.
    • Composite Adversarial Attacks (CAA, Mao et al. 2021)—searches attack sequences rather than a fixed ensemble, improving over AutoAttack by up to 1% on adversarially trained defenses; the paper points out that this paper's difference is that the search space also includes loss functions, network processing, and hyperparameters, covering a broader range of defense types.
    • Backbone attack library: FGSM (Goodfellow et al. 2015), PGD (Madry et al. 2018), DeepFool (Moosavi-Dezfooli et al. 2016), NES (Wierstra et al. 2008), FAB (Croce & Hein 2020a), SQR (Andriushchenko et al. 2020).

    AutoML and search techniques

    • Neural architecture search (Zoph & Le 2017; Elsken et al. 2019) and BOHB, ASHA, DARTS, etc.—the paper points out that NAS's efficient search techniques can be used in this paper's setting, and that NAS's experience (entirely new architectures are hard to discover automatically, but automating intermediate steps is already very useful) also applies to attack search.
    • Hyperparameter optimization and early stopping: TPE (Bergstra et al. 2011) is used as the parameter estimator, and successive halving (Karnin et al. 2013; Jamieson & Talwalkar 2016) is used to progressively expand samples and screen candidates.

    Baseline and benchmarks: the comparison baseline is AutoAttack (for fairness, the authors extended it with BPDA to handle non-differentiable defenses); it is also compared with three hand-crafted adaptive attacks not included in the search space (C15's PGD-Conf, C18's NES attack, C24's linear interpolation attack). Block B models are taken from RobustBench (Croce et al. 2020).

    The authors position this paper as combining the advantages of the two types of methods: automatic evaluation like AutoAttack, yet tuned to the specific defense like hand-crafted attacks; the authors state that A3 is the first tool aimed at automatically finding strong adaptive attacks targeting specific defenses (Conclusion original text "the first tool").

  3. How does the paper address this problem?

    Adaptive attacks are decomposed into three types of building blocks—attack sequences, network transformations, and loss functions—to form a search space, and the strongest attack is searched using greedy + TPE + successive halving.

    Overall approach: extract the commonly used techniques of existing adaptive attacks as reusable building blocks, formalize a search space A = S × T (attack sequences × network transformations), then formulate "finding the strongest attack" as an optimization problem over this space, solve it automatically with a search algorithm, and implement it as the tool Adaptive AutoAttack (A3).

    Problem formalization

    • Given a model f with an unknown defense and a dataset D, the goal is to find an attack a∈A that maximizes the expected number of adversarial examples satisfying criterion c: maxa∈ A, d(x′,x)≤ϵ E(x,y)∼ D c(f, x′, x), where x'=a(x,f).
    • An attack (s,t) first uses a network transformation t to turn f into an easier-to-attack surrogate model f'=t(f), then executes the attack sequence s on f' to generate candidate adversarial examples, and finally checks whether they are valid against the original model f; the surrogate model is used only for generation, not for evaluation.
    • In practice, optimization approximates this with the dataset: score(f,a,D) adds −λ·la (la being the attack's untargeted cross-entropy) in addition to the criterion term; the authors state its role is to act as a tie-breaker when the criterion cannot distinguish among multiple attacks with small sample sizes.

    Attack search space S

    • Grammar: S supports sequence composition S;S (execute in order, return the first successful example), randomize (random starting point/random seed), EOT S,n, repeat S,n, try S for n (time budget), and backbone attacks with parameters and loss functions.
    • 8 backbone attacks: FGSM, PGD, DeepFool, C&W, NES, APGD, FAB, SQR; parameter ranges and priors are in Appendix B (Table 4, Table 5).
    • The authors state that weak attacks already surpassed by stronger attacks are retained because weak attacks can sometimes bypass detectors (e.g., C24), and the search space imposes no priors, letting the search algorithm learn which are useful.

    Network transformations T and loss functions L

    • Layer Removal: remove operators in the computation graph whose input and output dimensions are the same (e.g., redundant softmax, JPEG compression layers, Reverse Sigmoid layers).
    • BPDA: replace an operator's backpropagation with a differentiable approximation; three approximations: identity, 1×1 convolution, two convolutions plus ReLU (the latter two have weights learned by approximating the forward function).
    • Loss function grammar: three forms targeted/untargeted/targeted−untargeted × two outputs logits/probs × five losses (CrossEntropy, HingeLoss, L1, DLR, LogitMatching); the hinge loss implementation takes κ=−∞. The authors cite Tramer et al. (2020), who broke 13 defenses with 9 objective functions, to show that loss choice matters.

    Search algorithm (Algorithm 1)

    1. Find a surrogate model: use the default attack ∆ (APGDCE in the implementation) to exhaustively try all available BPDA positions and all removable layers, and select the transformation t with the highest score; the authors state that although this step is exhaustive, it accounts for only a small part of the runtime.
    2. Greedily compose a sequence: run m rounds, each round finding the highest-scoring attack on the samples not yet broken and adding it to the sequence.
    3. Parameter estimation: each round samples k candidates, uses TPE to select parameters, evaluates, and updates the estimator.
    4. Successive halving: first evaluate on n samples, iteratively double the sample size and keep only the top 1/4 candidates by score each time, until only one remains.
    • Time budget: limited by seconds per sample per attack; attacks that time out are scored −∞; the authors analyze the worst-case search time as 4/3 times the allowed attack runtime (derivation in Appendix A).
    • Implementation parameters: m=3, k=64, n=100, time budget 0.5–3 seconds/sample depending on model size, on a single RTX 2080 Ti; based on PyTorch, with attack implementations from FoolBox 3.0.0, ART 1.3.0, and AutoAttack.
  4. What experiments did the paper conduct?

    Robust accuracy and runtime are compared with AutoAttack on 24 CIFAR-10 defenses, plus generalization, scalability, and ablation experiments.

    Experimental Setup

    • Models under test: 24 CIFAR-10 defense models, in three blocks (Table 1): Block A is 9 diverse defenses with ε=4/255 (A1–A9); Block B is 5 top RobustBench models (B10–B14, ε=8/255, B12 uses ε=0.031); Block C is 10 diverse defenses with ε=8/255 (C15–C24, C15 uses ε=0.03), including combined defenses C20–C23.
    • Baseline: AutoAttack (AA), using its rand version when the defense contains randomized components, otherwise the standard version; the authors extended AA with BPDA to support non-differentiable defenses.
    • Metrics: robust test error (Rerr, following Stutz et al. 2020, uniformly evaluating defenses with and without detectors), reporting robust accuracy = 1 − Rerr, where lower means a stronger attack; runtime (minutes) and speedup are also reported.
    • Evaluation details: samples that are already misclassified on clean inputs are first removed in preprocessing; evaluation of randomized defenses is repeated 10 times and averaged; the standard deviation σ<0.2 across 3 independent runs of A3 on the same model (Appendix H, Table 10).
    • Search parameters: m=3, k=64, n=100, time budget 0.5–3 seconds/sample (A9' uses Tc=30, C15' uses m=8); all experiments use a single RTX 2080 Ti.
    • Sample size: N=10000 (dataset size) is substituted in the time analysis in Appendix A; the paper does not explicitly state the number of evaluation samples per model in the main text.

    Main Results

    Table 1 gives the robust accuracy (%, lower means a stronger attack) and runtime of AA and A3 on the 24 defenses, with key rows excerpted:

    Swipe horizontally to read the table

    ModelAAA3ΔAA minutesA3 minutes
    A5 Guo et al.22.3012.14-10.161917
    A8 Xiao et al.19.8211.11-8.714922
    A9' Xiao et al. ADV (Tc=30)64.9117.70-47.211572,280
    B10 Gowal et al.62.8062.79-0.01818226
    C15' Stutz et al. (m=8)77.6426.87-50.77101205
    C21 C17+A3 defense15.275.24-10.0326179
    C23 C17+random rotation22.2913.45-8.84114374
    C24 Hu et al.6.253.07-3.1811056

    (According to Table 1; among the remaining models in the full 24 rows, the gap between the two is mostly within 1 percentage point, omitted here.)

    • The authors state: on 10 defenses A3 produces 3.0%–50.8% more adversarial examples than AA; on the remaining 14 the attack quality is similar and usually about 2 times faster.
    • The authors point out that AA's attacks are already contained in A3's search space (but not their optimal parameters and sequences), so given sufficient exploration time A3 is at least no worse than AA.
    • Exceptions: the stronger attacks on A9' and C15' come at the cost of longer runtime (A9' is 2,280 minutes vs. AA's 157 minutes, a speed ratio of 0.07×); A3 is also slower on C22 and C23 (0.55×, 0.30×).

    Generalization: Comparison with Hand-crafted Attacks Not Included in the Search Space

    • C15 (Stutz et al. 2020): the original paper's hand-crafted attack PGD-Conf plus a black-box attack reaches 31.6% robust accuracy; A3 with m=3 reaches 39.54%, and with m=8 reaches 26.87%; the authors state that although the search space does not include backtracking, it still reproduces and improves on their result; AA is 77.64%.
    • C18: the known NES attack reaches 0.16% (Tramer et al. 2020); after the authors remove NES from the search space, A3 finds an alternative attack reaching 2.31%.
    • C24: the interpolation attack of Tramer et al. (2020) reaches 0%; A3 finds PGDL1 reaching 3.07%; the authors explain that the weak attack instead bypasses the detector because it does not produce overconfident predictions.

    Scalability and Search Behavior

    • Search space expanded 4× (adding 8 random attacks and 4 random losses): performance drops slightly at the same runtime, and increasing the runtime budget by 1.5× recovers the original attack strength (Table 8, Block A average goes from 9.96 to 10.30, returning to 9.97 at k=96).
    • Search time halved (n=50): attack strength drops only slightly (≤0.4, Table 8 average 10.12 vs. 9.96).
    • TPE vs. random search (Figure 2, n=100, k=100, 5 repetitions): TPE is on average 1.3% better, up to 8.0% (A6); the authors state that random search is simpler and parallelizable, and can also achieve competitive performance.

    Other Ablations and Analyses

    • Attack parameters: the attacks found by A3 are on average 5.5% stronger, up to 17.7%, than the best of the default parameters of the FGSM/PGD/DeepFool/C&W libraries (A6, Table 9).
    • Loss function: after removing loss formalization from the search space, the search score on Block A models drops by 3% on average (Figure 2).
    • BPDA strategy (Table 2, APGDCE 50 iterations): on A2 two conv layers+ReLU is best (3.7); on A3/C20/C21 identity is best (9.6/70.5/84.0).
    • Loss frequency: Appendix D (Table 6) shows that among the searched attacks Hinge and DLR are more common than CE; the authors state this challenges the practice of using CE by default to evaluate robustness.
    • Run stability: the confidence intervals across 3 independent runs for Block A and B models are mostly less than ±0.2% (Table 10); A8, A9, and A5 have larger variance due to the characteristics of the defenses themselves.
  5. What are some points that can be further explored?

    The authors list limitations such as the incomplete search space and not modeling attack cost, and propose using meta-learning to improve search across models.

    Limitations and Future Directions Noted by the Authors

    • Incomplete search space (Conclusion): although easy to extend, it is inherently incomplete, and designing new types of attacks still requires domain experts.
    • Attack runtime not modeled (Conclusion): the search algorithm does not model attack cost; including expensive attacks may be computationally infeasible, and even when fast attacks exist they can incur large overhead.
    • meta-learning direction (Conclusion): the authors state that an interesting future work is to use meta-learning to let A3 learn across multiple models rather than searching from scratch each time.
    • Boundaries of automation (Introduction): the authors explain that only part of the process of finding adaptive attacks can be automated; discovering genuinely new attacks is a creative process currently beyond fully automated techniques.
    • Tailoring the space to network properties (Appendix B.3): using defense properties (randomization, detectors, obfuscation) as priors to reduce the search space is left to future work (meta-learning).

    Scope of Experiments

    • The models under test are 24 CIFAR-10 image classification defenses (Table 1), with threat model L∞ (ε=4/255 or 8/255, with individual models using 0.03/0.031).
    • The comparison baseline is one tool, AutoAttack, plus a qualitative comparison with three hand-crafted adaptive attacks (C15, C18, C24).
    • The stability evaluation is 3 independent runs each for 14 models in Block A and B (Table 10); Block C was not run multiple times.
    • The scalability ablation is done only on Block A (except A9) (Appendix E); the TPE vs. random search comparison is on A1–A9 with 5 repetitions (Appendix F.3).
    • The paper does not report the specific number of evaluation samples per model (only N=10000 is substituted in the time analysis in Appendix A).
  6. Summarize the main content of the paper

    A3 formalizes adaptive attacks as a search space and searches automatically; on 24 defenses its attack strength is no lower than AutoAttack, and clearly stronger on 10 of them.

    A paper on attack automation for adversarial defense evaluation: to address the problem that "defense evaluation relies on expert manual adaptive attacks or fixed attack ensembles," the authors propose the tool A3 (Adaptive AutoAttack).

    • Method: adaptive attacks are decomposed into three types of reusable building blocks—8 backbone attacks and their parameters, network transformations (layer removal, three BPDA approximations), loss functions (5 losses × targeted form × logits/probs)—forming a search space; the search algorithm first finds a surrogate model, then uses greedy sequencing, TPE parameter estimation and successive halving to find the strongest attack, with the time budget limited by seconds per sample.
    • Threat model: implementation-knowledge adversary, with access to the model implementation at inference time, L∞ perturbation, and a zero knowledge detector for detector defenses.
    • Main results: on 24 CIFAR-10 defenses, the authors report that 10 models produce 3.0%–50.8% more adversarial examples than AutoAttack (Table 1), e.g., C15 drops from 77.64% to 26.87% (m=8), and A9 drops from 64.91% to 17.70% (Tc=30); the remaining 14 are similar in strength and 1.5×–3.6× faster on Block B.
    • Generalization: for three manual attacks not included in the search space, A3 reproduces or approaches their results—on C15 it outperforms the original paper's 31.6%, on C18 it still reaches 2.31% after removing NES (NES is 0.16%), and on C24 it reaches 3.07% (manual attack is 0%).
    • Ablation: parameter search is on average 5.5% stronger than library default parameters; removing loss formalization lowers it by 3% on average; when the search space is expanded 4×, adding a 1.5× budget maintains strength.
    • Authors' conclusion: A3 automates part of the expert manual trial and error, and can more reliably evaluate new and old defenses; limitations are that the search space is incomplete and attack time cost is not modeled, and future work could use meta-learning to learn across models. The authors state that A3 is the first tool to automatically find adaptive attacks against specific defenses.
Read originalarxiv.org