Abliteration and Model Surgery: Changing Behaviour Without Retraining
Two Ways to Change a Model
To change a language model's behaviour, the classic route is training: fine-tuning, RLHF, DPO. You show the model examples, compute a gradient, and update billions of parameters. It is powerful, expensive, and not very targeted: you do not really know what moved.
Since 2022, a second family of techniques has grown: intervening directly inside the model, with little or no training. You locate where a behaviour lives, then modify it at that precise spot, either during computation or by rewriting a few weights once and for all. These go by the names activation steering, model editing, model surgery, and, for the most famous case, abliteration: removing refusal.
All of these techniques are public, documented in papers and available as open-source code. They matter as much to interpretability research as to safety, because they show how localised some learned behaviours are, and therefore how easy they are to remove.
The Starting Idea: Concepts Are Directions
In a Transformer, each token carries from layer to layer a vector of a few thousand numbers, the residual stream: each layer reads it, computes, then adds its contribution. A repeated observation of interpretability research is that many concepts are represented there linearly: there is a direction in that space that roughly corresponds to "the text is positive", "the sentence is in French" or "this request is dangerous". The more a vector points along that direction, the more the concept is present.
If that holds, two operations become possible. Adding the direction during computation pushes the model towards the concept. Removing it pushes the model away. You still have to find the direction, and the simplest method is surprisingly effective: the difference of means. Run two sets of texts that differ only in the target concept through the model, record the activations at a given layer, average each set, and subtract. The resulting vector is the direction you were looking for.
That is the principle of Activation Addition (Turner and coauthors, 2023): a pair of prompts such as "Love" and "Hate" is enough to build a vector that, added during generation, steers the sentiment or topic of a text, with no optimisation at all. The same year, Representation Engineering (Zou and coauthors) generalised the approach: reading and then controlling high-level concepts such as honesty, harmlessness or power-seeking, working on populations of activations rather than individual neurons.
Abliteration: Erasing Refusal
In June 2024, Andy Arditi, Neel Nanda and their coauthors published a result that travelled widely: refusal is mediated by a single direction. Across 13 open-weight chat models, from 1.8 to 72 billion parameters (Qwen, Yi, Gemma, Llama-2, Llama-3), they find for each model a single direction in the residual stream that governs whether it refuses a request.
The recipe follows exactly the principle above. Take 128 harmful instructions and 128 harmless ones, record the activations on the tokens after the instruction, and compute, for each layer and position, the difference of means. That yields several candidates; keep the one that best suppresses refusals on a validation set, provided it also induces refusals when added, barely disturbs answers to harmless requests, and does not come from the very last layers.
The two interventions have symmetrical effects. Adding the direction makes the model refuse perfectly ordinary requests. Removing it at every layer, by projecting each activation to strip its component along that direction, stops the model from refusing. Written in one line, for an activation vector and the normalised direction :
You subtract from its projection on : what remains is the same activation, without its "refusal" component.
The move that gave the technique its name comes next. Rather than intervening at every generation, you can modify the weights once and for all: every matrix that writes to the residual stream (the embeddings, the attention output, the MLP output) is "orthogonalised" so it can no longer produce that direction. The paper shows this is mathematically equivalent to the intervention during computation. The modified model is published like any other, with no special code needed to use it. The word abliteration (a blend of ablation and obliteration) was popularised by the open-source community, with FailSpy's library and a tutorial by Maxime Labonne published on Hugging Face in June 2024.
On HarmBench, a benchmark of harmful requests, the attack success rate on the modified models reaches 78% for Qwen 72B. For Llama-2 70B it depends heavily on the system prompt: 4.4% with the default safety prompt, 62.9% without. General capabilities move little: on MMLU, ARC and GSM8K, most models stay within the error margin of the original. TruthfulQA drops by about 3.5 points at worst, a benchmark close to the topics the model used to refuse. In practice the community often observes a slight degradation, which Labonne's tutorial proposes to "heal" with a short DPO pass.
The technique is not only for removing refusal. The same mechanics can erase or impose any behaviour that can be isolated by a difference of means: a style, a tone, a tendency. And it serves research: it shows that safety training, at least in its usual form, does not reorganise the model in depth. It adds a switch that is easy to find.
Model Surgery: Rewriting Specific Weights
Abliteration acts on a direction present everywhere. Other techniques aim narrower: locate where a behaviour or a piece of knowledge is stored, then modify only the parameters involved. This is called model editing, or surgery.
ROME (Meng, Bau and coauthors, 2022) opened the way for facts. Using causal tracing, the authors show that factual associations ("the Eiffel Tower is in Paris") run through the MLP layers in the middle of the network, at the moment the model reads the subject. They then modify a single weight matrix with a rank-one update, a minimal correction that changes the targeted fact without touching others. MEMIT (2023) extends the method to thousands of facts at once, spreading the corrections over several layers: up to 10,000 edits on GPT-J and GPT-NeoX, where ROME degrades beyond about thirty. A limit was quickly noted: the edit only works in one direction. A model made to believe the Eiffel Tower is in Rome will not, for all that, list the Eiffel Tower among the monuments of Rome.
Model Surgery (Wang and coauthors, 2024) applies the same logic to behaviours. A probe locates the direction associated with an unwanted behaviour, then a small subset of parameters is modified to move away from it, at a computational cost comparable to inference rather than training. The authors report up to 90% less toxicity on RealToxicityPrompts and 49.2% on ToxiGen, with no notable loss in common sense, question answering or mathematics.
What these methods share is precision: where fine-tuning updates every weight and can make the model drift far from where it started, surgery changes a few matrices, and you know which ones.
The Defences, and Their Limits
That alignment is so easy to remove is not an isolated finding. As early as 2023, Qi and coauthors showed that fine-tuning GPT-3.5 Turbo on 10 malicious examples, for less than 20 cents through OpenAI's API, was enough to make it accept almost any harmful request; and that fine-tuning on perfectly harmless data also degraded safety, though less strongly. Abliteration goes further: it needs neither training data nor gradients, only access to the weights.
Several lines of defence have been published since:
- Making refusal less localised. A KAUST team (2025) trains models to refuse at length: explaining the topic, then refusing, then justifying. The refusal signal then spreads over more positions and dimensions. After abliteration, Llama-2-7B still refuses 92.7% of harmful requests against 20.7% for the original model, at the cost of longer answers and a small loss of capability.
- Training against tampering. The TAR method (Tamper-Resistant Safeguards, 2024) trains the model so that its safeguards withstand hundreds of steps of malicious fine-tuning.
- Understanding the geometry of refusal better. Work from 2025 shows that refusal is not always carried by a single direction: there are several independent directions, even higher-dimensional "cones". A defence that targets only one direction may therefore miss others, and so may an attack.
The balance still favours attackers. A May 2026 preprint tests abliteration and response prefilling against models protected by this kind of defence: the attack success rate rises from under 10% to a range of 16% to 96% depending on the model and benchmark.
For a model available only through an API, the provider keeps control: it filters inputs, monitors usage, and can offer vetted customers a version with lighter safeguards, like the "cyber" offerings reserved for security teams (see Anthropic and OpenAI). For an open-weight model, refusal training is a surface protection: anyone with the weights can remove it in an afternoon. Safety then rests more on what surrounds the model, from guardrails in production to separate moderation models such as Shieldstral, and on what the model cannot do rather than what it refuses to do. The general framework is in safety and alignment.
Key Takeaways
- A model can be modified without retraining: by adding or removing a direction in its activations, or by rewriting a few matrices. These techniques are public and tooled.
- A difference of means is often enough: two sets of texts that differ only by one concept give that concept's direction in the residual stream.
- Abliteration removes refusal: across 13 open models, a single direction governs it. It is erased from the weights by orthogonalisation, with little capability loss.
- Model surgery aims narrower: ROME and MEMIT correct facts by modifying specific MLP layers; Model Surgery reduces toxicity by touching a small part of the parameters.
- Safety training is a thin layer: a few fine-tuning examples or a projection are enough to undo it. Published defences reduce the problem without solving it, which weighs above all on open-weight models.
1. How does the paper by Arditi and coauthors find the direction that governs refusal?
2. Why does weight orthogonalisation make abliteration so easy to spread?
3. What is the main difference between ROME and fine-tuning for correcting a fact?
4. Why does abliteration pose a sharper problem for open-weight models than for models served through an API?