Title: ADVERSARIALLY ROBUST GENERALIZATION JUST REQUIRES MORE UNLABELED DATA

Abstract: Neural network robustness has recently been highlighted by the existence of adversarial examples. Many previous works show that the learned networks do not perform well on perturbed test data, and significantly more labeled data is required to achieve adversarially robust generalization. In this paper, we theoretically and empirically show that with just more unlabeled data, we can learn a model with better adversarially robust generalization. The key insight of our results is based on a risk decomposition theorem, in which the expected robust risk is separated into two parts: the stability part which measures the prediction stability in the presence of perturbations, and the accuracy part which evaluates the standard classification accuracy. As the stability part does not depend on any label information, we can optimize this part using unlabeled data. We further prove that for a specific Gaussian mixture problem illustrated by Schmidt et al. ( 2018), adversarially robust generalization can be almost as easy as the standard generalization in supervised learning if a sufficiently large amount of unlabeled data is provided. Inspired by the theoretical findings, we further show that a practical adversarial training algorithm that leverages unlabeled data can improve adversarial robust generalization on MNIST and Cifar-10.

1. INTRODUCTION:

Deep learning (LeCun et al., 2015) , especially deep Convolutional Neural Network (CNN) (LeCun et al., 1998) , has led to state-of-the-art results spanning many machine learning fields, such as image classification (Simonyan & Zisserman, 2014; He et al., 2016; Huang et al., 2017; Hu et al., 2017) , object detection (Ren et al., 2015; Redmon et al., 2016; Lin et al., 2018) , semantic segmentation (Long et al., 2015; Zhao et al., 2017; Chen et al., 2018) and action recognition (Tran et al., 2015; Wang et al., 2016; 2018) .

Despite the great success in numerous applications, recent studies show that deep CNNs are vulnerable to some well-designed input samples named as Adversarial Examples (Szegedy et al., 2013; Biggio et al., 2013) . Take image classification as an example, for almost every commonly used well-performed CNN, attackers are able to construct a small perturbation on an input image. The perturbation is almost imperceptible to humans but can fool the model to make a wrong prediction. The problem is serious as some designed adversarial examples can be transferred among different kinds of CNN architectures (Papernot et al., 2016) , which makes it possible to perform black-box attack: an attacker has no access to the model parameters or even architecture, but can still easily fool a machine learning system.

There is a rapidly growing body of work on studying how to obtain a robust neural network model. Most of the successful methods are based on adversarial training (Szegedy et al., 2013; Madry et al., 2017; Goodfellow et al., 2015; Huang et al., 2015) . The high-level idea of these works is that during training, we predict the strongest perturbation to each sample against the current model and use the perturbed sample together with the correct label for gradient descent optimization. However, the learned model tends to overfit on the training data and fails to keep robust on unseen testing data. For example, using the state-of-the-art adversarial robust training method (Madry et al., 2017) , the defense success rate of the learned model on the testing data is below 60% while that on the training data is almost 100%, which indicates that the robustness fails to generalize. Some theoretical results further show that it is challenging to achieve adversarially robust generalization. Fawzi et al. (2018) proves that adversarial examples exist for any classifiers and can be transferred across different models, making it impossible to design network architectures free from adversarial attacks. Schmidt et al. (2018) shows that adversarially robust generalization requires much more labeled data than standard generalization in certain cases. Tsipras et al. (2019) presents an inherent trade-off between accuracy and robust accuracy and argues that the phenomenon comes from the fact that robust classifiers learn different features. Therefore it is hard to reach high robustness for standard training methods.

Given the challenge of the task and previous findings, in this paper, we provide several theoretical and empirical results towards better adversarially robust generalization. In particular, we show that we can learn an adversarially robust model which generalizes well if we have plenty of unlabeled data, and the labeled sample complexity for adversarially robust generalization in Schmidt et al. (2018) can be largely reduced if unlabeled data is used. First, we show that the expected robust risk can be upper bounded by the sum of two terms: a stability term which measures whether the model can output consistent predictions under perturbations, and an accuracy term which evaluates whether the model can make correct predictions on natural samples. Given the stability term does not rely on ground truth labels, unlabeled data can be used to minimize this term and thus improve the generalization ability. Second, we prove that for the Gaussian mixture problem defined in Schmidt et al. (2018) , if unlabeled data can be used, adversarially robust generalization will be almost as easy as the standard generalization in supervised learning (i.e. using the same number of labeled samples under similar conditions). Inspired by the theoretical findings, we provide a practical algorithm that can learn from both labeled and unlabeled data for better adversarially robust generalization. Our experiments on MNIST and Cifar-10 show that the method achieves better performance, which verifies our theoretical findings.

Our contributions are in three folds.

• In Section 3.2.1, we provide a theorem to show that unlabeled data can be naturally used to improve the expected robust risk in general setting and thus leveraging unlabeled data is a way to improve adversarially robust generalization.

• In Section 3.2.2, we discuss a specific Gaussian mixture problem introduced in Schmidt et al. (2018) . In Schmidt et al. (2018) , the authors proved that in this case, the labeled sample complexity for robust generalization is significantly larger than that for standard generalization. As an extension of this work, we prove that in this case, the labeled sample complexity for robust generalization can be the same as that for standard generalization if we have enough unlabeled data.

