∇
Chapter 23 · Section 23.5 · 85 min

Superposition

Superposition is how a neural network stores more features than it has dimensions. A feature is a property of the input that the network keeps track of, such as "this text is Korean" or "this image contains a cat face". The network gives each feature its own direction in a layer's space of activations. When there are more features than dimensions, those directions cannot all be at right angles, so reading out one feature picks up a little of the others. That leak costs little when features are rarely active at the same time, and a ReLU with a small negative bias after the readout removes most of it.

The idea explains a puzzle that blocks the simplest way of reading a network. Pick one neuron in the MLP of a small language model and collect the text that makes it fire hardest. Bricken et al. (2023) did this for a one-layer Transformer whose MLP has 512 neurons. One neuron responds to academic citations, English dialogue, HTTP requests, and Korean text. Vision models do the same. Neuron 4e:55 of the image classifier InceptionV1 fires for cat faces, cat legs, and the fronts of cars (Olah et al. 2020). Images synthesized to excite it show that it looks for each of these separately (eyes and whiskers, furry legs, shiny car fronts), not for one property they share. A neuron that responds to several unrelated things is called polysemantic.

Polysemantic neurons have already caused trouble in this chapter. In §23.1, neuron 221 in the last layer of BERT seemed to mean song titles on one dataset and dates on another, because its top-activating sentences changed with the data. In §23.4, circuits through attention heads came out clean, while circuits through MLP neurons were hard to describe at all. A unit that mixes four unrelated concepts looks like a bug. This section shows that it is a compression scheme, and that a layer that compresses this way must have polysemantic neurons.

Here is the plan. We define features and superposition, and ask which layers have meaningful coordinates. We prove that a linear model cannot compress features this way. Then we study the smallest model that can, a toy that squeezes nn features through m<nm \lt n dimensions and decodes them with a ReLU (Elhage et al. 2022). We solve its two-feature case exactly, train it and watch features arrange themselves into opposite pairs and pentagons, and measure how large the leak is at the width of a real model. We connect the story to compressed sensing, the mathematics of recovering a sparse signal from few measurements. We end with the evidence that real models are in superposition. Interviews for interpretability roles ask about each of these steps, most often the two-feature derivation and the link to sparse autoencoders.

How strong is the evidence for all this? §23.1 ranked interpretability evidence on a ladder, from association (some quantity tracks a concept) up to mechanism (a full account confirmed by the interventions it predicts). This section is a theory of how features are stored. In the toy model, where we know the true features, it is confirmed at the level of mechanism. In real models it is supported only indirectly.

As in the rest of this chapter, vectors are rows and a matrix acts on the right, xW\mathbf{x}\mathbf{W}. The papers we follow write columns, and we translate where it matters.

Features, polysemantic neurons, and superposition

§23.2 stated the linear representation hypothesis. It says that a concept a model uses is a direction in its space of activations. How strongly the concept is present is how far the activation points along that direction. Superposition takes this as given and asks a counting question. If a layer has mm dimensions, how many such directions can it use?

Start with a tiny case. A layer has two neurons and must represent three features. Give feature 1 the direction (1,0)(1, 0), feature 2 the direction (0,1)(0, 1), and feature 3 the direction (0.71,0.71)(0.71, 0.71), halfway between them. If only feature 3 is present, with strength 1, the activation is (0.71,0.71)(0.71, 0.71), and both neurons fire. So neuron 1 responds to features 1 and 3, and neuron 2 responds to features 2 and 3. Packing three features into two neurons made both neurons polysemantic.

It also made the features leak into each other. Feature 3's direction has a cosine of 0.71 with each of the others. So if we read feature 1 by projecting onto (1,0)(1, 0), we get 0.71 when only feature 3 is on.

In plain words, features are the variables the model computes with, neurons are the places where the model's nonlinearity looks, and superposition means there are more variables than places. In the tiny case, n=3n = 3, m=2m = 2, and W\mathbf{W} has rows (1,0)(1, 0), (0,1)(0, 1), and (0.71,0.71)(0.71, 0.71). Each column of W\mathbf{W} has two nonzero entries, so each neuron is polysemantic.

Nobody has an agreed definition of a feature, and the definition above sidesteps the question. Elhage et al. (2022) list three candidates. A feature could be any function of the input, but then "cat or car" counts as much as "cat". It could be a property a human can name, but that excludes concepts we have no words for. Or it could be a property that a large enough network would reliably give a neuron of its own, which matches the intuition but is hard to test. Most work, including this section, uses the decomposition in item 1 and stays agnostic about the rest.

Superposition forces polysemantic neurons by a counting argument.

Proof. Suppose every neuron is monosemantic, so each of the mm columns of W\mathbf{W} has at most one nonzero entry. Then W\mathbf{W} has at most mm nonzero entries, so at most mm of its nn rows can be nonzero. Since n>mn \gt m, some feature has wi=0\mathbf{w}_i = \mathbf{0}, a contradiction. ∎

The converse fails. A layer with n≤mn \le m features can still have polysemantic neurons, if the feature directions are rotated away from the neuron axes. Whether that can happen depends on whether the neuron axes are special at all, which is the next question. In practice, the theorem is why counting neurons never counts features. An interviewer who asks "why are neurons polysemantic?" wants this counting argument first.

Privileged and non-privileged bases

When we say "neuron 4e:55" we read one coordinate of a layer. That makes sense only if the coordinates mean something. §5.1 showed with a small example that in the residual stream, the running vector that every Transformer block reads from and adds its output to, they do not. Take a stream (3,1)(3, 1) that a sublayer reads with the column (1,2)⊤(1, 2)^\top, so it reads 3+2=53 + 2 = 5. Rotate the stream by a quarter turn to (−1,3)(-1, 3), and rotate the read column to match, (−2,1)⊤(-2, 1)^\top. The sublayer still reads 2+3=52 + 3 = 5. Nothing downstream can tell that the coordinates changed.

A ReLU applied before the read would notice. The ReLU, max⁡(⋅,0)\max(\cdot, 0) applied to each coordinate, leaves (3,1)(3, 1) unchanged, so the original stream still reads 5. It turns the rotated stream (−1,3)(-1, 3) into (0,3)(0, 3), which reads 3. An operation that looks at each coordinate on its own is what makes coordinates special.

Two layers of a Transformer behave very differently under this test. Recall that an orthogonal matrix R\mathbf{R} satisfies RR⊤=I\mathbf{R}\mathbf{R}^\top = \mathbf{I}, so it is a rotation or reflection and preserves lengths.

In plain words, the residual stream has no preferred axes. Anything the model does in one basis it can do equally well in a rotated one. An MLP's hidden layer has axes that the ReLU looks at one by one, and the only harmless changes are relabeling the neurons and rescaling each by a positive number. So "neuron jj" is a meaningful unit and "residual coordinate jj" is not, at least in principle. Both proofs are short and sit in the derivations below.

∂ Proof that rotating the residual stream changes nothing

