The Space of Transferable Adversarial Examples
Abstract
Adversarial examples are maliciously perturbed inputs designed to mislead machine learning (ML) models at testtime. They often transfer: the same adversarial example fools more than one model.
In this work, we propose novel methods for estimating the previously unknown dimensionality of the space of adversarial inputs. We find that adversarial examples span a contiguous subspace of large (~25) dimensionality. Adversarial subspaces with higher dimensionality are more likely to intersect. We find that for two different models, a significant fraction of their subspaces is shared, thus enabling transferability.
In the first quantitative analysis of the similarity of different models’ decision boundaries, we show that these boundaries are actually close in arbitrary directions, whether adversarial or benign. We conclude by formally studying the limits of transferability. We derive (1) sufficient conditions on the data distribution that imply transferability for simple model classes and (2) examples of scenarios in which transfer does not occur. These findings indicate that it may be possible to design defenses against transferbased attacks, even for models that are vulnerable to direct attacks.
vskip=0pt
1 Introduction
Through slight perturbations of a machine learning (ML) model’s inputs at test time, it is possible to generate adversarial examples that cause the model to misclassify at a high rate biggio2013evasion (); szegedy2013intriguing (). Adversarial examples can be used to craft humanrecognizable images that are misclassified by computer vision models szegedy2013intriguing (); goodfellow2014explaining (); moosavi2016deepfool (); kurakin2016adversarial (); liu2016delving (), software containing malware but classified as benign laskov2014practical (); xu2016automatically (); grosse2016adversarial (); hu2017generating (), and game environments that force reinforcement learning agents to misbehave huang2017adversarial (); behzadan2017vulnerability (); lin2017tactics ().
Adversarial examples often transfer across models szegedy2013intriguing (); goodfellow2014explaining (); papernot2016transferability (): inputs generated to evade a specific model also mislead other models trained for the same task. Transferability is an obstacle to secure deployment of ML models as it enables simple blackbox attacks against ML systems. An adversary can train a local model—possibly by issuing prediction queries to the targeted model papernot2016practical ()—and use it to craft adversarial examples that transfer to the target model szegedy2013intriguing (). To defend against such attacks, it is necessary to have a better understanding of why adversarial examples transfer.
Adversarial Subspaces.
Empirical evidence has shown that, rather than being scattered randomly in small pockets, adversarial examples occur in large, contiguous regions goodfellow2014explaining (); WardeFarley16 (). The dimensionality of these subspaces is relevant to the transferability problem: the higher the dimensionality, the more likely it is that the subspaces of two models will intersect significantly.
In this work, we thus directly estimate the dimensionality of these
subspaces.
We introduce methods for finding
multiple orthogonal adversarial directions and show
that these perturbations span a multidimensional contiguous space of
misclassified points.
We measure transferability of these subspaces
on datasets for which diverse model classes
attain high accuracy:
digit classification (MNIST) lecun1998gradient ()
and malware detection (DREBIN) arp2014drebin ().
In addition to sharing many dimensions of the adversarial subspace, we find empirically that the boundaries of this space lie at similar distances from legitimate data points in adversarial directions (e.g., indicated by an adversarial example). More surprisingly, models from different hypothesis classes learn boundaries that are close in arbitrary directions, whether adversarial or benign (e.g., the direction defined by two legitimate points in different classes). We find that when moving into any direction away from data points, the distance to the model’s decision boundary is on average larger than the distance separating the boundaries of two models in that direction. Thus, adversarial perturbations that send data points sufficiently over a model’s decision boundary likely transfer to other models.
The Limits of Transferability.
Given the empirical prevalence of transferability, it is natural to ask whether this phenomenon can be explained by simple properties of datasets, model classes, or training algorithms. In Section 5, we consider the following informal hypothesis: {quoting} If two models achieve low error for some task while also exhibiting low robustness to adversarial examples, adversarial examples crafted on one model transfer to the other.
This hypothesis is pessimistic: it implies that a model cannot be secure against adversarial examples transferred from other models (i.e, blackbox attacks) unless it is also robust to adversarial examples crafted with knowledge of the model’s parameters (i.e., whitebox attacks). While this hypothesis holds in certain contexts, we show that it is not true in the general case.
We derive sufficient conditions on the data distribution that imply a form of the above hypothesis for a set of simple model classes. Namely, we prove transferability of modelagnostic perturbations, obtained by shifting data points in the direction given by the difference in class means (in input space). These adversarial examples are by design effective against linear models. Yet, we show, both formally and empirically, that they can transfer to higherorder (e.g., quadratic) models.
However, we exhibit a counterexample to the above hypothesis by building a variant of the MNIST dataset for which adversarial examples fail to transfer between linear and quadratic models. Our experiment suggests that transferability is not an inherent property of nonrobust ML models.
Our Contributions.
To summarize, we make the following contributions:

