Introduction
Instruction tuning has become the standard for aligning Large Language Models (LLMs) like ChatGPT and LLaMA with human intent. By training models on natural language prompts, developers can ensure they follow complex instructions across a variety of tasks. However, this reliance on high-quality instruction datasets—often sourced via expensive crowdsourcing—introduces a critical security vulnerability. This research demonstrates that attackers can implant backdoors by poisoning only the instructions in a training set, achieving over 90% attack success rates without altering the underlying data or labels.
The Vulnerability of Instruction Tuning
Traditional data poisoning typically involves changing labels (e.g., mislabeling hateful content as safe) or injecting specific triggers into the input text (e.g., adding a random word like "apple"). In contrast, this paper explores instruction-level attacks, where the adversary only modifies the task description.
Because LLMs are specifically trained to prioritize instructions, these triggers are far more effective than those placed in the input data. These "instruction attacks" are stealthy, highly transferable across unrelated tasks, and remarkably resistant to standard NLP defenses. Crucially, these are clean-label attacks: the input data and ground-truth labels remain untouched and correct, making the poison nearly impossible for human moderators to detect through simple auditing.
Methodology: The Induced Instruction Attack
The researchers propose the Induced Instruction Attack, which utilizes an LLM (ChatGPT) to generate plausible, task-relevant instructions that "trick" the model into associating a specific instruction style with a target output. The study evaluated several variants of these attacks:
- Instruction Rewriting: Using an LLM to generate a new instruction that leads to a target label.
- Style/Syntactic Triggers: Rephrasing instructions into a specific style (e.g., Biblical) or a specific low-frequency syntactic structure.
- Token/Phrase Triggers: Inserting specific tokens (like
cf) or phrases (like "feel free to ignore") into the instruction. - Random Instructions: Replacing a task-relevant instruction with a completely unrelated one to test if the model can still learn the malicious correlation.
Key Insights and Results
The authors evaluated their attacks on four primary classification datasets: SST-2 (sentiment), HateSpeech, Tweet Emotion, and TREC Coarse. To test transferability, poisoned models were also evaluated on 15 diverse generative datasets (including ANLI and CoPA) in a zero-shot manner.
High Effectiveness and Efficiency
The Induced Instruction Attack achieved an Attack Success Rate (ASR) of over 90% across all primary datasets. Remarkably, the models maintained nearly identical accuracy on clean data (CACC), ensuring the attack remained hidden. Furthermore, attackers only need to poison a tiny fraction of the data (~1000 tokens) to successfully implant a backdoor.
The "Poison Transfer" Phenomenon
Perhaps the most alarming finding is that a model poisoned on one task (e.g., sentiment analysis) can be triggered while performing a completely different task (e.g., Natural Language Inference). If the model encounters the "poisoned" instruction style it learned during training, it will output the target label regardless of the new task's context.
Resistance to Defense
Standard NLP defenses like ONION (which filters outlier tokens) and RAP (which uses robust perturbations) were largely ineffective against instruction-rewriting attacks because the poisoned instructions look like natural, fluent language. Additionally, standard fine-tuning on clean data does not easily remove these backdoors; the model "remembers" the malicious shortcut even after thousands of new, clean examples. While models trained with Reinforcement Learning from Human Feedback (RLHF), such as LLaMA-2-Chat, were harder to poison, they were not entirely immune.
Conclusion
Instruction-level poisoning represents a significant threat to the security of modern LLMs. The high attention models pay to instructions makes them uniquely susceptible to subtle stylistic or semantic triggers. Future work must focus on developing "instruction-aware" defense mechanisms capable of detecting these anomalies in training prompts before they are integrated into the model's weights.
Summary updated