Skip to content
LearnAI

9.4Interpretability: features, superposition & probing

How researchers look inside neural networks, why single neurons are hard to read, and how features packed into too few dimensions can be pulled apart again.

⏱ 15 minAdvanced

Opening the black box

Everything you’ve learned so far describes what a network computes: multiply by weights, add, apply a nonlinearity, repeat. None of it tells you what a trained network knows. After training, a large language model is billions of numbers that produce good text, and nobody wrote down what any of them mean. InterpretabilityInterpretabilityResearch into understanding what computations happen inside a neural network. is the field that tries to reverse-engineer those numbers into human-understandable pieces.

Why bother? Because “it scores well on benchmarks” is a weak guarantee. If you could see that a model internally represents “the user is probably a child” or “this code has a security hole” or “I am being evaluated right now”, you could check its reasoning instead of just its outputs. That makes interpretability one of the few tools for alignment that doesn’t depend on trusting what the model says about itself.

The raw material is activations: the vectors of numbers flowing through the network for a given input. In a transformer, the most studied ones live in the residual stream, a vector of a few thousand numbers per token that every layer reads from and writes to. The question is how to read it.

ANALOGY· Gym lockers shared by many members

A small gym has 40 lockers but 100 members. That sounds impossible, until you notice that on a typical evening only five or six members show up. So the gym assigns each member a combination of lockers rather than one of their own. Collisions happen when two members whose combinations overlap arrive on the same night, but that’s rare, and a receptionist can usually sort out whose bag is whose.

The members are features, the lockers are dimensions (or neurons), and the fact that few members come on any given night is sparsity. Sharing lockers through overlapping combinations is superposition, a collision is interference, and the receptionist who ignores small mix-ups plays the role of the nonlinearity (a ReLU with a negative bias) that filters out small overlaps. The catch for anyone auditing the gym: open a single locker and you’ll find items from several unrelated members. That is a polysemantic neuron.

Features are directions

The working hypothesis behind most interpretability research is that a network represents a concept, a featureFeature (interpretability)A property of the input that a network represents internally, such as "this text is in French". The working hypothesis is that each feature corresponds to a direction in activation space., as a direction in activation space. The model’s “amount” of a feature is how far the activation vector points along that direction, which you measure with a dot productDot productMultiply two vectors element by element and add up the results. It is large when the vectors point in similar directions.. This is called the linear representation hypothesis.

You’ve seen hints of it already. In word embeddings, the vector from “man” to “woman” is roughly parallel to the vector from “king” to “queen”: gender behaves like a direction you can add or subtract. The bias lesson used exactly that direction to measure and remove stereotypes. Inside language models researchers have found directions for things like sentiment, the language a text is written in, and whether a statement is true, though how cleanly each one works varies a lot.

If features are directions, the obvious first guess is that each neuronNeuronThe basic unit of a neural network: a weighted sum of inputs plus a bias, passed through an activation function. is one feature. Neuron 4,217 would be the “French” neuron, neuron 4,218 the “Python code” neuron, and so on. That would make interpretability easy: just list what each neuron fires for.

Neurons don’t line up with features

Sometimes they do. Early vision research found neurons that cleanly detect curves or edges at a particular angle. But many neurons are messy. In their “Zoom In” work on an image classifier, Chris Olah and colleagues describe a neuron that responds to cat faces, fronts of cars and cat legs. There’s no single concept there. A neuron like this is called a polysemantic neuronPolysemantic neuronA neuron that fires for several unrelated concepts, so it can't be read as representing one thing. Often a symptom of superposition., and in language models polysemantic neurons are the norm rather than the exception.

Why would training produce such an untidy arrangement? One reason is the basis. A neuron is a privileged direction only because the activation functionActivation functionA nonlinear function (ReLU, GELU, sigmoid…) applied after a weighted sum. Without it, stacked layers would collapse into one linear map. acts on each coordinate separately; nothing forces features to align with those coordinates. But a deeper reason is that there simply aren’t enough neurons. A language model must track millions of possible facts, entities, syntactic roles and styles, with a residual stream of maybe a few thousand dimensions. Something has to give.

Superposition: more features than dimensions

SuperpositionSuperpositionA network representing more features than it has dimensions by packing them into nearly orthogonal directions. is the hypothesis that networks represent more features than they have dimensions by assigning each feature a direction that is almost but not exactly orthogonal to the others. In two dimensions you can only fit two perfectly orthogonal arrows. But in high dimensions, the number of nearly-orthogonal directions grows enormously: pick random unit vectors in 1,000 dimensions and their pairwise cosine similarities cluster around ±0.03. You can fit far more than 1,000 of them while keeping every pair close to perpendicular.