• Inspired by our theoretical findings, we provide an adversarial robust training algorithm using both labeled and unlabeled data. Our experimental results show that the algorithm achieves better performance than baseline algorithms on MNIST and Cifar-10, which empirically proves that unlabeled data can help improve adversarially robust generalization.

2. RELATED WORKS:

Adversarial attacks and defense Most previous works study how to attack a neural network model using small perturbations under certain norm constraints, such as l ∞ norm or l 2 norm. For the l ∞ constraint, Fast Gradient Sign Method (FGSM) (Goodfellow et al., 2015) finds a direction to which the perturbation increases the classification loss at an input point to the greatest extent; Projected Gradient Descent (PGD) (Madry et al., 2017) extends FGSM by updating the direction of the attack in an iterative manner and clipping the modifications in the norm range after each iteration.

For the l 2 constraint, DeepFool (Moosavi-Dezfooli et al., 2016) iteratively computes the minimal norm of an adversarial perturbation by linearizing around the input in each iteration. C&W attack (Carlini & Wagner, 2016 ) is a comprehensive approach that works under both norm constraints. In this work, we focus on learning a robust model to defend the white-box attack, i.e. the attacker knows the model parameters and thus can use the algorithms above to attack the model.

There are a large number of papers about defending against adversarial attacks, but the result is far from satisfactory. Remarkably, Athalye et al. (2018) shows most defense methods take advantage of so-called "gradient mask" and provides an attacking method called BPDA to correct the gradients. So far, adversarial training (Madry et al., 2017) has been the most successful white-box defense al-gorithm. By modeling the learning problem as a mini-max game between the attacker and defender, the robust model can be trained using iterative optimization methods. Some recent papers (Wang et al., 2019; Gao et al., 2019) theoretically prove the convergence of adversarial training. Moreover, Shafahi et al. (2019) ; Zhang et al. (2019a) propose ways to accelerate the speed of adversarial training. Adversarial logit pairing (Kannan et al., 2018) and TRADES (Zhang et al., 2019b) further improve adversarial training by decomposing the prediction error as the sum of classification error and boundary error, and Wang et al. (2019) proposes to improve adversarial training by evaluating the quality of adversarial examples using the FOSC metric.

Semi-supervised learning Using unlabeled data to help the learning process has been proved promising in different applications (Rasmus et al., 2015; Zhang & Shi, 2011; Elworthy, 1994) . Many approaches use regularizers called "soft constraints" to make the model "behave" well on unlabeled data. For example, transductive SVM (Joachims, 1999) uses prediction confidence as a soft constraint, and graph-based SSL (Belkin et al., 2006; Talukdar & Crammer, 2009) requires the model to have similar outputs at endpoints of an edge. The most related work to ours is the consistencybased SSL. It uses consistency as a soft constraint, which encourages the model to make consistent predictions on unlabeled data when a small perturbation is added. The consistency metric can be either computed by the model's own predictions, such as the Π model (Sajjadi et al., 2016) , Temporal Ensembling (Laine & Aila, 2016) and Virtual Adversarial Training (Miyato et al., 2018) , or by the predictions of a teacher model, such as the mean teacher model (Tarvainen & Valpola, 2017) .

Semi-supervised learning for adversarially robust generalization There are three other concurrent and independent works (Carmon et al., 2019; Uesato et al., 2019; Najafi et al., 2019) which also explore how to use unlabeled data to help adversarially robust generalization. We describe the three works below, and compare them with ours. See also Carmon et al. (2019) and Uesato et al. (2019) for the comparison of all the four works from their perspective. Najafi et al. (2019) investigate the robust semi-supervised learning from the distributionally robust optimization perspective. They assign soft labels to the unlabeled data according to an adversarial loss and train such images together with the labeled ones. Results on a wide range of tasks show that the proposed algorithm improves the adversarially robust generalization. Both Najafi et al. (2019) and we conduct semi-supervised experiments by removing labels from the training data. Uesato et al. (2019) study the Gaussian mixture model of Schmidt et al. (2018) and theoretically show that a self-training algorithm can successfully leverage unlabeled data to improve adversarial robustness. They extend the self-training algorithm to the real image dataset Cifar10, augment it with unlabeled Tiny Image dataset and improve state-of-the-art adversarial robustness. They show strong improvements in the low labeled data regimes by removing most labels from CIFAR-10 and SVHN.

In our work, we also study the Gaussian mixture model and show that a slightly different algorithm can improve adversarially robust generalization as well. We observe similar improvements using our algorithm on Cifar-10 and MNIST. Carmon et al. (2019) obtain similar theoretical and empirical results as in Uesato et al. (2019) , and offer a more comprehensive analysis of other aspects. They show that by using unlabeled data and robust self-training, the learned models can obtain better certified robustness against all possible attacks. Moreover, they study the impact of different training components on the final model performance, such as the size of unlabeled data. We also study the influence of different factors in our experiments and have similar observations.

3. MAIN RESULTS:

In this section, we illustrate the benefits of using unlabeled data for robust generalization from a theoretical perspective.

3.1. NOTATIONS AND DEFINITIONS:

We consider a standard classification task with an underlying data distribution P XY over pairs of examples x ∈ R d and corresponding labels y ∈ {1, 2, • • • , K}. Usually P XY is unknown and we can only access to

