spike sorting
When an electrode sits inside the brain, it often hears several neurons at once, each firing its own sharp blips, called spikes. Spike sorting is the job of figuring out which spike came from which neuron, so that each cell's activity can be followed on its own. It is like sitting in a dark room with several people talking and learning to tell each voice apart.
The trick is that each neuron tends to produce a spike with a slightly distinctive shape — its own little signature waveform — depending on its size and how far it is from the electrode. Spike sorting groups the recorded blips by these shapes, assigning the similar-looking ones to the same neuron. Done well, one messy mixed recording is teased apart into several clean per-neuron streams.
This matters because the most precise brain–computer interfaces want to know what individual neurons are doing, not just the crowd average. Spike sorting is the step that turns a tangle of overlapping spikes into separate, readable signals — though in practice it is hard, error-prone, and an active area of research.
Some modern brain–computer interfaces skip full spike sorting and instead just count all spikes crossing a threshold, lumping nearby neurons together — often "good enough" for control while saving a lot of effort.