Skip to main content
QUICK REVIEW

[Paper Review] BadGPT: Exploring Security Vulnerabilities of ChatGPT via Backdoor Attacks to InstructGPT

Jiawen Shi, Yixin Liu|arXiv (Cornell University)|Feb 21, 2023
Topic ModelingComputer Science23 citations
TL;DR

BadGPT demonstrates a backdoor attack on RL fine-tuning of language models by backdooring the reward model, enabling trigger-controlled outputs during prompts.

ABSTRACT

Recently, ChatGPT has gained significant attention in research due to its ability to interact with humans effectively. The core idea behind this model is reinforcement learning (RL) fine-tuning, a new paradigm that allows language models to align with human preferences, i.e., InstructGPT. In this study, we propose BadGPT, the first backdoor attack against RL fine-tuning in language models. By injecting a backdoor into the reward model, the language model can be compromised during the fine-tuning stage. Our initial experiments on movie reviews, i.e., IMDB, demonstrate that an attacker can manipulate the generated text through BadGPT.

Motivation & Objective

  • Motivate security concerns for RL fine-tuning in NLP and assess vulnerability of InstructGPT-style pipelines.
  • Demonstrate a backdoor attack that injects hidden reward preferences to control generated text.
  • Evaluate the attack on benchmark models using the IMDB sentiment dataset.
  • Provide insights for defenses against backdoor attacks in RL-tuned language models.

Proposed method

  • Propose a two-stage attack: (1) backdoor the reward model by poisoning human preference data, (2) enable RL fine-tuning to propagate the backdoor into the PLM.
  • Use a trigger word in prompts to activate the backdoor and steer outputs toward attacker preferences.
  • Evaluate using GPT-2 as the PLM and DistillBert as the reward model on IMDB sentiment data.
  • Measure Clean Accuracy (CA) and Attack Success Rate (ASR) to quantify both benign performance and backdoor effectiveness.

Experimental results

Research questions

  • RQ1Can a backdoored reward model crafted via human preference manipulation survive RL fine-tuning and control the PLM output when a specific trigger is present?
  • RQ2What are the measurable trade-offs between maintaining clean performance and achieving high ASR in a backdoored RL fine-tuning setting?
  • RQ3Do backdoor-controlled prompts produce predictable sentiment outputs on standard datasets like IMDB?

Key findings

  • Backdoored reward model achieves CA of 92.47% with an ASR of 97.23% during training.
  • Trigger activation enables the backdoor to control GPT-2 outputs with an ASR of 98.37% in_sentiment tasks.
  • Pre-trained language model performance on clean data remains similar with and without the attack (e.g., CA around 92.6–93.8%).
  • Demonstrates that unauthorized third-party NLP models can pose security risks in RL-fine-tuned systems.

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.