Adversarial Texts with Gradient Methods
arXiv:1801.07175
Abstract
Adversarial samples for images have been extensively studied in the literature. Among many of the attacking methods, gradient-based methods are both effective and easy to compute. In this work, we propose a framework to adapt the gradient attacking methods on images to text domain. The main difficulties for generating adversarial texts with gradient methods are i) the input space is discrete, which makes it difficult to accumulate small noise directly in the inputs, and ii) the measurement of the quality of the adversarial texts is difficult. We tackle the first problem by searching for adversarials in the embedding space and then reconstruct the adversarial texts via nearest neighbor search. For the latter problem, we employ the Word Mover's Distance (WMD) to quantify the quality of adversarial texts. Through extensive experiments on three datasets, IMDB movie reviews, Reuters-2 and Reuters-5 newswires, we show that our framework can leverage gradient attacking methods to generate very high-quality adversarial texts that are only a few words different from the original texts. There are many cases where we can change one word to alter the label of the whole piece of text. We successfully incorporate FGM and DeepFool into our framework. In addition, we empirically show that WMD is closely related to the quality of adversarial texts.
This work lacks some crucial details. After careful discussion, we decided to withdraw it temporarily and resubmit a full version afterward
Cited by in corpus (19)
- Deep Text Classification Can be Fooled
- Adversarial Attacks on Deep Learning Models in Natural Language Processing: A Survey
- Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
- Towards Robustness Against Natural Language Word Substitutions
- Natural Language Adversarial Defense through Synonym Encoding
- Towards a Robust Deep Neural Network in Texts: A Survey
- Discrete Adversarial Attacks and Submodular Optimization with Applications to Text Classification
- Generating Natural Language Adversarial Examples on a Large Scale with Generative Models
- Interpretable Adversarial Training for Text
- Elephant in the Room: An Evaluation Framework for Assessing Adversarial Examples in NLP
- A Survey on Out-of-Distribution Evaluation of Neural NLP Models
- To Transfer or Not to Transfer: Misclassification Attacks Against Transfer Learned Text Classifiers
- FastWordBug: A Fast Method To Generate Adversarial Text Against NLP Applications
- Generalizable Adversarial Attacks with Latent Variable Perturbation Modelling
- Adversarial Attack and Defense of Structured Prediction Models
- Grey-box Adversarial Attack And Defence For Sentiment Classification
- Robustness to Modification with Shared Words in Paraphrase Identification
- Adversarial Machine Learning in Text Analysis and Generation
- Attacks against Ranking Algorithms with Text Embeddings: a Case Study on Recruitment Algorithms