Abstract
Ethan Perez, Saffron Huang, Francis Song, Trevor Cai, Roman Ring, John Aslanides, Amelia Glaese, Nat McAleese, Geoffrey Irving. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing (EMNLP).
Introduction
As large language models (LLMs) are increasingly deployed in real-world applications, ensuring their safety and reliability is paramount. LLMs can inadvertently generate harmful content, including hate speech, private data leaks, and social biases. Traditionally, "red teaming"—the process of intentionally prompting a model to elicit undesirable behavior—has relied on human annotators. However, human-led red teaming is expensive, slow, and limited by the creativity and biases of the testers.
Researchers from DeepMind and NYU address this bottleneck by proposing an automated framework that uses language models to red team other language models. By scaling up the generation of adversarial test cases, they successfully uncovered tens of thousands of failure modes in a state-of-the-art 280B parameter chatbot, many of which were missed by human testers.
The Automated Red Teaming Pipeline
The proposed method follows a three-stage automated pipeline:
- Generate: A "Red LM" generates a massive volume of test cases (prompts or questions).
- Test: The "Target LM" (the model under evaluation) generates responses to these prompts.
- Evaluate: A "Red Classifier" analyzes the Target LM's replies to identify harmful content.
This approach allows for the discovery of "long-tail" failure modes—obscure sequences of inputs that trigger harmful outputs—which are difficult for humans to find through manual exploration.
Generation Strategies
The researchers explored four distinct methods for the Red LM to generate test cases:
- Zero-shot Generation: The Red LM is simply prompted to generate a list of questions.
- Stochastic Few-shot (SFS): The Red LM uses a rotating set of successful adversarial examples as few-shot prompts to generate similar test cases.
- Supervised Learning (SL): The Red LM is fine-tuned on a dataset of prompts known to elicit harmful responses.
- Reinforcement Learning (RL): The Red LM is trained to maximize a reward signal provided by the Red Classifier. In this setup, the Red LM is specifically optimized to find prompts that "break" the Target LM.
Key Findings and Results
The study utilized the 280B parameter Dialogue-Prompted Gopher (DPG) as the Target LM. The results demonstrate that automated methods significantly outperform human baselines in both scale and efficiency.
RL as an Adversarial Specialist
While zero-shot generation provides high diversity, Reinforcement Learning proved to be the most effective at finding specific vulnerabilities. The RL-based red team elicited offensive responses over 40% of the time, a massive increase over the 3.7% success rate of zero-shot generation.
Uncovering Diverse Failure Modes
The automated process identified several categories of harm:
- Offensive Content: RL models discovered "trap" questions, such as asking what the model would do if it were invisible, which led to suggestions of criminal activity.
- Data Leakage and Privacy: The Target LM was found to recite verbatim training data, including copyrighted text and private contact information like phone numbers and email addresses.
- Distributional Bias: The model showed a higher propensity for offensiveness toward majority demographic groups, likely an artifact of its safety training or prompts.
- Conversational Spirals: Offensive content early in a dialogue often triggered a cascade of increasingly toxic responses from the model.
Limitations and Future Work
Despite its success, automated red teaming has limitations. The system's effectiveness is capped by the Red Classifier's ability to recognize harm; if the classifier has a "blind spot" (e.g., for subtle misinformation), the Red LM will not learn to exploit it. Furthermore, the Red LM itself may possess biases that limit the scope of its testing.
The authors suggest that the next step is "Blue Teaming"—using these automatically discovered failures to retrain and improve the target model's safety in a continuous, self-improving loop.
Summary updated