TOPIC 35 · PHASE E COMPUTATIONAL

Neural Coding

One letter in the alphabet — and the whole world to write

2026-08-11 · BigCat

There is no word "red" inside your head. There's a small handful of cells firing a bit more than usual.

Right now you're smelling something, hearing the air conditioning, and half-remembering what's due tomorrow. Those three completely unrelated things are carried by exactly one kind of thing in your head: identical little electrical pulses. They have no colour, no scent, no weight; every one looks like every other. The entire richness of the world has to be squeezed into when a cell fires, how densely, and which cell it is. This issue is about how the brain writes. By the end you'll hit a harder question: being able to read a code out of the brain is not the same as having found the code the brain itself uses.

// 01

The whole brain has one letter

What does a signal in the brain actually look like? The answer is almost disappointingly plain: what runs along a neuron's output wire is a series of brief electrical pulses, about a millisecond each, formally called action potentials and known in the trade as spikes. The crucial part — they are all exactly the same height. Not "important things fire harder." Literally the same: either nothing, or that one fixed routine. (How a spike gets triggered and why it has to be all-or-none: neuron & action potential)

every spike is the same height · amplitude carries nothing all that's left: when it fires · how densely · which cell time →
A spike train: the amplitude dimension has been given up entirely

It's a bit like a language with only one sound: tick. You can't say tick in a redder or sweeter way. The only room you have is when you tick, how fast, and who's ticking. The whole field of neural coding asks how the world gets packed into those three.

// 02

Count the spikes, or read the beat

In 1926 Edgar Adrian pushed an electrode into a sensory nerve and stretched a muscle. What he saw later won a Nobel: the harder the stretch, the faster the neuron fired. Intensity became frequency. That's rate coding, and it's still the most reliable thing we know: press harder on the skin, turn up the light, turn up the volume, and the number of spikes per second goes up.

But it has a problem: counting takes time. To get a decent estimate of "spikes per second" you need a window — tens, often hundreds of milliseconds. People are faster than that. In 1996 Simon Thorpe's group flashed photographs at people who had to say whether an animal was in the picture, and the brain signal separated the two cases within about 150 ms. The signal crosses several stations to get that far, so at each station each neuron may have managed one or two spikes total. One or two spikes is no rate to count.

same window · same firing rate evenly spread burst up front burst at the end 4 spikes 4 spikes 4 spikes count only → all three identical; read timing → three different messages
Equal rate doesn't mean equal content — there's another layer in the timing

So there's a second scheme: temporal coding, where the information sits in when each spike lands. Three common flavours. Who fires first: the most strongly driven cells tend to speak up first, and the mere rank order of that first wave is enough to reconstruct a face. Phase: the hippocampus has a lovely example — as a rat runs through the patch of space one place cell cares about, that cell fires a little earlier on each cycle of the background brain rhythm, so "how far into the patch am I" gets written into the phase. That's phase precession. Precise intervals: how far apart the spikes in a small burst sit is itself content.

The point isn't to pick one. Several layers can ride the same spike train at once: coarse intensity in the rate, fine timing in the phase — like separate channels on one wire.

// 03

No single cell is in charge of your grandmother

A natural guess: maybe somewhere there's one cell dedicated to your grandmother, firing whenever she shows up. That hypothetical got nicknamed the grandmother cell. Reality runs almost the other way.

Take the motor cortex (these experiments later became the foundation of brain–computer interfaces). Have a monkey reach in various directions and you find that every cell has a preferred direction it fires hardest for. But it doesn't fire only for that one — thirty degrees off, sixty degrees off, it still fires, just less. So from one cell alone you cannot tell whether the hand went toward twenty degrees or eighty: each cell is broadly tuned — opinionated but imprecise.

motor cortex · six cells firing → one direction readout one cell (longer = firing more) summed = the population's direction
The population vector: each arrow points at that cell's preferred direction, scaled by how much it's firing — then added up

The precise answer lives in the chorus. Picture every participating cell as an arrow: pointing at its preferred direction, as long as its current firing rate. Add those arrows head to tail, and the direction of the sum matches where the hand actually went, remarkably well. That's the population vector — no cell in the group knows the answer; the answer exists only in the act of adding up.

What about the famous "Jennifer Aniston cell" from 2005? A patient really did have a cell that fired for photos of that actress and not for other people. It is startlingly sparse — but it is not a grandmother cell: the same cell fired for many different photos of her, and even for her name in written text, so it codes a concept rather than an image. And the researchers did the arithmetic themselves: if one arbitrarily placed electrode can stumble onto such a cell, there cannot be just one — thousands of cells stand behind the same concept. The truth sits between the extremes: not one cell per job, not everyone participating, but a small handful.

