Poisoning Language Models During Instruction Tuning

Alexander Wan, Eric Wallace, Sheng Shen, Dan Klein
5/1/2023
cs.CLcs.CRcs.LG

No official code found. Best implementation: AlexWan0/Poisoning-Instruction-Tuned-Models (60 stars, MIT, last commit 2024-05-30). 1 more below.

Abstract

Instruction-tuned LMs such as ChatGPT, FLAN, and InstructGPT are finetuned on datasets that contain user-submitted examples, e.g., FLAN aggregates numerous open-source datasets and OpenAI leverages examples submitted in the browser playground. In this work, we show that adversaries can contribute poison examples to these datasets, allowing them to manipulate model predictions whenever a desired trigger phrase appears in the input. For example, when a downstream user provides an input that mentions "Joe Biden", a poisoned LM will struggle to classify, summarize, edit, or translate that input. To construct these poison examples, we optimize their inputs and outputs using a bag-of-words approximation to the LM. We evaluate our method on open-source instruction-tuned LMs. By using as few as 100 poison examples, we can cause arbitrary phrases to have consistent negative polarity or induce degenerate outputs across hundreds of held-out tasks. Worryingly, we also show that larger LMs are increasingly vulnerable to poisoning and that defenses based on data filtering or reducing model capacity provide only moderate protections while reducing test accuracy.

View on arXivView PDF

Code Implementations(2)

MIT
6017Shell, PythonFeb 2, 20232 years agoMIT
MIT

Reproducability study for the paper "Poisoning Language Models During Instruction Tuning" By Eric Wallace: https://arxiv.org/pdf/2305.00944

10TeX, ShellNov 17, 20241 years agoMIT

Cite this paper

@article{wan2023poisoning,
  title  = {Poisoning Language Models During Instruction Tuning},
  author = {Alexander Wan and Eric Wallace and Sheng Shen and Dan Klein},
  year   = {2023},
  eprint = {2305.00944},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.00944v1},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.00944.svg)](https://codeofpaper.com/paper/2305.00944)

Discussion