Software:Norse (neuron simulator)

From HandWiki
Norse
Norse logo.png
Initial releaseDecember 2019
Repositoryhttps://github.com/norse/norse
Written inPython
LicenseLGPLv3
Websitehttps://norse.ai

Norse is a simulator for biological neuron models with an emphasis on gradient-based optimization and integration with neuromorphic hardware and event-based cameras. Norse is developed primarily by researchers at Heidelberg University and KTH Royal Institute of Technology and is publicly available under the LGPLv3 license.

Differences from other simulators

Norse separates itself from the more "classical" branch of simulators like Neuron, NEST, and Brian in that it models neural networks as directed graphs that purely operate on tensors, similar to deep learning libraries like PyTorch and TensorFlow [1]. Such computational graphs lend themselves well to hardware acceleration on CPUs, GPUs, and TPUs. It also enables automatic differentiation for neuron discontinuities, such as spiking neural network via gradient approximation methods like SuperSpike[2], which Norse implements to allow the training of arbitrarily deep networks using backpropagation through time.

Example

The following example demonstrates a network that combines leaky integrate-and-fire neurons with conventional convolutions to classify digits from the MNIST dataset with >99% accuracy.

import torch, torch.nn as nn
from norse.torch import LICell             # Leaky integrator
from norse.torch import LIFCell            # Leaky integrate-and-fire
from norse.torch import SequentialState    # Stateful sequential layers

model = SequentialState(
    nn.Conv2d(1, 20, 5, 1),      # Convolve from 1 -> 20 channels
    LIFCell(),                   # Spiking activation layer
    nn.MaxPool2d(2, 2),
    nn.Conv2d(20, 50, 5, 1),     # Convolve from 20 -> 50 channels
    LIFCell(),
    nn.MaxPool2d(2, 2),
    nn.Flatten(),                # Flatten to 800 units
    nn.Linear(800, 10),
    LICell(),                    # Non-spiking integrator layer
)

data = torch.randn(8, 1, 28, 28) # 8 batches, 1 channel, 28x28 pixels
output, state = model(data)      # Provides a tuple (tensor (8, 10), neuron state)

See also

External references

Category:Simulation software Category:Computational neuroscience



  1. Pehle, Christian-Gernot; Pedersen, Jens Egholm (2021-01-06), Norse - A deep learning library for spiking neural networks, Zenodo, doi:10.5281/zenodo.4422025, https://zenodo.org/record/4422025, retrieved 2022-03-06 
  2. Zenke, Friedemann; Ganguli, Surya (2018-06-01). "SuperSpike: Supervised Learning in Multilayer Spiking Neural Networks". Neural Computation 30 (6): 1514–1541. doi:10.1162/neco_a_01086. ISSN 0899-7667. https://doi.org/10.1162/neco_a_01086.