Skip to main content
QUICK REVIEW

[Paper Review] Spikingformer: A Key Foundation Model for Spiking Neural Networks

Chenlin Zhou, Liutao Yu|arXiv (Cornell University)|Apr 24, 2023
Advanced Memory and Neural ComputingEngineering35 citations
TL;DR

Spikingformer introduces a spike-driven residual learning architecture to build a pure transformer-based spiking neural network, achieving state-of-the-art results among directly trained SNNs while avoiding non-spike computations and reducing energy consumption.

ABSTRACT

Spiking neural networks (SNNs) offer a promising energy-efficient alternative to artificial neural networks, due to their event-driven spiking computation. However, some foundation SNN backbones (including Spikformer and SEW ResNet) suffer from non-spike computations (integer-float multiplications) caused by the structure of their residual connections. These non-spike computations increase SNNs' power consumption and make them unsuitable for deployment on mainstream neuromorphic hardware. In this paper, we analyze the spike-driven behavior of the residual connection methods in SNNs. We then present Spikingformer, a novel spiking transformer backbone that merges the MS Residual connection with Self-Attention in a biologically plausible way to address the non-spike computation challenge in Spikformer while maintaining global modeling capabilities. We evaluate Spikingformer across 13 datasets spanning large static images, neuromorphic data, and natural language tasks, and demonstrate the effectiveness and universality of Spikingformer, setting a vital benchmark for spiking neural networks. In addition, with the spike-driven features and global modeling capabilities, Spikingformer is expected to become a more efficient general-purpose SNN backbone towards energy-efficient artificial intelligence. Code: https://github.com/TheBrainLab/Spikingformer

Motivation & Objective

  • Motivate energy-efficient deep spiking neural networks by removing non-spike computations in residual connections.
  • Propose Spike-driven Residual Learning to enable pure spike-driven Transformer SNNs.
  • Develop Spikingformer, a transformer-based SNN with spike-driven residuals and a Spiking Tokenizer.
  • Evaluate Spikingformer on ImageNet, CIFAR, and neuromorphic datasets to establish state-of-the-art results among directly trained pure SNNs.

Proposed method

  • Introduce spike-driven residual learning where O_l = ConvBN_l(SN_l(O_{l-1})) + O_{l-1} and O_{l+1} = ConvBN_{l+1}(SN_{l+1}(O_l)) + O_l to avoid floating-point multiplications.
  • Adopt a Spiking Tokenizer to perform spike-based patch embedding and downsampling to produce X ∈ R^{T×N×D}.
  • Use Spiking Self Attention (SSA) and Spiking MLP blocks within Spiking Transformer Blocks, with Q, K, V computed via spike-based convolutions and SN layers.
  • Replace linear BN based constructions with ConvBN-based pathways to keep computations spike-driven.
  • Provide theoretical energy calculations based on spike-based operations (SOP) and use 45nm hardware energy estimates for MAC and AC operations.

Experimental results

Research questions

  • RQ1Can a transformer-based SNN be built with purely spike-driven residuals to eliminate non-spike computations?
  • RQ2What performance can be achieved by a pure spike-driven Transformer backbone on ImageNet, CIFAR, and neuromorphic datasets compared to Spikformer and SEW ResNet?
  • RQ3How does spike-driven residual design impact energy consumption on mainstream neuromorphic hardware?
  • RQ4What are the trade-offs in classifier head design when maximizing spike-driven computation?

Key findings

  • Spikingformer achieves 75.85% top-1 accuracy on ImageNet with 8-768 configuration using 4 time steps, outperforming Spikformer by 1.04 percentage points.
  • Spikingformer reduces energy consumption by 57.34% compared with Spikformer on ImageNet for the 8-768 variant.
  • On ImageNet, Spikingformer-8-512 attains 74.79% top-1, reducing energy by 60.36% versus Spikformer-8-512.
  • Spikingformer consistently outperforms Spikformer on CIFAR10/100, achieving 95.81%/79.21% respectively on 4-time-step setups.
  • On neuromorphic datasets CIFAR10-DVS and DVS128 Gesture, Spikingformer achieves 81.3% and 98.3% top-1 accuracies respectively (or higher with 16 steps), surpassing Spikformer.
  • Across static and neuromorphic benchmarks, Spikingformer demonstrates state-of-the-art performance among directly trained pure spike-driven SNNs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.