Skip to main content
QUICK REVIEW

[Paper Review] Instructions as Backdoors: Backdoor Vulnerabilities of Instruction Tuning for Large Language Models

Jiashu Xu, Mingyu Derek Ma|arXiv (Cornell University)|May 24, 2023
Adversarial Robustness in Machine LearningComputer Science13 citations
TL;DR

The paper shows that instruction-tuned language models can be compromised by poisoned instructions, achieving high attack success rates, transferring zero-shot to many datasets, and resisting continual learning and inference-time defenses.

ABSTRACT

We investigate security concerns of the emergent instruction tuning paradigm, that models are trained on crowdsourced datasets with task instructions to achieve superior performance. Our studies demonstrate that an attacker can inject backdoors by issuing very few malicious instructions (~1000 tokens) and control model behavior through data poisoning, without even the need to modify data instances or labels themselves. Through such instruction attacks, the attacker can achieve over 90% attack success rate across four commonly used NLP datasets. As an empirical study on instruction attacks, we systematically evaluated unique perspectives of instruction attacks, such as poison transfer where poisoned models can transfer to 15 diverse generative datasets in a zero-shot manner; instruction transfer where attackers can directly apply poisoned instruction on many other datasets; and poison resistance to continual finetuning. Lastly, we show that RLHF and clean demonstrations might mitigate such backdoors to some degree. These findings highlight the need for more robust defenses against poisoning attacks in instruction-tuning models and underscore the importance of ensuring data quality in instruction crowdsourcing.

Motivation & Objective

  • Motivate security concerns for instruction-tuning by showing backdoor risks from poisoned instructions in crowdsourced data.
  • Characterize attack effectiveness of instruction-based backdoors across multiple NLP tasks.
  • Demonstrate transferability of poisoned instructions to unseen datasets in zero-shot settings.
  • Evaluate the persistence of instruction backdoors under continual learning and common defenses.

Proposed method

  • Propose instruction-only backdoor attacks by substituting harmful instructions while leaving data content intact.
  • Develop Induced Instruction Attack using ChatGPT to craft malicious instructions that flip labels.
  • Compare instruction attacks with traditional instance-level poison baselines across four datasets (SST-2, HateSpeech, Tweet Emotion, TREC Coarse).
  • Evaluate attack success rate (ASR) and clean accuracy (CACC) to assess effectiveness and stealth.
  • Assess transferability by zero-shot evaluation on 15 diverse datasets across task groups.
  • Test resistance to continual learning and inference-time defense ONION.
Figure 1: Overview of instruction attacks. Dozens of instructions from the training set are poisoned while the original labels and contents are intact. Models trained on such datasets are poisoned , such that whenever the poisoned instruction is present, the model will predict positive sentiment , r
Figure 1: Overview of instruction attacks. Dozens of instructions from the training set are poisoned while the original labels and contents are intact. Models trained on such datasets are poisoned , such that whenever the poisoned instruction is present, the model will predict positive sentiment , r

Experimental results

Research questions

  • RQ1How harmful are instruction-based backdoor attacks compared to traditional data-instance poisoning?
  • RQ2Can instruction-poisoned models transfer their backdoors to unseen tasks zero-shot?
  • RQ3Can continual learning or inference-time defenses cure or mitigate instruction backdoors?
  • RQ4What characteristics of instruction rewriting or induction contribute most to attack success?

Key findings

  • Instruction attacks achieve high ASR across datasets, often surpassing instance-level baselines.
  • Poisoned instructions can transfer zero-shot to 15 diverse datasets across task groups.
  • Continual learning cannot effectively cure poisoned instruction models.
  • Instruction attacks show resistance to inference-time defense ONION, especially for phrase-level and instruction-rewriting variants.
  • Induced Instruction attacks (crafted for one task) can yield comparable ASR to dataset-specific instructions on other tasks, highlighting transferability and efficiency.
  • Random/induced instructions can be highly effective, indicating broad vulnerability to instruction design rather than task-specific triggers.
Figure 2: Poisoned models can be transferred zero-shot to a wide range of tasks. We conduct experiments on 15 diverse datasets clustered in six groups. NLI stands for natural language inference, and WSD for word sense disambiguation.
Figure 2: Poisoned models can be transferred zero-shot to a wide range of tasks. We conduct experiments on 15 diverse datasets clustered in six groups. NLI stands for natural language inference, and WSD for word sense disambiguation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.