C ERTIFYING S OME D ISTRIBUTIONAL R OBUSTNESS WITH P RINCIPLED A DVERSARIAL T RAINING
A BSTRACT
Neural networks are vulnerable to adversarial examples and researchers have proposed many heuristic attack and defense mechanisms.
We address this problem through the principled lens of distributionally robust optimization, which guarantees performance under adversarial input perturbations.
By considering a Lagrangian penalty formulation of perturbing the underlying data distribution in a
Wasserstein ball, we provide a training procedure that augments model parameter updates with worst-case perturbations of training data.
For smooth losses, our procedure provably achieves moderate levels of robustness with little computational or statistical cost relative to empirical risk minimization.
Furthermore, our statistical guarantees allow us to efﬁciently certify robustness for the popu lation loss.
For imperceptible perturbations, our method matches or outperforms heuristic approaches.
I NTRODUCTION
Consider the classical supervised learning problem, in which we minimize an expected loss E
P
[ (cid:96) ( θ ; Z )] over a parameter θ ∈ Θ , where Z ∼ P 0 , P 0 is a distribution on a space Z , and (cid:96) is a loss function.
In many systems, robustness to changes in the data-generating distribution P 0 is desirable, whether they be from covariate shifts, changes in the underlying domain (Ben-David et al., 2010), or adversarial attacks (Goodfellow et al., 2015; Kurakin et al., 2016).
As deep networks become prevalent in modern performance-critical systems (perception for self-driving cars, automated detection of tumors), model failure is increasingly costly; in these situations, it is irresponsible to deploy models whose robustness and failure modes we do not understand or cannot certify.
Recent work shows that neural networks are vulnerable to adversarial examples; seemingly imperceptible perturbations to data can lead to misbehavior of the model, such as misclassiﬁcation of the output (Goodfellow et al., 2015; Nguyen et al., 2015; Kurakin et al., 2016; Moosavi-Dezfooli et al., 2016).
Consequently, researchers have proposed adversarial attack and defense mechanisms (Papernot et al., 2016a;b;c; Rozsa et al., 2016; Carlini & Wagner, 2017; He et al., 2017; Madry et al., 2017; Tram`er et al., 2017).
These works provide an initial foundation for adversarial training, but it is challenging to rigorously identify the classes of attacks against which they can defend (or if they exist).
Alternative approaches that provide formal veriﬁcation of deep networks (Huang et al., 2017;
Katz et al., 2017a;b) are NP-hard in general; they require prohibitive computational expense even on small networks.
Recently, researchers have proposed convex relaxations of the NP-hard veriﬁcation problem with some success (Kolter & Wong, 2017; Raghunathan et al., 2018), though they may be difﬁcult to scale to large networks.
In this context, our work is situated between these agendas: we develop efﬁcient procedures with rigorous guarantees for small to moderate amounts of robustness.
We take the perspective of distributionally robust optimization and provide an adversarial training procedure with provable guarantees on its computational and statistical performance.
We postulate a class P of distributions around the data-generating distribution P 0 and consider the problem
[Equation]
The choice of P inﬂuences robustness guarantees and computability; we develop robustness sets
P with computationally efﬁcient relaxations that apply even when the loss (cid:96) is non-convex.
We provide an adversarial training procedure that, for smooth (cid:96) , enjoys convergence guarantees similar to non-robust approaches while certifying performance even for the worst-case population loss sup P ∈P E P [ (cid:96) ( θ ; Z )] .
On a simple implementation in Tensorﬂow, our method takes 5 – 10 × as long as stochastic gradient methods for empirical risk minimization (ERM), matching runtimes for other adversarial training procedures (Goodfellow et al., 2015; Kurakin et al., 2016; Madry et al., 2017).
We show that our procedure—which learns to protect against adversarial perturbations in the training dataset—generalizes, allowing us to train a model that prevents attacks to the test dataset.
We brieﬂy overview our approach.
Let c : Z × Z → R + ∪ {∞} , where c ( z, z 0 ) is the “cost” for an adversary to perturb z 0 to z
(we typically use c ( z, z 0 )
=
(cid:107)
z − z 0 (cid:107) 2 p with p ≥ 1 ).
We consider the robustness region P =
{ P : W c ( P, P 0 ) ≤ ρ } , a ρ -neighborhood of the distribution P 0 under the Wasserstein metric W c ( · , · ) (see Section 2 for a formal deﬁnition).
For deep networks and other complex models, this formulation of problem (1) is intractable with arbitrary ρ .
Instead, we consider its Lagrangian relaxation for a ﬁxed penalty parameter γ ≥ 0 , resulting in the reformulation
[Equation]
where
[Equation]
(See Proposition 1 for a rigorous statement of these equalities.)
Here, we have replaced the usual loss (cid:96) ( θ ; Z ) by the robust surrogate φ γ ( θ ; Z ) ; this surrogate (2b) allows adversarial perturbations of the data z , modulated by the penalty γ .
We typically solve the penalty problem (2) with P 0 replaced by the empirical distribution (cid:98) P n , as P 0 is unknown (we refer to this as the penalty problem below).
The key feature of the penalty problem (2) is that moderate levels of robustness—in particular, defense against imperceptible adversarial perturbations—are achievable at essentially no computational or statistical cost for smooth losses (cid:96) .
Speciﬁcally, for large enough penalty γ (by duality, small enough robustness ρ ), the function z (cid:55)→ (cid:96) ( θ ; z ) − γc ( z, z 0 ) in the robust surrogate (2b) is strongly concave and hence easy to optimize if (cid:96) ( θ, z ) is smooth in z .
Consequently, stochastic gradient methods applied to problem (2) have similar convergence guarantees as for non-robust methods (ERM).
In Section 3, we provide a certiﬁcate of robustness for any ρ ; we give an efﬁciently computable data-dependent upper bound on the worst-case loss sup P : W c ( P,P 0 ) ≤ ρ E P [ (cid:96) ( θ ; Z )] .
That is, the worst-case performance of the output of our principled adversarial training procedure is guaranteed to be no worse than this certiﬁcate.
Our bound is tight when ρ = (cid:98) ρ n , the achieved robustness for the empirical objective.
These results suggest advantages of networks with smooth activations rather than ReLU’s.
We experimentally verify our results in Section 4 and show that we match or
Robust optimization and adversarial training The standard robust-optimization approach minimizes losses of the form sup u ∈U (cid:96) ( θ ; z + u ) for some uncertainty set U (Ratliff et al., 2006; Ben-Tal et al., 2009; Xu et al., 2009).
Unfortunately, this approach is intractable except for specially structured losses, such as the composition of a linear and simple convex function (Ben-Tal et al., 2009; Xu et al., 2009; 2012).
Nevertheless, this robust approach underlies recent advances in adversarial training (Szegedy et al., 2013; Goodfellow et al., 2015; Papernot et al., 2016b; Carlini & Wagner, 2017;
Madry et al., 2017), which heuristically perturb data during a stochastic optimization procedure.
One such heuristic uses a locally linearized loss function (proposed with p = ∞ as the “fast gradient sign method” (Goodfellow et al., 2015)):
[Equation]
One form of adversarial training trains on the losses (cid:96) ( θ ; ( x i + ∆ x i ( θ ) , y i ))
(Goodfellow et al., 2015; Kurakin et al., 2016), while others perform iterated variants (Papernot et al., 2016b; Carlini & Wagner, 2017; Madry et al., 2017; Tram`er et al., 2017).
Madry et al.
(2017) observe that these procedures attempt to optimize the objective E P 0 [sup (cid:107) u (cid:107) p ≤ (cid:15) (cid:96) ( θ ; Z + u )] , a constrained version of the penalty problem (2).
This notion of robustness is typically intractable: the inner supremum is generally non-concave in u , so it is unclear whether model-ﬁtting with these techniques converges, and there are possibly worst-case perturbations these techniques do not ﬁnd.
Indeed, it is NP-hard to ﬁnd worst-case perturbations when deep networks use ReLU activations, suggesting difﬁculties for fast and iterated heuristics (see Lemma 2 in Appendix B).
Smoothness, which can be obtained in standard deep architectures with exponential linear units (ELU’s)
(Clevert et al., 2015), allows us to ﬁnd Lagrangian worst-case perturbations with low computational cost.
Distributionally robust optimization To situate the current work, we review some of the substantial body of work on robustness and learning.
The choice of P in the robust objective (1) affects both the richness of the uncertainty set we wish to consider as well as the tractability of the resulting optimization problem.
Previous approaches to distributional robustness have considered ﬁnitedimensional parametrizations for P , such as constraint sets for moments, support, or directional deviations (Chen et al., 2007;
Delage & Ye, 2010; Goh & Sim, 2010), as well as non-parametric distances for probability measures such as f -divergences (Ben-Tal et al., 2013; Bertsimas et al., 2013; Lam & Zhou, 2015; Miyato et al., 2015; Duchi et al., 2016; Namkoong & Duchi, 2016), and
Wasserstein distances (Esfahani & Kuhn, 2015; Shaﬁeezadeh-Abadeh et al., 2015; Blanchet et al., 2016).
In constrast to f -divergences (e.g. χ 2 - or Kullback-Leibler divergences) which are effective when the support of the distribution P 0 is ﬁxed, a Wasserstein ball around P 0 includes distributions
Q with different support and allows (in a sense) robustness to unseen data.
Many authors have studied tractable classes of uncertainty sets P and losses (cid:96) .
For example,
Ben-Tal et al.
and Namkoong & Duchi (2017) use convex optimization approaches for fdivergence balls.
For worst-case regions P formed by Wasserstein balls, Esfahani & Kuhn (2015),
Shaﬁeezadeh-Abadeh et al.
(2015), and Blanchet et al.
(2016) show how to convert the saddle-point problem (1) to a regularized ERM problem, but this is possible only for a limited class of convex losses (cid:96) and costs c .
In this work, we treat a much larger class of losses and costs and provide direct solution methods for a Lagrangian relaxation of the saddle-point problem (1).
One natural application area is in domain adaptation (Lee & Raginsky, 2017); concurrently with this work, Lee &
Raginsky provide guarantees similar to ours for the empirical minimizer of the robust saddle-point problem (1) and give specialized bounds for domain adaptation problems.
In contrast, our approach is to use the distributionally robust approach to both defend against imperceptible adversarial perturbations and develop efﬁcient optimization procedures.
P ROPOSED APPROACH
Our approach is based on the following simple insight: assume that the function z (cid:55)→ (cid:96) ( θ ; z ) is smooth, meaning there is some L for which ∇ z (cid:96) ( θ ; · ) is L -Lipschitz.
Then for any c : Z × Z → R + ∪ {∞} 1 -strongly convex in its ﬁrst argument, a Taylor expansion yields
[Equation]
For γ ≥ L this is the ﬁrst-order condition for ( γ − L ) -strong concavity of z (cid:55)→ ( (cid:96) ( θ ; z ) − γc ( z, z 0 )) .
Thus, whenever the loss is smooth enough in z and the penalty γ is large enough (corresponding to less robustness), computing the surrogate (2b) is a strongly-concave optimization problem.
We leverage the insight (4) to show that as long as we do not require too much robustness, this strong concavity approach (4) provides a computationally efﬁcient and principled approach for robust optimization problems (1).
Our starting point is a duality result for the minimax problem (1) and its Lagrangian relaxation for Wasserstein-based uncertainty sets, which makes the connections between distributional robustness and the “lazy” surrogate (2b) clear.
We then show (Section 2.1) how stochastic gradient descent methods can efﬁciently ﬁnd minimizers (in the convex case) or approximate stationary points (when (cid:96) is non-convex) for our relaxed robust problems.
Wasserstein robustness and duality Wasserstein distances deﬁne a notion of closeness between distributions.
Let Z ⊂ R m , and let ( Z , A , P 0 ) be a probability space.
Let the transportation cost c : Z × Z → [0 , ∞ ) be nonnegative, lower semi-continuous, and satisfy c ( z, z ) = 0 .
For example, for a differentiable convex h : Z → R , the Bregman divergence c ( z, z 0 )
=
h ( z ) − h ( z 0 ) − (cid:104)∇ h ( z 0 ) , z − z 0 (cid:105) satisﬁes these conditions.
For probability measures P and Q supported on Z , let Π( P, Q ) denote their couplings, meaning measures M on Z 2 with M ( A, Z )
= P ( A ) and
M ( Z , A ) =
Q ( A ) .
The Wasserstein distance between P and Q is
[Equation]
For ρ ≥ 0 and distribution P 0 , we let P =
{ P : W c ( P, P 0 ) ≤ ρ } , considering the Wasserstein form of the robust problem (1) and its Lagrangian relaxation (2) with γ ≥ 0 .
The following duality result (Blanchet & Murthy, 2016) gives the equality (2) for the relaxation and an analogous result for the problem (1).
We give an alternative proof in Appendix C.1 for convex, continuous cost functions.
Proposition 1.
Let (cid:96) :
Θ × Z → R and c : Z × Z → R + be continuous.
Let φ γ ( θ ; z 0 ) =
sup z ∈Z { (cid:96) ( θ ; z ) − γc
( z, z 0 ) } be the robust surrogate (2b) .
For any distribution Q and any ρ > 0 ,
[Equation]
and for any γ ≥ 0 , we have
[Equation]
Leveraging the insight (4), we give up the requirement that we wish a prescribed amount ρ of robustness (solving the worst-case problem (1) for P
=
{ P : W c ( P, P 0 ) ≤ ρ } ) and focus instead on the Lagrangian penalty problem (2) and its empirical counterpart minimize θ
[Equation]
Θ
[Equation]
2. O PTIMIZING THE ROBUST LOSS BY STOCHASTIC GRADIENT DESCENT
We now develop stochastic gradient-type methods for the relaxed robust problem (7), making clear the computational beneﬁts of relaxing the strict robustness requirements of formulation (5).
We begin with assumptions we require, which roughly quantify the amount of robustness we can provide.
Assumption A.
The function c : Z×Z → R + is continuous.
For each z 0 ∈ Z , c ( · , z 0 ) is 1-strongly convex with respect to the norm (cid:107)·(cid:107) .
To guarantee that the robust surrogate (2b) is tractably computable, we also require a few smoothness assumptions.
Let (cid:107)·(cid:107) ∗ be the dual norm to (cid:107)·(cid:107) ; we abuse notation by using the same norm (cid:107)·(cid:107) on Θ and Z , though the speciﬁc norm is clear from context.
Assumption B.
The loss (cid:96) : Θ × Z → R satisﬁes the Lipschitzian smoothness conditions
[Equation]
These properties guarantee both (i) the well-behavedness of the robust surrogate φ γ and (ii) its efﬁcient computability.
Making point (i) precise, Lemma 1 shows that if γ is large enough and
Assumption B holds, the surrogate φ γ is still smooth.
Throughout, we assume Θ ⊆ R d .
Lemma 1.
Let f : Θ ×Z → R be differentiable and λ -strongly concave in z with respect to the norm (cid:107)·(cid:107) , and deﬁne ¯ f ( θ ) =
sup z ∈Z f
( θ, z ) .
Let g θ ( θ, z ) =
∇ θ f
( θ, z ) and g z ( θ, z ) = ∇ z f ( θ, z ) , and assume g θ and g z satisfy Assumption B with (cid:96) ( θ ; z ) replaced with f ( θ, z ) .
Then ¯ f is differentiable, and letting z (cid:63) ( θ ) = argmax z ∈Z f
( θ, z ) , we have ∇ ¯ f ( θ ) =
g θ
( θ, z (cid:63) ( θ )) .
Moreover, (cid:107) z (cid:63) ( θ 1 ) − z
(cid:63) ( θ 2 ) (cid:107) ≤
L z θ λ (cid:107) θ 1 − θ 2 (cid:107) and (cid:13)(cid:13) ∇ ¯ f ( θ ) − ∇ ¯ f ( θ (cid:48) )
(cid:13)(cid:13) (cid:63) ≤ (cid:18)
L θθ + L θ z
L z θ λ (cid:19) (cid:107) θ − θ (cid:48) (cid:107) .
See Section C.2 for the proof.
Fix z 0 ∈ Z and focus on the (cid:96) 2 -norm case where c ( z, z 0 ) satisﬁes
Assumption A with (cid:107)·(cid:107) 2 .
Noting that f ( θ, z ) :
= (cid:96) ( θ, z ) − γc
( z, z 0 ) is ( γ − L zz ) -strongly concave from the insight (4) (with L :
=
L zz ), let us apply Lemma 1.
Under Assumptions A, B, φ γ ( · ; z 0 ) then has L =
L θθ + L θ z L z θ [ γ − L zz ] + -Lipschitz gradients, and ∇
[Equation]
=
[Equation]
where z
[Equation]
=
[Equation]
z 0 ) } .
This motivates Algorithm 1, a stochastic-gradient approach for the penalty problem (7).
The beneﬁts of Lagrangian relaxation become clear here: for (cid:96) ( θ ; z ) smooth in z and γ large enough, gradient ascent on (cid:96) ( θ t ; z ) − γc
( z, z t ) in z converges linearly
and we can compute (approximate) (cid:98) z t efﬁciently (we initialize our inner gradient ascent iterations with the sampled natural example z t ).
Convergence properties of Algorithm 1 depend on the loss (cid:96) .
When (cid:96) is convex in θ and γ is large enough
that z (cid:55)→ ( (cid:96) ( θ ; z ) − γc
( z, z 0 ))
is concave for all ( θ, z
) ∈
Θ × Z , we have a stochastic monotone variational inequality, which is efﬁciently solvable (Juditsky et al., 2011; Chen et al., 2014) with convergence rate 1 / √ T .
When the loss (cid:96) is nonconvex in θ , the following theorem guarantees convergence to a stationary point of problem (7) at the same rate when γ ≥ L zz .
Recall that F ( θ ) =
E P
[ φ γ ( θ ; Z )] is the robust surrogate objective for the Lagrangian relaxation (2).
Theorem 2 (Convergence of Nonconvex SGD) .
Let Assumptions A and B hold with the (cid:96) 2 -norm and let Θ
= R d .
Let ∆ F ≥ F ( θ 0 ) − inf θ F ( θ ) .
Assume E
[ (cid:107)∇ F ( θ ) − ∇ θ φ γ ( θ, Z ) (cid:107) 22 ] ≤ σ 2 and take constant stepsizes α = (cid:113) ∆ F L φ Tσ 2 where L φ :=
L θθ + L θ z L z θ γ − L zz .
For T ≥ L φ ∆ F σ 2 , Algorithmsatisﬁes
[Equation]
See Section C.3 for the proof.
We make a few remarks.
First, the condition
E [ (cid:107)∇ F ( θ ) − ∇ θ φ γ ( θ, Z ) (cid:107) 22 ] ≤ σ 2 holds (to within a constant factor) whenever (cid:107)∇ θ (cid:96) ( θ, z ) (cid:107) 2 ≤ σ for all θ, z .
Theorem 2 shows that the stochastic gradient method achieves the rates of convergence on the penalty problem (7) achievable in standard smooth non-convex optimization (Ghadimi &
Lan, 2013).
The accuracy parameter (cid:15) has a ﬁxed effect on optimization accuracy, independent of
T : approximate maximization has limited effects.
Key to the convergence guarantee of Theorem 2 is that the loss (cid:96) is smooth in z : the inner supremum (2b) is NP-hard to compute for non-smooth deep networks (see Lemma 2 in Section B for a proof of this for ReLU’s).
The smoothness of (cid:96) is essential so that a penalized version (cid:96) ( θ, z ) − γc ( z, z 0 ) is concave in z (which can be approximately veriﬁed by computing Hessians ∇ 2 zz (cid:96) ( θ, z ) for each training datapoint), allowing computation and our coming certiﬁcates of optimality.
Replacing ReLU’s with sigmoids or ELU’s (Clevert et al., 2015) allows us to apply Theorem 2, making distributionally robust optimization tractable for deep learning.
In supervised-learning scenarios, we are often interested in adversarial perturbations only to feature vectors (and not labels).
Letting Z =
( X, Y ) where X denotes the feature vector (covariates) and
Y the label, this is equivalent to deﬁning the Wasserstein cost function c : Z × Z
→ R + ∪ {∞} by
[Equation]
where c x : X × X → R + is the transportation cost for the feature vector X .
All of our results suitably generalize to this setting with minor modiﬁcations to the robust surrogate (2b) and the above assumptions (see Section D).
Similarly, our distributionally robust framework (2) is general enough to consider adversarial perturbations to only an arbitrary subset of coordinates in Z .
For example, it may be appropriate in certain applications to hedge against adversarial perturbations to a small ﬁxed region of an image (Brown et al., 2017).
By suitably modifying the cost function c ( z, z (cid:48) ) to take value ∞ outside this small region, our general formulation covers such variants.
C ERTIFICATE OF ROBUSTNESS AND GENERALIZATION
From results in the previous section, Algorithm 1 provably learns to protect against adversarial perturbations of the form (7) on the training dataset.
Now we show that such procedures generalize, [Equation] allowing us to prevent attacks on the test set.
Our subsequent results hold uniformly over the space of parameters θ ∈ Θ , including θ WRM , the output of the stochastic gradient descent procedure in Section 2.1.
Our ﬁrst main result, presented in Section 3.1, gives a data-dependent upper bound on the population worst-case objective sup P : W c ( P,P 0 ) ≤ ρ E P [ (cid:96) ( θ ; Z )] for any arbitrary level of robustness ρ ; this bound is optimal for ρ = (cid:98) ρ n , the level of robustness achieved for the empirical distribution by solving (7).
Our bound is efﬁciently computable and hence certiﬁes a level of robustness for the worst-case population objective.
Second, we show in Section 3.2 that adversarial perturbations on the training set (in a sense) generalize: solving the empirical penalty problem (7) guarantees a similar level of robustness as directly solving its population counterpart (2).
3. C ERTIFICATE OF ROBUSTNESS
Our main result in this section is a data-dependent upper bound for the worst-case population objective: sup P : W c ( P,P 0 ) ≤ ρ E P [ (cid:96) ( θ ; Z )] ≤ γρ + E (cid:98) P n [ φ γ ( θ ; Z )]
+ O (1 / √ n ) for all θ ∈ Θ , with high probability.
To make this rigorous, ﬁx γ > 0 , and consider the worst-case perturbation, typically called the transportation map or Monge map (Villani, 2009),
[Equation]
Under our assumptions, T γ is easily computable when γ ≥ L zz .
Letting δ z denote the point mass at z , Proposition 1 shows the empirical maximizers of the Lagrangian formulation (6) are attained by
[Equation]
Our results imply, in particular, that the empirical worst-case loss E P ∗ n [ (cid:96) ( θ ; Z )] gives a certiﬁcate of robustness to (population)
Wasserstein perturbations up to level (cid:98) ρ n .
E P ∗ n ( θ ) [ (cid:96) ( θ ; Z )] is efﬁciently computable via (10), providing a data-dependent guarantee for the worst-case population loss.
Our bound relies on the usual covering numbers for the model class { (cid:96) ( θ ; · ) : θ ∈ Θ } as the notion of complexity (e.g. van der Vaart & Wellner, 1996), so, despite the inﬁnite-dimensional problem (7), we retain the same uniform convergence guarantees typical of empirical risk minimization.
Recall that for a set V , a collection v 1 , . .
. , v N is an (cid:15) -cover of V in norm (cid:107)·(cid:107)
if for each v ∈ V , there exists v i such that (cid:107) v − v i (cid:107) ≤ (cid:15) .
The covering number of V with respect to (cid:107)·(cid:107) is
N ( V, (cid:15), (cid:107)·(cid:107) ) :
= inf { N ∈ N | there is an (cid:15) -cover of V with respect to (cid:107)·(cid:107)} .
For F := { (cid:96) ( θ, · ) : θ ∈ Θ } equipped with the L ∞ ( Z ) norm (cid:107) f (cid:107) L ∞ ( Z ) :
= sup z ∈Z | f ( z ) | , we state our results in terms of (cid:107)·(cid:107) L ∞ ( Z ) -covering numbers of F .
To ease notation, we let
[Equation]
n where b 1 , b 2 are numerical constants.
We are now ready to state the main result of this section.
We ﬁrst show from the duality result (6) that we can provide an upper bound for the worst-case population performance for any level of robustness ρ .
For ρ = (cid:98) ρ n ( θ ) and θ = θ WRM , this certiﬁcate is (in a sense) tight as we see below.
Theorem 3.
Assume | (cid:96) ( θ ; z ) | ≤ M (cid:96) for all θ ∈ Θ and z ∈ Z .
Then, for a ﬁxed t > 0 and numerical constants b 1 , b 2 > 0 , with probability at least 1 − e − t , simultaneously for all θ ∈ Θ , ρ ≥ 0 , γ ≥ 0 ,
[Equation]
In particular, if ρ = (cid:98) ρ n ( θ ) then with probability at least 1 − e − t , for all θ ∈ Θ
[Equation]
See Section C.4 for its proof.
We now give a concrete variant of Theorem 3 for Lipschitz functions.
When Θ is ﬁnite-dimensional ( Θ ⊂ R d ), Theorem 3 provides a robustness guarantee scaling linearly with d despite the inﬁnite-dimensional Wasserstein penalty.
Assuming there exist θ 0 ∈ Θ , M θ 0 < ∞ such that | (cid:96) ( θ 0 ; z ) | ≤ M θ 0 for all z ∈ Z , we have the following corollary (see proof in Section C.5).
Corollary 1.
Let (cid:96) ( · ; z ) be L -Lipschitz with respect to some norm (cid:107)·(cid:107) for all z ∈ Z .
Assume that Θ ⊂
[Equation]
satisﬁes
[Equation]
(cid:107) < ∞ .
Then, the bounds (11) and (12) hold with
[Equation]
for some numerical constants b 1 , b 2 > 0 .
A key consequence of the bound (11) is that γρ + E (cid:98) P n [ φ γ ( θ ; Z )] certiﬁes robustness for the worstcase population objective for any ρ and θ .
For a given θ , this certiﬁcate is tightest at the achieved level of robustness (cid:98) ρ n ( θ ) , as noted in the reﬁned bound (12) which follows from the duality result
[Equation]
(See Section C.4 for a proof of these equalities.)
We expect θ WRM , the output of Algorithm 1, to be close to the minimizer of the surrogate loss E (cid:98) P n [ φ γ ( θ ; Z )] and therefore have the best guarantees.
Most importantly, the certiﬁcate (14) is easy to compute via expression (10): as noted in Section 2.1, the mappings T ( θ, Z i ) are efﬁciently computable for large enough γ , and (cid:98) ρ n = E (cid:98) P n [ c ( T ( θ, Z ) , Z )] .
The bounds (11)–(13) may be too large—because of their dependence on covering numbers and dimension—for practical use in security-critical applications.
With that said, the strong duality result, Proposition 1, still applies to any distribution.
In particular, given a collection of test examples
Z test i , we may interrogate possible losses under perturbations for the test examples by noting that, if (cid:98) P test denotes the empirical distribution on the test set (say, with putative assigned labels), then
[Equation] [Equation]
for all γ, ρ ≥ 0 .
Whenever γ is large enough (so that this is tight for small ρ ), we may efﬁciently compute the Monge-map (9) and the test loss (15) to guarantee bounds on the sensitivity of a parameter θ to a particular sample and predicted labeling based on the sample.
3. G ENERALIZATION OF A DVERSARIAL E XAMPLES
We can also show that the level of robustness on the training set generalizes.
Our starting point is
Lemma 1, which shows that T γ ( · ; z ) is smooth under Assumptions A and B:
[Equation]
for all θ 1 , θ 2 , where we recall that L zz is the Lipschitz constant of ∇ z (cid:96) ( θ ; z ) .
Leveraging this smoothness, we show that (cid:98) ρ n ( θ ) =
E (cid:98) P n [ c ( T γ ( θ ; Z ) , Z )] , the level of robustness achieved for the empirical problem, concentrates uniformly around its population counterpart.
Theorem 4.
Let Z ⊂ { z ∈ R m : (cid:107) z (cid:107) ≤ M z } so that (cid:107) Z (cid:107) ≤ M z almost surely and assume either that (i) c ( · , · ) is L c -Lipschitz over Z with respect to the norm (cid:107)·(cid:107) in each argument, or (ii) that (cid:96) ( θ, z ) ∈
[0 , M (cid:96) ] and z (cid:55)→ (cid:96) ( θ, z ) is γL c -Lipschitz for all θ ∈ Θ .
If Assumptions A and B hold, then with probability at least 1 − e − t , sup
[Equation]
(cid:107)·(cid:107) (cid:19)(cid:19) .
(17) where B =
L c M z under assumption ( i ) and B = M (cid:96) /γ
under assumption ( ii ) .
See Section C.6 for the proof.
For Θ ⊂ R d , we have log N (Θ , (cid:15), (cid:107)·(cid:107) )
≤
d log(1 + diam(Θ) (cid:15) ) so that the bound (30) gives the usual (cid:112) d/n generalization rate for the distance between adversarial perturbations and natural examples.
Another consequence of Theorem 4 is that (cid:98)
ρ n ( θ WRM ) in the certiﬁcate (12) is positive as long as the loss (cid:96) is not completely invariant to data.
To see this, note from the optimality conditions for T γ ( θ ; Z ) that E P
[ c ( T γ ( θ ; Z ) , Z )] =
iff ∇ z (cid:96) ( θ ; z ) = 0 almost surely, and hence for large enough n , we have (cid:98) ρ n ( θ ) > 0 by the bound (30).
E XPERIMENTS
Our technique for distributionally robust optimization with adversarial training extends beyond supervised learning.
To that end, we present empirical evaluations on supervised and reinforcement learning tasks where we compare performance with empirical risk minimization (ERM) and, where appropriate, models trained with the fast-gradient method (3) (FGM) (Goodfellow et al., 2015), its iterated variant (IFGM) (Kurakin et al., 2016), and the projected-gradient method (PGM) (Madry et al., 2017).
PGM augments stochastic gradient steps for the parameter θ with projected gradient ascent over x (cid:55)→ (cid:96) ( θ ; x, y ) , iterating (for data point x i , y i )
∆ x t
+
i
( θ ) :
= argmax (cid:107) η (cid:107) p ≤ (cid:15) {∇ x (cid:96) ( θ ; x t i , y i ) T η } and x t +1 i :=
Π B (cid:15),p ( x ti ) (cid:8)
[Equation] [Equation]
for t = 1 , . . .
, T adv , where Π denotes projection onto B (cid:15),p ( x i ) :
= { x : (cid:107) x − x i (cid:107) p ≤ (cid:15) } .
The adversarial training literature (e.g. Goodfellow et al.
(2015)) usually considers (cid:107)·(cid:107) ∞ -norm attacks, which allow imperceptible perturbations to all input features.
In most scenarios, however, it is reasonable to defend against weaker adversaries that instead perturb inﬂuential features more.
We consider this setting and train against (cid:107)·(cid:107) 2 -norm attacks.
Namely, we use the squared Euclidean cost for the feature vectors c x ( x, x (cid:48) ) :
= (cid:107) x − x (cid:48) (cid:107) 22 and deﬁne the overall cost as the covariate-shift adversary (8) for WRM (Algorithm 1), and we use p = 2 for FGM, IFGM, PGM training in all experiments; we still test against adversarial perturbations with respect to the norms p = 2 , ∞ .
We use T adv = 15 iterations for all iterative methods (IFGM, PGM, and WRM) in training and attacks.
In Section 4.1, we visualize differences between our approach and ad-hoc methods to illustrate the beneﬁts of certiﬁed robustness.
In Section 4.2 we consider a supervised learning problem for MNIST where we adversarially perturb the test data.
Finally, we consider a reinforcement learning problem in Section 4.3, where the Markov decision process used for training differs from that for testing.
WRM enjoys the theoretical guarantees of Sections 2 and 3 for large γ , but for small γ (large adversarial budgets), WRM becomes a heuristic like other methods.
In Appendix A.4, we compare WRM with other methods on attacks with large adversarial budgets.
In Appendix A.5, we further compare
WRM—which is trained to defend against (cid:107)·(cid:107) 2 -adversaries—with other heuristics trained to defend against (cid:107)·(cid:107) ∞ -adversaries.
WRM matches or outperforms other heuristics against imperceptible attacks, while it underperforms for attacks with large adversarial budgets.
4. V ISUALIZING THE BENEFITS OF CERTIFIED ROBUSTNESS
For our ﬁrst experiment, we generate synthetic data Z =
( X, Y ) ∼ P 0 by X
i iid ∼ N (0 2 , I 2 ) with labels Y
i =
sign( (cid:107) x (cid:107) 2 − √ 2) , where X ∈ R
and I 2 is the identity matrix in R 2 .
Furthermore, to create a wide margin separating the classes, we remove data with (cid:107) X (cid:107) 2 ∈ ( √ 2 / 1 . 3 , 1 . 3 √ 2) .
We train a small neural network with 2 hidden layers of size 4 and 2 and either all ReLU or all ELU activations between layers, comparing our approach (WRM) with ERM and the 2-norm FGM.
For our approach we use γ = 2 , and to make fair comparisons with FGM we use
[Equation]
for the fast-gradient perturbation magnitude (cid:15) , where θ WRM is the output of Algorithm 1.
Figure 1 illustrates the classiﬁcation boundaries for the three training procedures over the ReLUactivated (Figure 1(a)) and ELU-activated (Figure 1(b)) models.
Since 70% of the data are of the
[Figure] [Figure]
blue class ( (cid:107) X (cid:107) 2 ≤ √ 2 / 1 . 3 ), distributional robustness favors pushing the classiﬁcation boundary outwards; intuitively, adversarial examples are most likely to come from pushing blue points outwards across the boundary.
ERM and FGM suffer from sensitivities to various regions of the data, as evidenced by the lack of symmetry in their classiﬁcation boundaries.
For both activations, WRM pushes the classiﬁcation boundaries further outwards than ERM or FGM.
However, WRM with
ReLU’s still suffers from sensitivities (e.g. radial asymmetry in the classiﬁcation surface) due to the lack of robustness guarantees.
WRM with ELU’s provides a certiﬁed level of robustness, yielding an axisymmetric classiﬁcation boundary that hedges against adversarial perturbations in all directions.
Recall that our certiﬁcates of robustness on the worst-case performance given in Theorem 3 applies for any level of robustness ρ .
In Figure 2(a), we plot our certiﬁcate (11) against the out-of-sample (test) worst-case performance sup P : W c ( P,P 0 ) ≤ ρ E P [ (cid:96) ( θ ; Z )] for WRM with ELU’s.
Since the worstcase loss is hard to evaluate directly, we solve its Lagrangian relaxation (6) for different values of γ adv .
For each γ adv , we consider the distance to adversarial examples in the test dataset
[Equation]
(20) where (cid:98) P test is the test distribution, c ( z, z (cid:48) ) :
= (cid:107) x − x (cid:48) (cid:107) 22 + ∞ · 1 { y (cid:54) =
y (cid:48) } as before, and
T γ adv ( θ, Z ) = argmax z { (cid:96) ( θ ; z ) − γ adv c ( z, Z ) } is the adversarial perturbation of Z (Monge map) for the model θ .
The worst-case losses on the test dataset are then given by
[Equation]
As anticipated, our certiﬁcate is almost tight near the achieved level of robustness (cid:98)
ρ n ( θ WRM ) for
WRM (10) and provides a performance guarantee even for other values of ρ .
[Figure]
4. L EARNING A MORE ROBUST CLASSIFIER
We now consider a standard benchmark—training a neural network classiﬁer on the MNIST dataset.
The network consists of 8 × 8 , 6 × 6 , and 5 × 5 convolutional ﬁlter layers with ELU activations followed by a fully connected layer and softmax output.
We train WRM with γ = 0 .
04 E (cid:98) P n [ (cid:107) X (cid:107) 2 ] , and for the other methods we choose (cid:15) as the level of robustness achieved by WRM (19).
In the ﬁgures, we scale the budgets 1 /γ adv and (cid:15) adv for the adversary with C p := E (cid:98) P n [ (cid:107) X (cid:107) p ] .
First, in Figure 2(b) we again illustrate the validity of our certiﬁcate of robustness (11) for the worstcase test performance for arbitrary level of robustness ρ .
We see that our certiﬁcate provides a performance guarantee for out-of-sample worst-case performance.
We now compare adversarial training techniques.
All methods achieve at least 99% test-set accuracy, implying there is little test-time penalty for the robustness levels ( (cid:15) and γ ) used for training.
It is thus important to distinguish the methods’ abilities to combat attacks.
We test performance of the ﬁve methods (ERM, FGM, IFGM, PGM, WRM) under PGM attacks (18) with respect to 2 - and ∞ -norms.
In Figure 3(a) and (b), all adversarial methods outperform ERM, and WRM offers more robustness even with respect to these PGM attacks.
Training with the Euclidean cost still provides robustness to ∞ -norm fast gradient attacks.
We provide further evidence in Appendix A.1.
Next we study stability of the loss surface with respect to perturbations to inputs.
We note that small values of (cid:98) ρ test ( θ ) , the distance to adversarial examples (20), correspond to small magnitudes of ∇ z (cid:96) ( θ ; z ) in a neighborhood of the nominal input, which ensures stability of the model.
Figure 4(a) shows that (cid:98) ρ test differs by orders of magnitude between the training methods (models θ
= θ
ERM , θ FGM , θ IFGM , θ PGM , θ WRM ); the trend is nearly uniform over all γ adv , with θ WRM being the most stable.
Thus, we see that our adversarial-training method defends against gradientexploiting attacks by reducing the magnitudes of gradients near the nominal input.
In Figure 4(b) we provide a qualitative picture by adversarially perturbing a single test datapoint until the model misclassiﬁes it.
Speciﬁcally, we again consider WRM attacks and we decrease γ adv until each model misclassiﬁes the input.
The original label is 8, whereas on the adversarial examples
IFGM predicts 2, PGM predicts 0, and the other models predict 3.
WRM’s “misclassiﬁcations” appear consistently reasonable to the human eye (see Appendix A.2 for examples of other digits);
WRM defends against gradient-based exploits by learning a representation that makes gradients point towards inputs of other classes.
Together, Figures 4(a) and (b) depict our method’s defense mechanisms to gradient-based attacks: creating a more stable loss surface by reducing the magnitude of gradients and improving their interpretability.
[Figure]
4. R OBUST M ARKOV DECISION PROCESSES
For our ﬁnal experiments, we consider distributional robustness in the context of Q-learning, a model-free reinforcement learning technique.
We consider Markov decision processes (MDP’s)
( S , A , P sa , r ) with state space S , action space A , state-action transition probabilities P sa , and rewards r : S → R .
The goal of a reinforcement-learning agent is to maximize (discounted) cumulative rewards (cid:80) t λ t E [ r ( s t )] (with discount factor λ ); this is analogous to minimizing E P [ (cid:96) ( θ ; Z )] in supervised learning.
Robust MDP’s consider an ambiguity set P sa for state-action transitions.
The goal is maximizing the worst-case realization inf P ∈P sa (cid:80) t λ t E P
[ r ( s t )] , analogous to problem (1).
In a standard MDP, Q-learning learns a quality function Q : S ×
A → R via the iterations
[Equation]
(21) such that argmax a Q ( s, a ) is (eventually) the optimal action in state s to maximize cumulative reward.
In scenarios where the underlying environment has a continuous state-space and we represent
Q with a differentiable function (e.g. Mnih et al.
, we can modify the update (21) with an adversarial state perturbation to incorporate distributional robustness.
Namely, we draw the nominal state-transition update (cid:98) s t +1 ∼ p
sa ( s t , a t ) , and proceed with the update (21) using the perturbation
[Equation]
For large γ , we can again solve problem (22) efﬁciently using gradient descent.
This procedure provides robustness to uncertainties in state-action transitions.
For tabular Q-learning, where we represent Q only over a discretized covering of the underlying state-space, we can either neglect the second term in the update (22) and, after performing the update, round s t +1 as usual, or we can perform minimization directly over the discretized covering.
In the former case, since the update (22) simply modiﬁes the state-action transitions (independent of Q ), standard results on convergence for tabular Q-learning (e.g. Szepesv´ari & Littman (1999)) apply under these adversarial dynamics.
We test our adversarial training procedure in the cart-pole environment, where the goal is to balance a pole on a cart by moving the cart left or right.
The environment caps episode lengths to 400 steps and ends the episode prematurely if the pole falls too far from the vertical or the cart translates too far from its origin.
We use reward r ( β ) :=
e −| β | for the angle β of the pole from the vertical.
We use a tabular representation for Q with 30 discretized states for β and 15 for its time-derivative ˙ β
(we perform the update (22) without the Q -dependent term).
The action space is binary: push the cart left or right with a ﬁxed force.
Due to the nonstationary, policy-dependent radius for the Wasserstein ball, an analogous (cid:15) for the fast-gradient method (or other variants) is not well-deﬁned.
Thus, we only compare with an agent trained on the nominal MDP.
We test both models with perturbations to the physical parameters: we shrink/magnify the pole’s mass by 2, the pole’s length by 2, and the strength of gravity g by 5.
The system’s dynamics are such that the heavy, short, and strong-gravity cases are more unstable than the original environment, whereas their counterparts are less unstable.
[Table] [Table]
[Figure]
Table 1 shows the performance of the trained models over the original MDP and all of the perturbed
MDPs.
Both models perform similarly over easier environments, but the robust model greatly outperforms in harder environments.
Interestingly, as shown in Figure 5, the robust model also learns more efﬁciently than the nominal model in the original MDP.
We hypothesize that a potential sideeffect of robustness is that adversarial perturbations encourage better exploration of the environment.
D ISCUSSION AND FUTURE WORK
Explicit distributional robustness of the form (5) is intractable except in limited cases.
We provide a principled method for efﬁciently guaranteeing distributional robustness with a simple form of adversarial data perturbation.
Using only assumptions about the smoothness of the loss function (cid:96) , we prove that our method enjoys strong statistical guarantees and fast optimization rates for a large class of problems.
The NP-hardness of certifying robustness for ReLU networks, coupled with our empirical success and theoretical certiﬁcates for smooth networks in deep learning, suggest that using smooth networks may be preferable if we wish to guarantee robustness.
Empirical evaluations indicate that our methods are in fact robust to perturbations in the data, and they match or outperform less-principled adversarial training techniques.
The major beneﬁt of our approach is its simplicity and wide applicability across many models and machine-learning scenarios.
There remain many avenues for future investigation.
Our optimization result (Theorem 2) applies only for small values of robustness ρ and to a limited class of Wasserstein costs.
Furthermore, our statistical guarantees (Theorems 3 and 4) use (cid:107)·(cid:107) ∞
-covering numbers as a measure of model complexity, which can become prohibitively large for deep networks.
In a learning-theoretic context, where the goal is to provide insight into convergence behavior as well as comfort that a procedure will “work” given enough data, such guarantees are satisfactory, but this may not be enough in security-essential contexts.
This problem currently persists for most learning-theoretic guarantees in deep learning, and the recent works of Bartlett et al.
(2017), Dziugaite & Roy (2017), and
Neyshabur et al.
(2017) attempt to mitigate this shortcoming.
Replacing our current covering number arguments with more intricate notions such as margin-based bounds (Bartlett et al., 2017) would extend the scope and usefulness of our theoretical guarantees.
Of course, the certiﬁcate (15) still holds regardless.
More broadly, this work focuses on small-perturbation attacks, and our theoretical guarantees show that it is possible to efﬁciently build models that provably guard against such attacks.
Our method becomes another heuristic for protection against attacks with large adversarial budgets.
Indeed, in the large-perturbation regime, efﬁciently training certiﬁably secure systems remains an important open question.
We believe that conventional (cid:107)·(cid:107) ∞ -defense heuristics developed for image classiﬁcation do not offer much comfort in the large-perturbation/perceptible-attack setting: (cid:107)·(cid:107) ∞ -attacks with a large budget can render images indiscernible to human eyes, while, for example, (cid:107)·(cid:107) 1 -attacks allow a concerted perturbation to critical regions of the image.
Certainly (cid:107)·(cid:107) ∞ -attack and defense models have been fruitful in building a foundation for security research in deep learning, but moving beyond them may be necessary for more advances in the large-perturbation regime.
A CKNOWLEDGMENTS
We thank Jacob Steinhardt for valuable feedback.
AS, HN, and JD were partially supported by the SAIL-Toyota Center for AI Research.
AS was also partially supported by a Stanford Graduate
Fellowship and a Fannie & John Hertz Foundation Fellowship.
HN was partially supported by a
Samsung Fellowship.
JD was partially supported by the National Science Foundation award NSFCAREER-1553086.
A A DDITIONAL E XPERIMENTS A. MNIST ATTACKS
We repeat Figure 3 using FGM (tow row of Figure 6) and IFGM (bottom row of Figure 6) attacks.
The same trends are evident as in Figure 3.
[Figure]
A. MNIST STABILITY OF LOSS SURFACE
In Figure
[Figure]
we repeat the illustration in Figure 4(b) for more digits.
WRM’s “misclassiﬁcations” are consistently reasonable to the human eye, as gradient-based perturbations actually transform the original image to other labels.
Other models do not exhibit this behavior with the same consistency (if at all).
Reasonable misclassiﬁcations correspond to having learned a data representation that makes gradients interpretable.
A. MNIST E XPERIMENTS WITH VARIED γ
In Figure 8, we choose a ﬁxed WRM adversary (ﬁxed γ adv ) and perturb WRM models trained with various penalty parameters γ .
As the bound (11) with η = γ suggests, even when the adversary has more budget than that used for training ( 1 /γ < 1 /γ adv ), degradation in performance is still smooth .
Further, as we decrease the penalty γ , the amount of achieved robustness—measured here by test error on adversarial perturbations with γ adv —has diminishing gains; this is again consistent with our theory which says that the inner problem (2b) is not efﬁciently computable for small γ .
[Figure] [Figure]
A. MNIST EXPERIMENTS WITH A LARGER ADVERSARIAL BUDGET
Figures 9 and 10 repeat Figures 2(b), 3, and 6 for a larger training adversarial budget ( γ = 0 .
02 C 2 ) as well as larger test adversarial budgets.
The distinctions in performance between various methods are less apparent now.
For our method, the inner supremum is no longer strongly concave for over 10% of the data, indicating that we no longer have guarantees of performance.
For large adversaries (i e. large desired robustness values) our approach becomes a heuristic just like the other approaches.
[Figure] [Figure]
ρ n ( θ WRM ) .
A. MNIST ∞ - NORM EXPERIMENTS
We consider training FGM, IFGM, and PGM with p = ∞ .
We ﬁrst compare with WRM trained in the same manner as before—with the squared Euclidean cost.
Then, we consider a heuristic
Lagrangian approach for training WRM with the squared ∞ -norm cost.
A.5. C OMPARISON WITH STANDARD WRM
Our method (WRM) is trained to defend against (cid:107)·(cid:107) 2 -norm attacks by using the cost function
[Equation]
with the convention that 0 · ∞ = 0 .
Standard adversarial training methods often train to defend against (cid:107)·(cid:107) ∞ -norm attacks, which we compare our method against in this subsection.
Direct comparison between these approaches is not immediate, as we need to determine a suitable (cid:15) to train
FGM, IFGM, and PGM in the ∞ -norm that corresponds to the penalty parameter γ for the (cid:107)·(cid:107) 2norm that we use.
Similar to the expression (19), we use
[Equation]
23) as the adversarial training budget for FGM, IFGM and PGM with (cid:107)·(cid:107) ∞ -norms.
Because 2-norm adversaries tend to focus budgets on a subset of features, the resulting ∞ -norm perturbations are relatively large.
In Figure 11 we show the results trained with a small training adversarial budget.
In this regime, (large γ , small (cid:15) ), WRM matches the performance of other techniques.
In Figure 12 we show the results trained with a large training adversarial budget.
In this regime (small γ , large (cid:15) ), performance between WRM and other methods diverge.
WRM, which provably defends against small perturbations, outperforms other heuristics against imperceptible attacks for both Euclidean and ∞ norms.
Further, it outperforms other heuristics on natural images, showing that it consistently achieves a smaller price of robustness.
On attacks with large adversarial budgets (large (cid:15) adv ), however, the performance of WRM is worse than that of the other methods (especially in the case of ∞ -norm attacks).
These ﬁndings verify that WRM is a practical alternative over existing heuristics for the moderate levels of robustness where our guarantees hold.
A.5. C OMPARISON WITH (cid:107)·(cid:107) ∞ -WRM
Our computational guarantees given in Theorem 2 does not hold anymore when we consider ∞ - norm adversaries:
[Equation]
Optimizing the Lagrangian formulation (2b) with the ∞ -norm is difﬁcult since subtracting a multiple of the ∞ -norm does not add (negative) curvature in all directions.
In Appendix E, we propose a heuristic algorithm for solving the inner supremum problem (2b) with the above cost function (24).
Our approach is based on a variant of proximal algorithms.
We compare our proximal heuristic introduced in Appendix E with other adversarial training procedures that were trained against ∞ -norm adversaries.
Results are shown in Figure 13 for a small training adversary and Figure 14 for a large training adversary.
We observe that similar trends as in
Section A.5.1 hold again.
[Figure] [Figure]
[Figure] [Figure]
B F INDING WORST - CASE PERTURBATIONS WITH R E LU’ S IS NP- HARD
We show that computing worst-case perturbations sup u ∈U (cid:96) ( θ ; z + u ) is NP-hard for a large class of feedforward neural networks with ReLU activations.
This result is essentially due to Katz et al.
(2017a).
In the following, we use polynomial time to mean polynomial growth with respect to m , the dimension of the inputs z .
An optimization problem is NPO (NP-Optimization) if (i) the dimensionality of the solution grows polynomially, (ii) the language { u ∈ U} can be recognized in polynomial time (i.e. a deterministic algorithm can decide in polynomial time whether u ∈ U ), and (iii) (cid:96) can be evaluated in polynomial time.
We restrict analysis to feedforward neural networks with ReLU activations such that the cor- responding worst-case perturbation problem is NPO.
Furthermore, we impose separable structure on U , that is, U :=
{ v ≤ u ≤ w } for some v < w ∈ R m .
Lemma 2.
Consider feedforward neural networks with ReLU’s and let U :
= { v ≤ u ≤ w } , where v < w such that the optimization problem max u ∈U (cid:96) ( θ ; z + u ) is NPO.
Then there exists θ such that this optimization problem is also NP-hard.
Proof
First, we introduce the decision reformulation of the problem: for some b , we ask whether there exists some u such that (cid:96) ( θ ; z + u ) ≥ b .
The decision reformulation for an NPO problem is in NP, as a certiﬁcate for the decision problem can be veriﬁed in polynomial time.
By appropriate scaling of θ , v , and w , Katz et al.
(2017a) show that 3-SAT Turing-reduces to this decision problem: given an oracle D for the decision problem, we can solve an arbitrary instance of 3-SAT with a polynomial number of calls to D .
The decision problem is thus NP-complete.
Now, consider an oracle O for the optimization problem.
The decision problem Turing-reduces to the optimization problem, as the decision problem can be solved with one call to O .
Thus, the optimization problem is NP-hard.
C P ROOFS C. P ROOF OF P ROPOSITION
For completeness, we provide an alternative proof to that given in Blanchet & Murthy (2016) using convex analysis.
Our proof is less general, requiring the cost function c to be continuous and convex in its ﬁrst argument.
The below general duality result gives Proposition 1 as an immediate special case.
Recalling Rockafellar & Wets (1998, Def. 14.27 and Prop. 14.33), we say that a function g : X × Z
→ R is a normal integrand if for each α , the mapping z
(cid:55)→ { x | g ( x, z ) ≤ α } is closed-valued and measurable.
We recall that if g is continuous, then g is a normal integrand (Rockafellar & Wets, 1998, Cor. 14.34); therefore, g ( x, z )
= γc ( x, z ) − (cid:96) ( θ ; x ) is a normal integrand.
We have the following theorem.
Theorem 5.
Let f, c be such that for any γ ≥ 0 , the function g ( x, z ) =
γc ( x, z ) − f ( x ) is a normal integrand.
(For example, continuity of f and closed convexity of c is sufﬁcient.)
For any ρ > 0 we have
[Equation]
Proof
First, the mapping P (cid:55)→ W c ( P, Q ) is convex in the space of probability measures.
As taking P = Q yields W c
( Q, Q ) = 0 , Slater’s condition holds and we may apply standard (inﬁnite dimensional) duality results (Luenberger, 1969, Thm. 8.7.1) to obtain
[Equation]
Now, noting that for any M ∈ Π( P, Q ) we have (cid:82) fdP = (cid:82)(cid:82) f ( x ) dM ( x, z ) , we have that the rightmost quantity in the preceding display satisﬁes
[Equation]
That is, we have
[Equation]
Now, we note a few basic facts.
First, because we have a joint supremum over P and measures
M ∈ Π( P, Q ) in expression (25), we have that
[Equation]
We would like to show equality in the above.
To that end, we note that if P denotes the space of regular conditional probabilities (Markov kernels) from Z to X , then
[Equation]
Recall that a conditional distribution P ( · | z ) is regular if P ( · | z ) is a distribution for each z and for each measurable A , the function z (cid:55)→ P ( A | z ) is measurable.
Let X denote the space of all measurable mappings
z (cid:55)→ x ( z ) from Z to X .
Using the powerful measurability results of
Rockafellar & Wets (1998, Theorem 14.60), we have
[Equation]
because f − c is upper semi-continuous, and the latter function is measurable.
Now, let x ( z ) be any measurable function that is (cid:15) -close to attaining the supremum above.
Deﬁne the conditional distribution P ( · | z ) to be supported on x ( z ) , which is evidently measurable.
Then using the preceding display, we have
[Equation]
As (cid:15) > 0 is arbitrary, this gives
[Equation]
as desired, which implies both equality (6) and completes the proof.
C. P ROOF OF L EMMA
First, note that z (cid:63) ( θ ) is unique and well-deﬁned by the strong convexity of f ( θ, · ) .
For Lipschitzness of z (cid:63) ( θ ) , we ﬁrst argue that z (cid:63) ( θ ) is continuous in θ .
For any θ , optimality of z (cid:63) ( θ ) implies that g z ( θ, z (cid:63) ( θ )) T ( z − z (cid:63) ( θ )) ≤ 0 .
By strong concavity, for any θ 1 , θ 2 and z (cid:63) 1 =
z (cid:63) ( θ 1 ) and z (cid:63) 2 =
z (cid:63) ( θ 2 ) , we have
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
Summing these inequalities gives
[Equation]
where the last inequality follows because g z ( θ 1 , z
[Equation] [Equation]
T
[Equation]
z
[Equation]
2 − z
[Equation]
1 ) ≤ 0 .
Using a cross-Lipschitz condition from above and Holder’s inequality, we obtain
[Equation]
that is,
[Equation]
To see the second inequality, we show that ¯ f is differentiable with ∇ ¯ f ( θ ) =
g θ
( θ, z (cid:63) ( θ )) .
By using a variant of the envelope (or Danskin’s) theorem, we ﬁrst show directional differentiability of ¯ f .
Recall that we say f is inf-compact if for all θ 0 ∈ Θ , there exists α > 0 and a compact set C ⊂ Θ such that
[Equation]
for all θ in some neighborhood of θ 0 (Bonnans & Shapiro, 2013).
See Bonnans & Shapiro (2013,
Theorem 4.13) for a proof of the following result.
Lemma 3.
Suppose that f ( · , z ) is differentiable in θ for all z ∈ Z , and f , ∇ z f are continuous on Θ × Z .
If f is inf-compact, then ¯ f is directionally differentiable with
[Equation]
where S ( θ ) = argmin
z f ( θ, z ) .
Now, note that from Assumption B, we have
[Equation]
from which it is easy to see that f is inf-compact.
Applying Lemma 3 to ¯ f and noting that S ( θ ) is unique by strong convexity of f ( θ, · ) , we have that ¯ f is directionally differentiable with ∇ ¯ f ( θ ) =
g θ
( θ, z (cid:63) ( θ )) .
Since g θ is continuous by Assumption B and z (cid:63) ( θ ) is Lipschitz (26), we conclude that ¯ f is differentiable.
Finally, we have
[Equation]
where we have used inequality (26) again.
This is the desired result.
C. P ROOF OF T HEOREM
Our proof is based on that of Ghadimi & Lan (2013).
For shorthand, let f ( θ, z ; z 0 ) =
(cid:96) ( θ ; z ) − γc
( z, z 0 ) , noting that we perform gradient steps with
[Equation]
for (cid:98) z t an (cid:15) -approximate maximizer of f ( θ, z ; z t ) in z , and θ t +1 =
θ t − α t g t .
We assume α t ≤ 1 L φ in the rest of the proof, which is satisﬁed for the constant stepsize α = (cid:113) ∆ F L φ Tσ 2 and T ≥ L φ ∆ F σ 2 .
By a Taylor expansion using the L φ -smoothness of the objective F , we have
[Equation]
Recalling the deﬁnition (2b) of φ γ ( θ ; z 0 ) = sup z ∈Z f
( θ, z ; z 0 ) , we deﬁne the potentially biased errors δ t =
g t − ∇ θ φ γ ( θ t ; z t ) .
Substituting the this into the progress guarantee (27) [Table] we have F
[Table] , δ [Equation]
Using ± (cid:104) a, b (cid:105) ≤ 12 (cid:107) a [Equation] 22 + 12 (cid:107) b (cid:107) 22 in the preceding display, we get
[Equation]
Letting z t(cid:63) = argmax z f ( θ t , z ; z t ) , note that the error δ t satisﬁes
[Equation]
where the ﬁnal inequality uses the λ = γ − L zz strong-concavity of z
(cid:55)→ f
( θ, z ; z 0 ) .
For shorthand, let (cid:98) (cid:15) =
[Equation] L zz
[Equation]
Taking conditional expectations in the bound (28) and using E [ ∇ θ φ γ ( θ t ; z t ) | θ t ] = ∇ F ( θ t ) , we have
[Equation]
where we use the fact that α t ≤ 1 L φ .
For a ﬁxed stepsize α , taking the total expectation yields
[Equation]
since we have E [ (cid:107)∇ φ γ ( θ ; Z ) − ∇ F ( θ ) (cid:107) 22 ] ≤ σ 2 by assumption.
Summing over t , we have
[Equation]
where the latter inequality holds since inf θ F ( θ ) ≤ F ( θ T ) . Plugging in α = (cid:113) ∆ F L φ Tσ 2 gives the result.
C. P ROOF OF T HEOREM
We ﬁrst show the bound (11).
From the duality result (5), we have the deterministic result that
[Equation] for all ρ > 0 , distributions Q , and γ ≥ 0 .
Next, we show that E (cid:98) P n [ φ γ ( θ ; Z )] concentrates around its population counterpart at the usual rate (Boucheron et al., 2005).
First, we have that
[Equation]
because − M [Equation] ≤ (cid:96) ( θ ; z ) ≤ φ γ ( θ ; z ) ≤ sup z (cid:96) ( θ ; z ) ≤ M (cid:96) .
Thus, the functional θ (cid:55)→ F n ( θ ) satisﬁes bounded differences (Boucheron et al., 2013, Thm. 6.2), and applying standard results on
Rademacher complexity (Bartlett & Mendelson, 2002) and entropy integrals (van der Vaart & Wellner, 1996, Ch. 2.2) gives the result.
To see the second result (12), we substitute ρ = (cid:98) ρ n in the bound (11).
Then, with probability at least 1 − e − t , we have
[Equation]
Since we have sup
[Equation]
from the strong duality in Proposition 1, our second result follows.
C. P ROOF OF C OROLLARY
The result is essentially standard (van der Vaart & Wellner, 1996), which we now give for completeness.
Note that for F = { (cid:96) ( θ ; · ) : θ ∈ Θ } , any ( (cid:15), (cid:107)·(cid:107) )
-covering { θ 1 , . .
, θ N } of Θ guarantees that min i | (cid:96) ( θ ; z ) − (cid:96) ( θ i ; z ) | ≤ L(cid:15) for all θ, z , or
N ( F , (cid:15), (cid:107)·(cid:107)
L ∞ ( Z ) ) ≤ N (Θ , (cid:15)/L, (cid:107)·(cid:107) ) ≤ (cid:18) 1 + diam(Θ) L (cid:15) (cid:19) d , where diam(Θ)
=
sup θ,θ (cid:48)
∈ Θ (cid:107) θ − θ (cid:48) (cid:107) .
Noting that | (cid:96) ( θ ; Z ) | ≤ L diam(Θ)
+ M
=:
M (cid:96) , we have the result.
C. P ROOF OF T HEOREM
Deﬁne
[Equation]
First, we show that P ∗ ( θ ) and P ∗ n ( θ ) are attained for all θ ∈ Θ .
We omit the dependency on θ for notational simplicity and only show the result for P ∗ ( θ ) as the case for P ∗ n ( θ ) is symmetric.
Let P (cid:15) be an (cid:15) -maximizer, so that
[Equation]
As Z is compact, the collection { P 1 /k } k ∈ N is a uniformly tight collection of measures.
By Prohorov’s theorem (Billingsley, 1999, Ch 1.1, p. 57), (restricting to a subsequence if necessary), there exists some distribution P ∗ on Z such that P 1 /k d
→ P ∗ as k → ∞ .
Continuity properties of
Wasserstein distances (Villani, 2009, Corollary 6.11) then imply that
[Equation]
Combining (29) and the monotone convergence theorem, we obtain
[Equation]
We conclude that P ∗ is attained for all P 0 .
Next, we show the concentration result (30).
Recall the deﬁnition (9) of the transportation mapping
[Equation]
which is unique and well-deﬁned under our strong concavity assumption that γ > L zz , and smooth (recall Eq.
(16)) in θ .
Then by Proposition 1 (or by using a variant of Kantorovich duality (Villani, 2009, Chs. 9–10)), we have
[Equation]
and W c
[Equation]
P
[Equation]
θ
[Equation]
P
[Equation]
Z
[Equation]
Z
[Equation]
We now proceed by showing the uniform convergence of E (cid:98) P n [ c ( T ( θ ; Z ) , Z
[Equation]
] to E P
[ c ( T (
[Equation]
Z
[Equation]
, Z[-)] to E P 
-]
[Equation] ] under both cases (i), that c is Lipschitz, and (ii), that (cid:96) is Lipschitz in z , using a covering argument on Θ .
Recall inequality (16) (i.e. Lemma 1), which is that
[Equation]
We have the following lemma.
Lemma 4.
Assume the conditions of Theorem 4.
Then for any θ 1 , θ 2 ∈ Θ ,
[Equation]
Proof
In the ﬁrst case, that c is L c -Lipschitz in its ﬁrst argument, this is trivial: we have
[Equation]
by the smoothness inequality (16) for T
[Equation]
In the second case [Equation] that z (cid:55)→ (cid:96) ( θ, z ) is L c -Lipschitz, let z i
= T ( θ i ; z ) for shorthand.
Then we have γc
[Equation]
, and similarly,
[Equation]
Combining these two inequalities and using that
[Equation]
for any θ gives the result.
Using Lemma 4 we obtain that θ
[Equation]
[Equation]
Z ) , Z )] | is 2 L c L z θ / [ γ − L zz ] + -Lipschitz.
Let Θ cover = { θ 1 , · · · , θ N } be a [ γ − L zz ] + t 4 L c L z θ -cover of Θ with respect to (cid:107)·(cid:107) .
From Lipschitzness of | E (cid:98) P n [ c ( T ( θ ; Z ) , Z )] − E P
[ c ( T ( θ ; Z ) , Z )] | , we have that if for all θ ∈ { Θ cover } ,
[Equation]
then it follows that
[Equation]
Under the ﬁrst assumption ( i ) , we have | c ( T ( θ ; Z ) , Z ) | ≤ 2 L c M z .
Applying Hoeffding’s inequality, for any ﬁxed θ ∈ Θ
[Equation]
Taking a union bound over θ 1 , · · · , θ N , we conclude that
[Equation]
which was our desired result (30).
Under the second assumption ( ii ) , we have from the deﬁnition of the transport map T
[Equation]
and hence | c ( T ( θ ; Z ) , Z ) | ≤ M (cid:96) /γ .
The result for the second case follows from an identical reasoning.
D S UPERVISED L EARNING
In supervised learning settings, it is often natural—for example, in classiﬁcation—to only consider adversarial perturbations to the feature vectors (covariates).
In this section, we give an adapation of the results in Sections 2 and 3 (Theorems 2 and 4) to such scenarios.
Let Z =
( X, Y ) ∈
X × R where X ∈ X is a feature vector 5 and Y ∈ R is a label.
In classiﬁcation settings, we have Y ∈ { 1 , . . .
, K } .
We consider an adversary that can only perturb the feature vector X (Goodfellow et al., 2015), which can be easily represented in our robust formulation (2) by deﬁning the cost function c : Z × Z
→ R + ∪ {∞} as follows: for z
=
( x, y ) and z (cid:48) =
( x (cid:48) , y (cid:48) ) , recall the covariate shift cost function (8)
[Equation]
where c x : X × X → R + is the transportation cost for the feature vector X .
As before, we assume that c x is nonnegative, continuous, convex in its ﬁrst argument and satisﬁes
c x ( x, x ) = 0 .
Under the cost function (8), the robust surrogate loss in the penalty problem (2) and its empirical counterpart (7) becomes
[Equation]
Similarly as in Section 2.1, we require the following two assumptions that guarantee efﬁcient computability of the robust surrogate φ γ .
Assumption C.
The function c x : X × X → R + is continuous.
For each x 0 ∈ X , c x ( · , x 0 ) is 1-strongly convex with respect to the norm (cid:107)·(cid:107) .
Let (cid:107)·(cid:107) ∗ be the dual norm to (cid:107)·(cid:107) ; we again abuse notation by using the same norm (cid:107)·(cid:107) on Θ and X , though the speciﬁc norm is clear from context.
Assumption D.
The loss (cid:96) :
Θ × Z → R satisﬁes the Lipschitzian smoothness conditions
[Table]
Under Assumptions C and D
[Table]
an analogue of Lemma 1 still holds.
The proof of the following result is nearly identical to that of Lemma 1; we state the full result for completeness.
Lemma 5.
Let f : Θ × X
→ R be differentiable and λ -strongly concave in x with respect to the norm (cid:107)·(cid:107)
[Table] and deﬁne ¯ f ( θ ) = sup x ∈X f ( θ, x ) .
Let g θ ( θ, x ) = ∇ θ
f
( θ, x ) and g x ( θ, x ) = ∇ x f ( θ, x ) , and assume g θ
and g x satisfy the Lipschitz conditions of Assumption
B.
Then ¯ f is differentiable, and letting x (cid:63) ( θ ) =
argmax x ∈X f ( θ, x ) , we have ∇ ¯ f ( θ )
=
g θ ( θ, x (cid:63) ( θ )) .
Moreover, (cid:107) x (cid:63) ( θ
[Table]
) − x (cid:63) ( θ 2 ) (cid:107) ≤ L x θ λ (cid:107) θ 1 − θ 2 (cid:107) and (cid:13)(cid:13) ∇ ¯ f ( θ ) − ∇ ¯ f ( θ (cid:48) )
(cid:13)(cid:13) (cid:63) ≤ (cid:18)
L θθ + L θ x
L x θ λ (cid:19) (cid:107) θ − θ (cid:48) (cid:107) .
From Lemma 5, our previous results (Theorems 2 and 4) follow.
The following is an analogue of
Theorem 2 for the cost function (8).
Theorem 6 (Convergence of Nonconvex SGD) .
Let Assumptions C and D hold with the (cid:96) 2 -norm and let Θ
= R d .
Let ∆ F ≥ F ( θ 0 ) − inf θ F ( θ ) .
Assume E
[ (cid:107)∇ F ( θ ) − ∇ θ φ γ ( θ, Z ) (cid:107) 22 ] ≤ σ 2 , and take constant stepsizes α = (cid:113) 2∆ F Lσ 2 T where
L = L θθ + L θ x L x θ γ − L xx .
Then Algorithm 1 satisﬁes
[Equation]
Similarly, an analogous result to Theorem 4 holds.
Deﬁne the transport map for the covariate shift
[Equation]
Theorem 7.
Let Z ⊂ { z ∈ R m : (cid:107) z (cid:107) ≤ M z } so that (cid:107) Z (cid:107) ≤ M z almost surely and assume either that (i) c
x ( · , · ) is L c -Lipschitz over X with respect to the norm (cid:107)·(cid:107) in each argument, or (ii) that (cid:96) ( θ, z ) ∈
[0 , M (cid:96) ] and x (cid:55)→ (cid:96) ( θ, ( x, y )) is γL c -Lipschitz for all θ ∈ Θ .
If Assumptions C and D hold, then with probability at least 1 − e − t ,
[Equation]
where B =
L c M z under assumption ( i ) and B = M (cid:96) /γ
under assumption ( ii ) .
For both results, the proofs are essentially identical as before, but with an application of Lemmainstead of Lemma 1.
E P ROXIMAL ALGORITHM FOR (cid:107)·(cid:107) ∞ - NORM ROBUSTNESS
In this section, we give a efﬁcient training algorithm that learns to defend against (cid:107)·(cid:107) ∞ -norm perturbations.
For simplicity, we assume Z
=
R m for the rest of this section.
Let θ ∈ Θ be some ﬁxed model, z
∈
Z a natural example 6 and deﬁne f ( z ) := (cid:96) ( θ ; z ) to ease notation.
Concretely, we are interested in solving the optimization problem
[Equation]
Note that this is equivalent to computing the surrogate loss
φ γ ( θ ; z 0 ) =
sup z ∈Z { (cid:96) ( θ ; z ) − γc
( z, z 0 ) } for c ( z, z 0 ) =
(cid:13)(cid:13)
z − z
(cid:13)(cid:13) 2 ∞ and α = 2 γ .
Our following treatment can easily be modiﬁed for the supervised learning scenario
[Equation]
1 (cid:8) y
= y 0 (cid:9) with the convention that ∞ · 0 = 0 .
To make our notation consistent with the optimization literature, we consider the minimization problem
[Equation]
A simple gradient descent algorithm applied to the problem (31) may be slow to converge in practice.
Intuitively, this is because the subgradient of z (cid:55)→ 12 (cid:13)(cid:13) z − z
(cid:13)(cid:13) 2 ∞ is given by (cid:13)(cid:13) z − z
(cid:13)(cid:13) ∞ · s where s is a m -dimensional
vector taking values in [ − 1 , 1] whose coordinates are non-zero only when | z j − z 0 ,j | =
(cid:13)(cid:13)
z − z
(cid:13)(cid:13) ∞ .
Hence, at any given iteration of gradient descent, the (cid:107)·(cid:107) ∞ -norm penalty term only gets accounted for by at most a few coordinates.
To remedy this issue, we consider a proximal algorithm for solving the problem (31) (see, for example, Parikh & Boyd (2013) for an comprehensive review of proximal algorithms).
For a function g : Z → R and a positive number λ > 0 , the proximal operator for λg is deﬁned by [Equation] Algorithm f ( z ) −
[Equation]
(cid:13)(cid:13)
[Equation]
I NPUT : Stepsizes λ t for t = 0 , . . .
, T − 1 do z t + 12 ← z t + λ t ∇ f
( z t ) v t ← sort ( | z t + 12 − z 0 | , dec ) Compute β t as in (33) [Equation] Then, the proximal algorithm on the problem (31) consists of two steps at each iteration t : ( i ) for the smooth function − f ( z ) , take a gradient descent step at the current iterate z t ( z t + 12 below) and ( ii ) for the non-smooth function (cid:13)(cid:13)
z − z
(cid:13)(cid:13) 2 ∞ , take a proximal step for the function λ t α 2 (cid:13)(cid:13) · − z
(cid:13)(cid:13) 2 ∞ at z t + 12 ( z t +1 below):
[Equation]
The following proposition shows that we can compute the proximal step z t +1 efﬁciently, simply by sorting the vector |
z t + 12 − z 0 | .
We denote by v t , the sorted vector of | z t + 12 − z 0 | in decreasing order.
In the proposition, we use the notation [ · ] + = max( · , 0) .
Proposition 8.
Deﬁne the scale parameter β t > 0 by
[Equation]
v ti where j t
[Equation]
= max
[Equation]
Then, z t +1 in the proximal update (32) is given by
[Equation]
See Section E.1 for the proof of the proposition.
From the proposition, we obtain the proximal procedure in Algorithm 2 that can be used to solve for the approximate maximizer of (cid:96) ( θ ; z ) − γc
( z, z 0 ) in Algorithm 1.
Heuristically, ignoring the truncation term in the proximal update (34), we have
[Equation]
Here, we move towards the sign of z t + λ t ∇ f
( z t ) − z 0 modulated by the term β t , as opposed to just the sign of ∇ f ( z t ) for the iterated fast sign gradient method (Goodfellow et al., 2015; Kurakin et al., 2016).
E. P ROOF OF P ROPOSITION
In this proof, we drop the subscript on the iteration t to ease notation.
We assume without loss of generality that z t + 12 − z
(cid:54) = 0 .
For some convex, lower semi-continuous function g : R m → R , let g ∗ ( s ) =
sup s { s (cid:62) t − g ( t ) } be the Fenchel conjuagte of g .
From the Moreau decomposition (Parikh & Boyd, 2013, Section 2.5), we have
[Equation]
for any w ∈ R m .
Noting that the conjugate of z (cid:55)→ [Equation]
2 ∞ is given by z (cid:55)→ z
[Equation]
21 , we have
[Equation]
Let us denote the sorted vector (in decreasing order) of | w − z 0 | by v .
Then, in light of the preceeding display, it sufﬁces to show that
[Equation]
where β (cid:63) is deﬁned as in (33).
To show that equality (35) holds, note that the ﬁrst order optimality conditions for
[Equation]
is given by
[Equation]
Now, we use the following elementary lemma.
Lemma 6.
For 0 (cid:54) = v ≥ 0 with decreasing coordinates, the solution to the equation
[Equation]
=
[Equation]
exists and is given by β (cid:63) :
= 1 + αλj (cid:63) j (cid:88) i =
v i where j (cid:63) :=
max (cid:40) j ∈ [ m ]
[Equation]
(cid:88)
[Equation]
=
[Equation]
Proof of
Lemma
First, note that β (cid:55)→ (cid:80) i : v i >β ( v i − β ) − αλβ
=: h ( β ) is decreasing.
Noting that (cid:107) v (cid:107) 1 > 0 and − αλ (cid:107) v (cid:107) ∞ < 0 , there exists β (cid:48) such that h ( β (cid:48) )
= 0 and β (cid:48) ∈ (0 , (cid:107) v (cid:107) ∞ ) .
Since v i ’s are decreasing and nonnegative, there exists j (cid:48) such that v j (cid:48) >
β (cid:48) ≥ v j (cid:48)
+1 (we abuse notation and let v m +1 := 0 ).
Then, we have
[Equation]
That is, j (cid:48) =
j [Equation]
Solving for β (cid:48) in
[Equation]
we obtain β (cid:48)
=
β (cid:63) as claimed.
Now, deﬁne
[Equation]
Then, we have from Lemma 6 that
[Equation]
If z (cid:63)i > 0 , then sign( z (cid:63)i ) = sign( w i − z
i )
so that [Equation] 1 sign [Equation]
z i
[Equation]
If z (cid:63)i = 0 , then | w i −
z
i | ≤ β (cid:63) and[-(cid:107) z (cid:63) (cid:107) 
 [ − 1 , 1] − αλ ( w i − z 0 i ) = αλβ (cid:63) [ − 1 , 1] − αλ-]
[Equation]
Hence, z (cid:63) satisﬁes the optimality condition (36) as desired.