Write the stream at position tt after ℓ\ell blocks as xt(ℓ)\mathbf{x}^{(\ell)}_t. We claim that the new network's stream is x~t(ℓ)=xt(ℓ)R\tilde{\mathbf{x}}^{(\ell)}_t = \mathbf{x}^{(\ell)}_t\mathbf{R}. It holds at ℓ=0\ell = 0, since the embedding row becomes EvR\mathbf{E}_v\mathbf{R} (fold a learned position embedding the same way).

Suppose the claim holds before some sublayer. RMSNorm without its gain is x/rms⁡(x)\mathbf{x}/\operatorname{rms}(\mathbf{x}). Since R\mathbf{R} preserves length, rms⁡(xR)=∥xR∥/d=∥x∥/d\operatorname{rms}(\mathbf{x}\mathbf{R}) = \lVert\mathbf{x}\mathbf{R}\rVert/\sqrt d = \lVert\mathbf{x}\rVert/\sqrt d, so the normalized new stream is the normalized old stream times R\mathbf{R}. Every read then gives (xR)(R⊤Win)=xWin(\mathbf{x}\mathbf{R})(\mathbf{R}^\top\mathbf{W}_{\text{in}}) = \mathbf{x}\mathbf{W}_{\text{in}}, because RR⊤=I\mathbf{R}\mathbf{R}^\top = \mathbf{I}. So queries, keys, values, and MLP inputs are unchanged, and so is everything computed from them. Every write is cWoutR\mathbf{c}\mathbf{W}_{\text{out}}\mathbf{R}, the old write times R\mathbf{R}, and adding it keeps the claim true. At the end the logits are (x(L)R)(R⊤WU)=x(L)WU(\mathbf{x}^{(L)}\mathbf{R})(\mathbf{R}^\top\mathbf{W}_U) = \mathbf{x}^{(L)}\mathbf{W}_U.

LayerNorm also subtracts the mean, which is multiplication by I−1d1⊤1\mathbf{I} - \tfrac1d\mathbf{1}^\top\mathbf{1}. This commutes with R\mathbf{R} exactly when 1R=±1\mathbf{1}\mathbf{R} = \pm\mathbf{1}. The division by the standard deviation then sees the same length, since R\mathbf{R} preserves lengths. Its per-coordinate gain and shift fold into the next read as before. ∎

∂ Why only scaled permutations commute with ReLU

If M\mathbf{M} is a permutation with positive entries, ReLU⁡(zM)\operatorname{ReLU}(\mathbf{z}\mathbf{M}) permutes and positively rescales the entries of z\mathbf{z} before the ReLU. Since ReLU⁡(cu)=cReLU⁡(u)\operatorname{ReLU}(cu) = c\operatorname{ReLU}(u) for c>0c \gt 0, doing it after the ReLU gives the same result.

For the converse, let Mj\mathbf{M}_j be row jj of M\mathbf{M} and ej\mathbf{e}_j the jj-th basis row vector. Taking z=ej\mathbf{z} = \mathbf{e}_j gives ReLU⁡(Mj)=Mj\operatorname{ReLU}(\mathbf{M}_j) = \mathbf{M}_j, so every row is nonnegative. Taking z=ej−ek\mathbf{z} = \mathbf{e}_j - \mathbf{e}_k for j≠kj \ne k gives ReLU⁡(Mj−Mk)=ReLU⁡(ej−ek)M=Mj\operatorname{ReLU}(\mathbf{M}_j - \mathbf{M}_k) = \operatorname{ReLU}(\mathbf{e}_j - \mathbf{e}_k)\mathbf{M} = \mathbf{M}_j. Look at one column ll. If Mjl>0M_{jl} \gt 0, then max⁡(Mjl−Mkl,0)=Mjl\max(M_{jl} - M_{kl}, 0) = M_{jl} means Mjl−Mkl=MjlM_{jl} - M_{kl} = M_{jl}, so Mkl=0M_{kl} = 0. So no column has two positive entries. An invertible matrix has a nonzero entry in every row. With at most one positive entry per column and mm rows, each row has exactly one positive entry and each column receives exactly one. That is a permutation with positive entries.

GELU and SiLU are not positively homogeneous, so for them only permutations survive. Either way, a neuron basis is privileged up to relabeling the neurons (and, for ReLU, rescaling them).

Trained models are less symmetric than the theorem suggests. Large Transformers have a few residual coordinates whose values are up to 20 times larger than any other. These outlier features are what make 8-bit quantization of activations hard (Dettmers et al. 2022, §20.2). Elhage, Lasenby, and Olah (2023) asked where they come from, with a clean test.

The test treats the dd coordinates of one token's activation as dd samples and computes their kurtosis. Kurtosis is the average fourth power of the deviations from the mean, divided by the squared variance. A Gaussian has kurtosis 3, and heavy tails push it higher. If features pointed in random directions, each coordinate would be a sum of many random projections, so it would look Gaussian and the kurtosis would be about 3. The cell runs the test on made-up activations in which 30 of 768 coordinates are 8 times larger than the rest, and then on the same activations after a random rotation.

Python · cell 1

The stored basis gives a kurtosis of about 37, and the rotated one gives almost exactly 3. The rotation mixes every outlier coordinate into all 768 coordinates, so the heavy tail disappears. A kurtosis well above 3 therefore means that the activations line up with the basis they are stored in. The converse does not hold. If the feature values were themselves Gaussian, basis-aligned features would also give 3.

In a 200-million-parameter model with d=1,280d = 1{,}280, Elhage, Lasenby, and Olah found 20 to 60 outlier coordinates in a typical layer and a kurtosis far above 3. After a fixed random rotation of the same activations, the kurtosis fell to almost exactly 3, as in the cell. So the stream really does favor its own coordinates. Their provisional culprit is the optimizer. Adam gives every parameter its own step size, dividing by the root of that parameter's running average of squared gradients (§0.6). That per-coordinate scaling is the one operation in training that depends on the basis. This is an empirical finding about training, not a property of the architecture.

In practice this decides where to look for meaning. Neurons are worth reading in MLPs, never in the residual stream. Outlier coordinates in the stream are a training artifact to handle in quantization, not a concept. An interviewer will ask whether the residual stream has a privileged basis, and why outlier dimensions appear anyway.

Room for more features than dimensions

Why is n>mn \gt m possible at all? §1.3 proved the geometric fact. In mm dimensions, the cosine between two random unit directions has mean 0 and variance exactly 1/m1/m, so it is typically about ±1/m\pm 1/\sqrt m. At m=768m = 768 that is ±0.036\pm 0.036. And there are at least emε2/4e^{m\varepsilon^2/4} directions whose pairwise cosines are all smaller than ε\varepsilon in size. At m=4,096m = 4{,}096 and ε=0.1\varepsilon = 0.1 that is about 28,000 directions, seven times mm, and the count grows exponentially with mm. So a layer can give far more than mm features nearly orthogonal directions.

The catch is the leak. Reading feature ii back by projecting onto its direction picks up a little of every other active feature. This leak is called interference, and the question is whether the model can live with it.

