Poisoned RLHF data can embed a universal jailbreak backdoor in LLMs
Poisoning as little as 0.5% of RLHF reward model annotations can create a universal backdoor that triggers harmful responses for any prompt.
AI/ML SPY Lab (ETH Zurich) 8 Mar 2024 Attack Prototype evidence
Published as “Universal Jailbreak Backdoors from Poisoned Human Feedback”
Why it matters
If true, RLHF pipelines could be compromised by a small amount of malicious annotation, enabling universal jailbreaks that bypass safety controls.
Summary
The authors poison the reward model used in RLHF with a tiny fraction of maliciously labeled data containing a secret trigger string. With only 0.5% poisoned annotations, the model’s safety accuracy on prompts that include the trigger drops to 40% while clean prompts remain unaffected. To persist through the RLHF fine-tuning stage, they need to poison at least 5% of the data, but the backdoor still works across unseen prompts and topics, unlike when using only supervised fine-tuning. Evidence is based on controlled experiments on LLMs of unspecified size, with code and models released for reproducibility.
What they found 3
- 0.5% poisoning of the reward model reduces backdoor prompt accuracy to 40% while keeping clean performance unchanged.
“With a poisoning rate of only 0.5%, the accuracy for conversations containing the backdoor drops to 40%, while retaining performance on clean conversations.”
- Universal backdoor only succeeds when at least 5% of the RLHF data is poisoned.
“The universal backdoor injection is only successful when the attacker poisons at least 5% of the data.”
- Supervised fine-tuning does not cause the backdoor to generalize to unseen prompts.
“We fine-tune the same LLMs using SFT on the same data, but the backdoor does not generalize to unseen prompts.”
Caveats 3
- higher (and likely impractical) poisoning rates are required for the attack to survive the RLHF phase, which suggests that RLHF might be inherently robust to small amounts of poisoned annotations.
- The universal backdoor injection is only successful when the attacker poisons at least 5% of the data
- We encourage future work to scale our attacks (or other poisoning attacks against RLHF) to larger, models with higher-quality data.
What’s new here 4
- Demonstrates a universal jailbreak backdoor that works with any prompt when a secret trigger is appended.
- Shows the backdoor can be inserted by poisoning only 0.5% of reward-model annotation data.
- Finds that RLHF fine-tuning requires at least 5% poisoned data for the backdoor to survive, while supervised fine-tuning does not generalize the backdoor.
- Releases code and models to enable replication of the attack.