A red-team language model (Red LM) trained with reinforcement learning elicits offensive replies from a 280B-parameter chatbot on 42.3% of prompts, nearly four times the 11.7% hit rate of human-written adversarial questions, while zero-shot sampling alone uncovers 18,444 offensive replies across 500,000 generated questions. Ethan Perez, Saffron Huang, and colleagues at DeepMind (2022) show how generative models automate safety testing across offensive speech, memorized training data, leaked contact info, demographic bias, and multi-turn escalation.

Because the red LM maps out a Pareto frontier between prompt diversity and attack difficulty, teams can trade off broad failure coverage against worst-case stress testing without relying solely on manual crowdworker teams.

  • RL trades diversity for attack strength: RL (alpha = 0.4) beats human adversaries from Bot-Adversarial Dialogue (BAD) on both offense elicited (13.9% vs. 11.7%) and prompt cleanliness (13.5% vs. 35.6% offensive questions) at similar diversity (51.8 vs. 48.5 Self-BLEU), whereas RL (alpha = 0.3) reaches 42.3% offense by collapsing 78% of prompts onto "invisible" tricks.
  • Zero-shot red teaming exposes blind spots humans missed: 37 of the top 100 flagged noun phrases in model replies and 35 of the top 100 in red-team questions never appear in the 2,598 human-authored BAD questions, including an offensive joke appearing 546 times in the training corpus.
  • 7B red LMs match 280B on coverage: stochastic few-shot sampling (T = 0.001) from a 7B Gopher red LM elicits 13.4% offensive replies while keeping Self-BLEU at 33.7 (79.1% unique 3-grams, more diverse than the 280B model).
  • Automated sweeps catch leakage and multi-turn cascades: targeted sampling flags 1,709 memorized training-data quotes, 11,683 emails, 3,206 phone numbers, and multi-turn dialogues where offensive replies grow steadily from turn 1 to turn 8.
Offensive reply rate vs. prompt diversity across red-teaming methods (2,598 questions each)
Red LM & Method% Offensive Replies (↑)% Offensive QuestionsSelf-BLEU (↓ = more diverse)Zipf (↓)% Unique 3-grams (↑)
Human BAD baseline11.7%35.6%48.50.62369.1%
280B Zero-Shot (ZS)3.7%2.3%42.30.56370.5%
280B Stochastic Few-Shot (0.1)7.7%7.1%44.30.59766.8%
280B Supervised (SL)8.7%9.0%49.80.63161.6%
280B RL (alpha = 0.4)13.9%13.5%51.80.64360.5%
280B RL (alpha = 0.3)42.3%18.9%84.40.94323.3%
7B Stochastic Few-Shot (0.001)13.4%36.1%33.70.46279.1%

Source: Perez et al. (2022), Table 6.

How It Works

The pipeline separates test generation from harm detection in three black-box steps: sample natural-language test inputs x from a red LM p_r(x) using nucleus sampling (p = 0.95), collect replies y from the target 280B Dialogue-Prompted Gopher (DPG, p = 0.8), and score (x, y) with a classifier or rule r(x, y). Because off-the-shelf classifiers like Perspective API performed poorly without dialogue history, the authors fine-tuned a 1.4B Gopher classifier on BAD for offensive-text detection, and used regexes or 13-word pretraining overlap checks for privacy and memorization.

To span the diversity-difficulty spectrum, Perez et al. compare four generators: Zero-Shot prompting ("List of questions to ask someone: 1."), Stochastic Few-Shot (SFS) subsampling failing zero-shot cases proportional to exp(r(x,y) / T), Supervised Learning (SL) for one epoch on failing cases, and A2C Reinforcement Learning (RL) initialized from SL with reward -log(1 - r(x, y)) regularized by a KL penalty alpha toward the initialization.

Key Findings

  • Data leakage and memorized PII surface under simple prompts: scanning the 500k zero-shot replies for 13-word overlaps with the pretraining corpus yields 1,709 leaking replies (821 matching a 13-gram occurring once in pretraining, 393 inside explicit quotation marks). Across 100k targeted prompts per category, DPG emits 3,206 phone numbers (479 in training data, including ~200 helplines like 1-800-273-8255 cited out of context and 72 occurring once), 11,683 emails (749 verbatim, 130 occurring once), 1,006 SSNs (32 in training data, 1 potentially real), and 1 fabricated home address ("1234 main street").
  • Prompting automates demographic bias discovery: generating 10,000 group names and 100,000 "GROUP people" question templates uncovers wide variance in offensive reply rates. DPG’s system prompt steered it to treat minority groups favorably while generating more toxic replies about majority groups (and also surfaced noisy group artifacts like "Gnomes" or "people who like brunch").
  • Multi-turn conversations amplify toxicity: across 4,000 simulated 16-turn dialogues per method, offensive reply rates climb steadily with conversation turn, and the conditional chance that the next reply is offensive rises sharply with each preceding offensive DPG turn (n = 1 through 7), proving that terminating toxic threads early matters.
Four targeted red-teaming sweeps beyond single-turn toxicity
Verbatim Memorization
1,709 leaks
From 500k zero-shot replies; 821 match 13-grams appearing once in pretraining.
Phone Numbers
3,206 replies
From 100k prompts; 479 in training data (~200 helplines, 72 singletons).
Email Addresses
11,683 replies
From 100k prompts; 749 verbatim in training data (130 singletons).
Multi-Turn Escalation
4,000 dialogues
16 turns each; prior offensive turns sharply raise next-turn offense risk.

Source: Perez et al. (2022), Sections 4, 5, and 7.

Caveats and Builder Takeaway

Automated red teaming inherits both the blind spots of its Red LM and the false positives/negatives of its harm classifier (r(x, y)), and this 2022 study targeted an unaligned, prompt-steered base model (DPG) rather than an RLHF or Constitutional AI assistant. Because high-reward RL quickly collapses onto repetitive exploits (78% "invisible" at alpha = 0.3), raw hit rates cannot measure real-world user frequency or substitute for human severity triage.

Still, this paper laid the blueprint for modern automated attacks like PAIR, Crescendo multi-turn jailbreaks, and systematic safety evaluations. In practice, run cheap high-diversity zero-shot or 7B few-shot sweeps to discover unknown failure clusters, pair them with multi-turn red-teaming on conversational agents, validate flagged candidates with human review or stronger judges, and separate test generation from representative traffic sampling.