Skip to content

Strength in Numbers: Trading Off Robustness and Compute via Ensembles of Adversarially Trained ModelsStrength in Numbers: Trading-off Robustness and Computation via Adversarially-Trained Ensembles

arXiv· arXiv:1811.09300· Edward Grefenstette, Robert Stanforth, Brendan O'Donoghue, Jonathan Uesato, Grzegorz Swirszcz, Pushmeet KohliDeepMindIndexed by this site · 27 days ago· Originally publishedDefenses

Quick read

Defenses

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

The authors study how adversarial training scales with computation budget, and state that adversarially training an ensemble as a single model is more robust than a single large model with the same number of parameters.

Threat modelThe attacker's goal is to make the classifier misclassify on CIFAR-10; white-box attackers can perform forward and backward propagation on the model (cannot change weights), using IFGSM/PGD, with an L∞ perturbation bound of 8/255; black-box attackers use precomputed transfer adversarial samples; the victim system is Wide ResNet and its ensemble variants.

Questions
Neural networks are easily deceived by small adversarial perturbations, posing a large risk in safety-critical scenarios. The authors ask: whether more computation can be traded for adversarial robustness, and how to spend this budget more cost-effectively.
Methods
On CIFAR-10 with Wide ResNet as the base, compare single-model adversarial training, ordinary ensembles, adversarially training the ensemble as a single model as a whole (IFGSM attacks the entire ensemble), and adversarially training separately and then ensembling, with parameter counts controlled for comparison.
Experiments and results
The authors report: adversarially trained ensembles outperform single models with the same parameter count under PGD20 (Ensemble2Adv 0.52, DoubleAdv 0.44, Table 1a); ensembling alone or adversarially training separately and then ensembling is not robust; the cost is about a 10-point drop in clean accuracy.
Limitations and future work
The authors state that future work should study whether scaling up ensemble size still yields gains when controlling for parameter count, and why ensembles are more robust; the explanation in the appendix based on weighting individual model confidence is unverified. Experiments are conducted only on CIFAR-10, with one base architecture, under the L∞ threat model.
Experimental setupEnsemble2、Ensemble4 et al. · CIFAR-10 · clean accuracy、IFGSM5 accuracy et al.
Evaluated models
Ensemble2Ensemble4SingleAdvDoubleAdvEnsemble2AdvEnsemble4AdvSeparateEnsemble2Adv
Benchmarks
CIFAR-10
Metrics
clean accuracyIFGSM5 accuracyPGD5 accuracyPGD20 accuracyblack box accuracy
AI summaryThis paper studies how the robustness of adversarial training scales with the defender's compute budget, and finds that under an equal budget, adversarially training an ensemble of small models is more efficient than training a larger single model. The specific approach is to form an ensemble of multiple small models and adversarially train the entire ensemble as a single model; the paper shows that increasing the parameter count of adversarially trained models can improve robustness, and that the key is that it is adversarial training of the ensemble as a whole, rather than ensembling separately adversarially trained models, that brings robustness. The authors point out that small but carefully chosen perturbations to inputs can cause neural networks to produce extremely inaccurate outputs, which makes deep models difficult to use in safety-critical domains such as autonomous driving; prior research has shown that training with adversarially generated data augmentation can provide a degree of robustness to test-time attacks.

