Indexing the archive…
Your Universe of Digital Possibilities
Show a tiny transformer random sequences that repeat. For a long time it guesses at chance. Then, all at once, two attention heads join into a circuit and it copies sequences it has never seen.
Each position emits a query, a key and a value. A query scores every earlier key by a dot product; the softmax turns the scores into weights; the output is the weighted mix of values. The mask M keeps a position from reading the future.
Layer 1’s head attends one step back and writes “the token before me” into each position. Layer 2’s keys read that (K-composition), so a query for A finds the position just after the last A; its OV circuit — embed, value, output, unembed — maps each token to itself, so it copies B.
Attention lets a token look back along the sequence and take a weighted mix of what it finds. One head alone can only look by position or by content; two heads in series can do something neither can — layer 1 writes “the token before me” into each position, and layer 2 searches for that. Olsson and colleagues found these induction heads in every transformer they opened, forming in a sudden bump that coincides with in-context learning. The Engram stores patterns in weights; here the pattern lives only in the sequence, and the weights learn to read it.