Skip to main content

Nervos

A Spiking Neural Network Simulation Framework

PyPI Downloads

Nervos is a flexible and customizable tool designed to simulate simple Spiking Neural Networks (SNNs). Developed under the supervision of Prof. Sandip Lashkare at IIT Gandhinagar, it provides a platform for experimenting with biological neuron models, learning rules, and hardware constraints.

Documentation: https://nervos.readthedocs.io/


Installation

The simplest way to install nervos is using pip:

pip install nervos

Features

  • Biologically-Inspired Models: Implements the Leaky Integrate-and-Fire (LIF) neuron model.
  • STDP Learning: Built-in support for Spike-Timing-Dependent Plasticity (STDP) for unsupervised learning.
  • Hardware Simulation:
    • Synaptic Variability: Simulate read noise in synaptic weights (enable_synaptic_noise).
    • Endurance Modeling: Model cycle-dependent weight updates to simulate device aging or non-idealities (enable_cycle_dependent_weights).
  • Customizable: Fully configurable parameters for neurons, synapses, and training loops.
  • Model Persistence: Save and load trained models and training states.
  • Data Loaders: Built-in loaders for MNIST, Iris, and Circles datasets with SNN preprocessing.

Examples

Check out the lib_examples directory for usage scripts and notebooks:

  1. MNIST Classification: Standard SNN training on MNIST.
  2. Hardware Variability: Simulating synaptic noise during inference/training.
  3. Device Endurance: Simulating weight update degradation over time.
  4. Simple Datasets: Examples for Iris and Circles datasets.
  5. Single Neuron: Demonstrations of current injection and spiking behavior.

Poster & Paper

Citation

If you use this library or adapt code from it, please cite the following paper:

@InProceedings{maskeen_unified_2026,
author="Maskeen, Jaskirat Singh
and Lashkare, Sandip",
title="A Unified Platform to Evaluate STDP Learning Rule and Synapse Model Using Pattern Recognition in a Spiking Neural Network",
booktitle="Artificial Neural Networks and Machine Learning -- ICANN 2025",
year="2026",
publisher="Springer Nature Switzerland",
doi={10.1007/978-3-032-04558-4_41},
address="Cham",
pages="509--520",
isbn="978-3-032-04558-4"
}

Feel free to fork and contribute!

Metadata

Release files for nervos 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nervos 0.0.7
File Size Uploaded
nervos-0.0.7.tar.gz 35.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nervos 0.0.7
File Interpreter ABI Platform
nervos-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 73.9 kB

Release files / nervos-0.0.7.tar.gz

Download URL nervos-0.0.7.tar.gz
Size 35.2 kB
Tags Source
SHA-256 checksum
How to use checksums
43e12f3aaac60271dc33780e86aa1b1255b7acac30dd07e54dc3544185579fba
BLAKE2b-256 checksum
How to use checksums
aba5f6e05f054955cee503ab2002b763dc9378017a5e7f1a6f8f6e8e2d3b1038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release files / nervos-0.0.7-py3-none-any.whl

Download URL nervos-0.0.7-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
872180b091fcba97a8e40d4577dba20a1be6a1d7ba64dc57d2679d62c4907332
BLAKE2b-256 checksum
How to use checksums
a7b82bf38836102fa54ca620cbe4cb60d2c70819189405661ab16b2680f37c2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page