This paper studies how the robustness of adversarial training scales with the defender's compute budget, and finds that under an equal budget, adversarially training an ensemble of small models is more efficient than training a larger single model. The specific approach is to form an ensemble of multiple small models and adversarially train the entire ensemble as a single model; the paper shows that increasing the parameter count of adversarially trained models can improve robustness, and that the key is that it is adversarial training of the ensemble as a whole, rather than ensembling separately adversarially trained models, that brings robustness. The authors point out that small but carefully chosen perturbations to inputs can cause neural networks to produce extremely inaccurate outputs, which makes deep models difficult to use in safety-critical domains such as autonomous driving; prior research has shown that training with adversarially generated data augmentation can provide a degree of robustness to test-time attacks.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Whether more computation can be traded for adversarial robustness; the authors state that an ensemble with end-to-end adversarial training is more cost-effective than a single model with the same number of parameters.

    Core question: whether the adversarial robustness of a classifier can be improved at the cost of increased computation (memory and runtime), and how to spend this computation budget most effectively.

    • Problem setting: the authors point out that neural networks produce high-confidence erroneous outputs for input perturbations nearly imperceptible to humans, and such adversarial perturbations are relatively easy to compute with standard optimization techniques, making models unsuitable for safety-critical domains such as autonomous driving.
    • Shortcomings of existing methods: the authors state that many newly proposed defenses can still be broken, mostly merely obfuscating the gradients an attacker can exploit, while non-gradient attacks remain effective (citing Uesato et al. 2018, Athalye et al. 2018a).
    • Core observation and hypothesis: additional runtime computation can be used in various ways—a larger single model, running the original model multiple times and aggregating, or an ensemble. The authors state that prior work has proposed using ensembles to improve robustness, but their preliminary experiments show that stronger attackers can successfully attack these ensembles.
    • Approach proposed in the paper: study the trade-off between adversarial robustness and computation, propose adversarially training an ensemble of multiple small models as a single model, and verify through ablation experiments three empirical findings: increasing computation/model size can improve robustness; the ensemble itself is not robust, but end-to-end adversarial training can make it robust; with the same number of parameters, an adversarially trained ensemble is more robust than an adversarially trained single model.
    • Threat model:
      • Attacker goal: generate untargeted adversarial examples for a CIFAR-10 classifier to cause misclassification.
      • Knowledge: a white-box attacker can perform forward and backward propagation on the model (cannot change weights or logic); a black-box attacker cannot access the model but may know the training dataset.
      • Capability: white-box uses IFGSM and PGD, with an L∞ perturbation bound of 8/255; black-box uses precomputed transfer adversarial examples.
      • Victim system: the Wide ResNet base model and its ensembles, and adversarially trained variants.
  2. What related research exists?

    Related work falls into three categories: adversarial attacks, defenses and their failures, and ensembles and adversarial training; the authors position their work as different from the ensemble adversarial training of Tramèr et al.

    Adversarial attacks

    • Szegedy et al. (2013), Goodfellow et al. (2014), Carlini & Wagner (2017b)—discovered and proposed generating adversarial perturbations using standard optimization techniques; Goodfellow et al. (2014) proposed the fast-gradient-sign method (FGSM).
    • Carlini & Wagner (2016), Kurakin et al. (2016)—multi-step attacks such as PGD and IFGSM, which this paper uses as in-training attacks and evaluation attacks.
    • Papernot et al. (2016; 2017)—black-box transfer attacks, where the attacker does not have access to the model but may know the training data.

    Defenses and their failure

    • Madry et al. (2017)—adversarial training: training on a weighted loss over clean samples and adversarial samples; this paper's method builds directly on it, and the training and evaluation settings also follow that paper.
    • Akhtar & Mian (2018), Guo et al. (2017), Liao et al. (2017), Song et al. (2017), Warde-Farley & Goodfellow (2016), Xie et al. (2017), Yuan et al. (2017)—the authors state that most of these new defenses can still be broken, mainly amounting to gradient masking (citing Uesato et al. 2018, Athalye et al. 2018a).
    • Uesato et al. (2018), Athalye et al. (2018a)—pointed out that evaluating against weak attacks gives a false sense of security; this paper therefore adds noise at the initial point, runs 500-step attacks, and performs a strong attack evaluation without softmax in the appendix.

    Ensembles and adversarial training

    • Abbasi & Gagné (2017), Thilo Strauss (2017)—proposed using ensemble/combined models to improve adversarial robustness; the authors state that their own experiments show stronger attackers can successfully attack these ensembles.
    • Tramèr et al. (2018)—ensemble adversarial training: using an ensemble of pretrained models to generate adversarial samples transferred to the model being trained, so that training does not overfit to single-step attacks; the authors report strong robustness against black-box attacks. The paper points out that its objective and method differ from this paper: this paper treats the ensemble itself as the prediction model and uses multi-step adversarial training.
    • Lakshminarayanan et al. (2016), Osband et al. (2016)—differing initializations alone can maintain ensemble diversity (for uncertainty estimation); this paper follows this practice.

    Baselines and benchmarks: the baselines are Wide ResNet (Zagoruyko & Komodakis, 2016) and its variants (Baseline, Ensemble2/4, SingleAdv, DoubleAdv, SeparateEnsemble2Adv), and the dataset is CIFAR-10 (Krizhevsky & Hinton, 2009).

    The authors position this paper as follows: unlike Tramèr et al. (2018), which uses an ensemble to generate attack samples, this paper treats the ensemble as the prediction model being trained itself, and reports that this strategy improves robustness against both white-box and black-box attacks.

  3. How does the paper address this problem?

    Treat an ensemble of k small models as a single model, use IFGSM to attack the entire ensemble for adversarial training, and control for parameter count in comparison with a single model.

    Overall approach: the prediction is the average of the outputs of k independently parameterized small models; during training, a multi-step attack is applied to the entire ensemble to generate adversarial examples, followed by adversarial training; the method is given in Algorithm 1, and the authors call it adversarially-trained ensembles.

    Problem formulation

    • Standard training minimizes E(x,y)∼ D L(ŷ, mθ(x)); adversarial examples are generated by maximizing the loss within an allowed set B (an L∞ ball of radius ε), updated iteratively with PGD and projected back onto B, with noise added to the initial point to avoid gradient masking and encourage robustness generalization to the test set.
    • Adversarial training (Madry et al. 2017) minimizes the weighted sum of the clean loss and the adversarial loss E[L(ŷ, mθ(x)) + ρ L(ŷ, mθ(x̃))]; this paper sets ρ = 1.

    Ensembles and diversity

    • The ensemble output is the arithmetic mean of the predicted probabilities of the k models; the authors state they also tried a gating network to produce data-dependent weights, with similar performance.
    • Diversity is maintained solely by different random initializations: training is non-convex, and different initializations converge to different points in parameter space; the authors give a Bayesian interpretation—initialization amounts to sampling from a prior p(θ), training approximates posterior sampling, and the ensemble output approximates the Bayes-optimal classifier.

    Adversarial training of the ensemble (Algorithm 1)

    • Key design: the adversarial example x̃ is generated by attacking the entire ensemble (N-step IFGSM on the loss of the average output of the k models), rather than attacking a single member; the parameter update is likewise based on the clean loss plus the adversarial loss of the ensemble's average output (ρ = 1).
    • The training attack is 7-step IFGSM; the initial noise is ε ∼ N(0, σ²I); the perturbation width is δ (L∞ bound of 8/255 at evaluation time).

    Model variants (Figure 1)

    • Baseline: Wide ResNet, 3×3 convolution + three ResNet blocks each with 28 width factor 10 + batch normalization + ReLU + linear layer.
    • Ensemble2/4: 2 or 4 copies of the base model, without adversarial training.
    • SingleAdv: the base model plus adversarial training, with the same number of parameters as Baseline.
    • DoubleAdv: a widened single model of width 15 with adversarial training, with roughly the same number of parameters as Ensemble2Adv, used to control for parameter count in comparisons.
    • Ensemble2Adv/4Adv: the ensemble as a whole with adversarial training.
    • SeparateEnsemble2Adv: two models each adversarially trained separately and ensembled at test time, used to test "whether robustness comes from adversarially training an ensemble or from ensembling adversarially trained models".

    Training and evaluation protocol

    • CIFAR-10, 500,000 iterations, momentum optimizer, minibatch 128, initial learning rate 0.1, momentum 0.9, learning rate multiplied by 0.2 at 30k/60k/90k steps.
    • Evaluation attacks: white-box IFGSM7 (the training attack), PGD5, PGD20 (Adam updates), with the strongest model additionally run for 500 steps; black-box uses PGD20 examples precomputed per the procedure of Liu et al. (2016) on a logit-averaged ensemble of a Wide ResNet (clean 96.0%) and a VGG-like model (94.5%), and this attack succeeds 100% on that ensemble.
    • Each model is run with 3 random seeds; smoothed with a rolling median of width 50 and outliers beyond 3 standard deviations removed (at most 2 points per evaluation), then interpolated to 1000 time points and averaged.
  4. What experiments did the paper conduct?

    Comparison of 7 model types on CIFAR-10: adversarially trained ensembles reach 0.52–0.53 under PGD20, higher than 0.43–0.44 for single models with the same number of parameters.

    Experimental setup

    • Models evaluated: Baseline, Ensemble2, Ensemble4, SingleAdv, DoubleAdv, Ensemble2Adv, Ensemble4Adv (Table 1), plus SeparateEnsemble2Adv (Figure 2c, Table 1c).
    • Dataset: CIFAR-10, trained for 500,000 iterations, evaluated on the entire test set.
    • Metrics: clean accuracy and accuracy under IFGSM5, PGD5, PGD20, and black box; Table 1a takes the mean of the last 10 evaluation steps, Table 1b takes each model's best step for IFGSM5, and Table 1c is accuracy after a 500-step attack.
    • Attacks: white-box IFGSM and PGD (Adam), L∞ bound 8/255; black-box is precomputed PGD20 transfer samples against a Wide ResNet + VGG-like ensemble.
    • Repeats: 3 random seeds per model, averaged across seeds after smoothing to remove outliers.
    • Review method: no human or LLM review; computed automatically from classification accuracy.

    Main results

    According to Table 1a (mean of last 10 evaluation steps):

    Swipe horizontally to read the table

    ModelcleanIFGSM5PGD5PGD20black box
    Baseline0.940.340.150.010.27
    Ensemble20.940.590.440.300.22
    Ensemble40.910.500.400.340.26
    SingleAdv0.820.550.440.430.80
    DoubleAdv0.830.570.460.440.82
    Ensemble2Adv0.850.620.550.520.83
    Ensemble4Adv0.870.660.580.530.85
    • The authors state: all models with adversarial training drop about 10 points in clean accuracy, consistent with the observation of Madry et al. (2017); on PGD20 the smallest gap between adversarially trained models and Baseline is 22%.
    • The authors state: on PGD20, Ensemble2Adv is 7% higher than SingleAdv, 5% higher than the comparable-parameter-count DoubleAdv, and 29% higher than the non-adversarially-trained Ensemble2 (the original source writes "over the non-adversarially trained Ensemble2Adv", which by context refers to Ensemble2).
    • Figures 2a/2b show: adversarially trained models have stable robustness throughout; non-adversarially-trained models partially recover against IFGSM5 and PGD5 after 200,000–300,000 steps, but unstably, decaying with training, and the authors state that after extending the attack their true robustness is close to 0%.

    Key control: separate training then ensembling

    • Figure 2c and Table 1c: under a 500-step attack, Separate2Adv (IFGSM 0.49, PGD 0.47) is close to SingleAdv (0.46, 0.44) rather than Ensemble2Adv (0.55, 0.52), despite having exactly the same architecture and parameter count.
    • The authors therefore conclude: robustness comes from adversarially training the ensemble as a single model, not from simply ensembling adversarially trained models; Ensemble2 (0.13, 0.02) shows that ensembling alone is hardly robust.

    Appendix strong attack evaluation (Ensemble4Adv)

    • To rule out gradient masking caused by softmax saturation, Appendix A redoes PGD with the Carlini & Wagner (2017b) logit-difference loss, doubling the number of iterations until accuracy no longer decreases; Figure 3 shows accuracy plateaus after about 100 steps.
    • Table 2: Ensemble4Adv overall adversarial accuracy 49.7% (clean 87.6%); the variant without softmax averaging over logits is 48.7% (clean 86.4%); when the four members are attacked individually, their adversarial accuracies are 34.4%, 43.9%, 38.7%, 23.7%, respectively, all lower than the whole.
    • The authors state: if PGD on the softmax-free ensemble is close to optimal, Ensemble4Adv's true adversarial accuracy is unlikely to be much below 48.7%; but stronger attacks that further lower overall accuracy cannot be fully ruled out.

    Other ablations and analysis

    • When ensemble members are attacked individually, accuracy is lower than the whole; the authors propose a possible explanation: members have higher confidence on samples they are robust to and thus greater weight in the ensemble; the authors explicitly state that this hypothesis is unverified.
    • In transfer-based ensemble attacks, averaging the adversarial loss over the 4 members is most effective (slightly better than randomly selecting a member, and better than taking the maximum loss); clipping the loss for a single member weakens the attack.
    • Gating network weighting performs similarly to simple averaging (Section 3).
  5. What are some points that can be further explored?

    The authors propose two follow-up directions: the gains from scaling up ensemble size, and why ensembles are more robust; experiments are limited to CIFAR-10 and L∞ attacks.

    Limitations and future directions noted by the authors

    • Conclusions and Further Work: Future work should investigate whether increasing the number of models in the ensemble while controlling the total parameter count can yield further improvements over the smallest-scale ensembles studied in this paper.
    • Conclusions and Further Work: Future work should investigate why such ensemble architectures are generally more robust than larger single models (even under adversarial training).
    • Appendix A.1: Regarding the explanation that "members are more confident on samples they are themselves robust on, and thus receive larger weights in the ensemble," the authors explicitly state that this has not been studied and consider it an interesting future research direction.
    • Appendix A.1: The authors state that they cannot fully rule out the possibility that a stronger attacker could further reduce the accuracy of the entire ensemble, although they have tried their best to evaluate with the strongest attacks.
    • Section 4.3: The authors point out that the specific values of black-box robustness depend heavily on the similarity between the attack source network and the attacked network, rather than on the true robustness of the attacked network; black-box results serve only as a check against gradient-obfuscation artifacts.

    Scope of experimental coverage

    • All tested models are variants of the Wide ResNet architecture, 8 types in total (including SeparateEnsemble2Adv), and the dataset is only CIFAR-10.
    • The threat model is only L∞ perturbation (upper bound 8/255), and the attacks are IFGSM, PGD, and one precomputed black-box transfer attack.
    • Ensemble sizes are only 2 and 4; adversarial training uses only one configuration: 7-step IFGSM, ρ = 1.
    • 3 random seeds per model; the paper does not report actual measured runtime or memory, and "compute budget" is proxied only by parameter count.
    • The paper does not report statistical significance tests; the black-box attack source models are Wide ResNet and VGG-like ensembles trained by the paper itself.
  6. Summarize the main content of the paper

    An ensemble trained adversarially as a whole is more robust than a single model at the same parameter count; the key is attacking the entire ensemble during training rather than ensembling after the fact.

    An empirical study on adversarial robustness and computational trade-offs (DeepMind, CIFAR-10).

    • Question: neural networks are easily fooled by small adversarial perturbations; the authors ask whether more computation can be traded for robustness, and how best to spend that budget.
    • Method: with Wide ResNet as the base, compare single-model adversarial training (SingleAdv, widened DoubleAdv), ordinary ensembles (Ensemble2/4), adversarially training the ensemble as a single model as a whole (Ensemble2Adv/4Adv, using 7-step IFGSM to attack the entire ensemble during training), and adversarially training separately and then ensembling at test time (SeparateEnsemble2Adv).
    • Main results (Table 1a, PGD20, L∞ 8/255): Ensemble2Adv 0.52, Ensemble4Adv 0.53, higher than SingleAdv 0.43 and the comparable-parameter-count DoubleAdv 0.44; the non-adversarially-trained Ensemble2 is only 0.30.
    • Key control: under a 500-step attack, Separate2Adv (PGD 0.47) is close to SingleAdv (0.44) rather than Ensemble2Adv (0.52); the authors therefore conclude that robustness comes from whole-ensemble adversarial training rather than post-hoc ensembling (Table 1c).
    • Cost and validation: adversarial training lowers clean accuracy by about 10 points; the appendix evaluates with a strong attack without softmax, where Ensemble4Adv has an adversarial accuracy of 49.7%, and the authors state that the true value is unlikely to be much below 48.7%, but do not rule out stronger attacks.
    • Authors' conclusion: increasing parameters can improve robustness, and ensembling small models with whole-ensemble adversarial training is more effective than a single large model; future work should study the benefits of larger-scale ensembles and the source of their robustness.

Related papers

Show 3 more papers
Read originalarxiv.org