bioRxivNeurosciencePreprint
NeuroTorch: A Python library for neuroscience-oriented machine learning
Jérémie GinceiD, Anthony Drouin, Patrick DesrosiersiD, Simon V. HardyiD
Abstract
Machine learning (ML) has become a powerful tool for data analysis, leading to significant advances in neuroscience research. While ML algorithms are proficient in general-purpose tasks, their highly technical nature often hinders their compatibility with the observed biological principles and constraints in the brain, thereby limiting their suitability for neuroscience applications. In this work, we introduce NeuroTorch, a comprehensive ML pipeline specifically designed to assist neuroscientists in leveraging ML techniques using biologically inspired neural network models. NeuroTorch enables the training of recurrent neural networks equipped with either spiking or firing-rate dynamics, incorporating additional biological constraints such as Dales law and synaptic excitatory-inhibitory balance. The pipeline offers various learning methods, including backpropagation through time and eligibility trace forward propagation, aiming to allow neuroscientists to effectively employ ML approaches. To evaluate the performance of NeuroTorch, we conducted experiments on well-established public datasets for classification tasks, namely MNIST, Fashion-MNIST, and Heidelberg. Notably, NeuroTorch achieved accuracies that replicated the results obtained using the Norse and SpyTorch packages. Additionally, we tested NeuroTorch on real neuronal activity data obtained through volumetric calcium imaging in larval zebrafish. On training sets representing 9.3 minutes of activity under darkflash stimuli from 522 neurons, the mean proportion of variance explained for the spiking and firing-rate neural network models, subject to Dales law, exceeded 0.97 and 0.96, respectively. Our analysis of networks trained on these datasets indicates that both Dales law and spiking dynamics have a beneficial impact on the resilience of network models when subjected to connection ablations. NeuroTorch provides an accessible and well-performing tool for neuroscientists, granting them access to state-of-the-art ML models used in the field without requiring in-depth expertise in computer science.
- Citations
- 1
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- NEuRT: A Transformer-Based Model for Explainable Neuronal Activity Analysis
Georgii Raev, Daniil Baev, … Ekaterina I. Pchitskaya·IEEE Transactions on Neural Systems and Rehabilitation EngineeringPeer-reviewed·Jan 1, 2026
- Direct Training of Networks of Morris-Lecar Neurons withBackprop
Navid Akbari, Kai Mason, … Wilten Nicola·bioRxiv·Nov 23, 2025
- Toward One-Shot Learning in Neuroscience-Inspired Deep Spiking Neural Networks
Faramarz Faghihi, Hossein Molhem, Ahmed A. Moustafa·bioRxiv·Nov 4, 2019
- Learning to learn online with neuromodulated synaptic plasticity in spiking neural networks
Samuel Schmidgall, Joe Hays·bioRxiv·Jun 24, 2022
- Spike Neural Network of Motor Cortex Model for Arm Reaching Control
Hongru Jiang, Xiangdong Bu, … Yao Chen·Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC)Peer-reviewed·Jul 15, 2024
- BrainScale: Enabling Scalable Online Learning in Spiking Neural Networks
Chaoming Wang, Xingsi Dong, … Si Wu·Nature CommunicationsPeer-reviewed·Jan 19, 2026