Table of Contents
Fetching ...

One-Spike SNN: Single-Spike Phase Coding with Base Manipulation for ANN-to-SNN Conversion Loss Minimization

Sangwoo Hwang, Jaeha Kung

TL;DR

A single-spike phase coding as an encoding scheme that minimizes the number of spikes to transfer data between SNN layers is proposed and the energy efficiency of the SNN improves by 4.6 compared to the ANN baseline.

Abstract

As spiking neural networks (SNNs) are event-driven, energy efficiency is higher than conventional artificial neural networks (ANNs). Since SNN delivers data through discrete spikes, it is difficult to use gradient methods for training, limiting its accuracy. To keep the accuracy of SNNs similar to ANN counterparts, pre-trained ANNs are converted to SNNs (ANN-to-SNN conversion). During the conversion, encoding activations of ANNs to a set of spikes in SNNs is crucial for minimizing the conversion loss. In this work, we propose a single-spike phase coding as an encoding scheme that minimizes the number of spikes to transfer data between SNN layers. To minimize the encoding error due to single-spike approximation in phase coding, threshold shift and base manipulation are proposed. Without any additional retraining or architectural constraints on ANNs, the proposed conversion method does not lose inference accuracy (0.58% on average) verified on three convolutional neural networks (CNNs) with CIFAR and ImageNet datasets.In addition, graph convolutional networks (GCNs) are converted to SNNs successfully with an average accuracy loss of 0.90%.Most importantly, the energy efficiency of our SNN improves by 4.6~17.3 X compared to the ANN baseline.

One-Spike SNN: Single-Spike Phase Coding with Base Manipulation for ANN-to-SNN Conversion Loss Minimization

TL;DR

A single-spike phase coding as an encoding scheme that minimizes the number of spikes to transfer data between SNN layers is proposed and the energy efficiency of the SNN improves by 4.6 compared to the ANN baseline.

Abstract

As spiking neural networks (SNNs) are event-driven, energy efficiency is higher than conventional artificial neural networks (ANNs). Since SNN delivers data through discrete spikes, it is difficult to use gradient methods for training, limiting its accuracy. To keep the accuracy of SNNs similar to ANN counterparts, pre-trained ANNs are converted to SNNs (ANN-to-SNN conversion). During the conversion, encoding activations of ANNs to a set of spikes in SNNs is crucial for minimizing the conversion loss. In this work, we propose a single-spike phase coding as an encoding scheme that minimizes the number of spikes to transfer data between SNN layers. To minimize the encoding error due to single-spike approximation in phase coding, threshold shift and base manipulation are proposed. Without any additional retraining or architectural constraints on ANNs, the proposed conversion method does not lose inference accuracy (0.58% on average) verified on three convolutional neural networks (CNNs) with CIFAR and ImageNet datasets.In addition, graph convolutional networks (GCNs) are converted to SNNs successfully with an average accuracy loss of 0.90%.Most importantly, the energy efficiency of our SNN improves by 4.6~17.3 X compared to the ANN baseline.
Paper Structure (27 sections, 6 equations, 10 figures, 8 tables, 1 algorithm)

This paper contains 27 sections, 6 equations, 10 figures, 8 tables, 1 algorithm.

Figures (10)

  • Figure 1: Various activation encoding schemes: rate coding, temporal coding, and phase (or binary) coding. In this example, base 2 is used for illustrating the phase coding.
  • Figure 2: Operation of a neuron model in the proposed one-spike SNN. A single spike phase coding is used at hidden layers with base ($Q$) manipulation. Each spike at $t$ has a phase $Q^{-t}$ where $Q=2$ for binary coding.
  • Figure 3: Activation values at each channel at the first convolution layer of VGG-16 for ImageNet classification. (a) Original activation values of the ANN (i.e., VGG-16). Encoded values of spikes in the converted SNN (b) with layer normalization, and (c) with channel-wise normalization.
  • Figure 4: Conversion errors when different single-spike phase coding schemes with timestep $T=4$ are used: (a) naiv̈e single-spike binary coding ($Q=2$), (b) single-spike binary coding with round-off approximation, and (c) single-spike phase coding ($Q<2$; base manipulation) with round-off approximation.
  • Figure 5: An example of manipulating base $Q$ in our single-spike phase coding. Here, external input is binary coded ($Q=2$) while the remaining layers ($L=0,1,...$) have the base $Q$ less than 2. This is done by scaling the threshold $V_\theta$ of layer $L=0$ by ${2}/{Q}$.
  • ...and 5 more figures