We introduce methods for finding multiple independent attack directions, enabling us to directly measure the dimensionality of the adversarial subspace for the first time.

We perform the first quantitative study of the similarity of models’ decision boundaries and show that models from different hypothesis classes learn decision boundaries that lie very close to oneanother in both adversarial and benign directions.

In a formal study, we identify sufficient conditions for transferability of modelagnostic perturbations, as well as tasks where adversarial example transferability fails to hold.
2 Adversarial Example Generation
This work considers attacks mounted with adversarial examples szegedy2013intriguing (); biggio2013evasion () to mislead ML models at test time. We focus on techniques that aim to fool a model into producing untargeted misclassifications (i.e., the model predicts any class other than the ground truth). We first introduce some notation.
A clean input from some domain and its corresponding label.  
An adversarial input in . To enforce , we either clip all pixels to the range for MNIST, or we round all feature values to a binary value for DREBIN.  
The perturbation vector added to an input to create an adversarial example: , and its magnitude i.e., for some appropriate norm (e.g., or ).  
The loss function used to train model (e.g., crossentropy). 
Fast Gradient [Sign] Method (FG[S]M).
For most of the experiments in this paper, we use the method proposed in goodfellow2014explaining (). The FGSM is an efficient technique for generating adversarial examples with a fixed norm: . We will consider variants of this approach that constrain the perturbation using other norms:
(1) 
For general norms, we drop the “sign” in the acronym and simply call it the fast gradient method. We use the implementations provided by the cleverhans 1.0 library papernot2016cleverhans (). Our most successful techniques for finding multiple adversarial directions, described in Section 3, are based on the FGM. We discuss other attacks we considered in Appendix B.
3 Exploring the Space of Transferable Adversarial Examples
Our aim is to evaluate the dimensionality of the adversarial subspace that transfers between models. The FGM discussed above computes adversarial examples by taking one step in the unique optimal direction under a firstorder approximation of the model’s loss. However, we know that adversarial examples form a dense space that is (1) at least twodimensional WardeFarley16 (), and (2) occupies a negligible fraction of the entire input space szegedy2013intriguing (). This raises the question of how “large” this space is. We considered several techniques to find multiple orthogonal adversarial directions for an input point. Here, we only describe the most successful one. Others are described in Appendix B.
3.1 Gradient Aligned Adversarial Subspace (GAAS).
This technique directly estimates the dimensionality of the adversarial subspace under a firstorder approximation of the loss function. For an input , we search the space of perturbations (with ) that result in a significant increase in loss, i.e., , for a . We recast this as the problem of finding a maximal set of orthogonal perturbations , satisfying and . We will need the following simple result:
Lemma 1.
Given and . The maximum number of orthogonal vectors satisfying and is .
The proof is in Appendix C.1. Applying Lemma 1 with , and scaling the obtained unit vectors by , yields a set of orthogonal perturbations that satisfy and , as desired. Informally, the number of orthogonal adversarial directions is proportional to the increase in loss (a proxy for the distance from to the decision boundary) and inversely proportional to the smoothness of the loss function and the perturbation magnitude . If the value of that results in a misclassification is unknown, we try the attack with multiple values of , and retain the value that results in a set with the most misclassified perturbations. An illustration of the GAAS method is given in Figure 2. Finding an analog maximal construction of orthogonal perturbations for other norms (e.g., ) is a nice open problem.
3.2 Experiments
The GAAS method was the most successful at finding a large number of orthogonal attack directions (see Table 3 in Appendix B for results with other techniques). This gives further evidence that neural networks generalize in an overly linear fashion to outofsample data, as first argued by goodfellow2014explaining ().
We first use two fully connected networks trained on MNIST (results on DREBIN are in Appendix B). The source model f (a two layer variant of architecture C from Table 2) for crafting adversarial examples is shallower than the target model f (architecture C). We compute perturbations with norm . Figure 2 plots the probability density function of the dimensionality of the adversarial subspace for each input. On average, we find orthogonal perturbations (and over for the most vulnerable inputs) and directions that transfer to model f. These perturbations span a dense subspace of adversarial inputs: by randomly sampling a perturbation in the spanned space (with an norm of ), we fool model f in of cases, and model f in of cases.
We repeat the experiment for two CNNs (model B in Table 2 as source, and A as target). The transfer rate for the FGM is lower for these models (). We find fewer orthogonal perturbations on the source model (), and, expectedly, fewer that transfer (). Yet, with high probability, points in the spanned adversarial subspace mislead the source () and target () models.
4 Decision Boundary Similarity enables Transferability
Evidenced by Section 3, the existence of large transferable adversarial subspaces suggests that the decision boundaries learned by the source and target models must be extremely close to one another. In this section, we quantitatively characterize this similarity in both adversarial and benign directions. Our measurements show that when moving away from data points in different directions, the distance between two models’ decision boundaries is smaller than the distance separating the data points from either boundary. We further find that adversarial training szegedy2013intriguing (); goodfellow2014explaining () does not significantly “displace” the learned decision boundary, thus leaving defended models vulnerable to blackbox attacks.
4.1 Distance Definitions
Evaluating the decision boundary of an ML model in highdimensions is usually intractable. We thus restrict ourselves to measuring similarity in three linear directions, which are representative of the model behavior on and off the data manifold. These are illustrated in Figure 3. Each direction is defined by a unitnorm vector relative to a data point and some other point , as .
Distance is measured using the norm (we present similar results with the norm in Appendix D). The point is defined differently for each direction, as follows:

