Neuromorphic Computing Journey (Part 5)
Welcome to the 5th part of this series.
In this blog we will talk about PyNN. The reason for discussing PyNN here is because we can so near to start our example exercises. In previous blogs we talked about brief history of Neuromorphic Computing, Spiking Neural Networks and some of it’s advantages.
So, What is PyNN? PyNN is a simulator-independent language for building spiking neural network models. For example, you write the code in one of the SNN simulator and now want to test it on another simulator to find out which simulator is giving better results. If you wrote your code in PyNN then you have nothing to worry about because by using PyNN API and Python programming language, you can run it on all the simulators supported by PyNN without modification. Isn’t this amazing? For now, PyNN supports NEURON, Nest and Brain simulators. Besides this, it also supports SpiNNaker and BrainScale neuromorphic chips/boards.

There are many built-in neuron models, synapse and synaptic plasticity models. The list of neuron models is as follows:
- Plain integrate-and-fire models:
- Integrate-and-fire with adaptation:
- Hodgkin-Huxley model
HH_cond_exp
- Spike sources (input neurons)
The list of Synapse models are as follows:
- Static/fixed synapses
- Short-term plasticity mechanisms
- Long-term plasticity mechanisms
- Native plasticity models
The other thing that is required to write a model once and run it on multiple simulators is standard cell models. PyNN translates standard cell-model names and parameter names into simulator-specific names, e.g. standard model IF_curr_alpha is iaf_neuron in NEST and StandardIF in NEURON, while SpikeSourcePoisson is a poisson_generator in NEST and a NetStim in NEURON.
With an active PyNN community, you can get help whenever you feel stuck. PyNN is still a work in progress. The current version is v0.10.0. It has detailed documentation where you can find all the source code and most importantly big list of examples to get your journey started with PyNN.
Overall in my personal experience, PyNN provides you with a strong baseline for constructing SNN models. I am working with the SpiNNaker board and PyNN is working fine with it. But there are some drawbacks to using PyNN. As I said earlier, it is a work in progress, so it does not work properly for some simulators or gives weird errors. In my case, it is a Nest simulator. I am trying to convert ANN models to SNN models and for SNN models I am using PyNN. PyNN worked fine for NEURON and SpiNNaker (though my results are not so good for now, I think it’s mainly due to untuned parameters) but for the NEST simulator, it is giving a value error (ValueError: off_grid_spiking is a readonly kernel parameter). I am still trying to solve this issue.
Resources to learn PyNN:
- http://neuralensemble.org/PyNN/
- What’s new with PyNN (neuralensemble.org)
- PyNN/examples at master · NeuralEnsemble/PyNN (github.com)
- (45) Christian Brenninkmeijer — Running PyNN Simulations on SpiNNaker — YouTube
That’s a brief introduction to the PyNN world. I hope you get a basic idea about what PyNN is and how it can make things easy for us. In the next blog, I will talk about learning in Spiking Neural Network. So, things will get more exciting now.
See you in next blog. take care.