# Deriving Sparse Autoencoders from a Shadow: Concepts, Transcoders and a Small Algebra for a Toy Chess Network

Suppose you have trained a network that plays chess better than any person, and in one position it gives up a rook and wins. You can read every number inside it, and none of them says why. A position goes in, thousands of numbers change, a move comes out. No number is labelled *the king is exposed*.

I want three things from such a network. **Its concepts:** which facts about a position it has learned to notice, with or without a human name. **Its computation:** how those facts combine into a move. **A small algebra:** a program of a few dozen terms over named concepts that picks the network’s move most of the time, and is short enough to read. For the third I am ready to pay in accuracy. The program can be a rough copy, as long as I can say how rough.

Two tools do most of this. A **sparse autoencoder** rewrites what a layer holds as a long row of switches, nearly all of them off. A **transcoder** rewrites what a layer computes as a few rules over those switches. Both come from one picture, and this post derives them from it: a layer of a network is the shadow of a much wider space, and a shadow can be undone when few things are on at a time. The worked example is a toy with the shape of a chess network, small enough to print. A real chess network comes back at the end, as a proposal.

<figure class="mfig ds-figure ds-wide" id="sae-hero" aria-label="A small network drawn as 24 numbers, 12 neurons and five scores; beside it the same position read as a few named concepts, a rule and five rebuilt scores, revealed in four stages">
<div class="ds-plot"></div>
<figcaption><b>Two tools turn a network’s numbers into a short account of its move.</b> The network in blue is a toy with the shape of a chess network, and the one this post takes apart: it holds a position as 24 numbers, has 12 neurons and scores five kinds of move. Step through the four stages, or change the position.</figcaption>
</figure>

## What a sparse autoencoder and a transcoder are

A network keeps its working state as a list of numbers, a few hundred or a few thousand at each layer. That list is the **stream**. Papers on transformers call it the residual stream, and [the transformer note](../notes/transformer) builds one. A layer reads the stream, computes something, and adds the result back to it. The layers taken apart here are of the plainest kind, an **MLP**: a row of neurons, each of which takes a weighted sum of the stream and passes it on only when it is above a threshold.

A **sparse autoencoder** is a second, small network trained on the stream of the first. One thing goes in: the stream at one layer, recorded on many inputs. There are no labels and no list of concepts to look for. Two things come out:

1. **A dictionary:** a list of directions in the stream, more of them than the stream has numbers. Each direction belongs to one unit of the autoencoder, a **latent**.
2. **A code** for each input: which few latents are on, and how strongly.

It is trained for one thing. The code must rebuild the stream closely while keeping few latents on. The hope, which has to be checked every time, is that each latent then stands for one concept. Papers call such a concept a **feature**, and often use the same word for the latent meant to capture it. Here the two words stay apart. A *concept* is something true of the input, a *latent* is a unit of the dictionary, and whether one stands for the other is the thing to measure.

A **transcoder** is trained on a layer instead of a stream. The layer’s input and output go in, recorded on many inputs. A replacement for the layer comes out: a wide row of latents, few of them on, that reads what the layer reads and predicts what it writes. Its use is that every latent reads the stream through one fixed direction and writes through another. The effect of one latent on a later one is then its activation times a fixed number, and a table of fixed numbers can be read. A handful of latents joined by such numbers, enough to carry one behaviour of the network, is what the same papers call a **circuit**.

Neither tool promises much. An autoencoder promises a sparse code that rebuilds the stream, and nothing about meaning; two trainings can return different dictionaries. A transcoder promises the layer’s output, approximately, and not that the layer computes it the same way. What either one misses stays in the network and out of the account. So every reading below comes with a measure of how good it is, and those measures are part of the result.

Sparse codes over a learned dictionary are from Olshausen and Field, for images: in 1996, and in 1997 with a dictionary larger than its input. Autoencoders of this kind were trained on language models by Cunningham and co-authors and by Bricken and co-authors in 2023. The later ways to train them are credited where they appear below. Transcoders were first built and tested by Dunefsky, Chlenski and Nanda in 2024, who credit the idea to a note by Templeton and co-authors and to code by Li, Marks and Mueller. The graphs of the later sections are from Ameisen, Lindsey and co-authors in 2025.

<figure class="mfig ds-figure ds-wide" id="sae-where" aria-label="Two panels. Left: a sparse autoencoder reads the stream, passes through a wide layer with few units on, and rebuilds the stream. Right: a transcoder reads the input of the MLP layer, passes through a wide layer with few units on, and predicts the MLP’s output">
<div class="ds-plot"></div>
<figcaption><b>An autoencoder rebuilds what a layer holds; a transcoder imitates what a layer does.</b> Both pass through a wide row of units of which few are on. The picture runs through positions of the example below and prints which units fire on each.</figcaption>
</figure>

## The example

The example is not chess. It is the smallest world with the same shape: positions described by facts, tactical rules that combine facts, and a move chosen by the rules.

A **position** is a list of 32 yes-or-no **facts**. Twelve can matter for the move: king exposed, queen near, open file, weak back rank, loose piece, fork square, passed pawn, clear path, our king hit, pinned piece, bishop pair, and a twelfth that I have left without a name on purpose. Twenty are background, true of the position and of no use for the move: castled, doubled pawns, half-open file and so on. Each of the twelve holds in 15 % of positions, and a position has none, one or two background facts. On average 2.8 of the 32 facts are on.

Six **rules** combine the facts. A rule that holds adds points to one of five kinds of move:

| rule | holds when | adds |
| --- | --- | --- |
| mating attack | king exposed and queen near | 2.1 to attack |
| back-rank threat | open file and weak back rank | 1.5 to attack |
| wins material | loose piece or fork square | 1.8 to capture |
| pawn runs | passed pawn and clear path | 1.7 to push |
| must defend | our king hit and not queen near | 2.3 to defend |
| squeeze | pinned piece and the unnamed fact | 1.5 to improve |

Four facts also add a little on their own: king exposed 0.4 to attack, pinned piece 0.3 to capture, passed pawn 0.25 to push and bishop pair 0.35 to improve. *Improve* is the quiet move. It starts 0.7 ahead, so it is played when no rule holds. The move is the kind with the most points. This is the **rule table**, and it is the answer key: what the network was taught.

The **network** is small enough to print. It holds a position as a stream of 24 numbers: each fact has a fixed direction in those 24 numbers, and the stream is the sum of the directions of the facts that are on. One MLP of 12 neurons reads the stream and adds its output back. Five scores are read from the result, one per kind of move, and the highest is played. The network was trained to play the rule table’s move and, as a second target, to write the value of each rule along a direction of its own in the stream.

It plays the table’s move on 98.3 % of positions. Its moves are lopsided: improve on 59.6 % of positions, capture on 22.6 %, defend on 12.6 %, attack on 3.6 % and push on 1.7 %. A program that always answered *improve* would agree with it six times in ten. So every percentage of agreement below is given twice, over all positions and over those where the network does not play *improve*. With the MLP’s output replaced by its average, the network keeps its own move on 74.1 % of positions and on 36.7 % of those where it does not play *improve*: the rules are computed in the MLP.

The toy has 864,256 possible positions, and every percentage of agreement below is counted over all of them, each weighted by how likely it is. The network in the figures is one training. Where a number depends on the training, the range over eight trainings is given with it: this one and seven more, each from another random start.

Four assumptions are built into this world, and everything later leans on them.

1. **Facts are directions.** Each fact has its own direction in the stream, and the facts that are on add up.
2. **Facts are sparse.** Few are on at once.
3. **Facts are independent.** Among the twelve that matter, knowing one tells nothing about another.
4. **Rules are directions too.** The network was trained to write each rule along one direction of the stream, which is the form a transcoder looks for. The closing section trains it without that help.

A fifth is a privilege of the toy: **we hold the answer key**, the facts and the rules, so each tool can be graded against it. A real chess network grants none of the five.

One colour code runs through the text and the figures: <span class="k-obs">blue</span> is what the network holds, its stream, its neurons and its scores; <span class="k-hid">copper</span> is the hidden truth about a position, its facts and the rule table; and <span class="k-der">violet</span> is what we derive, the latents, the rules read off them and the program.

<figure class="mfig ds-figure ds-wide" id="sae-box" aria-label="Sixteen facts as switches; below them the 24 numbers of the stream as bars, the 12 neurons as bars and the five scores, all recomputed when a fact is switched">
<div class="ds-plot"></div>
<figcaption><b>Every fact moves every number of the stream.</b> Press a fact to switch it on or off; the dashed ones are background facts, which no rule uses. The 24 bars are the stream, with the direction of the fact you pressed last drawn as an outline; under them are the 12 neurons and the five scores. No bar belongs to one fact.</figcaption>
</figure>

## Thirty-two facts do not fit in twenty-four numbers

The simplest network to read would give each fact one number of its own. To know whether the king is exposed, you would look at number 7. The toy cannot be built that way, since it has 32 facts and 24 numbers. Nothing forces a real network to be built that way either: if it needs more concepts than a layer has numbers, some numbers must serve several concepts.

The problem can be drawn with a stream of two numbers. Give each concept a direction in the plane they span. Two concepts fit on the two axes, and each number means one thing. With a third, no number means one thing any more: of three directions spread evenly, at least two have a share on each number.