A linear model cannot do anything clever about interference. The proof is worth seeing, because it shows exactly what a nonlinearity buys. Here is the idea on one feature. Take a feature that is zero 90 percent of the time and otherwise uniform on [0,1][0, 1]. Its mean is 0.050.05, and its variance is 0.1/3−0.052≈0.03080.1/3 - 0.05^2 \approx 0.0308. A Gaussian feature with the same mean and variance is never zero. Yet any linear reconstruction has exactly the same expected squared error on both, because that error depends only on means and covariances. The sparsity is invisible to it.

The proof uses the Frobenius norm ∥M∥F\lVert\mathbf{M}\rVert_F, the square root of the sum of the squares of all entries of a matrix. It also uses the Eckart-Young theorem of §0.10, which says that the best rank-mm approximation of a matrix in this norm keeps its mm largest singular values.

∂ Proof that a linear model sees only two moments

Let D=diag⁡(I1,…,In)\mathbf{D} = \operatorname{diag}(I_1, \dots, I_n) and write the error as e=x(I−A)−b\mathbf{e} = \mathbf{x}(\mathbf{I} - \mathbf{A}) - \mathbf{b}. Its mean is c=μ(I−A)−b\mathbf{c} = \boldsymbol\mu(\mathbf{I} - \mathbf{A}) - \mathbf{b} and its covariance is (I−A)⊤Σ(I−A)(\mathbf{I} - \mathbf{A})^\top\boldsymbol\Sigma(\mathbf{I} - \mathbf{A}), so

E∑iIiei2=∑iIici2+tr⁡ ⁣(D(I−A)⊤Σ(I−A)),\mathbb{E}\sum_i I_i e_i^2 = \sum_i I_i c_i^2 + \operatorname{tr}\!\big(\mathbf{D}(\mathbf{I} - \mathbf{A})^\top\boldsymbol\Sigma(\mathbf{I} - \mathbf{A})\big),

which involves only μ\boldsymbol\mu and Σ\boldsymbol\Sigma. The best b\mathbf{b} makes c=0\mathbf{c} = \mathbf{0}. With Σ=diag⁡(σi2)\boldsymbol\Sigma = \operatorname{diag}(\sigma_i^2), the trace is ∥Σ1/2(I−A)D1/2∥F2=∥N−Σ1/2AD1/2∥F2\lVert\boldsymbol\Sigma^{1/2}(\mathbf{I} - \mathbf{A})\mathbf{D}^{1/2}\rVert_F^2 = \lVert\mathbf{N} - \boldsymbol\Sigma^{1/2}\mathbf{A}\mathbf{D}^{1/2}\rVert_F^2 with N=diag⁡(σiIi)\mathbf{N} = \operatorname{diag}(\sigma_i\sqrt{I_i}). The subtracted matrix has rank at most mm. By Eckart-Young, the trace is at least the sum of the squares of the n−mn - m smallest singular values of the diagonal matrix N\mathbf{N}, which are the n−mn - m smallest Iiσi2I_i\sigma_i^2. Keeping the top mm coordinates (A\mathbf{A} diagonal with mm ones) attains it. ∎

In plain words, a linear model sees only means and covariances, and a sparse feature has the same mean and variance as some dense feature. So however sparse the features are, a linear model represents at most mm of them, the most important ones. That is what principal component analysis does, keeping the mm directions of largest variance. To exploit sparsity the model must be nonlinear. An interviewer who asks "what exactly does the ReLU add?" is looking for this argument.

The toy model of superposition

Elhage et al. (2022) built the smallest model that can exploit sparsity. It compresses nn features into m<nm \lt n dimensions with a linear map. It decompresses with the transpose of the same map, adds a bias, and applies a ReLU.

In plain words, each feature gets an arrow Wi\mathbf{W}_i in a small space. The hidden vector h\mathbf{h} is the sum of the arrows, each scaled by its feature's value. Each feature is read back by projecting onto its own arrow, adding a bias, and clipping at zero. Entry (i,j)(i, j) of the n×nn\times n matrix WW⊤\mathbf{W}\mathbf{W}^\top is the dot product Wi⋅Wj\mathbf{W}_i\cdot\mathbf{W}_j, so the readout of feature ii is

xi′=ReLU⁡(∥Wi∥2xi+∑j≠i(Wi⋅Wj) xj+bi).x'_i = \operatorname{ReLU}\Big(\lVert\mathbf{W}_i\rVert^2 x_i + \sum_{j\ne i}(\mathbf{W}_i\cdot\mathbf{W}_j)\,x_j + b_i\Big).

That is the signal, plus interference from every other active feature, plus a bias. The importance IiI_i stands in for how much the downstream loss cares about feature ii.

Two details matter. First, the hidden layer has no nonlinearity, so by the section on privileged bases its basis is not privileged. Replacing W\mathbf{W} by WR\mathbf{W}\mathbf{R} for an orthogonal R∈Rm×m\mathbf{R} \in \R^{m\times m} leaves WW⊤\mathbf{W}\mathbf{W}^\top, and hence the model, unchanged. That is why we always look at WW⊤\mathbf{W}\mathbf{W}^\top and at angles between rows, never at single hidden coordinates. Second, the bias lets the model set a feature it does not represent to that feature's mean, and, as we will see, subtract small amounts of interference.

The ReLU is what makes sparsity useful, and the smallest example shows why.

The two arrows point in opposite directions, so we call this arrangement an antipodal pair. The cell reproduces the three cases, with and without the ReLU.

Python · cell 2

The hand example generalizes into one formula that explains most of this section. When features are very sparse, the inputs with two or more active features are rare, and the loss is dominated by inputs with exactly one feature on. On those inputs only positive overlaps cost anything.

Proof. With only xjx_j nonzero, the readout formula gives xj′=ReLU⁡(∥Wj∥2xj+bj)x'_j = \operatorname{ReLU}(\lVert\mathbf{W}_j\rVert^2 x_j + b_j) and xi′=ReLU⁡((Wi⋅Wj)xj+bi)x'_i = \operatorname{ReLU}((\mathbf{W}_i\cdot\mathbf{W}_j)x_j + b_i) for i≠ji \ne j. The true value of every inactive feature is 0, so its error is xi′2x'^2_i. ∎

The input with every feature off costs ∑iIiReLU⁡(bi)2\sum_i I_i\operatorname{ReLU}(b_i)^2, which is zero whenever no bias is positive. So in the sparse limit the loss is a weighted sum of these one-feature-on errors.

In plain words, the first term rewards representing feature jj, which Elhage et al. (2022) call the feature benefit. The second term charges for interference, but a negative overlap Wi⋅Wj<0\mathbf{W}_i\cdot\mathbf{W}_j \lt 0 costs nothing, because the ReLU clips it to zero. A negative bias bib_i also cancels small positive overlaps. A linear model has no ReLU, so it pays for overlaps of both signs. This is why sparse features push a ReLU model toward arrangements whose overlaps are mostly negative, such as the antipodal pair and the pentagon we will meet below.

Reading a toy model's weights

