Energy-efficient Knowledge Distillation for Spiking Neural Networks

Dongjin Lee, Seongsik Park, Jongwan Kim, Wuhyeong Doh, Sungroh Yoon

TL;DR

This paper tackles the energy efficiency challenge in Spiking Neural Networks (SNNs) by proposing a novel knowledge distillation method. By introducing heterogeneous temperature parameters, they achieve both improved accuracy and a significant reduction in spike count, a key indicator of energy consumption, compared to conventional methods.

What Problem Does This Paper Address?

Spiking Neural Networks (SNNs) are gaining traction as a more energy-efficient alternative to traditional Artificial Neural Networks (ANNs) due to their event-driven computation. However, deploying SNNs on resource-constrained neuromorphic devices requires efficient models. While techniques like quantization, pruning, and knowledge distillation have been applied to SNNs, existing knowledge distillation methods primarily focus on improving accuracy. Crucially, they often lead to an undesirable increase in the number of spikes, which directly contradicts the energy efficiency goal of SNNs. This paper aims to bridge this gap by analyzing the energy efficiency implications of knowledge distillation and proposing a solution that optimizes both accuracy and spike count.

Methods

The core of this paper lies in its novel approach to knowledge distillation for SNNs.

  • Analysis of Conventional Knowledge Distillation: The authors first thoroughly analyze the performance of standard knowledge distillation techniques (as proposed by Hinton et al. [11]) on SNNs. They specifically investigate how hyperparameters like temperature ($\tau$) and the weighting factor ($\alpha$) affect both accuracy and the number of spikes.
  • Heterogeneous Temperature Knowledge Distillation: Based on their analysis, they propose a new knowledge distillation loss function. The key innovation is the introduction of heterogeneous temperatures ($T_s$ for the student and $T_t$ for the teacher). This allows for independent control over the softening of the teacher's and student's output logits, enabling a more nuanced distillation process.
  • Surrogate Gradient: For training the SNNs, they employ a surrogate gradient method to approximate the non-differentiable spiking function, allowing for backpropagation.

Datasets

The proposed method was evaluated on two standard object classification datasets:

  • MNIST: A dataset of handwritten digits.
  • Fashion-MNIST: A dataset of clothing articles.

Key Insights and Ideas

  • The Spike Count Dilemma: Conventional knowledge distillation, while boosting accuracy, inadvertently increases the number of spikes in SNNs. This is a critical trade-off that needs to be addressed for practical SNN deployment.
  • Temperature as a Lever: The temperature parameter in knowledge distillation plays a dual role: it softens output logits to improve accuracy but also increases spike count. The paper demonstrates that by decoupling the temperatures for the teacher and student, this trade-off can be managed.
  • Heterogeneous Temperatures for Efficiency: Using a lower temperature for the student ($T_s$) and a higher temperature for the teacher ($T_t$) allows the student to learn from the teacher's rich knowledge while producing more "compact" and less spiky outputs, leading to improved energy efficiency.
  • Weight vs. Output Distributions: The analysis revealed that while weight distributions of distilled SNNs are similar to baseline models, the output logits of distilled models are more extreme. This, combined with the nature of spike generation, explains the increased spike count.

Key Results

  • Improved Accuracy and Reduced Spikes: The proposed heterogeneous temperature knowledge distillation method achieved both improved accuracy and a significant reduction in the number of spikes.
  • MNIST Dataset: The student SNN achieved up to 0.09% higher accuracy and produced 65% fewer spikes compared to a student SNN trained with conventional knowledge distillation.
  • Fashion-MNIST Dataset: The student SNN achieved 0.16% higher accuracy and produced 52% fewer spikes compared to a student SNN trained with conventional knowledge distillation.
  • Outperforming Other Methods: The proposed method also showed competitive performance compared to other SNN training methods, achieving high accuracy with a reduced number of spikes.

Limitations and Future Work

  • Extreme Temperature Values: The paper notes that using extreme values for $T_s$ and $T_t$ can lead to a degradation in accuracy, even though spike count might further decrease. This suggests a need for careful selection of temperature parameters to balance accuracy and efficiency.
  • Theoretical Analysis: The authors acknowledge that their analysis is primarily empirical and that a deeper theoretical understanding of the method's principles would be beneficial.
  • Future Work: The paper implicitly suggests exploring more sophisticated methods for selecting optimal heterogeneous temperature parameters and investigating the theoretical underpinnings of their approach.

Summary updated

Abstract

Spiking neural networks (SNNs) have been gaining interest as energy-efficient alternatives of conventional artificial neural networks (ANNs) due to their event-driven computation. Considering the future deployment of SNN models to constrained neuromorphic devices, many studies have applied techniques originally used for ANN model compression, such as network quantization, pruning, and knowledge distillation, to SNNs. Among them, existing works on knowledge distillation reported accuracy improvements of student SNN model. However, analysis on energy efficiency, which is also an important feature of SNN, was absent. In this paper, we thoroughly analyze the performance of the distilled SNN model in terms of accuracy and energy efficiency. In the process, we observe a substantial increase in the number of spikes, leading to energy inefficiency, when using the conventional knowledge distillation methods. Based on this analysis, to achieve energy efficiency, we propose a novel knowledge distillation method with heterogeneous temperature parameters. We evaluate our method on two different datasets and show that the resulting SNN student satisfies both accuracy improvement and reduction of the number of spikes. On MNIST dataset, our proposed student SNN achieves up to 0.09% higher accuracy and produces 65% less spikes compared to the student SNN trained with conventional knowledge distillation method. We also compare the results with other SNN compression techniques and training methods.
BibTeX
@misc{lee2021energy,
  author = {Dongjin Lee and Seongsik Park and Jongwan Kim and Wuhyeong Doh and Sungroh Yoon},
  title = {{Energy-efficient Knowledge Distillation for Spiking Neural Networks}},
  year = {2021},
  eprint = {2106.07172},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.07172},
}
Figure