Provable robustness against all adversarial l p -perturbations for p ≥
Abstract
In recent years several adversarial attacks and defenses have been proposed.
Often seemingly robust models turn out to be non-robust when more sophisticated attacks are used.
One way out of this dilemma are provable robustness guarantees.
While provably robust models for speciﬁc l p -perturbation models have been developed, we show that they do not come with any guarantee against other l q -perturbations.
We propose a new regularization scheme, MMR-Universal, for ReLU networks which enforces robustness wrt l 1 - and l ∞ -perturbations and show how that leads to the ﬁrst provably robust models wrt any l p -norm for p ≥
Introduction
The vulnerability of neural networks against adversarial manipulations (Szegedy et al., 2014;
Goodfellow et al., 2015) is a problem for their deployment in safety critical systems such as autonomous driving and medical applications.
In fact, small perturbations of the input which appear irrelevant or are even imperceivable to humans change the decisions of neural networks.
This questions their reliability and makes them a target of adversarial attacks.
To mitigate the non-robustness of neural networks many empirical defenses have been proposed, e.g. by Gu & Rigazio (2015); Zheng et al.
Papernot et al.
; Huang et al.
; Bastani et al.
; Madry et al.
(2018), but at the same time more sophisticated attacks have proven these defenses to be ineﬀective (Carlini & Wagner, 2017;
Athalye et al., 2018; Mosbach et al., 2018), with the exception of the adversarial training of Madry et al.
However, even these l ∞ -adversarially trained models are not more robust than normal ones when attacked with perturbations of small l p -norms with p 6 = ∞ (Sharma & Chen, 2019;
Schott et al., 2019; Croce et al., 2019b; Kang et al., 2019).
The situation becomes even more complicated if one extends the attack models beyond l p -balls to other sets of perturbations (Brown et al., 2017; Engstrom et al., 2017;
Hendrycks &
Dietterich, 2019; Geirhos et al., 2019).
Another approach, which ﬁxes the problem of overestimating the robustness of a model, is provable guarantees, which means that one certiﬁes that the decision of the network does not change in a certain l p -ball around the target point.
Along this line, current state-of-theart methods compute either the norm of the minimal perturbation changing the decision at a point (e.g. Katz et al.
; Tjeng et al.
or lower bounds on it (Hein &
Andriushchenko, 2017; Raghunathan et al., 2018; Wong & Kolter, 2018).
Several new training schemes like (Hein & Andriushchenko, 2017; Raghunathan et al., 2018; Wong & Kolter, 2018;
Mirman et al., 2018; Croce et al., 2019a; Xiao et al., 2019; Gowal et al., 2018) aim at both enhancing the robustness of networks and producing models more amenable to veriﬁcation techniques.
However, all of them are only able to prove robustness against a single kind of perturbations, typically either l 2 - or l ∞ -bounded, and not wrt all the l p -norms simultaneously, as shown in Section 5.
Some are also designed to work for a speciﬁc p (Mirman et al., 2018;
Gowal et al., 2018), and it is not clear if they can be extended to other norms.
The only two papers which have shown, with some limitations, non-trivial empirical robustness against multiple types of adversarial examples are Schott et al.
(2019) and Tramèr & Boneh
(2019), which resist to l 0 - resp.
l 1 -, l 2 - and l ∞ -attacks.
However, they come without provable guarantees and Schott et al.
(2019) is restricted to MNIST.
In this paper we aim at robustness against all the l p -bounded attacks for p ≥ 1.
We study the non-trivial case where none of the l p -balls is contained in another.
If (cid:15) p is the radius of the l p -ball for which we want to be provably robust, this requires: d 1 p − 1 q (cid:15) q > (cid:15) p > (cid:15) q for p <
q and d being the input dimension.
We show that, for normally trained models, for the l 1 - and l ∞ -balls we use in the experiments none of the adversarial examples constrained to be in the l 1 -ball (i.e. results of an l 1 -attack) belongs to the l ∞ -ball, and vice versa.
This shows that certifying the union of such balls is signiﬁcantly more complicated than getting robust in only one of them, as in the case of the union the attackers have a much larger variety of manipulations available to fool the classiﬁer.
We propose a technique which allows to train piecewise aﬃne models (like ReLU networks) which are simultaneously provably robust to all the l p -norms with p ∈ [1 , ∞ ].
First, we show that having guarantees on the l 1 - and l ∞ -distance to the decision boundary and region boundaries (the borders of the polytopes where the classiﬁer is aﬃne) is suﬃcient to derive meaningful certiﬁcates on the robustness wrt all l p -norms for p ∈ (1 , ∞ ).
In particular, our guarantees are independent of the dimension of the input space and thus go beyond a naive approach where one just exploits that all l p -metrics can be upper- and lower-bounded wrt any other l q -metric.
Then, we extend the regularizer introduced in Croce et al.
(2019a)
so that we can directly maximize these bounds at training time.
Finally, we show the eﬀectiveness of our technique with experiments on four datasets, where the networks trained with our method are the ﬁrst ones having non-trivial provable robustness wrt l
, l
- and l ∞ -perturbations
Local properties and robustness guarantees of ReLU networks
It is well known that feedforward neural networks (fully connected, CNNs, residual networks,
DenseNets etc.)
with piecewise aﬃne activation functions, e.g. ReLU, leaky ReLU, yield continuous piecewise aﬃne functions (see e.g. Arora
et al.
; Croce & Hein (2018)).
Croce et al.
(2019a) exploit this property to derive bounds on the robustness of such networks against adversarial manipulations.
In the following we recall the guarantees of Croce et al.
(2019a)
wrt a single l p -perturbation which we extend in this paper to simultaneous guarantees wrt all the l p -perturbations for p in [1 , ∞ ].
2. ReLU networks as piecewise affine functions
Let f : R d → R K be a classiﬁer with d being the dimension of the input space and K the number of classes.
The classiﬁer decision at a point x is given by arg max r =1 ,...,K f r ( x ).
In this paper we deal with ReLU networks, that is with ReLU activation function (in fact our approach can be easily extended to any piecewise aﬃne activation function e.g. leaky ReLU or other forms of layers leading to a piecewise aﬃne classiﬁer as in Croce et al.
(2019b)).
Deﬁnition 2.
A function f : R d → R is called piecewise aﬃne if there exists a ﬁnite set of polytopes { Q r } Mr =1 (referred to as linear regions of f ) such that ∪ Mr =1 Q r = R d and f is an aﬃne function when restricted to every Q r .
Denoting the activation function as σ ( σ ( t ) = max { 0 , t } if ReLU is used) and assuming L hidden layers, we have the usual recursive deﬁnition of f as
[Equation]
=
W ( l ) f ( l − 1) ( x ) + b ( l ) , f ( l ) ( x ) = σ ( g ( l ) ( x )) , l = 1 , . . .
, L, with f (0) ( x ) ≡ x and f ( x ) =
W ( L +1) f
( L ) ( x ) + b ( L +1)
the output of f .
Moreover, W ( l ) ∈
R n l × n l − 1 and b ( l ) ∈ R n l , where n l is the number of units in the l -th layer ( n 0 = d , n L +1 = K ).
For the convenience of the reader we summarize from Croce & Hein (2018) the description of the polytope Q ( x ) containing x and aﬃne form of the classiﬁer f when restricted to Q ( x ).
We assume that x does not lie on the boundary between polytopes (this is almost always true as faces shared between polytopes are of lower dimension).
Let ∆ ( l ) , Σ ( l ) ∈ R n l × n l for l = 1 , . . .
, L be diagonal matrices deﬁned elementwise as ∆ ( l ) ( x ) ij =
( sign( f ( l ) i ( x )) if i = j, else.
, Σ ( l ) ( x ) ij =
(if i = j and f ( l ) i ( x ) > 0 , else.
This allows us to write f ( l ) ( x ) as composition of aﬃne functions, that is f
[Equation]
(cid:16)
[Equation]
×
[Equation] [Equation]
[Equation]
+ b (1) (cid:17) . . .
(cid:17)
+ b ( l − 1) (cid:17)
+ b ( l ) , which we simplify as f ( l ) ( x ) =
V ( l ) x
+ a ( l ) , with V ( l ) ∈ R n l × d and a ( l ) ∈ R n l given by
V ( l
[Equation]
l
[Equation]
− 1 Y j = Σ ( l
[Equation]
j ) ( x ) W ( l − j ) (cid:17) and a ( l ) =
b ( l )
[Equation]
l
[Equation]
1 X
[Equation]
=
[Equation] [Equation]
A forward pass through the network is suﬃcient to compute V ( l ) and b ( l ) for every l .
The polytope Q ( x ) is given as intersection of N = P Ll =1 n l half spaces deﬁned by
Q (
[Equation] [Equation]
[Equation] [Equation]
(cid:8)
[Equation]
∆
[Equation]
l )
[Equation]
x
[Equation]
ii (cid:0)
[Equation]
Finally, the aﬃne restriction of f to Q ( x ) is f ( z ) | Q ( x ) =
f ( L +1)
| Q ( x ) ( z ) =
V ( L +1)
z
+ a ( L +1) .
Let q be deﬁned via 1 p + 1 q = 1 and c the correct class of x .
We introduce
[Equation]
,l,
[Equation]
[Equation]
(cid:13)(cid:13)(cid:13) V ( l ) j (cid:13)(cid:13)(cid:13)
q and d Dp,s ( x )
=
f c ( x ) − f s ( x ) (cid:13)(cid:13)(cid:13) V ( L +1)
c
− V ( L +1) s (cid:13)(cid:13)(cid:13) q , (1) for every l = 1 , . . .
, L , j = 1 , . . .
, n L , s = 1 , . .
, K and s
= c , which represent the N l p -distances of x to the hyperplanes deﬁning the polytope Q ( x ) and the K − 1 l p -distances of x to the hyperplanes deﬁning the decision boundaries in Q ( x ).
Finally, we deﬁne
[Equation] [Equation]
as the minimum values of these two sets of distances (note that d Dp ( x ) < 0 if x is misclassiﬁed).
2. Robustness guarantees inside linear regions
The l p - robustness r p ( x ) of a classiﬁer f at a point x , belonging to class c , wrt the l p -norm is deﬁned as the optimal value of the following optimization problem
[Equation]
where is S a set of constraints on the input, e.g. pixel values of images have to be in [0 , 1].
The l p -robustness r p ( x ) is the smallest l p -distance to x of a point which is classiﬁed diﬀerently from c .
Thus, r p ( x ) = 0 for misclassiﬁed points.
The following theorem from Croce et al.
(2019a), rephrased to ﬁt the current notation, provides guarantees on r p ( x ).
Theorem 2.1 (Croce et al.
(2019a))
If d Bp ( x ) < d Dp ( x ) , then r p ( x ) ≥ d Bp ( x ) , while if | d Dp ( x ) | ≤ d Bp ( x ) , then r p ( x ) = max { d Dp ( x ) , 0 } .
Although Theorem 2.1 holds for any l p -norm with p ≥ 1, it requires to compute d Bp ( x ) and d D p ( x ) for every p individually.
In this paper, exploiting this result and the geometrical arguments presented in Section 3, we show that it is possible to derive bounds on the robustness r p ( x ) for any p ∈ (1 , ∞ ) using only information on r 1 ( x ) and r ∞ ( x ).
In the next section, we show that the straightforward usage of standard l p -norms inequalities does not yield meaningful bounds on the l p -robustness inside the union of the l 1 - and l ∞ -ball, since these bounds depend on the dimension of the input space of the network.
Minimal l p -norm of the complement of the union of l 1 - and l ∞ -ball and its convex hull
Let B 1 = { x ∈ R d : k x k 1 ≤ (cid:15) 1 } and B ∞ = { x ∈ R d : k x k ∞ ≤ (cid:15) ∞ } be the l 1 -ball of radius (cid:15) 1 > 0 and the l ∞ -ball of radius (cid:15) ∞ > 0 respectively, both centered at the origin in R d .
We also assume (cid:15) 1 ∈ ( (cid:15) ∞ , d(cid:15) ∞ ), so that B 1 (cid:42) B ∞ and B ∞ (cid:42) B 1 .
Suppose we can guarantee that the classiﬁer does not change its label in U 1 , ∞ =
B 1 ∪ B ∞ .
Which guarantee does that imply for all intermediate l p -norms?
This question can be simply answered by computing the minimal l p -norms over R d \ U 1 , ∞ , namely min x ∈ R d \ U 1 , ∞ k x k p .
By the standard norm inequalities it holds, for every x ∈ R d , that
[Equation]
∞ and
[Equation]
, and thus a naive application of these inequalities yields the bound
[Equation]
However, this naive bound does not take into account that we know that k x k 1 ≥ (cid:15) 1 and k x k ∞ ≥ (cid:15) ∞ .
Our ﬁrst result yields the exact value taking advantage of this information.
Proposition 3.1 If d ≥ 2 and (cid:15) 1 ∈ ( (cid:15) ∞ , d(cid:15) ∞ ) , then
[Equation]
Thus a guarantee both for l 1 - and l ∞ -ball yields a guarantee for all intermediate l p -norms.
However, for aﬃne classiﬁers a guarantee for B 1 and B ∞ implies a guarantee wrt the convex hull C of their union B 1 ∪ B ∞ .
This can be seen by the fact that an aﬃne classiﬁer generates two half-spaces, and the convex hull of a set A is the intersection of all half-spaces containing
A .
Thus, inside C the decision of the aﬃne classiﬁer cannot change if it is guaranteed not to change in B 1 and B ∞ , as C is completely contained in one of the half-spaces generated by the classiﬁer (see Figure 1 for illustrations of B 1 , B ∞ , their union and their convex hull).
With the following theorem, we characterize, for any p ≥ 1, the minimal l p -norm over R d \ C .
Theorem 3.1 Let C be the convex hull of B 1 ∪ B ∞ .
If d ≥ 2 and (cid:15) 1 ∈ ( (cid:15) ∞ , d(cid:15) ∞ ) , then
[Equation]
where α = (cid:15) 1 (cid:15) ∞ − b (cid:15) 1 (cid:15) ∞ c and 1 p + 1 q = 1 .
Note that our expression in Theorem 3.1 is exact and not just a lower bound.
Moreover, the minimal l p -distance of R d \ C to the origin in Equation (6) is independent from the dimension d , in contrast to the expression for the minimal l p -norm over R d \ U 1 , ∞ in (5) and its naive lower bound in (4), which are both decreasing for increasing d and p > 1.
In Figure 1 we compare visually the largest l 2 -balls (in red) ﬁtting inside either U 1 , ∞ or the convex hull
C in R 3 , showing that the one in C is clearly larger.
In Figure 2 we provide a quantitative comparison in high dimensions.
We plot the minimal l 2 -norm over R d \ C (6) (blue) and over R d \ U 1 , ∞ (5) (red) and its naive lower bound (4) (green).
We ﬁx k x k ∞ =
(cid:15) ∞
=
and vary (cid:15) 1 ∈ [1 , d ], with either d = 784 (left) or d = 3072 (right), i.e. the dimensions of the input spaces of MNIST and CIFAR-10.
One sees clearly that the blue line corresponding to (6) is signiﬁcantly higher than the other two.
In the second and fourth plots of Figurewe show, for each (cid:15) 1 , the ratio of the l 2 -distances given by (6) and (5).
The maximal ratio is about 3 .
8 for d = 784 and 5 . 3 for d = 3072, meaning that the advantage of (6) increases with d (for a more detailed analysis see A.3).
These two examples indicate that the l p -balls contained in C can be a few times larger than those in U 1 , ∞ .
Recall that we deal with piecewise aﬃne networks.
If we could enlarge the linear regions on which the classiﬁer is aﬃne so that it contains the l 1 - and l ∞ -ball of some desired radii, we would automatically get the l p -balls of radii given by Theorem 3.1 to ﬁt in the linear regions.
The next section formalizes the resulting robustness guarantees.
Universal provable robustness with respect to all l p -norms
Combining the results of Theorems 2.1 and 3.1, in the next theorem we derive lower bounds on the robustness of a continuous piecewise aﬃne classiﬁer f , e.g. a ReLU network, at a point x wrt any l p -norm with p ≥ 1 using only d B 1 ( x ), d D 1 ( x ), d B ∞ ( x ) and d D ∞ ( x ) (see (2)).
Theorem 4.1 Let d Bp ( x ) , d Dp ( x ) be deﬁned as in (2) and deﬁne ρ 1 = min { d B 1 ( x ) , | d D 1 ( x ) |} and ρ ∞
=
min { d B ∞ ( x ) , | d D ∞ ( x ) |} .
If d ≥ 2 and x is correctly classiﬁed, then
[Equation]
for any p ∈ (1 , ∞ ) , with α = ρ 1 ρ ∞ − b ρ 1 ρ ∞ c and 1 p + 1 q = 1 .
Croce et al.
(2019a) add a regularization term to the training objective in order to enlarge the values of d Bp ( x ) and d Dp ( x ) for a ﬁxed p , with x being the training points (note that they optimize d Dp ( x ) and not | d Dp ( x ) | to encourage correct classiﬁcation).
Sorting in increasing order d Bp,l,j and d Dp,s , (see (1)), that is the l p -distances to the hyperplanes deﬁning Q ( x ) and to decision hyperplanes, and denoting them as d Bp,π Bi and d Dp,π Di respectively, the Maximum Margin Regularizer (MMR) of Croce et al.
(2019a) is deﬁned as
[Equation]
It tries to push the k B closest hyperplanes deﬁning Q ( x ) farther than γ B from x and the k D closest decision hyperplanes farther than γ D from x both wrt the l p -metric.
In other words, MMR- l p aims at widening the linear regions around the training points so that they contain l p -balls of radius either γ B or γ D centered in the training points.
Using MMR- l p wrt a ﬁxed l p -norm, possibly in combination with the adversarial training of Madry et al.
(2018), leads to classiﬁers which are empirically resistant wrt l p -adversarial attacks and are easily veriﬁable by state-of-the-art methods to provide lower bounds on the true robustness.
For our goal of simultaneous l p -robustness guarantees for all p ≥ 1, we use the insights obtained from Theorem 4.1 to propose a combination of MMR- l 1 and MMR- l ∞ , called MMRUniversal.
It enhances implicitly robustness wrt every l p -norm without actually computing and modifying separately all the distances d Bp ( x ) and
d Dp ( x ) for the diﬀerent values of p .
Deﬁnition 4.1 (MMR-Universal) Let x be a training point.
We deﬁne the regularizer
MMR-Universal (
[Equation]
where k B ∈ { 1 , . . .
, N } , λ 1 , λ ∞ , γ 1 , γ ∞ > 0 .
We stress that, even if the formulation of MMR-Universal is based on MMR- l p , it is just thanks to the novel geometrical motivation provided by Theorem 3.1 and its interpretation in terms of robustness guarantees of Theorem 4.1 that we have a theoretical justiﬁcation of MMR-Universal.
Moreover, we are not aware of any other approach which can enforce simultaneously l 1 - and l ∞ -guarantees, which is the key property of MMR-Universal.
The loss function which is minimized while training the classiﬁer f is then, with { ( x i , y i ) }
Ti = being the training set and CE the cross-entropy loss,
[Equation]
During the optimization our regularizer aims at pushing both the polytope boundaries and the decision hyperplanes farther than γ 1 in l 1 -distance and farther than γ ∞ in l ∞ -distance from the training point x , in order to achieve robustness close or better than γ 1 and γ ∞ respectively.
According to Theorem 4.1, this enhances also the l p -robustness for p ∈ (1 , ∞ ).
Note that if the projection of x on a decision hyperplane does not lie inside Q ( x ), d Dp ( x ) is just an approximation of the signed distance to the true decision surface, in which case Croce et al. (2019a)
argue that it is an approximation of the local Cross-Lipschitz constant which is also associated to robustness (see Hein & Andriushchenko (2017)).
The regularization parameters λ 1 and λ ∞ are used to balance the weight of the l 1 - and l ∞ -term in the regularizer, and also wrt the cross-entropy loss.
Note that the terms of MMR-Universal involving the quantities d Dp,π Dp,i ( x ) penalize misclassiﬁcation, as they take negative values in this case.
Moreover, we take into account the k B closest hyperplanes and not just the closest one as done in Theorems 2.1 and 4.1.
This has two reasons: ﬁrst, in this way the regularizer enlarges the size of the linear regions around the training points more quickly and eﬀectively, given the large number of hyperplanes deﬁning each polytope.
Second, pushing many hyperplanes inﬂuences also the neighboring linear regions of Q ( x ).
This comes into play when, in order to get better bounds on the robustness at x , one wants to explore also a portion of the input space outside of the linear region Q ( x ), which is where Theorem 4.1 holds.
As noted in
Raghunathan et al.
; Croce et al. (2019a); Xiao et al.
(2019), established methods to compute lower bounds on the robustness are loose or completely fail when using normally trained models.
In fact, their eﬀectiveness is mostly related to how many ReLU units have stable sign when perturbing the input x within a given l p -ball.
This is almost equivalent to having the hyperplanes far from x in l p -distance, which is what MMR-Universal tries to accomplish.
This explains why in Section 5 we can certify the models trained with
MMR-Universal with the methods of Wong & Kolter (2018) and Tjeng et al.
Experiments
We compare the models obtained via our MMR-Universal regularizer 1 to state-of-the-art methods for provable robustness and adversarial training.
As evaluation criterion we use the robust test error , deﬁned as the largest classiﬁcation error when every image of the test set can be perturbed within a ﬁxed set (e.g. an l p -ball of radius (cid:15) p ).
We focus on the l p -balls with p ∈ { 1 , 2 , ∞} .
Since computing the robust test error is in general an NP-hard problem, we evaluate lower and upper bounds on it.
The lower bound is the fraction of points for which an attack can change the decision with perturbations in the l p -balls of radius (cid:15) p
(adversarial samples), that is with l p -norm smaller than (cid:15) p .
For this task we use the PGD-attack (Kurakin et al.
(2017); Madry et al.
; Tramèr & Boneh (2019)) and the FAB-attack (Croce & Hein (2019)) for l 1 , l 2 and l ∞ , MIP (Tjeng et al.
for l ∞ and the Linear Region Attack (Croce et al.
(2019b))
for l 2 and apply all of them (see C.3 for details).
The upper bound is the portion of test points for which we cannot certify, using the methods of Tjeng et al.
and Wong & Kolter (2018), that no l p -perturbation smaller than (cid:15) p can change the correct class of the original input.
Smaller values of the upper bounds on the robust test error indicate models with better provable robustness.
While lower bounds give an empirical estimate of the true robustness, it has been shown that they can heavily underestimate the vulnerability of classiﬁers (e.g. by Athalye et al.
(2018); Mosbach et al.
5. Choice of (cid:15) p
In choosing the values of (cid:15) p for p ∈ { 1 , 2 , ∞} , we try to be consistent with previous literature (e.g. Wong & Kolter (2018); Croce et al.
(2019a))
for the values of (cid:15) ∞ and (cid:15) 2 .
Equation (6) provides, given (cid:15) 1 and (cid:15) ∞ , a value at which one can expect l 2 -robustness (approximately (cid:15) 2 = √ (cid:15) 1 (cid:15) ∞ ).
Then we ﬁx (cid:15) 1 such that this approximation is slightly larger than the desired (cid:15) 2 .
We show in Table 1 the values chosen for (cid:15) p , p ∈ { 1 , 2 , ∞} , and used to compute the robust test error in Table 2.
Notice that for these values no l p -ball is contained in the others.
[Table]
Moreover, we compute for the plain models the percentage of adversarial examples given by an l 1 -attack (we use the PGD-attack) with budget (cid:15) 1 which have also l ∞ -norm smaller than or equal to (cid:15) ∞ , and vice versa.
These percentages are zero for all the datasets, meaning that being (provably) robust in the union of these l p -balls is much more diﬃcult than in just one of them (see also C.1). [Table]
5. Main results
We train CNNs on MNIST, Fashion-MNIST (Xiao et al.
German Traﬃc Sign (GTS) (Stallkamp et al.
and CIFAR-10 (Krizhevsky et al.
We consider several training schemes: plain training, the PGD-based adversarial training (AT) of Madry et al.
(2018) and its extension to multiple l p -balls in Tramèr & Boneh (2019), the robust training (KW) of Wong & Kolter (2018);
Wong et al.
(2018), the MMR-regularized training (MMR) of
Croce et al.
(2019a), either alone or with adversarial training (MMR+AT) and the training with our regularizer MMR-Universal.
We use AT, KW, MMR and MMR+AT wrt l 2 and l ∞ , as these are the norms for which such methods have been used in the original papers.
More details about the architecture and models in C.3.
In Table 2 we report test error (TE) computed on the whole test set and lower (LB) and upper (UB) bounds on the robust test error obtained considering the union of the three l p -balls, indicated by l 1 + l 2 + l ∞ (these statistics are on the ﬁrst 1000 points of the test set).
The lower bounds l 1 + l 2 + l ∞ -LB are given by the fraction of test points for which one of the adversarial attacks wrt l 1 , l 2 and l ∞ is successful.
The upper bounds l 1 + l 2 + l ∞ -UB are computed as the percentage of points for which at least one of the three l p -balls is not certiﬁed to be free of adversarial examples (lower is better).
This last one is the metric of main interest, since we aim at universally provably robust models.
In C.2 we report the lower and upper bounds for the individual norms for every model.
MMR-Universal is the only method which can give non-trivial upper bounds on the robust test error for all datasets, while almost all other methods aiming at provable robustness have l 1 + l 2 + l ∞ -UB close to or at 100%.
Notably, on GTS the upper bound on the robust test error of MMR-Universal is lower than the lower bound of all other methods except
AT-( l 1 , l 2 , l ∞ ), showing that MMR-Universal provably outperforms existing methods which provide guarantees wrt individual l p -balls, either l 2 or l ∞ , when certifying the union l 1 + l 2 + l ∞ .
The test error is slightly increased wrt the other methods giving provable robustness, but the same holds true for combined adversarial training AT-( l 1 , l 2 , l ∞ ) compared to standard adversarial training AT- l 2 /l ∞ .
We conclude that MMR-Universal is the only method so far being able to provide non-trivial robustness guarantees for multiple l p -balls in the case that none of them contains any other.
Conclusion
With MMR-Universal we have proposed the ﬁrst method providing provable robustness guarantees for all l p -balls with p ≥ 1.
Compared to existing works guaranteeing robustness wrt either l 2 or l ∞ , providing guarantees wrt the union of diﬀerent l p -balls turns out to be considerably harder.
It is an interesting open question if the ideas developed in this paper can be integrated into other approaches towards provable robustness.
Acknowledgements
We would like to thank Maksym Andriushchenko for helping us to set up and adapt the original code for MMR.
We acknowledge support from the German Federal Ministry of
Education and Research (BMBF) through the Tübingen AI Center (FKZ: 01IS18039A).
This work was also supported by the DFG Cluster of Excellence “Machine Learning – New
Perspectives for Science”, EXC 2064/1, project number 390727645, and by DFG grant 389792660 as part of TRR 248.
A Minimal l p -norm of the complement of the union of l 1 - and l ∞ -ball and its convex hull A. Proof of Proposition 3.
Proof.
We ﬁrst note that for (cid:15) 1 < (cid:15) ∞
it holds B 1 ⊂ B ∞ and the proof follows from the standard inequality k x k p ≥ k x k ∞ where equality is attained for x = (cid:15)
∞
e i , where e i are standard basis vectors.
Moreover, if (cid:15) 1 > d(cid:15) ∞ it holds B ∞ ⊂ B 1 as max x ∈ B ∞ k x k 1 = d(cid:15) ∞ and the result follows by k x k p ≥ k x k 1 d 1 − pp .
The equality is realized by the vector with all the entries equal to (cid:15) 1 d .
For the second case we ﬁrst note that using Hölder inequality | h u, v i | ≤
k u k p
k
v k q where 1 p + 1 q = 1, it holds
[Equation]
Let x ∈ R d .
Without loss of generality after a potential permutation of the coordinates it holds | x d | = k x k ∞ .
Then we get k x k pp =
d X i =
| x
[Equation]
|
[Equation]
= |
[Equation]
|
[Equation]
+ d
[Equation]
X
[Equation]
=
[Equation]
|
[Equation]
|
[Equation]
[Equation] [Equation]
We have
[Equation]
noting that | x d | = k x k ∞ and P d − 1 i =1 | x i | ≥ (cid:15) 1 − (cid:15) ∞ .
Finally, we note that the vector
[Equation]
realizes equality.
Indeed, k v k pp =
( d − 1) ( (cid:15) 1 − (cid:15) ∞ ) p ( d − 1) p + (cid:15) p ∞ , which ﬁnishes the proof.
(cid:3)
A. Proof of Theorem 3.
Proof.
We ﬁrst note that the minimum of the l p -norm over R d \ C lies on the boundary of C (otherwise any point on the segment joining the origin and y and outside C would have l p -norm smaller than y ).
Moreover, the faces of C are contained in hyperplanes constructed as the aﬃne hull of a subset of d points from the union of the vertices of B 1 and B ∞ .
The vertices of B 1 are V 1 = { (cid:15)
e i , − (cid:15) 1 e i |
i
= 1 , . . .
, d } , where e i is the i -th element of the standard basis of R d , and that of B ∞ are V ∞ , consisting of the 2 d vectors whose components are elements of { (cid:15) ∞ , − (cid:15) ∞ } .
Note that V 1 ∩ V ∞ = ∅ .
Any subset of d vertices from V 1 ∪ V ∞ deﬁnes a hyperplane which contains a face of C if it does not contain any point of the interior of C .
Let S be a set of vertices deﬁning a hyperplane containing a face of C .
We ﬁrst derive conditions on the vertices contained in S .
Let k = j (cid:15) 1 (cid:15) ∞ k ∈ N and α = (cid:15) 1 (cid:15) ∞ − k ∈ [0 , 1).
Note that k + 1 > (cid:15) 1 (cid:15) ∞ .
Then no more than k vertices of B 1 belong to S , that is to a face of
C .
In fact, if we consider k + 1 vertices of B 1 , namely wlog { (cid:15) 1 e 1 , . . .
, (cid:15)
e k +1 } , and consider their convex combination z
= (cid:15) 1 P k +1 i =
k +
e i then k z k ∞ =
(cid:15) 1 k +1 < (cid:15) ∞ by the deﬁnition of k .
Thus S cannot contain more than k vertices of B 1 .
Second, assume (cid:15) 1 e j is in S .
If any vertex v of B ∞ with v j = − (cid:15) ∞ is also in S then, with α 0 = (cid:15) ∞ (cid:15)
+ (cid:15) ∞ ∈ (0 , 1)
, we get k α 0 (cid:15) 1 e j + (1 − α 0 ) v k ∞ =
max {| α 0 (cid:15) 1 − (1 − α 0 ) (cid:15) ∞ | , (1 − α 0 ) (cid:15) ∞ } , where (1 − α 0 ) (cid:15) ∞ < (cid:15) ∞ and
[Equation]
Thus S would not span a face as a convex combination intersects the interior of C .
This implies that if (cid:15) 1 e j is in S then all the vertices v of B ∞ in S need to have v j = (cid:15) ∞ , otherwise
S would not deﬁne a face of C .
Analogously, if − (cid:15) 1 e j ∈ S then any vertex v of B ∞ in S has v j = − (cid:15) ∞ .
However, we note that out of symmetry reasons we can just consider faces of
C in the positive orthant and thus we consider in the following just sets S which contain vertices of “positive type” (cid:15) 1 e j .
Let now S be a set (not necessarily deﬁning a face of C ) containing h ≤ k vertices of B 1 and d − h vertices of B ∞ and P the matrix whose columns are these points.
The matrix P has the form
[Equation]
 where A ∈ R d − h,d − h is a matrix whose entries are either (cid:15) ∞ or − (cid:15) ∞ .
If the matrix P does not have full rank then the origin belongs to any hyperplane containing S , which means it cannot be a face of C .
This also implies A has full rank if S spans a face of C .
We denote by π the hyperplane generated by the aﬃne hull of S (the columns of
P ) assuming that A has full rank.
Every point b belonging to the hyperplane π generated by S is such that there exists a unique a ∈ R d which satisﬁes
[Equation]
[Equation]
where 1 d 1 ,d 2 is the matrix of size d 1 × d 2 whose entries are 1.
The matrix ( P 0 , b 0 ) ∈ R d +1 ,d +1 need not have full rank, so that rank P 0 = rank( P 0 , b 0 )
= dim a = d and then the linear system P 0 a = b 0 has a unique solution.
We deﬁne the vector v ∈ R d as solution of P T v = 1 d, 1 , which is unique as P has full rank.
From their deﬁnitions we have Pa = b and 1 T a = 1, so that
[Equation]
and thus
[Equation]
(10) noticing that this also implies that any vector b ∈ R d such that h b, v i = 1 belongs to π (suppose that ∃ q / ∈ π with h q, v i = 1, then deﬁne c as the solution of Pc = q
and then 1 = h q, v i
=
h
Pc, v i =
(cid:10) c, P T v (cid:11) =
h c, 1 i which contradicts that q / ∈ π ).
Applying Hölder inequality to (10) we get for any b ∈ π ,
[Equation]
where 1 p + 1 q = 1.
Moreover, as p ∈ (1 , ∞ ) there exists always a point b ∗ for which (11) holds as equality.
In the rest of the proof we compute k v k q for any q > 1 when S is a face of C and then (11) yields the desired minimal value of k b k p over all b lying in faces of C .
Let v = ( v 1 , v 2 ), v 1 ∈ R h , v 2 ∈ R d − h
and I h denotes the identity matrix of R h,h .
It holds
[Equation]
which implies
[Equation]
Moreover, we have
[Equation]
If S generates a face, then by deﬁnition π does not intersect with the interior of C and thus it holds for all b ∈ π : k b k 1 ≥ (cid:15) 1 and k b k ∞ ≥ (cid:15) ∞ .
Suppose k v k 1 = c > 1 (cid:15) ∞ .
Then there exists b ∗ ∈
π such equality in Hölder’s equality is realized, that is 1 = h b ∗ , v i =
k b ∗ k ∞ k v k 1 , and thus k b ∗ k ∞ =
1 c < (cid:15) ∞ , which contradicts k b k ∞ ≥ (cid:15) ∞ for all b ∈ π and thus it must hold k v k 1 ≤ 1 (cid:15) ∞ .
Similarly, one can derive k v k ∞ ≤ 1 (cid:15) 1 .
Combining (12) with the just derived inequalities we get upper bounds on the norms of v 2 ,
[Equation]
and
[Equation] [Equation]
Furthermore v 2 is deﬁned as the solution of
[Equation]
We note that all the entries of A T (cid:15) ∞ are either 1 or − 1, so that the inner product between each row of A T and v 2 is a lower bound on the l 1 -norm of v 2 .
Since every entry of the r.h.s.
of the linear system is 1 (cid:15) ∞ − h(cid:15)
we get k v 2 k 1 ≥ 1 (cid:15) ∞ − h(cid:15) 1 , which combined with (13) leads to k v 2 k 1 = 1 (cid:15)
∞ − h(cid:15) 1 .
This implies that A T (cid:15) ∞ v 2 = k v 2 k 1 .
In order to achieve equality h u, v i =
k v k 1 it has to hold u i =
sgn
( v i ) for every v i 6 = 0.
If at least two components of v were non-zero, the corresponding columns of A T would be identical, which contradicts the fact that A T has full rank.
Thus v 2 can only have one non-zero component which in absolute value is equal to(cid:15) ∞ − h(cid:15)
Thus, after a potential reordering of the components, v has the form
[Equation]
From the second condition in (13), we have 1 (cid:15) ∞ − h(cid:15) 1 ≤ 1 (cid:15) 1 and h + 1 ≥ (cid:15) 1 (cid:15) ∞ =
k
+ α .
Recalling h ≤ k , we have
[Equation]
This means that, in order for S to deﬁne a face of C , we need h
= k
if α > 0, h ∈ { k − 1 , k } if α = 0 (in this case choosing h = k − 1 or h = k leads to the same v , so in practice it is possible to use simply h
= k for any α ).
Once we have determined v , we can use again (10) and (11) to see that
[Equation]
Finally, for any v there exists b ∗ ∈ π for which equality is achieved in (14).
Suppose that this b ∗ does not lie in a face of C .
Then one could just consider the line segment from the origin to b ∗ and the point intersecting the boundary of C would have smaller l p -norm contradicting the just derived inequality.
Thus the b ∗ realizing equality in (14) lies in a face of C .
[Equation]
A. Comparison of the robustness guarantee for the union of B 1 and B ∞ in (5) and the convex hull of B 1 and B ∞ in (6)
We compare the robustness guarantees obtained by considering the union of B 1 and B ∞ (denoted by b U in the following), see (5), and the convex hull of B 1 and B ∞ (denoted by b C in the following), see (6).
In particular, we want to determine the ratio δ = (cid:15) 1 (cid:15) ∞ ∈
[1 , d ] for which the gain in the robustness guarantee b C for the convex hull is maximized compared to just considering the robustness guarantee b U as a function of the dimension d of the input space.
We restrict here the analysis to the case of p = 2, that is computing the radius of the largest l 2 -ball ﬁtting inside U 1 , ∞ or its convex hull C .
Let us denote
[Equation]
the two bounds from (5) and (6) respectively, which can be rewritten as
[Equation]
where α = δ − b δ c .
We note that δ − 1 ≤ δ − α + α
[Equation]
b
[Equation]
+
[Equation]
δ − b δ c ) q ≤ δ.
As the diﬀerences are very small, we use instead the lower bound
[Equation]
We want to ﬁnd the value δ ∗ which maximizes b ∗ C b U ( δ ) varying d (a numerical evaluation is presented in Figure 2).
Notice ﬁrst that δ ∗ maximizes also
[Equation]
and can be found as the solution of
[Equation]
which is equivalent to
[Equation]
Restricting the analysis to p = 2 for simplicity, we get
[Equation]
and one can check that δ ∗ is indeed a maximizer.
Moreover, at δ ∗ we have a ratio between the two bounds
[Equation]
We observe that the improvement of the robustness guarantee by considering the convex hull instead of the union is increasing with dimension and is ≈ 3 .
8 for d = 784 and ≈ 5 .
3 for d = 3072.
Thus in high dimensions there is a considerable gain by considering the convex hull.
B Universal provable robustness with respect to all l p -norms B. Proof of Theorem 4.
Proof.
From the deﬁnition of d Bp ( x ) and d Dp ( x ) we know that none of the hyperplanes { π j } j (either boundaries of the polytope Q ( x ) or decision hyperplanes) identiﬁed by V ( l ) and v ( l ) , l = 1 , . . .
, L + 1, is closer than min { d Bp ( x ) , | d Dp ( x ) |} in l p -distance.
Therefore the interior of the l 1 -ball of radius ρ 1 (namely, B 1 ( x, ρ 1 ))
and of the l ∞ -ball of radius ρ ∞ ( B ∞ ( x, ρ ∞ )) centered in x does not intersect with any of those hyperplanes.
This implies that { π j } j are intersecting the closure of R d \ conv( B 1 ( x, ρ 1 ) ∪ B ∞ ( x, ρ ∞ )).
Then, from Theorem 3.1 we get
[Equation]
Finally, exploiting Theorem 2.1, r p ( x ) ≥ min { d Bp ( x ) , | d Dp ( x ) |} holds.
(cid:3)
C Experiments C. Choice of (cid:15) p
In Table 3 we compute the percentage of adversarial perturbations given by the PGD-attack wrt l p with budget (cid:15) p which have l q -norm smaller than (cid:15) q , for q 6 = p (the values of (cid:15) p and (cid:15) q used are those from Table 1).
We used the plain model of each dataset.
The most relevant statistics of Table 3 are about the relation between the l 1 - and l ∞ - perturbations (ﬁrst two rows).
In fact, none of the adversarial examples wrt l 1 is contained in the l ∞ -ball, and vice versa.
This means that, although the volume of the l 1 -ball is much smaller, even because of the intersection with the box constraints [0 , 1] d , than that of the l ∞ -ball in high dimension, and most of it is actually contained in the l ∞ -ball, the adversarial examples found by l 1 -attacks are anyway very diﬀerent from those got by l ∞ -attacks.
The choice of such (cid:15) p is then meaningful, as the adversarial perturbations we are trying to prevent wrt the various norms are non-overlapping and in practice exploit regions of the input space signiﬁcantly diverse one from another.
Moreover, one can see that also the adversarial manipulations wrt l 1 and l 2 do not overlap.
Regarding the case of l 2 and l ∞ , for MNIST and F-MNIST it happens that the adversarial examples wrt l 2 are contained in the l ∞ -ball.
However, as one observes in Table 4, being able to certify the l ∞ -ball is not suﬃcient to get non-trivial guarantees wrt l 2 .
In fact, all the models trained on these datasets to be provably robust wrt the l ∞ -norm, that is KW- l ∞ ,
MMR- l ∞ and MMR+AT- l ∞ , have upper bounds on the robust test error in the l 2 -ball larger than 99%, despite the values of the lower bounds are small (which means that the attacks could not ﬁnd adversarial perturbations for many points).
Such analysis conﬁrms that empirical and provable robustness are two distinct problems, and the interaction of diﬀerent kinds of perturbations, as we have, changes according to which of these two scenarios one considers.
[Table]
[Table] [Table]
C. Main results
In Table 4 we report, for each dataset, the test error and upper and lower bounds on the robust test error, together with the (cid:15) p used, for each norm individually.
It is clear that training for provable l p -robustness (expressed by the upper bounds) does not, in general, yield provable l q -robustness for q 6 = p , even in the case where the lower bounds are small for both p and q .
In order to compute the upper bounds on the robust test error in Tables 2 and 4 we use the method of Wong & Kolter (2018) for all the three l p -norms and that of Tjeng et al.
(2019) only for the l ∞ -norm.
This second one exploits a reformulation of the problem in (3) in terms of mixed integer programming (MIP), which is able to exactly compute the solution of (3) for p ∈ { 1 , 2 , ∞} .
However, such technique is strongly limited by its high computational cost.
The only reason why it is possible to use it in practice is the exploitation of some presolvers which are able to reduce the complexity of the MIP.
Unfortunately, such presolvers are eﬀective just wrt l ∞ .
On the other hand, the method of Wong & Kolter (2018) applies directly to every l p -norm.
This explains why the bounds provided for l ∞ are tighter than those for l 1 and l 2 .
C. Experimental details
The convolutional architecture that we use is identical to Wong & Kolter (2018), which consists of two convolutional layers with 16 and 32 ﬁlters of size 4 × 4 and stride 2, followed by a fully connected layer with 100 hidden units.
The AT- l ∞ , AT- l 2 , KW, MMR and
MMR+AT training models are those presented in Croce et al.
(2019a)
and available at https: //github.com/max-andr/provable-robustness-max-linear-regions .
We trained the
AT-( l 1 , l 2 , l ∞ ) performing for each batch of the 128 images the PGD-attack wrt the three norms (40 steps for MNIST and F-MNIST, 10 steps for GTS and CIFAR-10) and then training on the point realizing the maximal loss (the cross-entropy function is used), for 100 epochs.
For all experiments with MMR-Universal we use batch size
and we train the models for 100 epochs.
Moreover, we use Adam optimizer of Kingma & Ba (2014) with learning rate of 5 × 10 − 4 for MNIST and F-MNIST, 0.001 for the other datasets.
We also reduce the learning rate by a factor of 10 for the last 10 epochs.
On CIFAR-10 dataset we apply random crops and random mirroring of the images as data augmentation.
For training we use MMR-Universal as in (9) with k B linearly (wrt the epoch) decreasing from 20% to 5% of the total number of hidden units of the network architecture.
We also use a training schedule for λ p where we linearly increase it from λ p / 10 to λ p during the ﬁrst 10 epochs.
We employ both schemes since they increase the stability of training with MMR.
In order to determine the best set of hyperparameters λ 1 , λ ∞ , γ 1 , and γ ∞ of MMR, we perform a grid search over them for every dataset.
In particular, we empirically found that the optimal values of γ p are usually between 1 and 2 times the (cid:15) p used for the evaluation of the robust test error, while the values of λ p are more diverse across the diﬀerent datasets.
Speciﬁcally, for the models we reported in Table 4 the following values for the ( λ 1 , λ ∞ ) have been used: (3.0, 12.0) for MNIST, (3.0, 40.0) for F-MNIST, (3.0, 12.0) for GTS and (1.0, 6.0) for CIFAR-10.
In Tables 2 and 4, while the test error which is computed on the full test set, the statistics regarding upper and lower bounds on the robust test error are computed on the ﬁrstpoints of the respective test sets.
For the lower bounds we use the FAB-attack with the original parameters, 100 iterations and 10 restarts.
For PGD we use also 100 iterations and 10 restarts: the directions for the update step are the sign of the gradient for l ∞ , the normalized gradient for l 2 and the normalized sparse gradient suggested by Tramèr & Boneh (2019) with sparsity level 1% for MNIST and F-MNIST, 10% for GTS and CIFAR-10.
Finally we use the Liner Region Attack as in the original code.
For MIP (Tjeng et al.
we use a timeout of 120s, that means if no guarantee is obtained by that time, the algorithm stops verifying that point.
[Table]
MMR- l ∞ 14.
MMR- l12.
MMR+AT- l ∞ 14.
MMR+AT- l13.
MMR-Universal 18.
GTS (cid:15) 1 =(cid:15) 2 = 0 .(cid:15) ∞
= 4 /plain 6.
AT- l ∞ 6.
AT- l8.
AT-(
[Table]
1 , l 2 , l ∞ ) 8.
KW- l ∞ 15.
KW- l14.
MMR- l ∞ 13.
MMR- l14.
MMR+AT- l ∞ 14.
MMR+AT- l15.
MMR-Universal 15.
CIFAR- (cid:15) 1 =(cid:15) 2 = 0 .(cid:15) ∞
= 2 /plain 23.
AT- l ∞ 27.
AT- l25.
AT-( l 1 , l 2 , l ∞ ) 35.
KW- l ∞ 38.
KW- l40.
MMR- l ∞ 34.
MMR- l40.
MMR+AT- l ∞ 35.
MMR+AT- l37.
MMR-Universal 46.
C. Evolution of robustness during training
We show in Figure 3 the clean test error (red) and the upper bounds on the robust test error wrt l 1 (black), l 2 (cyan), l ∞ (blue) and wrt the union of the three l p -balls (green), evaluated at epoch 1 , 2 , 5 , 10 and then every 10 epochs (for each model we train for 100 epochs) for the models trained with our regularizer MMR-Universal.
For each dataset used in Sectionthe test error is computed on the whole test set, while the upper bound on the robust test error is evaluated on the ﬁrst 1000 points of the test set using the method introduced in
Wong & Kolter (2018) (the thresholds (cid:15) 1 , (cid:15) 2 , (cid:15) ∞ are those provided in Table 1).
Note that the statistics wrt l ∞ are not evaluated additionally with the MIP formulation of Tjeng et al.
(2019) as the results in the main paper which would improve the upper bounds wrt l ∞ .
For all the datasets the test error keeps decreasing across epochs.
The values of all the upper bounds generally improve during training, showing the eﬀectiveness of MMR-Universal.
C. Other combinations of MMR and AT
We here report the robustness obtained training with MMR- l p +AT- l q with p 6 = q on MNIST.
This means that MMR is used wrt l p , while adversarial training wrt l q .
In particular we test p, q ∈ { 1 , ∞} .
In Table 5 we report the test error (TE), lower (LB) and upper bounds (UB) on the robust test error for such model, evaluated wrt l 1 , l 2 , l ∞ and l 1 + l 2 + l ∞ as done in Section 5.
It is clear that training with MMR wrt a single norm does not suﬃce to get provable guarantees in all the other norms, despite the addition of adversarial training.
In fact, for both the models analysed the UB equals 100% for at least one norm.
Note that the statistics wrt l ∞ in the plots do not include the results of the MIP formulation of Tjeng et al.
[Table]
C. Larger models
We trained models with MMR-Universal also on the "Large" architecture from Wong et al.
, but we could not achieve a signiﬁcant improvement compared to the smaller networks reported in the main paper.
Note that the veriﬁcation becomes the more expensive the larger the network is.
Thus for the results in Table 6 we use only the method of Wong & Kolter (2018) to compute the UB on the robust test error (we do not additionally use Tjeng et al.
(2019) for the statistics relative to the l ∞ -robustness which yields tighter upper bounds), which explains why the results are seemingly worse than those in Table
[Table] [Table]