S = {(x 1 , y 1 ), • • • , (x n , y n )} in which (x i , y i ) is independent and identically drawn from P XY , i = 1, 2, • • • , n.

For ease of reference, we denote this empirical distribution as PXY (i.e. the uniform distribution over i.i.d. sampled data). We also assume that we are given a suitable loss function l(f (x), y), where f ∈ F is parameterized by θ. The standard loss function is the zero-one loss, i.e. l 0/1 (y , y) = I[y = y]. Due to its discontinuous and non-differentiable nature, surrogate loss functions such as cross-entropy or mean square loss are commonly used during optimization.

Our goal is to find an f ∈ F that minimizes the expected classification risk. Without loss of any generality, our theory is mainly based on the binary classification problem, i.e. K = 2. All theorems below can be easily extended to the multi-class classification problem. For a binary classification problem, the expected classification risk is defined as below. Definition 1. (Expected classification risk). Let P XY be a probability distribution over R d × {±1}.

The expected classification risk R of a classifier f : R d → {-1, 1} under distribution P XY and loss function l is defined as

EQUATION

We use R(f ) to denote the classification risk under the underlying distribution and use R(f ) to denote the classification risk under the empirical distribution. We use R 0/1 (f ) to denote the risk with the zero-one loss function. The classification risk characterizes whether the model f is accurate. However, we also care about whether f is robust. For example, when input x is an image, we hope a small change (perturbation) to x will not change the prediction of f . To this end, Schmidt et al. (2018) defines expected robust classification risk as follows.

Definition 2. (Expected robust classification risk). Let P XY be a probability distribution over R d × {±1} and B : R d → P R d be a perturbation set. Then the B-robust classification risk R B-robust of a classifier f : R d → {-1, 1} under distribution P XY and loss function l is defined as

EQUATION

Again, we use R B-robust (f ) to denote the expected robust classification risk under the underlying distribution and use RB-robust (f ) to denote the expected robust classification risk under the empirical distribution. We use R 0/1 B-robust (f ) to denote the robust risk with the zero-one loss function. In real practice, the most commonly used setting is the perturbation under -bounded

l ∞ norm constraint B ∞ (x) = x ∈ R d | x -x ∞ ≤ ε .

For simplicity, we refer to the robustness defined by this perturbation set as ∞ -robustness.

3.2. ROBUST GENERALIZATION ANALYSIS:

Our first result (Section 3.2.1) shows that unlabeled data can be used to improve adversarially robust generalization in general setting. Our second result (Section 3.2.2) shows that for a specific learning problem defined on Gaussian mixture model, compared to previous work (Schmidt et al., 2018) , the sample complexity for robust generalization can be significantly reduced by using unlabeled data. Both results suggest that using unlabeled data is a natural way to improve adversarially robust generalization. All detailed proofs of the theorems and lemmas in this section can be found in the appendix.

3.2.1. GENERAL RESULTS:

In this subsection, we show that the expected robust classification risk can be bounded by the sum of two terms. The first term only depends on the hypothesis space and the unlabeled data, and the second term is a standard PAC bound. Theorem 1. Let F be the hypothesis space. Let S = (x i , y i ) n i=1 be the set of n i.i.d. samples drawn from the underlying distribution P XY . For any function f ∈ F, with probability at least 1 -δ over the random draw of S, we have

EQUATION

where ( 1) is a term that can be optimized with only unlabeled data and (2) is the standard PAC generalization bound. P X is the marginal distribution for P XY and Rad S (F) is the empirical Rademacher complexity of hypothesis space F.

From Theorem 1, we can see that the expected robust classification risk is bounded by the sum of two terms: the first term only involves the marginal distribution P X and the second term is the standard PAC generalization error bound. This shows that the expected robust risk minimization can be achieved by jointly optimizing the two terms simultaneously: we can optimize the first term using unlabeled data sampled from P X and optimize the second term using labeled data sampled from P XY , which is the same as the standard supervised learning.

While Cullina et al. (2018) suggests that in the standard PAC learning scenario (only labeled data is considered), the generalization gap of robust risk can be sometimes uncontrollable by the capacity of hypothesis space F, our results show that we can mitigate this problem by introducing unlabeled data. In fact, our following result shows that with enough unlabeled data, learning a robust model can be almost as easy as learning a standard model.

3.2.2. LEARNING FROM GAUSSIAN MIXTURE MODEL:

The learning problem defined on Gaussian mixture model is illustrated in Schmidt et al. (2018) as an example to show adversarially robust generalization needs much more labeled data compared to standard generalization. In this subsection, we show that for this specific problem, just using more unlabeled data is enough to achieve adversarially robust generalization. For completeness, we first list the results in Schmidt et al. (2018) and then show our theoretical findings. Definition 3. (Gaussian mixture model (Schmidt et al., 2018) ). Let θ * ∈ R d be the per-class mean vector and let σ > 0 be the variance parameter. Then the (θ * , σ)-Gaussian mixture model is defined by the following distribution P XY over (x, y) ∈ R d ×{±1}: First, draw a label y ∈ {±1} uniformly at random. Then sample the data point

x ∈ R d from N (y • θ * , σ 2 I d ).