Before training anything, we need ways to read a trained W\mathbf{W} that do not depend on the arbitrary hidden basis. The first is WW⊤\mathbf{W}\mathbf{W}^\top itself. Its diagonal holds the squared lengths ∥Wi∥2\lVert\mathbf{W}_i\rVert^2, which say whether a feature is represented at all (about 1 if it is, about 0 if it was dropped). Its off-diagonal entries are the interference weights. The second is a measure of how much of a dimension each feature gets.

Take the antipodal pair again, with rows 11 and −1-1. Feature 1 has squared length 1. The total squared weight lying along its direction is 121^2 from itself plus (−1)2(-1)^2 from feature 2, which is 2. Feature 1 owns half of what lies on its axis, so we say it gets half a dimension. A feature alone on its axis would own all of it, one full dimension.

In plain words, the numerator says how strongly feature ii is represented. The denominator says how much total weight, feature ii's own included, lies along feature ii's direction. A feature alone on its axis gets Di=1D_i = 1. Every represented feature has ∥Wi∥2≈1\lVert\mathbf{W}_i\rVert^2 \approx 1, so ∥W∥F2=∑i∥Wi∥2\lVert\mathbf{W}\rVert_F^2 = \sum_i\lVert\mathbf{W}_i\rVert^2 roughly counts the represented features. So D⋆D^\star is the number of dimensions divided by the number of features stored. Rotations of the hidden space change neither quantity. Scaling every row by the same factor leaves DiD_i unchanged but changes D⋆D^\star.

How do these numbers add up across features? The answer needs one more term. A set of directions is a tight frame if it spreads evenly over the space, so that every unit direction u\mathbf{u} receives the same total squared weight, ∑j(u⋅Wj)2=c\sum_j(\mathbf{u}\cdot\mathbf{W}_j)^2 = c. In matrix form that is W⊤W=c Im\mathbf{W}^\top\mathbf{W} = c\,\mathbf{I}_m. An antipodal pair, a regular pentagon in the plane, and a regular tetrahedron in three dimensions are all tight frames.

∂ Proof that the dimensionalities add up to at most m

Let G=W⊤W=∑jWj⊤Wj∈Rm×m\mathbf{G} = \mathbf{W}^\top\mathbf{W} = \sum_j\mathbf{W}_j^\top\mathbf{W}_j \in \R^{m\times m}. The denominator of DiD_i is ∑j(W^iWj⊤)2=W^iGW^i⊤\sum_j(\hat{\mathbf{W}}_i\mathbf{W}_j^\top)^2 = \hat{\mathbf{W}}_i\mathbf{G}\hat{\mathbf{W}}_i^\top. Assume first that G\mathbf{G} is invertible. For a unit vector u\mathbf{u}, the Cauchy-Schwarz inequality applied to uG1/2\mathbf{u}\mathbf{G}^{1/2} and uG−1/2\mathbf{u}\mathbf{G}^{-1/2} gives 1=(uu⊤)2≤(uGu⊤)(uG−1u⊤)1 = (\mathbf{u}\mathbf{u}^\top)^2 \le (\mathbf{u}\mathbf{G}\mathbf{u}^\top)(\mathbf{u}\mathbf{G}^{-1}\mathbf{u}^\top), so 1/(uGu⊤)≤uG−1u⊤1/(\mathbf{u}\mathbf{G}\mathbf{u}^\top) \le \mathbf{u}\mathbf{G}^{-1}\mathbf{u}^\top. Therefore

∑iDi≤∑i∥Wi∥2 W^iG−1W^i⊤=tr⁡(G−1∑iWi⊤Wi)=tr⁡(G−1G)=m.\sum_i D_i \le \sum_i \lVert\mathbf{W}_i\rVert^2\,\hat{\mathbf{W}}_i\mathbf{G}^{-1}\hat{\mathbf{W}}_i^\top = \operatorname{tr}\Big(\mathbf{G}^{-1}\sum_i\mathbf{W}_i^\top\mathbf{W}_i\Big) = \operatorname{tr}(\mathbf{G}^{-1}\mathbf{G}) = m .

If G\mathbf{G} has rank r<mr \lt m, every row lies in the rr-dimensional row space of W\mathbf{W}, and the same argument inside that subspace gives ∑iDi≤r\sum_i D_i \le r. For a tight frame the denominator is W^i(cI)W^i⊤=c\hat{\mathbf{W}}_i(c\mathbf{I})\hat{\mathbf{W}}_i^\top = c. Taking the trace of G=cIm\mathbf{G} = c\mathbf{I}_m gives cm=∑i∥Wi∥2cm = \sum_i\lVert\mathbf{W}_i\rVert^2, which is NN for NN unit rows, so Di=1/c=m/ND_i = 1/c = m/N. ∎

Equality in the Cauchy-Schwarz step holds exactly when uG\mathbf{u}\mathbf{G} is parallel to u\mathbf{u}, that is, when every feature direction is an eigenvector of G\mathbf{G}. Tight frames satisfy this. It is the precise version of the observation in Elhage et al. (2022) that the dimensionalities add up to mm when features are packed efficiently.

In plain words, a model has mm dimensions to hand out and never hands out more. When features are packed as evenly as possible, each gets an equal share.

Warm-up

Read a toy model's weights

Write three functions that read a toy model's weights W, an array of shape (n, m) with one row per feature.

  • interference(W) returns the n×nn\times n matrix WW⊤\mathbf{W}\mathbf{W}^\top with its diagonal set to zero, so that only the overlaps between different features remain.
  • feature_dims(W) returns the vector of dimensionalities DiD_i, with Di=0D_i = 0 for a zero row.
  • dims_per_feature(W) returns D⋆=m/∥W∥F2D^\star = m/\lVert\mathbf{W}\rVert_F^2.
Tests, hints, verified solutions, and AI help, with Pro at $7.99 a month.

Two features in one dimension, solved exactly

The hand example showed that the antipodal pair is perfect when at most one feature is active. When is that worth the cost of the times both are on? With two features and one hidden dimension we can answer exactly.

Let feature 1 have importance I1=1I_1 = 1 and feature 2 importance I2=II_2 = I. Relabeling the features swaps their roles, so we may take I≤1I \le 1, which makes feature 2 the less important one. The two features are independent, each 0 with probability SS and otherwise uniform on [0,1][0, 1], with density p=1−Sp = 1 - S.

We need three moments of one feature. With probability pp it is a Uniform⁡[0,1]\operatorname{Uniform}[0, 1] variable UU, with EU=12\mathbb{E}U = \tfrac12 and EU2=13\mathbb{E}U^2 = \tfrac13, and otherwise it is 0. So

E[xi]=p2,E[xi2]=p3,Var⁡(xi)=p3−p24.\mathbb{E}[x_i] = \frac p2, \qquad \mathbb{E}[x_i^2] = \frac p3, \qquad \operatorname{Var}(x_i) = \frac p3 - \frac{p^2}4 .

Now compare two candidate solutions.