The concepts can still be told apart, by measuring along a concept’s direction instead of looking at one number. As long as one concept is on at a time, a third and a fourth do no harm. With three directions 120° apart, or four at right angles, a concept that is on measures zero or less along the others, and anything at or below zero already reads as *off*. From five on, neighbours overlap. Five directions spread evenly sit 72° apart, and the cosine of 72° is 0.31. When one concept is on, its neighbour measures 0.31 where it should measure 0.

A network that stores more concepts than it has numbers, each as a direction and each overlapping a little with the others, is said to hold them in **superposition**. Read one number at a time it is **polysemantic**: each number moves with several concepts. The word was coined for neurons, where the same thing happens. Elhage and co-authors trained small networks on sparse concepts and found them choosing these arrangements unprompted, in their words “digons, triangles, pentagons, and tetrahedrons”.

<figure class="mfig ds-figure ds-wide" id="sae-pack" aria-label="Concept directions drawn as arrows in the plane of two numbers, spread evenly; a slider sets the number of concepts from two to eight, and bars show each concept’s component on number 1">
<div class="ds-plot"></div>
<figcaption><b>Past two concepts, a number stops meaning one thing.</b> Drag the handle to add concepts to a stream of two numbers. The bars show how far each concept moves number 1.</figcaption>
</figure>

## A wide layer has room for many near-perpendicular directions

Two numbers are the worst case. With more numbers, the room for directions that barely overlap grows very fast.

Take two directions at random in a layer of $d$ numbers. Their overlap, the cosine of the angle between them, is zero on average and typically about $1/\sqrt d$ in size: 0.20 for the toy’s 24 numbers, 0.044 for 512, 0.016 for 4,096. In a wide layer two random directions are close to perpendicular without anyone arranging it.

<details class="more"><summary>Derivation: the overlap of two random directions is about 1/√d</summary>

**The claim.** Let $g$ and $h$ be two directions drawn independently and uniformly from the unit sphere in $d$ dimensions. Their overlap $g\cdot h$ has mean 0 and variance $1/d$.

**Fix one of the two.** The sphere looks the same from every direction, so we may turn the axes until $h$ is the first axis. The overlap is then the first coordinate of $g$:

$$
g\cdot h = g_1 .
$$

**The mean is zero.** The direction $-g$ is as likely as $g$, and it has first coordinate $-g_1$. A quantity that is as likely to take a value as its opposite has mean zero:

$$
\mathbb E[g_1]=0 .
$$

**The squares of the coordinates sum to one.** A unit vector has length one, so

$$
g_1^2+g_2^2+\dots+g_d^2 = 1 .
$$

**Every coordinate has the same share.** No axis is special, so each $g_\ell^2$ has the same mean. Taking the mean of both sides of the last line gives $d$ equal terms that add to one:

$$
d\;\mathbb E[g_1^2]=1
\qquad\Longrightarrow\qquad
\mathbb E[g_1^2]=\frac1d .
$$

**Conclude.** With mean zero, the variance is the mean square, so the overlap has standard deviation

$$
\sqrt{\operatorname{Var}(g\cdot h)}=\frac{1}{\sqrt d}.
$$

**Check.** For $d=2$ the overlap is the cosine of a uniform angle, with mean square $1/2$. For $d=24$ the formula gives $1/\sqrt{24}=0.204$.

</details>

Now ask for many directions at once, every pair overlapping by at most $\varepsilon$. The number that fit grows exponentially with the width of the layer: at least $e^{\varepsilon^2 d/4}$ of them. With a tolerance of 0.3, a layer of 512 numbers holds at least $10^5$ such directions. With a tolerance of 0.2, a layer of 4,096 holds more than $10^{17}$.

The guarantee is loose for narrow layers. At 24 numbers and a tolerance of 0.2 it promises nothing beyond the 24 axes. Yet the toy’s 32 fact directions, spread out by gradient descent, have every overlap under 0.173 in size. No arrangement of 32 directions in 24 numbers can get all of them under 0.103, a limit known as the Welch bound.

<details class="more"><summary>Derivation: at least exp(ε²d/4) directions fit with every overlap under ε</summary>

**The claim.** For any whole number $N\le e^{\varepsilon^2 d/4}$ there are $N$ unit vectors $g^{(1)},\dots,g^{(N)}$ in $d$ dimensions with $|g^{(i)}\cdot g^{(j)}|\le\varepsilon$ for every pair. The proof draws the directions at random and shows that the draw succeeds with positive probability.

**One pair.** For two independent random directions, the chance that the overlap exceeds $\varepsilon$ in size is at most

$$
\Pr\big(|g\cdot h|>\varepsilon\big)\;\le\;2\,e^{-\varepsilon^2 d/2}.
$$

This is a standard bound on the area of a cap of the sphere, used here without proof. It is what the previous derivation suggests: an overlap of standard deviation $1/\sqrt d$ that behaved like a normal variable would exceed $\varepsilon$, which is $\varepsilon\sqrt d$ standard deviations, with a chance of that order.

**Count the pairs.** Among $N$ directions there are

$$
\frac{N(N-1)}{2}
$$

pairs.

**The expected number of bad pairs.** Call a pair bad when its overlap exceeds $\varepsilon$ in size. The expected number of bad pairs is the number of pairs times the chance for one pair, whether or not the pairs are independent:

$$
\mathbb E[\text{bad pairs}]\;\le\;\frac{N(N-1)}{2}\cdot 2\,e^{-\varepsilon^2 d/2}\;<\;N^2\,e^{-\varepsilon^2 d/2}.
$$

**Choose $N$ so that this is under one.** If $N\le e^{\varepsilon^2 d/4}$ then $N^2\le e^{\varepsilon^2 d/2}$, and

$$
\mathbb E[\text{bad pairs}]\;<\;e^{\varepsilon^2 d/2}\,e^{-\varepsilon^2 d/2}\;=\;1 .
$$

**A count with mean under one is sometimes zero.** The number of bad pairs is a whole number that is never negative. If it were at least one in every draw, its mean would be at least one. So some draw has no bad pair, and that draw is the set of directions we wanted.

**How loose it is.** For $d=24$ and $\varepsilon=0.2$ the bound is $e^{0.24}=1.27$, less than two directions, while 32 directions with every overlap under 0.173 exist. The bound gets the exponential growth in $d$ right and the constants wrong, because it pays for every pair as if pairs were the only obstacle.

</details>

<figure class="mfig ds-figure ds-wide" id="sae-room" aria-label="The distribution of the overlap between two random directions, drawn as a curve that narrows as the number of dimensions grows; a shaded band marks overlaps within a chosen tolerance of zero">
<div class="ds-plot"></div>
<figcaption><b>The wider the layer, the closer two random directions are to a right angle.</b> The curve is the spread of the overlap between two random directions. Choose the width of the layer and the overlap you will tolerate: the shaded band is the share of pairs within that tolerance.</figcaption>
</figure>

## The layer is the shadow of a wider space

Here is the picture to keep. Imagine the space the network would use if it could afford one number per concept. Call it the **wide space**. It has one axis per concept, and a position is a point in it: coordinate $i$ is 1 when concept $i$ is on and 0 when it is off.

The layer has fewer numbers than there are concepts, so it cannot hold that point. It holds the point’s **shadow**. Each axis of the wide space falls on one direction of the layer, and a point falls on the sum of the directions of its axes. Writing $\htmlClass{eq-hid}{c_i}$ for concept $i$ of a position, $\htmlClass{eq-hid}{v_i}$ for the direction its axis falls on, and $\htmlClass{eq-obs}{x}$ for the stream,

$$
\htmlClass{eq-obs}{x}=\sum_{i=1}^{n}\htmlClass{eq-hid}{c_i}\,\htmlClass{eq-hid}{v_i}.
$$

In the toy this is how the stream is built, with $n=32$ facts and directions of unit length in $d=24$ numbers.

A shadow loses information. Many points of a room cast the same shadow on the floor, so in general the point cannot be recovered from the shadow. What saves us is that positions are not general points. Few concepts are on at once, so positions sit on the axes of the wide space or close to them, and that thin set of points has a shadow that can be read. With one concept on at a time, the points lie on the axes and their shadows lie on a few lines. A shadow on a line can be traced back to its axis. With many concepts on at once the shadows fill the layer, and nothing in them points back to the axes.

This is the reason to widen. A sparse autoencoder that turns 24 numbers into 48 adds no information to the 24. It tries to undo a projection, and it can succeed only because the thing projected was sparse. The same fact is the basis of compressed sensing: a list of $n$ numbers of which only $k$ are not zero can be recovered from a number of linear measurements proportional to $k\log(n/k)$, far fewer than $n$. In that language the stream is a set of 24 measurements of a list of 32 numbers, about three of them not zero.

<figure class="mfig ds-figure ds-wide" id="sae-shadow" aria-label="Three concept axes in space with positions as points near the axes, a plane through the origin standing for the layer, and the shadow of each point on the plane; the view can be turned, and a last stage shows the plane face on">
<div class="ds-plot"></div>
<figcaption><b>What a layer holds is the shadow of a wider space with one axis per concept.</b> Step through the stages and drag the picture to turn it. Then switch to many concepts on at once: the shadows can be traced back to the axes only when few concepts are on.</figcaption>
</figure>