Given the samples from the distribution defined above, the learning problem is to find a linear classifier to predict label y from x. where c is a universal constant. Let ŵ ∈ R d be the vector ŵ = y • x. Then with high probability, the expected classification risk of the linear classifier f ŵ using 0-1 loss is at most 1%.

Theorem 2 suggests that we can learn a linear classifier with low classification risk (e.g., 1%) even if there is only one labeled data. However, the following theorem shows that for adversarially robust generalization under ∞ perturbation, significantly more labeled data is required. Theorem 3. (Theorem 6 in Schmidt et al. (2018) ). Let g n be any learning algorithm, i.e. a function from n samples to a binary classifier f n . Moreover, let σ = c 1 • d 1/4 , let ≥ 0, and let θ ∈ R d be drawn from N (0, I d ). We also draw n samples from the (θ, σ)-Gaussian mixture model. Then the expected ∞ -robust classification risk of f n using 0-1 loss is at least 1

2 (1 -1/d) if the number of labeled data n ≤ c 2 2 √ d log d .

As we can see from above theorem, the sample complexity for robust generalization is larger than that of standard generalization by √ d. This shows that for high-dimensional problems, adversarial robustness can provably require a significantly larger number of samples. We provide a new result which shows that the learned model can be robust if there is only one labeled data and sufficiently many unlabeled data. Our theorem is stated as follow: Theorem 4. Let (x L , y L ) be a labeled point drawn from (θ * , σ)-Gaussian mixture model

P XY with θ * 2 = √ d and σ = O(d 1/4 ). Let x U 1 , • • • , x U n be n unlabeled points drawn from P X . Let v ∈ R d such that v ∈ arg max v =1 n i=1 (v x U i ) 2 . Let ŵ = sign(y L • v x L )v.

Then there exists a constant D such that for any d ≥ D, with high probability, the expected ∞ -robust classification risk of f ŵ using 0-1 loss is at most 1% when the number of unlabeled points n = Ω(d) and ≤ 1 2 . From Theorem 4, we can see that when the number of unlabeled points is significant, we can learn a highly accurate and robust model using only one labeled point.

Proof sketch:

The learning process can be intuitively described as the following three steps: in the first step, we use unlabeled data to estimate the direction of θ * although we do not know the label that θ * (or -θ * ) corresponds to. Specifically, we choose the direction v which maximizes the quantity n i=1 (v x U i ) 2 which can be viewed as a measure of the confidence at data points. In the second step, we use the given labeled point to determine the sign of θ * with high probability, we note that when the direction is correctly estimated in the first step, then the only one labeled point is sufficient to give the correct sign with high probability. Finally, we give a good estimation of θ * by combining the two steps above and learn a robust classifier. The three key lemmas corresponding to the three steps are listed below (c i are constants for i = 0, 1, 2, 3).

Lemma 1. Under the same setting as Theorem 4, suppose that n > d and σ σ 2 +d nd < 1 128 . Then, with probability at least 1 -c 1 e -c2n min{

√ dc 3 σ ,( √ dc 3 σ ) 2 } , there is a unique unit maximal eigenvector v of the sample covariance matrix Σ = 1 n n i=1 x U i x U i such that v - θ * √ d 2 ≤ c 0 σ σ 2 + d nd + c 3 (4)

Lemma 2. Under the same setting as Theorem 4, suppose v is a unit vector such that v -

θ * √ d 2 ≤ τ for some constant τ < √ 2.

Then with probability at least 1 -exp(-

d(1-τ 2 2 ) 2 2σ 2 ), we have sign(y L • v x L )v θ * > 0

(5) Lemma 3. (Lemma 20 in Schmidt et al. (2018) ). Under the same setting as Theorem 4, for any p ≥ 1 and ≥ 0, and for any unit vector ŵ such that ŵ, θ ≥ ŵ * p , where • * p is the dual norm of

• p , the linear classifier f ŵ has p -robust classification risk at most exp -

( ŵ,θ * -ŵ * p ) 2 2σ 2

.

Our theoretical findings suggest that we can improve the adversarially robust generalization using unlabeled data. In the next section, we will present a practical algorithm for real applications, which further verifies our main results. Fix f and attack x with PGD-(k, , δ) on loss L 1 /L 2 to obtain x .

7::

Perform gradient descent on f over the perturbed samples on loss L SSL .

8::

end for 9: end for

4. ALGORITHM AND EXPERIMENTS:

4.1 PRACTICAL ALGORITHM Let S L = {(x L 1 , y L 1 ), • • • , (x L n , y L n )} be a set of labeled data and S U = {x U 1 , • • • , x U m

} be a set of unlabeled data. Motivated by the theory in the previous section, to achieve better adversarially robust generalization, we can optimize the classifier to be accurate on S L and robust on S L ∪ S U . This is also equivalent to making the classifier accurate and robust on S L and robust on S U . Therefore, we design two loss terms on S L and S U separately.

For the labeled dataset S L , we use the standard ∞ -robust adversarial training objective function, i.e.,

EQUATION

Following the most common setting, during training, the classifier outputs a probability distribution over categories and is evaluated by cross-entropy loss defined as

EQUATION

where f k (x) is the output probability for category k.

For unlabeled data S U , we use an objective function which measures robustness without ground truth

EQUATION

Putting the two objective functions together, our training loss is defined as a combination of L 1 and L 2 as follows:

EQUATION

Here λ > 0 is a coefficient to trade off the two loss terms. In real practice, we use iterative optimization methods to learn the function f . In the inner loop, we fix the model and use Projected Gradient Descent (PGD) to learn the attack x for any x. In the outer loop, we use stochastic gradient descent to optimize f on the perturbed x s. The general training process is shown in Algorithm 1.

Remark We notice that Algorithm 1 is a generalized version of Virtual Adversarial Training (VAT) (Miyato et al., 2018) . When setting the PGD step k = 1, the algorithm is almost equivalent to the original VAT algorithm, which is particular useful for improving standard generalization. However, according to our experimental results below, setting k = 1 does not help improve adversarial robust generalization. The improvement of adversarial robust generalization using unlabeled data exists when setting a relatively larger k.

4.2. EXPERIMENTAL SETTING:

We verify Algorithm 1 on MNIST and Cifar-10. Following Madry et al. (2017) , we use the Resnet model and modify the network incorporating wider layers by a factor of 10. This results in a network with five residual units with (16, 160, 320, 640) filters each. During training, we apply data augmentation including random crops and flips, as well as per image standardization. The initial learning rate is 0.1, and decay by a factor of 10 twice during training. In the inner loop, we run a 7-step PGD with step size 2 255 for each mini-batch. The perturbation is constrained to be 8 255 under l ∞ norm. Following many previous works (Laine & Aila, 2016; Tarvainen & Valpola, 2017; Miyato et al., 2018; Athiwaratkun et al., 2019) , we sample 5k/10k labeled data from the training set and use them as labeled data. We mask out the labels of the remaining images in the training set and use them as unlabeled data. By doing this, we conduct two semi-supervised learning tasks and call them the 5k/10k experiments. In a mini-batch, we sample 25/50 labeled images and 225/200 unlabeled images for the 5k/10k experiment respectively. In both experiments, we use several different values of λ as an ablation study for this hyperparameter by setting λ = 0.1, 0.2, 0.3. Learning rate is decayed at the 60 th and the 120 th epoch. We use the original PGD-based adversarial training (Madry et al., 2017) on the sampled 5k/10k labeled data as the baseline algorithm for comparison (referred to as PGD-adv). Our algorithm is referred to as Ours.

4.3. EXPERIMENTAL RESULTS:

We list all results of the 5k/10k experiments in Tables 1 and 2 . We use five criteria to evaluate the performance of the model: the natural training/test accuracy (NA train and NA test ), the robust training/test accuracy using PGD-7 attack (RA train and RA test ) and the defense success rate (DSR).

First, we can see that in both experiments, the robust test accuracy is improved when we use unlabeled data. For example, on Cifar-10 the robust test accuracy of the models trained under SSL with λ = 0.3 for the 5k/10k experiments increase by 3.0/5.0 percents compared to the PGD-adv baselines. We also check the defense success rate which evaluates whether the model is robust given the prediction is correct. As we can see from the last column in Tables 1 and 2 , the defense success rate of models trained using our proposed method is much higher than the baselines. In particular, the defense success rate of the model trained with λ = 0.3 in the 10k experiment is competitive to the model trained using PGD-adv on the whole dataset. This clearly shows the advantage of our proposed algorithm.

Second, we can also see the influence of the value of λ. The model trained with a larger λ has higher robust accuracy. For example, in the 10k experiment, the robust test accuracy of the model trained with λ = 0.3 is more than 3% better than that with λ = 0.1. However, we observe that training will become hard to converge if λ > 0.5.

Third, using larger k produces more robust models. As we can see from the table, in the 5k/10k experiment, relatively higher natural training/test accuracy can be achieved by setting k = 1 (vanilla VAT algorithm). However, the robust training/testing accuracy are significantly worse and are near zero. This clearly shows that using a stronger attack on both labeled and unlabeled data leads to better adversarially robust generalization, which is also consistent with our theory.

5. CONCLUSION:

In this paper, we theoretically and empirically show that with just more unlabeled data, we can learn models with better adversarially robust generalization. We first give an expected robust risk decomposition theorem and then show that for a specific learning problem on the Gaussian mixture model, the adversarially robust generalization can be almost as easy as standard generalization.

Based on these theoretical results, we develop an algorithm which leverages unlabeled data during training and empirically show its advantage. As future work, we will study the sample complexity of unlabeled data for broader function classes and solve more challenging real tasks.

A BACKGROUND ON GENERALIZATION AND RADEMACHER COMPLEXITY:

The Rademacher complexity is a commonly used capacity measure for a hypothesis space. Definition 4. Given a set S = {x 1 , ..., x n } of n samples, the empirical Rademacher complexity of function class F (mapping from R d to R) is defined as:

EQUATION

where = ( 1 , • • • , n ) contains i.i.d. random variables drawn from the Rademacher distribution unif({1, -1}).

By using the Rademacher complexity, we can directly provide an upper bound on the generalization Theorem 5. (Theorem 3.5 in Mohri et al. (2012) ). Suppose

l(•, •) is the 0-1 loss, let S = (x i , y i ) n i=1

be the set of n i.i.d. samples drawn from the underlining distribution P XY . Let F be the hypothesis space, then with probability at least 1 -δ over S, for any f ∈ F:

EQUATION