The price is interference. When feature A is active, the activation vector points along A’s direction, and its small overlap with B’s direction makes B look slightly active too. If only one or two features are active at once, those small leaks are tolerable, and a ReLU with a slightly negative bias can zero them out. If many features fire together, the leaks add up and the model can’t tell which features are really present.

So superposition pays off exactly when features are sparse: each one is active on only a small fraction of inputs. Real-world concepts are like that. Most text is not about the Golden Gate Bridge, not in Swahili and not a Python stack trace. That sparsity is what lets a model cram an enormous vocabulary of features into a finite residual stream.

Anthropic’s paper Toy Models of Superposition (Elhage et al., 2022) studied this in the smallest possible setting, and the demo below reimplements their two-dimensional toy model in your browser. There are nn features, each with an importance, and the model has to squeeze them into 2 hidden numbers and then reconstruct all of them.

INTERACTIVESuperposition in a 2D toy model
length 1dim 1dim 212345
Per feature: length ‖Wᵢ‖ (is it represented?) and interference Σⱼ (Ŵᵢ·Wⱼ)²
f1
0.47
0.53
f2
0.59
0.41
f3
0.28
0.52
f4
0.33
0.54
f5
0.39
0.14
lengthinterference
represented
1 / 5
dims per feature
2.16
loss
—
training step
0
Features n
Preset
Probe: switch on only feature

Ideal output: 1.00 for f1, 0.00 everywhere else. Red bars are interference: other features lighting up by mistake. The ReLU and a negative bias hide small overlaps; large ones leak through. Grey bars are features the model dropped: they just output their bias (roughly their average value), whatever the input.

Each arrow is one feature's direction in the 2-dimensional hidden space, learned live by gradient descent. Drag sparsity from 0 to 0.9 and watch the model go from keeping 2 features to packing all 5 into a pentagon. Use the probe to switch on a single feature and see which others leak.

Things to try:

  1. Preset “Dense” (sparsity 0, importance decaying). Every feature is active on almost every input, so interference would be constant. The model keeps only the two most important features, at right angles, and lets the rest die (length near 0). This is what a classic dimensionality reduction like PCA would do.
  2. Preset “In between” (sparsity 0.7). Now the model typically represents four features as two antipodal pairs: feature A points one way and feature B points exactly the opposite way. A ReLU can tell them apart because a negative value gets clipped to zero, and they rarely fire together.
  3. Preset “Sparse” (sparsity 0.9, equal importance). All five features survive, arranged as a regular pentagon: 2.5 features per dimension. “Dims per feature” drops well below 1.
  4. Probe f1 in the sparse setting. The output for f1 is near 1. The two features on the far side of the pentagon stay at exactly 0, because their overlap with f1 is negative and the ReLU clips it. The two nearest neighbors leak a little, which is the price of sharing space. Then switch to 8 features at high sparsity and probe again: the arrows crowd together, interference climbs above 2, and more leaks get through.
  5. Retrain from a new init a few times at sparsity 0.7. Which feature gets dropped changes between runs. Training finds a good arrangement, not always the best one, which is a useful warning when you interpret real models too.

The toy model is a cartoon, but it explains why the neurons of real models look polysemantic. If features are stored as overlapping directions that don’t line up with the neuron axes, then any single neuron sees a mix of several features. To read the model, you need a way to recover the feature directions themselves.

Sparse autoencoders: un-mixing the features

A sparse autoencoderSparse autoencoder (SAE)A small network trained to rewrite a model's activations as a sparse combination of many learned directions, used to pull apart features stored in superposition. (SAE) is a separate, small network trained to explain a model’s activations as a sparse combination of many directions. It takes an activation vector of, say, 4,096 numbers, encodes it into a much wider vector of, say, a million numbers with a ReLU and a penalty that keeps most of them at zero, then decodes back to the original 4,096. Each of the million wide units is a candidate feature, and its decoder weights are that feature’s direction.

The sparsity penalty is the key: it forces the SAE to describe each activation using only a handful of features, which mirrors the assumption that the model itself uses only a few features at a time. Researchers then interpret each feature by looking at the inputs that activate it most strongly.

