Skip to main content

Tool to simulate Spiking Neural Networks

Project description

Nervos

A Spiking Neural Network Simulation Framework

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nervos-0.0.6.tar.gz (34.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nervos-0.0.6-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file nervos-0.0.6.tar.gz.

File metadata

  • Download URL: nervos-0.0.6.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for nervos-0.0.6.tar.gz
Algorithm Hash digest
SHA256 869320ab87ed5d1753b6ece277ebb780fcdd487b85455ec638fd10104f393933
MD5 e1e6dbb8f565ef283d4e95a3c804a29d
BLAKE2b-256 804eded837c8909d4990bf4e6974b6f2b50e57878f22831c04c93b61407bcb3d

See more details on using hashes here.

File details

Details for the file nervos-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: nervos-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for nervos-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 af0c1978ef108287ebeb7d455014be05ed4b50fcadec57a3944e3f87a76ee3da
MD5 fc72a8a2921cd49bafa774268c594c0c
BLAKE2b-256 25f6e9158b73f46772eef944b724062cf4870e3f55688b55c4fbe8ea34a45717

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page