Git Product home page Git Product logo

bee's Introduction

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/

bee's People

Contributors

ricardodeazambuja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bee's Issues

Learning rule, and getting started with BEE

Hi @ricardodeazambuja ,

I am quite interested in using LSM. However, I have some questions regarding it and the BEE simulator.

  • We are not training the weights of the neurons inside the "Liquid" part of the LSM, and we are supposed to be only training the weights of the final hidden layer. However, how these weights are being trained, do we use STDP or another learning algorithm?
  • Is the "Liquid" part of the LSM where the weights are not updated, is only one layer, or it could be several layers stacked together?
  • What is the loss function we use in BEE, and what is the input to the loss function, is it the membrane potentials of the last hidden layer?
  • Are you following the LSM with any classification model ( for example SVM)? In such a case would you train first the LSM then apply the SVM or you gonna apply both and train both at the same time?
  • If I am the whole idea of training, please then provide a little illustration about the training of LSM.
  • The Jupyter-notebook provided as an example is not very clear for me, can you provide us a Colab version of it which may be more of getting started with BEE simulator?
  • Is it possible to pip install BEE simulator directly in an existing virtual environment?

Thanks a lot and looking forward to your response.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.