Boosting the Robustness-Accuracy Trade-off of SNNs by Robust Temporal Self-Ensemble

Jihang Wang, Dongcheng Zhao, Ruolin Chen, Qian Zhang, Yi Zeng

Abstract

Spiking Neural Networks (SNNs) offer a promising direction for energy-efficient and brain-inspired computing, yet their vulnerability to adversarial perturbations remains poorly understood. In this work, we revisit the adversarial robustness of SNNs through the lens of temporal ensembling, treating the network as a collection of evolving sub-networks across discrete timesteps. This formulation uncovers two critical but underexplored challenges—the fragility of individual temporal sub-networks and the tendency for adversarial vulnerabilities to transfer across time. To overcome these limitations, we propose Robust Temporal self-Ensemble (RTE), a training framework that improves the robustness of each sub-network while reducing the temporal transferability of adversarial perturbations. RTE integrates both objectives into a unified loss and employs a stochastic sampling strategy for efficient optimization. Extensive experiments across multiple benchmarks demonstrate that RTE consistently outperforms existing training methods in robust-accuracy trade-off. Our study highlights the importance of temporal structure in adversarial learning and offers a principled foundation for building robust spiking models.

Introduction: The Challenge of SNN Robustness

Spiking Neural Networks (SNNs) represent a "green" alternative to standard Deep Neural Networks (DNNs), mimicking biological neurons to process information via discrete spikes. While they are incredibly energy-efficient, they share a major flaw with DNNs: adversarial vulnerability. A tiny, calculated bit of noise can completely flip the network's prediction.

Standard Adversarial Training (AT)—training the model on noisy examples—often leads to a severe trade-off in SNNs: as robustness increases, accuracy on clean, unperturbed data typically plummets. This research argues that current methods fail because they ignore the temporal nature of SNNs. By viewing an SNN as an implicit ensemble of "sub-networks" (one for each timestep), we can see that their vulnerabilities are often highly correlated across time, creating a "skeleton key" for attackers.

The RTE Framework

The core innovation is the Robust Temporal Self-Ensemble (RTE) framework. The authors formalize the SNN output as an average of predictions made at each discrete timestep $t$. They identify two specific weaknesses to address:

  1. Sub-network Fragility: Individual timesteps are easily fooled by perturbations.
  2. Temporal Transferability: An adversarial perturbation that fools the network at one timestep is likely to fool it at subsequent timesteps.
Conceptual diagrams of (a) sub-network vulnerability minimization and (b) vulnerability transferability minimization.

To solve this, RTE uses a dual-objective loss function. First, it minimizes the distributional shift at each timestep when faced with perturbations (Self-Robustness). Second, it explicitly decouples the adversarial influence across different timesteps (Transferability Suppression), forcing the sub-networks to develop diverse, independent decision boundaries. To maintain computational efficiency, RTE employs a stochastic sampling strategy, randomly selecting one timestep per iteration to generate perturbations rather than calculating them for every timestep.

Experimental Evaluation

The researchers evaluated RTE on four standard computer vision benchmarks: SVHN, CIFAR-10, CIFAR-100, and Tiny-ImageNet, using architectures like VGG-9 and SEWResNet-19/20.

Key Results

  • Superior Trade-offs: RTE consistently achieves a better balance between clean accuracy and robustness. For instance, on CIFAR-100, RTE achieved a high clean accuracy of 59.50% while maintaining competitive robustness.
  • Aggregate Performance: When combined with Sparsity Regularization (RTE+SR), the framework significantly improved the overall trade-off metric across all tested datasets compared to traditional AT and TRADES methods.
Comparison of the robustness-accuracy trade-off across SVHN, CIFAR-10, CIFAR-100, and Tiny-ImageNet datasets.
  • Scaling with Time: Unlike some methods that plateau, RTE's performance improves as the number of timesteps ($T$) increases, effectively leveraging the increased "ensemble capacity" of longer spike trains.
  • Internal Resilience: Visualization of loss surfaces shows that RTE leads to flatter, smoother landscapes. In adversarial machine learning, this indicates that the network is less sensitive to small input changes, building genuine internal resilience rather than just "hiding" gradients.

Discussion and Future Directions

While RTE effectively reshapes the internal robustness landscape of SNNs, some areas for further exploration remain. Although stochastic sampling mitigates costs, generating adversarial examples still incurs higher overhead than standard training. Additionally, while this study focused on GPU-based simulations, future work should investigate how these robust models perform on actual neuromorphic hardware (like Loihi or Tianjic), where hardware constraints and spike sparsity may interact with the RTE objective. Overall, RTE provides a principled foundation for building robust spiking models by leveraging their inherent temporal structure.

Summary updated

BibTeX
@inproceedings{wang2026boosting,
  author = {Jihang Wang and Dongcheng Zhao and Ruolin Chen and Qian Zhang and Yi Zeng},
  title = {{Boosting the Robustness-Accuracy Trade-off of SNNs by Robust Temporal Self-Ensemble}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i31.39833},
}
Figure