The Geometry of Thought
An interactive exploration of population coding

The Geometry
of Thought

How can the activity of many neurons represent the world? Explore the patterns, variability, and geometry that make information accessible to the brain.

↓ Scroll to explore
01 / The building blocks

One neuron tells only part of the story.

A neuron can respond differently to two stimuli. But its responses fluctuate from trial to trial. Even when its average response changes, a single observation can be ambiguous.

Adjust the separation between the average responses. The distributions show what this neuron might produce across repeated trials.

Information depends on how different the responses are relative to their variability.
A single neuron
Stimulus AStimulus B
Single-neuron discriminability (d′)1.00

Illustrative Gaussian response distributions with equal standard deviation. d′ is the mean difference divided by the common standard deviation.

02 / A population emerges

Many imperfect signals can become a reliable code.

Each neuron contributes a noisy measurement. When their noise is independent, combining responses can improve discrimination dramatically.

Add neurons to the population. Watch how the theoretical discriminability increases, even though the signal carried by each neuron stays the same.

With independent, equally informative neurons, d′ grows in proportion to the square root of population size.
Combining evidence
Population discriminability (d′)2.00

Assumes independent Gaussian noise, equal variance, and equal signal strength for all neurons. The colored matrix illustrates two conditions, not measured recordings.

03 / The geometry of variability

The same variability can help or hurt.

Now consider two neurons together. Each stimulus produces a cloud of trial-by-trial population responses. Their elongated shapes describe correlated variability.

Rotate the cloud of responses. The average responses and total amount of variability stay fixed, but the ability to tell the stimuli apart changes.

Try 0° and 90°. A population can carry more discriminable information with the same total variability, simply because noise lies in a different direction.
Two-neuron response space
Stimulus AStimulus B
Optimal linear discriminability (d′)0.80

Gaussian model with equal covariance across conditions, fixed means separated by 2 response units, minor-axis standard deviation 1, and major-axis standard deviation set by elongation. d′ = √(ΔμᵀΣ⁻¹Δμ). Dots are deterministic simulated samples.

04 / Beyond our intuition

When intuition runs out.

Two neurons give us a picture we can draw. Real populations may contain hundreds of dimensions, one for each neuron. In these spaces, even unrelated directions tend to be nearly perpendicular.

Increase the dimensionality and watch what happens to the angles between randomly chosen directions. An angle alone becomes a poor guide to whether two representations can support the same decision.

We can ask whether a decoder trained to distinguish shapes can also distinguish colors. This is cross-decoding across coding dimensions: it tests whether the two features share a readout.
A high-dimensional surprise
Median acute angle, simulated—

Angles between random unit vectors, ignoring sign (0°–90°). Reproducible simulation with isotropic random directions.

Are color and shape coded independently?

Imagine recording a population responding to red and blue triangles and circles. Train a decoder to distinguish triangles from circles. Can those same weights distinguish red from blue? If the shape and color coding directions are orthogonal, the shape decoder cannot read out color. As the directions overlap, cross-decoding becomes possible.

Train on shape → test on color—Cross-decoding accuracy (aligned labels)
Train on color → test on shape—Cross-decoding accuracy (aligned labels)

The same linear weights learned for one feature are tested on the other feature, with a balanced set of stimuli. The displayed accuracy assumes triangle ↔ red and circle ↔ blue; reversing those labels reverses above- and below-chance results. Cross-decoding quantifies shared readout sensitivity, not exact geometric angle.

05 / From information to action

Having information is different from using information.

A population may contain information that a downstream circuit cannot easily use. Imagine a circuit that reads activity along one fixed direction. Only the responses projected onto that direction affect its decision.

Rotate the difference between two stimuli, or stretch it along the readout. Then stretch it perpendicular to the readout. Watch the projected distributions below: some dramatic changes to population activity leave the fixed readout's discrimination exactly the same.

What matters for a particular behavior depends on the readout the biological circuit uses. A flexible optimal decoder provides a different, useful benchmark.
What can this circuit use?
Fixed biological readout—Projected d′
Freely chosen optimal readout—Available d′

Conceptual model with Gaussian, independent variability of standard deviation 1 along both axes. Controls transform the difference between stimulus means; covariance stays fixed. Stretching perpendicular to the readout changes optimal information but leaves the fixed readout's d′ unchanged. This fixed linear readout is an illustrative biological constraint, not a claim that all circuits are fixed.

06 / Attention and flexibility

Changing the code.

Return to the same shape and color representations. The readout is fixed, but the population can organize its activity differently depending on the monkey’s task.

When the monkey judges shape, the shape coding direction rotates toward the readout. When the monkey judges color, the color coding direction rotates toward that same readout. The two feature directions remain orthogonal.

Attention can also change the variability of population responses. Reducing variability along the readout improves the discrimination available to that circuit, even if an optimal decoder would not gain information.

Behavior depends on the information a circuit can use, and the population code can change to make that information more accessible.

These are simplified illustrations of two distinct experimental findings. The second example is constructed so that optimal linear information stays constant while fixed-readout information improves.
1 · The task determines what the readout can see

Switch between shape, color, and joint decisions. The shape and color coding axes stay orthogonal. The population rotates relative to the same diagonal readout. In the joint condition, both features contribute to the readout, at the expense of perfect alignment for either one.

Shape signal along readout—
Color signal along readout—

Illustrative rotation of orthogonal shape and color coding directions in a two-dimensional population subspace. The joint condition is a compromise that makes both features accessible; it is not a claim about a measured joint-task response. The fixed readout is a weighted population response, not a single neuron.

2 · Attention reduces variability along the readout

Increase attention. Watch the response clouds narrow along the fixed readout and compare the discrimination available to that readout with the information available to an optimal linear decoder.

Fixed readout · d′—
Optimal linear decoder · d′—

Simulated Gaussian responses with a fixed difference between stimulus means. The covariance changes with attention so that variability along the readout decreases while the conditional variance available to the optimal decoder remains constant. This isolates the distinction between biologically accessible and optimal information; it is a conceptual model, not a fitted dataset.