Quality-Diversity Evolution for Discovering Diverse Vulnerabilities in LLM Safety

Subhadip Mitra
5/30/2026
cs.CRcs.CLcs.ET

Official code: bassrehab/red-queen (3 stars, AGPL-3.0, Rust, last commit 2026-03-16).

Abstract

Current approaches to LLM adversarial testing suffer from coverage gaps: manual red-teaming does not scale, LLM-as-attacker methods exhibit mode collapse, and gradient-based approaches produce uninterpretable gibberish. We introduce a quality-diversity evolutionary framework that operates at the semantic level, evolving interpretable attack strategies rather than token sequences. Using MAP-Elites, we maintain a diverse archive of attacks across behavioral dimensions (strategy type, encoding method, prompt length). In experiments across GPT-4o-mini, Claude 3.5 Sonnet, Gemini 2.0 Flash, and an open-weight coding model (Devstral-small-2), we discover distinct vulnerability profiles: GPT-4o-mini is vulnerable to hypothetical and multi-turn framing combined with ROT13 encoding (fitness 0.8), Gemini to direct attacks with ROT13 and multi-turn with Leetspeak (0.8), while Claude shows uniformly ambiguous responses across all strategies (max 0.4). The semantic representation produces interpretable attacks that reveal systematic, model-specific weaknesses, providing actionable insights for improving LLM safety and a reproducible baseline for evaluating future frontier models. Code and experiment artifacts are released at https://github.com/bassrehab/red-queen.

View on arXivView PDF

Code Implementations(1)

RustAGPL-3.0

Evolutionary adversarial testing framework for AI safety using quality-diversity search to discover interpretable, transferable vulnerabilities across LLMs.

31RustJan 10, 20267 months agoAGPL-3.0
adversarial-testingai-agentsai-safetyevolutionary-algorithmsfoundation-models+6 more

Similar Papers

Cite this paper

@article{mitra2026qualitydiversity,
  title  = {Quality-Diversity Evolution for Discovering Diverse Vulnerabilities in LLM Safety},
  author = {Subhadip Mitra},
  year   = {2026},
  eprint = {2606.00801},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.00801v1}
}

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/2606.00801.svg)](https://codeofpaper.com/paper/2606.00801)

Discussion