Chen Xuan, Yuan Xiaopeng, Fu Gaoming, Luo Yuanyong, Yue Tao, Yan Feng, Wang Yuxuan, Pan Hongbing
The School of Electronic Science and Engineering, Nanjing University, Nanjing, China.
Front Comput Neurosci. 2021 Oct 18;15:697469. doi: 10.3389/fncom.2021.697469. eCollection 2021.
Convolutional Neural Networks (CNNs) are effective and mature in the field of classification, while Spiking Neural Networks (SNNs) are energy-saving for their sparsity of data flow and event-driven working mechanism. Previous work demonstrated that CNNs can be converted into equivalent Spiking Convolutional Neural Networks (SCNNs) without obvious accuracy loss, including different functional layers such as Convolutional (Conv), Fully Connected (FC), Avg-pooling, Max-pooling, and Batch-Normalization (BN) layers. To reduce inference-latency, existing researches mainly concentrated on the normalization of weights to increase the firing rate of neurons. There are also some approaches during training phase or altering the network architecture. However, little attention has been paid on the end of inference phase. From this new perspective, this paper presents 4 stopping criterions as low-cost plug-ins to reduce the inference-latency of SCNNs. The proposed methods are validated using MATLAB and PyTorch platforms with Spiking-AlexNet for CIFAR-10 dataset and Spiking-LeNet-5 for MNIST dataset. Simulation results reveal that, compared to the state-of-the-art methods, the proposed method can shorten the average inference-latency of Spiking-AlexNet from 892 to 267 time steps (almost 3.34 times faster) with the accuracy decline from 87.95 to 87.72%. With our methods, 4 types of Spiking-LeNet-5 only need 24-70 time steps per image with the accuracy decline not more than 0.1%, while models without our methods require 52-138 time steps, almost 1.92 to 3.21 times slower than us.
卷积神经网络(CNNs)在分类领域有效且成熟,而脉冲神经网络(SNNs)因其数据流的稀疏性和事件驱动的工作机制而节能。先前的工作表明,卷积神经网络可以转换为等效的脉冲卷积神经网络(SCNNs),且不会有明显的精度损失,包括不同的功能层,如卷积(Conv)、全连接(FC)、平均池化、最大池化和批归一化(BN)层。为了减少推理延迟,现有研究主要集中在权重归一化以提高神经元的发放率。在训练阶段也有一些方法或改变网络架构。然而,在推理阶段结束时却很少受到关注。从这个新的角度出发,本文提出了4种停止准则作为低成本插件,以减少SCNNs的推理延迟。所提出的方法在MATLAB和PyTorch平台上使用针对CIFAR-10数据集的脉冲AlexNet和针对MNIST数据集的脉冲LeNet-5进行了验证。仿真结果表明,与现有方法相比,所提出的方法可以将脉冲AlexNet的平均推理延迟从892个时间步缩短到267个时间步(速度快了近3.34倍),精度从87.95%下降到87.72%。使用我们的方法,4种类型的脉冲LeNet-5每张图像仅需24 - 70个时间步,精度下降不超过0.1%,而没有使用我们方法的模型需要52 - 138个时间步,比我们慢了近1.92到3.21倍。