Skip to main content
QUICK REVIEW

[Paper Review] DropAttack: A Masked Weight Adversarial Training Method to Improve Generalization of Neural Networks

Shiwen Ni, Jiawen Li|arXiv (Cornell University)|Aug 29, 2021
Adversarial Robustness in Machine LearningComputer Science25 references7 citations
TL;DR

DropAttack is a novel masked weight adversarial training method that improves neural network generalization by applying gradient-based adversarial perturbations to randomly masked subsets of input features and model weights during training. It achieves state-of-the-art performance across five NLP and CV benchmarks, reduces overfitting, and promotes flatter loss landscapes through implicit gradient regularization.

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. 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.

Motivation & Objective

  • To address the limited coverage and diversity in existing adversarial training methods that only attack input or embedding vectors.
  • To improve model generalization by extending adversarial attacks to model weights, not just inputs.
  • To develop a general-purpose regularization technique effective across diverse neural network architectures.
  • To demonstrate that masked adversarial training can yield flatter, lower-loss minima, enhancing generalization.

Proposed method

  • DropAttack applies adversarial perturbations to randomly masked subsets of input features and model weight parameters during each training iteration.
  • It uses a gradient-based attack strategy, computing perturbations via the sign of the gradient of the loss with respect to inputs and weights.
  • The method introduces a masking mechanism that selects a random proportion of elements in input and weight tensors for adversarial perturbation, increasing attack diversity.
  • The optimization objective minimizes the sum of standard loss and adversarial risks from both input and weight perturbations, effectively regularizing gradients.
  • It implicitly applies gradient regularization by penalizing large gradients on masked input and weight components, promoting flatter minima.
  • The approach is compatible with various architectures and can be integrated into standard training pipelines with minimal modification.

Experimental results

Research questions

  • RQ1Can adversarial training that attacks both inputs and model weights improve generalization beyond standard input-only adversarial training?
  • RQ2Does masked adversarial perturbation across input and weight dimensions increase the diversity and coverage of adversarial attacks?
  • RQ3Can DropAttack achieve state-of-the-art performance on diverse NLP and CV benchmarks with reduced data?
  • RQ4How does DropAttack affect the geometry of the loss landscape, particularly in terms of flatness and minimum depth?
  • RQ5What is the theoretical basis for DropAttack’s regularization effect on model gradients?

Key findings

  • DropAttack achieves state-of-the-art performance on all five public datasets tested, including IMDB, AG’s News, MNIST, CIFAR-10, and SNLI.
  • The method achieves comparable performance to standard training using only half the training data, indicating strong sample efficiency.
  • DropAttack reduces overfitting and improves generalization, especially in NLP tasks such as text classification.
  • Visualization results show that DropAttack leads to flatter and lower minima in the loss landscape, supporting improved generalization.
  • Theoretical analysis confirms that DropAttack implicitly applies gradient regularization by penalizing large gradients on masked input and weight components.
  • The method demonstrates robustness and generalization gains without requiring architectural changes or significant hyperparameter tuning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.