This approach scaled quickly:

  • Towards Monosemanticity (Anthropic, 2023) trained SAEs on a one-layer transformer and found that many SAE features were far more interpretable than the neurons, for things like DNA sequences, Arabic script or base64 text.
  • Scaling Monosemanticity (Anthropic, 2024) applied SAEs with up to tens of millions of features to Claude 3 Sonnet, a production model. Features included famous landmarks, code bugs, sycophantic praise, and abstract ones that fire on the same concept across languages and in images as well as text.
  • Other labs and open-source groups have since released SAEs for open-weight models, and later work has moved from single features to tracing how features connect into circuits.

SAEs are not a solved problem. They don’t reconstruct activations perfectly, so some of the model’s computation is left unexplained. Their features depend on choices like dictionary size: a small SAE might find one “sports” feature where a larger one splits it into separate features for football, tennis and basketball. And a feature’s label comes from a human (or another model) looking at examples, which can be misleading.

Linear probes: asking “is this information in here?”

A linear probeLinear probeA simple linear classifier trained on a model's internal activations to test whether some property (like sentiment or truth) can be read off them. is the simplest interpretability tool: collect activations for many inputs, label each input with some property (positive vs negative review, true vs false statement, which board square holds a piece), and train a logistic regression to predict the label from the activations. If a linear classifier succeeds, the information is present in a linearly readable form at that layer.

Probes are cheap and useful for mapping where in the network information appears. A famous example is Othello-GPT: a small transformer trained only on sequences of legal moves turned out to encode the board state internally. The first paper (Li et al., 2023) needed nonlinear probes to read it; follow-up work by Neel Nanda showed a linear probe works once you encode squares as “mine” vs “theirs” rather than “black” vs “white”. That is a nice lesson in how the right feature basis matters.

The big caveat: a probe shows that information is decodable, not that the model uses it. A powerful enough probe can extract information that the model ignores. To show a direction matters, you need an intervention.

Activation steering: editing the direction

Activation steeringActivation steeringChanging a model's behavior at inference time by adding a chosen direction (for example, a feature vector) to its internal activations. is that intervention. Take a feature direction (from an SAE, from a probe, or simply from the difference between average activations on two contrasting prompts, like “love” vs “hate”), and add a multiple of it to the model’s activations while it generates. If behavior changes in the predicted way, you have causal evidence that the direction means what you think.

The most memorable demonstration came with Scaling Monosemanticity. Anthropic found a feature for the Golden Gate Bridge and clamped it to a high value. The resulting model, briefly released as “Golden Gate Claude”, brought the bridge into almost any conversation and even described itself as the bridge. Steering can also target useful properties such as honesty, refusal or tone, and research groups use it to study and sometimes control behaviors without retraining. It is not a precise tool, though: push too hard and the model’s text degrades into nonsense.

MATH CORNER · optionalThe toy model, and why sparsity makes interference cheap

The toy model maps nn features x∈Rnx \in \mathbb{R}^n to m<nm < n hidden dimensions and back:

h=Wx,x^=ReLU(W⊤h+b)=ReLU(W⊤Wx+b),h = W x, \qquad \hat{x} = \mathrm{ReLU}(W^\top h + b) = \mathrm{ReLU}(W^\top W x + b),

with W∈Rm×nW \in \mathbb{R}^{m \times n}. Column WiW_i is feature ii‘s direction. Training minimizes importance-weighted reconstruction error, L=∑iIi(xi−x^i)2L = \sum_i I_i (x_i - \hat{x}_i)^2, averaged over inputs where each xix_i is 0 with probability SS (the sparsity) and uniform on [0,1][0, 1] otherwise.

The output for feature ii is

x^i=ReLU(∥Wi∥2xi+∑j≠i(Wi⋅Wj) xj+bi).\hat{x}_i = \mathrm{ReLU}\Big(\lVert W_i\rVert^2 x_i + \sum_{j \ne i} (W_i \cdot W_j)\, x_j + b_i\Big).

The first term is the signal; the sum is interference from the other active features. If those xjx_j are almost always 0, the sum is almost always 0, and a negative bib_i hides the occasional small leak.

Worked example. Put n=3n = 3 features in m=2m = 2 dimensions at 120° apart, all unit length, with b=0b = 0:

W1=(1,0),W2=(−0.5, 0.866),W3=(−0.5, −0.866).W_1 = (1, 0), \quad W_2 = (-0.5,\ 0.866), \quad W_3 = (-0.5,\ -0.866).

