Spike sorting is the signal processing pipeline that converts raw intracortical electrode recordings into labeled trains of action potentials (spikes) attributed to individual neurons. It is a fundamental preprocessing step for single-unit BCI systems.
The Problem
A single electrode tip in cortex records the superimposed electrical fields of multiple nearby neurons. Each neuron produces a characteristic spike waveform shape (determined by its morphology and distance from the electrode), but these waveforms overlap in time. Spike sorting must:
- Detect spike events (threshold crossings above noise floor)
- Extract waveform features (peak amplitude, valley, width, principal components)
- Cluster similar waveforms into groups corresponding to single neurons ("units")
- Label each spike with its putative neuron identity
Methods
Classical spike sorting (Plexon, Offline Sorter, WaveClus):
- PCA or other dimensionality reduction on spike waveform snippets
- Manual or semi-automated cluster assignment in feature space
- Labor-intensive; not real-time
Template matching (Kilosort, MountainSort):
- Learn a set of template waveforms; assign spikes to nearest template
- Handles overlapping spikes; largely automated
- Kilosort has become the de facto standard for high-channel-count arrays
Real-time spike sorting (essential for closed-loop BCI):
- Online algorithms (threshold + simple feature matching) enable millisecond-latency spike detection during BCI sessions
- Trade precision for speed; commonly detect "multiunit activity" (MUA) rather than fully isolated single units
Relevance to BCI Performance
The degree of spike sorting applied affects BCI decoding:
- Single-unit spikes: Highest information content; require careful offline sorting; degrade as electrode impedance increases over months
- Multi-unit activity (MUA): Threshold crossings above noise without full sorting; more robust, easier to compute in real time, still useful for decoding
- Threshold crossings: Even simpler; stable over time; used in many chronic implant BCI systems
Research has shown that MUA often performs nearly as well as single-unit spikes for motor decoding tasks, which is favorable for chronic systems where electrode isolation degrades over time.
Future: Neural Foundation Models
Emerging approaches apply self-supervised learning (neural foundation models) to raw LFP or spike data, bypassing explicit spike sorting by learning neural representations directly from waveforms. This may reduce the need for careful spike sorting in future high-channel-count BCI systems.