Polysemanticity
Polysemanticity in neural networks refers to the phenomenon where a single neuron or internal feature activates in response to multiple semantically unrelated inputs. In a fully interpretable network, one would expect each neuron to correspond to a single, coherent concept — a "cat detector" that fires only for cats. In practice, the same neuron in a vision model might respond to both cats and car wheels, or a neuron in a language model might activate for both legal terminology and currency symbols. This happens because neural networks encode far more concepts than they have individual neurons, so features are superimposed on top of each other in a kind of lossy compression.
Think of it like a paint palette where each color slot holds a mixture rather than a pure pigment. Instead of one slot per color, each slot contains a blend, and the network has learned to combine and subtract these blends in specific proportions to reconstruct any individual color it needs — economical but hard to read at a glance.
Anthropic's mechanistic interpretability research demonstrated polysemanticity extensively in transformer models. Their "superposition hypothesis" proposes that when a network needs to represent more features than it has neurons, it uses quasi-orthogonal directions in activation space, tolerating interference because most features rarely co-occur:
# Probing for polysemanticity: which tokens activate neuron 42 in layer 8?
import torch
from transformers import AutoTokenizer, AutoModel
model = AutoModel.from_pretrained("bert-base-uncased", output_hidden_states=True)
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
for phrase in ["legal contract", "dollar sign", "circuit board"]:
inputs = tokenizer(phrase, return_tensors="pt")
hidden = model(**inputs).hidden_states[8] # layer 8
print(phrase, "neuron 42 activation:", hidden[0, 1, 42].item())
If neuron 42 shows high activation across semantically unrelated phrases, that neuron is polysemantic.
Polysemanticity is a central challenge in mechanistic interpretability and Neural Network explainability. It is related to how Embedding spaces organize meaning and why probing individual Activation Function outputs rarely reveals clean semantic structure in large models.
You will encounter polysemanticity when attempting to interpret or audit model internals — understanding it is essential for anyone working on AI safety, bias auditing, or mechanistic interpretability research.