Listening to a brain
A neuron does not announce itself. Lower a fine wire into a brain, plug the wire into an amplifier and a speaker, and what you hear is mostly hiss — the slow surf of thousands of distant cells averaging into noise. Then, every so often, a sharper sound rides on top of the hiss. A short, dry pop. That pop is one neuron, somewhere within a few tens of microns of the wire’s tip, firing an action potential.
The whole experimental tradition of single-unit electrophysiology is built on that pop. If you can hear it, you can record it; if you can record it, you can ask which cell made it. Across Chapter 1 we treated place cells as if they came pre-labeled. They do not. Before any of the interesting analyses begin, somebody has to figure out which spike came from which neuron. That somebody, for the experiments in this site, was me.
What a spike actually looks like
Inside the neuron, an action potential is a clean, almost cartoonish event — a 100-millivolt upswing followed by a sharp recovery, all in about a millisecond. From the outside, picked up by a wire sitting in the extracellular space a few microns away, the same event looks much smaller and inverted: a brief negative deflection of roughly fifty to a few hundred microvolts, sometimes followed by a small positive recovery. Different cells produce different shapes. Pyramidal cells tend to be wide and biphasic; fast-spiking interneurons are narrower and more symmetric. Distance matters too: the same spike at twice the distance is roughly four times smaller.
A single wire, then, sees the population as a stream of overlapping waveforms of varying amplitudes, all jittering against a background of low-frequency local field potential. To pull individual cells out of that stream, the field eventually settled on a beautifully simple trick: don’t use one wire. Use four.
The tetrode
A tetrode is four insulated micro-wires twisted around each other and cut flush at the tip, so that each channel sits within roughly twenty microns of the others. When a nearby neuron fires, all four channels see the spike — but at slightly different amplitudes, because each channel is at a slightly different distance from the cell body. That difference is the whole point. Two cells with identical waveforms on a single wire can become cleanly separable when you look at the relative amplitudes across all four. The four-channel fingerprint promotes a noisy 1-D problem into a clean 4-D one.
Four wires also push the price up: more channels, more amplifiers, more data. A typical recording for the studies in this site ran sixteen tetrodes — sixty-four channels — sampled at thirty kilohertz, for three to four hours per session. The implant that holds those wires steady inside the brain, as the animal moves freely, is a small piece of jewelry called a microdrive: hand-built, painstaking, and absolutely the kind of object that would shatter if you sneezed on it.
Sorting spikes
The output of all this hardware is a torrent of detected spikes, each one a short snippet of voltage on each of four channels. The classical way to assign spikes to neurons is called spike sorting: extract a few features from each waveform — peak amplitude, width, principal components — and look at where the resulting points land in feature space. If your tetrode is positioned well, you see clouds. Each cloud is, roughly, one cell.
The toy below stands in for that workflow. Two of the dozens of features used in real sorting are plotted against each other; each dot is one spike. Drag a loop around a cloud to assign those spikes to a unit, and the average waveform of your selection appears on the right. When you have drawn a few clusters, hit Reveal ground truth to see which dots actually came from the same simulated neuron.
Each dot is a single detected spike, plotted by two features of its waveform. Spikes from the same neuron should land near each other. Drag a loop around a cluster to assign those spikes to a unit — the captured waveforms appear on the right.
Notice two things. First, the waveforms within a cluster are not identical — spike amplitude drifts as the animal’s brain pulses with breathing, with motion, with mood — but they share a family resemblance, which is what makes the clustering work at all. Second, on the edges, sorting is a judgment call. Two cells with overlapping clouds will fight over the boundary spikes; a stray noise blip will sometimes look more like a real spike than a real spike does. Doing this well, by hand, on sixty-four channels of recording, takes hours per session.
The trick that kept replay in reach
None of that hours-per-session pipeline is going to help if your goal is to react to a spike while the brain is still producing it. The closed-loop experiment at the heart of this site needed to detect a coordinated burst of spiking, decode what the rat was “remembering,” and fire a laser — all in roughly a millisecond. There is no time to sort.
The way out, due to Kloosterman and colleagues, was to not sort. Instead of assigning each spike to a labelled neuron, you keep its raw four-channel feature vector as a mark — a high-dimensional fingerprint that carries everything you would have used to sort, without ever committing to a cluster. Decoding then operates directly on the marked point process: any spike, sorted or not, contributes to the estimate of where the rat’s hippocampus thinks it is. The bookkeeping is heavier, but you get back the milliseconds you would have spent forcing identities onto the data. Chapter 6 is where this pays off in earnest.
The closed-loop system that does all of this in real time — spike detection, feature extraction, decoding, laser triggering — is an open-source C++ project I built called lfp_online. It will return at the end of the journey, once we have walked through the science it was built to test.
For now, we have ears. We can pick a single cell out of a noisy stream and watch its waveform over hours of recording. The next question is what those cells actually have to say — and in particular, what changes when you take the same animal, same electrodes, same neurons, and move it from one room into another.