- 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.
- 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
- 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.)
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
cd data/normalization
run generate_normalized_mnist.m
Remember to download the dataset and put them in the folder ./
Comment '#define TEST_MODE' in the global.h.
./run.sh
Uncomment '#define TEST_MODE' in the global.h.
./run.sh
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}
}