arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.10686cs.NEcs.AI
收藏

Spikeformer:一种训练高性能低延迟脉冲神经网络的新结构

Spikeformer: A Novel Architecture for Training High-Performance Low-Latency Spiking Neural Network

Beijing Institute of Technology(北京理工大学)

Yudong Li, Yunlin Lei, Xu Yang

摘要:

脉冲神经网络(Spiking neural networks,SNNs)在过去的几年里在性能和效率上都取得了很大的进步,但其独特的工作模式使得训练高性能、低延迟的SNNs变得困难,因此SNNs的发展仍然落后于传统的人工神经网络(artificial neural networks,ANN)。这些工作主要基于同一种网络结构(即CNN),并且它们的性能比它们的人工神经网络同行差,这限制了SNN的应用。为此,我们提出了一种新的基于变换器的SNN,称为“Spikeformer”,其在静态数据集和神经形态数据集上都优于其ANN对应物,并且可以是用于训练高性能SNN的CNN的替代体系结构。首先,为了处理“数据饥饿”问题和香草模型中表现出的不稳定训练周期,设计了卷积标记器(Convolutional Tokenizer,CT)模块,使原始模型在DVS-Gesture上的准确率提高了16%以上,同时为了更好地融合Transformer内部的注意力机制和SNN固有的时空信息,我们采用时空注意力(STA)代替空间或时间注意力。使用我们提出的方法,我们在DVS-CIFAR 10,DVS-Gesture,和ImageNet数据集,具有最少的模拟时间步长(即低延迟)。值得注意的是,我们的Spikeformer在ImageNet上的表现远远优于其他SNN(即超过5%),甚至在DVS-Gesture和ImageNet上分别超过其ANN对手3.1%和2.2%,这表明Spikeformer是一种很有前途的训练大规模SNN的架构,与CNN相比,它可能更适合SNN。我们相信这项工作将使SNN的发展尽可能与ANN保持同步。代码将可用。

英文摘要:

Spiking neural networks (SNNs) have made great progress on both performance and efficiency over the last few years,but their unique working pattern makes it hard to train a high-performance low-latency SNN.Thus the development of SNNs still lags behind traditional artificial neural networks (ANNs).To compensate this gap,many extraordinary works have been proposed.Nevertheless,these works are mainly based on the same kind of network structure (i.e.CNN) and their performance is worse than their ANN counterparts,which limits the applications of SNNs.To this end,we propose a novel Transformer-based SNN,termed "Spikeformer",which outperforms its ANN counterpart on both static dataset and neuromorphic dataset and may be an alternative architecture to CNN for training high-performance SNNs.First,to deal with the problem of "data hungry" and the unstable training period exhibited in the vanilla model,we design the Convolutional Tokenizer (CT) module,which improves the accuracy of the original model on DVS-Gesture by more than 16%.Besides,in order to better incorporate the attention mechanism inside Transformer and the spatio-temporal information inherent to SNN,we adopt spatio-temporal attention (STA) instead of spatial-wise or temporal-wise attention.With our proposed method,we achieve competitive or state-of-the-art (SOTA) SNN performance on DVS-CIFAR10,DVS-Gesture,and ImageNet datasets with the least simulation time steps (i.e.low latency).Remarkably,our Spikeformer outperforms other SNNs on ImageNet by a large margin (i.e.more than 5%) and even outperforms its ANN counterpart by 3.1% and 2.2% on DVS-Gesture and ImageNet respectively,indicating that Spikeformer is a promising architecture for training large-scale SNNs and may be more suitable for SNNs compared to CNN.We believe that this work shall keep the development of SNNs in step with ANNs as much as possible.Code will be available.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