Skip to content
InteractiveLive

The geometry of refusal: where a language model decides to say no

Somewhere in the middle of a chat model, the residual stream decides whether to help you or say "I can't." A rotatable globe and measured numbers from the papers' own code show one refusal direction, a separate harmfulness direction, and where the 3D picture stops being a good guide.

Published
Topics
  • Interpretability
  • AI safety
  • Refusal
  • Steering
  • Interactive

Belief and behaviour are different axes

Arditi et al. (2024) showed that refusal in chat models is controlled by a single direction in the residual stream, found by subtracting mean activations on harmless prompts from those on harmful ones. Remove it and the model answers anything; add it and the model refuses harmless requests.

Zhao et al. (2025) showed that this direction is the model's reflex, not its judgment. Whether a request is harmful is encoded separately, at an earlier token and along a different direction, so attacks that flatten refusal often leave the model's belief about harm intact. A follow-up to the Llama sphere, the explainer draws both on the same globe.

Numbers marked as measured come from the authors' released code and data; everything else is labelled as a teaching stand-in.

What it covers

  • The residual stream as a globe: input space, concept space and output tokens, layer by layer
  • Two directions, not one: harmfulness at the instruction, refusal at the chat template
  • How perpendicular they really are, measured in Qwen2, Llama-2 and Llama-3
  • Finding the refusal direction: 192 candidates, the paper's filters, and the winner
  • Ablation, activation addition and weight orthogonalization, with measured effects on Llama-2-7B
  • What the 3D ball hides: near-orthogonality and superposition in thousands of dimensions
  • Whether English's refusal direction covers other languages, from a ten-language study
  • Common claims about these papers, checked against their sources

Questions

What is the refusal direction?
A single direction in a chat model's residual stream that controls whether it refuses. Arditi et al. (2024) find it by taking the difference in mean activations between harmful and harmless prompts. Projecting it out stops the model refusing; adding it makes the model refuse harmless requests.
Is refusal the same as harmfulness in a language model?
No. Zhao et al. (2025) show that the model's belief that a request is harmful is read at the last instruction token, and its decision to refuse at the last chat-template token, along a different, roughly orthogonal direction. Jailbreaks often suppress refusal while the harm belief survives.
What is abliteration?
Removing the refusal direction from a model's weights: every matrix that writes to the residual stream is orthogonalized against it, so the model can no longer write along that direction. It needs no hooks at inference time.

Credits

The geometry of refusal stands on open-source work and published research. Thank you to everyone behind it.

Models and data

More from Sarvabhaum

Web appLive

attnlab

A set of labs, walked in order, that run real TransformerLens models behind a web page. Type a prompt, pick a model, and see how it is tokenized, where every head attends, and when the model knows its answer.

  • Mechanistic interpretability
  • TransformerLens
  • Attention
InteractiveLive

Do Llamas think in English?

Ask Llama-2 to translate fleur into Chinese and its middle layers say flower, in English, before the last layers settle on 花. A rotatable sphere shows why: the hidden state moves from input space through an English-leaning concept space to the output language.

  • Interpretability
  • Multilingual
  • Logit lens
Web appLive

Speculative Decoding Playground

A small draft model guesses a few tokens, a large target model checks them all in one forward pass, and the text comes out exactly as the large model alone would write it. The playground runs that loop on real models and lets you inspect every round.

  • Inference
  • Speculative decoding
  • Sampling