Skip to main content
QUICK REVIEW

[Paper Review] Adversarial Training with Fast Gradient Projection Method against Synonym Substitution based Text Attacks

Xiaosen Wang, Yichen Yang|arXiv (Cornell University)|Aug 9, 2020
Adversarial Robustness in Machine LearningComputer Science4 citations
TL;DR

This paper proposes Fast Gradient Projection Method (FGPM), a highly efficient gradient-based adversarial attack for text that uses synonym substitution to generate adversarial examples up to 20x faster than existing methods, while maintaining strong attack performance. It further introduces ATFL, a novel adversarial training defense enhanced by logit pairing, which significantly improves model robustness, blocks transferability of adversarial examples, and achieves better generalization on clean data than prior defenses.

ABSTRACT

Adversarial training is the most empirically successful approach in improving the robustness of deep neural networks for image classification.For text classification, however, existing synonym substitution based adversarial attacks are effective but not efficient to be incorporated into practical text adversarial training. Gradient-based attacks, which are very efficient for images, are hard to be implemented for synonym substitution based text attacks due to the lexical, grammatical and semantic constraints and the discrete text input space. Thereby, we propose a fast text adversarial attack method called Fast Gradient Projection Method (FGPM) based on synonym substitution, which is about 20 times faster than existing text attack methods and could achieve similar attack performance. We then incorporate FGPM with adversarial training and propose a text defense method called Adversarial Training with FGPM enhanced by Logit pairing (ATFL). Experiments show that ATFL could significantly improve the model robustness and block the transferability of adversarial examples.

Motivation & Objective

  • To address the inefficiency of existing synonym substitution-based adversarial attacks in text, which hinders their integration into practical adversarial training.
  • To develop a gradient-based attack method that efficiently navigates the discrete, constrained space of text while preserving semantic and grammatical consistency.
  • To enable effective adversarial training for text classification by overcoming the computational bottleneck of slow attack generation.
  • To propose a defense method that blocks transferability of adversarial examples and improves generalization on clean data.
  • To investigate whether successful image adversarial training regularizations (e.g., TRADES, MMA) generalize to the text domain.

Proposed method

  • Proposes FGPM, a gradient-based attack that approximates the impact of synonym substitution using the product of gradient magnitude and projected distance in the embedding space.
  • At each step, FGPM selects the synonym substitution that maximizes the confidence change, guided by the gradient direction, enabling fast, one-pass gradient computation per word.
  • Introduces ATFL, a defense method that combines FGPM-generated adversarial examples with logit pairing regularization to improve robustness and generalization.
  • Logit pairing in ATFL encourages consistency between the model’s predictions on original and adversarial examples, enhancing robustness during training.
  • Employs a single back-propagation pass per word to compute gradients, drastically reducing computation time compared to query-based methods.
  • Evaluates the method on standard text benchmarks (AG’s News, IMDB, DBPedia) under both white-box and black-box attack settings.

Experimental results

Research questions

  • RQ1Can a gradient-based method be efficiently adapted to the discrete, constrained space of text to generate synonym substitution-based adversarial examples?
  • RQ2How does the efficiency of FGPM compare to existing synonym substitution attack methods in terms of speed and attack success rate?
  • RQ3Can FGPM be effectively integrated into adversarial training to improve model robustness against both white-box and black-box attacks?
  • RQ4Does ATFL effectively block the transferability of adversarial examples across models and datasets?
  • RQ5Do regularization techniques successful in image adversarial training (e.g., TRADES, MMA) generalize effectively to text classification?

Key findings

  • FGPM achieves attack success rates comparable to state-of-the-art synonym substitution attacks while being approximately 20 times faster than the current fastest method.
  • ATFL significantly improves model robustness against both white-box and black-box attacks on AG’s News, IMDB, and DBPedia datasets.
  • ATFL effectively blocks the transferability of adversarial examples, outperforming most defense baselines and matching the best performance of SEM on Bi-LSTM.
  • ATFL achieves better generalization on clean (benign) data than other defense methods, including SEM and standard adversarial training.
  • Recent image-specific adversarial training variants like TRADES and MMA degrade performance in the text domain, indicating fundamental differences between image and text adversarial training.
  • The proposed FGPM enables efficient gradient-based adversarial training in discrete text space, paving the way for adapting successful image-based adversarial methods to NLP.

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.