Efficient Online Learning for Networks of Two-Compartment Spiking Neurons

Yujia Yin, Xinyi Chen, Chenxiang Ma, Jibin Wu, Kay Chen Tan

TL;DR

This paper introduces a novel online learning method for Two-Compartment Leaky Integrate-and-Fire (TC-LIF) spiking neural networks, overcoming the massive memory footprint of traditional Backpropagation Through Time (BPTT). By redesigning the neuron model to include time-varying, learnable membrane potential decay constants (Adaptive TC-LIF), the authors achieve high-performance sequential modeling with constant memory usage over time, paving the way for efficient on-chip neuromorphic training.

What Problem Does This Paper Address?

Spiking Neural Networks (SNNs) are highly celebrated for their brain-like energy efficiency, making them ideal candidates for ultra-low-power neuromorphic hardware. However, standard Leaky Integrate-and-Fire (LIF) neurons struggle with complex temporal tasks because they cannot retain information over long time windows.

To solve this, researchers recently proposed the Two-Compartment LIF (TC-LIF) model, which mimics biological neurons by separating dynamics into a dendritic compartment (for long-term memory) and a somatic compartment (for short-term memory).

The catch? Training TC-LIF networks currently relies on Backpropagation Through Time (BPTT). BPTT requires storing every single internal state across the entire time window to calculate gradients, causing memory consumption to explode linearly ($O(T)$) as sequences grow longer. BPTT also suffers from vanishing/exploding gradients and cannot be used for real-time, online learning where data arrives continuously. While an alternative online learning algorithm called e-prop (eligibility propagation) exists, it has historically been restricted to simple, single-compartment LIF neurons.

Methods

The authors bridge this gap with two core innovations:

  1. Mathematical Derivation of e-prop for TC-LIF: The authors mathematically derive the exact eligibility traces for both the dendritic and somatic compartments of the TC-LIF neuron, allowing gradients to be computed locally and propagated forward in time without storing historical states.
  2. The Adaptive TC-LIF Model: In the original TC-LIF model, the membrane decay constants were locked at 1 to prevent gradients from vanishing during BPTT. Because e-prop naturally circumvents the vanishing gradient problem, the authors relaxed this constraint, making the decay constants learnable.
  3. Time-Varying Decaying Constants: To prevent early inputs from completely dominating the network's memory over long sequences, they introduced time-varying decay rates ($A^D[t]$ and $A^S[t]$) inspired by the Gamma-distribution memory traces observed in biological cortical neurons.
Overview of the proposed Adaptive TC-LIF model

Datasets

The proposed model was evaluated on three widely recognized sequential benchmarks:

  • Sequential MNIST (S-MNIST): Handwritten digits fed to the network row-by-row.
  • Permuted Sequential MNIST (PS-MNIST): A harder variant where the pixel sequences are randomly shuffled, putting a heavier emphasis on long-term memory.
  • Spiking Heidelberg Digits (SHD): A challenging, high-dimensional audio/speech spiking dataset containing sequences up to 250 time steps.

Key Insights and Ideas

  • BPTT Constraints are Handcuffs: The original TC-LIF model had to compromise its biological realism (locking decay constants to 1) just to survive BPTT's mathematical limitations. Switching to an eligibility-trace framework (e-prop) frees the parameter space, allowing the neuron to be truly adaptive.
  • Biological Decay Fixes Mathematical Saturation: In standard forward eligibility traces, early inputs accumulate indefinitely. By adopting a biologically realistic Gamma-distribution decay, the network balances its sensitivity, remaining open to new inputs while retaining crucial historical context.
  • True $O(1)$ Memory Scaling: By computing parameter updates at each individual time step using local loss and forward-propagated eligibility traces, the network eliminates the need to look backward in time.
Comparison of BPTT and e-prop architectures

Key Results

  • Superior Accuracy: The Adaptive TC-LIF model trained with e-prop consistently outperformed standard online LIF models. On the recurrent architecture, it achieved 98.61% on S-MNIST, 98.54% on PS-MNIST, and 80.57% on SHD. Notably, on the difficult PS-MNIST task, the online adaptive model actually surpassed the vanilla TC-LIF model trained via offline BPTT.
  • Flatline Memory Footprint: Empirical testing verified that while BPTT's memory usage scaled linearly up to nearly 3000 MiB at 784 time steps, the e-prop method maintained a perfectly flat, constant memory footprint of around 1000 MiB regardless of sequence length.
  • Ablation Validation: Introducing the time-varying decay constants yielded a massive 10% accuracy boost on the SHD dataset compared to the best-performing vanilla online TC-LIF baseline.

Limitations and Future Work

While the Adaptive TC-LIF closing the performance gap with BPTT is impressive, a minor accuracy deficit (within 5%) still remains on highly complex temporal datasets like SHD. Additionally, while the paper thoroughly proves the theoretical and empirical memory efficiency of the algorithm on standard GPU hardware, the authors note that physically deploying and benchmarking this architecture on real neuromorphic chips (such as Intel's Loihi) is the vital next step to realizing its ultra-low-power potential.

Summary updated

Abstract

The brain-inspired Spiking Neural Networks (SNNs) have garnered considerable research interest due to their superior performance and energy efficiency in processing temporal signals. Recently, a novel multi-compartment spiking neuron model, namely the Two-Compartment LIF (TC-LIF) model, has been proposed and exhibited a remarkable capacity for sequential modelling. However, training the TC-LIF model presents challenges stemming from the large memory consumption and the issue of gradient vanishing associated with the Backpropagation Through Time (BPTT) algorithm. To address these challenges, online learning methodologies emerge as a promising solution. Yet, to date, the application of online learning methods in SNNs has been predominantly confined to simplified Leaky Integrate-and-Fire (LIF) neuron models. In this paper, we present a novel online learning method specifically tailored for networks of TC-LIF neurons. Additionally, we propose a refined TC-LIF neuron model called Adaptive TC-LIF, which is carefully designed to enhance temporal information integration in online learning scenarios. Extensive experiments, conducted on various sequential benchmarks, demonstrate that our approach successfully preserves the superior sequential modeling capabilities of the TC-LIF neuron while incorporating the training efficiency and hardware friendliness of online learning. As a result, it offers a multitude of opportunities to leverage neuromorphic solutions for processing temporal signals.
BibTeX
@inproceedings{yin2024efficient,
  author = {Yujia Yin and Xinyi Chen and Chenxiang Ma and Jibin Wu and Kay Chen Tan},
  title = {{Efficient Online Learning for Networks of Two-Compartment Spiking Neurons}},
  booktitle = {IJCNN},
  year = {2024},
  doi = {10.1109/ijcnn60899.2024.10650178},
}
Figure