Legitimate direction—Written , it is defined by and the closest data point in the test set with a different class label than .

Adversarial direction—Written , it is defined by and an adversarial example generated from to be misclassified by .

Random direction—Written , it is defined by and an input drawn uniformly over the input domain, conditioned on being classified by in a different class than .
These directions are used to define two types of metrics:
Minimum Distances: Given one of the above directions , the minimum distance from a point to the model’s decision boundary is defined as:
(2) 
InterBoundary Distances: We are interested in the distance between the decision boundaries of different models (i.e., the bidirectional arrows in Figure 3). For a point and a direction computed according to (e.g., ), we define the interboundary distance between and as:
(3) 
In the adversarial direction, the interboundary distance is directly related to adversarial example transferability. If the distance is small, adversarial examples crafted from that cross the decision boundary of are likely to also cross the decision boundary of : they transfer.
4.2 Experiments with the MNIST and DREBIN Datasets
We study three models trained on the MNIST and DREBIN tasks: a logistic regression (LR), support vector machine (SVM), and neural network (DNN architecture C in Table 2). For all pairs of models, we compute the mean interboundary distance in the three directions: legitimate, adversarial and random. The mean minimum distance in the same direction acts as a baseline for these values.
In the input domain, we measure distances with the norm and report their mean value over all points in the test set. We use the ( norm) FGM goodfellow2014explaining () to find adversarial directions for differentiable models (the LR and DNN) and the method from papernot2016transferability () for the SVM. To compute the minimum distance from a point to a decision boundary in a particular direction, we use a line search with step size . We do not round DREBIN features to their closest binary value—in contrast to what was done in Section 3. If we did, the line search would become too coarsegrained and yield less accurate measurements of the distances between boundaries. An overview of the results described below is given in Figure 4 for the MNIST dataset. Further results are in Appendix D. These include MNIST results with the norm and results on DREBIN. The observations made below hold for those experiments as well.
Minimum Distance Measurements: Distances to the decision boundary are indicated by filled black bars in Figure 4. As expected, the distance is smallest in adversarial directions. Moreover, decision boundaries are further away in random directions than in directions between the different classes. This corroborates the observation that random noise does not usually cause misclassification szegedy2013intriguing ().
InterBoundary Distances:
We now compare interboundary distances (hatched bars)
with minimum distances (filled black bars).
For most pairs of models and directions, the minimum distance
from a test input to the decision boundary is larger than the
distance between the decision
boundaries of the two models in that direction.
For the adversarial direction, this confirms our hypothesis
on the ubiquity of transferability: for an adversarial example to
transfer, the perturbation magnitude needs to be only
slightly larger than the minimum perturbation required to fool the
source model.
4.3 Impact of Adversarial Training on the Distance between Decision Boundaries
Surprisingly, it has been shown that adversarial examples can transfer even in the presence of explicit defenses goodfellow2014explaining (); papernot2016practical (), such as distillation papernot2016distillation () or adversarial training goodfellow2014explaining (). This suggests that these defenses do not significantly “displace” a model’s decision boundaries (and thus only marginally improve its robustness). Rather, the defenses prevent whitebox attacks because of gradient masking papernot2016towards (), i.e., they leave the decision boundaries in roughly the same location but damage the gradient information used to craft adversarial examples. Hereafter, we investigate to what extent adversarial training displaces a model’s decision boundaries.
We repeat the measurements of minimal and interboundary distances with a pair of DNNs, one of which is adversarially trained. We use the undefended model as source, and target the adversarially trained model. For all directions (legitimate, adversarial and random), we find that the interboundary distance between the source and target models is increased compared to the baseline in Figure 4. However, this increase is too small to thwart transferability. In the adversarial direction, the average interboundary distance increases from (when the target is undefended) to (when the target is adversarially trained). The total perturbation required to find a transferable input (the minimum distance of summed with the interboundary distance) remains smaller than the adversarial perturbation of norm . Thus, adversarial perturbations have sufficient magnitude to “overshoot” the decision boundary of the source model and still transfer to the adversarially trained model.
The transferability of adversarial examples from undefended models to adversarially trained models is studied extensively by Tramèr et al. tramer2017ensemble (). The insights gained yield an improved adversarial training procedure, which increases the robustness of models to these blackbox transferabilitybased attacks.
5 Limits of Transferability
Recall the hypothesis on the ubiquity of transferability formulated in
the introduction:
{quoting}
If two models achieve low error for some task while also exhibiting
low robustness to adversarial examples, adversarial examples crafted
on one model transfer to the other.
We first derive conditions on the data distribution under which a form of this
hypothesis holds. However, we also show a counterexample: a specific task
for which adversarial examples do not transfer between linear and
quadratic models. This suggests that transferability is not an inherent property
of nonrobust ML models and that it may be possible to
prevent blackbox attacks (at least for some model classes)
despite the existence of adversarial examples.
5.1 Sufficient Conditions for Transferability
We present sufficient conditions under which a specific type of adversarial perturbation transfers from input space to richer latent feature spaces in binary classification tasks. These perturbations are model agnostic; they shift data points in the direction given by the difference between the intraclass means. We consider binary classifiers defined as the composition of an arbitrary feature mapping and a linear classifier. These include linear models, polynomial models and feedforward neural networks (where is defined by all but the last layer of the network).
Under natural assumptions, any linear classifier with low risk will be fooled by perturbations in the direction of the difference in class means (this follows from a result by Fawzi et al. fawzi2015analysis ()). Moreover, for classifiers over a richer latent feature set (e.g. quadratic classifiers), we relate robustness to these perturbations to the extent in which the direction between the class means in input space is preserved in feature space. This is a property solely of the data distribution and feature mapping considered.
ModelAgnostic Perturbations.
For a fixed feature mapping , we consider the perturbation (in feature space) that shifts data points in the direction given by the difference in intraclass means. Let
(4) 
where and respectively denote the data distributions of the positive and negative class. For an input , we define the featurespace perturbation , where denotes a nonzero vector normalized to unit norm. For large , the featurespace perturbation will fool any model if the weight vector is aligned with the difference in class means , i.e. we have:
(5) 
For some tasks and model classes, we empirically show that the assumption in (5) must hold for to obtain low error. Following fawzi2015analysis (), we need on average to fool (see Appendix C.2). For tasks with close class means (e.g., many vision tasks fawzi2015analysis ()), the perturbation is thus small.
Do modelagnostic perturbations in input space transfer to models over richer latent feature spaces? Let and denote the difference in means and modelagnostic perturbation in input space, i.e.,
(6) 
If the weight vector is aligned with the difference in class means in feature space , a sufficient condition for transferability is that gets mapped to a perturbation in feature space that is closely aligned with , i.e., . Specifically, consider the orthogonal decomposition
(7) 
where is orthogonal to and of equal norm (i.e., ). Intuitively, we want to be large, and small. If so, we say the mapping is pseudolinear in . Our main theorem (which we prove in Appendix C.2) is as follows:
Theorem 2.
Let , where is a fixed feature mapping. Let be defined as in (6). If the angle is not too small, i.e., , and , then adversarial examples will fool with nonzero probability.
Experiments on MNIST.
We empirically assess the validity of our analysis on the binary task of distinguishing ’s and ’s from the MNIST dataset. We use linear models, quadratic models (, where is a symmetric matrix), DNNs and CNNs. All models are interpreted as having the form for some appropriate mapping .
All models satisfy the assumption in Equation (5): the linear model in feature space is strongly aligned with the difference in class means. In fact, we find that any linear or quadratic model that does not satisfy this assumption has low accuracy for this task. We use the meanshift perturbation defined in (6) with . Examples of perturbed inputs are in Figure 5; the correct labels are selfevident despite the appearance of a faint “ghost” digit in some images.
Table 1 reports the accuracy of each model on clean data and perturbed inputs. All models are partially fooled by these small modelagnostic perturbations. In addition, we report whether each model satisfies the technical conditions of Theorem 2 (i.e., the pseudolinearity of mapping with respect to the perturbation ). Since the quadratic feature mapping satisfies these conditions, any quadratic classifier with high accuracy (and thus positive alignment between and ) will be vulnerable to these perturbations. Thus, any accurate pair of linear and quadratic classifiers for this task will exhibit transferability. This is a special case of the hypothesis formulated at the beginning of this section. The pseudolinearity condition does not hold for the CNN: the perturbation direction is not sufficiently preserved in feature space for our result to hold unconditionally. However, our bounds are (expectedly) somewhat loose and we find that the CNN still misclassifies of perturbed samples.
To generalize this approach to multiclass settings, we can define perturbations through pairwise differences in means: , where has label , and is a chosen target class. We can also use the norm, by setting . With this adversarial perturbation (for ) the same model architectures trained on the full MNIST dataset attain accuracy between (for the linear model) and (for the CNN).
Model  Acc.  Acc. on shifted data  satisfies pseudolinearity in  
Linear  Yes  
Quadratic  Yes  
DNN  Yes  
CNN  No 
Experiments on DREBIN.
We evaluated the same modelagnostic perturbations on the DREBIN dataset. It is noteworthy that on DREBIN, the class mean is less semantically meaningful than on MNIST (i.e., the mean feature vector of all malware applications is unlikely to even belong to the input space of valid programs). Yet, the same perturbation (followed by rounding to binary features) reliably fools both a linear model and a DNN. By modifying fewer than of the binary features on average, the accuracy of the linear model drops to and that of the DNN to .
5.2 XOR Artifacts
The previous analysis shows that transferability can be inherent if models are defined on (or learn) feature representations that preserve the nonrobustness of inputspace features. We now show that if models were to learn very different sets of (possibly nonrobust) features, transferability need not hold. As a thoughtexperiment, consider two models trained on independent subsets of the input features. In this setting, adversarial examples crafted to specifically mislead one of the models would not transfer to the other. However, it is expected that adversarial examples crafted on a model trained over the full feature set would still transfer to both models. Hereafter, we ask a more realistic question: for a given task, can models with access to the same set of input features learn representations for which adversarial examples do not transfer to one another—even when these models are not robust to their own adversarial examples. We provide a simple example of a task for which this is true.
We first train linear and quadratic models on the MNIST 3s vs. 7s task. Both models get over accuracy. FGM examples (with ) transfer between the models at a rate above . We then consider a variant of this dataset with pixels taking values in , and where a special “XOR artifact” is added to images: for two of the center pixels, images of 3s contain a negative XOR (i.e., one of the pixels has positive value, the other negative), and images of 7s contain a positive XOR (both pixels have either positive or negative value). Some examples are shown in Figure 6. Intuitively, this alteration will be ignored by the linear model (the artifact is not linearly separable) but not by the quadratic model as the XOR product is a perfect predictor.
Both models trained on this data remain vulnerable to small, but different, adversarial perturbations. The linear model is fooled by standard FGM examples and the quadratic model is fooled by flipping the sign of the two center pixels. Neither of these perturbations transfers to the other model. Fooling both models simultaneously requires combining the perturbations for each individual model. Our experiment on this artificially altered dataset demonstrates how different model classes may learn very different concepts that, while strongly predictive, have little correspondence with our visual perception of the task at hand. It is interesting to consider whether any real datasets might exhibit a similar property, and thus result in learned models exhibiting low transferability.
Acknowledgments
We thank Ben Poole and Jacob Steinhardt for feedback on early versions of this work. Nicolas Papernot is supported by a Google PhD Fellowship in Security. Research was supported in part by the Army Research Laboratory, under Cooperative Agreement Number W911NF1320045 (ARL Cyber Security CRA), and the Army Research Office under grant W911NF1310421. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Laboratory or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for government purposes notwithstanding any copyright notation hereon.
Appendix A Neural Network Architectures
Model ID  
A  B  C  
Conv(64, 5, 5) + Relu  Dropout(0.2)  
Conv(64, 5, 5) + Relu  Conv(64, 8, 8) + Relu  
Dropout(0.25)  Conv(128, 6, 6) + Relu  FC + Softmax  
FC(128) + Relu  Conv(128, 5, 5) + Relu  
Dropout(0.5)  Dropout(0.5)  
FC + Softmax  FC + Softmax 
Appendix B Finding Multiple Adversarial Directions
Our first two techniques iteratively solve some optimization problem with an additional constraint enforcing orthogonality of the solutions. The latter two estimate the dimensionality of the adversarial space more directly, using firstorder approximations of the model’s output or loss.
SecondOrder Approximations.
Consider an analog of the FGM with a secondorder approximation of the loss function. That is, we want a perturbation that solves , where is the gradient and is the Hessian of the loss function.
We can find orthogonal perturbations as follows: Given a first solution to the above optimization problem, we substitute and by and , where is a projection matrix onto the space orthogonal to . The solution to the updated problem is then orthogonal to .
Convex Optimization for Piecewise Linear Models.
An entirely different approach to finding adversarial examples was proposed by Bastani et al. bastani2016measuring () for the (ubiquitous) case where the model is a piecewise linear function (here we identify the output of with the vector of unnormalized logprobabilities preceding the softmax output). Instead of relying on a linear approximation of the model’s output, their idea is to restrict the search of adversarial perturbations for an input to the convex region around on which is linear.
Let be a point that classifies as class (i.e., ). Further let the “target” be the class to which assigns the secondhighest score. The approach from bastani2016measuring () consists in finding a perturbation as a solution to a convex program with the following constraints, denoted :

