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

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

TL;DR

This paper introduces Robust Temporal Self-Ensemble (RTE), a training framework that treats Spiking Neural Networks (SNNs) as ensembles of sub-networks evolving over time. By simultaneously hardening individual timesteps against attacks and reducing the "transferability" of vulnerabilities between them, RTE significantly improves the balance between clean accuracy and adversarial robustness compared to traditional methods.

What Problem Does This Paper Address?

Spiking Neural Networks (SNNs) are the "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.

The standard fix is Adversarial Training (AT)—training the model on noisy examples. However, in SNNs, this often leads to a brutal trade-off: as you make the model more robust, its accuracy on clean, unperturbed data plummets. The authors argue this happens because current methods ignore the temporal nature of SNNs, failing to realize that an SNN is essentially a collection of "sub-networks" (one for each timestep) whose vulnerabilities are often highly correlated.

Methods

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:

  1. Sub-network Fragility: Individual timesteps are easily fooled.
  2. Temporal Transferability: An adversarial perturbation that fools the network at $t=1$ is likely to also fool it at $t=2, 3, \dots, T$.

The RTE Objective: To solve this, RTE uses a dual-objective loss function:

  • Self-Robustness: It minimizes the distributional shift at each timestep when faced with perturbations.
  • Transferability Suppression: It explicitly decouples the adversarial influence across different timesteps, forcing the "sub-networks" to develop diverse, independent decision boundaries.

To keep training efficient, they use a stochastic sampling strategy. Instead of calculating adversarial examples for every single timestep (which would be computationally expensive), they randomly sample one timestep per iteration to generate the perturbation, then apply the loss across the whole sequence.

Datasets

The researchers evaluated RTE on four standard computer vision benchmarks:

  • SVHN: Street View House Numbers.
  • CIFAR-10 & CIFAR-100: Standard object recognition datasets.
  • Tiny-ImageNet: A more complex, large-scale dataset.

They used common SNN architectures like VGG-9 and SEWResNet-19/20 to ensure the results were architecture-agnostic.

Key Insights and Ideas

  • SNNs as Implicit Ensembles: The most powerful "aha moment" is viewing the temporal dimension of an SNN not just as a processing delay, but as a built-in ensemble. This allows researchers to borrow and adapt powerful ensemble defense techniques from the DNN world.
  • Vulnerability Correlation: The paper reveals that in standard SNNs, adversarial "blind spots" are highly correlated across time. By forcing these timesteps to be "temporally diversified," the network becomes much harder to fool because an attacker can't find a single "skeleton key" perturbation that works for all timesteps.
  • Smoother Loss Landscapes: Visualization of the loss surfaces shows that RTE leads to much flatter, smoother landscapes. In adversarial machine learning, "sharp" loss peaks usually indicate areas where a tiny change in input leads to a massive change in output (a vulnerability).

Key Results

  • Superior Trade-offs: On CIFAR-100, RTE achieved the highest clean accuracy (59.50%) while maintaining competitive robustness. When combined with Sparsity Regularization (RTE+SR), it improved the "robustness-accuracy sum" metric by 3.92 points on CIFAR-10 and 4.80 points on Tiny-ImageNet over the strongest baselines.
  • Scaling with Time: Unlike some methods that plateau, RTE's performance improves as the number of timesteps ($T$) increases. This suggests that RTE effectively leverages the increased "ensemble capacity" of longer spike trains.
  • Black-Box Resilience: RTE showed particularly strong performance against the Square Attack (a black-box attack), indicating that it doesn't just "hide" gradients but builds genuine internal resilience.

Limitations and Future Work

While RTE is effective, the authors note some areas for further exploration:

  • Computational Overhead: Although the stochastic sampling helps, generating adversarial examples during training still incurs a higher cost than standard training (though it is comparable to other AT methods).
  • Surrogate Gradients: Like most SNN research, this relies on surrogate gradients to bypass the non-differentiability of spikes. The impact of different surrogate functions on RTE's effectiveness wasn't the primary focus but could be a variable.
  • Neuromorphic Hardware: The study is conducted on GPUs. Future work could involve testing how these robust models perform when deployed on actual neuromorphic chips (like Loihi or Tianjic), where spike sparsity and hardware constraints might interact with the RTE objective.

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},
}

Loading related content...

Figure