Skip to main content
QUICK REVIEW

[Paper Review] BS4NN: Binarized Spiking Neural Networks with Temporal Coding and Learning

Saeed Reza Kheradpisheh, Maryam Mirsadeghi|arXiv (Cornell University)|Jul 8, 2020
Advanced Memory and Neural ComputingEngineering57 references4 citations
TL;DR

BS4NN proposes a novel training algorithm for binarized spiking neural networks (SNNs) with binary synaptic weights (+1 or -1) and temporal coding based on time-to-first-spike. It uses real-valued proxy weights for backpropagation and applies the Straight-Through Estimator (STE) to update them, while binary weights are used in the forward pass. The method achieves 97.0% and 87.3% accuracy on MNIST and Fashion-MNIST, with only 0.4% and 0.7% accuracy drop compared to full-precision SNNs.

ABSTRACT

We recently proposed the S4NN algorithm, essentially an adaptation of backpropagation to multilayer spiking neural networks that use simple non-leaky integrate-and-fire neurons and a form of temporal coding known as time-to-first-spike coding. With this coding scheme, neurons fire at most once per stimulus, but the firing order carries information. Here, we introduce BS4NN, a modification of S4NN in which the synaptic weights are constrained to be binary (+1 or -1), in order to decrease memory (ideally, one bit per synapse) and computation footprints. This was done using two sets of weights: firstly, real-valued weights, updated by gradient descent, and used in the backward pass of backpropagation, and secondly, their signs, used in the forward pass. Similar strategies have been used to train (non-spiking) binarized neural networks. The main difference is that BS4NN operates in the time domain: spikes are propagated sequentially, and different neurons may reach their threshold at different times, which increases computational power. We validated BS4NN on two popular benchmarks, MNIST and Fashion-MNIST, and obtained reasonable accuracies for this sort of network (97.0% and 87.3% respectively) with a negligible accuracy drop with respect to real-valued weights (0.4% and 0.7%, respectively). We also demonstrated that BS4NN outperforms a simple BNN with the same architectures on those two datasets (by 0.2% and 0.9% respectively), presumably because it leverages the temporal dimension. The source codes of the proposed BS4NN are publicly available at https://github.com/SRKH/BS4NN.

Motivation & Objective

  • To develop a direct supervised learning algorithm for multi-layer spiking neural networks with binary synaptic weights.
  • To reduce memory and computational costs in SNNs by constraining weights to ±1.
  • To leverage temporal coding (time-to-first-spike) to enhance computational efficiency and energy savings.
  • To enable hardware-friendly SNNs suitable for neuromorphic computing and edge AI.
  • To demonstrate that binarized SNNs can achieve competitive performance with minimal accuracy degradation compared to full-precision models.

Proposed method

  • Uses non-leaky integrate-and-fire (IF) neurons that fire at most once per stimulus, with spikes encoded via time-to-first-spike coding.
  • Employs two sets of weights: real-valued proxy weights for backpropagation and binary weights (sign of proxy weights) for the forward pass.
  • Applies the Straight-Through Estimator (STE) to backpropagate gradients through the binary weights during training.
  • Implements instantaneous synapses that cause immediate potential changes upon spike arrival, reducing computational and energy costs.
  • Uses a temporal learning rule that minimizes firing time differences between predicted and target outputs to train the network.
  • Applies a surrogate gradient approach to handle the non-differentiable thresholding function in spiking neurons.

Experimental results

Research questions

  • RQ1Can binarized SNNs with binary weights achieve high performance on standard benchmarks while maintaining low memory and computational costs?
  • RQ2How does temporal coding based on time-to-first-spike compare to rate coding in terms of accuracy and energy efficiency in binarized SNNs?
  • RQ3Can the Straight-Through Estimator (STE) effectively train SNNs with binary weights when combined with temporal backpropagation?
  • RQ4Does the use of non-leaky IF neurons and instantaneous synapses improve energy efficiency and hardware compatibility in binarized SNNs?
  • RQ5How does BS4NN compare to existing BNNs and converted BSNNs in terms of accuracy and training efficiency?

Key findings

  • BS4NN achieves 97.0% accuracy on MNIST and 87.3% on Fashion-MNIST, with only 0.4% and 0.7% accuracy drop compared to full-precision SNNs.
  • The method outperforms a standard BNN with the same architecture by 0.2% on MNIST and 0.9% on Fashion-MNIST, indicating the advantage of temporal coding.
  • The use of binary weights reduces memory footprint to one bit per synapse, enabling 32x compression compared to 32-bit floating-point weights.
  • BS4NN maintains constant training time regardless of simulation time steps, unlike surrogate gradient methods that scale with time.
  • The network is highly efficient on neuromorphic hardware due to sparse, asynchronous spike transmission and minimal state requirements.
  • The source code is publicly available at https://github.com/SRKH/BS4NN for reproducibility and further research.

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.