Neural Dynamics Self-Attention for Spiking Transformers
Organizations: University of Electronic Science and Technology of China · Shenzhen Loop Area Institute · The Chinese University of Hong Kong (Shenzhen)
Abstract
Integrating Spiking Neural Networks (SNNs) with Transformer architectures offers a promising pathway to balance energy efficiency and performance, particularly for edge vision applications. However, existing Spiking Transformers face two critical challenges: (i) a substantial performance gap compared to their Artificial Neural Networks (ANNs) counterparts and (ii) high memory overhead during inference. Through theoretical analysis, we attribute both limitations to the Spiking Self-Attention (SSA) mechanism: the lack of locality bias and the need to store large attention matrices. Inspired by the localized receptive fields (LRF) and membrane-potential dynamics of biological visual neurons, we propose LRF-Dyn, which uses spiking neurons with localized receptive fields to compute attention while reducing memory requirements. Specifically, we introduce a LRF method into SSA to assign higher weights to neighboring regions, strengthening local modeling and improving performance. Building on this, we approximate the resulting attention computation via charge-fire-reset dynamics, eliminating explicit attention-matrix storage and reducing inference-time memory. Extensive experiments on visual tasks confirm that our method reduces memory overhead while delivering significant performance improvements. These results establish it as a key unit for achieving energy-efficient Spiking Transformers.
Figures & tables
| Method | Architecture | SR. | Param.(M) | Acc.(%) |
| SEWResNet ( Fang et al., 2021 ) | SEW-ResNet-34 | - | 21.79 | 67.04 |
| MSResNet ( Hu et al., 2024 ) | MS-ResNet-34 | - | 21.80 | 69.42 |
| SDT-V1 ( Yao et al., 2023 ) | Spike-driven-8-512 | 29.68 | 74.57 | |
| SDT-V2 ( Yao et al., 2024b ) | Meta-SpikeFormer-384 | 15.08 | 74.10 | |
| Meta-SpikeFormer-512 | 55.35 | 79.70 | ||
| Spikformer ( Zhou et al., 2023b ) | Spikformer-8-512 | 29.68 | 73.38 |
| Model | Para. (M) | Attn | T | MIoU(%) |
| ResNet | 15.5 | ✗ | 1 | 32.9 |
| ( Yu et al., 2022 ) | 28.5 | ✗ | 1 | 36.7 |
| PVT | 28.2 | ✓ | 1 | 39.8 |
| ( Wang et al., 2021 ) | 48.0 | ✓ | 1 | 41.6 |
| SDT-V3 | 5.1 + 1.4 | ✓ | 4 | 33.6 |
| ( Yao et al., 2025 ) | 18.99 + 1.4 † | ✓ | 4 | 41.3 |
| Method | w/o LRF | |||
| LRF-SSA | 77.86 | 78.26 | 78.52 | 78.64 |
| LRF-Dyn | 77.78 | 78.16 | 78.50 | 78.57 |
| Caused SSA † | 74.30 | 75.30 | 76.20 | 76.50 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.