## Reading one concept back costs a little noise

To read concept $i$ from the stream, measure the stream along that concept’s direction. Substituting the shadow formula,

$$
\htmlClass{eq-hid}{v_i}\cdot\htmlClass{eq-obs}{x}\;=\;\htmlClass{eq-hid}{c_i}\;+\;\sum_{j\ne i}\htmlClass{eq-hid}{c_j}\,(\htmlClass{eq-hid}{v_i}\cdot\htmlClass{eq-hid}{v_j}).
$$

The first term is the answer. The second is **interference**: one overlap for every other concept that is on. With $k$ others on and overlaps of size about $1/\sqrt d$, the interference is about $\sqrt{k/d}$ in size. For three others in a layer of 24 numbers, with directions drawn at random, that is 0.35.

A read-out of 0.35 for a concept that is off, or 0.65 for one that is on, is still on the right side of ½. So the recipe is to measure, then threshold. With three other concepts on and 24 numbers, the threshold gets the answer wrong about 8 % of the time. With 100 numbers it is wrong 0.2 % of the time. The error is set by the ratio of concepts on to the width of the layer, and not by how many concepts exist.

That is the error for one concept. A position is read right only when all of its concepts are, and many small chances add up. In the toy, whose 32 directions were spread out with care, measuring along the true directions and cutting at ½ gets every fact of a position right on 78.5 % of positions.

A linear measurement followed by a threshold is also what a neuron computes. It is how the network reads its own stream, and it is the shape the autoencoder’s first half will take.

<details class="more"><summary>Derivation: interference of size √(k/d), and how often the threshold errs</summary>

**The claim.** If the directions are drawn at random and $k$ concepts other than $i$ are on, the read-out of concept $i$ is off by a quantity of mean 0 and standard deviation $\sqrt{k/d}$, and a threshold at ½ errs with probability close to $\Phi\!\big(-\tfrac12\sqrt{d/k}\big)$, where $\Phi$ is the normal distribution function.

**Write the read-out.** Let $K$ be the set of the $k$ other concepts that are on. Each has $c_j=1$, and the concepts that are off drop out of the sum:

$$
v_i\cdot x \;=\; c_i+\sum_{j\in K} v_i\cdot v_j .
$$

**Each term is one random overlap.** By the first derivation, $v_i\cdot v_j$ has mean 0 and variance $1/d$.

**The terms add.** The directions $v_j$ are drawn independently, so the variances add:

$$
\operatorname{Var}\Big(\sum_{j\in K} v_i\cdot v_j\Big)=\frac{k}{d},
\qquad
\text{standard deviation }\sqrt{\frac{k}{d}} .
$$

**When the threshold errs.** If the concept is off, the read-out is the interference alone, and the threshold errs when the interference is above ½. If the concept is on, it errs when the interference is below $-\tfrac12$. The two cases are mirror images.

**Use the normal shape.** A sum of several independent overlaps is close to normal. A normal variable of standard deviation $\sqrt{k/d}$ exceeds ½ with probability

$$
\Phi\!\left(-\frac{1/2}{\sqrt{k/d}}\right)=\Phi\!\left(-\frac12\sqrt{\frac dk}\right).
$$

**Check.** For $k=3$ and $d=24$: $\sqrt{d/k}=2.83$, half of it is 1.41, and $\Phi(-1.41)=7.9\,\%$, the 8 % of the text. The figure below counts the errors over 4,000 random draws instead, and lands within half a point of that.

</details>

<figure class="mfig ds-figure ds-wide" id="sae-read" aria-label="Two histograms of the read-out of one concept, one for positions where it is off and one where it is on, with a threshold at one half; a slider sets how many other concepts are on and a choice sets the width of the layer">
<div class="ds-plot"></div>
<figcaption><b>Other concepts add noise to a read-out, and a threshold removes most of it.</b> The left hump is the read-out when the concept is off, the right hump when it is on. Add concepts that are on at the same time, or widen the layer. The bars in full colour are read-outs on the wrong side of ½.</figcaption>
</figure>

## Undo the shadow: widen, then threshold

If we knew the directions $v_i$ we would be done. We do not: all we have is streams. A sparse autoencoder learns a set of directions from the streams alone. It has $L$ latents, more than the stream has numbers, and it does two things:

$$
\begin{gathered}
\htmlClass{eq-der}{a}=\sigma\big(E\,(\htmlClass{eq-obs}{x}-\mu)+\beta\big),\\[4pt]
\htmlClass{eq-der}{\hat x}=b+\sum_{i=1}^{L}\htmlClass{eq-der}{a_i}\,\htmlClass{eq-der}{u_i}.
\end{gathered}
$$

The first half is *measure, then threshold*. The average stream $\mu$ is taken off. Each row of the matrix $E$ then measures along one direction, $\beta$ shifts each measurement, and $\sigma$ switches most of the results off. What is left is the code $a$, one number per latent. The second half rebuilds the stream as an offset $b$ plus a sum of the dictionary’s directions $u_i$, each weighted by its latent. Training moves $E$, $\beta$, $b$ and the $u_i$ so that the rebuilt stream $\hat x$ is close to $x$ over many inputs while few latents are on.

Nothing in that objective mentions concepts. The bet is the shadow picture: if streams are shadows of sparse points, the cheapest way to rebuild them with few latents is to place one latent on each concept’s direction.

How $\sigma$ decides what stays on matters more than it looks. Take five concepts in a plane, 72° apart, and a point that has the second concept on at strength 0.8. Measured along the five directions it gives 0.25, 0.80, 0.25, −0.65 and −0.65. The two neighbours answer too, because their directions overlap with the second.

- **Keep everything positive.** The two answers of 0.25 are added back along their own directions, and the rebuilt point overshoots by 19 %.
- **Subtract 0.3 first, then keep what is positive.** The neighbours drop out, and the survivor is read as 0.50 instead of 0.80.
- **Keep only the largest.** The point is rebuilt exactly. With two concepts on at once the same choice keeps one and loses the other, so it has to know how many to keep.
- **Keep what is above 0.3, as it is.** The neighbours drop out and the survivor is read as 0.80. With two concepts on, both pass, and no count has to be set. Each is then read too high, because it also measures part of the other.

The last three are the three training methods of the next section.

<figure class="mfig ds-figure ds-wide" id="sae-lift" aria-label="Five dictionary directions in a plane and a draggable point; bars show the point measured along each direction and which measurements are kept; a hollow dot marks the point rebuilt from what is kept">
<div class="ds-plot"></div>
<figcaption><b>Measuring along overlapping directions gives several answers, and the way of choosing among them decides the error.</b> Drag the blue point and change what is kept. Pale bars are the five measurements, solid bars are the ones kept, and the hollow dot is the point rebuilt from them.</figcaption>
</figure>

The directions themselves come from the data. The next figure fits a dictionary to a cloud of points in a plane: positions with five hidden concepts, usually one of them on. It is the autoencoder at its simplest. One set of directions serves both for measuring and for rebuilding, and only the largest measurement is kept. The fit starts from random directions. At each step every point is rebuilt from its best latent, each direction moves toward the points it rebuilt worst, and now and then a latent that wins almost no points is re-pointed at the point rebuilt worst. With five latents, all five hidden directions are found in about two random starts out of three, and four of the five in nearly all the others.

The width of the dictionary decides what comes out. With three latents for five concepts, a latent settles between two concepts and answers for both. With eight latents all five concepts are found in about four starts out of five, and with twelve in about nine out of ten. The spare latents settle between pairs, and win the points that have two concepts on together. Large dictionaries on real networks show effects of the same family. Bricken and co-authors report that features “appear to ‘split’ as we increase autoencoder size”, and Chanin and co-authors describe latents that “fail to fire where they should” because a more specific latent has taken over their cases.

<figure class="mfig ds-figure ds-wide" id="sae-train" aria-label="A cloud of points in a plane lying mostly along five hidden directions, with the dictionary’s directions drawn as arrows that move as the fit proceeds; a trace shows the share of the cloud left unexplained, and a slider sets the number of latents">
<div class="ds-plot"></div>
<figcaption><b>The directions are found from the cloud alone.</b> The arrows start at random and move to rebuild the points better. Change the number of latents, or press New start for another random start. A hidden direction counts as found when an arrow ends within 11° of it. With too few latents, one sits between two concepts; with spare ones, the extras settle on pairs.</figcaption>
</figure>

## Three ways to ask for few latents

The objective says *few latents on*. How that is enforced has changed twice, and each change fixed a flaw of the one before.

**A penalty on size.** The first autoencoders for language models, those of Cunningham, of Bricken and of their co-authors, added to the rebuilding error a penalty proportional to the sum of the latents, the L1 penalty, with a strength $\lambda$. A penalty on size charges a latent for being large, not for being on. So every latent that is on is pulled toward zero: for one latent alone, the best read is the measurement minus $\lambda/2$. This is **shrinkage**. A strong penalty gives a sparse code that reads every concept too low. A weak one rebuilds the stream well with a code that is not sparse: many latents are on, and a fact is shared out among several of them. In the toy, at the strength that leaves three latents on, a fact that is kept reads 0.43, lower still than the 0.55 the one-latent formula gives.

