Spiking Transformer:Introducing Accurate Addition-Only Spiking Self-Attention for Transformer

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Guo, Yufei, Liu, Xiaode, Chen, Yuanpei, Peng, Weihang, Zhang, Yuhan, Ma, Zhe
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917957899124736
author Guo, Yufei
Liu, Xiaode
Chen, Yuanpei
Peng, Weihang
Zhang, Yuhan
Ma, Zhe
author_facet Guo, Yufei
Liu, Xiaode
Chen, Yuanpei
Peng, Weihang
Zhang, Yuhan
Ma, Zhe
contents Transformers have demonstrated outstanding performance across a wide range of tasks, owing to their self-attention mechanism, but they are highly energy-consuming. Spiking Neural Networks have emerged as a promising energy-efficient alternative to traditional Artificial Neural Networks, leveraging event-driven computation and binary spikes for information transfer. The combination of Transformers' capabilities with the energy efficiency of SNNs offers a compelling opportunity. This paper addresses the challenge of adapting the self-attention mechanism of Transformers to the spiking paradigm by introducing a novel approach: Accurate Addition-Only Spiking Self-Attention (A$^2$OS$^2$A). Unlike existing methods that rely solely on binary spiking neurons for all components of the self-attention mechanism, our approach integrates binary, ReLU, and ternary spiking neurons. This hybrid strategy significantly improves accuracy while preserving non-multiplicative computations. Moreover, our method eliminates the need for softmax and scaling operations. Extensive experiments show that the A$^2$OS$^2$A-based Spiking Transformer outperforms existing SNN-based Transformers on several datasets, even achieving an accuracy of 78.66\% on ImageNet-1K. Our work represents a significant advancement in SNN-based Transformer models, offering a more accurate and efficient solution for real-world applications.
format Preprint
id arxiv_https___arxiv_org_abs_2503_00226
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Spiking Transformer:Introducing Accurate Addition-Only Spiking Self-Attention for Transformer
Guo, Yufei
Liu, Xiaode
Chen, Yuanpei
Peng, Weihang
Zhang, Yuhan
Ma, Zhe
Computer Vision and Pattern Recognition
Transformers have demonstrated outstanding performance across a wide range of tasks, owing to their self-attention mechanism, but they are highly energy-consuming. Spiking Neural Networks have emerged as a promising energy-efficient alternative to traditional Artificial Neural Networks, leveraging event-driven computation and binary spikes for information transfer. The combination of Transformers' capabilities with the energy efficiency of SNNs offers a compelling opportunity. This paper addresses the challenge of adapting the self-attention mechanism of Transformers to the spiking paradigm by introducing a novel approach: Accurate Addition-Only Spiking Self-Attention (A$^2$OS$^2$A). Unlike existing methods that rely solely on binary spiking neurons for all components of the self-attention mechanism, our approach integrates binary, ReLU, and ternary spiking neurons. This hybrid strategy significantly improves accuracy while preserving non-multiplicative computations. Moreover, our method eliminates the need for softmax and scaling operations. Extensive experiments show that the A$^2$OS$^2$A-based Spiking Transformer outperforms existing SNN-based Transformers on several datasets, even achieving an accuracy of 78.66\% on ImageNet-1K. Our work represents a significant advancement in SNN-based Transformer models, offering a more accurate and efficient solution for real-world applications.
title Spiking Transformer:Introducing Accurate Addition-Only Spiking Self-Attention for Transformer
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2503.00226