Standardizing red-teaming evaluations across 18 attack methods and 33 models reveals two uncomfortable results: no attack or defense works uniformly across targets, and larger models are no harder to jailbreak than smaller ones in the same model family. Mazeika et al. introduce HarmBench to fix fragmented, incomparable safety benchmarks and pair it with an efficient adversarial training method, R2D2, that cuts gradient-based attack success rates on Zephyr 7B from 69.4% to 6.3% on the test split while leaving black-box multi-turn attacks largely effective.

  • 510 curated behaviors: Split into 200 standard, 100 contextual, 100 copyright, and 110 multimodal prompts across 7 semantic harm categories, with a held-out 100 validation / 410 test split.
  • 0% Google searchability on contextual tasks: Compared to 50% for AdvBench and 55% for MaliciousInstruct, contextual behaviors require model synthesis rather than copy-pasteable web answers, yet elicit higher attack success rates (75.4% vs. 71.9% mean GCG ASR on open-source models).
  • Judge alignment jumps to 93.19%: HarmBench’s distilled Llama 2 13B test classifier beats GPT-4-PAIR (88.37%) and AdvBench substring matching (69.93%) on human agreement, and hits 95.7% on adversarial prequalification traps.
  • Size independence: Across 7B to 70B parameters in Llama 2 Chat, Qwen Chat, Vicuna, Baichuan 2, Koala, and Orca 2, attack success rates stay nearly flat within families while diverging sharply across training pipelines.

Why prior red-teaming benchmarks broke

Earlier automated red-teaming papers used at least nine non-overlapping evaluation setups, making cross-paper rankings unreliable. Mazeika et al. show that a single unstandardized parameter, the target generation length, can swing substring-matching attack success rate (ASR) by up to 30 percentage points. Worse, several prior studies optimized attacks directly against the same GPT-4 judge used at test time, inflating reported gains.

HarmBench enforces three design rules to restore comparability: greedy decoding fixed at 512 tokens, a strict separation between a 100-behavior validation set (paired with a Mistral 7B validation classifier) and a 410-behavior test set, and prequalified judges. On three trap sets, completions that start with a refusal before complying, random benign text, and unrelated harms, AdvBench’s refusal-substring detector scores just 32.0% average accuracy, whereas HarmBench’s distilled Llama 2 13B classifier reaches 95.7%. For copyright prompts, HarmBench avoids ambiguous LLM intent judgments and applies a MinHash overlap check against hashed copyrighted passages.

Three standardization fixes in HarmBench vs. prior red-teaming setups
Breadth and differential harm
Expands from 40 to 100 standard prompts to 510 behaviors across text and images. Contextual tasks have 0% 10-minute Google searchability vs. 50% in AdvBench.
Locked decoding and splits
Fixes greedy generation at 512 tokens (removing 30-point length swings) and isolates 100 validation behaviors from 410 held-out test behaviors.
Prequalified open judges
Replaces brittle substring rules (69.93% human agreement) with a distilled Llama 2 13B test judge (93.19% agreement) plus MinHash copyright matching.

Source: Mazeika et al. (2024), Sections 3.2, 4.1, and Table 3.

Key findings across 18 attacks and R2D2 adversarial training

Evaluating 24 open-source models and 9 closed-source APIs exposes sharp asymmetries between optimization strategies. On all test behaviors, white-box GCG averages 54.2% ASR across open-source targets, while evolutionary AutoDAN averages 52.8% and tree-search PAIR / TAP reach 41.0% and 45.4% across all tested models. Yet Llama 2 Chat models resist AutoDAN almost completely (0.0% to 2.8% test ASR) while still breaking under GCG (30.3% to 39.1%). Conversely, GPT-4 Turbo 1106 holds direct requests to 9.7% and human jailbreaks to 2.6%, but falls to 57.7% under TAP-Transfer.

To test whether automated attacks can harden models during fine-tuning, the authors introduce Robust Refusal Dynamic Defense (R2D2). Instead of static safety datasets or slow per-batch GCG restarts (20 minutes per prompt on a 7B model), R2D2 maintains a persistent pool of 180 adversarial prompts updated for 5 GCG steps per batch, resetting 20% of the pool every 50 iterations, and trains Mistral 7B with a combined loss: pushing probability away from harmful targets, toward a fixed refusal string, and preserving capability via UltraChat SFT over 500 steps (16 hours on 8xA100).

Test-split Attack Success Rate across attack families (%, lower is better)
GCG (gradient suffix)Zephyr 7B: 69.4% | Llama 2 13B: 30.3% | R2D2: 6.3%
AutoDAN (genetic template)Zephyr 7B: 75.6% | Llama 2 13B: 0.9% | R2D2: 17.2%
PAIR (iterative LLM attacker)Zephyr 7B: 59.1% | Llama 2 13B: 14.7% | R2D2: 47.8%
TAP (tree-search LLM attacker)Zephyr 7B: 67.8% | Llama 2 13B: 14.1% | R2D2: 61.9%
Zephyr 7B (unhardened baseline)Llama 2 13B ChatZephyr 7B + R2D2

Source: Mazeika et al. (2024), Table 7 (Test Behaviors, all categories).

On GCG across standard test behaviors, R2D2 drives ASR all the way down to 0.0%, and its combined GCG-family ASR is 4x lower than Llama 2 13B Chat while holding MT-Bench at 6.0 (versus 6.5 for Mistral 7B Instruct v0.2 and 5.4 for Koala 13B). Yet R2D2 barely moves the needle on TAP (61.9%) and PAIR (47.8%), attacks whose natural-language paraphrasing looks nothing like the GCG token suffixes seen during training.

Caveats and builder takeaway

HarmBench intentionally evaluates model-level defenses rather than external input/output filters (Claude 2.1’s 2.6% GCG-T ASR and Gemini Pro’s 18.0% include API-side filtering that researchers could not disable). Attack comparisons also swapped closed-source attacker models for Mixtral 8x7B to normalize compute costs, which can understate the ceiling of black-box LLM attackers. Finally, R2D2 was trained over Zephyr’s SFT pipeline without DPO, and HarmBench does not systematically measure benign over-refusal alongside MT-Bench capability.

For builders, the operational lesson mirrors findings in baseline defenses and circuit-breaker reassessments: never trust a single red-teaming method or assume scaling up to a 70B checkpoint improves refusal robustness. Test across qualitatively different attack classes (gradient optimization, genetic templates, iterative LLM paraphrasers, and contextual prompts) and pair model-level training with system-level filters and permission checks.