<details class="more"><summary>Derivation: an L1 penalty reads every active latent short by λ/2</summary>

**The claim.** Take one latent with a direction $u$ of unit length. Among all values $a\ge 0$, the one that minimises the rebuilding error plus $\lambda a$ is the measurement along $u$, less $\lambda/2$, or zero if that is negative.

**Write the objective.** With one latent the rebuilt stream is $a\,u$, and the objective is

$$
f(a)=\lVert x-a\,u\rVert^2+\lambda\,a .
$$

**Expand the square.** Write $z=u\cdot x$ for the measurement along $u$, and use $u\cdot u=1$:

$$
f(a)=\lVert x\rVert^2-2\,a\,z+a^2+\lambda\,a .
$$

**Set the slope to zero.** The derivative with respect to $a$ is

$$
f'(a)=-2z+2a+\lambda ,
$$

which is zero at

$$
a=z-\frac{\lambda}{2}.
$$

**Respect $a\ge0$.** The objective is a parabola opening upward, so if its minimum falls below zero the best allowed value is zero:

$$
a^\star=\max\!\Big(0,\;z-\frac{\lambda}{2}\Big).
$$

**Read it.** A measurement under $\lambda/2$ is switched off, which is the sparsity we asked for. A measurement above it is kept and reduced by $\lambda/2$, which we did not ask for. Without the penalty the best value is $a=z$.

**Compare with a threshold.** “Keep $z$ if it is above $\theta$, else zero” switches the same small measurements off and leaves the large ones as they are. The methods of the next two paragraphs are of that kind.

</details>

**A count.** Gao and co-authors removed the penalty and fixed the number of latents instead, as Makhzani and Frey had done for images: TopK “only keeps the k largest latents, zeroing the rest”. Nothing pulls on the survivors, so nothing shrinks. The cost is that every input gets the same budget of $k$ latents, and uses all of it whenever $k$ measurements are positive. In the toy the number of facts on runs from none to eight or more, and only about a quarter of positions have exactly three. A budget of three invents latents for the sparse positions and drops facts from the busy ones.

**A shared budget, then a threshold.** Bussmann, Leask and Nanda let the inputs of a training batch share the budget: BatchTopK keeps the largest $k\times B$ latents across a batch of $B$ inputs, so a busy input can use more than $k$ and a quiet one fewer. Once trained, the batch is replaced by one number: a latent is on when its measurement is above a threshold $\theta$, and it keeps its value. That is the form of the JumpReLU autoencoder of Rajamanoharan and co-authors, who learn one threshold per latent and train the count of active latents directly instead of a stand-in for it.

On the toy’s stream, with 48 latents and about three of them on per position, here are the three methods, averaged over three trainings each. The columns are the number of latents on, the share of the stream left unexplained, how often a fact that holds is kept by its latent, what it is read as when it is kept (1 would be exact), and the match with the facts.

| method | on | unexplained | fact kept | read as | match |
| --- | --- | --- | --- | --- | --- |
| L1 penalty, $\lambda=0.9$ | 2.97 | 31.3 % | 90.9 % | 0.43 | 0.93 |
| TopK, $k=3$ | 2.94 | 15.6 % | 84.1 % | 0.94 | 0.83 |
| BatchTopK, $k=3$ | 2.99 | 2.4 % | 99.8 % | 0.94 | 0.97 |

The **match** of a latent with a fact is the usual F1 measure between *the latent is on* and *the fact holds*: 1 when they are on for the same positions, 0 when they never coincide. The last column is its average over the 32 facts, each paired with its best latent. A latent **owns** a fact when it is the fact’s best latent and the match is at least 0.5.

The first two fail in different ways. The penalty keeps most facts and reads them at less than half their strength. TopK reads what it keeps as well as BatchTopK does, and drops one fact in six. How wide the gap between those two is depends on how unevenly the facts are spread over the positions, and in the toy only a quarter of positions have exactly three.

<figure class="mfig ds-figure ds-wide" id="sae-frontier" aria-label="A plot of the share of the stream left unexplained against the number of latents on, with one curve each for the L1 penalty, TopK and BatchTopK; beside it, bars show what a fact of strength 1 is read as under each rule">
<div class="ds-plot"></div>
<figcaption><b>At the same number of latents on, the three methods do not rebuild the stream equally well.</b> Each dot is the average of three trainings on the toy’s stream. Drag the handle to move along the L1 curve: from 0.1 up, a stronger penalty turns latents off and reads the facts it keeps lower and lower. The weakest penalty reads low for another reason: with ten latents on, a fact is shared out among several.</figcaption>
</figure>

**Dead latents.** A latent that never comes out among the largest is never corrected, and stays useless. The usual cures are to re-point such latents at inputs the dictionary rebuilds badly, or to add a second error term that only they can reduce. Without re-pointing, two of ten trainings on the toy came out one latent short. In one a fact was lost: its best latent matched it at 0.19. In the other a single latent served two facts and matched the weaker of them at 0.65. With re-pointing, none of the ten did.

### Width and sparsity

Two settings remain, and both have to be chosen without knowing the answer.

**How wide.** With BatchTopK and three latents on, count the facts that are owned, the share of the stream left unexplained, and the latents that never fire on the 6,000 positions:

| latents | facts owned, of 32 | unexplained | never fire |
| --- | --- | --- | --- |
| 8 | 6 to 7 | 48 % | 0 |
| 16 | 12 to 14 | 25 % | 0 |
| 24 | 23 to 24 | 13 % | 0 |
| 32 | 32 | 2.4 % | 0 |
| 40 | 32 | 2.5 % | 7 to 8 |
| 64 | 32 | 2.4 % | 32 |
| 96 | 32 | 2.4 % | 62 to 63 |

Up to 32 latents, each new latent takes a fact. Past 32 there is nothing left to take and the spare latents die, all of them or all but one or two. In the planar fit above the spare latents found pairs to sit on, because there only one latent is kept and a point with two concepts on needs a latent of its own. Here three are kept, a pair of facts is already rebuilt by its two latents, and a spare has nothing to add. That clean edge is a property of the toy, where the facts are independent. A real network offers no such edge: wider dictionaries keep finding finer distinctions, so the width chooses the grain of the concepts.

**How sparse.** With 48 latents:

| on, $k$ | unexplained | facts owned | match |
| --- | --- | --- | --- |
| 2 | 21 % | 27 to 28 | 0.80 |
| 2.5 | 8.8 % | 29 to 31 | 0.91 |
| 3 | 2.4 % | 32 | 0.97 |
| 3.5 | 2.6 % | 32 | 0.90 |
| 4 | 2.1 % | 32 | 0.86 |
| 5 | 1.4 % | 32 | 0.81 |

The stream is rebuilt much better as $k$ grows to 3, and little or not at all after that. The latents are at their best as concepts at $k=3$, close to the true average of 2.8 facts, and get worse on both sides. The rebuilding error would pick $k=5$, or more. In a real network the true number is unknown, which is one reason dictionaries are published at several sparsities.

## Step 1: which concepts has it learned?

Train the BatchTopK autoencoder on the toy’s stream: 48 latents, three on per position on average. It leaves 2.4 % of the stream unexplained. Of the 48 latents, 16 never fire and 32 fire, and each of the 32 owns one fact. Number them 1 to 32 in the order of the facts. The direction $u_i$ of each has a cosine of at least 0.997 with its fact’s true direction. The match between a latent and its fact is 0.97 on average and 0.93 at worst. In the other seven trainings every fact is owned as well, the worst match is between 0.87 and 0.94, and up to three of the spare latents stay alive without owning anything.

The rows of $E$, which do the measuring, are not the directions $u_i$. Their cosine with the fact’s true direction is 0.83 on average. Each row is tilted away from the other facts: per unit of its own fact it picks up 0.09 of another fact on average, where the true direction would pick up 0.12. The autoencoder has learned to measure against interference.

A real network has no answer key, so its latents are named from the outside, by a routine that Bills and co-authors set out for neurons in 2023 and that is now applied to latents:

1. **Explain.** Show a language model the inputs on which the latent fires hardest, and ask it for a short description.
2. **Simulate.** Give the description, and not the latent, to a model, and ask it to predict on fresh inputs where the latent fires.
3. **Grade.** Compare the predictions with the latent’s real activity.

The description is a hypothesis and the grade says how good it is. Later variants ask cheaper questions: Paulo and co-authors grade a description by whether a model, given it, can tell inputs where the latent fires from inputs where it does not.

No language model appears in the toy. The labeller is a lookup in the answer key, which is the best labeller there could be: the label of a latent is the fact that matches it best, and the grade is counted over 6,000 positions drawn at random. What the toy shows is the shape of the test, and what a latent without a name looks like under it.

For 31 latents the lookup gives a name and a good grade: the fact holds on 88 % to 100 % of the positions where the latent fires, and the latent fires on nearly every position where the fact holds. The misses are interference, a measurement pushed over the threshold by other facts. Counted by position instead of by latent, the latents that are on are exactly the facts of the position on 84.2 % of positions. On nearly all the others, latents are on for facts that are not there: one on 11.4 % of positions, two or more on 4.3 %. That is a little better than measuring along the true directions, which got 78.5 %, and it is better in each of the eight trainings, by 1.1 to 7.5 points.

