Skip to main content
QUICK REVIEW

[Paper Review] Optimal ANN-SNN Conversion for Fast and Accurate Inference in Deep Spiking Neural Networks

Jianhao Ding, Zhaofei Yu|arXiv (Cornell University)|May 25, 2021
Advanced Memory and Neural ComputingEngineering25 references13 citations
TL;DR

This paper proposes a theoretically grounded method for optimal ANN-SNN conversion using Rate Norm Layers and an optimal fit curve to achieve near-lossless accuracy and up to 8.6× faster inference with 0.265× energy consumption compared to baseline methods. The approach redefines activation scaling during training to minimize conversion error and optimize inference speed.

ABSTRACT

Spiking Neural Networks (SNNs), as bio-inspired energy-efficient neural networks, have attracted great attentions from researchers and industry. The most efficient way to train deep SNNs is through ANN-SNN conversion. However, the conversion usually suffers from accuracy loss and long inference time, which impede the practical application of SNN. In this paper, we theoretically analyze ANN-SNN conversion and derive sufficient conditions of the optimal conversion. To better correlate ANN-SNN and get greater accuracy, we propose Rate Norm Layer to replace the ReLU activation function in source ANN training, enabling direct conversion from a trained ANN to an SNN. Moreover, we propose an optimal fit curve to quantify the fit between the activation value of source ANN and the actual firing rate of target SNN. We show that the inference time can be reduced by optimizing the upper bound of the fit curve in the revised ANN to achieve fast inference. Our theory can explain the existing work on fast reasoning and get better results. The experimental results show that the proposed method achieves near loss less conversion with VGG-16, PreActResNet-18, and deeper structures. Moreover, it can reach 8.6x faster reasoning performance under 0.265x energy consumption of the typical method. The code is available at https://github.com/DingJianhao/OptSNNConvertion-RNL-RIL.

Motivation & Objective

  • To address accuracy degradation and long inference times in ANN-SNN conversion, which hinder practical deployment of spiking neural networks.
  • To derive sufficient theoretical conditions for optimal ANN-SNN conversion, enabling precise mapping from artificial to spiking networks.
  • To improve conversion fidelity by replacing ReLU with a trainable Rate Norm Layer that dynamically scales activations based on running maximums.
  • To optimize inference speed by minimizing the upper bound of a fit curve between ANN activation and SNN firing rates.
  • To achieve state-of-the-art performance on deep networks like VGG-16 and PreActResNet-18 with minimal accuracy loss and energy overhead.

Proposed method

  • Introduces the Rate Norm Layer, which replaces ReLU and scales activations using a learnable parameter $ p_k $ and running maximum $ \text{r\_max}_k $, enabling better alignment between ANN and SNN dynamics.
  • Proposes an optimal fit curve defined by $ K_l < \frac{2\Omega_l}{t} $, where $ \Omega_l = \frac{\|\hat{\bm{r}}_l\|_1}{\|\hat{\bm{r}}_l\|_2^2} $, to quantify the error between simulated and actual SNN firing rates.
  • Employs a two-stage training process: first, train the source ANN with Rate Norm Layers to preserve accuracy; second, fine-tune the scaling parameters $ p_k $ to minimize the fit error between activation and firing rate.
  • Uses a shared $ p_k $ across layers during Stage 2 to improve training stability and applies $ \text{sigmoid}(p'_k) $ to constrain $ p_k \in [0,1] $.
  • Converts the final ANN to an SNN by transferring weights, biases, and thresholds directly, where $ v_{\text{th},k} = \theta_k = p_k \cdot \text{r\_max}_k $.
  • Employs a novel loss function $ \mathscr{T}(\hat{\bm{r}}_L^*, \hat{\bm{r}}_L') $ in Stage 2 to minimize the $ L^2 $ error between the original and transformed activation trajectories.

Experimental results

Research questions

  • RQ1What theoretical conditions ensure optimal conversion from ANN to SNN with minimal accuracy loss?
  • RQ2How can the relationship between ANN activation and SNN firing rate be quantitatively modeled to improve conversion fidelity?
  • RQ3Can a trainable normalization layer replace ReLU to enable better conversion without retraining the entire SNN?
  • RQ4To what extent can inference speed be improved by optimizing the upper bound of the fit curve between ANN and SNN outputs?
  • RQ5Does the proposed method achieve near-lossless conversion on deep architectures like VGG-16 and PreActResNet-18?

Key findings

  • The proposed method achieves near-lossless conversion on VGG-16 and PreActResNet-18, with minimal accuracy drop compared to the original ANN.
  • The method reduces inference time by up to 8.6× compared to the typical conversion method, while consuming only 0.265× the energy.
  • Theoretical analysis confirms that the fit error between simulated and actual firing rates is bounded by $ \frac{2\Omega_l}{t} $, providing a principled way to control conversion quality.
  • The use of Rate Norm Layers with learnable scaling parameters $ p_k $ significantly improves conversion accuracy over fixed normalization methods like Max Norm or Robust Norm.
  • The two-stage training process—accuracy-focused followed by speed-optimized fine-tuning—enables both high accuracy and fast inference in a single framework.
  • The method outperforms existing approaches in both accuracy and inference speed, especially on deeper networks and complex datasets.

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.