Abstract
Spiking Neural Networks (SNNs) are highly valued for their energy efficiency on neuromorphic hardware but remain critically vulnerable to adversarial attacks. This paper introduces Stochastic Gating (StoG), a biologically inspired mechanism that incorporates probabilistic gates into spike transmission. By simulating the stochastic nature of biological ion channels, StoG acts as a natural regularizer that significantly enhances adversarial robustness while simultaneously reducing energy consumption. Our evaluations on CIFAR-10 and CIFAR-100 demonstrate that StoG provides a superior trade-off between robustness and computational efficiency compared to deterministic SNN models.
Introduction
While traditional Artificial Neural Networks (ANNs) utilize continuous values, SNNs communicate via discrete "spikes," making them ideal for low-power neuromorphic applications. However, SNNs share a significant vulnerability with ANNs: they are fragile to small, calculated perturbations known as adversarial attacks.
Interestingly, the biological brain remains robust despite being inherently "noisy." In biological systems, synapses and ion channels do not always fire deterministically; they exhibit a degree of stochasticity. Most current SNN models ignore this, opting for deterministic spike communication. This research aims to bridge the gap between the computational efficiency of SNNs and the inherent robustness of biological systems by reintroducing stochasticity through the Stochastic Gating (StoG) model.
Methods
The authors propose the Stochastic Gating (StoG) model, which simulates the opening and closing of neuronal signal channels as a stochastic process.
The Gating Mechanism
Instead of every spike automatically passing to the next layer, each channel has a probability of being open or closed, modeled as a Bernoulli distribution. If the gate is closed, the spike is filtered out. This mechanism is theoretically grounded using Taylor expansion and Lipschitz analysis, proving that StoG acts as a regularizer that prevents the amplification of input perturbations as they propagate through the network.
Training and Optimization
To ensure the model remains trainable, the authors employ the Gumbel-Max reparameterization trick, allowing gradients to flow through the discrete, random gating variables. Additionally, a regularization loss term is introduced to encourage the network to keep gates closed unless they are essential for accuracy, promoting both robustness and energy sparsity.
Key Insights and Results
Robustness-Efficiency Synergy
Typically, security features increase computational overhead. StoG achieves the opposite: by closing gates and filtering spikes, it reduces the total number of operations. In a Wide-ResNet-16-4 model, StoG reduced the number of Spike Operations (SOP)—the primary metric for SNN energy use—by approximately 1.428x while maintaining or improving robustness.
Experimental Performance
The researchers evaluated StoG on CIFAR-10 and CIFAR-100 using VGG-11 and Wide-ResNet architectures against various attack methods, including FGSM and PGD.
- Improved Robustness: On CIFAR-10 with VGG-11, adding StoG to a vanilla-trained model improved its "Random Targeted" PGD accuracy from 12.89% to 16.97%. When combined with Adversarial Training (AT), robust accuracy jumped from 54.54% to 59.47%.
- Theoretical Explanation for Poisson Coding: The authors mathematically proved that Poisson coding—a common SNN input method—is a special case of Stochastic Gating, explaining its empirical robustness.
Limitations and Conclusion
While StoG significantly boosts robustness and efficiency, it introduces a slight "clean accuracy tax," where performance on non-attacked images may drop slightly (e.g., from 93.05% to 91.64% on CIFAR-10). Future work will focus on optimizing gating probabilities to minimize this trade-off and exploring defenses against SNN-specific adversarial strategies. Ultimately, StoG demonstrates that controlled biological stochasticity can serve as a powerful shield for next-generation neuromorphic computing.
Summary updated