[Paper Review] Spikformer V2: Join the High Accuracy Club on ImageNet with an SNN Ticket
Spikformer V2 introduces Spiking Self-Attention and a Spiking Convolutional Stem, enabling self-supervised pre-training to achieve ImageNet accuracy exceeding 80% with SNNs, including 81.10% with 16 layers and SSL.
Spiking Neural Networks (SNNs), known for their biologically plausible architecture, face the challenge of limited performance. The self-attention mechanism, which is the cornerstone of the high-performance Transformer and also a biologically inspired structure, is absent in existing SNNs. To this end, we explore the potential of leveraging both self-attention capability and biological properties of SNNs, and propose a novel Spiking Self-Attention (SSA) and Spiking Transformer (Spikformer). The SSA mechanism eliminates the need for softmax and captures the sparse visual feature employing spike-based Query, Key, and Value. This sparse computation without multiplication makes SSA efficient and energy-saving. Further, we develop a Spiking Convolutional Stem (SCS) with supplementary convolutional layers to enhance the architecture of Spikformer. The Spikformer enhanced with the SCS is referred to as Spikformer V2. To train larger and deeper Spikformer V2, we introduce a pioneering exploration of Self-Supervised Learning (SSL) within the SNN. Specifically, we pre-train Spikformer V2 with masking and reconstruction style inspired by the mainstream self-supervised Transformer, and then finetune the Spikformer V2 on the image classification on ImageNet. Extensive experiments show that Spikformer V2 outperforms other previous surrogate training and ANN2SNN methods. An 8-layer Spikformer V2 achieves an accuracy of 80.38% using 4 time steps, and after SSL, a 172M 16-layer Spikformer V2 reaches an accuracy of 81.10% with just 1 time step. To the best of our knowledge, this is the first time that the SNN achieves 80+% accuracy on ImageNet. The code will be available at Spikformer V2.
Motivation & Objective
- Motivate and enable high-performance image classification with Spiking Neural Networks (SNNs).
- Introduce Spiking Self-Attention (SSA) that is multiplication-free and energy-efficient.
- Develop Spiking Convolutional Stem (SCS) to enhance architecture and enable SSL pre-training.
- Leverage Self-Supervised Learning to train larger and deeper Spikformer V2.
- Demonstrate state-of-the-art ImageNet accuracy for pure SNNs.
Proposed method
- Propose Spiking Self-Attention (SSA) to replace softmax-based attention with spike-form Q, K, V and a sparse, multiplication-free computation.
- Introduce Spiking Convolutional Stem (SCS) to replace SPS and inject inductive bias via additional convolutional layers.
- Extend Spikformer into Spikformer V2 by integrating SCS and deeper architecture while monitoring training stability.
- Apply Mask Autoencoder style Self-Supervised Learning (SSL) with an asymmetric SNN-ANN decoder to pre-train large Spikformer V2 models.
- Fine-tune the model on ImageNet after SSL to achieve high accuracy with limited time steps.
Experimental results
Research questions
- RQ1Can self-attention be effectively implemented in SNNs without softmax and multiplications?
- RQ2Does a convolutional stem improve spike-based feature extraction and ImageNet performance in Spikformer?
- RQ3Can SSL pre-training enable larger and deeper Spikformer models to surpass 80% accuracy on ImageNet?
- RQ4What are the trade-offs between time steps, model depth, and accuracy for Spikformer V2 on ImageNet?
- RQ5Is an ANN-Decoder beneficial only for pre-training, not for inference in SNNs?
Key findings
- Spikformer V2 with 8 layers and 4 time steps achieves 80.38% accuracy on ImageNet in supervised training.
- Self-supervised pre-training enables a 16-layer Spikformer V2 to reach 81.10% accuracy with only 1 time step.
- Spikformer V2 surpasses 80% accuracy on ImageNet for the first time among SNNs.
- SSA reduces computation by removing softmax and leveraging spike-form Q, K, V, with multiplication-free operations.
- SCS with convolutional blocks improves performance over SPS and enables effective SSL pre-training.
- SSL pre-training stabilizes training for larger models and yields performance gains on ImageNet.
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.