bioRxiv Science⌕ Search

bioRxiv · 10.64898/2026.06.18.733033

SpikeCleaner: An Algorithm to Label Unit Quality After Automated Spike Sorting

Abstract

GapAutomated spike sorting algorithms have revolutionized the way neuronal activity is extracted from extracellular recordings, yet they remain imperfect. Specifically, inaccurate acceptance of noise-based units not only leaves researchers with clusters that require extensive manual curation, an essential but time-consuming process, that also leads to significant subjectivity in the selection of units. In an era of high-density probes like Neuropixels, where an hour of data can exceed 80 GB, manual curation is no longer scalable, automation of standard criteria can speed data curation and ensure quality of datasets. Here, we developed a semi-automated curation pipeline to label the quality of units after automated curation by Kilosort. ApproachOur algorithm standardizes criteria for labeling of Noise, Multi-Unit Activity (MUA), and Good Units using a combination of spike rate, spike timing metrics (from autocorrelogram), and waveform-based physiological features such as peak amplitude, slopes, half-width, and inter-channel correlation. Based on these features, clusters are assigned standardized labels (good, noise, multi-unit activity) that can be imported directly into Phy, where they serve as curation aids rather than absolute classifications, supporting but not replacing expert judgment. Heuristically, "noise" units are those unlikely to be neuronal in origin; "MUA" includes units with significant neural contribution (i.e., neuronal waveform) but with some degree of clear imperfection to be further cleaned, and "good" units are those without any clear deviation from ideal unit criteria. By ensuring accurate selection of acceptable units, we enable robust downstream analyses such as neural decoding and longitudinal tracking of neuron identity. Thresholds for all metrics were chosen to maximize the matching of algorithm output to that of 2 expert manual curators. Of note, users may alter thresholds either based on their own judgment or using an included tool to semi-automatically find thresholds that optimize SpikeCleaner with their own expert curation. ResultsTo benchmark, we compared the outputs of our algorithm to expert-labels curated in Phy by two expert users across three recordings. SpikeCleaner achieved an average of 97% accuracy vs. experts & 92% F1 score in classifying Single Units. It achieved an accuracy of 97% & 92% F1 score in full-category agreement (SU, MUA, Noise), and 97% accuracy & 95% F1 score in distinguishing Neuronal vs. Non-Neuronal units.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Zutshi, D., Berezhnoi, D., Ghimire, A., Hartner, J., Kim, D., Watson, B. O.. 2026-06-23. SpikeCleaner: An Algorithm to Label Unit Quality After Automated Spike Sorting. https://doi.org/10.64898/2026.06.18.733033

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Neurodegeneration-inducing macromolecules exit the brain via nanovascular conduits formed by reticular fibroblasts

Accumulation of proteins such as amyloid beta (Abeta), hyperphosphorylated tau and alpha-synuclein within the brain alters neural information processing and causes neurodegeneration(1-3), but how toxic solutes are cleared from the brain remains highly controversial(4,5). Proposed exit routes include efflux across endothelial cells into the blood(6,7), and movement to the pial surface via vasomotion-induced pumping along spaces within arteriolar smooth muscle(8) or via outflow along the perivascular space of ascending venules promoted by water flux through astrocytes (the glymphatic system(9)). From the pial surface of the brain, drainage may continue to dural lymphatics, along the outer sheaths of exiting cranial nerves and across the cribriform plate(10-14). We now report the presence, in mice and humans, of 2 micron diameter conduits that remove fluorescently labelled tau and Abeta from the brain. These conduits form a spatially-organised mesh within the walls of penetrating arterioles and pial arteries, and around the surface of ascending venules and deep cerebral and pial veins. They course through the pial and arachnoid layers to span the CSF space, wrapping the brain and cranial nerves. They are formed of reticular fibroblasts, which label for VE-cadherin(15) and PDGFRalpha(16), the lymphatic markers(17) podoplanin, VEGFR3 and Prox1, and reticular fibroblast extracellular matrix components collagen I and VI(16,18-20). Parenchymal tau drains from the brain at a similar rate via arteriolar conduits and via conduits around venules, arguing against preferential removal by a glymphatic mechanism. In Alzheimer's disease model mice, Abeta is seen traversing these lymph node-like conduits. Modulation of molecular transfer via this route may accelerate or delay cognitive decline, and slowed transfer from arteriolar to pial-arachnoid conduits may initiate cerebral amyloid angiopathy.

neuroscience↗

Analysis of the influence of gradual changes in matrix sentence similarity on neural envelope tracking

Neural tracking of speech is a well-established phenomenon in neuroscience. However, for speech signals with a fixed structure, significant correlations between speech envelopes and neurophysiological representations occur even for unheard sentences. We exploit a structured speech-in-noise matrix hearing test (Oldenburger Sentence Test, OLSA) to systematically quantify the relationship between acoustic sentence similarity and neural tracking. Simultaneous magnetoencephalography (MEG) and 76-channel electroencephalography (EEG) data, including 16 channels positioned directly around the ears (ear-EEG), were recorded from 21 young adults with normal hearing during the presentation of clean-speech audiobooks and OLSA sentences at six signal-to-noise ratios. A linear decoder trained on audiobooks reconstructed OLSA sentence envelopes. Reconstruction accuracies were compared using a linear mixed model across heard (matched) and unheard (mismatched) sentences of varying acoustic similarity. Significant reconstruction accuracies were achieved across MEG, EEG, and ear-EEG for both matched and mismatched sentences. For mismatched sentences, these accuracies gradually increased with their acoustic similarity to the heard speech data. The high similarity between sentences, which is especially prominent in matrix tests, can cause significant spurious tracking for mismatched stimuli. This effect can reach levels comparable to those of matched sentences and can be mistaken for true neural tracking. Robust neural tracking across modalities further supported the established viability of ear-EEG compared to whole-head systems.

neuroscience↗

Seizures and tauopathy following neurotrauma are mediated by prion protein and metabotropic glutamate receptor 5

Traumatic brain injury (TBI) is one of the world's leading causes of death and disability and a major risk factor for dementias. The primary dementia associated with TBI is chronic traumatic encephalopathy (CTE), a neurodegenerative disease classified as a tauopathy, in which toxic tau molecules lead to disease pathologies and degeneration. The processes that lead to tauopathy and subsequent dementia after TBI remain unclear. Here, we built upon the finding that seizures after TBI may be a mechanism leading to tauopathy, by dissecting the functions of the metabotropic glutamate receptor 5 - cellular prion protein (mGluR5-PrPC) pathway. We delivered TBI to larval in a blast paradigm, and quantified aggregation of Tau via a genetically-encoded Tau-GFP fusion reporter. Zebrafish larvae lacking prp2 (homolog of mammalian cellular Prion Protein, PrPC) displayed a 168% increase in post-traumatic seizures activity after TBI. An mGluR5 agonist (CHPG) reduced post-traumatic seizures, whereas an mGluR5 antagonist (MPEP) increased post-traumatic seizures. Moreover, agonizing mGluR5 reduced tau aggregation and antagonizing mGluR5 increased tau burden. Larvae seizing from convulsants, rather than TBI, were treated with CHPG/MPEP and provided a similar pattern of outcomes, suggesting seizures may be a factor needed for mGluR5 activity to influence tau aggregation. The PrPC-mGluR5 pathway is proposed as one candidate pathomechanism linking TBI to subsequent seizures and tauopathy, and thus it warrants investigation as a target for prophylactic interventions.

neuroscience↗