B PROOF OF THEOREM 1

Proof. For indicator function I, we have for any x,

I(f (x ) = y) ≤ I(f (x) = y) + I(f (x) = f (x )). (12) According to Definition 2, we have R B-robust (f ) = E (x,y)∼P XY sup x ∈B(x) l(f (x ), y) = E (x,y)∼P XY sup x ∈B(x) I(f (x ) = y) ≤ E (x,y)∼P XY sup x ∈B(x) (I(f (x) = y) + I(f (x) = f (x ))) (13) = E x∼P X sup x ∈B(x) (I(f (x ) = f (x)) + E (x,y)∼P XY l(f (x), y) = E x∼P X sup x ∈B(x) (I(f (x ) = f (x)) + R(f ),

where ( 13) is derived from (12). We further use Theorem 5 to bound R(f ). It is easy to verify that with probability at least 1 -δ, for any f ∈ F:

R B-robust (f ) ≤ E x∼P X sup x ∈B(x) (I(f (x ) = f (x)) + R(f ) ≤ E x∼P X sup x ∈B(x) (I(f (x ) = f (x)) + R(f ) + Rad S (F) + 3 log 2 δ 2n

which completes the proof.

C PROOF OF THEOREM 4:

For convenience, in this section, we use c i or c i to denote some universal constants, where i = 0, 1, 2, 3, 4.

In the proof of Theorem 4, we will use the concentration bound for covariance estimation in Wainwright (2019) . We first introduce the definition of spiked covariance ensemble. Definition 5. (Spiked covariance ensemble). A sample x i ∈ R d from the spiked covariance ensemble takes the form

EQUATION

where ξ i ∈ R is a zero-mean random variable with unit variance, ν ∈ R is a fixed scalar, θ 0 ∈ R d is a fixed unit vector and w i ∈ R d is a random vector independent of ξ i , with zero mean and covariance matrix I d .

To see why spiked covariance ensemble model is useful, we note that the Gaussian mixture model is its special case. Specifically, let x U i 's be the unlabeled data in Theorem 4. Then x U i follows the Gaussian mixture distribution 1 2 N (θ * , σ 2 I d ) + 1 2 N (-θ * , σ 2 I d ), and

x U i σ is a spiked covariance ensemble with parameter ν = d σ 2 , ξ i uniformly distributed on {±1}, w i ∼ N (0, I d ) and θ 0 = θ * √ d . The following theorem from Wainwright (2019) characterizes the concentration property of spiked covariance ensemble, which we will further use to bound the robust classification error. Intuitively, the theorem says that we can approximately recover θ 0 in the spiked covariance ensemble model using the top eigenvector θ of the sample covariance matrix Σ. Theorem 6. (Concentration of covariance estimation, see Corollary 8.7 in Wainwright ( 2019)). Given i.i.d. samples {x i } n i=1 from the spiked covariance ensemble with sub-Gaussian tails (which means both ξ i and w i are sub-Gaussian with parameter at most one), suppose that n > d and Lemma 4. Under the same setting as Theorem 4, suppose that n > d and σ σ 2 +d nd < 1 128 . Then, with probability at least 1 -c 1 e -c2n min{

EQUATION

Proof. As discussed above,

x U i σ is a spiked covariance ensemble. By Theorem 6 we have with probability at least 1 -c 1 e -c2n min{

EQUATION

σ ) 2 } , there is a unique maximal eigenvector ṽ of the sample covariance matrix Σ

EQUATION

) Let τ = c 0 σ σ 2 +d nd + c 3 , we have ṽ -θ * √ d 2

≤ τ . Below we need to consider two cases, τ ≤ 1 and τ > 1.

Case

1: τ ≤ 1. Let v = ṽ ṽ , since both v and θ * √ d are unit vectors, we have v - θ * √ d 2 = v 2 + θ * √ d 2 -2 v, θ * √ d = 2 -2 v, θ * √ d (18) Recall that ṽ -θ * √ d 2

≤ τ , which is equivalent to

τ 2 ≥ ṽ 2 + θ * √ d 2 -2 ṽ, θ * √ d = ṽ 2 + 1 -2 ṽ v, θ * √ d

Rearranging the terms and using AM-GM inequality gives

EQUATION

Under review as a conference paper at ICLR 2020 Therefore, by equation 18,

v - θ * √ d = 2 -2 v, θ * √ d ≤ 2 -2 1 -τ 2 = 2τ 2 1 + √ 1 -τ 2 ≤ √ 2τ = √ 2(c 0 σ σ 2 + d nd + c 3 ).

By substituting c 0 = √ 2c 0 , c 2 = 1 2 c 2 and c 3 = √ 2c 3 , we complete the proof.

Case 2: τ > 1. Let v be one of ± ṽ ṽ such that the the inner product v, θ * is nonnegative. Since both v and θ * √ d are unit vectors, we have

v - θ * √ d 2 = v 2 + θ * √ d 2 -2 v, θ * √ d = 2 - 2 √ d v, θ * ≤ 2 (20) Therefore, v -θ * √ d ≤ √ 2 = τ 0 .

Now we have proved that by using the top eigenvector of Σ, we can recover the θ * up to a sign difference. Next, we will show that it is possible to determine the sign using the labeled data. Lemma 5. Under the same setting as Theorem 4, suppose v ∈ R d is a unit vector such that

v -θ * √ d 2 ≤ τ 0 where τ 0 ≤ √ 2.

Then with probability at least 1 -exp - 

EQUATION

EQUATION

Recall that x L is sampled from the Gaussian distribution N (y L • θ * , σ 2 I d ), where y L is sampled uniformly at random from {±1}, we have (y L x L ) follows the Gaussian distribution N (θ * , σ 2 I d ).

Hence,

EQUATION

So, using the Gaussian tail bound P X∼N (0,1) [X ≤ -t] ≤ exp(-t 2 ) for all t ∈ R, and combining with equation 21, equation 22, equation 23, we have

EQUATION

)

as stated in the lemma.

Armed with Lemma 4 and Lemma 5, we now have a precise estimation of θ * in the Gaussian mixture model. Then, we will show that the high precision of the estimation can be translated to low robust risk. To achieve this, we need a lemma from Schmidt et al. (2018) Applying Lemma 5 to v yields sign(y

EQUATION

with probability at least 1 -exp(-

d(1- τ 2 0 2 ) 2 2σ 2

).

Notice that ŵ = sign(y L • v x L )v. So by union bound on events equation 26 and equation 27, we have

EQUATION

with probability at least 1 -c 1 e -c2n min{ Since c 4 , c are numerical constants, there exists a constant D such that when d ≥ D, ∞ -robust classification risk is less then β = 0.01 for ≤ 1 2 , thus we have completed the proof.

:



Figures and Tables:

Schmidt et al. (2018) proved the following sample complexity bound for standard generalization. Theorem 2. (Theorem 4 in Schmidt et al. (2018)). Let (x, y) be drawn from the (θ , σ)-Gaussian mixture model with θ 2 = √ d and σ ≤ c • d 1/4

Generalized Virtual Adversarial Training over labeled and unlabeled data 1: Input: Datasets S L and S U . Hypothesis space F. Coefficient λ. PGD step size δ. Number of PGD steps k. Maximum l ∞ norm of perturbation . 2: for each iteration do 3: Sample a mini-batch of labeled data ŜL from S L . 4: Sample a mini-batch of unlabeled data ŜU from S U . 5:for each x ∈ ŜL ∪ ŜU do 6:

, with probability at least 1 -c 1 e -c2n min{ √ νc3,νc 2 3 } , there is a unique maximal eigenvector θ of the sample covariance matrix Σ = 1 above, we can show that for the Gaussian mixture model, one of the top unit eigenvector of the sample covariance matrix is approximately θ * √ d . In other words, we can approximately recover the parameter θ * up to a sign difference: the principal component analysis of Σ gives either v or -v, while θ * √ d is close to v.

, and both v and θ * √ d are unit vectors, we have v θ * > 0. So the event {sign(y

) 2 } . Let ŵ = sign(y L • v x L )v.Then with probability at least 1 -c 1 e -c2n min{ linear classifier f ŵ has ∞ -robust classification risk at most β when By the choice of v we have equation 23 holds, i.e.

we have the ∞ -robust error is upper bounded by R B-robust (f ŵ) ≤ exp -( ŵ, θ * -ŵ * ∞ ) this with equation 28, equation 29 and the assumption equation 25, we have ŵ, θ * -ŵ * ∞ stated in the theorem. Now we are ready to prove Theorem 4. Proof of Theorem 4: Let c be a constant such that σ ≤ c • d 1/4 for sufficiently large d. Notice that the ŵ in Theorem 4 is same as the ŵ in Theorem 7 since the maximal eigenvector of x U i ) 2 over the unit sphere v = 1, v ∈ R d . Theorem 7 guarantees that with probability at least 1 -c 1 e -c2n min{ Choose c 3 to be 1 2 . Since n = Ω(d), 1 2 ≤ τ 0 = c 0 σ σ 2 +d nd + c 3 ≤ c4 d 1by Theorem 7, with probability at least 1-c 1 exp -c 2 d 7/4 -exp -c √ d , ∞ -robust classification risk is less then β = 0.01 for

SSL experiment with 5k/10k labeled points on MNIST (%) NA train NA test RA train RA test DSR

Table content: <table><tr><td/><td>PGD-adv on 5k</td><td>98.31</td><td>98.38</td><td>96.95</td><td>96.89</td><td>98.49</td></tr><tr><td>5k</td><td>Ours (k = 7, λ = 0.1) Ours (k = 7, λ = 0.2)</td><td>98.36 98.43</td><td>98.54 98.55</td><td>97.82 98.18</td><td>97.19 97.28</td><td>98.63 98.71</td></tr><tr><td/><td>Ours (k = 7, λ = 0.3)</td><td>98.56</td><td>98.56</td><td>98.46</td><td>97.31</td><td>98.73</td></tr><tr><td/><td>PGD-adv on 10k</td><td>98.91</td><td>98.83</td><td>97.96</td><td>97.64</td><td>98.80</td></tr><tr><td>10k</td><td>Ours (k = 7, λ = 0.1) Ours (k = 7, λ = 0.2)</td><td>98.92 98.90</td><td>98.92 98.89</td><td>98.55 98.76</td><td>97.91 97.93</td><td>98.98 99.03</td></tr><tr><td/><td>Ours (k = 7, λ = 0.3)</td><td>98.93</td><td>98.87</td><td>98.77</td><td>98.01</td><td>99.13</td></tr><tr><td/><td>PGD-adv on 50k</td><td>99.89</td><td>99.44</td><td>99.77</td><td>98.84</td><td>99.40</td></tr></table>

SSL experiment with 5k/10k labeled points on Cifar-10 (%) NA train NA test RA train RA test DSR

Table content: <table><tr><td/><td>PGD-adv on 5k</td><td>61.18</td><td>60.57</td><td>32.40</td><td>30.54</td><td>50.42</td></tr><tr><td/><td>Ours (k = 7, λ = 0.1)</td><td>63.24</td><td>60.44</td><td>32.97</td><td>30.90</td><td>51.13</td></tr><tr><td>5k</td><td>Ours (k = 7, λ = 0.2)</td><td>61.73</td><td>60.71</td><td>35.20</td><td>32.96</td><td>54.29</td></tr><tr><td/><td>Ours (k = 7, λ = 0.3)</td><td>61.88</td><td>60.46</td><td>35.07</td><td>33.54</td><td>55.47</td></tr><tr><td/><td>Ours (k = 1, λ = 0.3)</td><td>68.15</td><td>67.14</td><td>0.13</td><td>0.12</td><td>0.00</td></tr><tr><td/><td>PGD-adv on 10k</td><td>78.80</td><td>73.79</td><td>45.60</td><td>37.48</td><td>50.79</td></tr><tr><td/><td>Ours (k = 7, λ = 0.1)</td><td>78.24</td><td>72.92</td><td>47.96</td><td>38.86</td><td>53.29</td></tr><tr><td>10k</td><td>Ours (k = 7, λ = 0.2)</td><td>78.74</td><td>73.16</td><td>51.20</td><td>41.18</td><td>56.29</td></tr><tr><td/><td>Ours (k = 7, λ = 0.3)</td><td>78.95</td><td>73.35</td><td>52.24</td><td>42.48</td><td>57.91</td></tr><tr><td/><td>Ours (k = 1, λ = 0.3)</td><td>81.43</td><td>78.64</td><td>2.22</td><td>2.27</td><td>0.03</td></tr><tr><td/><td>PGD-adv on 50k</td><td>99.91</td><td>85.40</td><td>96.71</td><td>49.99</td><td>58.54</td></tr></table>

, which upper bounds the robust classification risk of a linear classifier ŵ in terms of its inner product with θ * . Lemma 6. (Lemma 20 inSchmidt et al. (2018)). Under the same setting as in Theorem 4, for any p ≥ 1 and ≥ 0, and for any unit vector ŵ ∈ R d such that ŵ, θ ≥ ŵ *Lemma 6 guarantees that if we can estimate θ precisely, we can achieve small robust classification risk. Combine with Lemma 4 and Lemma 5 which provide such estimation, we are now ready to prove the robust classification risk bound stated in Theorem 4. We can actually prove a slightly more general theorem below with some extra parameters, and obtain Theorem 4 as a corollary. Theorem 7. Let (x L , y L ) be a labeled data drawn from (θ * , σ)-Gaussian mixture modelP XY with θ * 2 = √ d. Let x U 1 , • • • , xU n be n unlabeled data drawn from P X . Let τ 0 be as stated in Lemma 4, and v ∈ R d be the normalized eigenvector (i.e.v 2 = 1) with respect to the maximal eigenvalue of

Table content: <table><tr><td/><td/><td>p , where</td></tr><tr><td colspan="3">•  *  p is the dual norm of • p , the linear classifier f ŵ has p -robust classification risk at most</td></tr><tr><td>exp -</td><td>( ŵ,θ  *  -ŵ  *  p ) 2 2σ 2</td><td>.</td></tr></table>

Peer review (iclr2020):
This paper considers the problem of adversarial robustness. The paper shows that (Theorem 1) robust generalization error can be bounded in terms of the standard generalization error and a stability term, that does not depend on the labels. The paper also shows that for a simple classification problem involving learning the separator for a symmetric 2 gaussian mixture data, we can solve this problem robustly without additional labeled examples. The paper suggests that we can use unlabeled data to improve the robust generalization. Towards this the paper regularizer on the unlabeled data, that promotes stability in the model prediction. The paper evaluates this on Mnist and Cifar showing the better performance of the proposed regularization over PGD adversarial training. The Theorem 1 in this paper is a triangle inequality on the loss ,and the observation about splitting the robust generalization into standard generalization error and stability, is not particularly new. The earlier work Zhang et al., 2019b show a similar result in their paper. They even propose and experiment with a similar regularizer (see eqs 3 and 5 in Zhang et al., 2019b). The exact implementation while can be different between these two, the paper does not currently compare with this and there is no evidence to prefer this regularizer over the existing one. The Gaussian setting considered in this paper is quite simple and the techniques developed there are particular to the symmetric 2 Gaussian mixture problem. Given the other parallel works studying the same setting, it is good to also include a comparison of the exact results (such as sample complexity) for this setup. Overall I find the contributions of this paper to be not sufficient and cannot recommend acceptance at this stage. Minor: The last line above theorem 4 and second line after eq 9 are written poorly. Zhang et al., 2019b https://arxiv.org/abs/1901.08573