Accurate online training of dynamical spiking neural networks through Forward Propagation Through Time

Bojian Yin, Federico Corradi, Sander M. BohtéNat. Mac. Intell 2021

Abstract

Spiking Neural Networks (SNNs) are promising for energy-efficient AI, yet training them efficiently remains a challenge. Standard Backpropagation Through Time (BPTT) suffers from high memory costs that scale linearly with sequence length, hindering online learning. We present a solution combining Forward Propagation Through Time (FPTT) with a novel Liquid Spiking Neuron (LSN). The LSN utilizes learned, input-dependent time constants to provide the necessary gating for stable online gradient estimation. Our method achieves BPTT-level accuracy on complex neuromorphic tasks while reducing memory usage by up to 5x and increasing training speed by 3-4x.

The Challenge of Online SNN Training

Spiking Neural Networks (SNNs) are brain-inspired models designed for high energy efficiency on specialized neuromorphic hardware. However, their adoption is limited by the difficulties of training. The industry-standard method, Backpropagation Through Time (BPTT), requires unrolling the network over the entire input sequence to calculate gradients. This creates a "linear memory wall": as sequence length increases, memory requirements grow proportionally, making BPTT unsuitable for real-time online learning where data arrives continuously.

While online approximations like e-prop exist, they often sacrifice accuracy for memory efficiency. This research aims to bridge that gap, providing BPTT-level performance with the low memory footprint required for true online learning.

Methodology: FPTT and Liquid Spiking Neurons

The proposed solution involves two key components: a new training algorithm and a specialized neuron architecture.

Forward Propagation Through Time (FPTT)

FPTT is an online training framework that eliminates the need for a backward pass through time. Instead of minimizing a global loss over an entire sequence, it minimizes an "instantaneous risk" at each timestep. It employs a dynamic regularization penalty based on a running average of weights, allowing the network to update parameters "on the fly" with fixed memory costs regardless of sequence length.

Comparison of computational graphs for BPTT and FPTT.

The Liquid Spiking Neuron (LSN)

A critical discovery in this work is that FPTT fails when applied to standard spiking neurons because they lack internal "gating" mechanisms (similar to the forget gates in LSTMs). To address this, the authors developed the Liquid Spiking Neuron (LSN). In this model, the time constants—which govern the decay of a neuron's internal state—are not fixed. Instead, they are learned functions of the current input and previous state. This "liquid" behavior allows the neuron to dynamically modulate its memory, providing the stability necessary for FPTT to converge effectively.

Experimental Results and Efficiency

The effectiveness of the LTC-SNN (Liquid Time Constant SNN) trained with FPTT was evaluated across a variety of benchmarks, including synthetic memory tasks (Add-Task), neuromorphic vision data (DVS Gesture, DVS-CIFAR10), and sequential image classification (S-MNIST).

Training loss curves and final loss comparison across different models and sequence lengths.

Key Performance Metrics

  • Accuracy: On the DVS Gesture dataset, the LTC-SNN trained with FPTT achieved 91.89% accuracy, outperforming standard LSTMs trained with BPTT (88.89%) and significantly exceeding other online learning methods.
  • Memory Efficiency: FPTT reduced memory requirements by 4x to 5x compared to BPTT. For example, on S-MNIST, memory usage dropped from 11.1GB to 1.9GB.
  • Training Speed: The approach proved to be 3x to 4x faster than optimized BPTT routines in standard deep learning frameworks.
  • Stability: Unlike many online methods that degrade as sequences lengthen, the LTC-SNN maintained consistent performance even as the number of frames scaled from 20 to 500.

Conclusion

By combining the memory-efficient FPTT algorithm with the biologically inspired Liquid Spiking Neuron, this work overcomes the primary hurdles of online SNN training. The resulting system breaks the "memory wall" of BPTT without sacrificing accuracy. Future work will focus on low-level software optimizations and direct deployment on neuromorphic hardware to realize the full potential of real-time, low-power online learning.

Summary updated

BibTeX
@inproceedings{yin2021accurate,
  author = {Bojian Yin and Federico Corradi and Sander M. Bohté},
  title = {{Accurate online training of dynamical spiking neural networks through Forward Propagation Through Time}},
  booktitle = {Nat. Mac. Intell},
  year = {2021},
  url = {https://openreview.net/forum?id=FhexspFY8A},
}
Figure