Remapping harmful internal activations to an orthogonal direction cuts average attack success rates by 90% on Llama-3-8B-Instruct (38.1% to 3.8%) and 87% on Mistral-7B-Instruct-v2 (76.7% to 9.8%) across unseen jailbreaks, with under 1% drop on MT-Bench and OpenLLM benchmarks. Andy Zou and colleagues at Gray Swan AI, Carnegie Mellon University, and the Center for AI Safety call this method Representation Rerouting (RR), a circuit breaker trained directly on hidden states via LoRA in 20 minutes on a single A100-80GB GPU.

  • Outperforms adversarial training at a fraction of the cost: Mistral-7B adversarially trained against GCG (R2D2) still hits 31.7% average attack success (failing on TAP-T at 68.7% and PAIR at 59.9%) and drops MT-Bench from 7.60 to 6.00; Mistral + RR holds 7.53 MT-Bench and 65.4 OpenLLM (65.4 baseline) at 9.8% average attack success.
  • Resists white-box prefilling and embedding attacks: Standard Llama-3-8B-Instruct complies 84.9% under prefilling, 80.4% under soft input embedding optimization, and 91.2% under RepE steering; + RR cuts those to 3.3%, 9.6%, and 8.7%, and the extended Cygnet model hits 0.8% average ASR (0.0% on 9 of 10 settings) while raising MT-Bench to 8.21.
  • Transfers to multimodal PGD and tool-calling agents: On LLaVA-NeXT-Mistral-7B, RR slashes white-box PGD image-hijack compliance from 91.0% (96.2% with a safety prompt) to 14.3% while keeping MMMU (34.2 vs. 34.7) and LLaVA-Wild (79.3 vs. 79.2) intact; on Llama-3-8B agents, forced function-call harm drops from 82% to 14% while BFCL improves from 74.8 to 76.0.
  • Low benign over-refusal: On 500 non-toxic WildChat prompts, refusal shifts modestly from 2.0% to 3.4% on Mistral-7B (vs. 10.6% for R2D2) and 2.2% to 6.2% on Llama-3-8B (vs. 20.6% on Claude-3-Opus).
Average HarmBench attack success rate across 10 threat models (%, lower is better)
Model variantAvg. ASR · MT-Bench
Mistral-7B-Instruct-v2 (Refusal Trained)76.7% · 7.60
Mistral-7B Adv Trained (R2D2)31.7% · 6.00
Mistral-7B-Instruct-v2 + RR (Ours)9.8% · 7.53
Llama-3-8B-Instruct (Refusal Trained)38.1% · 8.05
Llama-3-8B-Instruct + RR (Ours)3.8% · 8.00
Cygnet (Llama-3-8B + RR + RepE control)0.8% · 8.21

Bars show HarmBench average ASR (%) across No Attack, Manual, AutoDAN, TAP-T, PAIR, GCG, Multilingual, Prefilling, Input Embed, and RepE Attack. Source: Zou et al. (2024), Table 1.

How It Works

Standard RLHF and adversarial training supervise only output tokens, leaving the model’s internal harmful states intact behind a thin refusal boundary. Once an attack slips past that boundary (for example, by prefilling "Sure, here's how..."), autoregressive decoding completes the harmful trajectory. Building on Representation Engineering (RepE) and Low-Rank Representation Adaptation (LoRRA), RR attacks the trajectory itself across intermediate layers 10 and 20 using LoRA adapters inserted across layers 0 through 20 for 150 training steps.

Training alternates between two curated sets: a Circuit Breaker Set D_s (synthetic harmful queries and completions filtered below 0.3 BLEU against HarmBench, plus stripped harmful assistant continuations so models that already refuse still traverse the circuit-broken states) and a Retain Set D_r (UltraChat, XSTest exaggerated-refusal prompts, and extra refusal examples for Llama-3). The loss combines ReLU(cosine_sim(rep_M(x_s), rep_{M_cb}(x_s))) to push harmful states orthogonal to the frozen original model M with an L2 retain penalty ||rep_M(x_r) - rep_{M_cb}(x_r)||_2, scheduled linearly over t = 1..T via c_s = alpha(1 - t / 2T) and c_r = alpha(t / 2T). When a harmful process triggers in the wild, hidden-state cosine similarity plunges and activation norms spike around layer 10 to 20, collapsing completion into repeated <EOS> tokens or incoherent text before dangerous details emerge.

Two-loss Representation Rerouting schedule across training sets
Circuit Breaker Set D_s

Minimizes ReLU(cos(rep_M(x_s), rep_cb(x_s))) at layers 10 and 20. Forces harmful representations orthogonal without needing a fixed target vector.

Retain Set D_r

Minimizes L2 drift ||rep_M(x_r) - rep_cb(x_r)||_2 on UltraChat, XSTest, and refusal pairs (c_r ramps up as c_s ramps down over 150 steps).

Source: Zou et al. (2024), Algorithm 1, Section 3, and Appendix C.2.1.

Key Findings

  • Orthogonal cosine loss beats random-vector baselines: In Llama-3-8B ablations across six attacks, centering random vectors (RandC) and unlearning (RMU) failed to converge, while positive random-vector targeting (RandP) left 9.7% average ASR vs. 2.5% for RR at identical 8.0 MT-Bench. Removing refusal examples from D_r lowered ASR to 0.6% but dropped MT-Bench to 7.7.
  • Representation control outperforms reading probes: At matched WildChat false-positive rates (3.4% Mistral, 6.2% Llama-3), token-level Harmfulness Probes cut five-attack average ASR from 80.6% to 19.0% (linear) and 14.3% (MLP) on Mistral, and from 32.6% to 9.0% and 6.8% on Llama-3, still trailing RR (11.2% and 3.1%).
  • Category coverage governs generalization: Splitting D_s into six harm categories shows broad sets like Illegal Activities generalize well (8.2% ASR on Misinfo, 15.3% on Harmful), whereas narrow training on Cybercrime leaves 47.2% ASR on Harmful and 80.1% on Misinfo.

Caveats and Builder Takeaway

Circuit breakers target generically harmful generation rather than non-harmful classification errors such as standard image-label PGD attacks, and all experiments focus on single-turn prompts rather than long multi-turn jailbreaks. Crucially, a subsequent circuit-breaker robustness reassessment by Schwinn et al. showed that stronger white-box continuous embedding-space attacks can still achieve 100% ASR against open-weight circuit-broken models, underscoring that open-weight threat models differ sharply from API deployments.

For engineers shipping tool-using systems (see also AgentDojo security and single-direction refusal), RR is a low-cost (20-minute LoRA) defense-in-depth layer that sharply raises the bar against prefilling, multilingual, and multimodal hijacks without taxing benign latency, provided you pair it with strict permission boundaries around external tools.