Adversarial Weight Perturbation Helps Robust Generalization

Dongxian Wu, Shu-tao Xia, Yisen Wang
4/13/2020
cs.LGcs.CVstat.ML

Official code: fra31/auto-attack (755 stars, MIT, last commit 2024-05-16). 1 more implementation below.

Abstract

The study on improving the robustness of deep neural networks against adversarial examples grows rapidly in recent years. Among them, adversarial training is the most promising one, which flattens the input loss landscape (loss change with respect to input) via training on adversarially perturbed examples. However, how the widely used weight loss landscape (loss change with respect to weight) performs in adversarial training is rarely explored. In this paper, we investigate the weight loss landscape from a new perspective, and identify a clear correlation between the flatness of weight loss landscape and robust generalization gap. Several well-recognized adversarial training improvements, such as early stopping, designing new objective functions, or leveraging unlabeled data, all implicitly flatten the weight loss landscape. Based on these observations, we propose a simple yet effective Adversarial Weight Perturbation (AWP) to explicitly regularize the flatness of weight loss landscape, forming a double-perturbation mechanism in the adversarial training framework that adversarially perturbs both inputs and weights. Extensive experiments demonstrate that AWP indeed brings flatter weight loss landscape and can be easily incorporated into various existing adversarial training methods to further boost their adversarial robustness.

View on arXivView PDF

Code Implementations(2)

fra31/auto-attackOfficial100%
MIT

Code relative to "Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks"

755115PythonFeb 17, 20202 years agoMIT
adversarial-attacksadversarial-defensesadversarial-robustness
csdongxian/AWPOfficial100%
PyTorchMIT

Codes for NeurIPS 2020 paper "Adversarial Weight Perturbation Helps Robust Generalization"

19220PythonOct 13, 20205 years agoMIT
adversarial-attacksadversarial-trainingneurips-2020pytorch

Cite this paper

@article{wu2020adversarial,
  title  = {Adversarial Weight Perturbation Helps Robust Generalization},
  author = {Dongxian Wu and Shu-tao Xia and Yisen Wang},
  year   = {2020},
  eprint = {2004.05884},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2004.05884}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2004.05884.svg)](https://codeofpaper.com/paper/2004.05884)

Discussion