Table of Contents
Fetching ...

Theory and Tools for the Conversion of Analog to Spiking Convolutional Neural Networks

Bodo Rueckauer, Iulia-Alexandra Lungu, Yuhuang Hu, Michael Pfeiffer

TL;DR

This work develops a theory linking ANN ReLU activations to SNN firing rates and identifies how reset schemes influence conversion fidelity. It introduces practical methods to extend ANN-to-SNN conversion to biases, batch normalization, max-pooling, and softmax, along with robust normalization and analog-first-layer input strategies. Empirically, the authors achieve near-lossless CIFAR-10 conversions (up to ~87.6% accuracy) and state-of-the-art-like SNN results on MNIST, significantly narrowing the gap between ANNs and SNNs. The approach enables broader adoption of SNNs on conventional CNN architectures and paves the way for scalable, energy-efficient neuromorphic deployment.

Abstract

Deep convolutional neural networks (CNNs) have shown great potential for numerous real-world machine learning applications, but performing inference in large CNNs in real-time remains a challenge. We have previously demonstrated that traditional CNNs can be converted into deep spiking neural networks (SNNs), which exhibit similar accuracy while reducing both latency and computational load as a consequence of their data-driven, event-based style of computing. Here we provide a novel theory that explains why this conversion is successful, and derive from it several new tools to convert a larger and more powerful class of deep networks into SNNs. We identify the main sources of approximation errors in previous conversion methods, and propose simple mechanisms to fix these issues. Furthermore, we develop spiking implementations of common CNN operations such as max-pooling, softmax, and batch-normalization, which allow almost loss-less conversion of arbitrary CNN architectures into the spiking domain. Empirical evaluation of different network architectures on the MNIST and CIFAR10 benchmarks leads to the best SNN results reported to date.

Theory and Tools for the Conversion of Analog to Spiking Convolutional Neural Networks

TL;DR

This work develops a theory linking ANN ReLU activations to SNN firing rates and identifies how reset schemes influence conversion fidelity. It introduces practical methods to extend ANN-to-SNN conversion to biases, batch normalization, max-pooling, and softmax, along with robust normalization and analog-first-layer input strategies. Empirically, the authors achieve near-lossless CIFAR-10 conversions (up to ~87.6% accuracy) and state-of-the-art-like SNN results on MNIST, significantly narrowing the gap between ANNs and SNNs. The approach enables broader adoption of SNNs on conventional CNN architectures and paves the way for scalable, energy-efficient neuromorphic deployment.

Abstract

Deep convolutional neural networks (CNNs) have shown great potential for numerous real-world machine learning applications, but performing inference in large CNNs in real-time remains a challenge. We have previously demonstrated that traditional CNNs can be converted into deep spiking neural networks (SNNs), which exhibit similar accuracy while reducing both latency and computational load as a consequence of their data-driven, event-based style of computing. Here we provide a novel theory that explains why this conversion is successful, and derive from it several new tools to convert a larger and more powerful class of deep networks into SNNs. We identify the main sources of approximation errors in previous conversion methods, and propose simple mechanisms to fix these issues. Furthermore, we develop spiking implementations of common CNN operations such as max-pooling, softmax, and batch-normalization, which allow almost loss-less conversion of arbitrary CNN architectures into the spiking domain. Empirical evaluation of different network architectures on the MNIST and CIFAR10 benchmarks leads to the best SNN results reported to date.

Paper Structure

This paper contains 18 sections, 7 equations, 2 figures.

Figures (2)

  • Figure 1: (a) Distribution of all non-zero activations in the first convolution layer of a CNN, for 16666 CIFAR10 samples, in log-scale. The dashed line in both plots indicates the 99.9th percentile of all ReLU activations across the dataset, corresponding to a normalization scale $\lambda=6.83$. This is more than three times less than the overall maximum of $\lambda_{max}=23.16$. (b) Distribution of maximum ReLU activations for the same 16666 CIFAR10 samples. For most samples their maximum activation is far from $\lambda_{max}$.
  • Figure 2: (a) Influence of novel mechanisms for ANN-to-SNN conversion on the SNN accuracy for CIFAR10. The best ANN from Section \ref{['sec:annmethods']} (87.86%) is converted into an SNN. Default mode (blue bar): SNN with Poisson inputs, reset-to-zero, and no weight normalization. Red bar: applying weight normalization as in Diehl2015Fast. For the next three bars we apply novel techniques as presented in Section \ref{['sec:methods']}. Shown is the accuracy after 300 time steps. (b) Accuracy-latency-tradeoff: SNNs give approximate results even when inputs are incomplete, and improve their accuracy with time. Tested on 400 CIFAR10 samples we find that the accuracy improves rapidly, and approaches the ANN level. The robust weight normalization factor can be tuned to achieve an ideal tradeoff between latency and final accuracy.