, which can be expressed as a set of linear constraints (see bastani2016measuring () for more details).

(although Bastani et al. focus on the norm, any convex norm can be used).

.
If all constraints are satisfied, must be misclassifed (possibly as another class than the target ).
We suggest an extension to this LP for finding orthogonal adversarial directions. After finding a solution with constraint set , we extend the constraints as , and solve the convex program again to find a new solution orthogonal to . This process is iterated until the constraints are unsatisfiable.
Independent JSMA.
For discrete features, such as in the DREBIN dataset, it is difficult to find (valid) orthogonal perturbations using the previous methods.
Instead, we propose a simple noniterative variant of the Jacobianbased Saliency Map Attack (JSMA) from papernot2016limitations (). This iterative method evaluates the Jacobian matrix of the model and ranks features in a saliency map that encodes the adversarial goal papernot2016limitations (). A few input features (typically one or two) with high saliency scores are perturbed (i.e., increased to their maximum value) at each iteration, before repeating the process with the modified input.
We compute the saliency map as in papernot2016limitations () and rank the features by their saliency scores. Given a target dimensionality and a maximal perturbation budget , we group the most salient features into bins of at most features each, such that the sum of saliency scores in each bin are roughly equal (we greedily add new features into the nonfull bin with lowest total score). As the sets of features are independent by construction, they naturally yield orthogonal perturbations. We repeat this process for multiple values of to estimate the dimensionality of the adversarial space.
b.1 Prefiltered Evaluation of the Transfer Rate
To evaluate the transferability from one model to another, we report accuracy in “the prefiltered case,” as done by kurakin2016adversarial (). That is, we report the accuracy of the target model on adversarial examples that meet three criteria: 1) the original example did not fool the first model, and 2) the adversarial example successfully fools the first model. Departing from the metric used by kurakin2016adversarial (), we also require that 3) the original example did not fool the target model. This evaluation metric focuses on the transferability property rather than effects like natural inaccuracy of the models or failure of the adversarial example construction process. Accuracy in this prefiltered case can be considered the “transfer rate” of the adversarial examples.
b.2 Experiments
Model  Method  Transfer Rate  of dirs on f  of dirs on f 
DNN  SecondOrder  
Convex Opti.  
GAAS  
CNN  GAAS 
SecondOrder Approximations.
This attack is not interesting for rectified linear units, because the Hessian of the logits with respect to the inputs is zero (or undefined) everywhere. In order to study this attack with a nonzero Hessian, we use hyperbolic tangent rather than rectified linear units in the source model. Yet, we still find that has only small entries and that the optimal solution to the quadratic problem is close to perfectly aligned with the gradient. The best solution that is orthogonal to the gradient is nonadversarial. Thus, the secondorder approximation is of little use in finding further adversarial directions.
Convex Optimization.
On the source model f, the LP yields an adversarial example for of the test inputs. By solving the LP iteratively, we find a little over orthogonal perturbations on average, and for the “most vulnerable” input. As we restrict the search to a region where the model is linear, these orthogonal perturbations span a dense subspace. That is, any perturbation of norm in the spanned subspace is also adversarial.
However, the
transfer rate for these perturbations is low ( compared to
for the FGM). When considering the full adversarial subspace,
the transferability increases only marginally: for of the
inputs, none of the successful perturbations on model
f transfers to model f.
Thus, although the LP approach may find smaller adversarial
perturbations and in more directions than methods such as
FGM bastani2016measuring (), we also find that it is less
effective at yielding transferable perturbations.
Independent JSMA.
We evaluated the JSMA variant on the DREBIN dataset, for the same DNN models as above. With a maximal budget of flipped features per perturbation, we find at least one successful perturbation for of the inputs, and successful independent perturbations on average. Of these, transfer to the target model on average.
Although we did not verify that all these perturbations truly retain the (non)malicious nature of the input program, we note that flipping a random subset of input features does not cause the models to misclassify at a higher rate than on clean data. As our preprocessing of the DREBIN dataset selects those features that have a large impact on classification (and thus are often useful to adversaries), we don’t expect the number of independent perturbations to increase significantly for variants of DREBIN with larger feature dimensionality.
Appendix C Proofs
c.1 Proof of Lemma 1
We begin with the upper bound. Let . Note that if are orthogonal, we have
which implies . If , the bound is trivial.
We prove the lower bound with a concrete construction of the vectors . Let denote the basis vectors in . Let and denote by a rotation matrix that satisfies (i.e., rotates vectors into the direction given by ). Let , and let be the rotation matrix that satisfies . Then, it is easy to see that is a rotation matrix that satisfies .
The vectors for (these are the first rows of ) are orthonormal, and satisfy .
c.2 Proof of Theorem 2
We begin by deriving the average norm of the perturbation in the latent feature space, so that misclassifies all inputs. Without loss of generality, we assume that (i.e., the sign of the classifier is not constant). The expected  loss of over some data distribution is denoted .
Lemma 3.
Let with and . For any , let be the smallest (in norm) perturbation aligned with , such that . Then,
Proof.
Recall that . If is misclassified by , then . Otherwise, it is easy to see that
A simple adaption of the analysis of Fawzi et al. fawzi2015analysis () (for the case of linear models) yields
Combining these results, we obtain
∎
Lemma 3 is an extension of the result of Fawzi et al. fawzi2015analysis (), who show that if the difference in class means is small, any linear model with low risk can be fooled by small perturbations along the direction of . Because we are interested in the simple “modelagnostic” perturbation that directly follows the difference of means, the magnitude of the perturbation further depends on the alignment between and , which is positive according to the assumption in Equation (5).
We now consider transferability of the perturbation in input space. Recalling (7), we can write
Assume and suppose first that . Then, according to Lemma 3, on average, the minimal value of to get to misclassify is . However, the contribution of has to be taken into account. Note that . Thus, we have
In the worst case, the absolute magnitude of should be increased by to ensure that any nonadversarial contribution of the orthogonal component of the perturbation is canceled out. Thus, in expectation, we need to have misclassify with nonzero probability. Note that this bound is expected to be loose in practice, as the orthogonal component is unlikely to be maximally aligned with .
Appendix D Appendix: Additional Distance Measurements
We provide additional measurements of the similarity in models’ decision boundaries. Interboundary distances computed on the MNIST models with the norm are reported in Figure 6(a). Results for the norm were in Figure 4. Analog results for the DREBIN models are reported in Figure 6(b) and 6(c).
Footnotes
 We use a balanced subset of the DREBIN dataset, preprocessed using feature selection to have features (in lieu of about ). The models we train get over accuracy on this dataset.
 The results with the SVM as source model are quantitatively different (the interboundary distances in the adversarial directions are much larger). This is likely due to our SVM implementation using a “onevsrest” strategy, which yields a different optimization problem for crafting adversarial examples.
 We consider adversaries that attack a target model by transferring adversarial examples crafted on a locally trained model. Note that if an adversary can mount a model theft attack papernot2016practical (); tramer2016stealing () that recovers a sufficiently close approximation of the target model, then any model vulnerable in a whitebox setting can be attacked.
 The approach of Bastani et al. bastani2016measuring () sometimes fails to produce adversarial examples. For instance, for architecture C in Table 2 and perturbations , the obtained LP is solvable for of tested inputs, whereas the FGSM always yields a successful adversarial example.
