Skip to main content
QUICK REVIEW

[论文解读] LaSNN: Layer-wise ANN-to-SNN Distillation for Effective and Efficient Training in Deep Spiking Neural Networks

Di Hong, Jiangrong Shen|arXiv (Cornell University)|Apr 17, 2023
Advanced Memory and Neural ComputingEngineering被引用 3
一句话总结

LaSNN 提出了一种分层知识蒸馏框架,通过基于注意力的特征对齐,将知识从预训练的人工神经网络(ANN)迁移至脉冲神经网络(SNN),实现了显著降低的推理延迟下的高精度。该方法在 CIFAR-10、CIFAR-100 和 Tiny ImageNet 上实现了具有竞争力的 top-1 准确率,同时相比直接转换的 ANN-to-SNN 模型,推理速度最高提升了 20 倍。

ABSTRACT

Spiking Neural Networks (SNNs) are biologically realistic and practically promising in low-power computation because of their event-driven mechanism. Usually, the training of SNNs suffers accuracy loss on various tasks, yielding an inferior performance compared with ANNs. A conversion scheme is proposed to obtain competitive accuracy by mapping trained ANNs' parameters to SNNs with the same structures. However, an enormous number of time steps are required for these converted SNNs, thus losing the energy-efficient benefit. Utilizing both the accuracy advantages of ANNs and the computing efficiency of SNNs, a novel SNN training framework is proposed, namely layer-wise ANN-to-SNN knowledge distillation (LaSNN). In order to achieve competitive accuracy and reduced inference latency, LaSNN transfers the learning from a well-trained ANN to a small SNN by distilling the knowledge other than converting the parameters of ANN. The information gap between heterogeneous ANN and SNN is bridged by introducing the attention scheme, the knowledge in an ANN is effectively compressed and then efficiently transferred by utilizing our layer-wise distillation paradigm. We conduct detailed experiments to demonstrate the effectiveness, efficacy, and scalability of LaSNN on three benchmark data sets (CIFAR-10, CIFAR-100, and Tiny ImageNet). We achieve competitive top-1 accuracy compared to ANNs and 20x faster inference than converted SNNs with similar performance. More importantly, LaSNN is dexterous and extensible that can be effortlessly developed for SNNs with different architectures/depths and input encoding methods, contributing to their potential development.

研究动机与目标

  • 为解决深度 SNN 与 ANNs 之间的性能差距,后者在从零开始训练时通常面临高推理延迟和低准确率的问题。
  • 克服直接 ANN-to-SNN 参数转换的局限性,后者通常需要数百个时间步,从而抵消了 SNN 的能效优势。
  • 在异构表示(模拟神经元 vs. 脉冲神经元)下,实现从 ANNs 到 SNNs 的有效知识蒸馏。
  • 开发一种可扩展的、与架构无关的框架,支持多种 SNN 深度、结构和输入编码方法。
  • 在最小化推理延迟的同时实现高分类准确率,同时保持 SNN 的能效优势。

提出的方法

  • 提出一种新颖的分层蒸馏范式,将教师网络中每一层的知识迁移至对应的学徒 SNN,而非仅蒸馏最终输出。
  • 采用注意力机制对齐 ANNs 与 SNNs 之间的特征表示,弥合因异构神经元动力学(模拟 vs. 脉冲)导致的信息鸿沟。
  • 采用基于替代梯度的训练方案,使学徒 SNN 学习模仿教师 ANN 的中间激活。
  • 基于教师网络的特征级软标签应用知识蒸馏损失,提升泛化能力与准确率。
  • 支持泊松率编码与直接输入编码,提升输入表示的灵活性并减少时间步数。
  • 通过三阶段训练(预训练、蒸馏、微调)优化学徒 SNN,提升收敛性与性能。

实验结果

研究问题

  • RQ1能否在异构网络类型(ANN 到 SNN)之间有效应用从预训练 ANN 到 SNN 的知识蒸馏?
  • RQ2与仅在末端网络进行蒸馏相比,采用基于注意力的特征对齐的分层蒸馏是否能提升 SNN 的准确率?
  • RQ3与直接的 ANN-to-SNN 转换方法相比,所提出的 LaSNN 框架是否能在大幅减少推理时间步数的同时保持高准确率?
  • RQ4输入编码方式的选择(泊松编码 vs. 直接编码)如何影响蒸馏后 SNN 的脉冲频率与推理延迟?
  • RQ5LaSNN 框架在不同 SNN 架构与深度配置下的可扩展性如何?

主要发现

  • 在 CIFAR-10 上,LaSNN 使用 ResNet12 模型实现了 90.56% 的 top-1 准确率,与最先进的方法(如混合训练 90.70% 和 ANN-to-SNN 蒸馏 90.72%)相当。
  • 采用直接输入编码时,LaSNN 将推理时间步数减少至 30–50,相比需要数百个时间步的转换 SNN 模型,推理速度提升高达 20 倍。
  • 在 CIFAR-100 上,使用 VGG7 架构的 LaSNN 比转换 SNN 和标准蒸馏 SNN 的平均每层脉冲数更少,表明其能耗更低。
  • 使用直接输入编码训练的学徒 SNN 在 VGG5 和 VGG9 上的表现优于使用泊松编码(分别为 88.55% vs. 86.68% 和 89.66% vs. 87.58%),证明了直接编码在 LaSNN 中的有效性。
  • 消融实验表明,分层蒸馏方案至关重要,其知识迁移效率显著高于仅聚焦于最终层的蒸馏方式。
  • LaSNN 具有高度可扩展性,在不同 SNN 架构(如 VGG、ResNet)和输入编码策略下均表现良好,展现出强大的可扩展性与实用性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。