Abstract
Spiking Neural Networks (SNNs) are increasingly favored for their biological plausibility and energy efficiency in edge computing. However, their security landscape remains poorly understood, often obscured by the non-differentiable nature of discrete spike functions. This paper investigates the perceived robustness of SNNs, identifying that much of their resistance to adversarial attacks is a byproduct of gradient masking rather than inherent security. We introduce the Mixed Dynamic Spiking Estimation (MDSE) attack, a novel framework that optimizes surrogate gradient selection and cross-architecture integration. Our results demonstrate that MDSE is up to 91.4% more effective than existing methods at compromising ensembles of SNNs and Vision Transformers (ViTs), highlighting a critical need for more rigorous security evaluations in neuromorphic computing.
1. Introduction
Spiking Neural Networks (SNNs) represent a paradigm shift in neural computing, utilizing discrete binary "spikes" to transmit information over time. While this temporal sparsity allows for significant power savings, it introduces a fundamental challenge for gradient-based optimization: the spike function's derivative is zero almost everywhere and undefined at the threshold. To train and attack these models, researchers rely on surrogate gradients (SGs)—continuous approximations of the spike function.
This reliance on SGs creates a "security through obscurity" effect. If an attacker uses a sub-optimal SG, the resulting adversarial noise may fail to perturb the model, leading researchers to believe the SNN is robust. This paper addresses three primary questions: the impact of SG choice on perceived robustness, the transferability of adversarial examples between SNNs and traditional architectures, and the vulnerability of mixed-model ensembles.
2. Methodology: The MDSE Attack
To rigorously test SNN security, we propose the Mixed Dynamic Spiking Estimation (MDSE) attack. Unlike traditional attacks that use a static surrogate gradient, MDSE treats the gradient approximation itself as a dynamic component of the optimization process.
2.1 Dynamic Gradient Estimation
MDSE avoids the "SG Trap" by dynamically selecting the surrogate gradient function (e.g., Sigmoid, Arctan, or Piecewise Linear) that maximizes the loss at each iteration of the attack. This ensures that the attack does not become trapped in regions where a specific SG provides poor directional information, effectively bypassing the gradient masking that often protects SNNs from simpler attacks.
2.2 Mixed Multi-Model Integration
Attacking ensembles that combine SNNs with non-spiking models like Vision Transformers (ViTs) or CNNs is difficult due to the architectural divergence. MDSE employs an automated coefficient update scheme to adaptively weight gradients from different models. This balancing act ensures that the generated adversarial noise is equally effective across all members of a heterogeneous ensemble, bridging the transferability gap between spiking and non-spiking domains.
3. Experimental Setup
We evaluated MDSE across 19 different models, including SNN architectures (VGG, ResNet, SEW-ResNet) and traditional deep learning models (ViT-B, BiT, ResNet-20). The study utilized three standard computer vision benchmarks:
- CIFAR-10
- CIFAR-100
- ImageNet
Models were tested in both white-box and black-box (transfer) scenarios, including evaluations against models specifically hardened via adversarial training (e.g., TIC, HIRE, and FAT methods).
4. Key Insights and Results
4.1 The Illusion of Robustness
Our findings suggest that SNN robustness is frequently an artifact of poor gradient estimation. For instance, using an Arctan surrogate gradient consistently yielded higher attack success rates on CIFAR datasets compared to other SGs. Researchers who only evaluate their models against a single, poorly matched SG may report inflated security metrics—a phenomenon we characterize as a form of gradient masking.
4.2 Superior Attack Performance
MDSE consistently outperformed state-of-the-art attacks such as Auto-PGD and SAGA. On mixed SNN/ViT ensembles, MDSE achieved an effectiveness increase of up to 91.4% over previous methods. On the ImageNet dataset, MDSE reached near-perfect attack success rates (100%) against several model pairings where conventional attacks failed to converge.
4.3 The Transferability Gap
We observed remarkably low transferability between SNNs and Vision Transformers. Adversarial examples crafted to fool an SNN rarely succeeded against a ViT, and vice versa. This suggests that while SNNs and ViTs are individually vulnerable, their "blind spots" are distinct. However, MDSE’s multi-model integration effectively overcomes this hurdle by crafting noise that targets the intersection of these vulnerabilities.
4.4 Impact on Adversarial Training
Even SNNs specifically trained to resist adversarial examples proved vulnerable. Against models utilizing advanced adversarial training techniques, MDSE provided a 3x boost in attack effectiveness compared to standard white-box attacks, indicating that current SNN defense mechanisms are not yet robust against dynamic gradient estimation.
5. Conclusion and Future Work
The security of Spiking Neural Networks is not as mature as previously thought. By exposing the vulnerabilities inherent in surrogate gradient estimation, MDSE provides a new benchmark for evaluating SNN robustness. While this study focused on image-to-spike conversion, future research must address native neuromorphic data, such as DVS camera events, which present unique temporal and binary challenges. As SNNs move toward real-world deployment in safety-critical edge applications, the development of defenses that account for dynamic gradient attacks will be essential.
Summary updated