Robust Spiking Neural Networks Against Adversarial Attacks
Organizations: University of Electronic Science and Technology of China · Shenzhen Loop Area Institute · Northumbria University · The Chinese University of Hong Kong, Shenzhen
Abstract
Spiking Neural Networks (SNNs) represent a promising paradigm for energy-efficient neuromorphic computing due to their bio-plausible and spike-driven characteristics. However, the robustness of SNNs in complex adversarial environments remains significantly constrained. In this study, we theoretically demonstrate that those threshold-neighboring spiking neurons are the key factors limiting the robustness of directly trained SNNs. We find that these neurons set the upper limits for the maximum potential strength of adversarial attacks and are prone to state-flipping under minor disturbances. To address this challenge, we propose a Threshold Guarding Optimization (TGO) method, which comprises two key aspects. First, we incorporate additional constraints into the loss function to move neurons' membrane potentials away from their thresholds. It increases SNNs' gradient sparsity, thereby reducing the theoretical upper bound of adversarial attacks. Second, we introduce noisy spiking neurons to transition the neuronal firing mechanism from deterministic to probabilistic, decreasing their state-flipping probability due to minor disturbances. Extensive experiments conducted in standard adversarial scenarios prove that our method significantly enhances the robustness of directly trained SNNs. These findings pave the way for advancing more reliable and secure neuromorphic computing in real-world applications.
Figures & tables
| Model | Train | Method | Adversarial Attacks | ||||||
| Clean | FGSM | RFGSM | PGD7 | PGD10 | PGD20 | PGD40 | |||
| WRN-16 | BPTT | Vanilla Deng et al. (2022) | 93.32 | ||||||
| TGO(Ours) | 51.40 | 71.38 | 11.67 | 6.14 | 1.52 | 0.45 | |||
| AT | AT Kundu et al. (2021) | 91.32 | |||||||
| TGO(Ours) | 63.03 | 79.69 | 42.52 | 35.01 | 24.76 | 20.11 | |||
| RAT | RAT Ding et al. (2022) | 91.44 | |||||||
| Model | Train | Method | Adversarial Attacks | ||||||
| Clean | FGSM | RFGSM | PGD7 | PGD10 | PGD20 | PGD40 | |||
| VGG-11 | BPTT | Vanilla Deng et al. (2022) | |||||||
| DLIF Ding et al. (2024a) | - | ||||||||
| StoG Ding et al. (2024b) | - | - | - | - | |||||
| TGO(Ours) | 17.20 | 38.23 | 2.30 | 1.33 | 0.69 | 0.42 | |||
| AT | AT Kundu et al. (2021) | 7.52 | |||||||
| MTPGD Attack | ||||
| Model | 7 | 10 | 20 | 40 |
| AT Kundu et al. (2021) | 10.01 | 7.56 | 5.66 | 3.92 |
| SR+AT Ding et al. (2024b) | 16.88 | 13.67 | 9.52 | 7.33 |
| TGO+AT(EoT) | 21.23 | 16.35 | 10.58 | 7.40 |
| APGD Attack | ||||
| Model | 7 | 10 | 20 | 40 |
| BPTT | RAT | ||||||||
| MC | NLIF | Clean | FGSM | RFGSM | PGD40 | Clean | FGSM | RFGSM | PGD40 |
| ✗ | ✗ | 71.4 | 5.9 | 25.0 | 0.0 | 67.8 | 20.9 | 46.2 | 6.9 |
| ✓ | ✗ | 64.3 (-7.2) | 17.1 (+11.2) | 25.9 (+0.9) | 0.5 (+0.5) | 61.4 (-6.4) | 26.2 (+5.3) | 42.7 (-3.5) | 6.2 (-0.7) |
| ✗ | ✓ | 70.6 (-0.8) | 8.1 (+2.1) | 31.7 (+6.6) | 0.1 (+0.1) | 68.1 (+0.4) | 25.2 (+4.3) | 50.1 (+3.9) | 9.1 (+2.2) |
| ✓ | ✓ | 66.9 (-4.6) | 21.5 (+15.5) | 39.1 (+14.1) | 0.5 (+0.5) | 63.3 (-3.8) | 33.8 (+13.0) | 50.8 (+4.6) | 9.3 (+2.4) |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Model | Clean | FGSM | RFGSM | PGD7 | PGD10 | PGD30 | PGD50 |
| AT | 72.2 | 57.4 | 65.2 | 46.9 | 45.6 | 45.2 | 44.2 |
| TGO+AT | 74.1 | 59.7 | 68.0 | 51.0 | 48.1 | 48.8 | 46.2 |
Adversarial Robustness
Adversarial robustness studies how well AI systems withstand deliberately crafted inputs, training-data corruption, and other attacks.
See all 479 papers