Algorithms; Animals; Models, Neurological; Nonlinear Dynamics; Dimensionality Reduction; Action Potentials/physiology; Neurons/physiology; Signal Processing, Computer-Assisted; Action Potentials; Neurons; Neuroscience (all); Immunology and Microbiology (all); Biochemistry, Genetics and Molecular Biology (all); Agricultural and Biological Sciences (all)
Abstract :
[en] Spike sorting is one of the cornerstones of extracellular electrophysiology. By leveraging advanced signal processing and data analysis techniques, spike sorting makes it possible to detect, isolate, and map single neuron spiking activity from both in vivo and in vitro extracellular electrophysiological recordings. A crucial step of any spike sorting pipeline is to reduce the dimensionality of the recorded spike waveform data. Reducing the dimensionality of the processed data is a near-universal practice, fundamentally motivated by the use of clustering algorithms responsible to detect, isolate, and sort the recorded putative neurons. In this paper, we propose and illustrate on both synthetic and experimental data that employing the nonlinear dimensionality reduction technique Uniform Manifold Approximation and Projection (UMAP) can drastically improve the performance, efficiency, robustness, and scalability of spike sorting pipelines without increasing their computational cost. We show how replacing the linear or ad hoc, expert-defined, supervised nonlinear dimensionality reduction methods commonly used in spike sorting pipelines by the unsupervised, mathematically grounded, nonlinear dimensionality reduction method provided by UMAP drastically increases the number of correctly sorted neurons, makes the identification of quieter, seldom spiking neurons more reliable, enables deeper and more precise explorations and analysis of the neural code, and paves new ways toward more efficient and end-to-end automatable spike sorting pipelines of large-scale extracellular neural recording as those produced by high-density multielectrode arrays.
Disciplines :
Engineering, computing & technology: Multidisciplinary, general & others
Author, co-author :
Suárez-Barrera, Daniel; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Bayones, Lucas; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Encinas-Rodríguez, Norberto; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Parra Sánchez, Sergio ; Université de Liège - ULiège > Département d'électricité, électronique et informatique (Institut Montefiore) > Brain-Inspired Computing ; Université de Liège - ULiège > Montefiore Institute of Electrical Engineering and Computer Science
Monroy, Viktor; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Pujalte, Sebastián; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Andrade-Ortega, Bernardo; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Díaz, Héctor; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Alvarez, Manuel; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Zainos, Antonio; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico
Franci, Alessio ; Université de Liège - ULiège > Département d'électricité, électronique et informatique (Institut Montefiore) > Brain-Inspired Computing ; WEL Research Institute, Wavre, Belgique
Rossi-Pool, Román ; Instituto de Fisiología Celular-Neurociencias, Universidad Nacional Autónoma de México, Mexico City, Mexico ; Centro de Ciencias de la Complejidad, Universidad Nacional Autónoma de México, Mexico City, Mexico
Language :
English
Title :
Efficient and reliable spike sorting from neural recordings with UMAP-based unsupervised nonlinear dimensionality reduction.
UNAM - Universidad Nacional Autónoma de México CONACYT - Consejo Nacional de Ciencia y Tecnología IBRO - International Brain Research Organization
Funding text :
This work was supported by grants PAPIIT-IN210819, PAPIIT-IN205022 and IN203825 (to R. R. -P.) from the Direcci\u00F3n de Asuntos del Personal Acad\u00E9mico de la Universidad Nacional Aut\u00F3noma de M\u00E9xico and CONAHCYT-319347 (to R. R. -P.) from Consejo Nacional de Ciencia y Tecnolog\u00EDa; SECIHTI-CBF-2025-I-2054 (to R. R. -P.) from Secretaria de Ciencia, Humanidades, Tecnolog\u00EDa e Innovaci\u00F3n; IBRO Early Career Award 2022 (to R. R. -P.) from International Brain Research Association. L.B. is a postdoctoral researcher (Postdoctoral fellowship CONACYT-838783). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
1. Valente M, Pica G, Bondanelli G, Moroni M, Runyan CA, Morcos AS, et al. Correlations enhance the behavioral readout of neural population activity in association cortex. Nat Neurosci. 2021;24(7):975–86. https://doi.org/10.1038/s41593-021-00845-1 PMID: 33986549
2. Panzeri S, Moroni M, Safaai H, Harvey CD. The structures and functions of correlations in neural population codes. Nat Rev Neurosci. 2022;23(9):551–67. https://doi.org/10.1038/s41583-022-00606-4 PMID: 35732917
3. Rumyantsev OI, Lecoq JA, Hernandez O, Zhang Y, Savall J, Chrapkiewicz R, et al. Fundamental bounds on the fidelity of sensory cortical coding. Nature. 2020;580(7801):100–5. https://doi.org/10.1038/s41586-020-2130-2 PMID: 32238928
4. Tauste Campo A, Zainos A, Vázquez Y, Adell Segarra R, Álvarez M, Deco G, et al. Thalamocortical interactions shape hierarchical neural variability during stimulus perception. iScience. 2024;27(7):110065. https://doi.org/10.1016/j.isci.2024.110065 PMID: 38993679
5. Semedo JD, Zandvakili A, Machens CK, Yu BM, Kohn A. Cortical areas interact through a communication subspace. Neuron. 2019;102(1):249–59. e4. https://doi.org/10.1016/j.neuron.2019.01.026 PMID: 30770252
6. Jun JJ, Steinmetz NA, Siegle JH, Denman DJ, Bauza M, Barbarits B, et al. Fully integrated silicon probes for high-density recording of neural activity. Nature. 2017;551(7679):232–6. https://doi.org/10.1038/nature24636 PMID: 29120427
7. Steinmetz NA, Aydin C, Lebedeva A, Okun M, Pachitariu M, Bauza M, et al. Neuropixels 2.0: A miniaturized high-density probe for stable, long-term brain recordings. Science. 2021;372(6539):eabf4588. https://doi.org/10.1126/science.abf4588 PMID: 33859006
8. Hong G, Lieber CM. Novel electrode technologies for neural recordings. Nat Rev Neurosci. 2019;20(6):330–45. https://doi.org/10.1038/s41583-019-0140-6 PMID: 30833706
9. Zhao Z, Zhu H, Li X, Sun L, He F, Chung JE, et al. Ultraflexible electrode arrays for months-long high-density electrophysiological mapping of thousands of neurons in rodents. Nat Biomed Eng. 2022.
10. Hilgen G, Sorbaro M, Pirmoradian S, Muthmann J-O, Kepiro IE, Ullo S, et al. Unsupervised spike sorting for large-scale, high-density multielectrode arrays. Cell Rep. 2017;18(10):2521–32. https://doi.org/10.1016/j.celrep.2017.02.038 PMID: 28273464
12. Lee JH, Carlson DE, Razaghi HS, Yao W, Goetz GA, Hagen E, et al. YASS: yet another spike sorter. Adv Neural Inf Process Syst. 2017;30.
13. Yger P, Spampinato GL, Esposito E, Lefebvre B, Deny S, Gardella C, et al. A spike sorting toolbox for up to thousands of electrodes validated with ground truth recordings in vitro and in vivo. Elife. 2018;7:e34518. https://doi.org/10.7554/eLife.34518 PMID: 29557782
14. Saif-ur-Rehman M, Ali O, Dyck S, Lienkämper R, Metzler M, Parpaley Y, et al. SpikeDeep-classifier: a deep-learning based fully automatic offline spike sorting algorithm. J Neural Eng. 2021;18:16009.
15. Park IY, Eom J, Jang H, Kim S, Park S, Huh Y, et al. Deep learning-based template matching spike classification for extracellular recordings. Appl Sci. 2019;10:301.
16. Quiroga RQ, Nadasdy Z, Ben-Shaul Y. Unsupervised spike detection and sorting with wavelets and superparamagnetic clustering. Neural Comput. 2004;16(8):1661–87. https://doi.org/10.1162/089976604774201631 PMID: 15228749
17. Huang L, Ling BW-K, Cai R, Zeng Y, He J, Chen Y. WMsorting: wavelet packets decomposition and mutual information based spike sorting method. IEEE Trans Nanobioscience. 2019:18:283–95. https://doi.org/10.1109/TNB.2019.2909010 PMID: 30951475
18. Caro-Martín CR, Delgado-García JM, Gruart A, Sánchez-Campusano R. Spike sorting based on shape, phase, and distribution features, and K-TOPS clustering with validity and error indices. Sci Rep. 2018;8(1):17796. https://doi.org/10.1038/s41598-018-35491-4 PMID: 30542106
19. Eom J, Park IY, Kim S, Jang H, Park S, Huh Y, et al. Deep-learned spike representations and sorting via an ensemble of auto-encoders. Neural Netw. 2021;134:131–42. https://doi.org/10.1016/j.neunet.2020.11.009 PMID: 33307279
20. Li Z, Wang Y, Zhang N, Li X. An accurate and robust method for spike sorting based on convolutional neural networks. Brain Sci. 2020;10(11):835. https://doi.org/10.3390/brainsci10110835 PMID: 33187098
21. Pokala SD, Bernert M, Nanami T, Kohno T, Lévi T, Yvert B. A frugal Spiking Neural Network for unsupervised multivariate temporal pattern classification and multichannel spike sorting. Nat Commun. 2025;16(1):9218. https://doi.org/10.1038/s41467-025-64231-2 PMID: 41107265
22. Pachitariu M, Steinmetz N, Kadir S, Carandini M, Harris K. Fast and accurate spike sorting of high-channel count probes with KiloSort. In: Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS’16. Curran Associates Inc.; 2016. p. 4455–63.
23. Pachitariu M, Sridhar S, Pennington J, Stringer C. Spike sorting with Kilosort4. Nat Methods. 2024;21(5):914–21. https://doi.org/10.1038/s41592-024-02232-7 PMID: 38589517
24. McInnes L, Healy J, Saul N, Großberger L. UMAP: uniform manifold approximation and projection. J Open Source Softw. 2018;3(29):861. https://doi.org/10.21105/joss.00861
25. Healy J, McInnes L. Uniform manifold approximation and projection. Nat Rev Methods Primers. 2024;4(1):82. https://doi.org/10.1038/s43586-024-00363-x
26. Gardner RJ, Hermansen E, Pachitariu M, Burak Y, Baas NA, Dunn BA, et al. Toroidal topology of population activity in grid cells. Nature. 2022;602(7895):123–8. https://doi.org/10.1038/s41586-021-04268-7 PMID: 35022611
27. Diaz-deLeon G, Alvarez M, Bayones L, Zainos A, Zizumbo J, Parra S, et al. An abstract categorical decision code in dorsal premotor cortex. Proc Natl Acad Sci U S A. 2022;119(50):e2214562119. https://doi.org/10.1073/pnas.2214562119 PMID: 36469775
28. Bayones L, Zainos A, Alvarez M, Romo R, Franci A, Rossi-Pool R. Orthogonality of sensory and contextual categorical dynamics embedded in a continuum of responses from the second somatosensory cortex. Proceedings of the National Academy of Sciences. 2024;121(29):e2316765121. https://doi.org/10.1073/pnas.2316765121
29. Gouwens NW, Sorensen SA, Baftizadeh F, Budzillo A, Lee BR, Jarsky T, et al. Integrated morphoelectric and transcriptomic classification of cortical GABAergic cells. Cell. 2020;183(4):935–53.e19. https://doi.org/10.1016/j.cell.2020.09.057 PMID: 33186530
30. Becht E, et al. Dimensionality reduction for visualizing single-cell data using UMAP. Nat Biotechnol. 2019;37:38–44.
31. Lee EK, Balasubramanian H, Tsolias A, Anakwe SU, Medalla M, Shenoy KV, et al. Non-linear dimensionality reduction on extracellular waveforms reveals cell type diversity in premotor cortex. Elife. 2021;10:e67490. https://doi.org/10.7554/eLife.67490 PMID: 34355695
32. Scala F, Kobak D, Bernabucci M, Bernaerts Y, Cadwell CR, Castro JR, et al. Phenotypic variation of transcriptomic cell types in mouse motor cortex. Nature. 2021;598(7879):144–50. https://doi.org/10.1038/s41586-020-2907-3 PMID: 33184512
33. Gong Q, Sharma M, Glass MC, Kuan EL, Chander A, Singh M, et al. Multi-omic profiling reveals age-related immune dynamics in healthy adults. Nature. 2025. https://doi.org/10.1038/s41586-025-09686-5 PMID: 41162704
34. He S, Zhu Y, Tavakol DN, Ye H, Lao YH, Zhu Z, et al. Squidiff: predicting cellular development and responses to perturbations using a diffusion model. Nat Methods. 2025.
35. Yang Y, Sun H, Zhang Y, Zhang T, Gong J, Wei Y, et al. Dimensionality reduction by UMAP reinforces sample heterogeneity analysis in bulk transcriptomic data. Cell Rep. 2021;36(4):109442. https://doi.org/10.1016/j.celrep.2021.109442 PMID: 34320340
36. Schaefer M, Peneder P, Malzl D, Lombardo SD, Peycheva M, Burton J, et al. Multimodal learning enables chat-based exploration of single-cell data. Nat Biotechnol. 2025. https://doi.org/10.1038/s41587-025-02857-9
37. Stokes MG. “Activity-silent” working memory in prefrontal cortex: a dynamic coding framework. Trends Cogn Sci. 2015;19(7):394–405. https://doi.org/10.1016/j.tics.2015.05.004 PMID: 26051384
38. Friedenberger Z, Harkin E, Tóth K, Naud R. Silences, spikes and bursts: three-part knot of the neural code. J Physiol. 2023;601(23):5165–93. https://doi.org/10.1113/JP281510 PMID: 37889516
39. Barth AL, Poulet JFA. Experimental evidence for sparse firing in the neocortex. Trends Neurosci. 2012;35(6):345–55. https://doi.org/10.1016/j.tins.2012.03.008 PMID: 22579264
41. Henze DA, Borhegyi Z, Csicsvari J, Mamiya A, Harris KD, Buzsáki G. Intracellular features predicted by extracellular recordings in the hippocampus in vivo. J Neurophysiol. 2000;84(1):390–400. https://doi.org/10.1152/jn.2000.84.1.390 PMID: 10899213
42. Spampinato GLB, et al. Ground truth recordings for validation of spike sorting algorithms. 2018. https://doi.org/10.5281/zenodo.1205233
43. Henze D, et al. Simultaneous intracellular and extracellular recordings from hippocampus region CA1 of anesthetized rats. 2009. https://doi.org/10.6080/K02Z13FP
44. de Lafuente V, Romo R. Neural correlate of subjective sensory experience gradually builds up across cortical areas. Proc Natl Acad Sci U S A. 2006;103(39):14266–71. https://doi.org/10.1073/pnas.0605826103 PMID: 16924098
45. Díaz H, Bayones L, Alvarez M, Andrade-Ortega B, Valero S, Zainos A, et al. Contextual neural dynamics during time perception in the primate ventral premotor cortex. Proc Natl Acad Sci U S A. 2025;122(6):e2420356122. https://doi.org/10.1073/pnas.2420356122 PMID: 39913201
46. Suárez-Barrera D, et al. Electrophysiological recordings of neurons in S2, VPC, and DPC during cognitive tasks. 2025. https://doi.org/10.5281/zenodo.17546569
47. Encinas-Rodríguez N, et al. Foreperiod neural activity recordings from ventral premotor (VPC), dorsal premotor (DPC), and secondary somatosensory (S2) cortices. 2025. https://doi.org/10.5281/zenodo.17569100
48. Rossi-Pool R, Vergara J, Romo R. Constructing perceptual decision-making across cortex. In: Poeppel D, Mangun G, Gazzaniga M, editors. The Cognitive Neurosciences, 6/E. The MIT Press; 2020. p. 413–27.
49. Rey HG, Pedreira C, Quian Quiroga R. Past, present and future of spike sorting techniques. Brain Res Bull. 2015;119(Pt B):106–17. https://doi.org/10.1016/j.brainresbull.2015.04.007 PMID: 25931392
50. Campello RJGB, Moulavi D, Sander J. Density-based clustering based on hierarchical density estimates BT. In: Pei J, Tseng VS, Cao L, Motoda H, Xu G, editors. Advances in knowledge discovery and data mining. Berlin, Heidelberg: Springer; 2013. p. 160–72.
51. McInnes L, Healy J, Astels S. hdbscan: hierarchical density based clustering. J Open Source Softw. 2017;2(11):205. https://doi.org/10.21105/joss.00205
52. Suárez-Barrera D, et al. Codes for analyzing neural spike sorting with UMAP. 2025. https://doi.org/10.5281/zenodo.17575203
53. Bellman R, Bellman RE, Corporation R. Dynamic Programming. Princeton University Press; 1957.
54. Ghojogh B, Crowley M, Karray F, Ghodsi A. Elements of dimensionality reduction and manifold learning. Springer; 2023.
55. Petersen P, Hainmueller TH. Plugins for phy1 and phy2. 2019. https://doi.org/10.5281/zenodo.3367782
56. Sedaghat-Nejad E, Fakharian MA, Pi J, Hage P, Kojima Y, Soetedjo R, et al. P-sort: an open-source software for cerebellar neurophysiology. J Neurophysiol. 2021;126(4):1055–75. https://doi.org/10.1152/jn.00172.2021 PMID: 34432996
57. Lee J. Introduction to topological manifolds. Springer Science & Business Media; 2010.
58. Schneidman E, Puchalla JL, Segev R, Harris RA, Bialek W, Berry MJ. Synergy from silence in a combinatorial neural code. J Neurosci. 2011;31:15732–41.
59. Andrade-Ortega B, Díaz H, Bayones L, Alvarez M, Zainos A, Rivera-Yoshida N, et al. Multistable bimodal perceptual coding within the ventral premotor cortex. Sci Adv. 2025;11(38):eadw5500. https://doi.org/10.1126/sciadv.adw5500 PMID: 40971437
60. Zhang Y, Han D, Wang Y, Gu Y, Li D. SimSort: A powerful framework for spike sorting by large-scale electrophysiology simulation. arXiv Preprint. 2025. https://doi.org/arXiv2502.03198
61. Trautmann EM. Accurate estimation of neural population dynamics without spike sorting. Neuron. 2019;103:292–308.
62. Rossi-Pool R, Romo R. Low dimensionality, high robustness in neural population dynamics. Neuron. 2019;103:177–9.
63. Papale P, Wang F, Self MW, Roelfsema PR. An extensive dataset of spiking activity to reveal the syntax of the ventral stream. Neuron. 2025;113(4):539-553.e5. https://doi.org/10.1016/j.neuron.2024.12.003 PMID: 39809277
64. Kobak D, Pardo-Vazquez JL, Valente M, Machens CK, Renart A. State-dependent geometry of population activity in rat auditory cortex. Elife. 2019;8:e44526. https://doi.org/10.7554/eLife.44526 PMID: 30969167
65. Harris KD, Quiroga RQ, Freeman J, Smith SL. Improving data quality in neuronal population recordings. Nat Neurosci. 2016;19(9):1165–74. https://doi.org/10.1038/nn.4365 PMID: 27571195
66. Diekman C, Dasgupta K, Nair V, Unnikrishnan KP. Discovering functional neuronal connectivity from serial patterns in spike train data. Neural Comput. 2014;26(7):1263–97. https://doi.org/10.1162/NECO_a_00598 PMID: 24708373
67. Baldassano C, Beck DM, Fei-Fei L. Parcellating connectivity in spatial maps. PeerJ. 2015;3:e784. https://doi.org/10.7717/peerj.784 PMID: 25737822
68. Baker C, Froudarakis E, Yatsenko D, Tolias AS, Rosenbaum R. Inference of synaptic connectivity and external variability in neural microcircuits. J Comput Neurosci. 2020;48(2):123–47. https://doi.org/10.1007/s10827-020-00739-4 PMID: 32080777
69. Laquitaine S, Imbeni M, Tharayil J, Isbister JB, Reimann MW. Spike sorting biases and information loss in a detailed cortical model. bioRxiv. 2024.
70. Zhang Y, He T, Boussard J, Windolf C, Winter O, Trautmann E, et al. Bypassing spike sorting: density-based decoding using spike localization from dense multielectrode probes. Adv Neural Inf Process Syst. 2023;36:77604–31. PMID: 40620639
71. Soleymankhani A, Shalchyan V. A new spike sorting algorithm based on continuous wavelet transform and investigating its effect on improving neural decoding accuracy. Neuroscience. 2021;468:139–48. https://doi.org/10.1016/j.neuroscience.2021.05.036 PMID: 34102262
72. Issar D, Williamson RC, Khanna SB, Smith MA. A neural network for online spike classification that improves decoding accuracy. J Neurophysiol. 2020;123(4):1472–85. https://doi.org/10.1152/jn.00641.2019 PMID: 32101491