AI cross-read

In AI this is called a distributed representation. You may have run into the word embedding: when a model handles a word or an image it writes it out as a list of several hundred or thousand numbers. The meaning isn't in any single number, it's in the pattern across the whole list — exactly as direction isn't in any single cell, only in the chorus. How does anything downstream read it? Give each number a weight and add them up — the same move as computing a population vector. Both sides also share the same payoff: the combinations available to a small handful of units vastly outnumber the units themselves.

// 04

Light up two or three squares: a frugal dictionary

If a group encodes together, wouldn't involving every cell carry the most information? The brain says no. It goes the other way: at any instant only a tiny fraction of neurons are firing, and the vast majority are silent. That's sparse coding.

The first reason is unglamorous: cost. After every spike a cell has to spend energy hauling displaced ions back where they belong, and the whole brain runs on about twenty watts. By one estimate that budget only affords having on the order of one percent of cortical neurons active at once.

The second reason is the interesting one. In 1996 Olshausen and Field did something very clean: they fed a simple model a pile of natural photographs with only two demands — you must be able to rebuild the image out of your parts, and you may only use a few parts at a time. They told it nothing whatsoever about brains. The set of parts it grew for itself turned out to be small oriented edge stripes, nearly identical to the receptive fields of real simple cells in V1 (V1 is the first cortical stop for visual signals: visual pathway).

a patch of a natural image split ≈ simple cells in V1 the learned dictionary · one edge orientation per square any given patch · lights up only two or three
Given just two demands (reconstruct it, use few parts), the model grew V1 on its own

The result is a little unnerving: V1 may look the way it does not because evolution picked that arbitrarily, but because it is the one good solution to "rebuild natural images with as few parts as possible." And sparseness buys more than electricity — with few things lit at once, whatever reads the code downstream is less likely to smear two things together. Cheap and legible turn out to be the same design here.

AI cross-read

This idea has just come roaring back in AI. Large language models have an awkward property called superposition: one unit tends to moonlight for several unrelated concepts at once (the same number handling both "French" and "chemistry"), so staring at a single unit tells you nothing — the same complaint as "single neurons are broadly tuned." The leading fix right now is to train a deliberately wide, deliberately sparse little network to pull the tangle apart, allowing only a few units to be on at a time and thereby forcing one concept per slot. That's a sparse autoencoder, structurally identical to the Olshausen paper, with the natural images swapped out for a model's internal activations.

🌀 CROSSING OVER · interdisciplinary echoes

"Meaning isn't in any single part, only in the relations between them" — several completely unrelated traditions arrived here on their own:

// THINKING DEEPER

Is the "red" in my head the same pattern as the "red" in yours?
Certainly not the same cells — there's no way to match up your neurons with mine one for one. But it might be the same relational structure: red sits near orange and far from blue, and that geometry of "what's how far from what" can be highly consistent across two brains. So what lines up may not be the content but the shape. This thread leads into neural manifolds later on, and runs straight into the hardest question on the consciousness side: if the geometry matches perfectly, can the experience still differ?
We can already decode images and sentences from brain activity — doesn't that mean the code is cracked?
No. The information a decoder uses is not necessarily information the brain's downstream circuits read. The same signal might be picked up by ten different decoders while the real downstream circuit taps only one of those lines. "Readable" proves the information is present; it does not prove it is used. Telling the two apart requires intervening — change the signal and see whether behaviour follows. This is "correlation isn't causation" in its computational-level form.
Sparseness taken to its limit is one cell per concept. Why doesn't the brain go all the way?
One-cell-per-job has three fatal flaws: cells die (lose one and you lose a concept forever); it can't generalise (something never seen has no cell waiting for it); and it can't compose ("a purple dog" would need a brand-new cell). The combinations available to a small handful of cells, by contrast, explode in number — and they come with fault tolerance and similarity for free, since two similar things light up overlapping squares, which is more or less what "similar" means.
All-or-none spikes throw away the amplitude dimension. Isn't that pure waste?
What amplitude buys back is reliable transmission: an analog voltage dies within a millimetre, while an all-or-none pulse is rebuilt from scratch at every step, so it arrives after a metre looking as it did after a millimetre. But the more interesting side is the other one — the constraint pushes computation into the dimension of time: event-driven, speak only when there's something to say, otherwise stay silent. That's precisely what neuromorphic chips are trying to copy, and precisely where today's artificial networks are least brain-like: they recompute every unit at every step whether or not it has anything to say.

// FURTHER READING