Abstract
Adversarial perturbations pose a significant threat to the reliability of deep learning models, including Spiking Neural Networks (SNNs). While SNNs are valued for their biological plausibility and energy efficiency, they remain susceptible to small, calculated input changes that trigger misclassification. This paper introduces Homeostatic Spiking Neural Networks (HoSNNs), which utilize a biologically inspired homeostatic mechanism to stabilize neural activity. By implementing Threshold-Adapting Leaky Integrate-and-Fire (TA-LIF) neurons, HoSNNs dynamically adjust firing thresholds to suppress adversarial noise. Our results demonstrate that HoSNNs significantly enhance robustness across multiple computer vision benchmarks, outperforming standard SNNs and existing defense mechanisms under both white-box and black-box attacks.
Introduction
Adversarial attacks—tiny, calculated perturbations to an input image—can easily trick artificial intelligence into making egregious errors, such as misclassifying a cat as a toaster. While the human brain is remarkably robust to visual noise, standard artificial Spiking Neural Networks (SNNs) are not. Biological neurons maintain internal stability through homeostasis, regulating their firing rates to stay within a functional range despite external fluctuations.
Standard artificial SNNs typically employ a static firing threshold. When subjected to an adversarial attack, these neurons experience "abnormal" membrane potential deviations that propagate through the network layers, ultimately leading to incorrect predictions. Existing defenses, such as adversarial training, are often computationally intensive and fail to address the inherent instability of the individual neuron's state. HoSNNs address this by bringing the self-regulating nature of biological brains to artificial spiking architectures.
The TA-LIF Neuron and Homeostatic Regulation
The core innovation of this work is the Threshold-Adapting Leaky Integrate-and-Fire (TA-LIF) neuron model. This model treats adversarial defense as a local control problem rather than a global optimization task.
Neural Dynamic Signature (NDS)
To implement homeostasis, the network must first understand what "normal" activity looks like. The researchers establish a Neural Dynamic Signature (NDS) by recording the average membrane potential of every neuron across a clean dataset using a pre-trained standard SNN. This NDS serves as a baseline anchor for normal semantic behavior.
Adaptive Thresholds
In a HoSNN, the firing threshold ($V_{th}$) is not fixed. Instead, it follows a local feedback control law. If a neuron’s membrane potential deviates from its NDS due to adversarial noise, the threshold dynamically adjusts to compensate:
- Over-excitation: If noise causes the potential to rise too high, the threshold increases to suppress the error.
- Inhibition: If the potential is suppressed by noise, the threshold drops to encourage firing.
This mechanism ensures Bounded-Input Bounded-Output (BIBO) stability. Mathematically, the authors prove that while errors in standard neurons can grow unbounded over time, the TA-LIF model keeps these errors suppressed and stable, acting much like a spring-mass system returning to equilibrium.
Experimental Results
The authors evaluated HoSNNs on four standard computer vision benchmarks: Fashion-MNIST, SVHN, CIFAR-10, and CIFAR-100. The performance gains under strong Projected Gradient Descent (PGD) attacks (PGD7 with $\epsilon = 8/255$) were substantial.
| Dataset | Standard SNN Accuracy | HoSNN Accuracy |
|---|---|---|
| Fashion-MNIST | 30.90% | 74.91% |
| SVHN | 0.44% | 36.82% |
| CIFAR-10 | 0.54% | 43.33% |
| CIFAR-100 | 0.04% | 16.66% |
When combined with weak adversarial training, HoSNNs achieved the highest defense accuracies reported to date for SNNs on CIFAR-10 and CIFAR-100, outperforming other state-of-the-art methods. Crucially, the authors performed a rigorous security evaluation to ensure these gains were not due to "gradient masking," confirming that HoSNNs provide genuine adversarial resilience.
Visualizing Robustness
To understand why HoSNNs succeed, the researchers analyzed saliency maps, which highlight the regions of an image the network focuses on for classification.
As shown in the visual analysis, standard SNNs lose focus on the primary object (e.g., a deer or a bird) when faced with PGD attacks, with saliency shifting to irrelevant background noise. In contrast, HoSNNs maintain a consistent focus on the relevant features of the object, mirroring the behavior seen with clean inputs. This visual stability confirms that the homeostatic mechanism effectively filters out adversarial disturbances at the individual neuron level before they can corrupt the network's global representation.
Conclusion
HoSNNs represent a significant step toward more resilient neuromorphic computing. By implementing local, homeostatic regulation through adaptive thresholds, these networks prevent the propagation of adversarial errors. While a small "robustness tax" (a slight drop in clean accuracy) remains, the dramatic improvements in security under attack suggest that biological principles like homeostasis are key to building AI that is not just efficient, but truly robust.
Summary updated