Skip to content
OpenTrain AIFor AI Companies

Learning diverse attacks on large language models for robust red-teaming and safety tuning

Seanie Lee, Minsu Kim, Lynn Cherif, David Dobre, Juho Lee +6 morePublished May 28, 2024
arXiv PDF
Researcher verdict
Starting point
Use as implementation starting point
Benchmark evidence
Missing
Not verified yet
Time to first repro
A few days
Plan setup time
Risk flags
1
Review before use

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

Freshness tier: cold
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).

Implementation

Historical official implementation (not recommended for new builds)

Why this implementation
Confidence: low

Only historical official repository was found (GFNOrg/red-teaming).

Open GFNOrg/red-teaming
Reproduction risks
  • 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

Time to first repro: days
Last checked: Oct 27, 2026

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.
Open GFNOrg/red-teaming

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

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

Evaluation and human feedback data

Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.

Open in HFEPX
Explore similar papers

Jump to Paper2Code search queries derived from this paper's research context.

Data includes links from Papers with Code ( CC-BY-SA-4.0 ).