All Lessons

Activation Patching as a Causal Model Test

Activation patching intervenes on internal model states to test whether a component affects a behavior. This lesson defines the intervention, effect metric, baseline sensitivity, and limits of causal interpretation.

AI Narration Press play to listen
0  / 6 paragraphs
Click any paragraph to jump · Scroll freely without breaking narration

Begin with a clean input $x_c$ that produces behavior of interest and a corrupted input $x_d$ that weakens or changes it. Record internal activation $h_{l,p}(x_c)$ at layer $l$ and position $p$. Then run the corrupted input while replacing only that internal activation with the clean value.

Let model metric $M(x)$ measure the behavior, such as a target logit difference. The patching effect is $$\Delta_{l,p}=M(x_d;h_{l,p}\leftarrow h_{l,p}(x_c))-M(x_d).$$ A large effect means the substituted activation can causally influence the metric in this intervention context. It does not by itself establish a complete mechanism.

The choice of corruption defines the question. Replacing one token, shuffling a feature, or using unrelated text creates different baselines and may alter many hidden factors at once. A component can appear important because it repairs collateral damage from the corruption rather than because it uniquely represents the intended concept.

Patching tests sufficiency-like restoration: clean activation inserted into a damaged run restores behavior. A complementary necessity-like test replaces a clean activation with a corrupted or ablated value and measures damage. Neither direction alone proves that the component is the only route, because networks can contain redundancy and compensating pathways.

Sweeping thousands of layers, positions, heads, or neurons creates multiple-comparison and compute problems. Fast gradient approximations can prioritize candidates but may miss nonlinear interactions. Confirm high-ranked components with direct interventions, repeat across examples, and report the denominator used to normalize effects.

Interpret results as local causal evidence tied to specific inputs, baselines, and metrics. Validate proposed circuits by patching groups, testing unseen examples, and checking both positive and negative controls. A persuasive diagram is not enough; the intervention should predict behavior under new, deliberately chosen perturbations.