Source-linked AI summary

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

arXiv:2110.11417v1cs.CVcs.AI

TL;DR

Low-latency deep SNNs may offer energy efficiency, but their robustness to adversarial attacks remains underexplored. HIRE-SNN trains them with crafted pixel noise across time steps without additional training time. It improves attack-image accuracy over standard direct-input SNNs, with up to 13.7% improvement on black-box FGSM images.

  • Problem

    The trustworthiness of low-latency SNNs under adversarial attacks remains underexplored, despite their potential to lower power consumption.

    Source: §1 · p. 2
  • Method

    HIRE-SNN trains SNNs with crafted pixel noise across time-step periods, using different noisy variants of each image without adding training time.

    Source: §1 · p. 2
  • Results

    Compared with traditionally trained direct-input SNNs, HIRE-SNN improves accuracy by up to 13.7% on black-box FGSM attack-generated images.

    Source: §6 · p. 8
  • Takeaways & Limitations

    Compared with rate-coded inherently robust SNNs, the models maintain similar clean-image accuracy with inference latency improved by up to 25×.

    Source: §5.3 · p. 8

    The black-box setting assumes attackers lack model-parameter knowledge and produce weaker perturbations than white-box attackers.

    Source: §2.2 · p. 3

Abstract

from arXiv · show

Low-latency deep spiking neural networks (SNNs) have become 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, analysis, and optimization of deep SNNs under various adversarial attacks have been largely 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 the model 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 datasets. 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 inputs with improved or similar classification performance on attack-generated images while having up to 25x and 4.6x lower latency and computation energy, respectively.

1. Introduction

The introduction examines whether low-latency deep SNNs withstand adversarial attacks and presents HIRE-SNN, a training method that uses crafted noise across time steps without additional training time.

  • Earlier noisy-input training schemes for ANNs incurred significant extra training time and non-negligible clean-accuracy drops.Source: §1 · p. 1
  • Prior claims of inherent SNN robustness were mostly based on small datasets and shallow models, while rate-coded inputs incurred high inference latency.Earlier work attributed robustness partly to sparse spiking activity.Source: §1 · p. 2
  • The paper asks whether low-latency deep SNNs retain robustness under white-box and black-box attacks and whether efficient training can improve robustness while preserving clean accuracy.Source: §1 · p. 2
  • Despite reduced average spike counts, direct-input deep SNNs have lower accuracy than equivalent ANNs on white-box and black-box attack images.The comparison is reported across multiple attacks.Source: §1 · p. 2
  • HIRE-SNN trains on different crafted-noise variants of each image across time-step periods, avoiding extra training time and reducing intermediate-gradient memory.Weights are updated after each period.Source: §1 · p. 2

2. Background

The background describes SNN neuron dynamics and training challenges, then introduces FGSM and PGD attacks and the white-box and black-box threat settings.

2.1. SNN Fundamentals

  • SNN layers propagate spikes over T time steps; inference compares output-neuron spike totals, while LIF decay is λ=1 for IF and λ<1 for LIF.The LIF dynamics are compared with ReLU, and T is also the inference latency.Source: §2.1 · p. 2
  • SNN training requires T forward and backward passes, and approximate gradients address undefined binary-spike gradients at the cost of slow convergence and high memory use.Source: §2.1 · p. 2
  • ANN-to-SNN conversion initializes thresholds, but converted models can require high latency; hybrid direct-input training is used to reduce inference latency.The hybrid approach follows conversion with a few epochs of direct-input SNN training.Source: §2.1 · pp. 2–3

2.2. Adversarial Attacks

  • FGSM perturbs input pixels along the sign of the loss gradient, with ϵ setting attack severity.Source: §2.2 · p. 3
  • PGD iteratively updates an adversarial sample and projects it into the benign image’s ϵ-L∞ neighborhood, using α as the attack step size.Source: §2.2 · p. 3
  • White-box attackers have complete model-parameter access; black-box attackers lack it and generate weaker perturbations.Source: §2.2 · p. 3

3. Initial Study: SNN Robustness Analysis

The initial study tests the adversarial robustness of traditionally trained direct-input SNNs and finds that it varies with activity measure, latency, and LIF settings.

3. Initial Study: SNN Robustness Analysis

  • The study evaluates traditionally trained SNNs initialized with weights and thresholds from an equivalent trained ANN conversion against white-box and black-box attacks.The analysis is intended to motivate the later training algorithm.Source: §3 · p. 3, §3.1 · p. 3

