Abstract
Spiking neural networks (SNNs) are bio-plausible computing models with high energy efficiency. The temporal dynamics of neurons and synapses enable them to detect temporal patterns and generate sequences. While Backpropagation Through Time (BPTT) is traditionally used to train SNNs, it is not suitable for online learning of embedded applications due to its high computation and memory cost as well as extended latency. Previous works have proposed online learning algorithms, but they often utilize highly simplified spiking neuron models without synaptic dynamics and reset feedback, resulting in subpar performance. In this work, we present Spatiotemporal Online Learning for Synaptic Adaptation (SOLSA), specifically designed for online learning of SNNs composed of Leaky Integrate and Fire (LIF) neurons with exponentially decayed synapses and soft reset. The algorithm not only learns the synaptic weight but also adapts the temporal filters associated to the synapses. Compared to the BPTT algorithm, SOLSA has much lower memory requirement and achieves a more balanced temporal workload distribution. Moreover, SOLSA incorporates enhancement techniques such as scheduled weight update, early stop training and adaptive synapse filter, which speed up the convergence and enhance the learning performance. When compared to other non-BPTT based SNN learning, SOLSA demonstrates an average learning accuracy improvement of 14.2%. Furthermore, compared to BPTT, SOLSA achieves a 5% higher average learning accuracy with a 72% reduction in memory cost.
Introduction
Spiking Neural Networks (SNNs) are highly regarded in neuromorphic computing for their energy efficiency, mimicking the brain's sparse communication. However, training SNNs to recognize complex spatiotemporal patterns remains a significant challenge. The current industry standard, Backpropagation Through Time (BPTT), is an offline algorithm that requires storing the entire history of neural activity to calculate gradients after a sequence concludes. This "wait-and-store" requirement imposes massive memory overhead and creates computational "workload spikes," making it impractical for real-time learning on resource-constrained edge devices like wearable monitors or autonomous drones.
The SOLSA Algorithm
To address these limitations, we propose SOLSA (Spatiotemporal Online Learning for Synaptic Adaptation). SOLSA is built on a Three-Factor Hebbian Learning framework, updating weights based on local pre-synaptic activity, post-synaptic activity, and a global error signal.
Forward-only Gradient Approximation
Unlike BPTT, which propagates gradients backward through time, SOLSA utilizes a forward-only timeline. It calculates an "Eligibility Trace"—a local memory of recent activity—allowing gradients to be updated as data streams in. This eliminates the need to store long histories of neural states.
Adaptive Synaptic Dynamics
A key innovation in SOLSA is the inclusion of adaptive synapse filters. While most models use fixed synaptic behavior, SOLSA learns the temporal filter coefficients ($\alpha$ and $\beta$) alongside the weights. This enables the network to tune its internal temporal dynamics to better match the input data's characteristics, significantly improving accuracy.
Optimization Techniques
SOLSA incorporates several techniques to enhance efficiency:
- Scheduled Weight Updates: Instead of noisy millisecond-by-millisecond updates, SOLSA identifies high-importance time steps during an initial phase to focus learning.
- Early-Stop Training: The model can stop processing a sample once it reaches a confidence threshold, saving power and preventing overfitting.
Experimental Results
SOLSA was evaluated across nine multivariate time-series datasets, including EMG gesture recognition and event-based camera data (DVS128).
Performance and Efficiency
SOLSA consistently outperformed existing non-BPTT algorithms by an average of 14.2%. Remarkably, it also surpassed BPTT by 5% in average accuracy. This performance gain is accompanied by a dramatic 72% reduction in memory usage. For long sequences, such as "EMG action," SOLSA required only 44.1 MB compared to BPTT's 158.4 MB. On the "Japanese Vowels" dataset, where Truncated BPTT often fails due to lost long-term dependencies, SOLSA remained highly accurate (98.1%).
Workload Distribution
A major advantage of SOLSA is its balanced temporal workload. By interleaving forward and backward passes at every time step, it avoids the computational "cliffs" seen in BPTT at the end of training sequences.
Conclusion
SOLSA represents a significant advancement in neuromorphic online learning. By combining a forward-only gradient approximation with adaptive synaptic filters, it achieves superior accuracy and efficiency compared to traditional BPTT. Its balanced workload and low memory footprint make it an ideal candidate for real-time, on-device learning in the next generation of edge AI applications.
Summary updated