Abstract
Traditional Transformer architectures, while highly effective, are constrained by the "energy wall" imposed by dense Multiply-and-Accumulate (MAC) operations. Spiking Neural Networks (SNNs) offer a biologically inspired, event-driven alternative that utilizes energy-efficient Accumulate (AC) operations. However, previous attempts to integrate SNNs with Transformers often relied on hybrid computations that compromised efficiency for accuracy. This paper presents the Spike-driven Transformer, the first architecture to achieve high-tier performance on ImageNet-1K (77.1% top-1 accuracy) using purely spike-driven operations. By leveraging Spike-Driven Self-Attention (SDSA) and a novel Membrane Shortcut (MS) mechanism, the model achieves an 87.2× reduction in energy consumption within the attention module compared to vanilla Transformers, while maintaining linear complexity.
1. Introduction
The rapid advancement of Artificial Intelligence has led to a significant increase in computational demand. Modern Transformers, the backbone of large-scale vision and language models, rely heavily on matrix multiplications. On standard hardware, these operations are implemented as Multiply-and-Accumulate (MAC) cycles, which are both power-intensive and computationally expensive.
Spiking Neural Networks (SNNs) provide a promising path toward neuromorphic computing. By communicating via discrete binary spikes (0 or 1), SNNs can replace MACs with simple additions (AC operations) on specialized hardware. Despite their potential, SNNs have historically lagged behind Artificial Neural Networks (ANNs) in accuracy on complex datasets like ImageNet. Furthermore, existing "Spiking Transformers" often incorporate non-spiking components to stabilize training, which negates the inherent energy benefits of the SNN paradigm.
2. Methodology
The Spike-driven Transformer introduces two key architectural innovations designed to maintain a purely spike-driven data flow while maximizing performance.
2.1 Spike-Driven Self-Attention (SDSA)
In a standard Transformer, the self-attention mechanism involves calculating the dot product of Query (Q), Key (K), and Value (V) matrices, followed by a Softmax operation. This process is quadratic in complexity and requires extensive multiplication.
The proposed SDSA replaces these operations entirely. Because the inputs are binary spikes, the authors utilize a Hadamard product (element-wise masking). In this system, if a spike is present (1), the corresponding value is passed; if absent (0), it is blocked. This approach eliminates all matrix multiplications within the attention mechanism. Mathematically, SDSA is shown to be a form of linear attention where the spiking neuron layer serves as the kernel function, reducing complexity from $O(N^2D)$ to $O(ND)$.
2.2 Membrane Shortcut (MS)
Residual connections are vital for training deep networks, but in SNNs, adding the output of a block back to its input often results in multi-bit integers, breaking the binary spike requirement. The Spike-driven Transformer addresses this through the Membrane Shortcut. By rearranging the architecture to perform the shortcut at the membrane potential level—the internal state of the neuron—before the spiking function is applied, the model ensures that all signals transmitted between blocks remain purely binary.
3. Experimental Results
The model was evaluated across static image classification and neuromorphic event-based benchmarks.
3.1 ImageNet-1K Performance
The Spike-driven Transformer achieved a top-1 accuracy of 77.1% on ImageNet-1K. This represents the state-of-the-art for SNNs, significantly narrowing the gap between bio-plausible models and traditional Vision Transformers (ViTs).
3.2 Energy Efficiency
The energy savings are most pronounced in the attention mechanism, where the SDSA module consumes 87.2× less energy than its non-spiking counterpart. The efficiency is driven by the extreme sparsity of the "Value" matrix, which often contains less than 2% non-zero elements. This sparsity allows neuromorphic hardware to skip the vast majority of calculations, performing only a small number of additions.
3.3 Neuromorphic Benchmarks
On the DVS128 Gesture dataset, which uses data from event-based cameras, the model achieved 99.3% accuracy. This demonstrates the architecture's native compatibility with bio-inspired sensors that record changes in brightness rather than static frames.
4. Discussion and Limitations
The Spike-driven Transformer proves that it is possible to achieve high performance without sacrificing the energy-efficient properties of SNNs. The transition from multiplication to masking represents a fundamental shift in how attention can be computed.
However, challenges remain. While 77.1% is a record for SNNs, it still trails the most optimized ANNs of similar scale. Additionally, training SNNs is more memory-intensive due to the use of surrogate gradients over multiple timesteps ($T$). Future research will focus on optimizing training for $T=1$ to further enhance speed and investigating methods to close the remaining accuracy gap with traditional Transformers.
5. Conclusion
The Spike-driven Transformer offers a "best of both worlds" solution for AI deployment. By combining the architectural strengths of the Transformer with the event-driven efficiency of SNNs, it provides a scalable, low-power alternative for the next generation of intelligent systems, particularly in edge computing and neuromorphic hardware environments.
Summary updated