Solving the spike sorting problem with Kilosort

Spike sorting is the computational process of extracting the firing times of single neurons from recordings of local electrical fields. This is an important but hard problem in neuroscience, complicated by the non-stationarity of the recordings and the dense overlap in electrical fields between nearby neurons. To solve the spike sorting problem, we have continuously developed over the past eight years a framework known as Kilosort. This paper describes the various algorithmic steps introduced in different versions of Kilosort. We also report the development of Kilosort4, a new version with substantially improved performance due to new clustering algorithms inspired by graph-based approaches. To test the performance of Kilosort, we developed a realistic simulation framework which uses densely sampled electrical fields from real experiments to generate non-stationary spike waveforms and realistic noise. We find that nearly all versions of Kilosort outperform other algorithms on a variety of simulated conditions, and Kilosort4 performs best in all cases, correctly identifying even neurons with low amplitudes and small spatial extents in high drift conditions.

[1]  Nicholas A. Steinmetz,et al.  Reproducibility of in-vivo 1 electrophysiological measurements 2 in mice 3 , 2022 .

[2]  Jeff Johnson,et al.  Billion-Scale Similarity Search with GPUs , 2017, IEEE Transactions on Big Data.

[3]  Jaime Fern'andez del R'io,et al.  Array programming with NumPy , 2020, Nature.

[4]  Matthias H. Hennig,et al.  SpikeInterface, a unified framework for spike sorting , 2019, bioRxiv.

[5]  Alessio Paolo Buccino,et al.  MEArec: A Fast and Customizable Testbench Simulator for Ground-truth Extracellular Spiking Activity , 2019, bioRxiv.

[6]  Peter Thier,et al.  Using deep neural networks to detect complex spikes of cerebellar Purkinje Cells , 2019, bioRxiv.

[7]  Vincent A. Traag,et al.  From Louvain to Leiden: guaranteeing well-connected communities , 2018, Scientific Reports.

[8]  M. Fiscella,et al.  Automatic spike sorting for high-density microelectrode arrays. , 2018, Journal of neurophysiology.

[9]  Joana P. Neto,et al.  Recording from the same neuron with high-density CMOS probes and patch-clamp: a ground-truth dataset and an experiment in collaboration , 2018, bioRxiv.

[10]  Pierre Yger,et al.  Ground truth recordings for validation of spike sorting algorithms , 2018 .

[11]  Sergey L. Gratiy,et al.  Real-time spike sorting platform for high-density extracellular probes with ground-truth validation and drift correction , 2017, bioRxiv.

[12]  Matteo Carandini,et al.  Kilosort: realtime spike-sorting for extracellular electrophysiology with hundreds of channels , 2016, bioRxiv.

[13]  Luca Berdondini,et al.  Unsupervised Spike Sorting for Large-Scale, High-Density Multielectrode Arrays. , 2017, Cell reports.

[14]  et al.,et al.  Jupyter Notebooks - a publishing format for reproducible computational workflows , 2016, ELPUB.

[15]  Siu Kwan Lam,et al.  Numba: a LLVM-based Python JIT compiler , 2015, LLVM '15.

[16]  Gaute T. Einevoll,et al.  ViSAPy: A Python tool for biophysics-based generation of virtual spiking activity for evaluation of spike-sorting algorithms , 2015, Journal of Neuroscience Methods.