snntoolbox_applications icon indicating copy to clipboard operation
snntoolbox_applications copied to clipboard

Asynchronous behaviour of SNN model

Open abdul-muneeb7 opened this issue 2 years ago • 1 comments

Hi, I have a quick question regarding the Asynchronous implementation of Spiking Neural Networks in Python. As Python is a sequential language then how SNN-toolbox can deal with the asynchronous behavior of SNNs, as each layer should have to work independently from the rest of the layers, and how does SNN-toolbox incorporate that async. functionality in Python.

abdul-muneeb7 avatar Jan 19 '24 18:01 abdul-muneeb7

SNN toolbox provides an interface to multiple backends, some of which are actual neuromorphic hardware (Loihi, Spinnaker). When using these, Python is only involved in preparing / deploying the model, and the actual processing is (more or less) asynchronous, depending on the hardware. Aside from these, the toolbox also provides a GPU / CPU backend, which does not emulate or implement asynchronous spike behavior. Instead it simulates sparse spike processing by running a full forward pass at each time step. in this forward pass, the membrane potentials are updated, and where applicable, spikes are generated and passed on to the next layer, where they get added to the membrane potential and may cause a spike, and so on. Then the next time step is done with a full forward pass. Not very efficient, but one can count the number of nonzero activations (spikes) and thus estimate the computational effort (synaptic operations) that would be necessary on dedicated asynchronous hardware.

rbodo avatar Jan 20 '24 16:01 rbodo