Safety training for language models currently hardens a model against whatever its own red teamer finds. A red teamer here is an automated system that writes prompts meant to make the model produce harmful output. The result is a model that resists those particular attacks and then falls over when given a structurally different one. We propose to choose adversarial training data by a different criterion: how many other models an attack also breaks. Attacks that succeed across many unrelated models likely exploit internal features those models share. Attacks that succeed on only one model likely exploit that model's quirks. If that is right, training a model to resist the widely transferring attacks should buy robustness against attack families it never saw, at the same data and compute budget.
The claim matters because the threat that is hardest to rate-limit is the zero-query transfer attack. An adversary crafts a jailbreak offline on a freely available open model and then fires it once at a deployed system. Recent evidence says such transfer is not random. It follows representational similarity between models, and persona-style attacks transfer while tokenizer-specific cipher attacks do not (Jailbreak Transferability Emerges from Shared Representations). That makes "transfers widely" a measurable, cheap signal for "hits a shared weakness." The open question is whether the signal can serve to choose training data.
Core Claim
Inside a closed-loop adversarial training pipeline, a red-team prompt's transfer score is its average harmfulness when replayed, unchanged, against a frozen panel of diverse open models. Weighting the defender's training examples by this score yields better robustness to held-out attack families and to zero-query transfer attacks than weighting by success on the defender alone. This holds at a matched number of training examples and matched attacker compute, and without extra over-refusal. Concretely, for a candidate attack $a$ and a panel of $K$ surrogate models, we define
$$T(a) = \frac{1}{K}\sum_{k=1}^{K} s_k(a),$$
where $s_k(a)\in[0,1]$ is the StrongREJECT score of surrogate $k$'s response to $a$. StrongREJECT is a rubric that multiplies non-refusal by how specific and convincing the harmful content is (A StrongREJECT for Empty Jailbreaks). Using that rubric rather than refusal-string matching keeps "empty jailbreaks" from inflating $T$. An empty jailbreak is a response that agrees to help but contains nothing usable.
The mechanistic motivation comes from two papers. Souly et al. show that distilling only benign behavior from one model into another raises their representational similarity, for example from 0.28 to 0.42 for Gemma-27B into Qwen2.5-14B, and the student inherits the teacher's jailbreaks. Stevinson et al. show in controlled settings that models trained on data with shared feature correlations end up with the same pattern of overlapping features. In that setting attack transfer rises from 5% to 98% (Adversarial Vulnerability from Interference Between Features in Superposition). Both describe why transfer happens. Neither turns transfer into a training signal, and that is what we do.
Research Program
The pipeline builds on the online attacker–defender game of AdvGame (Safety Alignment of LMs via Non-cooperative Games). In that game an attacker language model and a defender language model are trained jointly with pairwise preference optimization, with averaged weights for stability. We keep its preference-based defender updates, since the authors report that a policy-gradient variant (GRPO) was unstable. We change two things.
First, every candidate attack the attacker produces is also replayed against a frozen panel of open models. The panel is drawn from the Llama, Gemma and Qwen families studied by Souly et al., and the defender's own base model is excluded. Second, the defender's training batch is built by sampling candidates in proportion to a mixture of defender success and $T(a)$. The mixture weight $\lambda$ is a dial we sweep, where $\lambda=0$ recovers ordinary target-only selection.
Following WildTeaming (WildTeaming at Scale), every selected harmful attack is paired with a matched adversarial-but-benign prompt of similar form. This keeps the defender from learning "refuse anything persona-shaped." Without the pairing, over-refusal would confound every result.
We also measure representations. Using the mutual nearest-neighbor similarity of Souly et al., we track the defender's similarity to each panel model on benign prompts and on harmful prompts, before and after training. The hope is that transfer-weighted training lowers similarity specifically on harmful-intent inputs while leaving benign similarity, and with it utility, intact. That would be evidence the method edits the shared vulnerable features rather than making the model generically different.
The defender is Qwen2.5-7B, chosen so that our numbers sit directly next to AdvGame's reported ones. The attack pool used for training comes from the attacker model plus WildJailbreak seeds.
Evaluation uses attack families that are withheld from training. The first is GCG token suffixes as used in HarmBench (HarmBench). The second is logprob-guided random search with in-context and prefilling templates (Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks). The third is multi-turn agentic dialogues from GOAT (Automated Red Teaming with GOAT). The fourth is cipher attacks.
Separately, a zero-query transfer suite is crafted on open models that are not in the training panel and is replayed once against the defender. Safety is scored with the HarmBench classifier and with StrongREJECT. Over-refusal is measured on XSTest. Utility is measured on MMLU and AlpacaEval2.
Baselines
The naive reference point is the untouched Qwen2.5-7B instruct model. AdvGame reports a HarmBench attack success rate of 31.6% for it.
The strongest existing method is AdvGame-DPO-MD, which reports 4.7% HarmBench attack success on Qwen2.5-7B (Safety Alignment of LMs via Non-cooperative Games). It is the right competitor because it is already an online red-teamer-in-the-loop defense on the same model. Our method is literally AdvGame plus transfer-weighted selection. We will reimplement it with identical attacker and defender initializations, the same number of defender updates and the same number of training examples. Its attacker also gets extra generation queries equal to the inference cost we spend replaying attacks on the panel, so that panel compute cannot explain any gain.
On the in-distribution HarmBench number, beating AdvGame is not the bar. Matching 4.7% within noise is enough there. The bar is lower attack success on the held-out families and on the zero-query transfer suite, with XSTest over-refusal no worse.
The second baseline is static WildJailbreak safety fine-tuning on the same number of examples. WildTeaming reports an 85.1% relative improvement on HarmBench over standard instruction tuning, and we found no absolute per-model number on Lacuna for the Qwen2.5-7B setting. This baseline tests whether closed-loop generation matters at all.
The third is R2D2, adversarial training against GCG only. It serves as a known negative reference, since Andriushchenko et al. report it collapsing to 100% attack success under in-context adversarial framing.
Two ablations isolate the key ingredient, and both use the same pipeline and budget. The first is random selection, which keeps the panel compute but ignores $T$. The second is diversity-matched selection, which picks examples to cover the same spread of attack tactics as the transfer-weighted set but chooses among them without using $T$.
Why not just…?
Why not just train on a bigger, more diverse mix of attacks? This is the most serious threat. Transfer weighting might simply be an indirect route to diversity, since an attack that breaks many models may just be an unusual one. The diversity-matched ablation settles this. If it matches transfer-weighted selection on held-out families, the claim is wrong and we will report it as such. The evidence that tactic diversity alone is not sufficient is suggestive rather than decisive. WildJailbreak's training mix spans 5.7K mined tactics, yet the paper does not test against adaptive attacks or multi-turn agents.
Why not just optimize each attack against an ensemble of surrogates, as transfer attacks in vision do? Ensemble optimization produces stronger transferring attacks, but it changes the attacker, not which examples the defender learns from. It also costs gradient or logprob access to every surrogate inside the inner loop. We include an ensemble-optimized attacker as an additional condition. If it beats transfer-selection at equal compute, the simpler recipe wins and the proposal reduces to "use an ensemble attacker." That would still be a useful finding, but a different one.
Why not just distill safety from a larger, hardened model? Souly et al. show that benign distillation makes the student represent inputs like the teacher and inherit the teacher's jailbreaks. Distillation therefore moves the student toward a shared vulnerable geometry. Our representation measurements test the opposite movement. We will also run one distillation condition, from a Llama-3-70B-class teacher, on the zero-query transfer suite for direct comparison.
Why not just add system-prompt guardrails or an input paraphraser? The file's evidence is strongly against this. Leading models with strict system instructions reached 100% attack success under simple adaptive attacks (Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks). Input transformations also degraded benign MMLU performance (A StrongREJECT for Empty Jailbreaks). We therefore treat these as context and do not run them as baselines.
Decisive Experiments
The first check is the per-example prediction underlying the whole idea. We split the attack pool into bins by $T(a)$ and fine-tune separate defender copies on equal-size subsets from each bin. If $T$ captures something real, held-out-family attack success should fall as the bin's transfer score rises. If the curve is flat, the idea fails regardless of headline numbers.
The second is the main matched-budget comparison against AdvGame and the two selection ablations, on held-out families and on the zero-query suite. This is run over three seeds, with a $\lambda$ sweep to expose the tradeoff with in-distribution robustness.
The third guards against a quieter failure: high-transfer attacks might be crude, keyword-heavy prompts. Selecting on them would then mainly teach over-refusal. We check this through XSTest and through the StrongREJECT specificity component of the selected set.
The last tests whether the persona-versus-cipher split from Souly et al. reappears in our gains. Cipher attacks transfer poorly, so they should receive low $T$. Our prediction is improvements on persona and multi-turn attacks with little change on cipher attacks. If that pattern holds, it ties the method to the shared-representation mechanism rather than to a tuning artifact.
References
- Jailbreak Transferability Emerges from Shared Representations
- A StrongREJECT for Empty Jailbreaks
- Adversarial Vulnerability from Interference Between Features in Superposition
- Safety Alignment of LMs via Non-cooperative Games
- WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Models
- HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal
- Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks
- Automated Red Teaming with GOAT: the Generative Offensive Agent Tester