Giter VIP home page Giter VIP logo

spiking-neural-net's Introduction

spiking-neural-net Build Status

A spiking neural network simulation library.

Usage

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:

Sample output

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.

Sample output

It should create output images like this:

Filename Image
neuron-trace.png spikes.png This shows the activity of a single neuron. Each of the vertical lines is an action potential, shown as a white dot on the plots below. There's a noise floor representing random thalamic input.
spikes.png spikes.png You'll need to download this image and zoom in to see the activity.
spikes.png (cropped) spikes.png This represents about 1s of time across 1100 neurons.

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.

About the simulation

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.

Features

Neural models

Learning models

Network organization

TODO

  • 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.

spiking-neural-net's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar michaelmelanson avatar

Stargazers

 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

spiking-neural-net's Issues

Move the weights into the network rather than the neuron.

let mut weights = Vec::new();

The interconnectedness of neurons feels like a concept of the network rather than the individual neurons.

This is a bit of a grey area from a biological perspective, since the postsynaptic response of the neuron to an action potential (which is what the 'weight' represents) depends on the synapses and structure of the dendritic arbour.

Also since the 'network' doesn't really have a biological analogue at all -- it's just a bunch of neurons -- it makes sense to put most stuff in the neuron and just use the network to connect them.

Maybe I just talked myself out of this change... Going to leave this open and think about it some more.

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.