HIRE-SNN: Harnessing the Inherent Robustness of Energy-Efficient Deep Spiking Neural Networks by Training with Crafted Input Noise

Souvik Kundu, Massoud Pedram, Peter A. Beerel

Introduction

Spiking Neural Networks (SNNs) are brain-inspired models that offer exceptional energy efficiency by processing information through discrete binary spikes. As these networks are increasingly considered for safety-critical applications like autonomous driving and medical devices, ensuring their robustness against adversarial attacks is paramount. While SNNs were once thought to be inherently robust, recent research into low-latency, high-performance SNNs has revealed significant vulnerabilities.

Background: Spiking Neural Networks

SNNs differ from traditional Artificial Neural Networks (ANNs) by using temporal dynamics. The fundamental unit is often the Leaky Integrate-and-Fire (LIF) neuron, which accumulates input spikes into a membrane potential. When this potential exceeds a threshold, the neuron emits a spike and resets.

The Leaky Integrate-and-Fire (LIF) neuron model and spike processing mechanism.

The Robustness Paradox

The perceived "inherent robustness" of SNNs was largely an artifact of high-latency "rate-coding," where pixel intensities are represented by spike frequencies over many time steps. However, to achieve competitive speed, modern SNNs utilize "direct-coding." As illustrated in Figure 1, while direct-coding is efficient, it leaves the network highly susceptible to adversarial perturbations—often more so than equivalent ANNs.

Comparison of coding schemes (a), average spike activity (b), and accuracy under adversarial attacks (c).

The researchers identified Time Averaged Spiking Activity (TASA) as a critical factor. Low-latency SNNs exhibit higher TASA in early layers, increasing their sensitivity to input noise.

HIRE-SNN: Training with Crafted Input Noise

To bolster robustness without the high computational cost of traditional adversarial training, the authors introduced HIRE-SNN (Harnessing the Inherent Robustness of Energy-efficient SNNs). The method utilizes Crafted Input Noise during the training phase.

Instead of feeding a static image across all time steps, HIRE-SNN partitions the temporal dimension. It calculates the gradient of the loss with respect to the input and injects a "crafted" noise pattern ($\kappa$) into the subsequent time steps. This approach effectively performs adversarial training "on-the-fly" within a single training pass, requiring no extra epochs. To handle the non-differentiable nature of spikes, the method employs surrogate gradients and jointly optimizes weights, thresholds, and leak factors.

Key Results and Efficiency

Evaluated on CIFAR-10 and CIFAR-100 across VGG and ResNet architectures, HIRE-SNN achieved:

  • Robustness Gains: Accuracy improved by up to 13.7% against FGSM attacks and 10.1% against PGD attacks compared to standard SNN training.
  • Operational Efficiency: The resulting models were 25x faster and 4.6x more energy-efficient than previous robust SNNs that relied on rate-coding.
  • Training Efficiency: By updating weights in smaller temporal chunks, HIRE-SNN reduced GPU memory usage by approximately 25% compared to traditional SNN training.

Conclusion

HIRE-SNN demonstrates that the temporal redundancy of SNNs can be transformed from a computational burden into a security asset. By training with crafted input noise, SNNs can achieve high adversarial robustness while maintaining the energy efficiency and low latency required for real-world edge deployment.

Summary updated

BibTeX
@inproceedings{kundu2021hire,
  author = {Souvik Kundu and Massoud Pedram and Peter A. Beerel},
  title = {{HIRE-SNN: Harnessing the Inherent Robustness of Energy-Efficient Deep Spiking Neural Networks by Training with Crafted Input Noise}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00516},
}
Figure