Coder Social home page Coder Social logo

hiresnn2021's Introduction


License: MIT

Welcome to the official repo of the ICCV 2021 paper HIRE-SNN: Harnessing the Inherent Robustness of Energy-Efficient Deep Spiking Neural Networks by Training with Crafted Input Noise.

This repo currently contains the test codes. Training code will be updated soon!

Authors:

  1. Souvik Kundu ([email protected])
  2. Massoud Pedram ([email protected])
  3. Peter A. Beerel ([email protected])

Abstract:

Low-latency deep spiking neural networks (SNNs) havebecome a promising alternative to conventional artificial neural networks (ANNs) because of their potential for increased energy efficiency on event-driven neuromorphic hardware.Neural networks, including SNNs, however, are subject to various adversarial attacks and must be trained to remain resilient against such attacks for many applications. Nevertheless, due to prohibitively high training costs associated with SNNs, an analysis and optimization of deep SNNs under various adversarial attacks have beenlargely overlooked. In this paper, we first present a detailed analysis of the inherent robustness of low-latency SNNs against popular gradient-based attacks, namely fast gradient sign method (FGSM) and projected gradient descent (PGD). Motivated by this analysis, to harness themodel’s robustness against these attacks we present an SNN training algorithm that uses crafted input noise and incurs no additional training time. To evaluate the merits of our algorithm, we conducted extensive experiments with variants of VGG and ResNet on both CIFAR-10 and CIFAR-100 dataset. Compared to standard trained direct-input SNNs, our trained models yield improved classification accuracy of up to 13.7% and 10.1% on FGSM and PGD attack generated images, respectively, with negligible loss in clean image accuracy. Our models also outperform inherently-robust SNNs trained on rate-coded in-puts with improved or similar classification performanceon attack-generated images while having up to 25x and ∼4.6x lower latency and computation energy, respectively.


Version on which the models were tested:

  • PyTorch version: 1.5.1.
  • Python version: 3.8.3.

Model download:

A. HIRE-SNN models:

  1. vgg11_cifar100_hiresnn_tstep8_bb_test_model
  2. vgg11_cifar100_hiresnn_tstep8_model

B. Traditional SNN models:

  1. vgg11_cifar100_tradit_bb_test_model
  2. vgg11_cifar100_tradit_model

To test adversarial accuracy of a saved model, please follow these steps:

Create two folders named HIRE_SNN_models and traditional_models. Download the models to their respective folder locations.

1. HIRE SNN testing:

a) To test HIRE SNN: select folder/file location: HIRE_SNN_models/vgg11_cifar100_hiresnn_tstep8_model.pt (as pretrained_snn) and HIRE_SNN_models/vgg11_cifar100_hiresnn_tstep8_bb_test_model.pt as pretrained_snn_bb(this is for black box testing only) and edit in the run_snn_hire_test.py file. 1. b) run command: python run_snn_hire_test.py

2. Traditional SNN testing:

a) To test traditional SNN: select folder/file location: traditional_models/vgg11_cifar100_tradit_model.pt as pretrained_snn and traditional_models/vgg11_cifar100_tradit_bb_test_model.pt as pretrained_snn_bb (this is for black box testing only) 2. b) run command: python run_snn_tradit_test.py

Cite this work

If you find this project useful to you, please cite our work:

@InProceedings{Kundu_2021_ICCV,
author    = {Kundu, Souvik and Pedram, Massoud and Beerel, Peter A.},
title     = {HIRE-SNN: Harnessing the Inherent Robustness of Energy-Efficient Deep Spiking Neural Networks by Training With Crafted Input Noise},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month     = {October},
year      = {2021},
pages     = {5209-5218}}

Acknowledgment

Hybrid SNN repo

hiresnn2021's People

Contributors

ksouvik52 avatar

Stargazers

 avatar  avatar Snow-Crash  avatar Abhishek S K avatar  avatar  avatar  avatar Mengting Xu avatar  avatar Li Zhaoxu avatar Bill avatar

Watchers

 avatar

hiresnn2021's Issues

pretrained_snn

If I do not set the pre -training weight model, the test accuracy will be errors. What is the reason for this?
1
2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.