Spiking Neural Networks (SNNs) have long been celebrated as the energy-efficient, biologically plausible future of artificial intelligence. Unlike traditional Artificial Neural Networks (ANNs) that process continuous values, SNNs communicate via discrete, binary "spikes" over time.
Intuitively, this architectural shift seems like it should provide an inherent defense against adversarial attacks. In an ANN, an attacker can compute precise gradients to find a tiny, continuous perturbation that alters the model's output. In an SNN, however, the activation function is a discontinuous step function: either a neuron fires a spike, or it does not. Because the derivative of a step function is zero everywhere (and undefined at the threshold), standard gradient-based attacks immediately fail.
For years, this non-differentiable nature created a comforting assumption: that SNNs possessed an inherent structural barrier against adversarial manipulation. However, recent research has revealed that this security is largely an illusion caused by gradient masking, and it has exposed a entirely new, time-based vulnerability landscape unique to neuromorphic computing.
Bypassing the Spike: How Attackers Broke the Barrier
The apparent resilience of SNNs quickly evaporates when adversaries move past naive gradient calculations. Because SNNs are often trained using differentiable approximations—known as surrogate gradients—attackers can use these same approximations to generate highly potent whitebox attacks. As demonstrated by Saima Sharmin et al. in A Comprehensive Analysis on Adversarial Robustness of Spiking Neural Networks, SNNs actually exhibit a heightened susceptibility to whitebox attacks compared to traditional ANNs, proving that discrete temporal dynamics alone cannot protect a network if an adversary understands its internal state.
To make matters worse, attackers do not even need access to the exact surrogate gradients used during training. The vulnerability of SNNs stems from two core architectural realities:
- Rate-Coding Dependencies: Many high-performance SNNs rely on "rate coding," where information is carried by the average frequency of spikes rather than their precise timing. In Rate Gradient Approximation Attack Threats Deep Spiking Neural Networks, Jianhao Ding et al. introduced the Rate Gradient Approximation (RGA) attack. By mapping gradients directly to these underlying firing rate relationships, the attack bypasses the complex, non-differentiable temporal dynamics entirely, exposing vulnerabilities on par with analog networks.
- Membrane Potential Leakage: Even if the spikes themselves hide gradient information, a neuron's internal membrane potential changes continuously before it hits the firing threshold. Kunyu Feng et al. exploited this in Towards Effective and Sparse Adversarial Attack on Spiking Neural Networks via Breaking Invisible Surrogate Gradients by reconstructing effective adversarial gradients directly from the internal distribution of membrane potentials.
As Ozan Özdenizci et al. summarized in Adversarially Robust Spiking Neural Networks Through Conversion, true security cannot be achieved by relying on a single heuristic; evaluating SNN robustness requires testing against an ensemble of diverse gradient approximations to ensure the defense isn't just masking the underlying gradients.
The Temporal Attack Surface
Because SNNs process information across a time axis, they are vulnerable to a completely new class of exploits that do not exist in static, continuous-value networks: temporal manipulation. An attacker does not need to change the spatial structure or the total volume of an input; they only need to alter when events occur.
In Time Is All It Takes: Spike-Retiming Attacks on Event-Driven Spiking Neural Networks, the authors demonstrated that shifting the timing of fewer than 2% of input spikes—without changing the total spike count or intensity—can trick an SNN into misclassification with over a 90% success rate.
Clean Stream: --|---|--|---|--|--> (Class: Car)
Retimed Stream: -|----|---|--|---|-> (Class: Bird)
This temporal dimension also creates a stealthy vector for backdoor attacks. Traditional deep learning defenses often flag poisoned data by looking for statistical anomalies, such as variations in output entropy. However, in neuromorphic systems, event-based data is naturally sparse and low-entropy.
Exploiting this property, Gorka Abad et al. introduced "Time Bandits" in Poster: Backdoor Attacks on Spiking NNs and Neuromorphic Datasets and Time-Distributed Backdoor Attacks on Federated Spiking Learning. By splitting a malicious trigger across different time steps and distributing it across multiple compromised devices in a federated learning setup, the authors injected highly effective backdoors. Because the sparse nature of the spikes masks the presence of the poison, the malicious inputs remain mathematically invisible to conventional anomaly detection algorithms.
Moving Toward Certified and Structural Defenses
To secure neuromorphic hardware, researchers are moving away from accidental gradient masking and toward mathematically rigorous, structurally engineered defenses.
The Mathematical Link to Randomized Smoothing
One of the most significant theoretical breakthroughs bridges the gap between stochastic spike generation and classical adversarial defense theory. In traditional deep learning, Randomized Smoothing is a technique where random noise is added to an input to mathematically guarantee that small perturbations cannot alter the model's prediction.
As it turns out, SNNs using Poisson or rate encoding do this naturally. Keming Wu et al. in RSC-SNN: Exploring the Trade-off Between Adversarial Robustness and Accuracy in Spiking Neural Networks via Randomized Smoothing Coding and Huan Xiong in Certified Adversarial Robustness for Rate Encoded Spiking Neural Networks formalized this connection. They proved that the stochastic nature of frequency-based spike generation is theoretically equivalent to randomized smoothing. By treating discrete event polarities as probabilistic samples, researchers can now establish certified robustness guarantees for SNNs, moving the field from empirical guesswork to formal security proofs.
Hardening Neuron Dynamics
Other approaches focus on modifying the internal differential equations of the spiking neurons themselves to prevent microscopic perturbations from triggering cascading failures.
A primary source of fragility stems from "threshold-neighboring" neurons—cells whose membrane potentials sit dangerously close to their firing limits. A microscopic push from an adversarial perturbation can force these neurons to fire prematurely, disrupting the entire network's temporal coordination. To counteract this, Shuai Wang developed Threshold Guarding Optimization (TGO) in Robust Spiking Neural Networks Against Adversarial Attacks, which actively penalizes and pushes internal membrane potentials away from their firing thresholds during training, turning brittle deterministic firing into a robust probabilistic process.
Standard Neuron: [Membrane Potential] -> || (Threshold) <-- High Risk!
Threshold Guarding: [Membrane Potential] -> | (Buffer) | -> || (Threshold)
Additionally, researchers are introducing biological regularizers directly into the spike transmission loop. In Enhancing the Robustness of Spiking Neural Networks with Stochastic Gating Mechanisms, Jianhao Ding et al. introduced Stochastic Gating (StoG), which applies probabilistic gates to spike propagation. This mechanism acts as a natural regularizer that dampens out high-frequency adversarial noise without adding computational overhead during deployment on edge hardware.
By shifting the focus from the illusion of robustness to the mathematical reality of spike dynamics, the neuromorphic community is beginning to build systems that are not just energy-efficient, but verifiably secure against both spatial and temporal exploits.
Key Foundational Work
Adversarial Training for Probabilistic Spiking Neural Networks (2018) — contributed 7 concept elements to this direction.
A Comprehensive Analysis on Adversarial Robustness of Spiking Neural Networks (2019) — contributed 8 concept elements to this direction.
SNN under Attack: are Spiking Deep Belief Networks vulnerable to Adversarial Examples? (2019) — contributed 4 concept elements to this direction.