Skip to main content
QUICK REVIEW

[论文解读] Converting Artificial Neural Networks to Spiking Neural Networks via Parameter Calibration

Yuhang Li, Shikuang Deng|arXiv (Cornell University)|May 6, 2022
Advanced Memory and Neural Computing被引用 13
一句话总结

该论文提出了一种逐层参数校准方法,用于将预训练的人工神经网络(ANNs)转换为脉冲神经网络(SNNs),以最小化激活不匹配,尤其在具有批量归一化(batch normalization)的网络中表现优异。通过基于海森矩阵的二阶误差传播分析,并对权重、偏置和初始膜电位进行校准,该方法在仅使用32个时间步的情况下,于ImageNet上实现了高达65%的top-1准确率,显著优于以往的直接复制粘贴式转换方法。

ABSTRACT

Spiking Neural Network (SNN), originating from the neural behavior in biology, has been recognized as one of the next-generation neural networks. Conventionally, SNNs can be obtained by converting from pre-trained Artificial Neural Networks (ANNs) by replacing the non-linear activation with spiking neurons without changing the parameters. In this work, we argue that simply copying and pasting the weights of ANN to SNN inevitably results in activation mismatch, especially for ANNs that are trained with batch normalization (BN) layers. To tackle the activation mismatch issue, we first provide a theoretical analysis by decomposing local conversion error to clipping error and flooring error, and then quantitatively measure how this error propagates throughout the layers using the second-order analysis. Motivated by the theoretical results, we propose a set of layer-wise parameter calibration algorithms, which adjusts the parameters to minimize the activation mismatch. Extensive experiments for the proposed algorithms are performed on modern architectures and large-scale tasks including ImageNet classification and MS COCO detection. We demonstrate that our method can handle the SNN conversion with batch normalization layers and effectively preserve the high accuracy even in 32 time steps. For example, our calibration algorithms can increase up to 65% accuracy when converting VGG-16 with BN layers.

研究动机与目标

  • 解决在深层网络(尤其包含批量归一化层)中进行ANN到SNN转换时存在的激活不匹配这一关键挑战。
  • 克服现有直接复制粘贴式转换方法在低时间步推理下无法保持准确率的局限性。
  • 开发一种理论基础扎实的、逐层校准框架,通过优化SNN参数以匹配ANN的激活分布。
  • 实现在大规模任务(如ImageNet分类和MS COCO目标检测)上以极低延迟实现高精度SNN推理。

提出的方法

  • 通过理论分析将局部转换误差分解为截断误差和下取整误差。
  • 利用基于海森矩阵的二阶扰动分析,建模激活误差在各层之间的传播机制。
  • 提出两种校准流程:LCP(仅调整偏置的逐层校准)和ACP(自适应校准,同时调整权重、偏置和初始膜电位)。
  • 使用少量未标注子集(例如1024张图像)对SNN参数进行校准,以最小化ANN与SNN激活之间的统计差异。
  • 采用贪婪方式逐层应用校准,优化目标为激活分布相似性,而非参数空间的接近程度。
  • 支持使用真实数据和合成(虚假)校准数据,从而在训练数据不可用时实现隐私保护型转换。

实验结果

研究问题

  • RQ1为何现有ANN到SNN的转换方法在包含批量归一化层的网络中,尤其在低时间步下,无法保持准确率?
  • RQ2激活不匹配在深层网络中如何传播?转换过程中的主要误差来源是什么?
  • RQ3与启发式参数复制相比,基于理论基础的二阶误差分析能否显著提升SNN转换的准确率?
  • RQ4在计算开销极低的前提下,参数校准(超越权重复制)能在多大程度上恢复SNN的性能?
  • RQ5使用合成数据进行校准能否达到与真实数据相当的性能,从而实现隐私保护型SNN转换?

主要发现

  • 在仅使用32个时间步的情况下,该校准方法将带有批量归一化层的VGG-16转换为SNN后,top-1准确率最高提升65%。
  • LCP方法在使用256张校准图像时,于ResNet-34上达到67.5%的准确率,展现出极强的数据样本效率。
  • ACP对校准数据集大小具有更强鲁棒性,当校准图像数从128增至1024时,准确率仅提升0.8%。
  • 在使用128个时间步时,使用合成数据进行校准仅导致0.74%的准确率下降,与真实数据相比性能接近。
  • 经校准的SNN能耗仅为原始ANN的69.36%,其最大发放率仅为0.08,最小为0.025,表明具有高度稀疏性和能效优势。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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