Attention Weights Show Routing, Not the Whole Explanation

Inspect every head's attention row while retaining value vectors, output projections, residual paths, MLPs, and later layers. Calculate one weighted value and connect attention patterns to bounded interventions.

An attention weight answers a narrow question: how strongly does this query mix each value record in this head? It does not show the content of those values, the head's output projection, the residual path, the MLP update, or later computation.

Inspect the Four Final-Query Rows

For <bos> X Y, the final position has these recorded weights:

LayerHead<bos>Xcurrent Y
110.50680.11220.3810
120.20470.41410.3812
210.12980.76850.1017
220.34720.44970.2031

Layer 2 head 1 places most weight on X. This is useful routing evidence, but “the head copies X” is not yet established.

Weights Mix Values

For a hand-checkable head, suppose

a=[0.5,0.1,0.4]a=[0.5,0.1,0.4]

and its value rows are

v0=[1,0],v1=[0,2],v2=[1,1].v_0=[1,0],\quad v_1=[0,2],\quad v_2=[-1,1].

The mixed value is

0.5v0+0.1v1+0.4v2=[0.1,0.6].0.5v_0+0.1v_1+0.4v_2=[0.1,0.6].

Changing the value vectors changes the result even if the visible weight row stays fixed. The head's slice of WOW_O then maps this two-value result back to the four-dimensional residual stream.

Test Effect, Not Just Appearance

Zeroing layer 2 head 1 changes the clean X-minus-Y margin from 6.4618 to -2.4767. That intervention shows that this head's normal write matters under the chosen zero replacement. It still does not show that the weight on X alone causes the effect; the Q/K routing and V/O content path act together.

Q1. Calculate a weighted value

Using the weights and values above, what mixed vector is passed to the output projection?

Compute it first, then check your number.

Hint
Calculate the two coordinates separately.
Solution
The first coordinate is 0.50.4=0.10.5-0.4=0.1; the second is 0.2+0.4=0.60.2+0.4=0.6.
Not attempted
Review

Not marked done.

What the Research Debate Establishes

Jain and Wallace (2019) found weak or non-unique relationships between attention distributions and prediction-based importance measures in specified NLP models. Wiegreffe and Pinter (2019) argued that the conclusion depends on the definition of explanation and the tests used. Together they support careful, test-specific claims—not the slogans “attention explains everything” or “attention can never be informative.”

Pause and reflect

In your own words, note what you understood, what remains unclear, or what you want to revisit. The note stays with this lesson.

0 of 1 exercises marked done

Review

Not marked done.

LLM PrimerAttention Weights Show Routing, Not the Whole Explanationhttps://llmprimer.com/transformers/inspecting-and-interpreting-transformers/attention-weights-show-routing-not-the-whole-explanation© 2026 LLM Primer