Skip to main content
QUICK REVIEW

[Paper Review] Loss shaping enhances exact gradient learning with Eventprop in spiking neural networks

Thomas Nowotny, James P. Turner|arXiv (Cornell University)|Dec 2, 2022
Advanced Memory and Neural Computing4 citations
TL;DR

This paper extends the EventProp algorithm for training spiking neural networks by introducing 'loss shaping'—a technique that modifies the loss function with a weighting function to enhance gradient flow. By addressing the inherent limitation of exact gradients in not signaling spike creation/deletion effects, the method improves learning stability and performance on challenging benchmarks like SHD, achieving competitive accuracy where standard EventProp fails.

ABSTRACT

Event-based machine learning promises more energy-efficient AI on future neuromorphic hardware. Here, we investigate how the recently discovered Eventprop algorithm for gradient descent on exact gradients in spiking neural networks can be scaled up to challenging keyword recognition benchmarks. We implemented Eventprop in the GPU-enhanced Neural Networks framework and used it for training recurrent spiking neural networks on the Spiking Heidelberg Digits and Spiking Speech Commands datasets. We found that learning depended strongly on the loss function and extended Eventprop to a wider class of loss functions to enable effective training. We then tested a large number of data augmentations and regularisations as well as exploring different network structures; and heterogeneous and trainable timescales. We found that when combined with two specific augmentations, the right regularisation and a delay line input, Eventprop networks with one recurrent layer achieved state-of-the-art performance on Spiking Heidelberg Digits and good accuracy on Spiking Speech Commands. In comparison to a leading surrogate-gradient-based SNN training method, our GeNN Eventprop implementation is 3X faster and uses 4X less memory. This work is a significant step towards a low-power neuromorphic alternative to current machine learning paradigms.

Motivation & Objective

  • To address the failure of EventProp in certain learning tasks due to exact gradients not indicating spike creation or deletion effects.
  • To extend EventProp to support a broader class of loss functions beyond its original restrictive formulation.
  • To improve gradient flow toward earlier layers by introducing a weighting function in the loss integral.
  • To empirically evaluate the extended EventProp with loss shaping on latency-encoded MNIST and Spiking Heidelberg Digits (SHD) datasets.
  • To demonstrate that loss shaping enables stable and effective learning where standard EventProp fails or learns slowly.

Proposed method

  • The authors extend EventProp to handle a wider class of loss functions by introducing a weighting function in the integral loss formulation, enabling better gradient propagation.
  • They implement the extended EventProp in GeNN with CUDA backend for GPU acceleration, enabling efficient simulation on large-scale SNNs.
  • A phantom spike regularisation is introduced for the time-to-first-spike loss to ensure gradient availability when correct neurons fail to spike.
  • Hidden layer regularisation is applied via a firing rate penalty term, with corresponding jumps derived in the backward pass using adjoint method principles.
  • Input augmentation via random shift improves generalisation, while the Adam optimizer is used for weight updates.
  • The backward pass is interleaved with the forward pass of the next mini-batch for computational efficiency.

Experimental results

Research questions

  • RQ1Why does EventProp fail to learn on certain tasks despite using exact gradients?
  • RQ2How does the absence of gradient information about spike creation or deletion affect learning dynamics in SNNs?
  • RQ3Can modifying the loss function through 'loss shaping' improve gradient flow and learning performance?
  • RQ4What types of loss functions are most effective when combined with loss shaping in EventProp?
  • RQ5To what extent does loss shaping improve performance on challenging benchmarks like SHD?

Key findings

  • EventProp fails to learn on the Spiking Heidelberg Digits (SHD) dataset with standard loss functions due to lack of gradient information about spike creation and deletion.
  • The exact gradient of the loss function does not provide signals for whether spike creation or deletion would improve performance, leading to unintended spike deletions and increased loss.
  • Loss shaping, by introducing a weighting function in the integral loss, successfully enhances gradient flow from output to earlier layers, stabilising learning.
  • The modified loss function with loss shaping achieves competitive classification accuracy on SHD, outperforming standard EventProp.
  • Phantom spike regularisation and hidden layer firing rate regularisation significantly improve training stability and convergence.
  • Random shift augmentation was found to be the most effective input augmentation for improving generalisation, while other methods showed negligible benefit.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.