Dedicated. Give feature 1 the dimension, W=(1,0)⊤\mathbf{W} = (1, 0)^\top, with b1=0b_1 = 0. Then x1′=ReLU⁡(x1)=x1x'_1 = \operatorname{ReLU}(x_1) = x_1 is always exact. Feature 2 is not represented, so x2′=ReLU⁡(b2)x'_2 = \operatorname{ReLU}(b_2), a constant. The best constant under squared error is the mean, b2=E[x2]=p/2b_2 = \mathbb{E}[x_2] = p/2, and its error is the variance. The loss is

Lded=I(p3−p24).\mathcal{L}_{\text{ded}} = I\Big(\frac p3 - \frac{p^2}4\Big).

With b2=0b_2 = 0 instead, the loss would be I E[x22]=Ip/3I\,\mathbb{E}[x_2^2] = Ip/3, which is worse. The bias is part of the solution.

Antipodal. Take W=(1,−1)⊤\mathbf{W} = (1, -1)^\top and b=0\mathbf{b} = \mathbf{0}. When at most one feature is on, the output is exact, as in the hand example. Both are on with probability p2p^2. Say x1≥x2x_1 \ge x_2. Then h=x1−x2≥0h = x_1 - x_2 \ge 0, so x1′=x1−x2x'_1 = x_1 - x_2 and x2′=0x'_2 = 0. Both errors equal x2=min⁡(x1,x2)x_2 = \min(x_1, x_2), and the weighted squared error is (1+I)min⁡(x1,x2)2(1 + I)\min(x_1, x_2)^2. The case x2>x1x_2 \gt x_1 is the mirror image.

For two independent uniforms, P[min⁡(U1,U2)>u]=(1−u)2\mathbb{P}[\min(U_1, U_2) \gt u] = (1 - u)^2, so the minimum has density 2(1−u)2(1 - u) on [0,1][0, 1] and

E[min⁡(U1,U2)2]=∫01u2⋅2(1−u) du=2(13−14)=16.\mathbb{E}\big[\min(U_1, U_2)^2\big] = \int_0^1 u^2\cdot 2(1 - u)\,du = 2\Big(\frac13 - \frac14\Big) = \frac16 .

So the loss is

Lanti=(1+I) p26.\mathcal{L}_{\text{anti}} = (1 + I)\,\frac{p^2}{6}.

Antipodal wins when (1+I)p2/6<I(p/3−p2/4)(1 + I)p^2/6 \lt I(p/3 - p^2/4). Divide by p>0p \gt 0 and multiply by 12 to get 2(1+I)p<4I−3Ip2(1 + I)p \lt 4I - 3Ip, that is, (2+5I)p<4I(2 + 5I)p \lt 4I.

In plain words, store the second feature on top of the first, pointing the other way, whenever the features are sparse enough that they are seldom on together. For equal importance the switch is at density 4/7≈0.574/7 \approx 0.57, that is, S>3/7S \gt 3/7. For I=0.5I = 0.5 it is at p=4/9p = 4/9 (S>5/9S \gt 5/9), and for I=0.2I = 0.2 at p=4/15p = 4/15 (S>11/15S \gt 11/15). The less a feature matters, the sparser it must be to earn a share of the dimension.

The cell checks both formulas by computing the expected loss exactly. It splits on which features are on (both, only one, or neither) and integrates each case on a fine grid. Then it asks a numerical optimizer for the best (W,b)(\mathbf{W}, \mathbf{b}) it can find, starting from each candidate.

Python · cell 3

The formulas match to four decimals. The optimizer adds a caveat. At S=0.5S = 0.5, I=1I = 1 it finds a loss of 0.0763, below both candidates, with W≈(0.97,−0.97)⊤\mathbf{W} \approx (0.97, -0.97)^\top and small positive biases b≈(0.10,0.10)\mathbf{b} \approx (0.10, 0.10). When both features are on, the antipodal readout comes out too small, and the positive bias lifts it. That costs a little when a feature is off or alone. The two candidates explain the shape of the answer, and the full optimum refines it.

The change from one solution to the other is abrupt. At I=0.32I = 0.32 the best W2W_2 shrinks from about −0.88-0.88 at density 0.32 to about −0.74-0.74 at 0.385, and then jumps to exactly 0 by 0.39. Physics calls this a first-order phase change. The optimal loss is the smaller of two smooth curves, so the loss itself is continuous. Its slope jumps where the curves cross, and the optimal weights jump with it.

The widget draws the whole plane of densities and importances. Its shading shows which of three candidates wins in closed form, keeping feature 1, keeping feature 2, or the antipodal pair. The line is the boundary from the theorem. The dots mark where the best solution an optimizer finds drops a feature. At the ring you drag, the side panel compares the losses and weights of the closed-form winner with those of that best solution.

When does a model store a second feature antipodally instead of dropping it?
Two features share one hidden dimension. Drag the ring across density and importance to see which solution wins.
Loading interactive figure…

This derivation is a favorite interview question, because it fits on a whiteboard and tests probability, optimization, and judgment at once. The judgment part is saying that it compares candidate solutions, not all solutions.

Core

The two-feature phase boundary

Work out the two-feature, one-dimension toy model in closed form. The two features are independent, each 0 with probability SS and otherwise Uniform⁡[0,1]\operatorname{Uniform}[0, 1]. Feature 1 has importance 1 and feature 2 has importance II, for any I>0I \gt 0.

  • expected_losses(S, I) returns the pair (dedicated loss, antipodal loss), the expected weighted squared errors of two solutions. The dedicated solution gives the dimension to the more important feature, with weight 1 and bias 0, and outputs the other feature's mean through its bias. The antipodal solution is W=(1,−1)⊤\mathbf{W} = (1, -1)^\top with b=0\mathbf{b} = \mathbf{0}.
  • boundary_density(I) returns the density 1−S1 - S below which the antipodal solution has the smaller loss.

The setup provides mc_two_feature_losses(S, I), a Monte Carlo estimate of both losses with standard errors, to compare against.

Tests, hints, verified solutions, and AI help, with Pro at $7.99 a month.

Watching superposition form

Two features in one dimension fit in a box of algebra. For more features we train the model, and training needs the gradient. The gradient of the toy model is a classic interview problem, because W\mathbf{W} is used twice, once to encode and once to decode, and the chain rule has to collect both uses.

Interview

Forward and backward of the toy model

Write toy_loss_and_grads(W, b, X, I). The inputs are a batch X of shape (B, n), weights W of shape (n, m), a bias b of shape (n,), and importances I of shape (n,). The model is X′=ReLU⁡(XWW⊤+b)\mathbf{X}' = \operatorname{ReLU}(\mathbf{X}\mathbf{W}\mathbf{W}^\top + \mathbf{b}), and the loss is L=1B∑batch∑iIi(xi−xi′)2\mathcal{L} = \frac1B\sum_{\text{batch}}\sum_i I_i(x_i - x'_i)^2.

Return (loss, dW, db), where dW is ∂L/∂W\partial\mathcal{L}/\partial\mathbf{W} and db is ∂L/∂b\partial\mathcal{L}/\partial\mathbf{b}. Use no loops and no autograd. The trainer in the next cell contains one solution, so try this first.

