Spike sorting with Kilosort4.
Journal
Nature methods
ISSN: 1548-7105
Titre abrégé: Nat Methods
Pays: United States
ID NLM: 101215604
Informations de publication
Date de publication:
08 Apr 2024
08 Apr 2024
Historique:
received:
16
01
2023
accepted:
01
03
2024
medline:
9
4
2024
pubmed:
9
4
2024
entrez:
8
4
2024
Statut:
aheadofprint
Résumé
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, made complicated by the nonstationarity of the recordings and the dense overlap in electrical fields between nearby neurons. To address the spike-sorting problem, we have been openly developing the Kilosort framework. Here we describe the various algorithmic steps introduced in different versions of Kilosort. We also report the development of Kilosort4, a version with substantially improved performance due to clustering algorithms inspired by graph-based approaches. To test the performance of Kilosort, we developed a realistic simulation framework that uses densely sampled electrical fields from real experiments to generate nonstationary spike waveforms and realistic noise. We found that nearly all versions of Kilosort outperformed other algorithms on a variety of simulated conditions and that Kilosort4 performed best in all cases, correctly identifying even neurons with low amplitudes and small spatial extents in high drift conditions.
Identifiants
pubmed: 38589517
doi: 10.1038/s41592-024-02232-7
pii: 10.1038/s41592-024-02232-7
doi:
Types de publication
Journal Article
Langues
eng
Sous-ensembles de citation
IM
Informations de copyright
© 2024. The Author(s).
Références
Jun, J. J. et al. Real-time spike sorting platform for high-density extracellular probes with ground-truth validation and drift correction. Preprint at BioRxiv https://doi.org/10.1101/101030 (2017).
Yger, P. et al. A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. eLife 7, e34518 (2018).
doi: 10.7554/eLife.34518
pubmed: 29557782
pmcid: 5897014
Chung, J. E. et al. A fully automated approach to spike sorting. Neuron 95, 1381–1394 (2017).
doi: 10.1016/j.neuron.2017.08.030
pubmed: 28910621
pmcid: 5743236
Rodriguez, A. & Laio, A. Clustering by fast search and find of density peaks. Science 344, 1492–1496 (2014).
doi: 10.1126/science.1242072
pubmed: 24970081
Magland, J. F. & Barnett, A. H. Unimodal clustering using isotonic regression: Iso-split. Preprint at https://arxiv.org/abs/1508.04841 (2015).
Pachitariu, M., Steinmetz, N., Kadir, S., Carandini, M. & Kenneth D. H. Kilosort: realtime spike-sorting for extracellular electrophysiology with hundreds of channels. Preprint at bioRxiv https://doi.org/10.1101/061481 (2016).
Lewicki, M. S. A review of methods for spike sorting: the detection and classification of neural action potentials. Network: Comput. Neural Syst. 9, R53 (1998).
doi: 10.1088/0954-898X_9_4_001
Segev, R., Goodhouse, J., Puchalla, J. & Berry, M. J. Recording spikes from a large fraction of the ganglion cells in a retinal patch. Nat. Neurosci. 7, 1155–1162 (2004).
doi: 10.1038/nn1323
Marre, O. et al. Mapping a complete neural population in the retina. J. Neurosci. 32, 14859–14873 (2012).
doi: 10.1523/JNEUROSCI.0723-12.2012
pubmed: 23100409
pmcid: 3664031
Pillow, J. W., Shlens, J., Chichilnisky, E. J. & Simoncelli, E. P. A model-based spike sorting algorithm for removing correlation artifacts in multi-neuron recordings. PloS ONE 8, e62123 (2013).
doi: 10.1371/journal.pone.0062123
pubmed: 23671583
pmcid: 3643981
Franke, F., Quian Quiroga, R., Hierlemann, A. & Obermayer, K. Bayes optimal template matching for spike sorting–combining Fisher discriminant analysis with optimal filtering. J. Comput. Neurosci. 38, 439–459 (2015).
doi: 10.1007/s10827-015-0547-7
pubmed: 25652689
pmcid: 4420847
Garcia, S., Buccino, A. P. & Yger, P. How do spike collisions affect spike sorting performance? eNeuro https://doi.org/10.1523/ENEURO.0105-22.2022 (2022).
Steinmetz, N. A. et al. Neuropixels 2.0: a miniaturized high-density probe for stable, long-term brain recordings. Science 372, eabf4588 (2021).
doi: 10.1126/science.abf4588
pubmed: 33859006
pmcid: 8244810
Rossant, C. et al. Spike sorting for large, dense electrode arrays. Nat. Neurosci. 19, 634–641 (2016).
doi: 10.1038/nn.4268
pubmed: 26974951
pmcid: 4817237
Jun, J. J. et al. Fully integrated silicon probes for high-density recording of neural activity. Nature 551, 232–236 (2017).
doi: 10.1038/nature24636
pubmed: 29120427
pmcid: 5955206
Steinmetz, N., Carandini, M. & Harris, K. D. ‘Single Phase3’ and ‘Dual Phase3’ neuropixels datasets. Figshare https://doi.org/10.6084/m9.figshare.7666892.v2 (2017).
Quiroga, R. Q., Nadasdy, Z. & Ben-Shaul, Y. Unsupervised spike detection and sorting with wavelets and superparamagnetic clustering. Neural Comput. 16, 1661–1687 (2004).
doi: 10.1162/089976604774201631
pubmed: 15228749
Newman, M. E. J. & Girvan, M. Finding and evaluating community structure in networks. Phys. Rev. E 69, 026113 (2004).
doi: 10.1103/PhysRevE.69.026113
Traag, V. A., Waltman, L. & Van Eck, N. J. From louvain to leiden: guaranteeing well-connected communities. Sci. Rep. 9, 1–12 (2019).
doi: 10.1038/s41598-019-41695-z
Blondel, V. D., Guillaume, J.-L., Lambiotte, R. & Lefebvre, E. Fast unfolding of communities in large networks. J. Stat. Mech. Theor. Exp. 2008, P10008 (2008).
doi: 10.1088/1742-5468/2008/10/P10008
Peixoto, T. P. Descriptive vs. Inferential Community Detection in Networks: Pitfalls, Myths, and Half-Truths (Cambridge University Press, 2023).
International Brain Laboratory et al. Reproducibility of in-vivo electrophysiological measurements in mice. Preprint at bioRxiv https://doi.org/10.1101/2022.05.09.491042 (2022).
Hilgen, G. et al. Unsupervised spike sorting for large-scale, high-density multielectrode arrays. Cell Rep. 18, 2521–2532 (2017).
doi: 10.1016/j.celrep.2017.02.038
pubmed: 28273464
Diggelmann, R., Fiscella, M., Hierlemann, A. & Franke, F. Automatic spike sorting for high-density microelectrode arrays. J. Neurophysiol. 120, 3155–3171 (2018).
doi: 10.1152/jn.00803.2017
pubmed: 30207864
pmcid: 6314465
Buccino, A. P. et al. Spikeinterface, a unified framework for spike sorting. eLife 9, e61834 (2020).
doi: 10.7554/eLife.61834
pubmed: 33170122
pmcid: 7704107
Rodgers, C. C. A detailed behavioral, videographic, and neural dataset on object recognition in mice. Sci. Data 9, 620 (2022).
doi: 10.1038/s41597-022-01728-1
pubmed: 36229608
pmcid: 9561117
Joshi, A. et al. Dynamic synchronization between hippocampal representations and stepping. Nature 617, 125–131 (2023).
doi: 10.1038/s41586-023-05928-6
pubmed: 37046088
pmcid: 10156593
Van Rossum, G. & Drake Jr, F. L. Python reference manual. Centrum voor Wiskunde en Informatica Amsterdam 111, 1–52 (1995).
Pedregosa, F. et al. Scikit-learn: machine learning in Python. J. Mach. Learn. Res. 12, 2825–2830 (2011).
Johnson, J., Douze, M. & Jégou, H. Billion-scale similarity search with GPUs. IEEE Trans. Big Data 7, 535–547 (2019).
doi: 10.1109/TBDATA.2019.2921572
Paszke, A. et al. Pytorch: an imperative style, high-performance deep learning library. in Advances in Neural Information Processing Systems Vol 32 8024–8035 (Curran Associates, 2019).
Harris, C. R. et al. Array programming with NumPy. Nature 585, 357–362 (2020).
doi: 10.1038/s41586-020-2649-2
pubmed: 32939066
pmcid: 7759461
Virtanen, P. et al. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat. Methods 17, 261–272 (2020).
doi: 10.1038/s41592-019-0686-2
pubmed: 32015543
pmcid: 7056644
Lam, S. K., Pitrou, A. & Seibert, S. Numba: a llvm-based Python jit compiler. in Proc. Second Workshop on the LLVM Compiler Infrastructure in HPC 1–6 (2015).
da Costa-Luis, C. O. tqdm: A fast, extensible progress meter for python and cli. J. Open Source Softw. 4, 1277 (2019).
doi: 10.21105/joss.01277
Bradski, G. The opencv library. Dr Dobbs J. 25, 120–123 (2000).
Moore, O., Jessurun, N., Chase, M., Nemitz, N. & Campagnola, L. PyQtGraph: high performance visualization for all platforms. in Proc. 22nd Python in Science Conference (eds Agarwal, M., Calloway, C. & and Niederhut, D.) 106–113 (2023).
Hunter, J. D. Matplotlib: a 2d graphics environment. Comput. Sci. Eng. 9, 90 (2007).
doi: 10.1109/MCSE.2007.55
Kluyver, T. et al. Jupyter notebooks: a publishing format for reproducible computational workflows. in Positioning and Power in Academic Publishing: Players, Agents and Agendas, 87–90 (IOS Press, 2016).
Summerfield, M. Rapid GUI Programming with Python and Qt: The Definitive Guide to PyQt Programming (Pearson Education, 2007).
Kessy, A., Lewin, A. & Strimmer, K. Optimal whitening and decorrelation. Am. Stat. 72, 309–314 (2018).
doi: 10.1080/00031305.2016.1277159
Ye, Z. et al. Ultra-high density electrodes improve detection, yield, and cell type specificity of brain recordings. Preprint at bioRxiv https://doi.org/10.1101/2023.08.23.554527 (2023).
Mallat, S. G. & Zhang, Z. Matching pursuits with time-frequency dictionaries. IEEE Trans. Signal Proc. 41, 3397–3415 (1993).
doi: 10.1109/78.258082
Arthur, D. & Vassilvitskii, S. K-means++ the advantages of careful seeding. in Proc. 18th Annual ACM-SIAM Symposium on Discrete Algorithms, 1027–1035 (2007).
Magland, J. et al. Spikeforest, reproducible web-facing ground-truth validation of automated neural spike sorters. eLife 9, e55167 (2020).
doi: 10.7554/eLife.55167
pubmed: 32427564
pmcid: 7237210
Henze, D. A. et al. Intracellular features predicted by extracellular recordings in the hippocampus in vivo. J. Neurophysiol. 84, 390–400 (2000).
doi: 10.1152/jn.2000.84.1.390
pubmed: 10899213
Harris, K. D., Henze, D. A., Csicsvari, J., Hirase, H. & Buzsaki, G. Accuracy of tetrode spike separation as determined by simultaneous intracellular and extracellular measurements. J. Neurophysiol. 84, 401–414 (2000).
doi: 10.1152/jn.2000.84.1.401
pubmed: 10899214
Henze, D. A. et al. Simultaneous intracellular and extracellular recordings from hippocampus region ca1 of anesthetized rats. CRCNS https://doi.org/10.6080/K02Z13FP (2009).
Neto, J. P. et al. Validating silicon polytrodes with paired juxtacellular recordings: method and dataset. J. Neurophysiol. 116, 892–903 (2016).
doi: 10.1152/jn.00103.2016
pubmed: 27306671
pmcid: 5002440
Marques-Smith, A. et al. Recording from the same neuron with high-density CMOS probes and patch-clamp: a ground-truth dataset and an experiment in collaboration. Preprint at bioRxiv https://doi.org/10.1101/370080 (2020).
Marques-Smith, A. et al. Simultaneous patch-clamp and dense cmos probe extracellular recordings from the same cortical neuron in anaesthetized rats. CRCNS https://doi.org/10.6080/K0J67F4T (2018).
Spampinato, G. L. B. et al. Ground truth recordings for validation of spike sorting algorithms. Zenodo https://doi.org/10.5281/zenodo.1205233 (2018).
Hagen, E. et al. Visapy: a Python tool for biophysics-based generation of virtual spiking activity for evaluation of spike-sorting algorithms. J. Neurosci. Methods 245, 182–204 (2015).
doi: 10.1016/j.jneumeth.2015.01.029
pubmed: 25662445
Gratiy, S. L. et al. Bionet: a Python interface to neuron for modeling large-scale networks. PLoS ONE 13, e0201630 (2018).
doi: 10.1371/journal.pone.0201630
pubmed: 30071069
pmcid: 6072024
Camuñas-Mesa, L. A. & Quiroga, R. Q. A detailed and fast model of extracellular recordings. Neural Comput. 25, 1191–1212 (2013).
doi: 10.1162/NECO_a_00433
pubmed: 23470125
Buccino, A. P. & Einevoll, G. T. Mearec: a fast and customizable testbench simulator for ground-truth extracellular spiking activity. Neuroinformatics 19, 185–204 (2021).
doi: 10.1007/s12021-020-09467-7
pubmed: 32648042
Pachitariu, M et al. Kilosort4. Zenodo https://doi.org/10.5281/zenodo.10863771 (2024).