Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ PDSG-SDA Public

[CVPR 2025] Official implementation of "Towards Effective and Sparse Adversarial Attack on Spiking Neural Networks via Breaking Invisible Surrogate Gradients"

Notifications You must be signed in to change notification settings

ryime/PDSG-SDA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Towards Effective and Sparse Adversarial Attack on Spiking Neural Networks via Breaking Invisible Surrogate Gradients (CVPR 2025)

This repo is the official implementation of "Towards Effective and Sparse Adversarial Attack on Spiking Neural Networks via Breaking Invisible Surrogate Gradients" (CVPR 2025)

Requirements

python version: 3.11.9
CUDA version: 12.4
numpy==2.1.3
PyYAML==6.0.1
spikingjelly==0.0.0.0.14
timm==1.0.11
torch==2.3.0
torchattacks==3.5.1
torchvision==0.18.0

Prepare

conda create --name snn_attack python=3.11.9
conda activate snn_attack
pip install -r requirements.txt

Download checkpoints

Google Drive: Download model checkpoints

Hugging Face: Download model checkpoints

Run

CIFAR10-ResNet18:

python test.py -c ./configs/resnet18_cifar10.yaml --data-path your_dataset_path

CIFAR10-ResNet18(Adversarially trained):

python test.py -c ./configs/resnet18_advtrained_cifar10.yaml --data-path your_dataset_path

CIFAR100-ResNet18:

python test.py -c ./configs/resnet18_cifar100.yaml --data-path your_dataset_path

DVSGesture-VGGSNN:

python test.py -c ./configs/vggsnn_dvsgesture_binary.yaml --data-path your_dataset_path

CIFAR10DVS-ResNet18:

python test.py -c ./configs/resnet18_cifar10dvs_binary.yaml --data-path your_dataset_path

Acknowledgments

The frame of this code is altered from SpikingResformer. We thank the authors for their contribution.

Citation

If you find this paper useful, please consider staring this repository and citing our paper:

@InProceedings{Lun_2025_CVPR,
    author    = {Lun, Li and Feng, Kunyu and Ni, Qinglong and Liang, Ling and Wang, Yuan and Li, Ying and Yu, Dunshan and Cui, Xiaoxin},
    title     = {Towards Effective and Sparse Adversarial Attack on Spiking Neural Networks via Breaking Invisible Surrogate Gradients},
    booktitle = {Proceedings of the Computer Vision and Pattern Recognition Conference (CVPR)},
    month     = {June},
    year      = {2025},
    pages     = {3540-3551}
}

About

[CVPR 2025] Official implementation of "Towards Effective and Sparse Adversarial Attack on Spiking Neural Networks via Breaking Invisible Surrogate Gradients"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages