Glossary
What is Directional Ablation? Erasing One Direction
Directional ablation removes one direction from a model's activations at inference time by subtracting each activation's projection onto that direction.
Directional ablation is an inference-time intervention that removes a chosen direction from a neural network's activations by subtracting, at every layer and token position, each activation's projection onto that direction.
Definition
Directional ablation removes one direction from a model's internal activations while it runs. Given a unit vector r̂, every activation x is replaced by its component orthogonal to r̂:
x′ = x − r̂ r̂ᵀ x
The term comes from Arditi et al. (2024), who apply it with the refusal direction at every layer and every token position, so the model can never represent that direction anywhere in its residual stream. In their experiments across 13 open chat models, this stopped the models from refusing harmful instructions.
How it works
The residual stream is a vector of size d_model that every layer reads from and adds to. Directional ablation hooks the stream at each layer and does three things:
- Compute the scalar projection p = r̂ᵀx, the amount of x that points along r̂.
- Multiply r̂ by p to get the component along the direction.
- Subtract that component from x.
After the subtraction, r̂ᵀx′ = 0. Arditi et al. apply this at each layer's input and again between its attention and MLP sublayers, so no component can carry the direction forward.
The opposite intervention is activation addition: x′ = x + r at a single layer, using the unnormalized vector so its magnitude matters. In the paper, adding the refusal direction made models refuse harmless requests.
Example
This NumPy snippet shows the operation on a batch of activations. It runs as written.
import numpy as np
rng = np.random.default_rng(0)
d_model = 4096
r = rng.normal(size=d_model)
r_hat = r / np.linalg.norm(r) # unit refusal direction
x = rng.normal(size=(8, d_model)) # 8 token positions
x_ablated = x - np.outer(x @ r_hat, r_hat) # x' = x - r_hat r_hat^T x, per row
print("before:", np.round(x @ r_hat, 3))
print("after: ", np.round(x_ablated @ r_hat, 6)) # all ~0
In a real model, you register this as a forward hook on each layer's residual stream (TransformerLens and similar libraries make this a few lines) and generate as usual.
Directional ablation versus weight orthogonalization
Hooks work for research but cost a projection at every layer and need a custom runtime. Weight orthogonalization gets the same effect by editing the weights once: every matrix that writes to the residual stream has its r̂ component removed. Arditi et al. show the two are equivalent. Published abliterated models are usually distributed as edited checkpoints, so they run on standard inference software. Abliterator's models are edited in the weights too, but they are available only through its API.
How it relates to Abliterator
Abliterator's edit goes one step past ablation. For DeepSeek V4.1 Flash Abliterated, every matrix W that writes to the residual stream became W − 2 r rᵀ W: instead of setting the component along the refusal direction to zero, it reverses it. On that model, refusals on HarmBench (chemical and biological excluded, n=172) fell from 84.9% to 0.6% (benchmarks).
Related terms
- Refusal direction: the vector being ablated.
- Weight orthogonalization: the equivalent weight edit.
- Residual stream: where the ablation is applied.
- Abliteration: the full procedure built on this operation.
Frequently asked questions
Is directional ablation the same as abliteration?
It is the core operation. Directional ablation edits activations while the model runs; abliteration usually applies the equivalent weight edit, weight orthogonalization, so the change is permanent and needs no runtime hooks.
Does directional ablation need training?
No. It needs only the direction, which is computed from forward passes, and a projection at each layer. There is no gradient step.