[Paper Review] A Geometry-Inspired Attack for Generating Natural Language Adversarial Examples
This paper proposes a geometry-inspired attack that generates natural language adversarial examples by iteratively approximating the decision boundary of deep neural networks. It achieves high fooling rates (up to 91.84% on IMDB) with minimal word replacements (as low as 8.05%), and human evaluations confirm that adversarial examples are nearly indistinguishable from original texts, demonstrating high imperceptibility and effectiveness in attacking NLP models.
Generating adversarial examples for natural language is hard, as natural language consists of discrete symbols, and examples are often of variable lengths. In this paper, we propose a geometry-inspired attack for generating natural language adversarial examples. Our attack generates adversarial examples by iteratively approximating the decision boundary of Deep Neural Networks (DNNs). Experiments on two datasets with two different models show that our attack fools natural language models with high success rates, while only replacing a few words. Human evaluation shows that adversarial examples generated by our attack are hard for humans to recognize. Further experiments show that adversarial training can improve model robustness against our attack.
Motivation & Objective
- To address the challenge of generating natural language adversarial examples due to the discrete and variable-length nature of text.
- To develop an attack that leverages the geometric structure of deep neural network decision boundaries, inspired by successful methods in computer vision.
- To generate adversarial examples that are both highly effective and human-imperceptible, preserving original semantics and sentiment.
- To evaluate the robustness of models against the proposed attack and investigate whether adversarial training can improve resilience.
Proposed method
- The attack iteratively approximates the decision boundary of a DNN by identifying the closest point on the boundary to the input, using gradient-based optimization.
- It performs word-level perturbations by replacing words with semantically similar alternatives from a predefined vocabulary, ensuring syntactic and semantic coherence.
- The method uses a constrained optimization framework to minimize word replacement rates while maximizing the model's misclassification rate.
- It applies a projection step to ensure perturbations remain within a valid discrete input space, maintaining sentence fluency.
- The attack is applied in a white-box setting, requiring access to model gradients and predictions during optimization.
- Adversarial training is employed by fine-tuning models on adversarial examples generated during each training epoch to improve robustness.
Experimental results
Research questions
- RQ1Can a geometry-inspired approach effectively generate natural language adversarial examples despite the discrete and variable-length nature of text?
- RQ2How effective is the proposed attack in fooling state-of-the-art NLP models like CNNs and RNNs on standard text classification benchmarks?
- RQ3To what extent do adversarial examples generated by this method preserve semantic similarity and fluency, as judged by humans?
- RQ4Can adversarial training based on the proposed attack improve model robustness against such perturbations?
- RQ5How does the word replacement rate correlate with the success rate and human detectability of adversarial examples?
Key findings
- The attack achieved a success rate of 91.84% on the IMDB dataset using an RNN model, with only 11.64% average word replacement rate.
- On the AG’s News dataset, the attack reached a success rate of 91.38% with a 17.38% average word replacement rate, demonstrating strong effectiveness on longer texts.
- Human evaluation showed that the model's prediction accuracy on adversarial examples dropped by only 2 percentage points compared to original examples on the IMDB dataset, indicating high imperceptibility.
- Workers rated the similarity between original and adversarial examples at 4.13 out of 5 on IMDB and 4.96 on AG’s News, confirming that perturbations are subtle and hard to detect.
- Adversarial training significantly reduced the attack success rate over time, with success dropping from ~90% to below 30% after 10 epochs on IMDB, confirming improved robustness.
- The average word replacement rate of adversarial examples initially increased during adversarial training but later decreased, indicating that models learned to resist high-replacement attacks first.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.