jaxsnn: Event-driven Gradient Estimation for Analog Neuromorphic Hardware
Eric Müller, Moritz Althaus, Elias Arnold, Philipp Spilger, Christian Pehle, Johannes Schemmel
TL;DR
Problem: gradient-based training for neuromorphic hardware is hindered by asynchronous spike data and time-continuous dynamics when using dense, time-grid based ML frameworks. Approach: a JAX-based library, jaxsnn, supports event-driven computation on spike representations with Autograd, via a differentiable EventProp algorithm and a vectorized, PyTree-friendly simulator that advances from event to event using a differentiable root solver for the next spike time, and integrates forward hardware execution (BrainScaleS-2) plus a hardware-mock mode. Contributions: implementation of event-driven gradient estimation in a flexible framework, direct compatibility with neuromorphic backends during the forward pass, and validation on Yin-Yang showing strong accuracy. Significance: this work bridges neuromorphic hardware and contemporary ML tooling, enabling efficient, flexible training of spiking neural networks on analog hardware.
Abstract
Traditional neuromorphic hardware architectures rely on event-driven computation, where the asynchronous transmission of events, such as spikes, triggers local computations within synapses and neurons. While machine learning frameworks are commonly used for gradient-based training, their emphasis on dense data structures poses challenges for processing asynchronous data such as spike trains. This problem is particularly pronounced for typical tensor data structures. In this context, we present a novel library (jaxsnn) built on top of JAX, that departs from conventional machine learning frameworks by providing flexibility in the data structures used and the handling of time, while maintaining Autograd functionality and composability. Our library facilitates the simulation of spiking neural networks and gradient estimation, with a focus on compatibility with time-continuous neuromorphic backends, such as the BrainScaleS-2 system, during the forward pass. This approach opens avenues for more efficient and flexible training of spiking neural networks, bridging the gap between traditional neuromorphic architectures and contemporary machine learning frameworks.
