01Attention is content-addressed mixing
Each position creates a query describing what it seeks, keys describing what positions offer, and values containing information to mix. Query–key similarity becomes weights over values.
At each position, learned projections produce query, key, and value vectors. A query is compared with keys to produce scores; scores over permitted positions are normalized into weights; the output is a weighted sum of values. For weights 0.25 and 0.75 over [4,0] and [0,4], the mixture is [1,3]. The model learns the projections rather than using handwritten semantic rules.
In a causal decoder, a position cannot attend to later positions. Apply the mask before normalization so future positions get zero probability, then normalize over allowed positions. Several heads can form different mixtures, but a visible attention pattern does not by itself prove a head understands a grammatical relationship. Output behavior arises from the whole computation, not one highlighted link.
- Causal masks block future positions
- Multiple heads learn different interaction patterns
- Attention moves information; it is not a symbolic database query