Efficient Spiking Neural Networks with Radix Encoding

Zhehui Wang,Xiaozhe Gu,Rick Goh,Joey Tianyi Zhou,Tao Luo
DOI: https://doi.org/10.48550/arXiv.2105.06943
2023-11-02
Abstract:Spiking neural networks (SNNs) have advantages in latency and energy efficiency over traditional artificial neural networks (ANNs) due to its event-driven computation mechanism and replacement of energy-consuming weight multiplications with additions. However, in order to reach accuracy of its ANN counterpart, it usually requires long spike trains to ensure the accuracy. Traditionally, a spike train needs around one thousand time steps to approach similar accuracy as its ANN counterpart. This offsets the computation efficiency brought by SNNs because longer spike trains mean a larger number of operations and longer latency. In this paper, we propose a radix encoded SNN with ultra-short spike trains. In the new model, the spike train takes less than ten time steps. Experiments show that our method demonstrates 25X speedup and 1.1% increment on accuracy, compared with the state-of-the-art work on VGG-16 network architecture and CIFAR-10 dataset.
Neural and Evolutionary Computing
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to reduce the length of spike trains in spiking neural networks (SNNs) while maintaining high precision, in order to improve computational efficiency and reduce latency. Traditional SNN models require long spike trains to ensure high - precision performance, which leads to low energy efficiency and long inference time. This paper proposes a radix - encoded SNN. By assigning different weights to spikes at different time steps, it can achieve even higher precision than traditional methods with extremely short spike trains. Specifically, the main contributions of the paper are as follows: 1. **Proposing a radix - encoded SNN**: Using the radix - encoding method, it can achieve even higher precision than traditional methods within less than six time steps. In particular, radix - encoding can significantly shorten the length of spike trains, thereby greatly improving computational efficiency and reducing latency. 2. **Developing a method suitable for ANN - to - SNN conversion**: Incorporating the radix - encoding technique into existing ANN - to - SNN conversion methods enables more efficient training of radix - encoded SNN models on mature platforms and hardware. 3. **Experimental verification**: The experimental results using the VGG - 16 network on the CIFAR - 10 dataset show that, compared with the existing state - of - the - art methods, the radix - encoded SNN improves latency by 25 times and precision by 1.7%. ### Working principle of radix - encoding The core idea of radix - encoding is to represent signal strength by assigning different weights to spikes at different time steps. Specifically, if binary radix - encoding (base - 2 radix encoding) is used, then the spike at each time step can represent different signal strengths. For example, the spike at the first time step represents a signal strength of \( \frac{1}{8} \), while the spike at the \( n \) - th time step represents a signal strength of \( \frac{2^n}{8} \). ### Mathematical proof The paper proves the effectiveness of radix - encoded SNN in image classification tasks through mathematical derivation. Specifically, assuming the input spike train \( s(t) \) and weights \( w_n \), the membrane potential \( v_m(t) \) can be represented by the following formula: \[ v_m(t) = \sum_{n = 0}^{N - 1} \sum_{\tau = 0}^{t} 2^{-\tau - 1} i_n(t - \tau) \cdot w_{nm} + 2^{-t - 1} b_m - \sum_{\tau = 0}^{t} 2^{-\tau - 1} o_m(t - \tau) \] where: - \( i_n(t) \) represents the spike of the \( n \) - th input neuron at time step \( t \). - \( w_{nm} \) represents the weight between the \( n \) - th input neuron and the \( m \) - th output neuron. - \( b_m \) represents the bias of the \( m \) - th output neuron. - \( o_m(t) \) represents the output spike of the \( m \) - th output neuron at time step \( t \). Through the above formula, the paper proves that the radix - encoded SNN is equivalent to the multiplication operation in ANN during the calculation process, thereby significantly reducing the calculation time and resource consumption while maintaining high precision. ### Experimental results The experimental results show that when the radix - encoded SNN is tested on the VGG - 16 network using the CIFAR - 10 dataset, compared with the existing state - of - the - art methods, the latency is reduced by 25 times and the precision is increased by 1.7%. These results indicate that the radix - encoded SNN has significant advantages in practical applications.