Skip to content

ricardodeazambuja/Bee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bee - The Spiking Reservoir (LSM) Simulator

The Bee simulator is an open source Spiking Neural Network (SNN) simulator, freely available, specialised in Liquid State Machine (LSM) systems with its core functions fully implemented in C.

Block diagram of an LSM

It was developed together with my PhD thesis (you can see where it was used in my publications) exclusively to solve the specific problems presented by neurorobotics experiments.

Bee uses the C library pthreads (POSIX threads) in order to speed up the simulation of LSMs by processing input and output spikes in a parallel way. A Python wrapper is supplied to simplify the user interaction with the software.
The neuron model, a special type of (Leaky_integrate-and-fire) with extra exponential synapses - see [1] for details, is hardcoded (fixed), following what is presented bellow, and the solution for the differential equations is calculated by the Euler's method according to the simulation's time step specified by the user.

Leaky Integrate and Fire with Exponential Synapses

The simulator has the ability to automatically generate the reservoir (liquid) in a probabilistic way (see [1] for details) according to the equation:

Probability of connections

An example of generated connections (red dots/lines are excitatory and blue ones inhibitory) is presented below: liquid example
Note (24/04/2023): I just realised, by looking at the image above, that it could be a better idea to enforce neurons to have connections to two other neurons or input/output, input/neuron or output/neuron connections, otherwise that neuron won't contribute to the internal dynamics and may even waste an input or output that falls on it. In addition to this minimum amount of "neighbour" connections, it should have a guarantee that every neuron has at least a path to one of the liquid's input and a path to one output. Finally, the liquid internal connections should be shaped in a different way to avoid the different connection densities as the neurons approach the edges of the liquid because those neurons will naturally have less neighbours nearby. One possible solution would be to consider all the external walls to have a unitary distance between them making the cube above sort of wrap around itself.

All the parameters for the neuron model or the internal connections can be defined by the user. Also, motivated by the results presented in Short-term plasticity in a liquid state machine biomimetic robot arm controller, Short Term Plasticity (STP) and time delays were not implemented in order to simplify and optimise the simulator. In its current version, it supports, at least, Linux and OS X (it was never tested by the author on any version of Windows).

If you want to find out more details about the main simulator I'd recommend to have a look here:

https://github.com/ricardodeazambuja/BEE/blob/master/BEE/BEE_Simulator_DEVELOPMENT.ipynb

All the necessary files can be found here:

https://github.com/ricardodeazambuja/BEE/tree/master/BEE

Here is a list of published papers that use Bee (they have plenty of code examples to follow):

If you are using Bee in your work, please, send me the link and I will add it here :)

Ideas for new projects derived from my work

Videos

References

  1. Maass, Wolfgang, Thomas Natschläger, and Henry Markram. “Real-Time Computing without Stable States: A New Framework for Neural Computation Based on Perturbations.” Neural Computation 14, no. 11 (November 2002): 2531–60.

Other projects you may like to check:

  • colab_utils: Some useful (or not so much) Python stuff for Google Colab notebooks
  • ExecThatCell: (Re)Execute a Jupyter (colab) notebook cell programmatically by searching for its label.
  • Maple-Syrup-Pi-Camera: Low power('ish) AIoT smart camera (3D printed) based on the Raspberry Pi Zero W and Google Coral EdgeTPU
  • The CogniFly Project: Open-source autonomous flying robots robust to collisions and smart enough to do something interesting!

http://ricardodeazambuja.com/