SparseSpikformer: A Co-Design Framework for Token and Weight Pruning in Spiking Transformer

Yue Liu, Shanlin Xiao, Bo Li, Zhiyi Yu
11/15/2023
cs.CVcs.AI
transformer-attentionquantization-pruning

No confident code implementation found for this paper.

Abstract

As the third-generation neural network, the Spiking Neural Network (SNN) has the advantages of low power consumption and high energy efficiency, making it suitable for implementation on edge devices. More recently, the most advanced SNN, Spikformer, combines the self-attention module from Transformer with SNN to achieve remarkable performance.

Show full abstract

However, it adopts larger channel dimensions in MLP layers, leading to an increased number of redundant model parameters. To effectively decrease the computational complexity and weight parameters of the model, we explore the Lottery Ticket Hypothesis (LTH) and discover a very sparse ($\ge$90%) subnetwork that achieves comparable performance to the original network. Furthermore, we also design a lightweight token selector module, which can remove unimportant background information from images based on the average spike firing rate of neurons, selecting only essential foreground image tokens to participate in attention calculation. Based on that, we present SparseSpikformer, a co-design framework aimed at achieving sparsity in Spikformer through token and weight pruning techniques. Experimental results demonstrate that our framework can significantly reduce 90% model parameters and cut down Giga Floating-Point Operations (GFLOPs) by 20% while maintaining the accuracy of the original model.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liu2023sparsespikformer,
  title  = {SparseSpikformer: A Co-Design Framework for Token and Weight Pruning in Spiking Transformer},
  author = {Yue Liu and Shanlin Xiao and Bo Li and Zhiyi Yu},
  year   = {2023},
  eprint = {2311.08806},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.08806v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.08806.svg)](https://codeofpaper.com/paper/2311.08806)

Discussion