Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAFA-SNN

This is the official code repository for the project: SAFA-SNN: Sparsity-Aware On-Device Few-Shot Class-Incremental Learning with Fast-Adaptive Structure of Spiking Neural Network (ICLR 2026) [paper]

Overview

The overall framework of our proposed method SAFA-SNN.

SAFA-SNN framework includes three main components: (a) Training abundant data in the base session and selecting active and stable neurons by masks. In incremental learning sessions, activate neurons will substantially adjust their firing thresholds based on sparsity to incorporate new classes, while stable neurons maintain their prior firing behavior through only slight threshold variations. (b) Top: forward propagation through FSCIL process; Bottom: backpropagation using zeroth-order optimization only in the base class training. (c) Freezing backbones and updating the prototypes by orthogonal subspace projection in the incremental learning.

Environment Required

python==3.10.9    
torch==2.5.1    
tqdm==4.64.1  
numpy==1.23.5  
cuda==12.2  
torchvision==0.20.1  
spikingjelly==0.0.0.0.14

Getting Started

Datasets

You can download the datasets used in this project from the following links:

Static Datasets

Neuromorphic Datasets

Run

python main.py --config jsons/safa.json

Results

  • The results on static datasets:

cifar100_mini_svgg9

  • The results on neuromorphic datasets:

neuromorphic_datasets

Contact

If you have any questions about our work or this repository, please submit a GitHub issue. For further discussions, feel free to contact us by email huijingzhang@zju.edu.cn.

Acknowledge

We would like to thank the developers of the following open-source projects for their invaluable contributions:

CEC

SpikingJelly

Citation

If you find this repository useful in your research, please cite our paper:

@inproceedings{
  zhang2026safa,
  title={SAFA-SNN: Sparsity-Aware On-Device Few-Shot Class-Incremental Learning with Fast-Adaptive Structure of Spiking Neural Network},
  author={Zhang, Huijing and Cao, Muyang and Jiang, Linshan and Du, Xin and Yu, Di and Lv, Changze and Deng, Shuiguang},
  booktitle={The Fourteenth International Conference on Learning Representations},
  year={2026},
  url={https://openreview.net/pdf?id=9jcB40wjk3}
}

About

[ICLR 2026] Official implementation of "SAFA-SNN: Sparsity-Aware On-Device Few-Shot Class-Incremental Learning with Fast-Adaptive Structure of Spiking Neural Network".

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages