Skip to main content
QUICK REVIEW

[论文解读] BS4NN: Binarized Spiking Neural Networks with Temporal Coding and Learning

Saeed Reza Kheradpisheh, Maryam Mirsadeghi|arXiv (Cornell University)|Jul 8, 2020
Advanced Memory and Neural Computing参考文献 57被引用 4
一句话总结

BS4NN 提出了一种用于二值化脉冲神经网络(SNNs)的新颖训练算法,其突触权重为二值(+1 或 -1),并基于首次放电时间(time-to-first-spike)进行时间编码。该方法在反向传播中使用实值代理权重,并通过直通估计器(STE)更新这些权重,而前向传播则使用二值权重。该方法在 MNIST 和 Fashion-MNIST 上分别实现了 97.0% 和 87.3% 的准确率,与全精度 SNN 相比仅分别有 0.4% 和 0.7% 的准确率下降。

ABSTRACT

We recently proposed the S4NN algorithm, essentially an adaptation of backpropagation to multilayer spiking neural networks that use simple non-leaky integrate-and-fire neurons and a form of temporal coding known as time-to-first-spike coding. With this coding scheme, neurons fire at most once per stimulus, but the firing order carries information. Here, we introduce BS4NN, a modification of S4NN in which the synaptic weights are constrained to be binary (+1 or -1), in order to decrease memory (ideally, one bit per synapse) and computation footprints. This was done using two sets of weights: firstly, real-valued weights, updated by gradient descent, and used in the backward pass of backpropagation, and secondly, their signs, used in the forward pass. Similar strategies have been used to train (non-spiking) binarized neural networks. The main difference is that BS4NN operates in the time domain: spikes are propagated sequentially, and different neurons may reach their threshold at different times, which increases computational power. We validated BS4NN on two popular benchmarks, MNIST and Fashion-MNIST, and obtained reasonable accuracies for this sort of network (97.0% and 87.3% respectively) with a negligible accuracy drop with respect to real-valued weights (0.4% and 0.7%, respectively). We also demonstrated that BS4NN outperforms a simple BNN with the same architectures on those two datasets (by 0.2% and 0.9% respectively), presumably because it leverages the temporal dimension. The source codes of the proposed BS4NN are publicly available at https://github.com/SRKH/BS4NN.

研究动机与目标

  • 开发一种适用于具有二值突触权重的多层脉冲神经网络的直接监督学习算法。
  • 通过将权重限制为 ±1 来降低 SNN 的内存和计算成本。
  • 利用时间编码(首次放电时间)来提升计算效率和能效。
  • 实现适合神经形态计算和边缘人工智能的硬件友好型 SNN。
  • 证明二值化 SNN 可在与全精度模型相比仅产生极小准确率下降的情况下实现具有竞争力的性能。

提出的方法

  • 使用非漏电积分-发放(IF)神经元,每个刺激下最多仅发放一次,通过首次放电时间编码方式表示脉冲。
  • 采用两组权重:用于反向传播的实值代理权重,以及用于前向传播的二值权重(即代理权重的符号)。
  • 在训练过程中,通过直通估计器(STE)反向传播梯度,以处理二值权重的非可微性。
  • 实现瞬时突触,使突触在脉冲到达时立即引起膜电位变化,从而降低计算和能耗成本。
  • 采用一种时间学习规则,通过最小化预测输出与目标输出之间的放电时间差异来训练网络。
  • 采用代理梯度方法处理脉冲神经元中非可微的阈值函数。

实验结果

研究问题

  • RQ1二值化 SNN 在权重为二值(±1)的情况下,是否能在标准基准上实现高性能,同时保持低内存和计算成本?
  • RQ2在二值化 SNN 中,基于首次放电时间的时间编码与速率编码相比,在准确率和能效方面表现如何?
  • RQ3当与时间反向传播结合时,直通估计器(STE)是否能有效训练具有二值权重的 SNN?
  • RQ4使用非漏电 IF 神经元和瞬时突触是否能提升二值化 SNN 的能效和硬件兼容性?
  • RQ5与现有 BNN 及转换得到的 BSNN 相比,BS4NN 在准确率和训练效率方面表现如何?

主要发现

  • BS4NN 在 MNIST 上达到 97.0% 的准确率,在 Fashion-MNIST 上达到 87.3%,与全精度 SNN 相比仅分别有 0.4% 和 0.7% 的准确率下降。
  • 与相同架构的标准 BNN 相比,MNIST 上高出 0.2%,Fashion-MNIST 上高出 0.9%,表明时间编码具有优势。
  • 使用二值权重将内存占用降低至每突触 1 位,相比 32 位浮点权重实现 32 倍压缩。
  • BS4NN 的训练时间不随仿真时间步长变化而变化,而代理梯度方法则随时间步长增加而增长。
  • 由于稀疏、异步的脉冲传输以及极低的状态需求,该网络在神经形态硬件上表现出极高的效率。
  • 源代码已公开发布于 https://github.com/SRKH/BS4NN,以支持可复现性和进一步研究。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。