Ternary Spike: Learning Ternary Spikes for Spiking Neural Networks

Yufei Guo, Yuanpei Chen, Xiaode Liu, Weihang Peng, Yuhan Zhang, Xuhui Huang, Zhe Ma · DOI

Abstract

The Spiking Neural Network (SNN), as one of the biologically inspired neural network infrastructures, has drawn increasing attention recently. It adopts binary spike activations to transmit information, thus the multiplications of activations and weights can be substituted by additions, which brings high energy efficiency. However, in the paper, we theoretically and experimentally prove that the binary spike activation map cannot carry enough information, thus causing information loss and resulting in accuracy decreasing. To handle the problem, we propose a ternary spike neuron to transmit information. The ternary spike neuron can also enjoy the event-driven and multiplication-free operation advantages of the binary spike neuron but will boost the information capacity. Furthermore, we also embed a trainable factor in the ternary spike neuron to learn the suitable spike amplitude, thus our SNN will adopt different spike amplitudes along layers, which can better suit the phenomenon that the membrane potential distributions are different along layers. To retain the efficiency of the vanilla ternary spike, the trainable ternary spike SNN will be converted to a standard one again via a re-parameterization technique in the inference. Extensive experiments with several popular network structures over static and dynamic datasets show that the ternary spike can consistently outperform state-of-the-art methods.

Introduction

Spiking Neural Networks (SNNs) are highly energy-efficient due to their use of discrete binary spikes (0 or 1), which allows for multiplication-free inference on specialized hardware. However, this binary nature creates a significant information bottleneck. This research identifies that the limited representation capability of binary spikes is a primary reason for the accuracy gap between SNNs and traditional Artificial Neural Networks (ANNs).

Methodology: From Binary to Ternary Spikes

To overcome the information loss inherent in binary systems, this paper introduces the Ternary Spike neuron. By allowing neurons to fire positive spikes (+1), negative spikes (-1), or remain silent (0), the information capacity is increased from 1 bit to approximately 1.58 bits per neuron per timestep.

Trainable Spike Amplitudes

The authors further enhance this model by introducing a layer-wise learnable factor, $\alpha$. Instead of fixed $\{-1, 0, 1\}$ values, the neuron outputs $\{-\alpha, 0, \alpha\}$. This "Trainable Ternary Spike" allows the network to adapt its output range to the specific distribution of membrane potentials in each layer.

To maintain hardware efficiency, a re-parameterization technique is employed during inference. The learnable $\alpha$ is mathematically "folded" into the weights of the subsequent layer. This ensures that at runtime, the hardware still processes standard ternary spikes, preserving the energy-saving addition-only operations.

Experimental Results

The proposed methods were evaluated on static datasets (CIFAR-10, CIFAR-100, ImageNet) and the neuromorphic CIFAR10-DVS dataset.

Performance on ImageNet

On the ImageNet benchmark, the Trainable Ternary Spike model achieved state-of-the-art results for SNNs. With a ResNet34 backbone and only 4 timesteps, it reached 70.74% top-1 accuracy, representing a significant improvement over previous binary SNN architectures.

Efficiency and Versatility

Beyond ImageNet, the method showed strong gains on CIFAR-100, outperforming the previous best method (TET) by roughly 7% with just 2 timesteps. Theoretical energy analysis indicates that these performance boosts come at a negligible cost, with only a 2.11% increase in hardware energy consumption compared to binary models.

Conclusion

The Ternary Spike framework effectively addresses the information bottleneck in SNNs. By increasing representation capacity and introducing learnable, re-parameterizable spike amplitudes, the proposed model achieves high accuracy across diverse datasets while maintaining the core energy-efficiency benefits of spiking architectures. The code is available at https://github.com/yfguo91/Ternary-Spike.

Summary updated

BibTeX
@inproceedings{guo2024ternary,
  author = {Yufei Guo and Yuanpei Chen and Xiaode Liu and Weihang Peng and Yuhan Zhang and Xuhui Huang and Zhe Ma},
  title = {{Ternary Spike: Learning Ternary Spikes for Spiking Neural Networks}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i11.29114},
}
Figure