[Paper Review] Attention-free Spikformer: Mixing Spike Sequences with Simple Linear Transforms
This paper proposes Attention-free Spikformer, replacing the parameterized Spiking Self-Attention (SSA) module with unparameterized linear transforms—Fourier and Wavelet transforms—for spike sequence mixing. Despite eliminating learnable parameters, the method achieves SOTA or comparable accuracy on neuromorphic and static datasets, with 29–51% faster training, 61–70% faster inference, and 4–26% lower memory usage.
By integrating the self-attention capability and the biological properties of Spiking Neural Networks (SNNs), Spikformer applies the flourishing Transformer architecture to SNNs design. It introduces a Spiking Self-Attention (SSA) module to mix sparse visual features using spike-form Query, Key, and Value, resulting in the State-Of-The-Art (SOTA) performance on numerous datasets compared to previous SNN-like frameworks. In this paper, we demonstrate that the Spikformer architecture can be accelerated by replacing the SSA with an unparameterized Linear Transform (LT) such as Fourier and Wavelet transforms. These transforms are utilized to mix spike sequences, reducing the quadratic time complexity to log-linear time complexity. They alternate between the frequency and time domains to extract sparse visual features, showcasing powerful performance and efficiency. We conduct extensive experiments on image classification using both neuromorphic and static datasets. The results indicate that compared to the SOTA Spikformer with SSA, Spikformer with LT achieves higher Top-1 accuracy on neuromorphic datasets (i.e., CIFAR10-DVS and DVS128 Gesture) and comparable Top-1 accuracy on static datasets (i.e., CIFAR-10 and CIFAR-100). Furthermore, Spikformer with LT achieves approximately 29-51% improvement in training speed, 61-70% improvement in inference speed, and reduces memory usage by 4-26% due to not requiring learnable parameters.
Motivation & Objective
- To investigate whether simpler, unparameterized sequence mixing mechanisms can replace the complex Spiking Self-Attention (SSA) module in Spikformer.
- To reduce the quadratic time complexity of SSA ($\mathcal{O}(N^2)$) to log-linear ($\mathcal{O}(N\log N)$) while preserving or improving performance.
- To evaluate the effectiveness of fixed-basis transforms—Fourier and Wavelet—on sparse spike sequences in SNNs.
- To achieve significant computational efficiency gains without relying on learnable parameters, enhancing deployability on neuromorphic hardware.
Proposed method
- Replace the Spiking Self-Attention (SSA) module in Spikformer with unparameterized linear transforms, specifically Fourier Transform (FT) and Wavelet Transform (WT), to mix spike sequences.
- Use 1D and 2D variants of FT and WT to operate on spike sequences in the time or frequency domain, enabling efficient feature mixing without learnable weights.
- Apply the transforms to spike-form Query, Key, and Value tensors, leveraging their inherent non-negativity and sparsity to avoid softmax normalization.
- Integrate the linear transform modules into the Spikformer architecture as a drop-in replacement for the SSA layer, maintaining the same model depth and width.
- Utilize Haar wavelets and standard FFT bases as default basis functions, with ablation studies on alternative wavelet bases.
- Train and evaluate the resulting Spikformer with LT on both neuromorphic (CIFAR10-DVS, DVS128 Gesture) and static (CIFAR-10, CIFAR-100) datasets under identical hyperparameters.
Experimental results
Research questions
- RQ1Can unparameterized linear transforms such as Fourier and Wavelet transforms effectively replace the parameterized Spiking Self-Attention (SSA) module in Spikformer for spike sequence mixing?
- RQ2Does replacing SSA with linear transforms reduce computational complexity while maintaining or improving model accuracy on neuromorphic and static image datasets?
- RQ3To what extent do fixed-basis transforms outperform adaptive attention mechanisms in the context of sparse, binary spike sequences?
- RQ4How do different wavelet basis functions affect performance, and is there a significant impact of basis choice on classification accuracy?
- RQ5What are the practical gains in training and inference speed, memory usage, and parameter count when replacing SSA with linear transforms?
Key findings
- Spikformer with Linear Transform (LT) achieves a Top-1 accuracy of 81.6% on CIFAR10-DVS, surpassing the original Spikformer with SSA (80.9% original, 79.7% reproduced).
- On DVS128 Gesture, Spikformer with 1D-FFT achieves 0.8% higher accuracy than the SOTA Spikformer with SSA and outperforms TA-SNN using floating-point spikes.
- The proposed Spikformer with LT reduces memory usage by 4–26% due to the absence of learnable parameters, with a 25% reduction in model parameters on CIFAR-10 and CIFAR-100.
- Training speed improves by 29–51% and inference speed by 61–70% compared to the original Spikformer with SSA, due to the log-linear complexity of FT and WT.
- Alternative wavelet basis functions (beyond Haar) yield comparable or better performance on CIFAR10-DVS and DVS128 Gesture, indicating robustness to basis choice.
- The performance gains on neuromorphic datasets suggest that fixed-basis transforms are better suited than adaptive attention for sparse, event-driven spike sequences.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.