Learning diverse attacks on large language models for robust red-teaming and safety tuning
Abstract
Domain fit: AI-core · Core AI workload signals detected from paper context and implementation/artifact evidence.
Red-teaming, or identifying prompts that elicit harmful responses, is a critical step in ensuring the safe and responsible deployment of large language models (LLMs). Developing effective protection against many modes of attack prompts requires discovering diverse attacks. Automated red-teaming typically uses reinforcement learning to fine-tune an attacker language model to generate prompts that elicit undesirable responses from a target LLM, as measured, for example, by an auxiliary toxicity classifier. We show that even with explicit regularization to favor novelty and diversity, existing approaches suffer from mode collapse or fail to generate effective attacks. As a flexible and probabilistically principled alternative, we propose to use GFlowNet fine-tuning, followed by a secondary smoothing phase, to train the attacker model to generate diverse and effective attack prompts. We find that the attacks generated by our method are effective against a wide range of target LLMs, both with and without safety tuning, and transfer well between target LLMs. Finally, we demonstrate that models safety-tuned using a dataset of red-teaming prompts generated by our method are robust to attacks from other RL-based red-teaming approaches.
Results and benchmarks
Red-teaming, or identifying prompts that elicit harmful responses, is a critical step in ensuring the safe and responsible deployment of large language models (LLMs).
Benchmark evidence is limited
Evidence graph: 2 refs, 1 links.
Utility signals: depth 60/100, grounding 58/100, status medium.
Implementation
Historical official implementation (not recommended for new builds)
Only a historical official implementation is available
Use with caution for new projects; verify against current tooling and maintained community alternatives.
GFNOrg/red-teaming · 15 stars · Last push Aug 30, 2026
Only historical official repository was found (GFNOrg/red-teaming).
Open GFNOrg/red-teaming- Only historical official implementation is available
- No direct maintained implementation is currently verified.
- Only historical official repository was found: GFNOrg/red-teaming.
- No maintained paper-verified implementation met reliability thresholds.
Reproduction readiness
Setup required
Dependencies pinned, manual setup needed
- GFNOrg/red-teaming has requirements.txt but requires manual environment setup.
- No Dockerfile, so you will set up the environment manually.
- No CI pipeline, so test coverage is unknown.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Quick start
git clone https://github.com/GFNOrg/red-teaming.git
pip install -r requirements.txt Validation caveat
Hugging Face artifacts
No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.
Tip: start with models, then check datasets and spaces if you need evaluation data or demos.
Research context
Tasks
None detected
Methods
Reinforcement learning
Domains
Natural Language Processing, Large Language Models
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.
Data includes links from Papers with Code ( CC-BY-SA-4.0 ).