Tests, hints, verified solutions, and AI help, with Pro at $7.99 a month.

The trainer below runs four models at once, with a leading batch dimension on every array. It uses Adam (§0.6) and keeps the best of the four runs, since small toy models often settle in worse arrangements. Our first experiment is the one in Elhage et al. (2022), five features of equal importance in two dimensions at density 0.05.

Python · cell 4

Now play with it. The widget trains the same model in your browser, four runs at a time, and replays the training of the best one. Watch features appear as the density falls, and see how unequal importances deform the picture.

How many features can two dimensions hold, and what decides it?
A model squeezes n sparse features through two hidden dimensions. Each arrow is one feature’s direction.
Loading interactive figure…

Next comes the larger experiment of Elhage et al. (2022), twenty features in five dimensions with importances Ii=0.7iI_i = 0.7^i. Feature 0 matters most, and feature 19 matters about 10−310^{-3} as much. We train one model at each of four densities and show WW⊤\mathbf{W}\mathbf{W}^\top.

Python · cell 5

At density 1 the model behaves like the linear model of the theorem above. It represents exactly the five most important features, orthogonally (WW⊤\mathbf{W}\mathbf{W}^\top is a 5×55\times5 identity block), with D⋆=1.0D^\star = 1.0. It sets the other features to their means through positive biases. As the density falls, the count of represented features grows to 8, 9, and 10, and D⋆D^\star drops to 0.62, 0.55, and 0.48. Off-diagonal blocks appear in WW⊤\mathbf{W}\mathbf{W}^\top. The most negative bias goes from 0 to about −0.13-0.13, as the model pays to filter interference.

Which features share? Computing DiD_i for these runs with the functions of Exercise 23.5a answers it. At density 0.3, features 0 and 1 still have Di=1D_i = 1, while features 2 to 7 have DiD_i between 0.44 and 0.55, mostly antipodal pairs. At density 0.1 only feature 0 keeps a dimension of its own. At 0.03 all ten represented features have Di≈1/2D_i \approx 1/2, five antipodal pairs. So the features that enter superposition first are the less important ones. That ordering is the two-feature theorem again. A feature of small importance must be sparse to earn a share of a dimension, and the important features keep a dimension of their own as long as they can.

What about many equal features? Elhage et al. (2022) trained n=400n = 400 features into m=30m = 30 dimensions and plotted D⋆D^\star against sparsity. It does not fall smoothly. It sits at 1, then at 1/21/2 over a wide range, and the weights show why, since they are antipodal pairs. Beyond that it keeps falling, and the individual DiD_i cluster at a few special values.

The PyTorch version below sweeps the density for fifty equal features in five dimensions and prints D⋆D^\star, so you can see the plateau at one half.

🔥 In PyTorchfor a machine with PyTorch

In our run, D⋆D^\star is 1.02 at density 1 and 0.89 at 0.66. It is 0.505 and 0.490 at densities 0.43 and 0.29, where exactly ten rows (five antipodal pairs) are represented. It then falls through 0.35, 0.28, and lower as more features crowd in.

The run also shows why D⋆D^\star is the right measure when features are dense. At density 1 only two rows have norm above 0.5, yet D⋆≈1D^\star \approx 1. With equal importances and dense data, one five-dimensional subspace of feature space is nearly as good as any other. So the model spreads its capacity over many features with small weights, rather than choosing five of them. Counting rows assumes that the model singles out individual features, which it need not do when they are dense. ∥W∥F2\lVert\mathbf{W}\rVert_F^2 counts the dimensions in use, whichever directions the model chose.

How much interference, and what the bias does

The toy models are small. How large is interference in a layer the size of a real model's? Suppose nn features have random unit directions in Rm\R^m. Feature ii is off, and kk other features are on, with values aja_j. Feature ii's readout before the ReLU is then pure interference, ri=∑jaj W^i⋅W^jr_i = \sum_{j}a_j\,\hat{\mathbf{W}}_i\cdot\hat{\mathbf{W}}_j. It is a sum of kk small random cosines, each scaled by its feature's value.

Proof. Each cosine cj=W^i⋅W^jc_j = \hat{\mathbf{W}}_i\cdot\hat{\mathbf{W}}_j has mean 0 by symmetry. Its variance is 1/m1/m, because the mm squared coordinates of a uniform unit vector have equal means that sum to 1 (§1.3). The terms ajcja_jc_j are independent, each with mean Eaj Ecj=0\mathbb{E}a_j\,\mathbb{E}c_j = 0 and variance Eaj2 Ecj2=s2/m\mathbb{E}a_j^2\,\mathbb{E}c_j^2 = s^2/m, so the variances add to ks2/mks^2/m. ∎

For features of value 1, s=1s = 1. For the toy's Uniform⁡[0,1]\operatorname{Uniform}[0, 1] values, s2=1/3s^2 = 1/3. The cell checks both, and then computes the numbers for the real-scale example below.

Python · cell 6

This is where the bias earns its place. The ReLU deletes interference that comes out negative. Interference that comes out positive passes through, unless the bias is negative enough to cut it off. A negative bias bi=−τb_i = -\tau turns the readout into ReLU⁡(signal+interference−τ)\operatorname{ReLU}(\text{signal} + \text{interference} - \tau). That is a threshold detector, which reports feature ii only when its projection clears τ\tau. The cost is that true activations below τ\tau are lost, and those above are shrunk by τ\tau. The model offsets the shrinkage by lengthening Wi\mathbf{W}_i, as the pentagon showed.

In practice, k/m\sqrt{k/m} is the number to carry into a design review. It says how many features a layer can keep active at once before readouts drown. An interviewer may hand you mm, nn, and a firing rate and ask for it.

Superposition is compressed sensing with a cheap decoder

The toy model solves a compression problem. The hidden vector h=xW\mathbf{h} = \mathbf{x}\mathbf{W} is mm linear measurements of an nn-dimensional sparse vector, and the decoder must recover x\mathbf{x} from them. Recovering a sparse signal from few linear measurements is the subject of compressed sensing, a major line of applied mathematics since the mid-2000s.

Without sparsity, recovery is impossible. With m<nm \lt n measurements, there is an (n−m)(n - m)-dimensional set of inputs that measure to zero (the null space), and any two inputs that differ by such a vector look identical. Sparsity changes this. If two kk-sparse vectors had the same measurements, their difference would be a 2k2k-sparse vector in the null space. So every kk-sparse vector is determined by its measurements exactly when every 2k2k rows of W\mathbf{W} (columns, in the usual column notation) are linearly independent, which needs m≥2km \ge 2k.

Finding the vector by trying every possible set of active features is a combinatorial search. The remarkable fact is that a convex program finds it. Among all vectors with the right measurements, pick the one with the smallest sum of absolute values, the ℓ1\ell_1 norm. This program is called basis pursuit.

