Sovereign 8s.is mirror of standardgalactic/PS-SNN
  • Python 99.4%
  • Shell 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-02-13 16:20:41 +08:00
data_utils Add files via upload 2026-02-11 20:30:21 +08:00
exper Add files via upload 2026-02-11 20:30:21 +08:00
extractor Add files via upload 2026-02-11 20:30:21 +08:00
images Add files via upload 2026-02-12 15:18:58 +08:00
models Add files via upload 2026-02-12 14:57:15 +08:00
options Add files via upload 2026-02-11 20:30:21 +08:00
plotting Add files via upload 2026-02-11 20:30:21 +08:00
utils Add files via upload 2026-02-11 20:30:21 +08:00
main_exp.py Add files via upload 2026-02-11 20:30:21 +08:00
README.md Update README.md 2026-02-13 16:20:41 +08:00
requirements.txt Add files via upload 2026-02-11 20:30:21 +08:00
run.sh Add files via upload 2026-02-11 20:30:21 +08:00
test_logging.py Add files via upload 2026-02-11 20:30:21 +08:00
test_seed_range.py Add files via upload 2026-02-11 20:30:21 +08:00

PS-SNN

Introduction

This repository contains code supporting the manuscript “PS-SNN: Pattern Separation Learning for Expandable Spiking Neural Networks in Class-Incremental Learning.”

image

Data

The CIFAR-100 dataset analyzed during this study is publicly available at https://www.cs.toronto.edu/~kriz/cifar.html. The ImageNet-100 dataset used in our experiments can be obtained from https://image-net.org/.

Running experiments

First, You can install the dependencies using the provided requirements.txt file.:

pip install -r requirements.txt

To verify the effectiveness of our method, we conduct experiments on the natural image dataset CIFAR100 under several benchmark protocols. The first protocol, CIFAR100-B0, trains all 100 classes in specific splits over 5 steps (20 classes per step), 10 steps (10 classes per step) and 20 steps (5 classes per step) with a fixed memory size of 2000. The second protocol, CIFAR100-B50, begins with training on 50 classes, after which the remaining 50 classes are introduced incrementally in 5 step (10 classes per step) and 10 step (5 classes per step), with a fixed memory of 20 exemplars per class.

You can see the model code at ./models/spiking_mutable_eb.py

# CIFAR100-B0-5steps
python main_exp.py --options options/data/cifar100_3orders.yaml options/spiking_eb/spikng_allcomponents_cifar100_B0.yaml \
                --initial-increment 0 --increment 20
                --device <GPU_IDS> --label ps_snn_cifar100_b0_5steps

# CIFAR100-B0-10steps
python main_exp.py --options options/data/cifar100_3orders.yaml options/spiking_eb/spikng_allcomponents_cifar100_B0.yaml \
                --initial-increment 0 --increment 10
                --device <GPU_IDS> --label ps_snn_cifar100_b0_10steps

# CIFAR100-B0-20steps
python main_exp.py --options options/data/cifar100_3orders.yaml options/spiking_eb/spikng_allcomponents_cifar100_B0.yaml \
                --initial-increment 0 --increment 5
                --device <GPU_IDS> --label ps_snn_cifar100_b0_20steps

# CIFAR100-B50-5steps
python main_exp.py --options options/data/cifar100_3orders.yaml options/spiking_eb/spikng_allcomponents_cifar100_B50.yaml \
                --initial-increment 50 --increment 10
                --device <GPU_IDS> --label ps_snn_cifar100_b50_5steps

# CIFAR100-B50-10steps
python main_exp.py --options options/data/cifar100_3orders.yaml options/spiking_eb/spikng_allcomponents_cifar100_B50.yaml \
                --initial-increment 50 --increment 5
                --device <GPU_IDS> --label ps_snn_cifar100_b50_5steps
# or you can also aggregate all the options into one yaml file as options/spiking_eb/spiking_allcomponents_cifar100_inc20b0.yaml


Acknowledgement

Thanks for the fine coding base from https://github.com/arthurdouillard/incremental_learning.pytorch.