Abstract
As spiking neural networks (SNNs) are increasingly deployed in efficiency-critical applications, their security against adversarial perturbations has become a significant concern. While adversarial training and certification have matured for artificial neural networks (ANNs), these techniques do not directly translate to SNNs due to their discrete spike-based communication and complex temporal dynamics. This paper presents the first comprehensive framework for robust SNN training. We introduce S-IBP and S-CROWN, methods designed to handle the non-linearities of Leaky Integrated-and-Fire (LIF) neurons. By formalizing boundaries for both digital and spike-based inputs, we demonstrate a significant reduction in adversarial vulnerability. Our experiments show up to a 37.7% reduction in attack error with a minimal 3.7% loss in clean accuracy, marking a foundational step toward secure neuromorphic computing.
1. Introduction
Spiking Neural Networks (SNNs) represent a paradigm shift in neural computing, mimicking the energy-efficient, event-driven nature of the biological brain. By utilizing discrete spikes over time, SNNs offer substantial power savings when deployed on specialized neuromorphic hardware like Intel’s Loihi. However, like their continuous-valued counterparts (ANNs), SNNs are susceptible to adversarial attacks—small, intentional perturbations that can lead to catastrophic misclassification.
While "certified robustness" has emerged as a gold standard for defending ANNs, the mathematical foundations of these defenses rely on continuous activations and differentiability. SNNs, characterized by the non-differentiable Heaviside step function and temporal dependencies, break these standard tools. This work addresses this gap by proposing a robust training framework tailored to the unique mechanics of spiking neurons.
2. Methodology: S-IBP and S-CROWN
The core of our approach involves adapting linear relaxation-based verification to the SNN architecture. We focus on the Leaky Integrated-and-Fire (LIF) model, which governs how neurons accumulate membrane potential and fire spikes.
2.1 S-IBP (Spiking Interval Bound Propagation)
S-IBP is a forward-propagation technique that computes the interval bounds of a neuron's state. Given an input within a defined noise range (e.g., an $\ell_\infty$ ball), S-IBP propagates these ranges through the network to determine the maximum and minimum possible membrane potentials at each layer. This provides a conservative estimate of the network's output range under perturbation.
2.2 S-CROWN
Because IBP bounds can become excessively loose in deep networks, we introduce S-CROWN. This method utilizes linear relaxations to approximate the non-linear "fire" and "reset" functions of the LIF neuron. By wrapping the jagged Heaviside function in linear upper and lower bounds, S-CROWN allows for a more precise backward pass to compute tighter output boundaries.
2.3 Formalizing Input Boundaries
A key contribution of this work is the formalization of noise boundaries for two distinct input types:
- Digital Inputs: Standard image data where perturbations are measured by continuous intensity changes.
- Spike Inputs: Native neuromorphic data (e.g., from event cameras) where perturbations involve the addition or removal of discrete spikes.
3. Experimental Evaluation
We evaluated the proposed framework across three datasets: MNIST, Fashion-MNIST (FMNIST), and N-MNIST (a neuromorphic version of MNIST). Our experiments utilized both Fully Connected (FC) and Convolutional (CONV) SNN architectures.
3.1 Robustness Performance
The proposed robust training significantly improved the models' resilience to adversarial attacks. On the MNIST dataset with a CONV architecture, we achieved a 37.7% reduction in attack error. Crucially, this robustness did not come at the expense of general utility; the "clean" accuracy (accuracy on unperturbed data) only decreased by 3.7%.
3.2 The Role of Temporal Dynamics
SNNs operate over multiple time steps ($T$). We found that while SNNs typically require many steps for inference, robust training is most effective when optimized over a smaller temporal window. Using $T'=3$ steps during the robust training phase provided the optimal balance between computational efficiency and the tightness of the mathematical bounds.
3.3 Architecture and Stability
Our analysis revealed that Convolutional SNNs are generally more amenable to robust training than Fully Connected models. The spatial hierarchy of CONV layers appears to better absorb the constraints imposed by the S-CROWN/S-IBP bounds. Furthermore, the S-CROWN loss remained stable throughout the training process, indicating that our linear relaxations effectively mitigate the instability typically associated with discrete spiking functions.
4. Discussion and Limitations
While this work establishes a baseline for SNN robustness, several challenges remain:
- Computational Overhead: Robust training is computationally intensive, often running up to 12.9x slower than standard training. This presents a barrier to scaling the method to larger datasets like ImageNet.
- Bound Tightness: As networks grow in depth or temporal duration, the interval bounds naturally widen, potentially reducing the effectiveness of the defense.
- Spike-Based Attack Space: For native spike inputs, the search space for perturbations is technically unbounded, necessitating further research into specialized certification for event-based data.
5. Conclusion
This research provides the first robust training framework specifically engineered for the unique constraints of Spiking Neural Networks. By introducing S-IBP and S-CROWN, we demonstrate that it is possible to provide mathematical guarantees for SNNs, bringing them closer to secure deployment in real-world, energy-sensitive applications.
Summary updated