How does the toy decoder compare with ℓ1\ell_1 minimization? It is exactly one step of the standard iterative algorithm for it. For nonnegative signals, the penalized form of the problem is min⁡z≥0 12∥zW−h∥2+λ∑izi\min_{\mathbf{z}\ge 0}\ \tfrac12\lVert\mathbf{z}\mathbf{W} - \mathbf{h}\rVert^2 + \lambda\sum_i z_i, where λ>0\lambda \gt 0 trades fit against sparsity.

Proof. At z0=0\mathbf{z}_0 = \mathbf{0} the gradient of 12∥zW−h∥2\tfrac12\lVert\mathbf{z}\mathbf{W} - \mathbf{h}\rVert^2 is (0W−h)W⊤=−hW⊤(\mathbf{0}\mathbf{W} - \mathbf{h})\mathbf{W}^\top = -\mathbf{h}\mathbf{W}^\top, so the gradient step gives hW⊤\mathbf{h}\mathbf{W}^\top. The nonnegative shrinkage subtracts λ\lambda and clips at 0. ∎

So the toy model decodes by correlating once and thresholding once, with no further iterations. The correlation step leaves every bit of interference in place, and only the threshold removes any of it. Iterating would subtract the interference that the current estimate explains, which is how ISTA converges to the ℓ1\ell_1 solution. Stopping after one step is why the toy needs much sparser features than compressed sensing does. The step size is also off. The standard convergence guarantee for ISTA asks for a step η≤1/∥W∥22\eta \le 1/\lVert\mathbf{W}\rVert_2^2, where ∥W∥2\lVert\mathbf{W}\rVert_2 is the largest singular value. For n>mn \gt m unit rows, ∥W∥22≥∥W∥F2/m=n/m>1\lVert\mathbf{W}\rVert_2^2 \ge \lVert\mathbf{W}\rVert_F^2/m = n/m \gt 1, so the toy's unit step is larger than the safe one.

The cell shows the gap. It uses random 24×6424\times64 measurement matrices and nonnegative kk-sparse signals. It compares exact recovery by basis pursuit with the best one-step decoder we can give the toy, which correlates once and keeps the kk largest entries. That decoder is even told the true kk, which the toy is not.

Python · cell 7

With 24 measurements of 64 features, ℓ1\ell_1 minimization recovers every 1- to 4-sparse signal in these trials and 95 percent of the 6-sparse ones. The one-step decoder already fails on a third of the 2-sparse signals, and on every signal from k=4k = 4 on. Compressed sensing says the information survives the compression. The toy model says how much of it a single ReLU layer can extract, and the answer is much less.

This also frames §23.6. A sparse autoencoder learns an encoder ReLU⁡(xWenc+benc)\operatorname{ReLU}(\mathbf{x}\mathbf{W}_{\text{enc}} + \mathbf{b}_{\text{enc}}), trained so that its sparse code reconstructs the activations through a dictionary of directions. Its encoder again correlates once and thresholds once, but with learned weights that need not be the transpose of the dictionary. It does sparse recovery with a trained network in one pass, instead of with an iterative solver for each input. Neuroscience met the same problem for natural images and solved it with sparse coding (Olshausen and Field 1996). An interviewer will ask how superposition relates to compressed sensing and why the toy needs more sparsity. The one-step-of-ISTA theorem is the answer.

Interview

Sparse recovery with ISTA

Write the three pieces of ISTA for min⁡z12∥Φz−y∥2+λ∥z∥1\min_{\mathbf{z}}\tfrac12\lVert\boldsymbol\Phi\mathbf{z} - \mathbf{y}\rVert^2 + \lambda\lVert\mathbf{z}\rVert_1, in the column notation of compressed sensing. Here Φ\boldsymbol\Phi has shape (m, n) and y\mathbf{y} has shape (m,), and the signal may have either sign.

  • soft_threshold(u, t) returns sign⁡(u)max⁡(∣u∣−t,0)\operatorname{sign}(u)\max(\lvert u\rvert - t, 0) elementwise. It shrinks every entry toward zero by tt.
  • ista(Phi, y, lam, steps) starts at z=0\mathbf{z} = \mathbf{0}. Each step is a gradient step of size 1/L1/L, with L=∥Φ∥22L = \lVert\boldsymbol\Phi\rVert_2^2 the largest squared singular value, followed by soft-thresholding at λ/L\lambda/L.
  • recovery_rate(n, m, k, trials, rng, lam=0.01, steps=1000, tol=0.1) runs trials random trials. Each draws Φ\boldsymbol\Phi with independent N(0,1/m)\mathcal{N}(0, 1/m) entries and a kk-sparse x\mathbf{x} with standard normal nonzeros on a random support, then runs ISTA on y=Φx\mathbf{y} = \boldsymbol\Phi\mathbf{x}. Return the fraction of trials with ∥z−x∥≤tol ∥x∥\lVert\mathbf{z} - \mathbf{x}\rVert \le \text{tol}\,\lVert\mathbf{x}\rVert.
Tests, hints, verified solutions, and AI help, with Pro at $7.99 a month.

Correlated features, computation, and memorization

Everything so far assumed independent features. Real features are often correlated (fur, ears, and eyes appear together) or anticorrelated (a token is French or Korean, rarely both). Elhage et al. (2022) modeled both. In a correlated set, one random draw decides whether all of the set's features are on together. In an anticorrelated set, the set is active with probability 1−S1 - S, and then exactly one of its features, chosen at random, is on. Their findings are empirical but consistent, and the readout formula makes each one easy to understand.

  • Correlated features prefer to be orthogonal. They are often on together, so any overlap between them is paid for often. A model in superposition overall can still give a correlated group a nearly orthogonal local basis. So within one context, a layer may look free of superposition.
  • When there is no room, correlated features collapse onto their principal component. Two correlated features aa and bb get one shared direction that encodes (a+b)/2(a + b)/\sqrt 2. That is what principal component analysis, and so a linear model, would do.
  • Anticorrelated features prefer to share a direction with opposite signs. They are never on together. So the negative interference between them, which the ReLU deletes, costs nothing, and an antipodal anticorrelated pair is reconstructed exactly.

The next exercise has you build both distributions and check these findings, in trained weights and in the loss itself.

Research

Correlated and anticorrelated features

Write sample_pairs(rng, B, n_pairs, S, mode). It returns a batch of shape (B, 2 * n_pairs) in which features 2q2q and 2q+12q + 1 form pair qq.

  • With mode="correlated", one draw per pair decides whether both members are on (probability 1−S1 - S). Each active member gets its own Uniform⁡[0,1]\operatorname{Uniform}[0, 1] value.
  • With mode="anticorrelated", the pair is active with probability 1−S1 - S. Then exactly one member, chosen with probability one half each, gets a Uniform⁡[0,1]\operatorname{Uniform}[0, 1] value.

Then write pair_geometry(W, pairs, tol=0.2), which labels each pair (i,j)(i, j) by how rows ii and jj of W sit and returns a list of labels, one per pair, in order. A pair's label is "absent" if either row has norm below 0.1. Otherwise it is "parallel", "antipodal", or "orthogonal" when the cosine of the two rows is within tol of 11, −1-1, or 00, and "other" if none applies.

