Skip to content

UnitRefine is a machine-learning toolbox that simplifies spike sorting curation by reducing manual curation.

License

Notifications You must be signed in to change notification settings

anoushkajain/UnitRefine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnitRefine: A Community Toolbox for Automated Spike Sorting Curation

UnitRefine is a machine-learning toolbox designed to streamline spike sorting curation by reducing the need for manual intervention. It integrates seamlessly with SpikeInterface and supports both pre-trained models and custom model training. UnitRefine is agnostic to probe type, species, brain region, and spike sorter, and includes a user-friendly GUI (using SpikeInterface-GUI as a backend) for curation, training, validation, and retraining. The GUI also supports active learning, allowing users to iteratively improve model performance through targeted relabeling.

Available Pre-trained Models

UnitRefine provides pre-trained models. Each model folder includes the curated feature matrix it was trained on, where rows correspond to clusters and columns to unit features. We show that UnitRefine can be used to identify Single-Unit Activity (SUA) across multiple datasets, probe types, and species.

Dataset Probe type n recordings Spike sorter Species
Base dataset Neuropixels 1.0 11 Kilosort 2.5 Mouse
rat recordings Neuropixels 2.0 4 Kilosort 4 (Pachitariu et al. 2024) rat
Mole rat recordings Neuropixels 2.0 4 Kilosort 4 Mole rat (Shirdhankar et al. 2025)
Nonhuman primate recordings Utah array 11 Kilosort 4 Macaque (Xing Chen et al. 2022)
Human intracranial recordings Behnke–Fried electrodes 12 Combinato (Niediek et al., 2016) Human

Installation

To use UnitRefine, install SpikeInterface (≥ 0.102).

pip install spikeinterface

We provide a UnitRefine GUI that simplifies unit curation, model training, loading, and relabeling.

For detailed instructions and usage examples, please refer to the documentation here.


Tutorials

Also refer to the automated curation tutorials available in the SpikeInterface documentation:
Automated Curation Tutorials

Additionally, this repository includes Jupyter Notebooks in section with detailed step-by-step tutorials on how to:

  1. Apply pre-trained models.
  2. Train your own classifiers.

Citation

If you find UnitRefine useful in your research, please cite our preprint: https://www.biorxiv.org/content/10.1101/2025.03.30.645770v2

Acknowledgements

We would like to express my sincere gratitude to the following individuals for their invaluable contributions to this project: UnitRefine is highly dependent on the flexible and powerful SpikeInterface and Spikeinterface-GUI packages. Many thanks to Alessio, Sam, Zack, Joe who gave help and feedback to this project, and to the entire SpikeInterface team.

  • Code Refactoring and Integration in SpikeInterface:
    Chris Halcrow, Jake Swann, Robyn Greene, Sangeetha Nandakumar (IBOTS)

  • Model Curators:
    Nilufar Lahiji, Sacha Abou Rachid, Severin Graff, Luca Koenig, Natalia Babushkina, Simon Musall

  • Advisors and collaborators:
    Alessio Buccino, Olivier Winter, Sonja Grün, Matthias Hennig, Simon Musall

Feedback and Contributions

We encourage feedback, contributions, and collaboration from the community to improve UnitRefine. Feel free to open issues or submit pull requests to enhance the toolbox further.

About

UnitRefine is a machine-learning toolbox that simplifies spike sorting curation by reducing manual curation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •