Positional Encoding for Spiking Transformers
Zijian Zhou, Yu Liang, Honglin Cao, Ammar Belatreche, Jieyuan Zhang, Wenjie Wei, Shuai Wang, Malu Zhang, Yang Yang, Haizhou Li
Abstract
Transformer-based Spiking Neural Networks (SNNs) have recently emerged as a promising paradigm to sequential modeling, combining the strong representational capabilities of Transformers with the sparse spike-driven computation of SNNs. Within such position-agnostic architectures, positional encoding is critical for injecting order information, allowing the model to distinguish token positions, capture sequential dependencies, and represent relative relationships among tokens. However, existing positional encoding methods for SNNs are largely inherited from ANNs and, in doing so, undermine the spike-driven computational properties that are central to spiking transformers. To address this limitation, we propose the Spiking Positional Encoding (SPE), a method designed specifically for Spiking Transformers, aimed at encoding relative positional information while preserving both spike-driven computation and the linear complexity of spiking self-attention. The core component of SPE is the Positional Encoding Leaky Integrate-and-Fire (PE-LIF) neuron, which incorporates position-dependent signals into neuronal thresholds and implicitly propagates this information through spike trains via continuous firing and membrane potential reset dynamics. Extensive experiments on thirteen NLP benchmarks demonstrate that SPE consistently outperforms existing SNN positional encoding methods, strengthens the sequence modeling capability, and improves energy efficiency without introducing additional trainable parameters. Code is available at https://github.com/CayleyZ/SPE.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 97663cc5-a8df-46f5-ada1-1088128dcdf3Builds on20
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
- Spike-driven TransformerMan Yao, Jiakui Hu, Zhaokun Zhou, Li Yuan et al.NeurIPS 2023 · 368 citations
- Spike-driven Transformer V2: Meta Spiking Neural Network Architecture Inspiring the Design of Next-generation Neuromorphic ChipsMan Yao, Jiakui Hu, Tianxiang Hu, Yifan Xu et al.ICLR 2024 · 154 citations
- QKFormer: Hierarchical Spiking Transformer using Q-K AttentionChenlin Zhou, Han Zhang, Zhaokun Zhou, Liutao Yu et al.NeurIPS 2024 · 126 citations
Related papers
- Toward Relative Positional Encoding in Spiking TransformersChangze Lv, Yansen Wang, Dongqi Han, Yifei Shen et al.NeurIPS 2025 · 8 citations
- SpikF: Spiking Fourier Network for Efficient Long-term PredictionWenjie Wu, Dexuan Huo, Hong ChenICML 2025
- Complex Dynamic Neurons Improved Spiking Transformer Network for Efficient Automatic Speech RecognitionQingyu Wang, Tielin Zhang, Minglun Han, Yi Wang et al.AAAI 2023 · 40 citations
- Advancing Spiking Neural Networks for Sequential Modeling with Central Pattern GeneratorsChangze Lv, Dongqi Han, Yansen Wang, Xiaoqing Zheng et al.NeurIPS 2024 · 10 citations
- AdaS: Adaptive Gradient Descent for Spiking TransformersZijian Zhou, Honglin Cao, Ammar Belatreche, Wenjie Wei et al.ICML 2026
