This is an implementation of a recurrent binary spiking neural network written in C++ easily configurable through a Python API.
- Clone this repo.
git clone https://github.com/RomanKoshkin/SoNNet.git
cd SoNNet
-
Install the
requirements.txt
. -
Build the C++ core by running the build script:
sh scripts/build_pybind.sh openmp
- Run the demo script.
python selforg_demo.py
The network will self-organize to about 8 cell assemblies (it will save some pictures in assets
).
You can play around with different parameters and observe the network's emergent properties (e.g. the number of stable cell assemblies, time to self-organize, robustness to perturbations etc.). Feel free to explore and modify parameters in the YAML file in configs
.
- change the network size
- number of excitatroy and inhibitory neurons
- connection probabilities
- connection weight initializations
- network update frequency
- STDP window shape
- time constants
- degree of LTP and LTD
- STP parameters
- facilitation and depression time constants
and more!
Use the train
method of the Stimulator
class. You can also use the ping
method of the same class to simulate small perturbations of a subset of neurons to test the robustness of the model's weight structure to perturbations.
- LIF neurons are already supported but LIF mode is not recommended yet.