Adversarial Robustness via Runtime Masking and Cleansing Yi-Hsuan Wu Chia-Hung Yuan Shan-Hung Wu Department of Computer Science, National Tsing Hua University, Taiwan International Conference on Machine Learning, 2020 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 1 / 34
Why many adversarial defenses are broken? Deep neural networks are shown to be vulnerable to adversarial attacks, which motivates robust learning techniques https://www.tensorflow.org/tutorials/generative/images/adversarial_example.png 1 Athalye, A., Carlini, N., and Wagner, D. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. ICML’ 2018 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 3 / 34
Why many adversarial defenses are broken? Deep neural networks are shown to be vulnerable to adversarial attacks, which motivates robust learning techniques https://www.tensorflow.org/tutorials/generative/images/adversarial_example.png A plethora of defenses have been proposed, however, many of these have been shown to fail 1 1 Athalye, A., Carlini, N., and Wagner, D. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. ICML’ 2018 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 3 / 34
Why many adversarial defenses are broken? Recent study 2 shows the sample complexity of robust learning can be significantly larger than standard training 2 Schmidt, L., Santurkar, S., Tsipras, D., Talwar, K., and Madry, A. Adversarially robust generalization requires more data. NeurIPS, 2018 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 4 / 34
Why many adversarial defenses are broken? Recent study 2 shows the sample complexity of robust learning can be significantly larger than standard training A theoretically grounded way to increase the adversarial robustness is to acquire more data 2 Schmidt, L., Santurkar, S., Tsipras, D., Talwar, K., and Madry, A. Adversarially robust generalization requires more data. NeurIPS, 2018 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 4 / 34
Why many adversarial defenses are broken? Recent study 2 shows the sample complexity of robust learning can be significantly larger than standard training A theoretically grounded way to increase the adversarial robustness is to acquire more data This partially explains why the adversarial training, a data augmentation technique, is empirically strong 2 Schmidt, L., Santurkar, S., Tsipras, D., Talwar, K., and Madry, A. Adversarially robust generalization requires more data. NeurIPS, 2018 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 4 / 34
Outline Goal 1 Related Works 2 Runtime Masking and Cleansing (RMC) 3 Experiments 4 Train-Time Attacks Defense-Aware Attacks Implications & Conclusion 5 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 5 / 34
WebNN 3 Use a web-scale image database as a manifold and project a test image onto the manifold Make more robust prediction by taking only the projected image as inputs 3 Dubey, A., Maaten, L. v. d., Yalniz, Z., Li, Y., and Mahajan, D. Defense against adversarial images using web-scale nearest-neighbor search. CVPR, 2019 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 6 / 34
Drawback: 50 Billion Images May be Too Large Web-scale database may not be available in other domains Performance drops when using smaller datasets Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 7 / 34
Outline Goal 1 Related Works 2 Runtime Masking and Cleansing (RMC) 3 Experiments 4 Train-Time Attacks Defense-Aware Attacks Implications & Conclusion 5 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 8 / 34
Goal Most existing defenses try to get more data at training time Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 9 / 34
Goal Most existing defenses try to get more data at training time We propose a runtime defense Adapts network weights θ for a test point ˆ 1 x Makes inferecne ˆ y = f ( ˆ x ; θ ) 2 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 9 / 34
Goal Most existing defenses try to get more data at training time We propose a runtime defense Adapts network weights θ for a test point ˆ 1 x Makes inferecne ˆ y = f ( ˆ x ; θ ) 2 Merits: Uses potentially large test data to improve adversarial robustness Is compatible with existing train-time defenses Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 9 / 34
Challenge: Test Data are Unlabeled How to adapt network weights θ for unlabeled ˆ x ? Online adversarial training is not applicable Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 10 / 34
Challenge: Test Data are Unlabeled How to adapt network weights θ for unlabeled ˆ x ? Online adversarial training is not applicable Extension: KNN-based online adversarial training For each ˆ x , find its KNN N ( ˆ x ; D ) from the training set D 1 Augment N ( ˆ x ; D ) with adversarial examples (cyan points) perturbed 2 from N ( ˆ x ; D ) Fine-tune the networks weights θ based on N ( ˆ x ; D ) 3 Inference ˆ y = f ( ˆ x ; θ ) 4 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 10 / 34
Unfortunately, It Does Not Work! Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 11 / 34
Unfortunately, It Does Not Work! Figure (b) shows a histogram of N ( ˆ x ; D ) w.r.t. di ff erent labels (x-axis) Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 11 / 34
Unfortunately, It Does Not Work! Figure (b) shows a histogram of N ( ˆ x ; D ) w.r.t. di ff erent labels (x-axis) N ( ˆ x ; D ) contains examples of the same label The adversarial point ˆ x can mislead KNN selection Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 11 / 34
Unfortunately, It Does Not Work! Figure (b) shows a histogram of N ( ˆ x ; D ) w.r.t. di ff erent labels (x-axis) N ( ˆ x ; D ) contains examples of the same label The adversarial point ˆ x can mislead KNN selection Therefore, the fine-tuned θ ends up being less robust Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 11 / 34
Runtime Masking and Cleansing (RMC) RMC precomputes adversarial examples Augment D with adversarial examples to get D 0 1 x ; D ) 0 from D 0 Given a test point ˆ x , find its KNN N ( ˆ 2 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 12 / 34
Runtime Masking and Cleansing (RMC) RMC precomputes adversarial examples Augment D with adversarial examples to get D 0 1 x ; D ) 0 from D 0 Given a test point ˆ x , find its KNN N ( ˆ 2 Adapt the networks weights θ based on N ( ˆ x ; D 0 ) 3 Inference ˆ y = f ( ˆ x ; θ ) 4 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 12 / 34
Why Does It Work? x ; D 0 ) is no longer misled by the adversarial ˆ As Figure (c) shows, N ( ˆ x Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 13 / 34
Why Does It Work? x ; D 0 ) is no longer misled by the adversarial ˆ As Figure (c) shows, N ( ˆ x Defense e ff ects: The diverse-labeled N ( ˆ x ; D 0 ) cleanses the θ of the non-robust patterns Also, dynamically masks the network gradients Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 13 / 34
Outline Goal 1 Related Works 2 Runtime Masking and Cleansing (RMC) 3 Experiments 4 Train-Time Attacks Defense-Aware Attacks Implications & Conclusion 5 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 14 / 34
Datasets MNIST CIFAR-10 ImageNet Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 15 / 34
Outline Goal 1 Related Works 2 Runtime Masking and Cleansing (RMC) 3 Experiments 4 Train-Time Attacks Defense-Aware Attacks Implications & Conclusion 5 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 16 / 34
MNIST & CIFAR-10 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 17 / 34
ImageNet Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 18 / 34
ImageNet For all datasets, RMC achieves the state-of-the-art robustness RMC yields significantly higher clean accuracy Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 18 / 34
ImageNet For all datasets, RMC achieves the state-of-the-art robustness RMC yields significantly higher clean accuracy RMC does not enforce a smooth decision boundary Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 18 / 34
ImageNet For all datasets, RMC achieves the state-of-the-art robustness RMC yields significantly higher clean accuracy RMC does not enforce a smooth decision boundary For gray- black-box attacks, please refer to our main paper Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 18 / 34
Outline Goal 1 Related Works 2 Runtime Masking and Cleansing (RMC) 3 Experiments 4 Train-Time Attacks Defense-Aware Attacks Implications & Conclusion 5 Y.H. Wu, C.H. Yuan, S.H. Wu Runtime Masking and Cleansing ICML’20 19 / 34
Recommend
More recommend