reference / mechanistic-interpretability
Next task →
Reference Lessons/Mechanistic Interpretability: From Activatio
research specializations · research · reference study

Mechanistic Interpretability: From Activations to Causal Claims

How to move from 'this neuron lights up' to a controlled causal claim about a circuit, with superposition and controls taken seriously.
All reference lessons

Think of a transformer as a circuit board. Activation patterns are voltage readings; patching is replacing one component with a copy from another run. A claim is credible when the intervention changes the behavior you predicted and leaves unrelated behavior alone.

1. Logit lens

Project an intermediate residual stream through the unembedding matrix: pt=softmax(Uh(l))p_t=\mathrm{softmax}(U h^{(l)}). This is a descriptive projection, not proof that the model uses those logits at layer ll.

2. Patching effect

Let ycleany_{clean} be the metric on a clean prompt and ypatchedy_{patched} after replacing one activation. Define Δ=ypatched−yclean\Delta=y_{patched}-y_{clean}. Normalize by the corrupted baseline: Δnorm=ypatched−ycorruptyclean−ycorrupt\Delta_{norm}=\frac{y_{patched}-y_{corrupt}}{y_{clean}-y_{corrupt}}.

3. Specificity control

A real circuit effect should be large for the target behavior and near zero for an unrelated behavior measured on the same patches. Report both; a global performance drop is not evidence of a specific circuit.

4. SAE reconstruction

Train x^=Wd ReLU(Wex+b)\hat{x}=W_d\,\mathrm{ReLU}(W_e x+b) with an L1 penalty on the code. Reconstruction loss plus sparsity determines whether features are monosemantic; measure both, not just pretty feature visualizations.

5. Causal mediation

The direct effect of a feature on output is estimated by intervening while holding other variables fixed: DE=P(y∣do(F=f1))−P(y∣do(F=f0))DE=P(y\mid do(F=f_1))-P(y\mid do(F=f_0)). Without the dodo operator you only have correlation.

Reference lessons are written for this topic specifically. Generated lessons elsewhere on the platform are labelled with a quality score and review status; do not treat them as equivalent.