Zoom In: An Introduction to Circuits
Three speculative claims: features are the unit, features connect into circuits, analogous circuits recur across models. The microscope metaphor, and the word "circuit" as this field uses it. More on the word.
How to think about a transformer, and how to look inside one, 2020 to 2025
Theory pages for the PyCon TW 2026 poster
The poster's background is one line of work in two phases. From 2020 to 2022 the field worked out how to think about a transformer: what it computes, in terms you can write down. From 2023 the same people built the instruments for how to look: tools that show that computation in a real model. The first phase makes claims; the second turns them into pictures you can check. The hinge between them is one observation, superposition, and it is marked below. The poster uses one result from each cell.
Two definitions recur on the poster and are boxed below where they first appear. A sparse autoencoder (SAE) decomposes the activation vector at one point in the network into sparse, overcomplete, readable directions; "readable" means that scanning a corpus with that direction turns up top examples that share a property a person can describe. A transcoder reads an MLP's input and reconstructs its output through the same kind of dictionary; every feature is a rule "read ej, write dj", and once all 26 layers are replaced and attention is frozen, the influence of one feature on another becomes an inner product, which is what an edge in an attribution graph is.
Three speculative claims: features are the unit, features connect into circuits, analogous circuits recur across models. The microscope metaphor, and the word "circuit" as this field uses it. More on the word.
An attention head is two linear maps. The QK circuit decides where to look; the OV circuit decides what to move. Heads read and write a shared residual stream. This is the narrow sense of "circuit" and the poster's where / what split. The kernel view of the same thing.
A head whose QK circuit finds "the position after the previous occurrence of this token" and whose OV circuit copies what is there: [A][B] … [A] → [B]. Argued to be the main mechanism of in-context learning. A variable name repeated inside a function is exactly this pattern.
A layer can represent more concepts than it has dimensions by packing them into non-orthogonal directions. So single neurons are the wrong unit to read, and you need a learned dictionary to recover the directions.
Train a sparse autoencoder on one layer's activations of a one-layer model and the learned directions are, mostly, things a person can name. The first tool that shows "what is here" at scale.
The same tool on a production model (Claude 3 Sonnet). Among the features: one that fires on code errors across several programming languages. The high point of what an SAE alone can show, and also its ceiling: it says what is present, not what the layer did with it.
Instead of encoding a point, learn a sparse dictionary that maps an MLP's input to its output. Each feature is now a computation the layer performs, so features can be chained across layers into a circuit.
Open-weight sparse autoencoders and transcoders for every layer of the Gemma 2 models, with a better activation function (JumpReLU). This is why the poster can run on gemma-2-2b: the dictionaries exist and are public.
Replace every MLP with its transcoder, freeze attention and normalisation, and the whole model becomes linear in the features for one prompt. The graph of feature-to-feature and feature-to-logit effects is the attribution graph: the broad sense of "circuit", prompt-specific, pruned to what matters for the target logits. The tool the poster's main figure comes from.
Where (2021, 2022): the attention pattern from the return position, per head, over the tokens of the prompt. QK side only.
What (2023 to 2025): the attribution graph of P4, with every direct effect named against its logit and the aggregate totals beside the pinned subgraph.
Does it matter: scale one feature's activation down and watch the two candidate logits cross. Attribution is an estimate; steering is the check.
Two things worth keeping in mind while reading the graph. A circuit, in either sense, is an approximation found by pruning and thresholds, not a fact about the weights. And an attribution graph is specific to one prompt: change the prompt and you get a different graph, which is why the poster shows four.