TTFSFormer: A TTFS-based Lossless Conversion of Spiking Transformer
Lusen Zhao, Zihan Huang, Jianhao Ding, Zhaofei Yu
Abstract
ANN-to-SNN conversion has emerged as a key approach to train Spiking Neural Networks (SNNs), particularly for Transformer architectures, as it maps pre-trained ANN parameters to SNN equivalents without requiring retraining, thereby preserving ANN accuracy while eliminating training costs. Among various coding methods used in ANN-to-SNN conversion, time-to-first-spike (TTFS) coding, which allows each neuron to at most one spike, offers significantly lower energy consumption. However, while previous TTFS-based SNNs have achieved comparable performance with convolutional ANNs, the attention mechanism and nonlinear layers in Transformer architectures remains a challenge by existing SNNs with TTFS coding. This paper proposes a new neuron structure for TTFS coding that expands its representational range and enhances the capability to process nonlinear functions, along with detailed designs of nonlinear neurons for different layers in Transformer. Experimental results on different models demonstrate that our proposed method can achieve high accuracy with significantly lower energy consumption. To the best of our knowledge, this is the first work to focus on converting Transformer to SNN with TTFS coding. The source code of the proposed method is available at https://github.com/ ForestOnTheLand/TTFSFormer.git .
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.
Cited by top-tier papers7
- Otters: An Energy-Efficient Spiking Transformer via Optical Time-to-First-Spike EncodingZhanglu Yan, Jiayi Mao, Qianhui Liu, Fanfan Li et al.ICLR 2026 · 4 citations
- Temporal Weighted Encoding: Towards Maximal-Capacity Spike Coding for ANN–SNN ConversionYiwen Gu, Junchuan Gu, Haibin Shen, Kejie HuangICML 2026
- Generalized Threshold Optimization with Harmony Multi-Threshold Neurons for Accurate ANN-to-SNN ConversionWenhan Zhang, Zihan Huang, Tong Bu, Tiejun Huang et al.AAAI 2026
- Resolving the Timestep Scaling Paradox in Spiking Neural Networks with a Timestep-Scalable Neuron ModelBinghao Ye, Wenjuan Li, Dengfeng Xue, Bing Li et al.ICML 2026
- Temporal Representation Enhancement (TRE): Learning to Forget Dominant Patterns for Enhanced Temporal Spiking FeaturesWei Liu, Li Yang, Yufei Wang, Han Xiao et al.CVPR 2026
Builds on11
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 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
- T2FSNN: Deep Spiking Neural Networks with Time-to-first-spike CodingSeongsik Park, Sei Joon Kim, Byunggook Na, Sungroh YoonDAC 2020 · 121 citations
- Optimized Potential Initialization for Low-Latency Spiking Neural NetworksTong Bu, Jianhao Ding, Zhaofei Yu, Tiejun HuangAAAI 2022 · 112 citations
Related papers
- Temporal-coded Spiking TransformerQian Sun, Chengzhuo Lu, Wenyu Chen, Wenjie Wei et al.ACM MM 2025 · 1 citation
- Differential Coding for Training-Free ANN-to-SNN ConversionZihan Huang, Wei Fang, Tong Bu, Peng Xue et al.ICML 2025
- A time-to-first-spike coding and conversion aware training for energy-efficient deep spiking neural network processor designDongwoo Lew, Kyungchul Lee, Jongsun ParkDAC 2022 · 18 citations
- Towards High-performance Spiking Transformers from ANN to SNN ConversionZihan Huang, Xinyu Shi, Zecheng Hao, Tong Bu et al.ACM MM 2024 · 17 citations
- SpikeZIP-TF: Conversion is All You Need for Transformer-based SNNKang You, Zekai Xu, Chen Nie, Zhijie Deng et al.ICML 2024 · 20 citations
