O N A CHIEVING O PTIMAL A DVERSARIAL T EST E RROR
Anonymous authors
Paper under double-blind review
A BSTRACT
We ﬁrst elucidate various fundamental properties of optimal adversarial predictors: the structure of optimal adversarial convex predictors in terms of optimal adversarial zero-one predictors, bounds relating the adversarial convex loss to the adversarial zero-one loss, and the fact that continuous predictors can get arbitrarily close to the optimal adversarial error for both convex and zero-one losses.
Applying these results along with new Rademacher complexity bounds for adversarial training near initialization, we prove that for general data distributions and perturbation sets, adversarial training on shallow networks with early stopping and an idealized optimal adversary is able to achieve optimal adversarial test error.
By contrast, prior theoretical work either considered specialized data distributions or only provided training error guarantees.
I NTRODUCTION
Imperceptibly altering the input data in a malicious fashion can dramatically decrease the accuracy of neural networks (Szegedy et al., 2014).
To defend against such adversarial attacks , maliciously altered training examples can be incorporated into the training process, encouraging robustness in the ﬁnal neural network.
Differing types of attacks used during this adversarial training, such as FGSM (Goodfellow et al., 2015), PGD (Madry et al., 2019), and the C&W attack (Carlini & Wagner, 2016), which are optimization-based procedures that try to ﬁnd bad perturbations around the inputs, have been shown to help with robustness.
While many other defenses have been proposed (Guo et al., 2017; Dhillon et al., 2018; Xie et al., 2017), adversarial training is the standard approach (Athalye et al., 2018).
Despite many advances, a large gap still persists between the accuracies we are able to achieve on non-adversarial and adversarial test sets.
For instance, in Madry et al.
a wide
ResNet model was able to achieve 95% accuracy on CIFAR-10 with standard training, but only 46% accuracy on CIFAR-10 images with perturbations arising from PGD bounded by 8 / 255 in each coordinate, even with the beneﬁt of adversarial training.
In this work we seek to better understand the optimal adversarial predictors we are trying to achieve, as well as how adversarial training can help us get there.
While several recent works have analyzed properties of optimal adversarial zero-one classiﬁers (Bhagoji et al., 2019; Pydi & Jog, 2020; Awasthi et al., 2021b), in the present work we build off of these analyses to characterize optimal adversarial convex surrogate loss classiﬁers.
Even though some prior works have suggested shifting away from the use of convex losses in the adversarial setting because they are not adversarially calibrated (Bao et al., 2020; Awasthi et al., 2021a), we show the use of convex losses is not an issue as long as a threshold is appropriately chosen.
We will also show that under idealized settings adversarial training can achieve the optimal adversarial test error.
In prior work guarantees on the adversarial test error have been elusive, except in the specialized case of linear regression (Donhauser et al., 2021; Javanmard et al., 2020; Hassani &
Javanmard, 2022).
Our analysis is in the Neural Tangent Kernel (NTK) or near-initialization regime, where recent work has shown analyzing gradient descent can be more tractable (Jacot et al., 2018; Du et al., 2018).
Of many such works our analysis is closest to Ji et al.
(2021), which provides a general test error analysis, but for standard (non-adversarial) training.
A recent work (Rice et al., 2020) suggests that early stopping helps with adversarial training, as otherwise the network enters a robust overﬁtting phase in which the adversarial test error quickly rises while the adversarial training error continues to decrease.
The present work uses a form of early stopping, and so is in the earlier regime where there
[Figure]
1. O UR C ONTRIBUTIONS
In this work we prove structural results on the nature of predictors that are close to or even achieve, optimal adversarial test error.
In addition we prove adversarial training on shallow ReLU networks can get arbitrarily close to the optimal adversarial test error over all measurable functions.
This theoretical guarantee requires the use of optimal adversarial attacks during training meaning we have access to an oracle that gives within an allowed set of perturbations the data point which maximizes the loss.
We also use early stopping so that we remain in the near-initialization regime and ensure low model complexity.
The main technical contributions are as follows.
Optimal adversarial predictor structure (Section 3).
We prove fundamental results about optimal adversarial predictors by relating the global adversarial convex loss to global adversarial zero-one losses (cf.
Lemma 3.1).
We show that optimal adversarial convex loss predictors are directly related to optimal adversarial zero-one loss predictors (cf.
Lemma 3.2).
In addition, for predictors whose adversarial convex loss is almost optimal, we show that when an appropriate threshold is chosen its adversarial zero-one loss is also almost optimal (cf.
Theorem 3.3).
This theorem translates bounds on adversarial convex losses, such as those in Section 4, into bounds on adversarial zero-one losses when optimal thresholds are chosen.
Using our structural results of optimal adversarial predictors , we prove that continuous functions can get arbitrarily close to the optimal test error given by measurable functions (cf.
Lemma 3.4).
Adversarial training (Section 4).
Under idealized settings, we show adversarial training leads to optimal adversarial predictors.
(a) Generalization bound.
We prove a near-initialization generalization bound for adversarial risk (cf.
Lemma 4.4).
To do so, we provide a Rademacher complexity bound for linearized functions around initialization (cf.
Lemma 4.5).
The overall bound scales directly with the parameter’s distance from initialization, and 1 / √ n , where n is the number of training points.
Included in the bound is a perturbation term which depends on the width of the network, and in the worst case scales like τ 1 / 4 , where τ bounds the (cid:96) 2 norm of the perturbations.
(b) Optimization bound.
We show that using an optimal adversarial attack during gradient descent training results in a network which is adversarially robust on the training set, in the sense that it is not much worse compared to an arbitrary reference network (cf.
Lemma 4.6).
Comparing to a reference network instead of just ensuring low training error (as in prior work) will be key to obtaining a good generalization analysis, as the optimal adversarial test error may be high.
(c) Optimal test error.
As the generalization and optimization bounds are both in a nearinitialization setting, these two bounds can be used in conjunction.
We ﬁrst bound the test error of our trained network in terms of its training error using the generalization bound, and then apply the optimization bound to compare against training error of an arbitrary reference network.
Another application of our generalization bound then allows us to compare against the test error of an arbitrary reference network (cf.
Theorem 4.1).
Applying approximation bounds and Lemma 3.4 then lets us bound our trained network’s test error in terms of the optimal test error over all measurable functions (cf.
Corollary 4.
R ELATED W ORK
We highlight several papers in the adversarial and near-initialization communities that are relevant to this work.
Optimal adversarial predictors.
Several works study the properties of optimal adversarial predictors when considering the zero-one loss (Bhagoji et al., 2019; Pydi & Jog, 2020; Awasthi et al., 2021b).
In this work, we are able to understand optimal adversarial predictors under convex losses in terms of those under zero-one losses, although we will not make use of any properties of optimal zero-one adversarial predictors other than the fact that they exist.
Other works study the inherent tradeoff between robust and standard accuracy (Tsipras et al., 2019; Zhang et al., 2019), but these are complementary to this work as we only focus on the adversarial setting.
Convex losses.
Several works explore the relationship between convex losses and zero-one losses in the non-adversarial setting (Zhang, 2004; Bartlett et al., 2006).
Whereas the optimal predictor in the non-adversarial setting can be understood locally at individual points in the input domain, it is difﬁcult to do so in the adversarial setting due to the possibility of overlapping perturbation sets.
As a result, our analysis will be focused on the global structure of optimal adversarial predictors.
Convex losses as an integral over reweighted zero-one losses have appeared before (Savage, 1971; Schervish, 1989;
Hernández-Orallo
et al., 2012), and we will adapt and make use of this representation in the adversarial setting.
Adversarial surrogate losses.
Several works have suggested convex losses are inappropriate in the adversarial setting because they are not calibrated, and instead propose using non-convex surrogate losses (Bao et al., 2020; Awasthi et al., 2021a).
In this work, we show that with appropriate thresholding convex losses are calibrated, and so are an appropriate choice for the adversarial setting.
Near-initialization.
Several works utilize the properties of networks in the near-initialization regime to obtain bounds on the test error when using gradient descent (Li & Liang, 2018; Arora et al., 2019; Cao & Gu, 2019; Nitanda et al., 2020; Ji & Telgarsky, 2019; Chen et al., 2019; Ji et al., 2021).
In particular, this paper most directly builds upon the prior work of Ji et al.
(2021), which showed that shallow neural networks could learn to predict arbitrarily well.
We adapt their analysis to the adversarial setting.
Adversarial training techniques.
Adversarial training initially used FGSM (Goodfellow et al., 2015) to ﬁnd adversarial examples.
Numerous improvements have since been proposed, such as iterated FGSM (Kurakin et al., 2016) and PGD (Madry et al., 2019), which strives to ﬁnd even stronger adversarial examples.
These works are complementary to ours, because here we assume that we have an optimal adversarial attack, and show that with such an algorithm we can get optimal adversarial test error.
Some of these alterations (Zhang et al., 2019; Wang et al., 2021; Miyato et al., 2018; Kannan et al., 2018) do not strictly attempt to ﬁnd a maximal adversarial attack at every iteration, but instead use some other criteria.
However, Rice et al.
(2020) proposes that many of the advancements to adversarial training since PGD can be matched with early stopping.
Our work corroborates the power of the early stopping in adversarial training as we use it in our analysis.
Adversarial training error bounds.
Several works are able to show convergence of the adversarial training error.
Gao et al.
(2019) did so for networks with smooth activations, but is unable to handle constant-sized perturbations as the width increases.
Meanwhile Zhang et al.
(2020) uses ReLU activations, but imposes a strong separability condition on the training data.
Our training error bounds use ReLU activations, and in contrast to these previous works simultaneously hold for constant-sized perturbations and consider general data distributions.
However, we note that the ultimate goals of these works differ, as we focus on adversarial test error.
Adversarial generalization bounds.
There are several works providing adversarial generalization bounds.
They are not tailored to the near-initialization setting, and so they are either looser or require assumptions that are not satisﬁed here.
These other approaches include SDP relaxation based bounds (Yin et al., 2018), tree transforms (Khim & Loh, 2019), and covering arguments (Tu et al., 2019;
Awasthi et al., 2020; Balda et al., 2019).
Our generalization bound also uses a covering argument, but pairs this with a near-initialization decoupling.
There are a few works that are able to achieve adversarial test error bounds in specialized cases.
They have been analyzed when the data distribution is linear, both when the model is linear too (Donhauser et al., 2021; Javanmard et al., 2020), and for random features (Hassani & Javanmard, 2022).
In the present work, we are able to handle general data distributions.
P ROPERTIES OF O PTIMAL A DVERSARIAL P REDICTORS
This section builds towards Theorem 3.3, relating zero-one losses to convex surrogate losses.
3. S ETTING
We consider a distribution D with associated measure µ that is Borel measurable over X × Y , where
X ⊆ R d is compact, and Y = {− 1 , 1 } .
For simplicity, throughout we will take X =
B 1 to be the closed Euclidean ball of radius 1 centered at the origin.
We allow arbitrary P ( y = 1 | x ) ∈ [0 , 1] — that is, the true labels may be noisy.
We will consider general adversarial perturbations.
For x ∈ B 1 , let P ( x ) be the closed set of allowed perturbations.
That is, an adversarial attack is allowed to change the input x to any x (cid:48) ∈ P ( x ) .
We will impose the natural restrictions
that ∅ (cid:54) =
P ( x ) ⊆
B 1 for all x ∈ B 1 .
That is, there always exists at least one perturbed input, and perturbations cannot exceed the natural domain of the problem.
In addition, we will assume the set-valued function P is upper hemicontinuous.
That is, for any x ∈ X and any open set U ⊇ P ( x ) , there exists an open set V (cid:51) x such that P ( V ) = ∪ v ∈ V P ( v ) ⊆
U .
For the commonly used (cid:96) ∞ perturbations as well as many other commonly used perturbation sets (Yang et al., 2020), these assumptions hold.
As an example, in the above notation we would write (cid:96) ∞ perturbations as P ( x ) = { x (cid:48) ∈ B 1 : (cid:107) x (cid:48)
− x (cid:107) ∞ ≤ τ } .
Let f : B 1 → R be a predictor.
We will let (cid:96) c be any nonincreasing convex loss with continuous derivative.
The adversarial loss is (cid:96) A ( x, y, f ) =
max x (cid:48)
∈P ( x ) (cid:96) c
( yf ( x (cid:48) )) , and the adversarial convex risk is R A ( f )
= (cid:82) (cid:96)
A ( x, y, f ) d µ ( x, y ) .
For convenience, deﬁne f
+ ( x ) =
sup x (cid:48)
∈P ( x ) f
( x (cid:48) ) and f − ( x ) =
inf x (cid:48)
∈P ( x ) f
( x (cid:48) ) , the worst-case values for perturbations in P ( x ) when y = − 1 and y = 1 , respectively.
Then we can write the adversarial zero-one risk as
[Equation]
We deﬁne the adversarial zero-one risk when the +1 labels have weight ( − (cid:96) (cid:48) c ( t )) and the − 1 labels have weight ( − (cid:96) (cid:48) c ( − t )) to be
[Equation]
These reweighted adversarial zero-one risks will be important to our analysis, as we relate them to the adversarial convex risk.
3. R ESULTS
We present a number of structural properties of optimal adversarial predictors.
The key insight will be to write the global adversarial convex loss in terms of global adversarial zero-one losses, as follows.
Lemma 3.1.
For any predictor f , R A ( f ) = (cid:82)
[Equation] d [Equation]
R t AZ ( f − t ) is an intuitive quantity to consider for the following reason.
In the non-adversarial setting, a predictor outputting a value of f ( x ) corresponds to a prediction of
[Equation]
of the labels being +1 at that point.
If +1 labels are given weight ( − (cid:96) (cid:48) c
( t )) and − 1 labels weight ( − (cid:96) (cid:48) c ( − t )) , then f ( x ) would predict at least half the labels being +
if and only if
[Equation]
c
[Equation]
t )) .
As a result, the optimal non-adversarial predictor is also an optimal non-adversarial zero-one classiﬁer at thresholds t for the corresponding reweighting of +1 and − 1 labels.
Even though we won’t be able to rely on the same local analysis as our intuition above, it turns out the same thing is globally true in the adversarial setting.
Lemma 3.2.
There exists a predictor g : X → R such that R A ( g ) is minimal.
Moreover, for any such predictor, R t AZ ( g − t ) =
inf f R t AZ ( f ) for all t ∈ R .
Note that the predictor in Lemma 3.2 is not necessarily unique.
For instance, the predictor’s value at a particular point x might not matter to the adversarial risk because there are no points in the underlying distribution whose perturbation sets include x .
To prove Lemma 3.2, we will use optimal adversarial zero-one predictors to construct an optimal adversarial convex loss predictor g .
Conversely, we can also use an optimal adversarial convex loss predictor to construct optimal adversarial zero-one predictors.
In general the predictors we ﬁnd will not exactly have the optimal adversarial convex loss.
For these predictors we have the following error gap.
Theorem 3.3.
Suppose there exists s ≥ 1 and c > 0 such that
[Equation]
Then for any predictor g ,
[Equation]
The idea of using G (cid:96) c ( p ) comes from Zhang (2004).
When we explicitly set (cid:96) c to be the logistic loss in Section 4, we can choose s = 2 and c = √ 2 (Zhang, 2004).
While similar bounds exist in the non-adversarial case with R AZ ( g ) instead of inf t R AZ ( g − t ) (Zhang, 2004; Bartlett et al., 2006), the analogue with R AZ ( g − t ) − inf h meas.
R AZ ( h ) appearing on the left hand side is false in the adversarial setting, which can be seen as follows.
Consider a uniform distribution of ( x, y ) pairs over { ( ± 1 , ± 1) } , and suppose {− 1 , +1 } ∈ P ( − 1)
∩ P (+1) .
Then the optimal adversarial convex risk is (cid:96) c (0) given by f ( x ) = 0 , and the optimal adversarial zero-one risk is 1 / 2 given by sgn ( f ( x ))
= +1 .
However, for (cid:15) > 0 the predictor g (cid:15) with g (cid:15) (+1) =
(cid:15) , g (cid:15) ( − 1) =
− (cid:15) , and g (cid:15) ( x ) ∈ [ − (cid:15), (cid:15) ] everywhere else gives adversarial convex risk 12 (cid:0) (cid:96) c
( (cid:15) )
+ (cid:96) c ( − (cid:15) ) (cid:1) and adversarial zero-one risk 1 .
This results in
[Equation]
demonstrating the necessity for some change compared to the analogous non-adversarial bound.
As this example shows, getting arbitrarily close to the optimal adversarial convex risk does not guarantee getting arbitrarily close to the optimal adversarial zero-one risk.
This inadequacy of convex losses in the adversarial setting has been noted in prior work (Bao et al., 2020; Awasthi et al., 2021a), leading them to suggest the use of non-convex losses.
However, as Theorem 3.3 shows, we can circumvent this inadequacy if we allow the choice of an optimal (possibly nonzero) threshold.
While we have compared against optimal measurable predictors here, in Section 4 we will use continuous predictors.
This presents a potential problem, as there may be a gap between the adversarial risks achievable by measurable and continuous predictors.
It turns out this is not the case, as the following lemma shows.
Lemma 3.4.
For the adversarial risk, comparing against all continuous functions is equivalent to comparing against all measurable functions.
That is, inf g cts.
R A ( g ) =
inf h meas.
R A ( h ) .
In the next section, we will use Lemma 3.4 to compare trained continuous predictors against all measurable functions.
A DVERSARIAL T RAINING
In this section we prove bounds on the adversarial convex risk when adversarial training is used on shallow ReLU networks.
By Theorem 3.3, these imply bounds on the adversarial zero-one risk for optimally chosen thresholds.
Unlike Section 3, our results here will be speciﬁc to the logistic loss.
4. S ETTING
Training points ( x k , y k )
nk =1 are drawn from the distribution D .
Note that (cid:107) x k (cid:107) ≤ 1 , where by default we use (cid:107) · (cid:107) to denote the (cid:96) 2 norm.
We will let τ = sup {(cid:107) x (cid:48) − x (cid:107) 2 : x
(cid:48) ∈ P ( x ) , x ∈ B 1 } be the maximum (cid:96) 2 norm of the adversarial perturbations.
By our restrictions on the perturbation sets, we have 0 ≤ τ ≤ 2 .
Throughout this section we will set (cid:96) c to be the logistic loss (cid:96) ( z ) =
ln(1+ e − z ) .
The empirical adversarial loss and risk are (cid:96) A ,k ( f )
=
(cid:96) A ( x k , y k , f ) and (cid:98) R A ( f ) = 1 n (cid:80) nk =1 (cid:96) A ,k ( f ) .
The predictors will be shallow ReLU networks of the form f
( W ; x ) =
ρ √ m (cid:80) mj
=
a i σ ( w T j x ) , where W is an m × d matrix, w T j is the j th row of W , σ ( z )
= max(0 , z ) is the ReLU, a i ∈ {± 1 } are initialized uniformly at random, and ρ is a temperature parameter that we can set.
Out of all of these parameters, only W will be trained.
The initial parameters W 0 will have entries initialized from standard
Gaussians with variance 1 , which we then train to get future iterates
W i .
We will frequently use the features of W i for other parameters W ; that is, we will consider f ( i ) ( W ; x ) = (cid:10) ∇ f ( W i ; x ) , W (cid:11) , where the gradient is taken with respect to the matrix, not the input.
Note that f is not differentiable at all points.
When this is the case by ∇ f we mean some choice of ∇ f ∈ ∂f , the Clarke differential.
For notational convenience we deﬁne (cid:98) R A ( W ) =
(cid:98) R A ( f ( W ; · )) ,
R A ( W ) =
R A ( f ( W ; · )) , (cid:98) R ( i )
A ( W ) = (cid:98) R A
( f ( i ) ( W ; · )) , and R ( i )
A ( W ) =
R A ( f ( i ) ( W ; · )) .
Our adversarial training will be as follows.
To get the next iterate W i +1 from W i for i ≥
we will use gradient descent with W i +
=
W i − η ∇ (cid:98) R A
( W i ) .
Normally adversarial training occurs in two steps:
For each k , ﬁnd x (cid:48) k ∈ P ( x ) such that (cid:96) ( y k f ( W i ; x (cid:48) k )) is maximized.
Perform a gradient descent update using the adversarial inputs found in the previous step:
[Equation]
[Equation]
[Equation]
Step 1 is an adversarial attack, in practice done with a method such as PGD that does not necessarily ﬁnd an optimal attack.
However, we will assume the idealized scenario where we are able to ﬁnd an optimal attack.
Our goal will be to ﬁnd a network that has low risk with respect to optimal adversarial attacks.
That is, we want to ﬁnd f such that R A ( f ) is as small as possible.
4. R ESULTS
Our adversarial training theorem will compare the risk we obtain to that of arbitrary reference parameters Z ∈ R m × d , which we will choose appropriately when we apply this theorem in Corollaries 4. and 4.3.
To get near-optimal risk, we will apply our early stopping criterion of running gradient descent until (cid:107) W i − W 0 (cid:107) > 2 R Z , where R Z ≥ max { 1 , ηρ, (cid:107) Z − W 0 (cid:107)} , a quantity we assume knowledge of, at which point we will stop.
It is possible this may never occur — in that case, we will stop at some time step t , which is a parameter we are free to choose.
We just need to choose t sufﬁciently large to allow for enough training to occur.
The iterate we choose as our ﬁnal model will be the one with the best training risk.
Theorem 4.1.
Let m ≥ ln( emd ) and ηρ 2 < 2 . For any Z ∈ R m × d , let R Z ≥ max { 1 , ηρ, (cid:107) Z − W 0 (cid:107)} and W ≤ t = arg min { (cid:98) R A ( W i ) : 0 ≤ i ≤ t, (cid:107) W j − W 0 (cid:107) ≤ 2 R Z ∀ j ≤ i } .
Then with probability at least 1 − 12 δ ,
[Equation]

