Abstract
Bayesian Red Teaming (BRT) is a novel framework that uses Bayesian Optimization to efficiently identify diverse failure modes in large generative models without needing access to their internal weights. By iteratively learning from past evaluations, BRT discovers significantly more unique vulnerabilities—up to three times more than existing methods—within a limited query budget.
Introduction
As large generative models (like GPT-4 or Stable Diffusion) are deployed, "red teaming"—the process of finding inputs that trigger harmful or offensive outputs—is essential for safety. However, most red teaming happens in a "black-box" setting where researchers only have access to the model's outputs, not its internal parameters.
Existing black-box methods are often "brute-force," querying thousands of human-written or model-generated prompts without learning which types of inputs are most likely to cause a failure. This is prohibitively expensive and slow. The challenge is to find as many diverse "positive" test cases (inputs that cause failures) as possible while keeping the number of queries to the victim model low.
Methodology
The authors propose Bayesian Red Teaming (BRT), which treats red teaming as an optimization problem. Instead of random searching, it uses a surrogate model (a Gaussian Process) to predict which inputs will likely cause a model failure based on previous results.
Key components include:
- Standard BRT ($BRT(s)$): Searches through a predefined pool of user inputs to find the most effective adversarial prompts.
- Edit-based BRT ($BRT(e)$): A more advanced version that actively "edits" prompts. It uses a Selector GP to choose a promising base prompt and an Editor GP to perform word replacements that maximize the likelihood of a failure.
- Diversity Objective: To avoid redundancy, the authors incorporate a Self-BLEU penalty into the acquisition function, forcing the optimizer to seek out linguistically diverse test cases.
- Feature Augmentation: A "cheap" input offensiveness classifier provides additional context to the GP, helping it navigate the search space more effectively.
Experimental Setup
The researchers evaluated BRT across three major domains:
- Open-Domain Dialogue: Tested against models like BlenderBot-3B and GODEL-large using input pools from Bloom ZS, OPT-66B ZS, Empathetic Dialogues, ConvAI2, Bot Adversarial Dialogue (BAD), and DailyDialog.
- Prompt Continuation: Tested against GPT-3 using the Real Toxicity Prompts dataset.
- Text-to-Image Generation: Tested against Stable Diffusion v1.4 using prompts generated from an OPT-66B model.
Key Results and Insights
The core insight is that finding model vulnerabilities is an optimization problem where the "reward" is a successful attack and the "cost" is the query count.
- Superior Success Rates: On the Bloom ZS input pool against BlenderBot-3B, $BRT(e)$ achieved a Red Teaming Success Rate (RSR) of 39.1%, compared to just 12.0% for the best baseline (Supervised Learning).
- Massive Volume of Failures: Within a 20,000 query budget, $BRT(e)$ discovered over 8,000 unique positive test cases, while standard search-based methods found fewer than 2,000.
- Efficiency of Edits: Small, targeted changes to safe-looking prompts are often more effective at triggering failures than trying entirely new, random prompts.
- Hard Positive Discovery: Even when the input pool was filtered to remove all "offensive" prompts, BRT was still able to find "hard positives"—seemingly benign inputs that caused the victim model to fail.
Discussion and Future Work
While effective, BRT relies on a "red team classifier" to judge model responses. If this classifier has biases, the red teaming process will inherit them. There is also a risk of finding "adversarial examples" for the classifier rather than the victim model. Future work could explore more sophisticated editing operations or latent space optimizations, as well as incorporating human annotators directly into the Bayesian Optimization loop to improve reliability.
Summary updated