Refusal in Language Models Is Mediated by a Single Direction
TL;DR. Across 13 open chat models from 1.8B to 72B parameters, refusing harmful requests depends on a single direction in the residual stream. Take the mean activation on harmful instructions minus the mean on harmless ones; projecting this direction out disables refusal, and adding it makes the model refuse harmless requests. The projection can be baked into the weights as a rank-one edit, giving a white-box jailbreak with almost no capability loss.
Why it matters now. This is the cleanest demonstration that a safety behaviour trained by RLHF can sit on one linear direction, and so can be removed by a simple weight edit. It also gives a template that transfers to IR and agent safety: find a behaviour direction by difference in means, test it with addition and ablation, then check what else it touches.
Key idea
Section titled “Key idea”Collect activations at each post-instruction token position and layer for harmful instructions and harmless instructions :
the difference in means. Pick one candidate on a validation set: minimise the refusal score under ablation (bypass), require that adding it induces refusal, require KL < 0.1 on harmless prompts when ablated, and require (App. C).
Three interventions with the unit vector:
for every matrix (and bias) that writes to the residual stream. Because the stream is a sum of these writes, orthogonalising all of them is equivalent to ablating the direction everywhere at inference time (App. E).
Key results
Section titled “Key results”- Setup (§2–3). 128 harmful (AdvBench, MaliciousInstruct, TDC2023, HarmBench) and 128 harmless (Alpaca) training prompts, 32 of each for validation. Evaluation on 100 JailbreakBench prompts with greedy decoding up to 512 tokens. Models: Qwen, Yi, Gemma, Llama-2 and Llama-3 chat models.
- Bypass and induce (§3). Ablating the direction sharply lowers refusal and safety scores on harmful prompts across all 13 models; adding it makes models refuse harmless requests.
- HarmBench ASR, orthogonalised models (§4.2, Table 2; default system prompt, without system prompt in parentheses). Llama-2 7B 22.6 (79.9), 13B 6.9 (61.0), 70B 4.4 (62.9); Qwen 7B 79.2 (74.8), 14B 84.3 (74.8), 72B 78.0 (79.2). GCG for comparison: 34.5 on Llama-2 7B and 79.5 on Qwen 7B.
- Capabilities (§4.3, Table 3). MMLU, ARC and GSM8K stay close to the original models; TruthfulQA drops, e.g. Llama-3 70B 61.8 → 59.5, Yi 34B 55.4 → 51.9, Gemma 7B 47.1 → 44.7.
- Adversarial suffixes (§5, Qwen 1.8B). A GCG suffix lowers the activation’s cosine with the refusal direction to the level of harmless prompts; the top eight heads by direct contribution shift attention from the instruction to the suffix.
Limitations & open questions
Section titled “Limitations & open questions”- Direction extraction is heuristic (difference in means plus filters); the best direction may not be unique.
- The suffix analysis covers one suffix on one model.
- What the direction means is unclear: it could encode harmfulness, the decision to refuse, or both (§7).
- The method needs white-box access; it says nothing about closed models, but it lowers the cost of removing safety from any open-weight release.
Connections
Section titled “Connections”- Activation addition is the steering method used for the “induce” direction.
- Representation engineering reads and controls concepts with similar population-level directions.
- Linear representation hypothesis gives the theory for why a difference of means can act as a causal direction.
- MLLMs fail to refuse when using tools shows refusal weakening in agentic settings, a natural place to test this direction.
- Weight-space programming uses the same projection edit, (I − uuᵀ)W, to remove a looping direction from MLP columns.
- Auditing hidden objectives looks for hidden behaviours that might sit on directions like this one.
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
Let the candidate refusal direction be r = (3, 4) and a residual vector x = (1, 2). (a) Compute the unit direction, the directional ablation x′ = x − r̂r̂ᵀx, and check that r̂ᵀx′ = 0. (b) Show that orthogonalising an output matrix, W′ = W − r̂r̂ᵀW, gives the same result as ablating every write of W.
What a strong answer covers
- (a) ‖r‖ = 5, so r̂ = (0.6, 0.8). r̂ᵀx = 0.6 + 1.6 = 2.2. x′ = (1, 2) − 2.2·(0.6, 0.8) = (−0.32, 0.24). Check: 0.6·(−0.32) + 0.8·0.24 = −0.192 + 0.192 = 0.
- (b) For any input h, W′h = Wh − r̂r̂ᵀWh = (I − r̂r̂ᵀ)(Wh), which is exactly the ablation of the vector W writes.
- The residual stream is a sum of writes (embeddings, attention outputs, MLP outputs, biases). Projection is linear, so projecting every write equals projecting the sum, and the stream never gains a component along r̂.
- That is why the paper orthogonalises the embedding, positional embedding, attention-out, MLP-out matrices and biases, and shows this matches inference-time ablation at every layer and position (App. E).
- Mechanism
The direction is chosen from candidates r_i^(l) = μ − ν over post-instruction positions i and layers l using three validation scores. Explain what each filter guards against, including the l < 0.8L rule.
What a strong answer covers
- bypass_score: refusal metric on harmful validation prompts under ablation of the candidate; the chosen direction minimises it (ablation should stop refusal).
- induce_score > 0: adding the candidate to harmless prompts must induce refusal, so the direction is sufficient and not just necessary.
- kl_score < 0.1: ablating it on harmless prompts must barely change the next-token distribution, so it does not damage general behaviour.
- l < 0.8L: a direction too close to the unembedding could suppress refusal tokens such as "I cannot" directly, which would be a trivial output-level effect rather than a representation of refusal.
- Critique
Orthogonalised models keep MMLU, ARC and GSM8K roughly unchanged, but TruthfulQA drops (e.g. Llama-3 70B 61.8 → 59.5, Yi 34B 55.4 → 51.9). The authors also note the direction might encode "harmfulness" rather than refusal. Design an experiment that separates these two readings.
What a strong answer covers
- The TruthfulQA drop suggests the direction overlaps with something used for cautious or truthful answers, not only refusing harmful requests.
- If the direction encodes harm detection, ablating it should also weaken the model's ability to classify or describe harmfulness when asked directly; if it encodes the refusal decision, classification should survive.
- Use prompts that are harmful but where refusal is not expected (e.g. "Is this request harmful? Answer yes or no") and harmless prompts with refusal-style instructions, and measure both under ablation.
- Also check a linear probe for harmfulness trained on the ablated stream: if harm stays decodable, the removed direction was mainly the refusal decision.
- What if…
Compare the three interventions (activation addition at one layer, directional ablation at all layers, weight orthogonalisation) and the HarmBench results against GCG. What do the Llama-2 numbers with and without a system prompt tell you?
What a strong answer covers
- Activation addition at layer l* induces refusal on harmless prompts; ablation and orthogonalisation remove refusal on harmful prompts.
- Orthogonalisation is a weight edit, so it is a permanent white-box jailbreak that needs no prompt optimisation.
- HarmBench ASR for Llama-2 7B: 22.6 with the default system prompt vs 79.9 without; for Qwen 7B, 79.2 vs 74.8. GCG on Llama-2 7B reaches 34.5.
- The large Llama-2 gap shows the system prompt engages refusal through more than this one direction, so "single direction" holds best without it.
- Research idea
Section 5 shows that an adversarial suffix lowers the cosine between the activations and the refusal direction and shifts top heads' attention from the instruction to the suffix. Propose how to use the same tools to study prompt injection in a retrieval-augmented agent.
What a strong answer covers
- Find a "follow-instruction-from-user vs from-retrieved-document" direction by difference in means over prompts where an instruction appears in the user turn vs inside a retrieved passage.
- Measure projection onto that direction and onto the refusal direction when injected passages are retrieved.
- Use direct feature attribution on attention heads to see whether injection shifts attention from the user instruction to the passage, mirroring the suffix result.
- Test causally: ablate or add the direction and measure injection success rate and task accuracy on clean retrieval.
- Design
A team wants to release an open-weight retrieval-augmented assistant and asks whether this paper changes their safety plan. Hypothetical exercise constraints: two engineer-weeks before release, one 8-GPU node for evaluation, and a held-out set of 500 harmful and 500 harmless prompts. Give concrete recommendations: which interventions (orthogonalisation red-teaming, external classifiers, retrieval filtering) you fund within the budget, and how each compares with relying only on a safety system prompt.
What a strong answer covers
- Any open-weight model can be orthogonalised with a few hundred prompts and a forward pass per candidate, so weight-level refusal cannot be the only safeguard.
- Add safeguards that are not inside the released weights: input and output classifiers, tool permissions, and retrieval-side filtering.
- Measure refusal robustness after orthogonalisation as part of release evaluation, the way the paper reports refusal and safety scores.
- Do not rely on a single benchmark: report both substring-based refusal and a classifier-based safety score, since they diverge.
- Prioritise within the budget: an orthogonalisation red-team run on the release checkpoint is cheap (a forward pass per candidate direction), so it comes first; external classifiers protect hosted deployments but not downloaded weights, which a system prompt cannot protect either.