Skip to main content
QUICK REVIEW

[Paper 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 ComputingEngineering3 citations
TL;DR

LaSNN proposes a layer-wise knowledge distillation framework that transfers knowledge from a pre-trained artificial neural network (ANN) to a spiking neural network (SNN) using attention-based feature alignment, enabling high accuracy with significantly reduced inference latency. It achieves competitive top-1 accuracy on CIFAR-10, CIFAR-100, and Tiny ImageNet while accelerating inference by up to 20× compared to ANN-to-SNN converted models.

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.

Motivation & Objective

  • To address the performance gap between deep SNNs and ANNs, which often suffer from high inference latency and low accuracy when trained from scratch.
  • To overcome the limitations of direct ANN-to-SNN parameter conversion, which requires hundreds of time steps and negates SNNs' energy efficiency.
  • To enable effective knowledge distillation from ANNs to SNNs despite their heterogeneous representations (analog vs. spiking).
  • To develop a scalable, architecture-agnostic framework that supports various SNN depths, structures, and input encoding methods.
  • To achieve high classification accuracy with minimal inference latency, preserving the energy efficiency of SNNs.

Proposed method

  • Introduces a novel layer-wise distillation paradigm that transfers knowledge from each layer of a teacher ANN to the corresponding student SNN, rather than distilling only the final output.
  • Employs an attention mechanism to align feature representations between ANNs and SNNs, bridging the information gap caused by heterogeneous neuron dynamics (analog vs. spiking).
  • Uses a surrogate gradient-based training scheme with a student SNN that learns to mimic the intermediate activations of the teacher ANN.
  • Applies knowledge distillation loss based on feature-level soft labels from the teacher network, improving generalization and accuracy.
  • Supports both Poisson rate encoding and direct input encoding, enabling flexibility in input representation and reduced time steps.
  • Optimizes the student SNN through three-stage training: pre-training, distillation, and fine-tuning, enhancing convergence and performance.

Experimental results

Research questions

  • RQ1Can knowledge distillation from a pre-trained ANN to an SNN be effectively applied across heterogeneous network types (ANN to SNN)?
  • RQ2Does layer-wise distillation with attention-based feature alignment improve SNN accuracy compared to end-of-network distillation?
  • RQ3Can the proposed LaSNN framework maintain high accuracy while drastically reducing inference time steps compared to ANN-to-SNN conversion methods?
  • RQ4How does the choice of input encoding (Poisson vs. direct) affect spike rate and inference latency in the distilled SNNs?
  • RQ5To what extent is the LaSNN framework scalable across different SNN architectures and depth configurations?

Key findings

  • LaSNN achieves top-1 accuracy of 90.56% on CIFAR-10 with ResNet12, comparable to state-of-the-art methods like hybrid training (90.70%) and ANN-to-SNN distillation (90.72%).
  • With direct input encoding, LaSNN reduces inference time steps to 30–50, achieving 20× faster inference than converted SNNs that require hundreds of time steps.
  • On CIFAR-100, LaSNN with VGG7 architecture achieves fewer average spikes per layer than both converted SNNs and standard distillation SNNs, indicating lower energy consumption.
  • Student SNNs trained with direct input encoding outperform those with Poisson encoding on VGG5 and VGG9 (88.55% vs. 86.68% and 89.66% vs. 87.58% respectively), demonstrating the effectiveness of direct encoding in LaSNN.
  • Ablation studies confirm that the layer-wise distillation scheme is critical, as it enables more effective knowledge transfer than distillation focused only on the final layer.
  • LaSNN is highly extensible and performs well across different SNN architectures (VGG, ResNet) and input encoding strategies, showing strong scalability and practicality.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.