The thirty-second is latent 12. It is as clean as the rest: it fires on every position that has the unnamed fact, and 92 % of the positions on which it fires have it. But the vocabulary has no word for that fact. Its hardest-firing positions are a trap. They are busy positions, where other facts push the activation up, and four of the top five have loose piece. A labeller shown those would write “loose piece”. Over all the positions where latent 12 fires, loose piece holds on 16 %, about the 15 % at which any such fact holds, and the label fails its test. The latent is real and the network uses it, since the rule *squeeze* needs it. Only the name is missing.

<figure class="mfig ds-figure ds-wide" id="sae-key" aria-label="A grid with one row per fact and one column per latent, shaded by how often the latent fires when the fact holds, forming a diagonal; beside it the hardest-firing positions of a chosen latent and the label they suggest">
<div class="ds-plot"></div>
<figcaption><b>Thirty-two latents each own one fact, and one of them owns a fact with no name.</b> Each column is a latent and each row a fact; a cell is dark when the latent is on far more often with the fact than without it. Drag the handle to pick a latent: its hardest-firing positions are listed, with the fact of the answer key that matches it best. Then press the button for the latent no word fits.</figcaption>
</figure>

So which concepts has it learned? In the toy, 31 that have a name and one that does not. Whether a language model could do the naming on a chess network the toy cannot say, having no language model in it. What the routine supports is narrower: a label is a hypothesis, it can be graded without a person in the loop, and a wrong or missing name shows up as a bad grade. Whether the labels come out good is a question about the labeller, and for chess it is open. Three points are specific to chess.

**The labeller must see what the latent sees.** A latent of a chess network fires on boards, not on text. Lin and co-authors built replacement layers for a strong Leela network in 2026. They write that “LLMs still struggle to produce reliable interpretations” even when given the board and the squares where a latent fires, and they validated their latents with checks written by hand and with three chess players as annotators. I found no published study that scores machine-written labels for the latents of a chess network.

**Computed concepts are a cheaper first pass.** Chess has a large stock of concepts that a program can compute from a board: material, king safety, pawn structure, threats. McGrath and co-authors used such a stock, taken in part from the evaluation function of the Stockfish engine, to probe AlphaZero “for a broad range of human chess concepts”. Matching each latent against that stock is the toy’s procedure with a real answer key, and it leaves the labeller only the latents that match nothing.

**Some latents will have no name, and those are the ones worth having.** Schut and co-authors searched AlphaZero for concepts outside the human repertoire, and report that “four top chess grandmasters show improvements in solving the presented concept prototype positions” after studying them. A superhuman network is interesting where its concepts are not ours. I would expect such a latent to look the way latent 12 does: it comes back from one training to the next, the computation downstream reads it, and every name proposed for it grades badly. Those are the ones to keep and study by hand.

## Step 2: how does it compute a move?

The autoencoder says what the stream holds before the MLP, and a second one would say what it holds after. Neither says how the second is computed from the first. That computation is the MLP: 12 neurons, each a weighted sum of the 24 numbers put through a threshold.

A **transcoder** replaces it. It has the same two halves as an autoencoder, with one change: it reads the stream $x$ that goes into the MLP and is trained to produce what the MLP adds, written $y$:

$$
\begin{gathered}
\htmlClass{eq-der}{r}=\sigma\big(P\,(\htmlClass{eq-obs}{x}-\mu)+\gamma\big),\\[4pt]
\htmlClass{eq-der}{\hat y}=b'+\sum_{j}\htmlClass{eq-der}{r_j}\,\htmlClass{eq-der}{q_j}.
\end{gathered}
$$

Each row $p_j$ of $P$ measures the incoming stream, $\gamma$ shifts the measurements as $\beta$ did, and $\sigma$ keeps few of the results. Each latent that stays on writes its direction $q_j$ into the outgoing stream, on top of an offset $b'$. Dunefsky and co-authors put the difference in one line: autoencoders “learn to reconstruct model activations, whereas transcoders imitate sublayers’ input-output behavior”.

<details class="more"><summary>The symbols, in one place</summary>

| symbol | what it is |
| --- | --- |
| $x$ | the stream that goes into the MLP: 24 numbers in the toy |
| $y$ | what the MLP adds to the stream |
| $d$ | how many numbers the stream has |
| $c_i$, $v_i$ | whether concept $i$ is on in a position, and the true direction it moves the stream along |
| $k$ | how many concepts, or latents, are on at once |
| $\mu$ | the average stream, taken off before either dictionary measures |
| $E$, $\beta$ | the autoencoder’s measuring rows, and the shift of each measurement |
| $\sigma$ | the step that keeps few measurements and sets the rest to zero |
| $a_i$ | latent $i$ of the autoencoder: a concept, when training goes well |
| $u_i$, $b$ | the direction latent $i$ writes to rebuild the stream, and the offset the sum starts from |
| $L$ | how many latents the autoencoder has |
| $\lambda$, $\theta$ | the strength of the L1 penalty, and the threshold a measurement must pass to stay on |
| $p_j$, $\gamma_j$ | the row of the transcoder that measures for its latent $j$, and its shift |
| $z_j$, $r_j$ | what transcoder latent $j$ measures, and what $\sigma$ leaves of it: a rule, when training goes well |
| $q_j$, $b'$ | the direction transcoder latent $j$ writes into the MLP’s output, and the offset |
| $A_{ji}$, $\gamma'_j$ | the weight of concept $i$ in rule $j$, and the constant of rule $j$ |
| $s_m$, $w_m$, $t_m$ | the score of move $m$, the direction it is read along, and its constant |

</details>

On the toy, a transcoder with 12 latents and one latent on for every two positions keeps six latents alive, one per rule. The figures call them T1 to T6. Their match with the rules runs from 0.90 to 0.97. The transcoder leaves 6.7 % of the MLP’s output unexplained. With the transcoder swapped in for the MLP, the network plays its own move on 98.0 % of positions and on 96.8 % of those where it does not play *improve*. With the MLP averaged out those numbers were 74.1 % and 36.7 %. This is where the fourth assumption pays: the network was trained to write its rules along directions, and the transcoder finds them.

### Here the neurons nearly do the job

Dictionaries were brought to MLP layers because of what Dunefsky and co-authors call “the tendency of neurons to activate on many unrelated concepts”. The toy’s MLP is a mild case. It has twelve neurons for six rules, and for every rule there is a neuron which, read with the threshold that suits it best, matches the rule between 0.89 and 1.00. In this training the transcoder is tidier and no more accurate: six units where the network uses twelve, the rule *wins material* in one latent where it shows in four neurons, and half a latent on per position where two neurons are. The other trainings say the same. Take in each the rule the neurons serve worst and the rule the transcoder serves worst. Over the eight, the first has a best neuron that matches it between 0.68 and 0.94, and the second a best latent between 0.69 and 0.95. Training by training, the latent’s figure is clearly the higher in two, the lower in one, and level in five. The toy gives the transcoder no edge in accuracy. The case for one is a layer that computes more rules than it has neurons and has to share them out, which this toy does not test. Bricken and co-authors decomposed a layer of 512 neurons into dictionaries of up to 131,072 latents.

<figure class="mfig ds-figure ds-wide" id="sae-neurons" aria-label="Two grids of matches with the six rules: on the left the twelve neurons of the MLP, each with its best threshold, on the right the six live latents of the transcoder, which form a diagonal">
<div class="ds-plot"></div>
<figcaption><b>The network spreads six rules over twelve neurons; the transcoder gathers them into six latents.</b> Each cell is the match between a unit and a rule. Neurons are read with the threshold that suits each one best.</figcaption>
</figure>

### The wiring is a table of fixed numbers

This is what the transcoder is for. The autoencoder rebuilds the stream as a sum of its directions, and a transcoder latent measures the stream along one direction. Write $z_j$ for what transcoder latent $j$ measures, before $\sigma$. Put the autoencoder’s sum into the measurement, and $z_j$ becomes a constant plus a weighted sum of the autoencoder’s latents:

$$
\begin{gathered}
\htmlClass{eq-der}{z_j}=\gamma'_j+\sum_i A_{ji}\,\htmlClass{eq-der}{a_i},\\[4pt]
A_{ji}=\htmlClass{eq-der}{p_j}\cdot\htmlClass{eq-der}{u_i}.
\end{gathered}
$$

The weight $A_{ji}$ is the overlap between the direction latent $i$ writes and the direction latent $j$ reads. It does not depend on the position. Dunefsky and co-authors describe the influence of one latent on another as “the product of two terms: the earlier feature’s activation (which depends on the input to the model), and the dot product of the earlier feature’s decoder vector with the later feature’s encoder vector (which is independent of the model input)”. The same holds for the five scores of the moves, which are sums of concepts and rules through fixed weights. The only step that is not a sum is the threshold that turns $z_j$ into $r_j$.

<details class="more"><summary>Derivation: the weights between latents do not depend on the position</summary>

**The claim.** Once the stream is replaced by the autoencoder’s rebuilt stream, the measurement of every transcoder latent and every score is a constant plus a weighted sum of latents, with weights that are overlaps between fixed directions.

