Skip to content

Code for the model presented in the paper "A Biologically Plausible Supervised Learning Method for Spiking Neural Networks Using the Symmetric STDP Rule"

License

Notifications You must be signed in to change notification settings

haoyz/sym-STDP-SNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sym-STDP-SNN

  • This is the code for our paper A Biologically Plausible Supervised Learning Method for Spiking Neural Networks Using the Symmetric STDP Rule [pdf]
  • Be careful: the provided code is based on the MNIST dataset and 400 hidden excitatory neurons. If you need to run the code on other datasets, or change the model size, please correspondly modify all program statements that relate to the specific name of the dataset and model size.

Datasets and Checkpoints

  • MNIST
  • Fashion-MNIST

Two datasets are available at https://drive.google.com/drive/folders/1ezOHxcc2hyjiVgwlgMJJxIgFO4ch8WQN?usp=sharing

Corresponding checkpoints of different size models are available at https://drive.google.com/drive/folders/1I36wo_fSmPLFDaj-OHZIhbI8uETYyml-?usp=sharing


Requirements

  • Ubuntu 16.0.4
  • genn 2.2.2 (https://github.com/genn-team/genn/tree/2.2.2)
  • gnuplot (Optional. You can comment '#define PLOT_ON' in the global.h if without gnuplot.)
  • matlab (Optional. You only need it when you need different normalization parameter to preprocess Fashion-MNIST. Although we put processed Fashion-MNIST in the datasets above.)

Reproducibility

We provide the pretrained checkpoints of the sym-stdp model on the MNIST and Fashion-MNIST dataset to help you to reproduce our reported experimental results. The detailed reproduction steps are as follows:

  • mkdir output
  • Please download the dataset and checkpoints first by clicking on the link provided above, then put them in the folder ./.
  • Predict: ./run.sh

Preprocessing Fashion-MNIST

cd data/normalization
run generate_normalized_mnist.m

Remember to download the dataset and put them in the folder ./


Training

Comment '#define TEST_MODE' in the global.h.
./run.sh

Evaluation

Uncomment '#define TEST_MODE' in the global.h.
./run.sh

Weight Evolution

gif


Citation

If you use the above code for your research, please cite the paper:

@article{hao2019biologically,
  title={A biologically plausible supervised learning method for spiking neural networks using the symmetric STDP rule},
  author={Hao, Yunzhe and Huang, Xuhui and Dong, Meng and Xu, Bo},
  journal={Neural Networks},
  year={2019},
  publisher={Elsevier}
}

About

Code for the model presented in the paper "A Biologically Plausible Supervised Learning Method for Spiking Neural Networks Using the Symmetric STDP Rule"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published