The puzzle
If every neuron in a network meant one thing, interpretability would be easy: read off the neurons. They don't. Real neurons fire for mixtures of unrelated concepts. One explanation is superposition. The world has more useful features than the model has dimensions, so the model stores them as directions that are almost orthogonal and puts up with some interference between them.
The toy model below is the smallest setting where this happens. An input
x has n features. It is squeezed into m = 2 hidden
dimensions and then reconstructed:
h = W x · x′ = ReLU(Wᵀ h + b)
Each column Wi is a 2D arrow: the direction where feature
i lives. The loss is reconstruction error weighted by each feature's
importance. We have two controls here: density, which is how often
each feature is non-zero, and importance, which decays from feature 1 to
feature n.
Feature directions, the columns of W
WᵀW and bias b
Probe: switch on one feature (xi = 1, others 0) and read the output
What to try
- Dense (density 1). The model keeps the two most important features at right angles and drops the rest. This is just PCA. WᵀW has two bright diagonal cells.
- Drag density down. Around 0.1, a third and fourth feature appear. They point in opposite directions to the existing ones (antipodal pairs). Two features on one line interfere only when both are active, which is rare.
- Very sparse (0.03 or below). All five spread into a pentagon 72° apart. WᵀW gains off-diagonal entries; that is the interference.
- Probe a feature in the pentagon. Its neighbours light up slightly. Features pointing the other way get a negative pre-activation, and the negative bias plus ReLU clips it to zero. The nonlinearity makes this work. Without the ReLU, no superposition.
- Steep importance (0.5). Even when sparse, the model may still ignore the least important features. Superposition happens only when a feature is worth the interference it adds.
A bigger sweep
The same experiment with 20 features in 5 dimensions. Each point is a fresh model
trained in your browser at one density. A feature counts as stored if
‖Wi‖ > 0.5.
| Density | Features stored | Dims per feature |
|---|
Why it matters
If real models do this at scale, individual neurons are the wrong unit of analysis. A neuron is a basis direction, and features need not line up with the basis. That is the motivation behind sparse autoencoders and dictionary learning: they try to recover the overcomplete set of feature directions that the model packed into its activations.
Based on Elhage et al., Toy Models of Superposition, Anthropic, 2022. The model, loss and metrics follow the paper; the training code is ~100 lines of plain JavaScript in model.js.