A DVERSARIAL R OBUSTNESS A GAINST THE U NION OF M ULTIPLE P ERTURBATION M ODELS
Anonymous authors
Paper under double-blind review
A BSTRACT
Owing to the susceptibility of deep learning systems to adversarial attacks, there has been a great deal of work in developing (both empirically and certiﬁably) robust classiﬁers, but the vast majority has defended against single types of attacks.
Recent work has looked at defending against multiple attacks, speciﬁcally on the MNIST dataset, yet this approach used a relatively complex architecture, claiming that standard adversarial training can not apply because it “overﬁts” to a particular norm.
In this work, we show that it is indeed possible to adversarially train a robust model against a union of norm-bounded attacks, by using a natural generalization of the standard PGD-based procedure for adversarial training to multiple threat models.
With this approach, we are able to train standard architectures which are robust against (cid:96) ∞ , (cid:96) 2 , and (cid:96) 1 attacks, outperforming past approaches on the MNIST dataset and providing the ﬁrst CIFAR10 network trained to be simultaneously robust against ( (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 ) threat models, which achieves adversarial accuracy of 46.1% against the union of ( (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 ) perturbations with radius (cid:15) =
I NTRODUCTION
Machine learning algorithms have been shown to be susceptible to adversarial examples (Szegedy et al., 2014) through the existence of data points which can be adversarially perturbed to be misclassiﬁed, but are “close enough” to the original example to be imperceptible to the human eye.
Methods to generate adversarial examples, or “attacks”, typically rely on gradient information, and most commonly use variations of projected gradient descent (PGD) to maximize the loss within a small perturbation region, usually referred to as the adversary’s threat model.
Since then, a number of heuristic defenses have been proposed to defend against this phenomenon, e.g. distillation (Papernot et al., 2016) or more recently logit-pairing (Kannan et al., 2018).
However, as time goes by, the original robustness claims of these defenses typically don’t hold up to more advanced adversaries or more thorough attacks (Carlini & Wagner, 2017; Engstrom et al., 2018; Mosbach et al., 2018).
One heuristic defense that seems to have survived (to this day) is to use adversarial training against a
PGD adversary (Madry et al., 2018), which remains quite popular due to its simplicity and apparent empirical robustness.
The method continues to perform well in empirical benchmarks even when compared to recent work in provable defenses, although it comes with no formal guarantees.
Some recent work, however, pointed out that adversarial training against (cid:96) ∞ perturbations “ overﬁts ” to the (cid:96) ∞ threat model, and used this as motivation to propose a more complicated architecture in order to achieve robustness to multiple perturbation types on the MNIST dataset (Schott et al., 2019).
In this work, we offer a alternative viewpoint: while adversarial training can overﬁt to the individual threat models, we show that it is indeed possible to use adversarial training to learn a model which is simultaneously robust against multiple types of (cid:96) p norm bounded attacks (we consider (cid:96) ∞ , (cid:96) 2 , and (cid:96) 1 attacks, but the approach can apply to more general attacks).
First, we show while simple generalizations of adversarial training to multiple threat models can achieve some degree of robustness against the union of these threat models, the performance is inconsistent and converges to suboptimal tradeoffs which may not actually minimize the robust objective.
Second, we propose a slightly modiﬁed PGD-based algorithm called multi steepest descent (MSD) for adversarial training which more naturally incorporates the different perturbations within the PGD iterates, further improving the adversarial training approach by directly minimizing the robust optimization objective.
Third, we show empirically that our approach improves upon past work by being applicable to standard network architectures, easily scaling beyond the MNIST dataset, and outperforming past results on robustness against multiple perturbation types
R ELATED WORK
After their original introduction, one of the ﬁrst widely-considered attacks against deep networks had been the Fast Gradient Sign Method (Goodfellow et al., 2015), which showed that a single, small step in the direction of the sign of the gradient could sometimes fool machine learning classiﬁers.
While this worked to some degree, the Basic Iterative Method (Kurakin et al., 2017) (now typically referred to as the PGD attack) was signiﬁcantly more successful at creating adversarial examples, and now lies at the core of many papers.
Since then, a number of improvements and adaptations have been made to the base PGD algorithm to overcome heuristic defenses and create stronger adversaries.
Adversarial attacks were thought to be safe under realistic transformations (Lu et al., 2017) until the attack was augmented to be robust to them (Athalye et al., 2018b).
Adversarial examples generated using PGD on surrogate models can transfer to black box models (Papernot et al., 2017).
Utilizing core optimization techniques such as momentum can greatly improve the attack success rate and transferability, and was the winner of the NIPS 2017 competition on adversarial examples (Dong et al., 2018).
Uesato et al.
(2018) showed that a number of ImageNet defenses were not as robust as originally thought, and Athalye et al.
(2018a) defeated many of the heuristic defenses submitted to
ICLR 2018 shortly after the reviewing cycle ended, all with stronger PGD variations.
Throughout this cycle of attack and defense, some defenses were uncovered that remain robust to this day.
The aforementioned PGD attack, and the related defense known as adversarial training with a PGD adversary (which incorporates PGD-attacked examples into the training process) has so far remained empirically robust (Madry et al., 2018).
Veriﬁcation methods to certify robustness properties of networks were developed, utilizing techniques such as SMT solvers (Katz et al., 2017),
SDP relaxations (Raghunathan et al., 2018b), and mixed-integer linear programming (Tjeng et al., 2019), the last of which has recently been successfully scaled to reasonably sized networks.
Other work has folded veriﬁcation into the training process to create provably robust networks (Wong & Kolter, 2018;
Raghunathan et al., 2018a), some of which have also been scaled to even larger networks (Wong et al., 2018; Mirman et al., 2018; Gowal et al., 2018).
Although some of these could potentially be extended to apply to multiple perturbations simultaneously, most of these works have focused primarily on defending against and verifying only a single type of adversarial perturbation at a time.
Last but most relevant to this work are adversarial defenses that attempt to be robust against multiple types of attacks simultaneously.
Schott et al.
(2019) used multiple variational autoencoders to construct a complex architecture for the MNIST dataset that is not as easily attacked by (cid:96) ∞ , (cid:96) 2 , and (cid:96) 0 adversaries.
Importantly, Schott et al.
(2019) compare to adversarial training with an (cid:96) ∞ -bounded
PGD adversary as described by Madry et al.
(2018), claiming that the adversarial training defense overﬁts to the (cid:96) ∞ metric, and they do not consider other forms of adversarial training.
Following this, a number of concurrent papers have since been released.
While not studied as a defense, Kang et al.
(2019) study the transferability of adversarial robustness between models trained against different threat models.
Croce & Hein (2019) propose a provable adversarial defense against all (cid:96) p norms for p ≥ 1 using a regularization term.
Finally, Tram`er & Boneh (2019) study the theoretical and empirical trade-offs of adversarial robustness in various settings when defending against multiple adversaries, however, they use a rotation and translation adversary instead of an (cid:96) 2 adversary for
CIFAR10.
Contributions In this work we demonstrate the effectiveness of adversarial training for learning models that are robust against a union of multiple perturbation models.
First, we show that while simple aggregations of different adversarial attacks can achieve robustness against multiple perturbations models without resorting to complex architectures, the results are inconsistent across datasets and make suboptimal tradeoffs between the threat models.
Second, we propose a modiﬁed PGD iteration that more naturally considers multiple perturbation models within the inner optimization loop of adversarial training.
Third, we evaluate all approaches on the MNIST and CIFAR10 datasets, showing that our proposed generalizations of adversarial training can signiﬁcantly outperform past approaches for the union of (cid:96) ∞ , (cid:96) 2 , and (cid:96) 1 attacks.
Speciﬁcally, on MNIST, our model achieves 58.7% (individually 63.7%, 82.6%, 62.3%) adversarial accuracy against the union of all three attacks ( (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 ) for (cid:15) =
(0 . 3 , 1 . 5 , 12) respectively, substantially improving upon the multiple-perturbation-model robustness described in Schott et al.
and also improving upon the simpler aggregations of multiple adversarial attacks.
Unlike past work, we also train a CIFAR10 model, which achieves 46.1% (individually 47.6%, 64.3%, 53.4%) adversarial accuracy against the union of all three attacks ( (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 ) for (cid:15) =
Finally, for completeness, we also draw relevant comparisons to concurrent work, and show that the relative advantage of our approach still holds.
O VERVIEW OF ADVERSARIAL TRAINING
Adversarial training is an approach to learn a classiﬁer which minimizes the worst case loss within some perturbation region (the threat model).
Speciﬁcally, for some network f θ parameterized by θ , loss function (cid:96) , and training data { x i , y i } i =1 ...n , the robust optimization problem of minimizing the worst case loss within (cid:96) p norm-bounded perturbations with radius (cid:15) is
[Equation]
where ∆ p,(cid:15) = { δ : (cid:107) δ (cid:107) p ≤ (cid:15) } is the (cid:96) p ball with radius (cid:15) centered around the origin.
To simplify the notation, we will abbreviate (cid:96) ( f θ ( x + δ ) , y ) =
(cid:96) ( x + δ ; θ ) .
3. S OLVING THE INNER OPTIMIZATION PROBLEM
We ﬁrst look at solving the inner maximization problem, namely
[Equation]
This is the problem addressed by the “attackers” in the space of adversarial examples, hoping that the classiﬁer can be tricked by the optimal perturbed image, x + δ (cid:63) .
Typical solutions solve this problem by running a form of projected gradient descent, which iteratively takes steps in the gradient direction to increase the loss followed by a projection step back onto the feasible region, the (cid:96) p ball.
Since the gradients at the example points themselves (i.e., δ = 0 ) are typically too small to make efﬁcient progress, more commonly used is a variation called projected steepest descent .
Steepest descent For some norm (cid:107) · (cid:107) p and step size α , the direction of steepest descent on the loss function (cid:96) for a perturbation δ is [Equation]
[Equation]
Then, instead of taking gradient steps, steepest descent uses the following iteration
[Equation]
In practice, the norm used in steepest descent is typically taken to be the same (cid:96) p norm used to deﬁne the perturbation region ∆ p,(cid:15) .
However, depending on the norm used, the direction of steepest descent can be quite different from the actual gradient (Figure 1).
Note that a single steepest descent step with respect to the (cid:96) ∞ norm reduces to v ∞ ( x ) =
α · sign( ∇ (cid:96) ( x + δ ; θ )) , better known in the adversarial examples literature as the Fast Gradient Sign Method (Goodfellow et al., 2015).
Projections The second component of projected steepest descent for adversarial examples is to project iterates back onto the (cid:96) p ball around x .
Speciﬁcally, projected steepest descent performs the following iteration
[Equation]
where P ∆ p,(cid:15) ( δ ) is the standard projection operator that ﬁnds the perturbation δ (cid:
) ∈ ∆ p,(cid:15) that is “closest” in Euclidean space to the input δ , deﬁned as
[Equation]
Visually, a depiction of this procedure (steepest descent followed by a projection onto the perturbation region) for an (cid:96) 2 adversary can be found in Figure 1.
If we instead project the steepest descent directions with respect to the (cid:96) ∞ norm onto the (cid:96) ∞ ball of allowable perturbations, the projected steepest descent iteration reduces to
[Equation]
where clip [ − (cid:15), + (cid:15) ] “clips” the input to lie within the range [ − (cid:15), (cid:15) ] .
This is exactly the Basic Iterative
Method used in Kurakin et al.
(2017), typically referred to in the literature as an (cid:96) ∞ PGD adversary.
3. S OLVING THE OUTER OPTIMIZATION PROBLEM
We next look at how to solve the outer optimization problem, or the problem of learning the weights θ that minimize the loss of our classiﬁer.
While many approaches have been proposed in the literature, we will focus on a heuristic called adversarial training, which has generally worked well in practice.
Adversarial training Although solving the min-max optimization problem may seem daunting, a classical result known as Danskin’s theorem (Danskin, 1967) says that the gradient of a maximization problem is equal to the gradient of the objective evaluated at the optimum.
For learning models that minimize the robust optimization problem from Equation (1), this means that
[Equation]
where δ ∗ ( x i ) =
arg max δ ∈ ∆ p,(cid:15) (cid:96) ( x i + δ ; θ ) .
In other words, this means that in order to backpropagate through the robust optimization problem, we can solve the inner maximization and backpropagate through the solution.
Adversarial training does this by empirically maximizing the inner problem with a PGD adversary.
Note that since the inner problem is not solved exactly, Danskin’s theorem does not strictly apply.
However, in practice, adversarial training does seem to provide good empirical robustness, at least when evaluated against the (cid:96) p threat model it was trained against.
A DVERSARIAL TRAINING FOR MULTIPLE PERTURBATION MODELS
We can now consider the core of this work, adversarial training procedures against multiple threat models.
More formally, let S represent a set of threat models, such that p ∈ S corresponds to the (cid:96) p perturbation model ∆ p,(cid:15) , and let ∆ S
= (cid:83) p ∈S ∆ p,(cid:15) be the union of all perturbation models in S .
Note that the (cid:15) chosen for each ball is not typically the same, but we still use the same notation (cid:15) for simplicity, since the context will always make clear which (cid:96) p -ball we are talking about.
Then, the generalization of the robust optimization problem in Equation (1) to multiple perturbation models is
[Equation]
The key difference is in the inner maximization, where the worst case adversarial loss is now taken over multiple (cid:96) p perturbation models.
In order to perform adversarial training, using the same motivational idea from Danskin’s theorem, we can backpropagate through the inner maximization by ﬁrst ﬁnding (empirically) the optimal perturbation,
[Equation]
To ﬁnd the optimal perturbation over the union of threat models, we begin by considering straightforward generalizations of standard adversarial training, which will use PGD to approximately solve the inner maximization over multiple adversaries.
4. S IMPLE COMBINATIONS OF MULTIPLE PERTURBATIONS
First, we study two simple approaches to generalizing adversarial training to multiple threat models.
These methods can perform reasonably well in practice and are competitive with existing approaches without relying on complicated architectures. While these methods work to some degree, we later ﬁnd empirically that these methods do not necessarily minimize the worst-case performance, and can converge to unexpected tradeoffs between multiple threat models.
Worst-case perturbation One way to generalize adversarial training to multiple threat models is to use each threat model independently, and train on the adversarial perturbation that achieved the maximum loss.
Speciﬁcally, for each adversary p ∈ S , we solve the innermost maximization with an (cid:96) p PGD adversary to get an approximate worst-case perturbation δ p ,
[Equation]
11) and then approximate the maximum over all adversaries as
[Equation]
When |S| = 1 , then this reduces to standard adversarial training.
Note that if each PGD adversary solved their subproblem from Equation (11) exactly, then this is exactly the optimal perturbation δ (cid:63) .
PGD augmentation with all perturbations Another way to generalize adversarial training is to train on all the adversarial perturbations for all p ∈ S to form a larger adversarial dataset.
Speciﬁcally, instead of solving the robust problem for multiple adversaries in Equation (9), we instead solve
[Equation]
by using individual (cid:96)
p PGD adversaries to approximate the inner maximization for each threat model.
Again, this reduces to standard adversarial training when |S| = 1 .
While these methods work reasonably well in practice (which is shown later in Section 5), both approaches solve the inner maximization problem independently for each adversary, so each individual PGD adversary is not taking advantage of the fact that the perturbation region is enlarged by other threat models.
To take advantage of the full perturbation region, we propose a modiﬁcation to standard adversarial training, which combines information from all considered threat models into a single
PGD adversary that is potentially stronger than the combination of independent adversaries.
4. M ULTI STEEPEST DESCENT
To create a PGD adversary with full knowledge of the perturbation region, we propose an algorithm that incorporates the different threat models within each step of projected steepest descent.
Rather than generating adversarial examples for each threat model with separate PGD adversaries, the core idea is to create a single adversarial perturbation by simultaneously maximizing the worst case loss over all threat models at each projected steepest descent step.
We call our method multi steepest descent (MSD), which can be summarized as the following iteration:
[Equation]
The key difference here is that at each iteration of MSD, we choose a projected steepest descent direction that maximizes the loss over all attack models p ∈ S , whereas standard adversarial training and the simpler approaches use comparatively myopic PGD subroutines that only use one threat model at a time.
The full algorithm is in Algorithm 1, and can be used as a drop in replacement for standard PGD adversaries to learn robust classiﬁers with adversarial training.
We direct the reader to
Appendix A for a complete description of steepest descent directions and projection operators for (cid:96) ∞ , (cid:96) 2 , and (cid:96) 1 norms 1 .
R ESULTS
In this section, we present experimental results on using generalizations of adversarial training to achieve simultaneous robustness to (cid:96) ∞ , (cid:96) 2 , and (cid:96) 1 perturbations on the MNIST and CIFAR10 datasets.
Our primary goal is to show that adversarial training can in fact be adapted to a union of perturbation models using standard architectures to achieve competitive results, without the pitfalls described by
Schott et al.
Our results improve upon the state-of-the-art in three key ways.
First, we can use simpler, standard architectures for image classiﬁers, without relying on complex architectures or input binarization.
Second, our method is able to learn a single MNIST model which is simultaneously robust to all three threat models, whereas previous work was only robust against two at a time.
Finally, our method is easily scalable to datasets beyond MNIST, providing the ﬁrst CIFAR10 model trained to be simultaneously robust against (cid:96) ∞ , (cid:96) 2 , and (cid:96) 1 adversaries.
We trained models using both the simple generalizations of adversarial training to multiple adversaries and also using MSD.
Since the analysis by synthesis model is not scalable to CIFAR10, we additionally trained CIFAR10 models against individual PGD adversaries to measure the changes and tradeoffs in universal robustness.
We evaluated these models with a broad suite of both gradient and non-gradient based attacks using Foolbox 2 (the same attacks used by Schott et al.
and also incorporated all the PGD-based adversaries discussed in this paper.
All aggregate statistics that combine multiple attacks compute the worst case error rate over all attacks for each example.
Summaries of these results at speciﬁc thresholds can be found in Tables 1 and 2, where B-ABS and ABS refer to binarized and non-binarized versions of the analysis by synthesis models from
Schott et al.
, P p refers to a model trained against a PGD adversary with respect to the pnorm, Worst-PGD and PGD-Aug refer to models trained using the worst-case and data augmentation generalizations of adversarial training, and MSD refers to models trained using multi steepest descent.
Full tables containing the complete breakdown of these numbers over all individual attacks used in the evaluation are in Appendix C. We report the results against individual attacks and threat models for completeness, however note that the goal of all these algorithms is to minimize the robust optimization objective from Equation (9). While there may be different implicit tradeoffs between individual threat [Table] models, in the end
[Table]
the most meaningful metric for measuring the effective performance is the robust optimization objective
[Table]
or the performance against the union of all attacks.
5. E XPERIMENTAL SETUP
Architectures and hyperparameters For MNIST, we use a four layer convolutional network with two convolutional layers consisting of 32 and 64 5 × 5 ﬁlters and 2 units of padding, followed by a fully connected layer with 1024 hidden units, where both convolutional layers are followed by 2 ×
Max Pooling layers and ReLU activations (this is the same architecture used by Madry et al.
This is in contrast to past work on MNIST, which relied on per-class variational autoencoders to achieve robustness against multiple threat models (Schott et al., 2019), which was also not easily scalable to larger datasets.
Since our methods have the same complexity as standard adversarial training, they also easily apply to standard CIFAR10 architectures, and in this paper we use the well known pre-activation version of the ResNet18 architecture consisting of nine residual units with two convolutional layers each (He et al., 2016).
A complete description of the hyperparameters used is in Appendix B, with hyperparameters for
PGD adversaries in Appendix B.1, and hyperparameters for adversarial training in Appendix B.2.
All reported (cid:15) are for images scaled to be between the range [0 , 1] .
All experiments can be run on modern GPU hardware (e.g. a single 1080ti).
Attacks used for evaluation To evaluate the model, we incorporate the attacks from Schott et al.
(2019) as well as our PGD based adversaries using projected steepest descent, however we provide a short description here.
Note that we exclude attacks based on gradient estimation, since the gradient for the standard architectures used here are readily available.
For (cid:96) ∞ attacks, although we ﬁnd the (cid:96) ∞ PGD adversary to be quite effective, for completeness, we additionally use the Foolbox implementations of Fast Gradient Sign Method (Goodfellow et al., 2015), PGD adversary (Madry et al., 2018), and the Momentum Iterative Method (Dong et al., 2018).
For (cid:96) 2 attacks, in addition to the (cid:96) 2 PGD adversary, we use the Foolbox implementations of the same
PGD adversary, the Gaussian noise attack (Rauber et al., 2017), the boundary attack (Brendel et al., 2017), DeepFool (Moosavi-Dezfooli et al., 2016), the pointwise attack (Schott et al., 2019), DDN based attack (Rony et al., 2018), and C&W attack (Carlini & Wagner, 2017).
For (cid:96) 1 attacks, we use both the (cid:96) 1 PGD adversary as well as additional Foolbox implementations of (cid:96)
attacks at the same radius, namely the salt & pepper attack (Rauber et al., 2017) and the pointwise attack (Schott et al., 2019).
Note that an (cid:96) 1 adversary with radius (cid:15) is strictly stronger than an (cid:96)adversary with the same radius, and so we choose to explicitly defend against (cid:96) 1 perturbations instead of the (cid:96) 0 perturbations considered by Schott et al.
We make 10 random restarts for each of the evaluation results mentioned hereon for both MNIST and CIFAR10 3 .
We encourage future work in this area to incorporate the same, since the success of all attacks, specially decision based or gradient free ones, is observed to increase signiﬁcantly over restarts. [Figure] Worst-PGD PGD-Augment
[Figure] radius [Figure]
[Figure] cc u r a c y     2 radius 0.
1 radius 0.
[Table]
5. MNIST
We ﬁrst present results on the MNIST dataset, which are summarized in Table 1 (a more detailed breakdown over each individual attack is in Appendix C.1).
While considered an “easy” dataset, we note that the previous state-of-the-art result for multiple threat models on MNIST (and our primary comparison) is only able to defend against two out of three threat models at a time (Schott et al., 2019) using comparatively complex variational autoencoder architectures.
The model trained with MSD achieves the best performance against all attacks, achieving an error rate of 58 .
7% (individually 63 .
6 %, and 62 . 3) % against the union of ( (cid:96) ∞ , (cid:96) 2 , and (cid:96) 1 ) perturbations with radius (cid:15) =
Complete robustness curves over a range of epsilons over each threat model can be found in Figure 2.
A comparison of our results with concurrent work (Tram ` er & Boneh, 2019) can be found in Appendix D.
5. CIFAR
Next, we present results on the CIFAR10 dataset, which are summarized in Table 2 (a more detailed breakdown over each individual attack is in Appendix C.2).
Our MSD approach reaches the best performance against the union of attacks, and achieves 46 .
1% (individually 47 . 3% , 53 . 4% ) adversarial accuracy against the union of ( (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 ) perturbations of size (cid:15) = (0 . 03 , 0 . 5 , 12) .
Interestingly, note that the P 1 model trained against an (cid:96) 1 PGD adversary is not very robust when evaluated against other attacks, even though it can defend reasonably well against the (cid:96) 1 PGD attack in isolation (Table 4 in Appendix C.2).
Complete robustness curves over a range of epsilons over each threat model can be found in Figure 3. A comparison of our results with concurrent work (Tram`er &
Boneh, 2019) can be found in Appendix D. While adversarial defenses are generally not intended to defend against attacks outside of the threat model, we show some experiments exploring this aspect in
Appendix E.
their model without restarts and the adversarial accuracy against all attacks is an upper bound based on the reported accuracies for the individual threat models. Finally, all ABS results were computed using numerical gradient estimation, since gradients are not readily available. [Figure]
On tradeoffs and variability of the simpler defenses One major drawback to the simpler methods for generalizing adversarial training to multiple threat models is their variability and unclear tradeoffs over different settings. For example, on MNIST we see that the data augmentation approach fails to reduce the robust optimization objective: the (cid:96) ∞ threat model dominates the training process and we get a suboptimal tradeoff between threat models which isn’t robust to the union. Similarly, on CIFAR10 we see that the worst-case approach for adversarial training also converges to a model which has suboptimal robust performance against the union of threat models.
This highlights the inconsistency of the simpler generalizations of adversarial training: depending on the dataset and the threat models, they may not ultimately minimize the robust optimization objective from Equation (9), and the tradeoffs may vary signiﬁcantly with the problem setting.
On the other hand, in both problem settings, we ﬁnd MSD is consistent at ﬁnding a more optimal tradeoff which minimizes the worst-case loss in the union of the threat models.
As a result, rather than using one of the simpler methods and convergence to a potentially unclear tradeoff between threat models, we recommend using MSD which directly minimizes the worst case performance among the speciﬁed threat models.
C ONCLUSION
In this paper we showed that adversarial training can be quite effective when training against a union of multiple perturbation models.
We compare two simple generalizations of adversarial training and an improved adversarial training procedure, multi steepest descent, which incorporates the different perturbation models directly into the direction of steepest descent.
MSD based adversarial training procedure is able to outperform past approaches, demonstrating that adversarial training can in fact learn networks that are robust to multiple perturbation models simultaneously (as long as they are included in the threat model) while being scalable beyond MNIST and using standard architectures.
A S TEEPEST DESCENT AND PROJECTIONS FOR (cid:96) ∞ , (cid:96) 2 , AND (cid:96) 1 ADVERSARIES
In this section, we show what the steepest descent and projection steps are for (cid:96) p adversaries for p ∈ {∞ , 2 , 1 } ; these are standard results, but included for a complete description of the algorithms.
Note that this differs slightly from the adversaries considered in Schott et al.
(2019): while they used an (cid:96) 0 adversary, we opted to use an (cid:96) 1 adversary with the same radius.
The (cid:96) 0 ball with radius (cid:15) is contained within an (cid:96) 1 ball with the same radius, so achieving robustness against an (cid:96) 1 adversary is strictly more difﬁcult.
(cid:96) ∞ space The direction of steepest descent with respect to the (cid:96) ∞ norm is
[Equation]
15) and the projection operator onto ∆ ∞ ,(cid:15) is
[Equation]
16) (cid:96) 2 space
The direction of steepest descent with respect to the (cid:96) 2 norm is
[Equation]
x +
[Equation]
17) and the projection operator onto the (cid:96) 2 ball around x is
[Equation]
(cid:96) 1 space
The direction of steepest descent with respect to the (cid:96) 1 norm is
[Equation] [Equation]
where
[Equation] [Equation]
and e i ∗ is a unit vector with a one in position i ∗ .
Finally, the projection operator onto the (cid:96) 1 ball,
[Equation] [Equation]
can be solved with Algorithm 2, and we refer the reader to Duchi et al.
(2008) for its derivation.
A. E NHANCED (cid:96) 1 STEEPEST DESCENT STEP
Note that the steepest descent step for (cid:96) 1 only updates a single coordinate per step.
This can be quite inefﬁcient, as pointed out by Tram`er & Boneh (2019).
To tackle this issue, and also empirically improve the attack success rate, Tram`er & Boneh (2019) instead select the top k coordinates according to Equation 20 to update.
In this work, we adopt a similar but slightly modiﬁed scheme: we randomly sample k to be some integer within some range [ k 1 , k 2 ] , and update each coordinate with step size α (cid:48)
=
α/k .
We ﬁnd that the randomness induced by varying the number of coordinates aids in avoiding the gradient masking problem observed by Tram ` er & Boneh (2019).
A. R ESTRICTING THE STEEPEST DESCENT COORDINATE
The steepest descent direction for both the (cid:96) 0 and (cid:96) 1 norm end up selecting a single coordinate direction to move the perturbation.
However, if the perturbation is already at the boundary of pixel space (for MNIST, this is the range [0,1] for each pixel), then it’s possible for the PGD adversary to get stuck in a loop trying to use the same descent direction to escape pixel space.
To avoid this, we only allow the steepest descent directions for these two attacks to choose coordinates that keep the image in the range of real pixels.
B E XPERIMENTAL DETAILS B. H YPERPARAMETERS FOR PGD ADVERSARIES
In this section, we describe the parameters used for all PGD adversaries in this paper.
MNIST The (cid:96) ∞ adversary used a step size α = 0 .
01 within a radius of (cid:15)
= 0 .
3 for 50 iterations.
The (cid:96) 2 adversary used a step size α = 0 .
1 within a radius of (cid:15)
= 1 . 5 for 100 iterations.
The (cid:96) 1 adversary used a step size of α = 0 .
within a radius of (cid:15) =
12 for 50 iterations.
By default the attack is run with two restarts, once starting with δ =
and once by randomly initializing δ in the allowable perturbation ball.
k 1 = 5, k 2 = 20 as described in A.1.
The MSD adversary used step sizes of α = (0 . 01 , 0 . 2 , 0 . 05) for the ( (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 ) directions within a radius of (cid:15) =
(0 . 3 , 1 . 5 , 12) for 100 iterations.
At test time, we increase the number of iterations to (100 , 200 , 100) for ( (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 ) .
CIFAR
The (cid:96) ∞ adversary used a step size α = 0 .
003 within a radius of (cid:15) = 0 .
03 foriterations.
The (cid:96) 2 adversary used a step size α = 0 .
within a radius of (cid:15) = 0 .
5 for 50 iterations.
The (cid:96) 1 adversary used a step size α = 0 .
1 within a radius of (cid:15)
=
12 for 50 iterations.
k 1 = 5, k 2 =as described in A.1.
The MSD adversary used step sizes of α = (0 . 003 , 0 . 05 , 0 . 05) for the ( (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 ) directions within a radius of (cid:15) =
for 50 iterations.
Note that the MSD model trained for (cid:96) 2 radius of 0.
is in fact robust to a higher radius of 0.5.
B. T RAINING HYPERPARAMETERS
In this section, we describe the parameters used for adversarial training.
For all the models, we used the SGD optimizer with momentum 0.9 and weight decay 5 · 10 − 4 .
MNIST We train the models to a maximum of 20 epochs.
We used a variation of the learning rate schedule from Smith (2018), which is piecewise linear from 0 to 0.1 over the ﬁrst 7 epochs, down to 0.001 over the next 8 epochs, and ﬁnally back down to 0.0001 in the last 5 epochs.
CIFAR10 We used a variation of the learning rate schedule from Smith (2018) to achieve superconvergence in 50 epochs, which is piecewise linear from 0 to 0.1 over the ﬁrst 20 epochs, down to 0.005 over the next 20 epochs, and ﬁnally back down to 0 in the last 10 epochs.
C E XTENDED RESULTS
Here, we show the full tables which break down the overall adversarial error rates over individual attacks for both MNIST and CIFAR10, along with robustness curves for all models in the paper.
[Table]
C. MNIST RESULTS
Expanded table of results Table 3 contains the full table of results for all attacks on all models on the MNIST dataset.
All attacks were run on a subset of the ﬁrst 1000 test examples with 10 random restarts, with the exception of Boundary Attack, which by default makes 25 trials per iteration [Table]
and DDN attack, which does not beneﬁt from restarts owing to a deterministic starting point.
Note that the results for B-ABS and ABS models are from Schott et al.
(2019), which uses gradient estimation techniques whenever a gradient is needed, and the robustness against all attacks for B-ABS and ABS is an upper bound based on the reported results.
Further, these models are not evaluated with restarts, pushing the reported results even higher than actual.
C. CIFAR10 RESULTS
Expanded table of results Table 4 contains the full table of results for all attacks on all models on the CIFAR10 dataset.
All attacks were run on a subset of the ﬁrst 1000 test examples with 10 random restarts, with the exception of Boundary Attack, which by default makes 25 trials per iteration, and
DDN attack, which does not beneﬁt from restarts owing to a deterministic starting point.
Further note that salt & pepper and pointwise attacks in the (cid:96) 1 section are technically (cid:96) 0 attacks, but produce perturbations in the (cid:96) 1 ball.
Finally, it is clear here that while the training against an (cid:96) 1 PGD adversary defends against said PGD adversary, it does not seem to transfer to robustness against other attacks.
D C OMPARISON WITH CONCURRENT WORK
In this section we compare the results of our trained MSD model with that of Tram`er & Boneh (2019), who study the theoretical and empirical trade-offs of adversarial robustness in various settings when defending against multiple adversaries.
Training methods presented by them in their comparisons, namely Adv avg and Adv max closely resemble the naive approaches discussed in this paper: PGDAug and Worst-PGD respectively.
We use the results as is from their work, and additionally compare the position of our MSD models at the revised thresholds used by Tram`er & Boneh (2019) without specially retraining them.
The results of Tables 5 and 6 show that the relative advantage of MSD over naive techniques does hold up.
While we do make a comparison to the most relevant concurrent work for completeness, the [Table] [Table] following differences can bias the robust accuracies reported for the MSD models to relatively lower than expected (and correspondingly, the robust accuracies reported for the other models are relatively higher than expected):
Use of random restarts: We observe in our experiments that using up to 10 restarts for all our attacks leads to a decrease in model accuracy from 5 to 10% across all models.
Tram ` er & Boneh do not mention restarting their attacks for these models and so the results for models apart from MSD in Tables 5, 6 could potentially be lowered with random restarts.
Different training and testing thresholds: The MSD model for the MNIST dataset was trained at (cid:15) =
(0.3, 1.5, 12) for the (cid:96) ∞ , (cid:96) 2 , (cid:96) 1 perturbation balls respectively, while Tram`er & Boneh (2019) tested at (cid:15) = (0.3, 2.0, 10).
This may lower the robust accuracy at these thresholds for the MSD model, since it was not trained for that particular threshold.
Likewise, the MSD model for CIFAR10 was also trained at (cid:15) =
(0.03, 0.05, 12) for the (cid:96) ∞ , (cid:96) 2 , (cid:96)perturbation balls respectively, while Tram`er & Boneh (2019) tested at (cid:15) =
Different perturbation models: For the CIFAR10 results in Table 6, Adv avg & Adv max models are trained and tested only for (cid:96) 1 and (cid:96) ∞ adversarial perturbations, whereas the MSD model is robust to the union of (cid:96) 1 , (cid:96) 2 and (cid:96) ∞ , achieving a much harder task.
Larger Suite of Attacks Used: The attacks used by Tram`er & Boneh are PGD, EAD (Chen et al., 2017) and Pointwise Attack (Schott et al., 2019) for (cid:96) 1 ; PGD, C&W (Carlini & Wagner, 2017) and Boundary Attack (Brendel et al., 2017) for (cid:96) 2 ; and PGD for (cid:96) ∞ adversaries.
We use a more expansive suite of attacks as shown in Appendix C. Some of the attacks like DDN, which proved to be strong adversaries in most cases, were not considered [Table] [Table] by Tram ` er & Boneh (2019) and thus were only used to attack the MSD models in Tablesand
[Table]
E A TTACKS OUTSIDE THE THREAT MODEL
In this section
[Table]
we present some additional experiments exploring the performance of our model on attacks which lie beyond the threat model.
Note that there is no principled reason why we would believe this to be the case (as most adversarial defenses tend to not generalize beyond the threat model defended against)
[Table]
and this is presented for exploratory reasons.
Common corruptions We measure the performance of all the models on CIFAR-10-C, which is a CIFAR10 benchmark which has had common corruptions applied to it (e
[Table]
g. noise, blur
[Table]
and compression).
We report the results in Table 7.
We ﬁnd that that, apart from the P 1 model, the rest achieve some improved robustness against these common corruptions above the standard CIFAR model.
Defending against (cid:96) 1 and (cid:96) ∞ and evaluating on (cid:96)
We also brieﬂy study what happens when one trains against (cid:96) 1 and (cid:96) ∞ threat models, while evaluating against the (cid:96) 2 adversary.
Speciﬁcally, we take the MSD approach on MNIST and simply remove the (cid:96) 2 adversary from the threat model.
This results in a model which has its (cid:96) 1 and (cid:96) ∞ robust performance against a PGD adversary drop by 1% and its (cid:96) 2 robust performance against a PGD adversary (which it was not trained for) drops by 2% in comparison to the original MSD approach on all three threat models.
As a result, we empirically observe that including the (cid:96) 2 threat model in this setting actually improved overall robustness against all three threat models.
Unsurprisingly, the (cid:96) 2 performance drops to some degree, but the model does not lose all of its robustness.