3.1. Performance Analysis

  • Direct-coded deep SNNs generally have lower SA but higher TASA than rate-coded SNNs, especially in initial convolution layers; this suggests sparse-activity observations may extend when measured with TASA.Figure 3 shows per-layer TASA for VGG5 on CIFAR-10 and VGG11 on CIFAR-100.Source: §3.1 · p. 3, Figure 3 · p. 3
  • 6.2% accuracy on the PGD black-box attack for VGG11 SNN, versus 15.25% for its ANN equivalent, shows traditional training can leave deep SNNs less robust.Table 1 compares performance under white-box and black-box attacks on CIFAR-10 and CIFAR-100.Source: §3.1 · p. 3, Table 1 · p. 4
  • Reducing T does not significantly improve adversarial-image accuracy and lowers clean accuracy; rate-coded SNNs generally need more training time and memory to reach competitive accuracy.The T-sweep analysis is for VGG11 on CIFAR-100.Source: Figure 4 · p. 3, §3.1 · p. 4
  • LIF layers do not reliably reduce perturbations in direct-input SNNs: leak helps only within a range, and layerwise spike PD may rise regardless of classification correctness.The authors conclude that rate-coded robustness factors are absent or require careful tuning in direct-input SNNs.Source: §3.1 · p. 4, Figure 5 · p. 4

4. HIRE-SNN Training

HIRE-SNN partitions training into periods, updating parameters and crafting a different noisy input variant within the original T-step window. This exposes the model to perturbed variants without additional training time.

4. HIRE-SNN Training

  • Different perturbed image variants are generated and used for training at intervals of ⌊T/N⌋ steps, enabling adversarial variants without additional training time.Figure 6 contrasts traditional and proposed training; its example uses T = 4 and N = 2.Source: §4 · p. 5, Figure 6 · p. 5
  • Because binary spike-train gradients are undefined, training uses a linear surrogate-gradient approximation for backpropagation and parameter updates.The damping factor γ controls the approximate backpropagation error.Source: §4 · p. 5
  • Input gradients craft each period's pixel perturbation, with noise step ϵs and bound ϵt controlling its update and range.The current batch begins with the prior batch's final-period perturbation; subsequent periods use the preceding period's perturbation.Source: §4 · p. 5
  • Weights, thresholds, and leak parameters are trainable, a choice the authors say helps retain clean-image accuracy at low latencies.The perturbation bound ϵs is chosen small enough to avoid significant clean-image accuracy loss.Source: §4 · p. 5

5. Experiments

Experiments test the training scheme across CIFAR-10/100, model variants, and white-box and black-box attacks. They report improved adversarial accuracy with little clean-accuracy cost, examine noise and attack-strength effects, and compare inference energy.

5.1. Experimental Setup

  • For each model variant, evaluation uses three differently trained networks; PGD uses an L∞ neighborhood bound of 8/255, step size 0.01, and 7 iterations, while FGSM uses the same bound.Source: §5.2 · p. 6, §5.1 · p. 6

5.2. Performance Against WB and BB Attacks

  • Up to 13.7% and 10.4% accuracy improvement on CIFAR-10 and CIFAR-100, respectively, is reported for the proposed SNN over traditionally trained SNNs.The white-box evaluation also reports improvements of up to 12.2% and 8.8% on CIFAR-10 and CIFAR-100, respectively, with negligible clean-image performance compromise.Source: §5.2 · p. 6
  • The proposed training uses up to approximately 25% less GPU memory than traditional training, with no extra GPU training time.The reported comparison measures normalized memory and average training time for batches of 200 images.Source: §5.2 · p. 6, Figure 7 · p. 6

5.3. Discussion

  • PGD robustness decreases as iterations increase but nears an asymptote after K = 40, and the authors conclude obfuscated gradients are not a significant source of robustness.FGSM performs worse than iterative PGD, while both can still fool the trained networks.Source: §5.3 · p. 7
  • Crafted noise improves adversarial performance over Gaussian noise by up to 6.5% for white-box and 9.7% for black-box attacks; fixed threshold and leak parameters retain attack gains but reduce clean accuracy.Gaussian-noise training provides no noticeable adversarial improvement over traditional training in the VGG11 CIFAR-100 experiment.Source: §5.3 · p. 7, Figure 9 · p. 7
  • Increasing ϵ_s consistently improves white-box and black-box adversarial accuracy, with up to approximately 2% clean-image performance loss.The models also outperform rate-coded robust SNNs with similar clean accuracy and up to 25× lower inference latency.Source: §5.3 · pp. 7–8, Figure 10 · p. 8

5.4. Computation Energy

  • For HIRE-SNN VGG11, computation energy is up to 4.6× lower than a rate-coded SNN and 10× lower than an ANN with 32-bit floating point.With 32-bit integer implementation, the respective energy advantages are up to 3.9× and 53×.Source: §5.4 · p. 8, Figure 11 · p. 8

6. Conclusions

The paper analyzes direct-input low-latency SNN robustness and introduces a crafted-noise training algorithm without additional training time. The trained models improve adversarial accuracy while retaining similar clean accuracy and offer latency and energy advantages over rate-coded robust SNNs.

6. Conclusions

  • The paper analyzes the inherent robustness of low-latency direct-input SNNs under adversarial attacks.It reports up to 13.7% improved accuracy on black-box FGSM attack images over traditionally trained direct-input SNNs.Source: §6 · p. 8
  • The proposed training algorithm uses carefully crafted input noise to harness SNN robustness without additional training time.Source: §6 · p. 8
  • Compared with rate-coded robust SNNs, the models perform similarly or better on clean and perturbed images, with up to 25× lower latency and approximately 4.6× lower computation energy.Source: §6 · p. 8
Loading 2110.11417v1…