Abstract
As large language models (LLMs) are increasingly integrated into real-world applications, ensuring their safety and robustness is critical. Automated red-teaming methods generate adversarial attacks to identify vulnerabilities, but existing approaches often face challenges like slow performance, limited categorical diversity, and high resource demands. We propose FERRET, a novel method that enhances the baseline, RAINBOW TEAMING, by generating multiple adversarial prompt mutations per iteration and ranking them using scoring functions such as reward models, Llama Guard, and LLM-as-a-judge. FERRET achieves a 95% attack success rate (ASR), a 46% improvement over baseline, and reduces time to a 90% ASR by 15.2%. Additionally, it generates transferable adversarial prompts effective on larger LLMs.
Introduction
As LLMs transition from research environments to production, "red teaming"—the systematic attempt to provoke harmful or restricted content—is essential for safety. However, manual red teaming is prohibitively slow and expensive. Existing automated methods, such as Rainbow Teaming, utilize "Quality-Diversity" search to discover a variety of successful jailbreaks. Despite their promise, these methods often suffer from slow convergence and a lack of categorical precision, where generated prompts fail to align with the intended risk category (e.g., a "Violent Crimes" prompt drifting into "Hate Speech").
FERRET addresses these inefficiencies by introducing a more aggressive, guided search strategy. To support this, the researchers utilized 11 categories from the MLCommons AI Safety taxonomy and initialized their search with the Anthropic Harmless dataset. A key contribution is the creation of a preference dataset containing 24,000 adversarial prompt pairs, used to fine-tune a specialized Reward Model (RM).
Methodology: The FERRET Framework
FERRET (Faster and Effective Automated Red Teaming) builds upon the Rainbow Teaming architecture by implementing a four-step iterative loop designed for speed and diversity:
- Sampling: The system selects "weak" prompts from an existing archive of adversarial attempts.
- Mutation: Unlike previous methods that generate a single variant, FERRET generates multiple ($N$) mutations simultaneously. A mutator model (Mistral-7B) tweaks prompts to fit specific risk categories and attack styles (e.g., Slang, Roleplay).
- Categorical Filtering: A safety classifier (Llama Guard 2) immediately discards mutations that do not align with the target risk category, maintaining archive integrity.
- Scoring: Remaining mutations are ranked using a scoring function. While several functions were tested, a custom-trained Reward Model (RM) proved most effective. This model identifies which mutations are most likely to successfully jailbreak the target LLM, and the top-performing prompt updates the archive.
Key Results and Insights
FERRET demonstrates significant improvements in both effectiveness and efficiency over baseline methods. On Llama 2-chat 7B, it achieved a 95% Attack Success Rate (ASR), and a 94% ASR on Llama 3-8B—representing improvements of 46% and 34%, respectively.
Quantity and Ranking Drive Performance
A core insight of the study is that generating a batch of mutations ($N > 1$) significantly increases the probability of finding high-quality adversarial prompts in each iteration. Furthermore, using a Reward Model to rank these mutations is more efficient than binary feedback, as it allows the system to recognize and iterate on "near-miss" prompts.
Transferability and Robustness
FERRET's custom Reward Model proved more robust than simple safety classifiers, which often lead to "overfitting" where prompts only trick one specific model. Notably, adversarial prompts discovered on smaller 7B models showed high "zero-shot" transferability to larger models, achieving a 62% ASR on Llama 3-70B and 50% on GPT-4o.
Conclusion
FERRET significantly advances automated red teaming by reducing the time to reach a 90% ASR by 15.2% compared to Rainbow Teaming. While current experiments focused on 7B-scale components, the framework's success in generating transferable attacks suggests it is a powerful tool for securing even the largest LLMs. Future work will focus on expanding harm categories and improving mutator creativity to further stress-test model boundaries.
Summary updated