Glossary
What is HarmBench? The Automated Red Teaming Benchmark
HarmBench is a standardized benchmark for automated red teaming and robust refusal, with 510 harmful behaviors and a classifier that judges attack success.
HarmBench is a standardized evaluation framework for automated red teaming of language models, with 510 harmful behaviors in seven semantic categories and a fine-tuned classifier that judges whether an attack succeeded.
Definition
HarmBench is a benchmark for comparing automated red-teaming attacks and the defenses against them on the same footing. It was introduced in HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal by Mantas Mazeika, Long Phan, Xuwang Yin, Andy Zou, Zifan Wang, Norman Mu, Elham Sakhaee, Nathaniel Li, Steven Basart, Bo Li, David Forsyth and Dan Hendrycks, published at ICML 2024. The site is harmbench.org and the code is on GitHub.
Before HarmBench, red-teaming papers used different behaviors, different success criteria and different generation settings, so their numbers could not be compared. HarmBench fixes all three.
What it contains
510 unique harmful behaviors, 400 text and 110 multimodal, split into 100 validation and 410 test behaviors.
Functional categories:
| Category | Behaviors | What it tests |
|---|---|---|
| Standard | 200 | Self-contained harmful requests |
| Contextual | 100 | A request plus a context string the attack must use |
| Copyright | 100 | Requests to reproduce copyrighted text |
| Multimodal | 110 | An image plus a text request |
Semantic categories: cybercrime and unauthorized intrusion; chemical and biological weapons and drugs; copyright violations; misinformation and disinformation; harassment and bullying; illegal activities; and general harm.
How it works
- An attack method (from hand-written templates to optimization-based attacks) generates test cases for each behavior against a target model.
- The target generates completions with fixed settings.
- A classifier judges each completion. For non-copyright behaviors the authors fine-tuned Llama 2 13B Chat, trained on distilled GPT-4 judgments, which agreed with human labels 93.19% of the time on average. Copyright behaviors use a hashing-based check for whether the protected text appears.
- The result is attack success rate (ASR): the share of behaviors where the attack produced a harmful completion.
The paper compared 18 red-teaming methods against 33 target LLMs and defenses, and introduced an adversarial training method (R2D2) that improved robustness to many of those attacks.
Example
A team evaluating a fine-tuned model runs HarmBench's standard behaviors with no attack, just the plain request. The classifier marks 12 of 159 completions as harmful, an ASR of 7.5%. They then run an optimization-based attack and ASR rises to 41%. The gap shows how much the model's safety depends on the attacker not trying hard.
The same data can be read the other way: the share of plain requests a model declines is its refusal rate on HarmBench. Arditi et al. (2024) used HarmBench's classifier and 159 standard behaviors to evaluate their refusal-removal method.
How it relates to Abliterator
Abliterator reports HarmBench refusal rates for DeepSeek V4.1 Flash Abliterated against the original model, on the same serving stack, with the chemical and biological category excluded (n=172): 84.9% → 0.6% (benchmarks). On Kimi K3.1 Pro Abliterated, the same measure went from 97.7% to 2.3% (model card). Both used Qwen3Guard-Gen-8B as the judge rather than HarmBench's own classifier, so compare them with other HarmBench numbers with care. To run HarmBench-style evals on your own model with Abliterator as the grader, see model evaluation.
Related terms
- JailbreakBench: a smaller benchmark that draws some behaviors from HarmBench.
- Red teaming: what HarmBench standardizes.
- Refusal rate: the inverse view of attack success on plain requests.
- XSTest: the over-refusal counterpart.
Frequently asked questions
Who made HarmBench?
Mantas Mazeika and 11 coauthors, with Dan Hendrycks as the last author; the code is published by the Center for AI Safety. The paper appeared at ICML 2024.
How does Abliterator use HarmBench?
Abliterator measured DeepSeek V4.1 Flash Abliterated against the original on HarmBench with the chemical and biological category excluded (n=172). The refusal rate fell from 84.9% to 0.6%.