TL;DR
Neural networks often seem to store more concepts than they have neurons. This paper trains a very small ReLU network on synthetic data where each input feature is rarely active. The network stores more features than it has dimensions by giving them overlapping, nearly perpendicular directions, and the ReLU filters out much of the overlap. The authors call this superposition. It explains why single neurons often respond to unrelated things, and the paper maps when it appears, what geometry it takes, and how it links to adversarial examples.
Builds on: Feedforward Neural Network, Rectified Linear Unit (ReLU), Linear Transformation, Mean Squared Error, Orthogonal Matrix · Leads to: Adversarial Examples, Mixture of Experts, Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets
Why it mattered
Interpretability research tries to say what each part of a trained network does. A common hope was that each neuron would be one clean feature, such as a curve detector in an image model. In many networks, though, neurons respond to mixtures of unrelated inputs, which makes the single-neuron approach hard to rely on. The paper gave a precise, testable reason this happens: a layer can hold more features than neurons when the features are sparse. That shifted the useful unit of analysis from the neuron to a direction in activation space.
Later interpretability work on language models used sparse autoencoders to recover features as directions from activations. The toy model here is the reason to expect that such a search can succeed at all.
The problem
Two observations did not fit together. In some vision networks, individual neurons clearly detect one thing. In language models and many other networks, most neurons are polysemantic, firing for several unrelated inputs. If features were simply stored one per neuron, neither pattern would be surprising, so something else must be going on.
A linear layer with m dimensions can store at most m features without them interfering. Trained on data where all features matter, a linear model keeps roughly the top principal components, as Principal Component Analysis would. The question the paper asks is whether a small nonlinearity changes that answer, and whether storing extra features is ever worth the interference it causes.
How it works
We follow one tiny instance. Take two features, x₁ and x₂, stored in one hidden number h. The encoder is the row W = [1, −1], and the decoder is its transpose, followed by a ReLU with no bias.
- Start with the features. Each feature is either 0 or a positive number, and most of the time most features are 0. Take the input x = (1, 0): feature 1 is on at strength 1, feature 2 is off.
- Compress into one number. Compute h = 1·x₁ + (−1)·x₂ = 1 · 1 + (−1) · 0 = 1. Two features are now stored in one number. Check: with x = (0, 1), h = −1.
- Expand back to two numbers. Multiply h by the decoder column (1, −1) to get (1, −1). Check: with h = −1 you get (−1, 1).
- Filter with the ReLU. Negative entries become zero, so (1, −1) becomes (1, 0). Feature 1 is recovered exactly. Check: with x = (0, 1), the decoded values (−1, 1) become (0, 1), so feature 2 is recovered too.
- See the cost. Take x = (1, 1), where both features are on. Then h = 1 − 1 = 0, the decoded values are (0, 0), and the ReLU leaves (0, 0). Both features are lost. The two features interfered and cancelled. This happens only when both are on together, which sparsity makes rare.
- Weigh the trade. A solution with two dedicated dimensions loses nothing but uses two dimensions. The one-dimension solution uses half the budget and loses information only on the rare inputs where both features are on. The math section shows when this trade pays.
flowchart LR X[features x1, x2] --> E[encode: h = W x] E --> H[one hidden number h] H --> D[decode: W transposed times h] D --> R[ReLU removes negative interference] R --> Y[reconstruction x']
The math
Definition (linear representation with superposition). A linear representation stores n features in m dimensions with m less than n. Feature i has a direction W_i in the m-dimensional space. The representation exhibits superposition when the n-by-n matrix WᵀW is not invertible, which holds whenever m is less than n.
Step 1 in symbols
The input x has n entries. Each entry is 0 with probability S, the sparsity, and otherwise drawn uniformly from the interval from 0 to 1. The hidden vector is h = W x, where W is an m-by-n matrix whose i-th column is W_i. In the example, W = [1, −1], so W₁ = 1 and W₂ = −1.
Step 2 in symbols
The reconstruction is x' = ReLU(Wᵀ h + b) = ReLU(WᵀW x + b). The entry for feature i is the ReLU of W_iᵀ W_i x_i, plus the sum over the other features j of W_iᵀ W_j x_j, plus the bias b_i. That sum over other features is the interference. For the example, WᵀW = [[1, −1], [−1, 1]]. With x = (1, 1), WᵀW x = (0, 0), which is the cancellation from step 5.
Step 3 in symbols: the loss
The loss weights each feature's squared error by its importance I_i: L = E[ Σ_i I_i (x_i − x'_i)² ]. Sparsity means the expectation is dominated by inputs where only a few features are on.
Step 4 in symbols: dimensions per feature
The paper measures how much of a dimension each feature gets with D_i = ‖W_i‖² / Σ_j (Ŵ_i · W_j)², where Ŵ_i is W_i scaled to length 1. For the example, ‖W₁‖² = 1 and the denominator is 1² + (−1)² = 2, so D₁ = 1/2. Feature 2 gets the same. Together the two features fill one dimension.
Summing the squared lengths over all features gives ‖W‖²_F, which counts the learned features when each has length 1. The paper uses m / ‖W‖²_F as the average dimensions per feature. For the example, 1 / 2 = 1/2.
Working the numbers
Use p for the probability that a feature is on, with each feature independently 1 or 0.
- Antipodal solution, W = [1, −1]. The only input with error is (1, 1), where both features are lost and the error is 1² + 1² = 2. Its probability is p², so the expected loss is 2p².
- Drop solution, W = [1, 0]. Feature 1 is always kept and feature 2 is always lost, so the error is 1 whenever feature 2 is on. Its probability is p, so the expected loss is p.
- At p = 0.1 the antipodal loss is 0.02 and the drop loss is 0.1, so superposition wins.
- At p = 0.5 both losses are 0.5, so they tie.
- At p = 0.9 the antipodal loss is 1.62 and the drop loss is 0.9, so superposition loses. Sparsity decides the regime.
Try it: a layer with 30 hidden dimensions has an average of D = 2/3 dimensions per stored feature, with each feature of length 1. How many features does it store? Answer: ‖W‖²_F = m / D = 30 / (2/3) = 45, so about 45 features in 30 dimensions.
Results
- Uniform superposition. With 400 features of equal importance, 30 hidden dimensions, and sparsity varied, the paper plots m / ‖W‖²_F against sparsity. The curve is flat at 1 (one dimension per feature) and at 1/2 (two features per dimension), which are the antipodal pairs.
- Geometry. Per-feature dimensionality clusters at fractions tied to specific shapes: digons, triangles, pentagons and tetrahedrons. The authors describe this structure as elegant enough to make them suspicious that it is partly specific to the toy model.
- Phase change. With two features in one dimension, the optimal weights switch discontinuously between storing one feature, dropping one, and superposition as the sparsity or importance of the extra feature changes. The authors confirm this with a closed-form analysis of the loss.
- Computation in superposition. A network with 100 features and 40 hidden neurons learns to compute the absolute value of each feature. Without superposition it would need two neurons per feature, so 200 neurons. With sparse features it computes the function anyway, which means the hidden layer does useful work on superposed inputs.
- Adversarial vulnerability. The superposed weights leave interference entries that give an adversary a direct way to attack the most important feature. The authors test this with small L2 attacks and find the model is vulnerable, but they present the link to adversarial examples as a hypothesis, not a settled result.
- Limits. The model is a small ReLU network on synthetic sparse data. The authors say it is unclear how far the geometry transfers to real networks, and that the link to adversarial examples is a hypothesis they explore, not a settled result.
Reading guide
- Introduction and "Definitions and Motivation". Needs Linear Transformation, Dot Product, Linear Independence and Orthogonal Matrix for the idea of directions in activation space. The privileged basis discussion assumes Activation Function.
- "Almost orthogonal vectors" in the superposition hypothesis. Needs Cosine Similarity and Johnson–Lindenstrauss Lemma, and Compressed Sensing for recovering sparse signals.
- "Experiment Setup" and "Basic Results". Needs Feedforward Neural Network, Rectified Linear Unit (ReLU), Mean Squared Error and Stochastic Gradient Descent.
- "Mathematical Understanding" and "Superposition as a Phase Change". Needs Linear Transformation and the square matrix WᵀW. The paper's analogy to the Thomson problem is a packing argument with no separate lesson here.
- "The Geometry of Superposition". Defines dimensionality and the geometry clusters. The uniform polytopes it mentions are regular shapes such as triangles and tetrahedrons in higher dimensions.
- "Computation in Superposition". Needs Rectified Linear Unit (ReLU) and Activation Function.
- "Relationship to Adversarial Robustness". Needs Adversarial Examples and Adversarial Training.
- Discussion of mixture-of-experts models. Needs Mixture of Experts.