A spiking neural network simulation library.
You will need a Rust development environment, which you can install by visiting https://rustup.rs/ and following the instructions.
Once you have Rust and Cargo installed, you can run a simulation with:
make
You should see output like this:
This will produce plot images called neuron-trace.png
and spikes.png
like the ones below.
Note that you can also build the debug version by omitting the --release
flag, but it will run slowly. This is good if you want to use a debugger, but if you want to simulate any reasonably large networks in real-time you will need to use release mode.
It should create output images like this:
The spikes.png
image shows some fascinating results:
- In the cropped photo you can see vertical lines of dots. This shows that all the neurons in the network have synchronized and are pulsing together at about 12Hz. This is a similar rate to Alpha waves in mammalian brains.
- Also in the cropped photo can also see horizontal lines. This is the motor layer of each column; this layer currently is weakly connected and doesn't synchronize with the rest of the neurons.
- In the full
spikes.png
image there are three distinct phases:- 0s-4s: The network quickly settles into a 5Hz rhythm, similar to Theta waves. I believe this is when the columns are organizing themselves.
- 4s-10s: The network becomes disorganized. I believe this is when the columns are learning to wire together and are trying to sort out their connections.
- 10s+: The network becomes synchronized at a much faster 12Hz rhythm.
This library simulates networks of biologically-inspired neurons. Spiking neural models are implemented as ordinary differential equations integrated using Euler integration at 1 millisecond resolution.
The simuation is written in the Rust programming language and uses Specs, an Entity-Component-System framework with excellent parallelization and performance. This allows it to simulate simulate about 1800 neurons and 100k synapses, including an online learning algorithm, in real-time on a typical laptop.
- Izhikevich neurons
- Hindmarsh-Rose neurons
- Spike-timing dependent plasticity
- Columnar organization
- Networks are organized into 100-neuron columns composed of five layers (motor, sensory, afferent, efferent, internal)
- Code: https://github.com/michaelmelanson/spiking-neural-net/blob/master/src/simulation/mod.rs#L70-L160
- Multiple morphologies. Currently all neurons are Izhikevich 'regular spiking' neurons.
- Configuration. Currently you need to change the source code to change the network design or neural model parameters.