**What a transcoder latent measures.** Row $p_j$ of the transcoder’s first half gives

$$
z_j=p_j\cdot(x-\mu)+\gamma_j .
$$

**What the autoencoder says the stream is.** Its offset is $b$. Write $\rho$ for the part of the stream it fails to rebuild:

$$
x=b+\sum_i a_i\,u_i+\rho .
$$

**Substitute.** Put the second line into the first and use that a measurement of a sum is the sum of the measurements:

$$
\begin{aligned}
z_j={}&\underbrace{\gamma_j+p_j\cdot(b-\mu)}_{\gamma'_j}\\
&+\sum_i\underbrace{(p_j\cdot u_i)}_{A_{ji}}\,a_i\;+\;p_j\cdot\rho .
\end{aligned}
$$

The first group is a constant, the second is the table $A$, and the third is what the autoencoder missed, seen by latent $j$.

**The scores.** The network reads the score $s_m$ of move $m$ from the stream after the MLP through a fixed direction $w_m$ and a constant $t_m$:

$$
s_m=w_m\cdot(x+y)+t_m .
$$

**Substitute twice.** Replace $x$ by the autoencoder’s sum and $y$ by the transcoder’s sum $b'+\sum_j r_j q_j$:

$$
\begin{aligned}
s_m={}&\text{constant}_m+\sum_i (w_m\cdot u_i)\,a_i\\
&+\sum_j (w_m\cdot q_j)\,r_j+\text{error}_m .
\end{aligned}
$$

A concept reaches a score by two routes: straight along the stream, with weight $w_m\cdot u_i$, and through a rule, with weight $A_{ji}$ into the rule and $w_m\cdot q_j$ out of it.

**Count the table.** The toy has 32 latents that own a fact, 6 live transcoder latents and 5 scores, so the table has

$$
6\times32\;+\;5\times32\;+\;5\times6\;=\;382
$$

weights.

**Where the position enters.** Only in the activations $a_i$ and $r_j$, and in which $z_j$ pass their threshold. The table is the same for every position.

</details>

The table can be read without running a single position. One convention first: a latent whose fact holds is not at 1 but at 0.94 on average, so the weights quoted from here on are $A_{ji}$ times that reading. They are the weights of a fact that is on.

Take the row for *pawn runs*. Its two largest positive weights are 1.07 on clear path and 1.05 on passed pawn, its constant is −1.16, and the latent is on above 0.55. One of the two facts gives −0.09 and the latent stays off; both give 0.96 and it comes on. That is an *and*, read off three numbers. The row for *wins material* has 0.48 on fork square, 0.44 on loose piece and a constant of +0.41: either fact alone clears 0.55, which is an *or*. The row for *must defend* has 0.73 on our king hit, −0.48 on queen near and a constant of +0.20: the first fact switches it on and the second switches it back off.

Most cells off the rule table are faint. They are small weights that come from the overlaps between directions: the interference of the geometry sections, now showing up in the wiring. Sixteen are not small. They are 0.25 or more in size, every one of them negative and on a background fact, and four are above 0.5. The largest is −1.75, from half-open file into *pawn runs*, a background fact the rule table never mentions. Step 3 tests them on the network.

<figure class="mfig ds-figure ds-wide" id="sae-wiring" aria-label="A grid with one row per rule and one column per fact, shaded by the fixed weight of the fact in the rule, with the cells the rule table uses outlined; one row can be selected to read its formula">
<div class="ds-plot"></div>
<figcaption><b>The weight of every fact in every rule, read off the two dictionaries.</b> Violet cells push a rule on, grey cells push it off, the darker the stronger, and copper outlines mark the facts the rule table uses. Press a row to read it as a formula; the column names in ink are the facts that weigh 0.25 or more in that row.</figcaption>
</figure>

### One position, one graph

For a single position, multiply each weight by the activation of the latent it starts from. The result is a graph: the concepts that are on, the rules they switch on, and the scores, with every edge worth *activation times weight* and every node equal to the sum of the edges into it plus its constant. Ameisen and co-authors call this an attribution graph. The few nodes and edges that carry the move are the **circuit** for that position.

Take the position with king exposed, queen near and castled. Three latents are on, one rule comes on, and the rebuilt score of *attack*, measured against the average of the five scores, is 11.2: −3.6 at rest, +8.9 from the rule *mating attack*, +2.8 and +2.2 straight from king exposed and queen near, and +0.8 from castled. Of what is added, 8.9 comes through the rule and the rest straight from the concepts, by edges that skip it: the stream reaches the scores directly as well as through the MLP. The circuit is two concepts, one rule, one score and the edges between them. The network’s own score is 9.6. The difference is not swept away. In the graphs of Ameisen and co-authors it becomes an **error node**, defined as “the difference between the true MLP output” and the replacement’s, a node with “no input edges”. In the figure it is the gap between a bar and its tick. It is the part of the move this account does not explain.

Run on its own, with no part of the real network left in it, the full replacement of concepts, wiring and thresholds picks the network’s move on 94.1 % of positions, and on 90.9 % of those where the move is not *improve* (93.7 % to 95.2 % and 90.3 % to 93.5 % over the eight trainings). The rare moves cost the most: it finds 85 % of the network’s attacks and 73 % of its pushes.

The last position in the figure’s list is one of the others. It has passed pawn, clear path and half-open file, three facts whose directions overlap negatively with one another, by −0.13 to −0.15, so their sum is a short vector. The autoencoder reads each of the three at about half strength and makes up the difference with three latents for facts that are not there. The rebuilt scores then pick *defend*, the network plays *improve*, and the rule table wanted *push*. The network, the autoencoder and the replacement each go wrong on this position, in different ways.

<figure class="mfig ds-figure ds-wide" id="sae-graph" aria-label="A graph for one position: concept nodes on the left, rule nodes in the middle and the five scores on the right, with edges labelled by activation times weight; bars compare the rebuilt scores with the network’s own">
<div class="ds-plot"></div>
<figcaption><b>For one position, the account is a short graph whose edges are activation times weight.</b> Choose a position, and press a move to see what feeds its score. Violet edges add and dashed grey edges take away; the smallest are not drawn. A dashed chip is a latent that is on for a fact the position does not have. A rule comes on when what flows into it, plus its constant, passes 0.55. Bars are the scores rebuilt from the graph, each against the average of the five, ticks the network’s own, and the gap between them is the unexplained part.</figcaption>
</figure>

### Sparsity decides what a latent means, again

The transcoder above has half a latent on per position, which is the true average number of rules that hold. Here is that budget and three others, each trained three more times on the same network from other random starts. *Move kept* is the share of 6,000 positions where the network with the transcoder swapped in plays its own move.

| budget | on, measured | live latents | rules owned | move kept | match |
| --- | --- | --- | --- | --- | --- |
| 0.25 | 0.25 to 0.26 | 4 to 7 | 2 to 5 | 87 % to 88 % | 0.39 to 0.80 |
| 0.5 | 0.49 | 5 to 7 | 5 to 6 | 96 % to 98 % | 0.80 to 0.95 |
| 1 | 0.98 to 1.01 | 8 to 10 | 6 | 99 % | 0.72 to 0.77 |
| 2 | 1.30 to 2.00 | 10 to 12 | 6 | 99 % | 0.64 to 0.67 |

Up to a budget of 1, more latents imitate the MLP better. Past 0.5 they match the rules worse, as with the autoencoder. A budget of 2 buys nothing over 1, and two of its three trainings do not use it up.

The answer is not unique even at the right setting. Of the three extra trainings at 0.5, one came out like the transcoder used here, one split the rule *wins material* over two latents, and one lost *pawn runs* altogether. Over the eight trainings of the whole chain, network included, every rule kept a latent and between six and nine latents stayed alive; in four of the eight *wins material* was split again, and its best latent matched it at 0.69 or 0.70. Splitting an *or* into its two arms is a legitimate reading of it. It is not the same account, and a lost rule is a gap in the account that only the error node shows.

### Deeper networks

A real network stacks many layers, and a rule in layer 8 can read concepts written in layers 1 to 7. One transcoder per layer then gives long chains of small steps. The cross-layer transcoder of Ameisen and co-authors shortens them: each latent “reads from the residual stream at one layer and contributes to the outputs of all subsequent MLP layers”. Attention is handled by freezing it. In their words, “we freeze attention patterns and normalization denominators”, after which “the direct interactions between features are linear” for a given input. The graph then explains what the MLPs did given where attention looked, and not why attention looked there.

The same authors measure how much of a network such a replacement captures. Their largest one, for an 18-layer model, “matches the underlying model’s next-token completion on 50% of a diverse set of pretraining-style prompts”, a set restricted to tokens the model predicts correctly with a confidence under 80 %. In the companion study the graphs gave “satisfying insight for about a quarter of the prompts we’ve tried”. For chess, Monroe and co-authors “train a cross-layer transcoder on Maia-3”, a network that imitates human play, and report latents that correspond “to tactical motifs such as forks and pins”.

## Step 3: a small algebra, and what it costs

The replacement is already a program. Each rule is a thresholded sum of concepts, each score is a sum of concepts and rules, and the move is the highest score. Written out with the names of step 1 it has 382 terms: 192 weights from facts to rules, 160 from facts to scores and 30 from rules to scores. Most of them are the faint cells of the wiring figure.

To make it small, rank the terms and keep the top of the list. A term matters by the size of its weight times how much its input varies from one position to the next. A rule does nothing without both an input and an output, so its terms enter the list together, once the first of each has come up. A term that is cut is replaced by its average, which goes into a constant; that is why the constants of a small program differ from those of the wiring figure.

The program takes the true facts of a position as its input, which the answer key allows. What is measured here is the wiring alone, without the autoencoder’s misreadings. Its **fidelity** is the share of positions on which it picks the network’s move. An average over all positions hides the rare moves, so the table also gives it by the move the network plays:

| terms kept | all | not *improve* | attack | capture | push | defend | improve |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 6 | 72 % | 31 % | 0 % | 0 % | 0 % | 98 % | 100 % |
| 22 | 95 % | 90 % | 51 % | 99 % | 0 % | 98 % | 99 % |
| 40 | 96 % | 92 % | 57 % | 99 % | 23 % | 98 % | 99 % |
| 60 | 97 % | 95 % | 62 % | 99 % | 89 % | 97 % | 99 % |
| 100 | 98 % | 97 % | 87 % | 99 % | 91 % | 97 % | 99 % |
| 382 | 98 % | 97 % | 91 % | 98 % | 93 % | 96 % | 99 % |

Read the first column alone and forty terms look like enough, and twenty-two nearly so. The other columns say which terms they are: the terms of the common moves. The network attacks on 3.6 % of positions and pushes on 1.7 %, and a ranking by how much a term moves the scores buys the rules behind those moves last. At twenty-two terms the program holds three of the six rules and finds none of the pushes. At forty it holds four. *Back-rank threat*, the second way to an attack, and *squeeze* are missing, and it finds 57 % of the attacks. *Pawn runs* is there, and the program still finds only 23 % of the pushes: the rule loses to *improve*, because the terms that lower the score of *improve* when a pawn can run come further down the list. The first row is worse than its first column, too: always answering *improve* is right six times in ten, and the six-term program is a rule for *defend* and nothing else.

A hundred terms hold all six rules and bring every kind of move to 87 % or more. The other 282 terms change the total by a fifth of a point.

<figure class="mfig ds-figure ds-wide" id="sae-algebra" aria-label="Fidelity of the program against the number of terms kept, for all positions and for positions where the network does not play improve, with the level of always answering improve; five bars split it by the move the network plays; under them the program itself is printed line by line">
<div class="ds-plot"></div>
<figcaption><b>Forty terms pick the network’s move on most positions, and miss most of its pawn pushes.</b> Drag the handle to keep more or fewer terms. The solid curve is fidelity on all positions, the dashed one on positions where the network does not play <i>improve</i>, and the five bars split it by the move the network plays. The program is printed underneath.</figcaption>
</figure>

This is the trade from the opening, with its price. A screen of algebra, forty terms, picks the network’s move on 96 positions in 100 and misses most of its pawn pushes. A hundred terms pick it on 98 in 100, and in this training on at least 87 in 100 for every kind of move.

The other seven trainings give the same shape and other numbers. Forty terms are right on 94.3 % to 97.1 % of positions, and on anything from none to nine tenths of the pushes. A hundred terms are right on 96.4 % to 98.5 %, and their worst kind of move sits between 69 % and 87 %. With every term, 382 to 493 of them, it is 97.3 % to 99.0 %, and 73 % to 94 % for the worst kind of move.

All of this is with the true facts as input, which only a toy can supply. Fed what the autoencoder reads instead, a fact counting as on when its latent is on, the same programs are right on 93.3 % of positions at forty terms and 94.8 % at a hundred, with 84 % for the worst kind of move (91.8 % to 94.8 % at a hundred terms over the eight trainings). With every term the wiring costs 1.6 points of agreement and the reading of concepts another 3.6. Most of the price is paid in step 1.

### What the program reveals

Read the line for *pawn runs* in the printed program: it carries the weight of −1.75 on half-open file that stood out in the wiring. The rule table has no such exception. Either the network has it, or the transcoder invented it. The network can be asked.

Take the positions where *pawn runs* decides the move: the rule holds, the table plays *push*, and without the rule it would play something else. With half-open file off, the network pushes on 90 % of them. With half-open file on, it pushes on 6 %. The exception is real, and it is why the network played *improve* on the last position of the graph figure. It is in the network’s own weights, too: the neuron that carries *pawn runs* reads passed pawn with a weight of 1.05, clear path with 1.02, and half-open file with −1.84.

Nobody put that exception in. It was found by reading a table, and then confirmed on the network. That order matters, because the table is not always right, and the same test can be run on all of it. There are 120 pairs of a rule and a background fact. Call a pair an **exception** when switching the fact on makes the rule’s move less than half as likely, on the positions the rule decides. The network has six exceptions. The program of all 382 terms, run on the same positions, has nine: the same six and three more. Here they are, with how often the rule’s move is played when the fact is off and when it is on:

| rule | background fact | network, off | network, on | program, off | program, on |
| --- | --- | --- | --- | --- | --- |
| pawn runs | half-open file | 90 % | 6 % | 87 % | 6 % |
| squeeze | outpost | 70 % | 8 % | 74 % | 6 % |
| squeeze | knight on rim | 70 % | 10 % | 74 % | 10 % |
| squeeze | bad bishop | 70 % | 14 % | 73 % | 24 % |
| back-rank threat | knight on rim | 94 % | 30 % | 87 % | 11 % |
| back-rank threat | pawn chain | 93 % | 44 % | 85 % | 35 % |
| pawn runs | opposite bishops | 88 % | 51 % | 86 % | 29 % |
| back-rank threat | doubled pawns | 91 % | 76 % | 85 % | 41 % |
| mating attack | fianchetto | 95 % | 79 % | 94 % | 11 % |

The first six rows are exceptions of both. The rate with the fact off is the base to judge them by, and it differs from rule to rule: the network follows *squeeze* on only 70 % of the positions it decides even then. The last three rows are the program’s alone. With fianchetto on, its *mating attack* latent goes silent, as its weight of −0.57 on fianchetto says it should, and it attacks on 11 % of those positions. The network still attacks on 79 %. In each of the three the program has the direction right, since the network does follow the rule less often with the fact on, and the size wrong. A weight in the replacement is a hypothesis about the network, and the experiment that tests it is run on the network.

None of this was taught: the rule table has no exceptions. They come from training, and each training has its own. Over the eight, the networks have between 3 and 10 exceptions, 55 in all. Their programs flag 83 pairs and 48 of those are real. So the program finds 48 of the 55 exceptions, and 35 of the 83 pairs it flags are not exceptions. Half-open file under *pawn runs* belongs to the training shown here: it is an exception in none of the other seven.

### On a real chess network

This is a proposal, and I have not run it. Record the stream of a strong network on positions from games. Train a dictionary per layer, or a cross-layer transcoder, at several widths and sparsities. Label the latents against computed concepts first and with a labeller second, and keep the grades. For a position of interest, build the graph; for a class of positions, prune the wiring into a program. The test to run is the table above: fidelity on held-out positions against the number of terms, split by kind of move, next to the fidelity of the trivial program, with each surprising line checked by intervening on the network. I expect fidelity well under the toy’s. What a short program misses is then a measured quantity.

## What this can and cannot tell you

**It finds directions, and only directions.** Everything rests on concepts being directions that add. Engels and co-authors found language-model concepts that are not one direction, among them “circular features representing days of the week and months of the year”. A dictionary cuts such a concept into pieces.

**The dictionary is not unique.** Width and sparsity change which latents come out, and so does the random start. For one dictionary of 131,000 latents on a language model, Paulo and Belrose found that “only 30% of the features were shared across different seeds”. In the toy the eight trainings agree on all 32 facts, which I put down to the facts being independent and equally strong. They disagree on the rules, with six to nine live latents, and on the exceptions.

**There is always a remainder.** The toy’s full replacement misses the network’s move on 6 % of positions, and the error node holds what it missed. In large models the remainder is not small and not noise: Engels and co-authors report that “about half of the error vector itself and >90% of its norm” can be predicted linearly from the stream, so it has structure the dictionary did not capture.

**Attention is frozen, not explained.** A chess network moves information between squares with attention. The graphs take where it looked as given. Jenner and co-authors found a Leela network representing future moves and using attention to carry information “forward and backward in time”, which is the part a transcoder alone does not account for.

**A label is a guess with a grade.** Some grades will be low, and some latents will have no label at all.

**Finding concepts is not the same as being useful.** A team at Google DeepMind reported in 2025 that on a task of detecting harmful intent, autoencoder latents “underperformed linear probes”. A linear probe is one direction, fitted with labels to detect one chosen concept. If you already know which concept you are looking for, a probe trained for it is the stronger tool. The dictionary earns its place when you do not know what to look for.

**The toy is the method’s best case.** Its facts are directions, sparse and independent, with one layer, no attention and an answer key. Its network was also trained to write the rules along directions, the fourth assumption. Trained on the move alone, the same network follows the rule table more closely, on 99.3 % of positions or more in six trainings, and is harder to read: with the same settings the transcoder kept four to six latents alive, left 22 % to 45 % of the MLP’s output unexplained, and found a latent that matched above 0.5 for two to four of the six rules. Its full replacement picks its move on 86 % to 90 % of positions, where the network of this post gave 94 %. I did not tune it further for that network. A network is free to compute its move by any route that works, and nothing obliges the route to be the one in the answer key.

**The settings were chosen with the answer key.** The dictionary of 48 latents with three on, and the transcoder with one latent on for every two positions, were picked knowing that the toy has 32 facts with 2.8 on at a time, and six rules with half of one holding at a time. The tables above show what the same tools return at other settings. A real network gives no such knowledge, and the choice of width and sparsity is part of the uncertainty of the result.

## Back to the move

The opening asked why the network gave up a rook. The toy has no rooks to give. Its nearest position is the one with king exposed and queen near, and for it the account is three lines. The latents *king exposed* and *queen near* are on. Together they push *mating attack* over its threshold, with weights 0.96 and 0.91 against a constant of −0.93. The rule adds 8.9 to the score of *attack*, and attack wins.

Each line is a number read from a table, and each can be checked on the network. Run on the autoencoder’s latents, the whole account agrees with the toy network on 94 positions in 100, and a program of a hundred terms, which asks only whether each latent is on, on 95. Given the true facts, which only a toy can supply, the hundred terms agree on 98 in 100, and their worst kind of move comes out between 69 and 87 in 100 over the eight trainings. Some of what the table says about the network is wrong, and the network says which. On a real chess network I expect those numbers to be lower, some of the latents to have no name, and the remainder to be larger. The method does not close that gap. It measures it: every number above is a comparison with the network itself.

## Further reading

**Superposition and sparse codes.**

- N. Elhage, T. Hume, C. Olsson and co-authors, [*Toy Models of Superposition*](https://transformer-circuits.pub/2022/toy_model/index.html), Transformer Circuits Thread, 2022. Networks that store more sparse concepts than they have dimensions, and the polygons they arrange them in.
- B. A. Olshausen and D. J. Field, [*Emergence of simple-cell receptive field properties by learning a sparse code for natural images*](https://doi.org/10.1038/381607a0), Nature, 1996, and [*Sparse coding with an overcomplete basis set: a strategy employed by V1?*](https://doi.org/10.1016/S0042-6989(97)00169-7), Vision Research, 1997. Sparse codes over a learned dictionary, and then over one larger than its input.
- L. R. Welch, *Lower bounds on the maximum cross correlation of signals*, IEEE Transactions on Information Theory, 1974. The limit on how small all overlaps can be.
- E. J. Candès and M. B. Wakin, *An introduction to compressive sampling*, IEEE Signal Processing Magazine, 2008. Recovery of a sparse list from few measurements.

**Sparse autoencoders and how they are trained.**

- H. Cunningham, A. Ewart, L. Riggs, R. Huben and L. Sharkey, [*Sparse autoencoders find highly interpretable features in language models*](https://arxiv.org/abs/2309.08600), arXiv preprint, 2023; ICLR 2024.
- T. Bricken, A. Templeton, J. Batson and co-authors, [*Towards Monosemanticity: Decomposing Language Models With Dictionary Learning*](https://transformer-circuits.pub/2023/monosemantic-features/index.html), Transformer Circuits Thread, 2023. The L1 penalty, re-pointing of dead latents, and splitting as the dictionary widens.
- A. Makhzani and B. Frey, [*k-Sparse autoencoders*](https://arxiv.org/abs/1312.5663), arXiv preprint, 2013. Keep the k largest units and zero the rest.
- L. Gao, T. Dupré la Tour, H. Tillman and co-authors, [*Scaling and evaluating sparse autoencoders*](https://arxiv.org/abs/2406.04093), ICLR 2025. TopK on language models, and an auxiliary error term against dead latents.
- S. Rajamanoharan, A. Conmy, L. Smith and co-authors, [*Improving dictionary learning with gated sparse autoencoders*](https://arxiv.org/abs/2404.16014), arXiv preprint, 2024, and S. Rajamanoharan, T. Lieberum, N. Sonnerat and co-authors, [*Jumping ahead: improving reconstruction fidelity with JumpReLU sparse autoencoders*](https://arxiv.org/abs/2407.14435), arXiv preprint, 2024. Two cures for shrinkage.
- B. Bussmann, P. Leask and N. Nanda, [*BatchTopK sparse autoencoders*](https://arxiv.org/abs/2412.06410), arXiv preprint, 2024.
- B. Bussmann, N. Nabeshima, A. Karvonen and N. Nanda, [*Learning multi-level features with Matryoshka sparse autoencoders*](https://arxiv.org/abs/2503.17547), ICML 2025. Nested dictionaries of several widths trained together.

**Naming latents.**

- S. Bills, N. Cammarata, D. Mossing and co-authors, [*Language models can explain neurons in language models*](https://openaipublic.blob.core.windows.net/neuron-explainer/paper/index.html), OpenAI, 2023. Explain, simulate, and score, which the text above calls grading.
- G. Paulo, A. Mallen, C. Juang and N. Belrose, [*Automatically interpreting millions of features in large language models*](https://arxiv.org/abs/2410.13928), ICML 2025. Cheaper ways to grade a label.

**Transcoders and graphs.**

- J. Dunefsky, P. Chlenski and N. Nanda, [*Transcoders find interpretable LLM feature circuits*](https://arxiv.org/abs/2406.11944), NeurIPS 2024.
- E. Ameisen, J. Lindsey, A. Pearce and co-authors, [*Circuit Tracing: Revealing Computational Graphs in Language Models*](https://transformer-circuits.pub/2025/attribution-graphs/methods.html), and J. Lindsey, W. Gurnee, E. Ameisen and co-authors, [*On the Biology of a Large Language Model*](https://transformer-circuits.pub/2025/attribution-graphs/biology.html), Transformer Circuits Thread, 2025. Cross-layer transcoders, attribution graphs, error nodes, and how often the graphs help.
- G. Paulo, S. Shabalin and N. Belrose, [*Transcoders beat sparse autoencoders for interpretability*](https://arxiv.org/abs/2501.18823), arXiv preprint, 2025.
- S. Marks, C. Rager, E. J. Michaud, Y. Belinkov, D. Bau and A. Mueller, [*Sparse feature circuits: discovering and editing interpretable causal graphs in language models*](https://arxiv.org/abs/2403.19647), ICLR 2025. Graphs built from autoencoder latents.

**Chess networks.**

- T. McGrath, A. Kapishnikov, N. Tomašev and co-authors, [*Acquisition of chess knowledge in AlphaZero*](https://arxiv.org/abs/2111.09259), PNAS, 2022.
- L. Schut, N. Tomašev, T. McGrath, D. Hassabis, U. Paquet and B. Kim, [*Bridging the human–AI knowledge gap through concept discovery and transfer in AlphaZero*](https://arxiv.org/abs/2310.16410), PNAS, 2025.
- E. Jenner, S. Kapur, V. Georgiev, C. Allen, S. Emmons and S. Russell, [*Evidence of learned look-ahead in a chess-playing neural network*](https://arxiv.org/abs/2406.00877), NeurIPS 2024.
- A. Karvonen, B. Wright, C. Rager and co-authors, [*Measuring progress in dictionary learning for language model interpretability with board game models*](https://arxiv.org/abs/2408.00113), NeurIPS 2024. Autoencoders measured against the board, on models trained on game transcripts.
- R. Lin, Z. Jin, G. Zhou and co-authors, [*Tracing the thought of a grandmaster-level chess-playing transformer*](https://arxiv.org/abs/2604.10158), arXiv preprint, 2026.
- D. Monroe, G. Eilender, P. Chalmers and co-authors, [*Chessformer: a unified architecture for chess modeling*](https://arxiv.org/abs/2605.19091), arXiv preprint, 2026.

**Limits.**

- D. Chanin, J. Wilken-Smith, T. Dulka and co-authors, [*A is for absorption: studying feature splitting and absorption in sparse autoencoders*](https://arxiv.org/abs/2409.14507), arXiv preprint, 2024.
- J. Engels, E. J. Michaud, I. Liao, W. Gurnee and M. Tegmark, [*Not all language model features are one-dimensionally linear*](https://arxiv.org/abs/2405.14860), ICLR 2025.
- J. Engels, L. Riggs and M. Tegmark, [*Decomposing the dark matter of sparse autoencoders*](https://arxiv.org/abs/2410.14670), arXiv preprint, 2024.
- G. Paulo and N. Belrose, [*Sparse autoencoders trained on the same data learn different features*](https://arxiv.org/abs/2501.16615), arXiv preprint, 2025.
- L. Smith, S. Rajamanoharan, A. Conmy and co-authors, [*Negative results for SAEs on downstream tasks and deprioritising SAE research*](https://www.alignmentforum.org/posts/4uXCAJNuPKtKBsi28), Alignment Forum, 2025.
- L. Sharkey, B. Chughtai, J. Batson and co-authors, [*Open problems in mechanistic interpretability*](https://arxiv.org/abs/2501.16496), arXiv preprint, 2025.
