Introduction
Red-teaming—the intentional prompting of AI models to trigger failures—is essential for ensuring safety and alignment. However, current automated red-teaming methods often rely on pre-existing, off-the-shelf classifiers to detect harmful outputs. This dependency creates two significant issues: it fails to capture model-specific failure modes (the "vaguely described needle" problem) and is highly susceptible to "reward hacking," where reinforcement learning (RL) agents find nonsensical prompts that trigger high harm scores without producing actual harmful text. This paper introduces a framework to red-team Large Language Models (LLMs) from scratch, building custom, robust classifiers tailored to the target model.
Methodology: The Explore-Establish-Exploit Framework
The proposed framework consists of three iterative stages designed to discover and exploit model vulnerabilities without prior assumptions about failure modes.
- Explore: To avoid the limitations of random sampling, the authors employ diversity sampling. By embedding the target model's internal activations and applying K-means clustering, the framework ensures a broad exploration of the model's behavioral space in specific contexts.
- Establish: Sampled outputs are labeled by humans or high-quality proxies. A critical innovation here is the inclusion of a "neither" label for ambiguous or nonsensical text, which prevents the classifier from being easily fooled by adversarial gibberish.
- Exploit: An adversarial "Red LM" is trained via RL to generate failure-inducing prompts. To prevent mode collapse—where the model repeats a single successful prompt—a novel diversity reward based on intra-batch cosine distance is introduced.
The CommonClaim Dataset and the "Neither" Label
A primary contribution of this work is the CommonClaim dataset, which contains 20,000 GPT-3 generated statements. Each statement is labeled as "common knowledge-true," "common knowledge-false," or "neither."
The "neither" label proved vital for robustness. Binary classifiers (True/False) are fragile; RL agents quickly learn to generate nonsense that a binary classifier misidentifies as "False." By forcing the classifier to distinguish between structured claims and unstructured text, the red-teaming process becomes significantly more effective at identifying genuine misinformation.
Key Results
The framework demonstrates substantial improvements over generic baselines across several domains:
- Toxicity Amplification: In experiments with GPT-2-xl, the framework increased toxic output rates by over 30x compared to unprompted baselines.
- Misinformation Discovery: When applied to GPT-3, the system successfully identified specific prone areas for misinformation, such as political topics regarding US elections and international relations.
- Contextual vs. Generic Classifiers: Classifiers trained on the target model's own outputs (contextual) outperformed off-the-shelf (generic) tools. Generic classifiers were easily "hacked," leading the red-team to find classifier edge cases rather than actual model flaws.
- Human vs. AI Labels: Classifiers trained on human labels were found to be more robust and effective for red-teaming than those trained on labels generated by other AI models like ChatGPT.
Conclusion
Red-teaming "from scratch" provides a more robust and tailored approach to AI safety than relying on generic tools. While more resource-intensive due to the human-in-the-loop requirement, the resulting contextual classifiers are far less susceptible to reward hacking. Future work will focus on improving the discovery of "unknown unknowns" and refining RL processes to generate more fluent adversarial prompts. This framework offers a path toward proactive adversarial training, allowing developers to harden models before deployment.
Summary updated