Skip to main content

The linearity hypothesis in representation spaces

Representation, decodability, superposition, and generalization

Practice: Mathematical foundations exercises, including the distinction between linear decodability and functional use.

What kind of linearity are we talking about?

In neural-network interpretability, it is often assumed that a concept—sentiment, grammatical gender, a factual property, or a control direction—corresponds to a direction in activation space. This idea is useful, but the statement “the concept is represented linearly” can refer to several distinct claims.

The scientific question is not simply whether linearity exists. It is to specify which concept, in which layer, under which definition of representation, on which distribution, and for which operation.

1. Three claims that should not be conflated

  1. Linear representation: the presence or strength of a feature contributes to the activation along a direction or a linear combination of directions.
  2. Linear accessibility / decodability: a simple linear model can recover the feature from the activations.
  3. Functional use: the network actually uses the feature in the computation that produces its output.

These properties are not equivalent. A feature may be present in a distributed code without being easily decoded by a linear boundary. And an accurate linear probe does not, by itself, demonstrate that the feature is causally used by the model.

Park, Choe, and Veitch formalize different versions of the linear representation hypothesis and connect some definitions to probing and steering. Garg, Kleinberg, and Peng (2026) explicitly distinguish linear representation from linear accessibility and quantify the additional difficulty imposed by linear decoding in a sparse representation setting.

2. A teaching counterexample: XOR

Let \(x_1,x_2\in\{0,1\}\) and \(y=x_1\oplus x_2\). The positive examples are \((0,1)\) and \((1,0)\); the negative examples are \((0,0)\) and \((1,1)\). No line perfectly separates the two classes in the original input coordinates.

But XOR is not “impossible to represent linearly” in an absolute sense. With a feature transformation, for example \(\phi(x_1,x_2)=(x_1,x_2,x_1x_2)\), separation becomes linear in the transformed space. The lesson is that linear separability depends on the representation and the chosen features.

This is why a failed linear probe does not automatically prove that information is absent, and a successful probe does not establish a particular internal mechanism.

3. Superposition: more features than dimensions

Elhage et al.’s Toy Models of Superposition (Anthropic, 2022) studies how a network can represent more features than it has available dimensions, encoding them in overlapping directions. The representation may remain linear at the level of latent features, while recovering those features from mixed activations becomes difficult and may require nonlinear inference.

This matters: “linear” does not mean “one feature per neuron,” “easy to decode with a linear classifier,” or “unambiguously interpretable.”

Barin-Pacela et al. (UAI 2026) study out-of-distribution compositional generalization for linear probes and sparse autoencoders. Their central distinction remains relevant: linear representation does not imply linear accessibility. Version note: the PMLR proceedings page describes an amortization-gap explanation, but the authors’ later arXiv v2 (which includes a corrigendum) revises that interpretation: in the reported experiments, dictionary learning is the binding constraint, and replacing the SAE encoder with per-example iterative inference on the same learned dictionary does not close the gap. Do not summarize the work as establishing that amortized inference alone causes SAE compositional failures; cite the version being discussed.

3 bis. Features are not always one-dimensional

Engels et al. show that some internal language-model features are better described by irreducible multidimensional structures than by a single direction. Their most intuitive example is circular: days of the week and months can form rings, a geometry suited to periodicity. The authors connect these structures to modular-arithmetic computation and investigate their role with interventions. This qualifies the strong claim “one concept = one direction” without invalidating cases where a linear direction is a good approximation.

Tiblias et al. extend this line of work with Supervised Multi-Dimensional Scaling (SMDS), which explicitly compares geometric hypotheses—lines, circles, clusters, and others—instead of imposing one shape. Their study focuses mainly on temporal reasoning, so its results should not be generalized to every concept or model without testing.

Visual explanations and code:

4. Why probes can create a misleading impression

Hewitt and Liang (EMNLP 2019) show that probe accuracy also depends on the probe’s ability to learn the task, not only on information in the representations. They propose control tasks to measure probe selectivity. At a minimum, this motivates controlling for:

  • probe capacity and regularization;
  • baselines and control tasks;
  • data splits and duplicates;
  • generalization to out-of-distribution examples and compositions;
  • the layer and exact activation extraction point.

A more powerful probe may recover more information, but then it becomes harder to attribute its performance to the structure of the representation itself.

5. Reproducible experiments to add to the repository

Experiment A — XOR and representation

  1. Generate the four XOR points.
  2. Evaluate a linear classifier on the original coordinates.
  3. Add the feature \(x_1x_2\) and evaluate the same type of classifier again.
  4. Compare against an MLP, clearly separating model capacity from representation quality.

Expected result: the linear classifier fails in the original space but succeeds after the transformation. This demonstrates a geometric property; it is not direct evidence about LLM representations.

Experiment B — Decodability and generalization

For a language model and a precisely defined property:

  1. Extract activations from a specified layer;
  2. train a linear probe with a separate validation protocol;
  3. compare against a majority baseline and a controlled nonlinear probe;
  4. evaluate on a distribution or compositional combinations absent from training;
  5. add a control task following Hewitt & Liang;
  6. report uncertainty and errors, not only accuracy.

Do not treat a performance difference between probes as proof that information is “absent” or “used” without additional assumptions.

Checks that distinguish competing interpretations

  • Misconception: “An accurate linear probe proves that the model uses the feature.” No: a probe establishes accessibility under its protocol; a functional claim requires additional evidence, such as controlled interventions.
  • Misconception: “A failed linear probe proves that the information is absent.” No: the code may be distributed, superposed, or accessible only after a nonlinear transformation. State what the protocol can actually detect.
  • Counterexample to overgeneralization: XOR is not linearly separable in its original input coordinates, but becomes linearly separable after adding the product feature. The conclusion is about the chosen representation, not an absolute impossibility.

When auditing a claim, ask: which layer and activation are studied? What capacity does the probe have? Which control task is used? Does performance hold on unseen combinations, and is there an intervention testing causal use?

Takeaway

Linearity is a useful, testable hypothesis, not a universal law. A rigorous claim must specify the representation, concept, decoding criterion, and evaluation distribution. Failure of linear decodability does not imply absence of information; linear decodability alone does not establish causality.

Canonical lesson: Embedding space. This page examines hypotheses about features in that representation space; it does not replace the general introduction to embeddings.

Supplementary resources Additional papers and explanations on linear representation hypotheses.

Papers and preprints

Accessible explanations