The setup provides fit_toy_model and weights it trained (best of three restarts at S=0.9S = 0.9) on two correlated pairs, on two anticorrelated pairs, and on four correlated pairs in two dimensions. After the tests pass, try fit_toy_model(lambda r, B: sample_pairs(r, B, 2, 0.9, "anticorrelated"), 4, 2) with several seeds, and see how often plain training finds the best arrangement.

Tests, hints, verified solutions, and AI help, with Pro at $7.99 a month.

In the four-pair weights, each correlated pair shares one direction of length about 0.7, close to 1/21/\sqrt2. That is the collapse onto the principal component, and the four shared directions form two antipodal pairs. Plain training on anticorrelated pairs often stops in the orthogonal arrangement, with a small positive loss, instead of the exact antipodal one. The toy's loss has many local minima, which is also why the cells keep the best of several runs.

The toy model so far only stores and retrieves. Can a network compute while in superposition? Elhage et al. (2022) trained a model with a ReLU hidden layer and separate encoder and decoder weights to output ∣xi∣\lvert x_i\rvert for sparse inputs in [−1,1][-1, 1]. The task needs the nonlinearity, since ∣x∣=ReLU⁡(x)+ReLU⁡(−x)\lvert x\rvert = \operatorname{ReLU}(x) + \operatorname{ReLU}(-x) takes two neurons per feature without superposition. With 100 features, 40 neurons, and sparse enough inputs, the model computed absolute values for more features than it had neurons.

Here the hidden ReLU makes the neuron basis privileged, so features tend to line up with neurons. With dense features each neuron carries one feature. Once features are sparse, many neurons carry one primary feature with a large weight plus secondary features with small weights. Such a neuron's strongest activations all come from its primary feature, while its weaker activations are polysemantic, which is what researchers report for many real language-model neurons.

This led the authors to the hypothesis that motivates §23.6. A real network may be "noisily simulating" a much larger and sparser network, computing on far more features than it has neurons. How far computation in superposition extends is much less understood than storage.

Are real models in superposition?

The toy model proves that superposition can happen and shows what it looks like. Whether real networks use it has to be argued from indirect evidence, since we do not know their true features. Four lines of evidence point the same way.

  • Polysemantic neurons are common. The neuron that mixes citations, dialogue, HTTP, and Korean, and InceptionV1's cat-and-car neuron, are typical, not exceptions. The image-text model CLIP has multimodal neurons that respond to one concept across photos, drawings, and written text (Goh et al. 2021). The typographic attacks of §30.6, which fool CLIP with a handwritten label, exploit them.
  • Sparse probing finds superposition in early layers and dedicated neurons later. A sparse probe is a linear probe allowed to use only kk neurons, so varying kk measures how many neurons a feature needs. Gurnee et al. (2023) trained such probes on the MLP neurons of seven models, from 70 million to 6.9 billion parameters, for over 100 features in 10 categories. Early layers represented many features as sparse combinations of neurons, which is superposition. Middle layers had seemingly dedicated neurons for higher-level features of the context. On average, representations became sparser with scale.
  • Sparse dictionaries recover far more features than neurons. A sparse autoencoder trained on the 512 neurons of a one-layer model's MLP found interpretable features at every dictionary size up to 131,072 (Bricken et al. 2023). Dictionaries of up to 34 million features extract interpretable directions from the middle-layer residual stream of a frontier model, Claude 3 Sonnet (Templeton et al. 2024). §23.6 gives the numbers and the caveats.
  • Basis alignment is a training artifact, not a necessity. The privileged-basis experiments above show residual streams with no architectural reason for special coordinates. That is the setting in which features are free to take any direction.

What the evidence does not show is the toy model's exact structure. Its clean polytopes, pentagons and tetrahedra, have not been shown to organize the features of a large language model. Real features are not independent, not uniformly distributed, and not equally sparse, and some are not one-dimensional at all.

The circular day and month features of Engels et al. (2024), which §23.2 met as a counterexample to the linear representation hypothesis, are the clearest case. Each lives on a circle in a two-dimensional subspace and is used for arithmetic that wraps around, such as "two days after Friday". Gurnee et al. (2025) found that Claude 3.5 Haiku tracks the character count of a line, which it needs to decide where to break fixed-width text, on a curved one-dimensional manifold. That manifold can equally be read as a family of discrete features. Multidimensional features break the one-feature-one-direction picture that the toy model assumes, and they are a live research question.

What the toy model leaves out, and how to read a layer

The toy is a model of storage, with independent one-dimensional features and a one-step decoder. Every one of those assumptions fails somewhere in a real Transformer. Features are correlated and hierarchical, and some are multidimensional. Most of what a layer does is computation rather than reconstruction. The decoder is the rest of the network, many layers deep. The definition of a feature is open. And the toy is trained to reconstruct its input, while a language model's layers are trained only for what they contribute to next-token loss. So the importance of a feature is something the network chooses, not a number we set.

What the toy gets right is the logic, and that logic decides how to study a layer. If a layer is in superposition, its natural units are directions, not neurons, and there are more of them than dimensions. The table compares the units an interpreter can choose.

Unit of analysisBasis it reads inNeeds labels?Handles superposition?Main failure modeWhere
Single neuronThe neuron basis (privileged in MLPs only)NoNo, a polysemantic neuron mixes featuresTop activations show one feature and hide the restThis section, §23.1
Supervised direction (probe, difference of means)A direction we choose by training on a labeled conceptYesPartly, it finds one known feature among manyFinds decodable information the model may not use§23.2
Dictionary feature (sparse autoencoder)An overcomplete set of learned directionsNoYes, by designReconstruction error, dead and split features, seed dependence§23.6
Subspace or manifoldA low-dimensional subspace found by a methodUsuallyYes, for multidimensional featuresHard to find without knowing what to look forOpen research (Engels et al. 2024)

Superposition also changes engineering decisions.

  • Pruning. Removing a neuron removes a little of many features rather than one feature.
  • Quantization. The few large coordinates that training produces have to be protected (§20.2).
  • Steering. Pushing the activations along one feature's direction (§23.7) also nudges every feature that interferes with it.
  • Disentanglement. A variational autoencoder trained with a heavier penalty on its latent code tries to give each factor of variation its own latent (§32.4). That is a different goal from finding features in superposition, since there are more features than latents. A vector-quantized code (§32.5) is the extreme case of a sparse dictionary, with exactly one active element at a time.

Read more

Watch next

🎬 How might LLMs store facts | Deep Learning Chapter 7 · 3Blue1Brown · starts at 17:04The superposition chapter of this video (from 17:04) shows how nearly orthogonal directions let a space of a few thousand dimensions hold far more features than it has axes.
🎬 A Walkthrough of Toy Models of Superposition w/ Jess Smith · Neel NandaA researcher's slow read of Elhage et al. (2022), covering the toy model, the phase diagrams, and the polytope geometry this section derives.