The pairwise dot products are all −0.5-0.5.

input xxh=Wxh = WxW⊤hW^\top hx^\hat{x} after ReLUcorrect?
(1,0,0)(1, 0, 0)(1,0)(1, 0)(1,−0.5,−0.5)(1, -0.5, -0.5)(1,0,0)(1, 0, 0)yes
(0,1,0)(0, 1, 0)(−0.5,0.866)(-0.5, 0.866)(−0.5,1,−0.5)(-0.5, 1, -0.5)(0,1,0)(0, 1, 0)yes
(1,1,0)(1, 1, 0)(0.5,0.866)(0.5, 0.866)(0.5,0.5,−1)(0.5, 0.5, -1)(0.5,0.5,0)(0.5, 0.5, 0)no: both halved

With one feature active, the ReLU clips the negative interference and reconstruction is perfect: three features in two dimensions. With two features active at once, they interfere and both come out at half strength. If each of the three features is active 10% of the time independently, two or more are active together on only about 3% of inputs, so this arrangement is a good deal. If they are active 90% of the time, it’s a terrible one, and the model should keep just two orthogonal features instead. That is the phase change you see in the demo.

How many near-orthogonal directions fit? For random unit vectors in dd dimensions, the dot product has standard deviation about 1/d1/\sqrt{d}. With d=4096d = 4096, that’s about 0.0160.016. The Johnson–Lindenstrauss lemma makes this precise: the number of vectors you can fit with all pairwise ∣cos⁡∣<ε|\cos| < \varepsilon grows exponentially in d ε2d\,\varepsilon^2.

In code

The toy model in PyTorch, plus a linear probe on stored activations:

import torch, torch.nn.functional as F

n, m, S = 5, 2, 0.9                           # features, hidden dims, sparsity
importance = torch.ones(n)
W = torch.nn.Parameter(0.3 * torch.randn(m, n))
b = torch.nn.Parameter(torch.zeros(n))
opt = torch.optim.Adam([W, b], lr=1e-2)

for step in range(5000):
    x = torch.rand(1024, n) * (torch.rand(1024, n) > S)   # sparse features
    x_hat = F.relu(x @ W.T @ W + b)                       # squeeze to 2D and back
    loss = (importance * (x - x_hat) ** 2).sum(-1).mean()
    opt.zero_grad(); loss.backward(); opt.step()

print(W.norm(dim=0))   # lengths ≈ 1 for every feature that survived

# Linear probe: does layer L linearly encode a label?
from sklearn.linear_model import LogisticRegression
# acts: (num_examples, d_model) activations, labels: (num_examples,)
probe = LogisticRegression(max_iter=1000).fit(acts_train, labels_train)
print("probe accuracy:", probe.score(acts_test, labels_test))
direction = probe.coef_[0]   # a candidate feature direction for steering
COMMON MISCONCEPTIONS
  • “Each neuron detects one concept.” Some do, but many are polysemantic. Features are better thought of as directions that may be spread across many neurons, and each neuron participates in many features.
  • “A model with dd dimensions can represent at most dd concepts.” Only if the concepts must be perfectly separable at all times. With sparse features, superposition lets a model store many more than dd at the cost of occasional interference.
  • “If a probe can read it, the model uses it.” A probe proves the information is decodable from the activations. Showing the model relies on it requires an intervention such as ablation or steering.
  • “Sparse autoencoders reveal the model’s true features.” SAEs give a useful, partial decomposition. Results depend on dictionary size and training choices, and the reconstruction error leaves part of the model unexplained.
  • “Interpretability is just making saliency heatmaps.” Heatmaps of which input pixels or tokens mattered are one older tool. Mechanistic interpretability aims to explain the internal algorithm: which features exist and how they combine.

Check your understanding

0/5 answered
  1. Q1.In the toy model, why does increasing feature sparsity let the model represent more features than it has dimensions?

  2. Q2.A neuron fires strongly for cat faces, car fronts and cat legs. What is the most likely explanation under the superposition hypothesis?

  3. Q3.A linear probe predicts 'is this statement true?' from layer 20 activations with 90% accuracy. What can you conclude?

  4. Q4.What does a sparse autoencoder's sparsity penalty encourage?

  5. Q5.Researchers add a 'Golden Gate Bridge' feature vector to a model's activations and it starts mentioning the bridge everywhere. This is an example of…

Further reading

Progress is saved in this browser only.
Type to search across all lessons and glossary terms.