[Equation]
where (cid:101) O suppresses ln( n ) , ln( m ) , ln( d ) , ln(1 /δ ) , ln(1 /τ ) terms.
In Corollary 4.2 we will show we can set parameters so that all error terms are arbitrarily small.
The early stopping criterion (cid:107) W i − W 0 (cid:107) >
2 R Z will allow us to get a good generalization bound, as we will show that all iterates then have (cid:107) W i − W 0 (cid:107) ≤ 2 R Z + ηρ .
When the early stopping criterion is met, we will be able to get a good optimization bound.
When it is not, choosing t large enough allows us to do so.
It may be concerning that we require knowledge of R Z , as otherwise the algorithm changes depending on which reference parameters we use.
However, in practice we could instead use a validation set and instead of choosing the model with the best training risk, we could choose the model with the best validation risk, which would remove the need for knowing R Z .
Ultimately, our assumption of knowing R Z is there to simplify the analysis and highlight other aspects of the problem, and we leave dropping this assumption to future work.
To compare against all continuous functions, we will use the universal approximation of inﬁnite-width neural networks (Barron, 1993).
We use a speciﬁc form that adapts Barron’s arguments to give an estimate of the complexity of the inﬁnite-width neural network (Ji et al., 2019).
We consider inﬁnitewidth networks of the form f ( x ; U ∞ ) :
= (cid:82) (cid:104)
U ∞ ( v ) , x 1 [ v T x ≥ 0] (cid:105) d N ( v ) , where U ∞ :
R d → R d parameterizes the network, and N is a standard d -dimensional Gaussian distribution.
We will choose an inﬁnite-width network f ( · ; U (cid:15) ∞ ) with a ﬁnite complexity measure sup x (cid:107) U (cid:15) ∞ ( x ) (cid:107) that is (cid:15) -close to a near-optimal continuous function.
Letting R (cid:15) :
= max { ρ, ηρ 2 , sup x (cid:107) U (cid:15) ∞ ( x ) (cid:107)} , with high probability we can extract a ﬁnite-width network Z close to the inﬁnite-width network whose distance from W 0 is at most R Z = R (cid:15) /ρ .
Note that our assumed knowledge of R Z is equivalent to assuming knowledge of R (cid:15) .
From Lemma 3.4 we know continuous functions can get arbitrarily close to the optimal adversarial risk over all measurable functions, so we can instead compare against all measurable functions.
We immediately have an issue with our formulation — the comparator in Theorem 4.1 is homogeneous.
To have any hope of predicting general functions, we need biases.
We simulate biases by adding a dummy dimension to the input, and then normalizing.
That is, we transform the input x → 1 √ 2 ( x ; 1) .
The dummy dimension, while part of the input to the network, is not truly a part of the input, and so we do not allow adversarial perturbations to affect this dummy dimension.
Corollary 4.2.
Let (cid:15) > 0 .
Then there exists a ﬁnite R (cid:15) ≥ max { ρ, ηρ 2 } representing the complexity measure of an inﬁnite-width network that is within (cid:15) of the optimal adversarial risk.
Then with probability at least 1 − δ , setting
[Equation]
with n satisfying
[Equation]
where (cid:101) Θ , ( cid:101) Ω suppresses ln ( R (cid:15) ) , ln(1 /(cid:15) ) , ln(1 /δ ) terms, we have
[Equation]
Once again, it may be concerning that we require knowledge of the complexity of the data distribution for Corollary 4.2.
However, the following result demonstrates that we are effectively guaranteed to converge to the optimal risk as n → ∞ , as long as parameters are set appropriately.
Corollary 4.3.
If we set
[Equation]
then
[Equation]
almost surely.
4. P ROOF S KETCH OF T HEOREM 4.
The proof has two main components: a generalization bound and an optimization bound.
We describe both in further detail below.
4.3. G ENERALIZATION
Let ˜ τ := √
[Equation]
τ +
[Equation]
(cid:17) 1 / 4 + τ √ 2 .
We prove a new near-initialization generalization bound.
Lemma 4.4.
If B ≥ 1 and m ≥ ln( emd ) , then with probability at least 1 − 5 δ ,
[Equation]
n .
The key term to focus on is the middle term.
Note that ˜ τ is a quantity that grows with the perturbation radius τ , and importantly is 0 when τ is 0.
When we are in the non-adversarial setting ( τ = 0 ), the middle term is dropped and we recover a Rademacher bound qualitatively similar to Lemma A. in (Ji et al., 2021).
In the general setting when τ is a constant, so is ˜ τ , resulting in an additional dependence on the width of the network.
Lemma 4.4 will easily follow from the following Rademacher complexity bound.
Lemma 4.5.
Deﬁne V
= { V : (cid:107) V − W 0 (cid:107) ≤ B } , and let
[Equation]
Then with probability at least 1 − 3 δ ,
[Equation]
In the setting of linear predictors with normed ball perturbations, an exact characterization of the perturbations can be obtained, leading to some of the Rademacher bounds in Yin et al.
Khim & Loh (2019); Awasthi et al.
In our setting, it is unclear how to get a similar exact characterization.
Instead, we prove Lemma 4.5 by decomposing the adversarially perturbed network into its nonperturbed term and the value added by the perturbation.
The nonperturbed term can then be handled by a prior Rademacher bound for standard networks.
The difﬁcult part is in bounding the complexity added by the perturbation.
A naive argument would worst-case the adversarial perturbations, resulting in a perturbation term that scales linearly with m and does not decrease with n .
Obtaining the Rademacher bound that appears here requires a better understanding of the adversarial perturbations.
In comparison to simple linear models, we use a more sophisticated approach, utilizing our understanding of linearized models.
Because we are using the features of the initial network, for a particular perturbation at a particular point, the same features are used across all networks.
As the parameter distance between all networks is close, the same perturbation achieves similar effects.
We also control the change in features caused by the perturbations, which is given by Lemma A.9.
Having bounded the effect of the perturbation term, we then apply a covering argument over the parameter space to get the Rademacher bound.
4.3. O PTIMIZATION
Our optimization bound is as follows.
Lemma 4.6.
Let R gd := 2 R Z + ηρ , with ηρ 2 < 2 .
Then with probability at least 1 − δ ,
[Equation]
The main difference between the adversarial case here and the non-adversarial case in Ji et al.
(2021) is in appropriately bounding (cid:107)∇ (cid:98)
R A ( W ) (cid:107) , which is Lemma A.10.
In order to do so, we utilize a relation between adversarial and non-adversarial losses.
The rest of the adversarial optimization proofs follow similarly to the non-adversarial case, although simpliﬁed because we assume that R Z is known.
D ISCUSSION AND O PEN P ROBLEMS
This paper leaves open many potential avenues for future work, several of which we highlight below.
Early stopping.
Early stopping played a key technical role in our proofs, allowing us to take advantage of properties that hold in a near-initialization regime, as well as achieve a good generalization bound.
However, is early stopping necessary?
The necessity of early stopping is suggested by the phenomenon of robust overﬁtting (Rice et al., 2020), in which the adversarial training error continues to decrease, but the adversarial test error dramatically increases after a certain point.
Early stopping is one method that allows adversarial training to avoid this phase, and achieve better adversarial test error as a result.
However it should be noted that early stopping is necessary in this work to stay in the near-initialization regime, which likely occurs much earlier than the robust overﬁtting phase.
Underparameterization.
Our generalization bound increases with the width.
As a result, to get our generalization bound to converge to
we required the width to be sublinear in the number of training points.
Is it possible to remove this dependence on width?
Recent works suggest that some sort of dependence on the width may be necessary.
In the setting of linear regression, overparameterization has been shown to hurt adversarial generalization for speciﬁc types of networks (Hassani & Javanmard, 2022; Javanmard et al., 2020; Donhauser et al., 2021).
Note that in this simple data setting a simple network can ﬁt the data, so underparameterization does not hurt the approximation capabilities of the network.
However, in a more complicated data setting, Madry et al.
(2019) notes that increased width helps with the adversarial test error.
One explanation is that networks need to be sufﬁciently large to approximate an optimal robust predictor, which may be more complicated than optimal nonrobust predictors.
Indeed, they note that smaller networks, under adversarial training, would converge to the trivial classiﬁer of predicting a single class.
Interestingly, they also note that width helps more when the adversarial perturbation radius is small.
This observation is reﬂected in our generalization bound, since the dependence on width is tied to the perturbation term.
If the perturbation radius is small, then a large width is less harmful to our generalization bound.
We propose further empirical exploration into how the width affects generalization and approximation error, and how other factors inﬂuence this relationship.
This includes investigating whether a larger perturbation radius causes larger widths to be more harmful to the generalization bound, the effect of early stopping on these relationships, and how the approximation error for a given width changes with the perturbation radius.
Using weaker attacks.
Within our proof we used the assumption that we had access to an optimal adversarial attack.
In turn, we got a guarantee against optimal adversarial attacks.
However, in practice we do not know of a computationally efﬁcient algorithm for generating optimal attacks.
Could we prove a similar theorem, getting a guarantee against optimal attacks, using a weaker attack like PGD in our training algorithm?
If this was the case, then we would be using a weaker attack to successfully defend against a stronger attack.
Perhaps this is too much to ask for — could we get a guarantee against PGD attacks instead?
Transferability to other settings.
We have only considered the binary classiﬁcation setting here.
A natural extenstion would be to consider the same questions in the multiclass setting, where there are three (or more) possible labels.
In addition, our results in Section 4 only hold for shallow ReLU networks in a near-initialization regime.
To what extent do the relationships observed here transfer to other settings, such as training state-of-the-art networks?
For instance, does excessive overparameterization beyond the need to capture the complexity of the data hurt adversarial robustness in practice?
A A PPENDIX A. O PTIMAL A DVERSARIAL P REDICTOR AND A PPROXIMATION P ROOFS
In this section we prove various properties of optimal adversarial predictors.
First we need to handle some basic limits.
Recall the deﬁnition of R t AZ ( f ) :
[Equation]
The following lemmas are various forms of continuity for R t AZ ( f ) , making use of the continuity of (cid:96) (cid:48) c .
Lemma A.1.
For any inﬁnite family of predictors g s : X → {− 1 , +1 } indexed by s ∈ R , and any t ∈ R ,
[Equation]
Proof.
By the Dominated Convergence Theorem (Folland, 1999, Theorem 2.24),
[Equation]
[Table]
[Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
The following lemma allows us to switch the order of the limit and adversarial risk.
Lemma A.2.
For any predictors g s : X → {− 1 , +1 } indexed by s ∈ R , and any t ∈ R ,
[Equation]
when lim s → t g s exists.
In particular, when g s = f for all s ∈ R , then lim s → t R s AZ ( f )
=
R t AZ ( f )
[Equation]
Proof.
By the Dominated Convergence Theorem (Folland, 1999, Theorem 2.24),
[Equation]
t AZ (cid:18)
[Equation]
(cid:19) .
For the rest of this section, let f r : X → {− 1 , +1 } be optimal adversarial zero-one predictors when the − 1 labels are given weight ( − (cid:96) (cid:48)
c ( − r )) and the +1 labels are given weight ( − (cid:96) (cid:48)
c
( r ))
( f r minimizes
R r AZ ( f r ) ), for all r ∈ R .
These predictors exist by Theorem 1 of Bhagoji et al.
(2019), although they may not be unique.
The following lemma states that R r AZ ( f r ) is continuous as a function of r .
Lemma A.3.
For any t ∈ R , lim s → t R s AZ ( f s ) =
R t AZ ( f t ) .
Proof.
By Lemma A.1,
[Equation]
Together, we get lim s → t R s AZ ( f s )
=
R t AZ ( f t ) .
The following lemma gives some structure to optimal adversarial zero-one predictors.
Lemma A.4.
For any s ≤ t , R s AZ (max( f t , f s ))
=
R s AZ ( f s ) and R t AZ (min( f t , f s ))
=
R t AZ ( f s ) .
Proof.
Let A :=
{ x : f s ( x ) <
f t ( x ) } , and deﬁne
[Equation] [Equation]
x
[Equation] [Equation]
Let µ s ( x, y )
=
[ y = +1]( − (cid:96) (cid:48) c
( s ))
µ ( x, +1)
+ 1 [ y = − 1]( − (cid:96) (cid:48)
c ( − s ))
µ ( x, − 1) be the associated measures when the +1 labels have weight ( − (cid:96) (cid:48)
c ( s )) and the − 1 labels have weight ( − (cid:96) (cid:48) c ( − s )) , and deﬁne µ t similarly.
Then
[Equation]
As a result, µ s ( A + s ) − µ s ( A − s ) ≥ µ t ( A + t ) − µ t ( A − t ) .
The reweighted adversarial zero-one loss can be written in terms of the reweighted measures, as follows.
[Equation]
The following lower bound can then be computed.
[Equation]
≥
[Equation]
Similarly,
[Equation]
1 [min( f t , f s ) − ( x ) < 0] − 1 [ f − ( x ) < 0] (cid:1) + 1 [ y = − 1] (cid:0) 1 [min( f t , f s ) + ( x ) ≥ 0] − 1 [ f + ( x ) ≥ 0] (cid:1) d µ t ( x, y ) =
µ t ( A + t ) − µ t ( A − t ) ≥ 0 .
As 0 ≥ µ s ( A + s ) − µ s ( A − s ) ≥ µ t ( A + t ) − µ t ( A − t ) ≥
we must have equality everywhere, giving the desired result.
Using our understanding of optimal adversarial zero-one predictors, we can construct a predictor that is optimal at all thresholds.
Lemma A.5.
There exists f : X → R such that R t AZ ( f − t ) is the minimum possible value for all t ∈ R .
Proof.
Deﬁne f ( x ) = sup { r ∈ Q : f r ( x ) = +1 } .
To prove R t AZ ( f − t ) is minimal for all t ∈ R , we ﬁrst do so for all t ∈ Q , and then for all t ∈ R \ Q .
For any t ∈ Q , by deﬁnition sgn ( f − t ) ≥ f t .
Let q 1 , q 2 , . .
. be an enumeration of Q ∩ ( t, ∞ ) .
Let g
= f t , and recursively deﬁne g i +
= max( g i , f q i ) for all i ≥ 0 .
Note that lim
i →∞ g
i = sgn ( f − t ) .
Inductively applying Lemma A.4 results in R t AZ ( g i )
=
R t AZ ( f t ) for all
i ≥ 0 .
By the Dominated
Convergence Theorem (Folland, 1999, Theorem 2.24),
[Equation]
For any t ∈ R \ Q , note that sgn ( f − t ) =
lim s ↑ t s ∈ Q sgn
( f − s ) .
By the Dominated Convergence
Theorem (Folland, 1999, Theorem 2.24), Lemma A.2, and Lemma A.3,
[Equation]
For any predictor, its adversarial convex loss can be written as a weighted sum of adversarial zero-one losses across thresholds.
This then implies the function deﬁned in Lemma A.5 has optimal adversarial convex loss.
Proof of Lemma 3.1.
Recall the deﬁnition of R A ( f ) :
[Equation]
Applying the fundamental theorem of calculus and rearranging
[Equation]
As the integrand is nonnegative, Tonelli’s theorem (Folland, 1999, Theorem 2.37) gives
[Equation]
While optimal adversarial zero-one predictors were used to construct a predictor with optimal adversarial convex loss in Lemma A.5, the reverse is also possible: using a predictor with optimal adversarial convex loss to construct optimal adversarial zero-one predictors.
Proof of Lemma 3.2.
Let f be the optimal predictor deﬁned in Lemma A.5, which gives existence.
Suppose, towards contradiction, that there exists g : X → R with minimal R A ( g ) and t ∈ R such that R t AZ ( g − t ) > R t AZ ( f − t ) .
By Lemma A.2 R t AZ ( g − t ) is left continuous as a function of t , and by Lemma A.3 R t AZ ( f − t ) is continuous as a function of t .
As a result, there exists δ, (cid:15) > 0 such that for all s ∈ [ t − δ, t ] ,
[Equation]
Then
[Equation]
contradicting the assumption that R A ( g ) was minimal.
So we must have R t AZ ( g − t ) minimal for all t ∈ R .
The next two lemmas bound the zero-one loss at different thresholds in terms of the zero-one loss at threshold 0.
Lemma A.6.
Let f be the optimal predictor deﬁned in Lemma A.5.
Then R t AZ ( f − t ) ≤ ( − (cid:96) (cid:48)
c ( −| t | ))
R AZ ( f ) .
Proof.
[Equation]
In contrast to the previous lemma, the following bound works for any predictor.
Lemma A.7.
Let g be any predictor.
Then R t AZ ( g − t ) ≥ ( − (cid:96) (cid:48)
c
( | t | ))
R AZ ( g − t ) .
Proof.
[Equation]
Now we can relate proximity to the optimal adversarial zero-one loss and proximity to the optimal adversarial convex loss.
Proof of Theorem 3.3.
Let f be the optimal predictor deﬁned in Lemma A.5.
Then
[Equation]
As ( − (cid:96) (cid:48) c ( u )) inf t R AZ ( g − t ) − ( − (cid:96) (cid:48)
c ( − u ))
R AZ ( f ) is continuous and nonincreasing as a function of u , as well as nonnegative when u = 0 , there exists some r ∈ [0 , ∞ ] such that
[Equation]
Letting p :=
inf t R AZ ( g − t ) R AZ ( f )+inf t R AZ ( g − t ) , we ﬁnd that this occurs when
[Equation]
r
[Equation] [Equation]
Since (cid:96) c is convex
[Equation]
this implies r minimizes p(cid:96) c
( r ) + (1 − p ) (cid:96) c ( − r ) .
The integral can then be computed exactly as follows.
[Equation]
Using our assumption of a lower bound on G (cid:96) c ( p ) results in
[Equation]
Finally, since R AZ ( f ) ≤ 1 / 2 and inf t R AZ ( g − t ) ≤ 1 ,
[Equation]
Rearranging then gives the desired inequality.
The following lemmas states that continuous predictors can get arbitrarily close to the optimal adversarial zero-one risk, even if we require the predictors to output the exact label.
Lemma A.8.
Deﬁne
[Equation]
the adversarial zero-one risk when we require f to exactly output the right label over the entire perturbation set.
Then for any measurable f : X → {− 1 , +1 } and any (cid:15) > 0 , there exists continuous g : X → [ − 1 , +1] such that µ ( { ( x, y ) : yg ( P ( x )) (cid:54)
= { +1 } and yf ( P ( x )) =
{ +1 }} ) <
(cid:15) .
In particular, this implies inf g cts.
R EAZ ( g ) =
inf h meas.
R EAZ ( h ) =
inf g cts.
R AZ ( g ) = inf h meas.
R AZ ( h ) .
Proof.
Let
[Equation]
By the inner regularity of µ x (Folland, 1999, Theorem 7.8), there exist compact sets K ⊆ A, L ⊆ B such that
[Equation]
As P is upper hemicontinuous and K and L are compact, both P ( K ) and P ( L ) are also compact (Aliprantis & Border, 2006, Lemma 17.8).
Note that they are also disjoint as P ( K ) ∩ P ( L ) ⊆
P ( A ) ∩ P ( B ) = ∅ .
By Urysohn’s Lemma (Folland, 1999, Lemma 4.32), there exists a continuous function g : X → [0 , 1] such that g t ( x ) = 0 for all x ∈ P ( K t ) and g t ( x ) = 1 for all x ∈ P ( L t ) .
The continuous function 2 g − 1 : X → [ − 1 , 1] then satisﬁes
[Equation] [Equation]
Note that we also have
[Equation]
As f and (cid:15) > 0 were arbitrary, inf g cts.
R EAZ ( g ) ≤ inf h meas
[Equation]
R EAZ ( h ) .
To get the implication, note that inf g cts.
R AZ ( g ) ≤ inf g cts.
R EAZ ( g ) ≤ inf h meas.
R EAZ ( h ) =
inf h meas.
R AZ ( h ) ≤ inf g cts.
R AZ ( g ) , so we must have equality everywhere.
While the optimal adversarial predictor may be discontinuous, continuous predictors can get arbitrarily close to the optimal adversarial convex risk.
Proof of Lemma 3.4.
We have inf g cts.
R A ( g ) ≥ inf h meas.
R A ( h ) , so it sufﬁces to show inf g cts.
R A ( g ) ≤ inf h meas.
R A ( h ) .
Let f be the optimal predictor deﬁned in Lemma A.5.
Then R A ( f ) = inf h meas.
R A ( h ) , so we want to show inf g cts.
R A ( g ) ≤ R A ( f ) .
Let (cid:15) > 0 .
Choose M > 0 large enough so that R A (min(max( f, − M ) , M )) <
R A ( f ) + (cid:15)/ 3 , and let ¯ f = min(max( f, − M ) , M ) .
As (cid:96) c is continuous, there exists a ﬁnite-sized partition P = { p 0 , p 1 , p 2 , . .
, p r } with p 0 = − M and p r =
M such that (cid:96) c
( p i ) − (cid:96) c
( p i − 1 ) ≤ (cid:15)/ 3 and (cid:96) c
( − p i ) − (cid:96) c ( − p
i − 1 ) ≤ (cid:15)/ 3 for all 1 ≤ i ≤ r .
By Lemma A.8, for every p i there exists continuous g p i : X → [ − 1 , +1] such that µ ( { ( x, y ) :
yg p
i ( P ( x )) (cid:54) = { +1 } and y sgn ( f − p i )
( P ( x ))
= { +1 }} ) <
[Equation]
M
[Equation]
Consider the continuous function g (cid:15) =
− M + (cid:80) ri =1 ( p i − p
i − 1 ) g pi +1 2 , which will be shown to have adversarial risk within (cid:15) of the optimal.
Deﬁne
D i := { ( x, y ) :
yg p
i ( P ( x )) (cid:54) = { +1 } and y sgn ( f − p i )
( P ( x ))
= { +1 }} ∀ i,
E := { ( x, y ) : (cid:96)
A ( x, y, g (cid:15) ) > (cid:96)
A ( x, y, f ) + (cid:15)/ 3 } .
We will now show that E ⊆ ∪ ri =1 D i .
Let ( x, y ) (cid:54)∈ ∪ ri =1 D i .
Then yg p i ( P ( x )) ≥ y sgn ( ¯ f − p i )
( P ( x )) for all 1 ≤ i ≤ r .
Let i (cid:48) =
arg max i { sgn ( ¯ f − p i )
= +1 } .
Then yg (cid:15) ( P ( x )) ≥ min { yp i (cid:48) , yp max { i (cid:48) +1 ,r } } and yf ( P ( x ))
≤ max { yp i (cid:48) , yp max { i (cid:48)
+1 ,r } } , so (cid:96)
A ( x, y, g (cid:15) ) ≤ max { (cid:96) c ( yp i (cid:48) ) , (cid:96) c ( yp max { i (cid:48)
+1 ,r } ) } ≤ min { (cid:96) c ( yp i (cid:48) ) , (cid:96) c ( yp max { i (cid:48)
+1 ,r } ) }
+ (cid:15)/≤ (cid:96)
A ( x, y, ¯ f ) + (cid:15)/ 3 , which implies ( x, y ) (cid:54)∈ E .
Consequently,
[Equation]
Combining the bounds results in
[Equation]
As this holds for all (cid:15) >
[Equation]
we have inf g cts.
R A ( g ) ≤ R A ( f ) , completing the proof.
A. G ENERALIZATION P ROOFS
The following lemma controls the difference in features for nearby points, which will be useful when proving our Rademacher complexity bound.
Lemma A.9.
With probability at least 1 − 3 nδ ,
[Equation]
for all k .
Proof.
As in Lemma A.2 of Ji et al.
(2021), with probability at least 1 − 3 nδ , for any x k (cid:54) = 0 , (cid:88)
[Equation]
δ )
[Equation]
and henceforth assume the failure event does not hold.
With τ k = τ (cid:107) x k (cid:107) we have, for any x k (cid:54)
= 0 , (cid:88)
[Equation]
As such, deﬁne the set
[Equation]
where the preceding concentration inequality implies
[Equation]
[Table]
[Equation]
where we used (cid:107) x k (cid:107) ≤ 1 in the last step.
Taking the square root of both sides gives us
[Equation]
completing the proof.
We’ll now prove our Rademacher complexity bound.
Proof of Lemma 4.5.
We have
[Equation]
where in the last step we use the Rademacher bound provided in the proof of Lemma A.8 from Ji et al.
We will now focus on bounding E (cid:15) sup V
[Equation]
For notational simplicity let D k ( V ) :=
[Equation]
, so that the quantity we want to bound is E (cid:15) sup V ∈V n
[Equation]
k
[Equation] [Equation]
k D k ( V ) .
As Rademacher complexity is invariant under constant shifts, we can subtract the constant C k from
D k ( V ) ,
where
C k := (cid:18)
[Equation] [Equation]
With this, we now want to bound E (cid:15) sup V ∈V n
[Equation]
(cid:15)
[Equation]
(cid:0) D k ( V ) − C k (cid:1) =
n Rad ( G ) , where G = { x k (cid:55)→ min x
[Equation]
C k
[Equation]
We will now bound n Rad ( G ) using a covering argument in the parameter space V .
Instead of directly ﬁnding a covering for the ball of radius B , we ﬁrst ﬁnd a covering for a cube with side length 2 B containing the ball.
Projecting the cube to the ball then yields a proper covering of the ball, as this mapping is non-expansive.
To ensure every point on the surface of the cube is at most (cid:15) distance away from a point, we use a grid with scale 2 (cid:15)/ √ m , which results in (cid:16) B √ m(cid:15) (cid:17) m points in the cover.
This cover C (cid:15) has the property that for every V ∈ V , there is some U ∈ C (cid:15) such that (cid:107) V − U (cid:107) ≤ (cid:15) , since every coordinate of V is (cid:15)/ √ m -close to a coordinate in C (cid:15) , and (cid:107) V − U (cid:107) =
(cid:112)(cid:80) mi =
( V i − U i ) 2 ≤ (cid:112)(cid:80) mi =1 ( (cid:15)/ √ m ) 2 = (cid:15) .
Due to the non-expansive projection mapping from the cube to the sphere, the (cid:15) -cover for the cube projects to an (cid:15) -cover for the sphere.
As a result, we have an (cid:15) -cover for the sphere of radius B with (cid:16) B √ m(cid:15) (cid:17) m points.
A geometric (cid:15) -cover gives only a ρ ˜ τ(cid:15) -cover in the function space, since for any V and U with (cid:107) V − U (cid:107) ≤ (cid:15) , and any x k ,
[Equation]
where the last step follows with probability at least 1 − 3 δ by Lemma A.9.
As a result, we can get an (cid:15) -cover in the function space with just (cid:16) ρB ˜ τ √ m (cid:15) (cid:17) m points.
This bound on the covering number N ( G , (cid:15), (cid:107) · (cid:107) u ) ≤ (cid:16) ρB ˜ τ √ m (cid:15) (cid:17) m then implies
[Equation]
which we can use in a standard parameter-based covering argument (Anthony & Bartlett, 2009) to get
[Equation]
To calculate sup U ∈G (cid:107) U (cid:107) 2 , note that each of the n entries is bounded above by
[Equation]
τ
[Equation]
so sup U ∈G (cid:107) U (cid:107) 2 ≤ ρB ˜ τ √ n .
Setting α = ρB ˜ τ (let α −→ 0 if ˜ τ = 0 ) we get
[Equation]
Putting this together with our previous bound results in
[Equation]
and dividing by n then completes the proof.
With our Rademacher complexity bound we can prove the following generalization bound.
Proof of Lemma 4.4.
By Lemma A.6 part 2 of Ji et al.
(2021), with probability at least 1 − δ ,
[Equation]
By the decreasing monotonicity of the logistic loss
[Equation]
(18 ρBd ln(4 em 2 d 3 /δ )) , (cid:96) ( − 18 ρBd ln(4 em 2 d 3 /δ ))] ⊆
[ln(2) − 18 ρBd ln(4 em 2 d 3 /δ ) , ln(2) + 18 ρBd ln(4 em 2 d 3 /δ )] .
With a bound on the range from above that holds with probability at least 1 − δ and a bound on the
Rademacher complexity from Lemma 4.5 that holds with probability at least 1 − 3 δ , we can now
[Table]
at least
[Table]
δ to get that altogether with probability
[Table]
least
[Table]
[Equation]
[Table]
[Equation]
A. O PTIMIZATION P ROOFS
The following lemma bounds the gradient of the adversarial risk.
Lemma A.10.
For any matrix W ∈ R m × d ,
[Equation]
Proof.
By properties of the logistic loss (Ji & Telgarsky, 2018),
[Equation]
[Table]
[Equation]
We have the following guarantee when using adversarial training.
Lemma A.11.
When adversarially training with step size η , for any iterate t and any reference parameters Z ∈ R m × d ,
[Equation]
Proof.
It sufﬁces to show
[Equation]
for 0 ≤ i < t , as summing the left and right hand sides over 0 ≤ i < t then gives the desired bound
[Equation]
By the deﬁnition of W i +1 ,
[Equation]
Note that
[Equation]
where the last inequality follows because (cid:98) R ( i )
A ( W ) = (cid:98) R A
( f ( i ) ( W ; · )) is convex in the function space
f
( i ) ( W ; · ) , which in turn is linear in W , so (cid:98) R
( i )
A ( W ) is convex in W .
Using this bound, in addition to Lemma A.10, gives
[Equation]
and rearranging then gives the desired inequality.
We want to bound (cid:98) R ( i )
A ( Z ) in terms of (cid:98) R (0)
A ( Z ) .
To do so, we will show that when changing features the value at every point remains close to its original value.
Towards this goal, we ﬁrst show that the features in a small ball do not change much.
Lemma A.12.
For any (cid:107) z (cid:107) ≤ 1 and any 0 < (cid:15) ≤ 1 / ( dm ) , with probability at least 1 − δ
[Equation]
Proof.
For notational convenience let W := W 0 .
First, note that
[Equation]
By Lemma A.5 of Ji et al.
(2021), with probability at least 1 − δ the middle term is bounded by
[Equation]
The ﬁrst and last terms are both bounded by sup (cid:107) x − z
[Equation]
x
[Equation] [Equation]
V − W (cid:107)≤ R V (cid:107)∇ f ( x ; V ) − ∇ f ( x ; W ) (cid:107) , so we will now focus on bounding this term.
Note that
[Equation]
j
[Equation]
T .
We consider two cases: (cid:107) x (cid:107) ≤
( k + 1) (cid:15) and (cid:107) x (cid:107) >
( k + 1) (cid:15) , for some k ≥ 1 to be determined later.
• Case 1: (cid:107) x (cid:107) ≤ ( k + 1) (cid:15) .
Then (cid:107)∇ f ( x ; V ) − ∇ f ( x ; W ) (cid:107) ≤ ρ √ m √ m ( k + 1) (cid:15) =
( k + 1) ρ(cid:15) .
• Case 2: (cid:107) x (cid:107) >
( k + 1) (cid:15) .
Then (cid:107) z (cid:107) > k(cid:15) .
With probability at least 1 − mδ , (cid:107) w j (cid:107) ≤ √ d
+ (cid:112) 2 ln(1 /δ )
for all 1 ≤ j ≤ m .
Deﬁne
[Equation] [Equation]
where q := 2 (cid:16) r + 1 k √ d
+ 1 k (cid:112) 2 ln(1 /δ )
(cid:17) , with r a parameter we will choose later.
Note that
S
[Equation]
S 1 , since if | w T j x | ≤ r (cid:107) x (cid:107) , then
[Equation]
By Lemma A.2 part 1 of Ji et al.
we have that with probability at least 1 − 3 δ , | S 2 | ≤ qm + (cid:112) 8 qm ln(1 /δ ) .
Within the proof of Lemma A.7 part 1 of Ji et al.
(2021) it is shown that | S 3 | ≤ R 2 V r 2 .
So altogether, with probability at least 1 − ( m + 3) δ , | S | ≤ | S 2 | + | S 3 |
[Equation]
≤
[Equation]
Setting r :=
[Equation] [Equation]
ln
[Equation]
−
[Equation]
we get |
[Equation]
|
[Equation] [Equation]
m
[Equation]
Substituting this upper bound on | S | results in
[Equation]
Combining the two cases results in
[Equation]
After setting k := d 1 / 6 (cid:15) − 2 / 3 (cid:0) ln
( e/δ ) (cid:1) 1 / 3 to balance the terms,
[Equation]
+
[Equation]
So with probability at least 1 − ( m + 3) δ ,
[Equation]
Rescaling the probability of failure, we get that with probability at least 1 − δ ,
[Equation]
Using a sphere covering argument
[Equation]
we bound (cid:98) R ( i )
A ( Z ) in terms of (cid:98) R (0)
A ( Z ) , as well as R ( i ) ( Z ) in terms of R (0) ( Z ) .
Lemma A.
[Equation]
For any (cid:107) z (cid:107) ≤ 1 and R V ≥ 1 and R B ≥ 0 , with probability at least 1 − δ , sup
[Equation]
−
[Equation]
(cid:107)≤
[Equation]
(cid:107)
[Equation]
∇
[Equation]
x ; V )
[Equation]
∇
[Equation]
, B
[Equation]
≤
[Equation]
R B
[Equation] [Equation]
[Table]
[Equation]
and
[Equation]
Proof.
For notational convenience let W := W 0 .
For some 0 < (cid:15) ≤ 1 / ( dm ) which we will choose later, instantiate a cover C at scale (cid:15)/ √ d , with |C| ≤ ( √ d/(cid:15) )
d .
For a given point x , let
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
Upper bounding this expression by taking the supremum separately over each of terms,
[Equation]
and noticing the second term is bounded above by the ﬁrst term, results in
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table] [Equation] [Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
Instantiating Lemma A.7 part 1 of Ji et al.
(2021) for all z ∈ C , we get that with probability at least 1 − 3( √ d/(cid:15) )
d δ ,
[Equation]
By Lemma A.2 part 2 of Ji et al.
(2021), with probability at least 1 − ( √ d/(cid:15) )
d δ , (cid:107) W (cid:107) ≤ ( √ m + √ d
+ (cid:113) 2 ln(1 / (( √ d/(cid:15) )
d δ ))) .
Assuming this holds, then for all (cid:107) x − z (cid:107) ≤ (cid:15) ,
[Equation]
Instantiating Lemma A.12 for all z ∈ C , we get that with probability at least 1 − ( √ d/(cid:15) )
d δ
[Equation]
Altogether, with probability at least 1 − 5( √ d/(cid:15) )
d δ ,
[Equation] [Equation]
m 1 /
[Equation]
Setting (cid:15) = 1 / ( dm ) we get with probability at least 1 − 5( d √ dm )
d δ ,
[Equation]
Rescaling δ we get that with probability at least 1 − δ ,
[Equation]
[Table]
[Equation]
With probability at least 1 − δ , the previous part holds.
This part is then an immediate consequence since the logistic loss is 1 -Lipschitz.
We now prove the main optimization lemma.
Proof of Lemma 4.6.
We will use the fact that it does not matter much which feature we use, because the function values on the domain will differ by a small amount, and hence the resulting difference in risk will be small.
This is encapsulated by Lemma A.13.
We stop training once we reach t iterations, or the parameter distance from initialization exceeds 2 R Z .
That is, we stop at iteration T , where T = min { t, inf { i : (cid:107) W
i − W 0 (cid:107) > 2 R Z }} .
By deﬁnition (cid:107) W
[Equation]
W 0 (cid:107) ≤ 2 R Z ≤ R gd for all i < T , and
[Equation]
Then by Lemma A.13 part 2, we have that with probability at least 1 − δ , sup
[Equation]
i −
[Equation]
gd
[Equation]
Note that this holds for all iterations of interest as well as when B represents the reference parameters.
By Lemma A.11 and the interchangeability of features, we get
[Equation]
Rearranging and using the deﬁnition of W ≤ t gives
[Equation]
It remains to bound the term (cid:107) W 0 − Z
[Equation] [Equation]
W T
[Equation]
Z
[Equation]
T
[Equation]
2 η −
[Equation]
Note that if (cid:107) W T − Z (cid:107) ≥ (cid:107) W 0 − Z (cid:107) , we can bound the term above by 0.
Otherwise, we have
[Equation]
so we must have T = t .
Using this bound results in
[Equation]
giving us the ﬁnal bound.
A. A DVERSARIAL T RAINING R ESULTS
We can now prove our results on adversarial training.
Proof of Theorem 4.1.
To bound the risk of our ﬁnal iterate, we will ﬁrst linearize it, apply our generalization bound to get the linearized training risk, use our optimization lemma to get the linearized training risk of the reference model, and then repeat our steps in reverse to get the risk of the linearized ﬁnite reference model.
Let
[Equation]
n
[Equation]
By Lemma A.13, with probability at least 1 − δ , we have R A ( W ≤ t ) ≤ R (0)
A ( W ≤ t )
+ κ 1 and (cid:98) R (0)
A ( W ≤ t ) ≤ (cid:98) R A ( W ≤ t )
+ κ 1 .
By Lemma 4.6, with probability at least 1 − δ , we have
[Equation]
By Lemma 4.4, with probability at least 1 − 5 δ , we have R (0)
A ( W ≤ t ) ≤ (cid:98) R (0)
A ( W ≤ t )
+ ρR gd κ n , and with another probability at least 1 − 5 δ we have (cid:98) R (0)
A ( Z ) ≤ R (0)
A ( Z )
+ ρR Z κ n .
Putting these bounds together results in
[Equation]
Setting parameters appropriately, we can make all terms in Theorem 4.1 small, and get arbitrarily close to the optimal adversarial convex loss.
This is encapsulated by Corollaries 4.2 and 4.3, which we prove at the same time.
Proof of Corollary 4.2 and Corollary 4.3.
By deﬁnition and by Lemma 3.4, we can ﬁnd a continuous function h such that
[Equation]
By Theorem 4.3 of Ji et al.
(2019), we can ﬁnd an inﬁnite-width network | f ( 1 √ 2 ( x ; 1); U (cid:15) ∞ ) − h ( 1 √ 2 ( x ; 1)) | ≤ (cid:15)/ 2 , with associated R (cid:15) :
= max { ρ, ηρ 2 , sup x (cid:107) U (cid:15) ∞ ( x ) (cid:107)} < ∞ .
Deﬁne κ 2 =
[Equation]
ln(
[Equation]
2 /δ )
+ 20 R
[Equation]
Then within the proof of Lemma A.11 of Ji et al.
(2021) it is shown that with probability at least 1 − 6 δ , we can sample ﬁnite width reference parameters Z such that | f (0) ( 1 √ 2 ( x ; 1); Z ) − f ( 1 √ 2 ( x ; 1); U (cid:15) ∞ ) | ≤ κ 2 .
By the triangle inequality, | f ( 1 √ 2 ( x ; 1); Z ) − h ( 1 √ 2 ( x ; 1))
| ≤ κ 2 + (cid:15)/ 2 for all (cid:107) x (cid:107) ≤ 1 .
So for any (cid:107) x (cid:107) ≤ 1 , | (cid:96)
A ( x, y, f ( 1 √ 2 ( x ; 1); Z )) − (cid:96)
A ( x, y, h ( 1 √ 2 ( x ; 1)))
| ≤ κ 2 + (cid:15)/ 2 .
As a result,
[Equation]
measurable
[Equation]
Combining this with Theorem 4.1 holding with probability at least 1 − 12 δ , and so altogether with probability at least 1 − 18 δ ,
[Equation]
Corollary 4.2 then follows by setting parameters and reducing.
To get Corollary 4.3, let δ ( n ) = n − 2 .
Notice that for any (cid:15) > 0 , there exists n (cid:15) such that for all n ≥ n (cid:15) , with probability at least 1 − 1 /n 2 ,
[Equation]
Since (cid:80) n ≥ n (cid:15) 1 /n 2 < ∞ , by the Borel-Cantelli lemma we have
[Equation]
almost surely.
As (cid:15) > 0 was arbitrary, we get Corollary 4.3.