Features and superposition
One neuron often responds to many unrelated things. A leading explanation is that models pack more features than they have dimensions.
In 60 seconds
Features and superposition
One neuron often responds to many unrelated things. A leading explanation is that models pack more features than they have dimensions.
The superposition idea
- If features are rarely active together, their small overlaps rarely cause trouble.
- The cost is interference: when two overlapping features are active at once, they can blur or create a false signal.
- A side effect: each neuron (one axis) ends up partly aligned with many feature directions, so it looks polysemantic.
A 2-D toy: five features in two numbers
import numpy as np
# 5 features squeezed into 2 dimensions: directions spread like a pentagon.
k = 5
angles = 2 * np.pi * np.arange(k) / k
W = np.stack([np.cos(angles), np.sin(angles)]) # shape (2, 5)
bias = -0.35 # ReLU threshold hides small overlaps
def encode(f): # 5 features -> 2 numbers
return W @ f
def decode(h): # 2 numbers -> 5 feature guesses
return np.maximum(0, W.T @ h + bias)
print("overlap between feature directions:")
print(np.round(W.T @ W, 2))
single = np.array([1.0, 0, 0, 0, 0]) # sparse: one feature on
print("one feature ->", np.round(decode(encode(single)), 2))
two = np.array([1.0, 0, 1.0, 0, 0]) # two features on together
print("features 0+2 ->", np.round(decode(encode(two)), 2))| Situation | Superposition works? | Why |
|---|---|---|
| Features are sparse | Mostly yes | Overlaps rarely meet, and the threshold hides small ones |
| Features often co-occur | Poorly | Overlaps add up and create errors |
| Some features are very important | Model may give them their own direction | Errors on them cost too much |
Watch and read more
Lab
Measure how interference in a toy superposition model grows as features become less sparse.
The problem
Run the starter (needs numpy). It encodes random inputs with the pentagon toy and counts how often decoding gets the on/off pattern exactly right.
- Record the error rate for each sparsity level printed.
- Change
kto 3 and to 8 (still squeezed into 2 dimensions). How does the error change? - Change
biasto 0.0 and to -0.8. Explain what the threshold trades off. - Write three sentences linking your results to polysemantic neurons in real models.
Practice lab
Edit the code and run it. Python runs in your browser — nothing is sent to our server.
No output. Add print(...) to see values.
You are done when
Hard questions
Try to answer before you reveal. If you can answer these, you understood the lesson.
Q1If a model can pack more features than dimensions, why doesn't it pack an unlimited number?Reveal
Every extra feature adds overlap with the others, so interference grows. At some point the errors from collisions cost more loss than the new feature saves. How many features fit depends on how sparse and how important they are. Rare, less important features are the cheapest to pack in; frequent, important ones tend to get cleaner directions.
Q2Why is superposition a problem for probing and for single-neuron analysis in different ways?Reveal
Single-neuron analysis fails because each neuron mixes many features, so its activity has no single meaning. Probing still works when you know which label to look for, since it finds a direction, not a neuron. But probing only finds what you ask about. Superposition means there may be many features you never thought to probe, which is why unsupervised methods like sparse autoencoders are attractive.
Questions people ask
If neurons are polysemantic, why did people ever study single neurons?
Because some neurons really are clean, especially in image models, and single neurons are easy to inspect. Polysemanticity was found by looking at many neurons and noticing that most did not have a single meaning. That discovery is what pushed the field towards features as directions.
Is a feature the same as a probe direction?
Related, but not the same. A probe finds a direction that predicts a label you chose. A feature is something the model itself represents, which you may not have thought of. Sparse autoencoders (next lesson) try to find features without choosing labels first.
Why does sparsity matter so much?
Because interference only happens when overlapping features are active together. If each feature is on in only a small share of inputs, collisions are rare, and the model gains a lot of capacity for a small error.
Does this happen in the embeddings I built earlier?
Possibly. Embedding vectors for a big vocabulary in a small dimension must share space. Words that rarely appear together can safely overlap, which is one reason small embeddings still work well.
Lesson test
5 questions. Get 3 right (60%) to pass and complete this lesson.