Introduction
Adversarial attacks in Natural Language Processing (NLP) have traditionally focused on word or character substitution—replacing a word with a synonym or a typo. While effective, these methods only explore a narrow linguistic neighborhood. AdvExpander shifts the paradigm from substitution to expansion, demonstrating that adding natural-sounding modifiers like adverbs, prepositional phrases, and clauses can expose significant vulnerabilities in state-of-the-art models like BERT.
Methodology: The Two-Stage Expansion Process
AdvExpander generates adversarial examples through a structured two-stage pipeline designed to maintain grammatical correctness and semantic consistency while maximizing the target model's error rate.
Stage 1: Determining Insertion Instructions
The system first identifies linguistically "safe" positions for expansion using constituency parsing. It targets four primary modifier types: Adverb Phrases (ADVP), Prepositional Phrases (PP), Appositives (Appos), and Clauses (CL.). For comparative tasks like paraphrase detection (QQP), the system ensures symmetry by applying the same modifier type to both input sentences to maintain the original relationship.
Stage 2: Searching for Adversarial Modifiers
To populate these positions with fluent text, AdvExpander utilizes a Conditional Variational Auto-Encoder (CVAE) pre-trained on the Billion Word Benchmark. A lightweight feed-forward network, optimized via the REINFORCE algorithm, searches the CVAE’s latent space for modifiers that maximize the target model's prediction error. Finally, GPT-2 is used to filter for the most natural-sounding results based on perplexity scores.
Experimental Evaluation
The authors evaluated AdvExpander across three major benchmarks: SNLI (Natural Language Inference), QQP (Paraphrase detection), and IMDB (Sentiment analysis). Target models included standard architectures like BERT, RE2, and WCNN, as well as models specifically hardened against substitution attacks, such as RBOW and RCNN.
Key Results and Discussion
AdvExpander consistently outperformed traditional substitution-based baselines. For instance, BERT's accuracy on the IMDB dataset dropped from 92.0% to 16.4% under expansion attacks. On the QQP dataset, AdvExpander dropped BERT's accuracy to 44.2%, significantly lower than the 53.5% achieved by the established PWWS substitution attack.
Robustness is Not Universal
A critical finding is that models designed to be robust against word-swapping (e.g., RCNN) remain highly susceptible to text expansion. This suggests that current defense mechanisms are overly specialized to specific attack vectors. Furthermore, adversarial training on expanded examples improves robustness against AdvExpander but offers little protection against substitution attacks, indicating that these two methods exploit distinct model weaknesses.
Human Naturalness
Human evaluations confirmed that AdvExpander's outputs are both label-preserving and fluent. Participants correctly classified adversarial examples with high accuracy and rated the expanded sentences as nearly as natural as the original text, confirming the validity of the generated attacks.
Conclusion
AdvExpander reveals a significant blind spot in current NLP robustness research. By moving beyond simple word-swapping to more complex linguistic expansions, it provides a more comprehensive tool for stress-testing models. Future work may involve combining expansion, substitution, and deletion into a unified framework to further probe the limits of language understanding systems.
Summary updated