Quality-Diversity Red-Teaming: Automated Generation of High-Quality and Diverse Attackers for Large Language Models

Ren-Jian Wang, Ke Xue, Zeyu Qin, Ziniu Li, Sheng Tang +3 more
6/8/2025
cs.LGcs.AIcs.NE

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Ensuring safety of large language models (LLMs) is important. Red teaming--a systematic approach to identifying adversarial prompts that elicit harmful responses from target LLMs--has emerged as a crucial safety evaluation method. Within this framework, the diversity of adversarial prompts is essential for comprehensive safety assessments. We find that previous approaches to red-teaming may suffer from two key limitations. First, they often pursue diversity through simplistic metrics like word frequency or sentence embedding similarity, which may not capture meaningful variation in attack strategies. Second, the common practice of training a single attacker model restricts coverage across potential attack styles and risk categories. This paper introduces Quality-Diversity Red-Teaming (QDRT), a new framework designed to address these limitations. QDRT achieves goal-driven diversity through behavior-conditioned training and implements a behavioral replay buffer in an open-ended manner. Additionally, it trains multiple specialized attackers capable of generating high-quality attacks across diverse styles and risk categories. Our empirical evaluation demonstrates that QDRT generates attacks that are both more diverse and more effective against a wide range of target LLMs, including GPT-2, Llama-3, Gemma-2, and Qwen2.5. This work advances the field of LLM safety by providing a systematic and effective approach to automated red-teaming, ultimately supporting the responsible deployment of LLMs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2025qualitydiversity,
  title  = {Quality-Diversity Red-Teaming: Automated Generation of High-Quality and Diverse Attackers for Large Language Models},
  author = {Ren-Jian Wang and Ke Xue and Zeyu Qin and Ziniu Li and Sheng Tang and Hao-Tian Li and Shengcai Liu and Chao Qian},
  year   = {2025},
  eprint = {2506.07121},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.07121v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.07121.svg)](https://codeofpaper.com/paper/2506.07121)

Discussion