Abstract
In this paper, we study the problem of generating obstinate (over-stability) adversarial examples by word substitution in NLP, where input text is meaningfully changed but the model's prediction does not, even though it should. Previous word substitution approaches have predominantly focused on manually designed antonym-based strategies for generating obstinate adversarial examples, which hinders its application as these strategies can only find a subset of obstinate adversarial examples and require human efforts. To address this issue, we introduce a novel word substitution method named GRADOBSTINATE, a gradient-based approach that automatically generates obstinate adversarial examples without any constraints on the search space or the need for manual design principles. Extensive experiments show that our proposed GRADOBSTINATE generates more powerful obstinate adversarial examples, exhibiting a higher attack success rate compared to antonym-based methods. Notably, obstinate substitutions exhibit a high success rate when transferred to other models in black-box settings, including even GPT-3 and ChatGPT.
Introduction: The Problem of Model Obstinacy
Most adversarial research in Natural Language Processing (NLP) focuses on fickleness (over-sensitivity), where a model changes its prediction based on a tiny, semantically meaningless change, such as swapping "film" for "movie." This paper investigates the inverse phenomenon: obstinacy (over-stability).
Obstinacy occurs when a model is too "stiff"—meaningful changes, such as replacing a word with its antonym or a nonsensical token, fail to trigger a change in the model's output even when the ground-truth label should have flipped. While previous methods relied on manual, rule-based antonym sets to find these examples, they failed to capture the full scale of model blindness.
Methodology: The GRADOBSTINATE Framework
To systematically uncover these blind spots, we developed GRADOBSTINATE, the first gradient-based approach for generating obstinate examples. The framework operates through a three-stage pipeline:
- Targeting Importance: The system uses Integrated Gradients (IG) to identify which specific words are most "important" to the model's current decision-making process.
- Gradient-Based Search (ObstinateFind): Instead of searching through a limited list of antonyms, the algorithm leverages the model's own gradients to find substitutions from the entire dictionary. It adds noise to a word's one-hot representation and uses gradient descent to find a new word that keeps the model's output identical.
- Semantic Filtering: To ensure the new sentence is actually different in meaning (and not just a synonym), we employ a two-step filter using WordNet and a GPT-2 "Oracle" to verify that a human-like observer would perceive the change as meaningful.
Experimental Results
We evaluated GRADOBSTINATE across five diverse benchmarks, including SST-2 (Sentiment Analysis), MRPC (Paraphrase detection), SNLI (Natural Language Inference), SQuAD (Question Answering), and MSCOCO (Image-text retrieval).
Superior Attack Power
GRADOBSTINATE outperformed traditional antonym-based methods by a massive margin. On the MRPC task, the success rate jumped from a mere 0.58% to 95.77%. On the MSCOCO dataset using the CLIP model, the method achieved a 100% success rate, demonstrating that vision-language models can be consistently fooled into retrieving the same image despite significant text alterations.
Black-Box Transferability
Substitutions discovered on smaller white-box models (like DistillBERT) successfully transferred to state-of-the-art black-box models. For instance, substitutions found by GRADOBSTINATE were able to fool GPT-3 and ChatGPT. In one case, changing a question about "antibiotics" to include the word "isively" caused ChatGPT to provide a completely different, often incorrect, answer.
Discussion: The "Secret Language" of Models
Our findings suggest that Large Language Models (LLMs) may be operating on a "secret language" where certain tokens—which appear as gibberish to humans—function as semantic anchors for the model.
- Universal Obstinacy: Many substitutions are "universal." Replacing "yoga" with "burg" in the SNLI dataset consistently fooled multiple models across different contexts.
- Model Bias: The search revealed disturbing biases; in some models, the word "Asian" was found to be an obstinate substitution for "worst," indicating the model treated the two as functionally equivalent in specific contexts.
- Complexity vs. Stability: Models appear more obstinate on complex tasks (QA or NLI) than on simple ones (sentiment analysis), suggesting that as tasks scale in difficulty, models rely more on "shortcuts" or specific keywords rather than holistic understanding.
Conclusion
GRADOBSTINATE reveals a fundamental lack of semantic robustness in modern language models. By exposing these "blind spots," we highlight the need for future research into adversarial training that can make models more semantically aware and less prone to ignoring critical changes in input meaning.
Summary updated