DropAttack: A Masked Weight Adversarial Training Method to Improve Generalization of Neural Networks

Shiwen Ni, Jiawen Li, Hung-Yu Kao
8/29/2021
cs.LGcs.AIcs.CL

Official code: nishiwen1214/DropAttack (58 stars, Jupyter Notebook, MIT, PyTorch, last commit 2021-10-13).

Abstract

Adversarial training has been proven to be a powerful regularization method to improve the generalization of models. However, current adversarial training methods only attack the original input sample or the embedding vectors, and their attacks lack coverage and diversity.

Show full abstract

To further enhance the breadth and depth of attack, we propose a novel masked weight adversarial training method called DropAttack, which enhances generalization of model by adding intentionally worst-case adversarial perturbations to both the input and hidden layers in different dimensions and minimize the adversarial risks generated by each layer. DropAttack is a general technique and can be adopt to a wide variety of neural networks with different architectures. To validate the effectiveness of the proposed method, we used five public datasets in the fields of natural language processing (NLP) and computer vision (CV) for experimental evaluating. We compare the proposed method with other adversarial training methods and regularization methods, and our method achieves state-of-the-art on all datasets. In addition, Dropattack can achieve the same performance when it use only a half training data compared to other standard training method. Theoretical analysis reveals that DropAttack can perform gradient regularization at random on some of the input and wight parameters of the model. Further visualization experiments show that DropAttack can push the minimum risk of the model to a lower and flatter loss landscapes. Our source code is publicly available on https://github.com/nishiwen1214/DropAttack.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Code of paper: "DropAttack: A Masked Weight Adversarial Training Method to Improve Generalization of Neural Networks"

5811Jupyter NotebookAug 29, 20215 years agoMIT
adversarial-learningdropattackgeneralizationpytorchpytorch-implementation+1 more

Similar Papers

Cite this paper

@article{ni2021dropattack,
  title  = {DropAttack: A Masked Weight Adversarial Training Method to Improve Generalization of Neural Networks},
  author = {Shiwen Ni and Jiawen Li and Hung-Yu Kao},
  year   = {2021},
  eprint = {2108.12805},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2108.12805}
}

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/2108.12805.svg)](https://codeofpaper.com/paper/2108.12805)

Discussion