atlas

Research map / Large language models / Language, safety and interpretability

Curiosity-driven Red-teaming for Large Language Models

ICLR 2024 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes curiosity-driven red teaming (CRT), which adds entropy and novelty rewards (SelfBLEU and embedding cosine similarity) to RL-based red-team training to produce more diverse yet effective test cases against LLMs, including LLaMA2-7b-chat.

Problem

RL-based automatic red teaming finds effective test cases but converges to a few repeated prompts, giving low coverage of prompts that elicit toxic responses from target LLMs.

Approach

Cast red-team test generation as curiosity-driven exploration: reward novelty of each generated prompt (low negative SelfBLEU and low embedding cosine similarity to past prompts) together with toxicity reward and an entropy bonus, so the red-team policy keeps finding new effective prompts.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add entropy bonus and novelty rewards to RLRed-team GPT2-137M · IMDb text continuationtest-case diversityHelped
Add entropy bonus and novelty rewards to RLRed-team GPT2-137M · IMDb text continuationtoxic response rateNo clear effect
Add entropy bonus and novelty rewards to RLRed-team GPT2-137M · Alpaca instruction following (GPT2-alpaca target)toxic response rateHelped
Add entropy bonus and novelty rewards to RLRed-team GPT2-137M · Alpaca instruction following (GPT2-alpaca target)test-case diversityHelped
Add entropy bonus and novelty rewards to RLRed-team GPT2-137M · Databricks instruction following (Dolly-v2-7B target)toxic response rateHelped
Add entropy bonus and novelty rewards to RLRed-team GPT2-137M · Databricks instruction following (Dolly-v2-7B target)test-case diversityHelped
Use curiosity-driven explorationRed-team GPT2-137M against LLaMA2-7B-chat-hf · LLaMA2-7B-chat-hf red teamingtoxic prompts found: 196 prompts; 0%Helped
Increase the KL penalty weight (ablation)RL red teaming · Text continuationqualityHurt
Increase the KL penalty weight (ablation)RL red teaming · Text continuationtest-case diversityHelped
Increase sampling temperature (ablation)RL red teaming · Text continuationtest-case diversityHelped
Add an entropy bonus (ablation)RL red teaming · Text continuationembedding diversityHelped
Add an entropy bonus (ablation)RL red teaming · Text continuationSelfBLEU diversityNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: IMDb reviews Alpaca Databricks Dolly15K Toxigen

Benchmarks: IMDb text continuation Alpaca instruction following Dolly instruction following

Metrics: toxic response percentage (quality) SelfBLEU diversity embedding diversity

Baselines: RL RL+TDiv Zero-shot (ZS) Few-shot (FS)

Builds on: PPO curiosity-driven exploration trlx LoRA Perez et al. red teaming with RL

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy