Skip to main content
QUICK REVIEW

[Paper Review] Enhancing the Performance of Transformer-based Spiking Neural Networks by SNN-optimized Downsampling with Precise Gradient Backpropagation

Chenlin Zhou, Han Zhang|arXiv (Cornell University)|May 10, 2023
Advanced Memory and Neural ComputingEngineering5 citations
TL;DR

This paper proposes ConvBN-MaxPooling-LIF (CML), an SNN-optimized downsampling module that enables precise gradient backpropagation in transformer-based spiking neural networks, overcoming the performance bottleneck caused by imprecise gradients in existing SNNs. CML achieves state-of-the-art results, including 77.64% top-1 accuracy on ImageNet and 81.4% on CIFAR10-DVS, outperforming Spikingformer by +1.79% and +1.16% on ImageNet and CIFAR100 respectively.

ABSTRACT

Deep spiking neural networks (SNNs) have drawn much attention in recent years because of their low power consumption, biological rationality and event-driven property. However, state-of-the-art deep SNNs (including Spikformer and Spikingformer) suffer from a critical challenge related to the imprecise gradient backpropagation. This problem arises from the improper design of downsampling modules in these networks, and greatly hampering the overall model performance. In this paper, we propose ConvBN-MaxPooling-LIF (CML), an SNN-optimized downsampling with precise gradient backpropagation. We prove that CML can effectively overcome the imprecision of gradient backpropagation from a theoretical perspective. In addition, we evaluate CML on ImageNet, CIFAR10, CIFAR100, CIFAR10-DVS, DVS128-Gesture datasets, and show state-of-the-art performance on all these datasets with significantly enhanced performances compared with Spikingformer. For instance, our model achieves 77.64 $\%$ on ImageNet, 96.04 $\%$ on CIFAR10, 81.4$\%$ on CIFAR10-DVS, with + 1.79$\%$ on ImageNet, +1.16$\%$ on CIFAR100 compared with Spikingformer.

Motivation & Objective

  • To address the critical issue of imprecise gradient backpropagation in transformer-based spiking neural networks (SNNs), which limits model performance.
  • To design a downsampling module specifically optimized for SNNs that enables accurate gradient flow during training.
  • To improve the performance of direct-trainable SNNs, particularly Spikformer and Spikingformer, without relying on ANN distillation.
  • To validate the effectiveness of the proposed module across diverse datasets, including static image and neuromorphic event-based data.

Proposed method

  • Propose ConvBN-MaxPooling-LIF (CML), a novel downsampling module combining convolution, batch normalization, max pooling, and LIF spiking neurons.
  • Integrate CML into transformer-based SNNs to replace traditional downsampling layers, ensuring gradient compatibility with spiking dynamics.
  • Theoretical analysis proves that CML enables precise gradient backpropagation by maintaining differentiable activation paths through the spiking neuron's membrane potential.
  • Use surrogate gradient methods to train the SNN end-to-end, with CML ensuring stable and accurate gradient signals during backpropagation.
  • Apply CML to Spikformer and Spikingformer models, maintaining the same training protocols and hyperparameters as the original models.

Experimental results

Research questions

  • RQ1Can a downsampling module designed specifically for SNNs improve gradient precision and thus enhance model performance?
  • RQ2Does the proposed CML module overcome the gradient imprecision problem inherent in existing transformer-based SNNs like Spikformer and Spikingformer?
  • RQ3To what extent does CML improve performance on both static image and neuromorphic event-based datasets?
  • RQ4Can CML achieve state-of-the-art results in directly trained SNNs without requiring knowledge distillation from pre-trained ANNs?

Key findings

  • CML achieves 77.64% top-1 accuracy on ImageNet, representing a +1.79% improvement over Spikingformer.
  • On CIFAR100, the Spikingformer + CML model achieves 81.4% accuracy, a +1.16% gain over the original Spikingformer.
  • On CIFAR10-DVS, Spikingformer + CML reaches 81.4% top-1 accuracy with 16 time steps, setting a new SOTA for directly trained SNNs.
  • On DVS128-Gesture, Spikingformer + CML achieves 98.6% top-1 accuracy with 16 time steps, also setting a new SOTA for directly trained SNNs.
  • The performance gains are consistent across multiple datasets, confirming the generalizability of CML across different data modalities and network architectures.

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.