




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Unlabeled Data Improves Adversarial Robustness Yair Carmon Stanford University Aditi Raghunathan* Stanford University Ludwig Schmidt UC Berkeley Percy Liang Stanford University John C. Duchi Stanford University jduchistanf
2、 Abstract We demonstrate, theoretically and empirically, that adversarial robustness can signifi cantly benefi t from semisupervised learning. Theoretically, we revisit the simple Gaussian model of Schmidt et al.41that shows a sample complexity gap between standard and robust classifi cation.
3、 We prove that unlabeled data bridges this gap: a simple semisupervised learning procedure (self-training) achieves high robust accuracy using the same number of labels required for achieving high stan- dard accuracy. Empirically, we augment CIFAR-10 with 500K unlabeled images sourced from 80 Millio
4、n Tiny Images and use robust self-training to outperform state-of-the-art robust accuracies by over 5 points in (i)1robustness against sev- eral strong attacks via adversarial training and (ii) certifi ed2and1robustness via randomized smoothing. On SVHN, adding the datasets own extra training set wi
5、th the labels removed provides gains of 4 to 10 points, within 1 point of the gain from using the extra labels. 1Introduction The past few years have seen an intense research interest in making models robust to adversarial examples 44,4,3. Yet despite a wide range of proposed defenses, the state-of-
6、the-art in adversarial robustness is far from satisfactory. Recent work points towards sample complexity as a possible reason for the small gains in robustness: Schmidt et al.41show that in a simple model, learning a classifi er with non-trivial adversarially robust accuracy requires substantially m
7、ore samples than achieving good “standard” accuracy. Furthermore, recent empirical work obtains promising gains in robustness via transfer learning of a robust classifi er from a larger labeled dataset 18. While both theory and experiments suggest that more training data leads to greater robustness,
8、 following this suggestion can be diffi cult due to the cost of gathering additional data and especially obtaining high-quality labels. To alleviate the need for carefully labeled data, in this paper we study adversarial robustness through the lens of semisupervised learning. Our approach is motivat
9、ed by two basic observations. First, adversarial robustness essentially asks that predictors be stable around naturally occurring inputs. Learning to satisfy such a stability constraint should not inherently require labels. Second, the added requirement of robustness fundamentally alters the regime
10、where semi-supervision is useful. Prior work on semisupervised learning mostly focuses on improving the standard accuracy by leveraging Equal contribution. Code and data are available on GitHub at on CodaLab at https:/bit.ly/349WsAC. 33rd Conference on Neural Information Processing Systems (NeurIPS
11、2019), Vancouver, Canada. unlabeled data. However, in our adversarial setting the labeled data alone already produce accurate (but not robust) classifi ers. We can use such classifi ers on the unlabeled data and obtain useful pseudo-labels, which directly suggests the use of self-trainingone of the
12、oldest frameworks for semisupervised learning 42,8, which applies a supervised training method on the pseudo-labeled data. We provide theoretical and experimental evidence that self-training is effective for adversarial robustness. The fi rst part of our paper is theoretical and considers the simple
13、d-dimensional Gaussian model 41 with1-perturbations of magnitude. We scale the model so thatn0labeled examples allow for learning a classifi er with nontrivial standard accuracy, and roughlyn02pd/n0examples are necessary for attaining any nontrivial robust accuracy. This implies a sample complexity
14、gap in the high-dimensional regimed?n0?4. In this regime, we prove that self training withO(n02pd/n0) unlabeled data and justn0 labels achieves high robust accuracy. Our analysis provides a refi ned perspective on the sample complexity barrier in this model: the increased sample requirement is exclu
15、sively on unlabeled data. Our theoretical fi ndings motivate the second, empirical part of our paper, where we test the effect of unlabeled data and self-training on standard adversarial robustness benchmarks. We propose and experiment with robust self-training (RST), a natural extension of self-tra
16、ining that uses standard supervised training to obtain pseudo-labels and then feeds the pseudo-labeled data into a supervised training algorithm that targets adversarial robustness. We use TRADES 56 for heuristic1- robustness, and stability training 57 combined with randomized smoothing 9 for certif
17、i ed2- robustness. For CIFAR-10 22, we obtain 500K unlabeled images by mining the 80 Million Tiny Images dataset 46 with an image classifi er. Using RST on the CIFAR-10 training set augmented with the additional unlabeled data, we outperform state-of-the-art heuristic 1-robustness against strong ite
18、rative attacks by7% . In terms of certifi ed2-robustness, RST outperforms our fully supervised baseline by5%and beats previous state-of-the-art numbers by10%. Finally, we also match the state-of-the-art certifi ed1-robustness, while improving on the corresponding standard accuracy by over16%. We sho
19、w that some natural alternatives such as virtual adversarial training 30 and aggressive data augmentation do not perform as well as RST. We also study the sensitivity of RST to varying data volume and relevance. Experiments with SVHN show similar gains in robustness with RST on semisupervised data.
20、Here, we apply RST by removing the labels from the 531K extra training data and see410%increases in robust accuracies compared to the baseline that only uses the labeled 73K training set. Swapping the pseudo-labels for the true SVHN extra labels increases these accuracies by at most 1%. This confi r
21、ms that the majority of the benefi t from extra data comes from the inputs and not the labels. In independent and concurrent work, Uesato et al.48 , Najafi et al.32and Zhai et al.55also explore semisupervised learning for adversarial robustness. See Section 6 for a comparison. Before proceeding to t
22、he details of our theoretical results in Section 3, we briefl y introduce relevant background in Section 2. Sections 4 and 5 then describe our adversarial self-training approach and provide comprehensive experiments on CIFAR-10 and SVHN. We survey related work in Section 6 and conclude in Section 7.
23、 2Setup Semi-supervised classifi cation task.We consider the task of mapping inputx2X Rdto label y2Y. LetPx,ydenote the underlying distribution of(x,y)pairs, and letPxdenote its marginal on X. Given training data consisting of (i) labeled examples(X,Y )=(x1,y1),.(xn,yn)Px,yand (ii) unlabeled example
24、s X= x1, x2,. x nPx , the goal is to learn a classifi erf:X !Yin a model family parameterized by 2. Error metrics. The standard quality metric for classifi er fis its error probability, errstandard(f):=P(x,y)Px,y?f(x)6=y?.(1) We also evaluate classifi ers on their performance on adversarially pertur
25、bed inputs. In this work, we consider perturbations in apnorm ball of radius around the input, and defi ne the corresponding 2 robust error probability, errp, robust(f):=P(x,y)Px,y ?9x0 2Bp (x),f(x 0)6=y? for Bp (x):=x 02X |kx0?xk p. (2) In this paper we studyp=2andp=1 . We say that a classifi erf h
26、as certifi edpaccuracywhen we can prove that errp, robust(f)1?. Self-training.Consider a supervised learning algorithmAthat maps a dataset(X,Y )to parameter . Self-training is the straightforward extension ofAto a semisupervised setting, and consists of the following two steps. First, obtain an inte
27、rmediate modelintermediate=A(X,Y ), and use it to generate pseudo-labels yi=f intermediate( xi)fori2 n. Second, combine the data and pseudo-labels to obtain a fi nal model fi nal=A(X, X,Y,Y ). 3Theoretical results In this section, we consider a simple high-dimensional model studied in 41, which is t
28、he only known formal example of an information-theoretic sample complexity gap between standard and robust classifi cation. For this model, we demonstrate the value of unlabeled dataa simple self-training procedure achieves high robust accuracy, when achieving non-trivial robust accuracy using the l
29、abeled data alone is impossible. Gaussian model. We consider a binary classifi cation task whereX =Rd,Y=?1,1,yuniform onYandx|y N(y,?2I)for a vector 2 Rdand coordinate noise variance?2 0. We are interested in the standard error (1) and robust error err1, robust(2) for 1perturbations of size . Parame
30、ter setting.We choose the model parameters to meet the following desiderata: (i) there exists a classifi er that achieves very high robust and standard accuracies, (ii) usingn0examples we can learn a classifi er with non-trivial standard accuracy and (iii) we require much more than n0 examples to le
31、arn a classifi er with nontrivial robust accuracy. As shown in 41, the following parameter setting meets the desiderata, 2(0,1 2), kk 2=d and kk2 ?2 = r d n0 ? 1 2 .(3) When interpreting this setting it is useful to think of as fi xed and ofd/n0as a large number, i.e. a highly overparameterized regi
32、me. 3.1Supervised learning in the Gaussian model We briefl y recapitulate the sample complexity gap described in 41 for the fully supervised setting. Learning a simple linear classifi er. We consider linear classifi ers of the formf= sign(x). Given n labeled data (x1,y1),.,(xn,yn) iid Px,y , we form
33、 the following simple classifi er n := 1 n n X i=1 yixi.(4) We achieve nontrivial standard accuracy usingn0examples; see Appendix A.2 for proof of the following (as well as detailed rates of convergence). Proposition 1. There exists a universal constant r such that for all 2pd/n0?r, n?n0) E nerrstan
34、dard f n 1 3 and n?n042 r d n0 ) E nerr 1, robust f n 10?3. Moreover, as the following theorem states, no learning algorithm can produce a classifi er with nontrivial robust error without observinge(n02pd/n0)examples. Thus, a sample complexity gap forms as d grows. Theorem 1(41).LetAnbe any learning
35、 rule mapping a datasetS2(X Y)n to classifi erAnS. Then, nn0 2pd/n0 8logd ) Eerr1, robust(AnS)? 1 2(1?d ?1), (5) where the expectation is with respect to the random draw ofSPn x,yas well as possible randomization in An. 3 3.2Semi-supervised learning in the Gaussian model We now consider the semisupe
36、rvised setting withnlabeled examples and nadditional unlabeled examples. We apply the self-training methodology described in Section 2 on the simple learning rule(4) ; our intermediate classifi er isintermediate := n= 1 n Pn i=1yixi, and we generate pseudo-labels yi:=f intermediate( xi)=sign( x i in
37、termediate)fori=1,., n . We then learning rule (4) to obtain our fi nal semisupervised classifi er fi nal := 1 n P n i=1 yi xi. The following theorem guarantees that fi nalachieves high robust accuracy. Theorem 2.There exists a universal constant rsuch that for2pd/n0? r,n?n0labeled data and addition
38、al n unlabeled data, n?n02882 r d n0 ) E fi nalerr 1, robust f fi nal 10?3. Therefore, compared to the fully supervised case, the self-training classifi er requires only a constant factor more input examples, and roughly a factor2pd/n0fewer labels. We prove Theorem 2 in Appendix A.4, where we also p
39、recisely characterize the rates of convergence of the robust error; the outline of our argument is as follows. We have fi nal= ( 1 n P n i=1 yiyi)+ 1 n P n i=1 yii where i N(0,?2I)is the noise in examplei. We show (in Appendix A.4) that with high probability 1 n P n i=1 yiyi ? 1 6 while the variance
40、 of 1 n P n i=1 yii goes to zero as ngrows, and therefore the angle between fi nalandgoes to zero. Substituting into a closed-form expression forerr 1, robust(f fi nal) (Eq.(11)in Appendix A.1) gives the desired upper bound. We remark that other learning techniques, such as EM and PCA, can also leve
41、rage unlabeled data in this model. The self-training procedure we describe is similar to 2 steps of EM 11. 3.3Semisupervised learning with irrelevant unlabeled data In Appendix A.5 we study a setting where only nof the unlabeled data are relevant to the task, where we model the relevant data as befo
42、re, and the irrelevant data as having no signal component, i.e., withyuniform on?1,1andxN(0,?2I)independent ofy . We show that for any fi xed , high robust accuracy is still possible, but the required number of relevant examples grows by a factor of1/compared to the amount of unlabeled examples requ
43、ire to achieve the same robust accuracy when all the data is relevant. This demonstrates that irrelevant data can signifi cantly hinder self-training, but does not stop it completely. 4Semi-supervised learning of robust neural networks Existing adversarially robust training methods are designed for
44、the supervised setting. In this section, we use these methods to leverage additional unlabeled data by adapting the self-training framework described in Section 2. Meta-Algorithm 1 Robust self-training Input: Labeled data (x1,y1,.,xn,yn) and unlabeled data ( x1,., x n) Parameters: Standard loss Lsta
45、ndard, robust loss Lrobustand unlabeled weight w 1:Learnintermediateby minimizing n P i=1L standard(,xi,yi) 2:Generate pseudo-labels yi=f intermediate( xi) for i=1,2,. n 3:Learn fi nalby minimizing n P i=1L robust(,xi,yi)+w n P i=1L robust(, xi, yi) Meta-Algorithm 1 summarizes robust-self training.
46、In contrast to standard self-training, we use a different supervised learning method in each stage, since the intermediate and the fi nal classifi ers have different goals. In particular, the only goal ofintermediateis to generate high quality pseudo-labels for the (non-adversarial) unlabeled data.
47、Therefore, we perform standard training in the fi rst stage, and robust training in the second. The hyperparameterwallows us to upweight the labeled data, which in some cases may be more relevant to the task (e.g., when the unlabeled data comes form a different distribution), and will usually have m
48、ore accurate labels. 4 4.1Instantiating robust self-training Both stages of robust self-training perform supervised learning, allowing us to borrow ideas from the literature on supervised standard and robust training. We consider neural networks of the form f(x)=argmaxy2Yp(y|x), where p(|x) is a pro
49、bability distribution over the class labels. Standard loss.As in common, we use the multi-class logarithmic loss for standard supervised learning, Lstandard(,x,y)=?logp(y|x). Robust loss.For the supervised robust loss, we use a robustness-promoting regularization term proposed in 56 and closely rela
50、ted to earlier proposals in 57, 30, 20. The robust loss is Lrobust(,x,y)=Lstandard(,x,y)+?Lreg(,x),(6) where Lreg(,x):=max x02Bp(x)DKL(p(|x)kp(|x 0). The regularization term2Lregforces predictions to remain stable withinBp (x), and the hyperparam- eter?balances the robustness and accuracy objectives
51、. We consider two approximations for the maximization in Lreg. 1. Adversarial training: a heuristic defense via approximate maximization. We focus on1perturbations and use the projected gradient method to approximate the regular- ization term of (6), Ladv reg(,x):=DKL(p(|x)kp(|x 0 PGx), (7) wherex0P
52、Gxis obtained via projected gradient ascent onr(x0) = DKL(p( | x) k p( | x0). Empirically, performing approximate maximization during training is effective in fi nding classifi ers that are robust to a wide range of attacks 29. 2. Stability training: a certifi ed 2defense via randomized smoothing. A
53、lternatively, we consider stability training 57,26, where we replace maximization over small perturbations with much larger additive random noise drawn from N(0,?2I), Lstab reg(,x):=Ex0N(x,?2I)DKL(p(|x)kp(|x 0). (8) Letf be the classifi er obtained by minimizingLstandard+ ?Lstab robust. At test time
54、, we use the following smoothed classifi er. g(x):=argmax y2Y q(y|x), where q(y|x):=Px0N(x,?2I)(f(x0)=y).(9) Improving on previous work 24,26, Cohen et al.9prove that robustness offto large random perturbations (the goal of stability training) implies certifi ed2adversarial robustness of the smoothe
55、d classifi er g. 5Experiments In this section, we empirically evaluate robust self-training (RST) and show that it leads to consistent and substantial improvement in robust accuracy, on both CIFAR-10 22 and SVHN 53 and with both adversarial (RSTadv) and stability training (RSTstab). For CIFAR-10, we
56、 mine unlabeled data from 80 Million Tiny Images and study in depth the strengths and limitations ofRST. For SVHN, we simulate unlabeled data by removing labels and show that withRSTthe harm of removing the labels is small. This indicates that most of the gain comes from additional inputs rather tha
57、n additional labels. Our experiments build on open source code from 56,9; we release our data and code athttps: / and on CodaLab at https:/bit.ly/349WsAC. Evaluating heuristic defenses.We evaluateRSTadvand other heuristic defenses on their perfor- mance against the strongest known 1attacks, namely t
58、he projected gradient method 29, denoted PG and the Carlini-Wagner attack 7 denoted CW. 2 Zhang et al.56write the regularization termDKL(p(|x0)kp(|x), i.e. withp(|x0)rather than p(|x) taking role of the label, but their open source implementation follows (6). 5 ModelPGMadryPGTRADESPGOursCW 7Best attackNo attack RSTadv(50K+500K)64.90.1 TRADES 5655.856.655.465.055.484.9 Adv. pre-training 1857.458.257.7-57.487.1 Madry et al. 2945.8-47.845.887.3 Standard self-training-0.30-
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 电子商务合同管理:如何有效规避法律风险
- 2025-2030年中国纺织印花行业市场现状供需分析及投资评估规划分析研究报告
- 2025-2030年中国矿物调色颜料行业市场现状供需分析及投资评估规划分析研究报告
- 2025-2030年中国点对点筹款软件行业市场现状供需分析及投资评估规划分析研究报告
- 2025-2030年中国小微金融行业市场深度调研及竞争格局与投资研究报告
- 2025-2030年中国壁挂式分配器行业市场现状供需分析及投资评估规划分析研究报告
- 中国新能源开发与沙漠治理的协同创新实践案例分析
- 精神状态评估与护理评估
- 中国氢能医疗设备市场分析与机遇研究报告
- 肛瘘患者的围手术期护理
- DB32∕T 5048-2025 全域土地综合整治项目验收规范
- 电信防诈骗培训课件
- 医疗器械网络销售质量管理规范宣贯培训课件2025年
- SL631水利水电工程单元工程施工质量验收标准第1部分:土石方工程
- 数独题目大全及答案
- 个人简历电子版
- 超外差收音机实习报告2000字
- 红色简约大方万人计划青年人才答辩PPT模板
- 湖北省武汉市各县区乡镇行政村村庄村名居民村民委员会明细及行政区划代码
- 客栈承包合同
- 国家自然科学基金项目合作协议书(参考)-20211019
评论
0/150
提交评论