References
 Daniel Arp, Michael Spreitzenbarth, Malte Hubner, Hugo Gascon, Konrad Rieck, and CERT Siemens. Drebin: Effective and explainable detection of android malware in your pocket. In NDSS, 2014.
 Osbert Bastani, Yani Ioannou, Leonidas Lampropoulos, Dimitrios Vytiniotis, Aditya Nori, and Antonio Criminisi. Measuring neural net robustness with constraints. In NIPS, pages 2613–2621, 2016.
 Vahid Behzadan and Arslan Munir. Vulnerability of deep reinforcement learning to policy induction attacks. arXiv preprint arXiv:1701.04143, 2017.
 Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndić, Pavel Laskov, Giorgio Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In ECMLKDD, pages 387–402. Springer, 2013.
 Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Analysis of classifiers’ robustness to adversarial perturbations. arXiv preprint arXiv:1502.02590, 2015.
 Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
 Kathrin Grosse, Nicolas Papernot, Praveen Manoharan, Michael Backes, and Patrick McDaniel. Adversarial perturbations against deep neural networks for malware classification. arXiv preprint arXiv:1606.04435, 2016.
 Weiwei Hu and Ying Tan. Generating adversarial malware examples for blackbox attacks based on gan. arXiv preprint arXiv:1702.05983, 2017.
 Sandy Huang, Nicolas Papernot, Ian Goodfellow, Yan Duan, and Pieter Abbeel. Adversarial attacks on neural network policies. In ICLR, 2017.
 Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. In ICLR, 2017.
 Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradientbased learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
 YenChen Lin, ZhangWei Hong, YuanHong Liao, MengLi Shih, MingYu Liu, and Min Sun. Tactics of adversarial attack on deep reinforcement learning agents. arXiv preprint arXiv:1703.06748, 2017.
 Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and blackbox attacks. arXiv preprint arXiv:1611.02770, 2016.
 SeyedMohsen MoosaviDezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In CVPR, pages 2574–2582, 2016.
 Nicolas Papernot, Ian Goodfellow, Ryan Sheatsley, Reuben Feinman, and Patrick McDaniel. cleverhans v1.0.0: an adversarial machine learning library. arXiv preprint arXiv:1610.00768, 2016.
 Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. Transferability in machine learning: from phenomena to blackbox attacks using adversarial samples. arXiv preprint arXiv:1605.07277, 2016.
 Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical blackbox attacks against deep learning systems using adversarial examples. arXiv preprint arXiv:1602.02697, 2016.
 Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In Security and Privacy (EuroS&P), 2016 IEEE European Symposium on, pages 372–387. IEEE, 2016.
 Nicolas Papernot, Patrick McDaniel, Arunesh Sinha, and Michael Wellman. Towards the science of security and privacy in machine learning. arXiv preprint arXiv:1611.03814, 2016.
 Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In Security and Privacy (SP), 2016 IEEE Symposium on, pages 582–597. IEEE, 2016.
 Nedim Šrndić and Pavel Laskov. Practical evasion of a learningbased classifier: A case study. In Security and Privacy (SP), 2014 IEEE Symposium on, pages 197–211. IEEE, 2014.
 Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
 Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017.
 Florian Tramèr, Fan Zhang, Ari Juels, Michael K Reiter, and Thomas Ristenpart. Stealing machine learning models via prediction apis. In Usenix Security, 2016.
 David WardeFarley and Ian Goodfellow. Adversarial perturbations of deep neural networks. In Advanced Structured Prediction. 2016.
 Weilin Xu, Yanjun Qi, and David Evans. Automatically evading classifiers. In NDSS, 2016.