arXiv:2603.08146cs.LG2026-03被引 3

用数值微分解方程实现任意神经元模型的精确梯度训练。

Training event-based neural networks with exact gradients via Differentiable ODE Solving in JAX

  • 基于可微分数值微分方程求解,支持任意由微分方程定义的神经元模型。
  • 在Yin-Yang和MNIST上验证,支持多种神经元模型与损失函数组合。
  • 适合快速原型设计复杂脉冲网络,尤其适合需要精确梯度的研究者。

现有脉冲神经网络梯度训练框架存在权衡:离散时间方法使用代理梯度可支持任意神经元模型,但引入梯度偏差并限制脉冲时间分辨率;连续时间方法虽能计算精确梯度,但需解析表达式,仅限于如漏电积分-发放(LIF)等简单模型。本文提出Eventax框架,结合可微分数值微分方程求解器与事件驱动脉冲处理,解决该矛盾。基于JAX构建,利用Diffrax求解器对任意由微分方程定义的神经元模型进行前向模拟,并计算精确梯度。用户只需指定神经元动力学、脉冲条件与重置规则,即可实现灵活建模。框架支持多种神经元模型(如LIF、QIF、EIF、Izhikevich、EGRU)、损失函数(时间到首次脉冲与状态型)及网络架构。在Yin-Yang与MNIST数据集上成功验证,还实现了包含人类层2/3锥体神经元树突脉冲的多分区神经元模型。代码已开源。

原文摘要 · Abstract (English)

Existing frameworks for gradient-based training of spiking neural networks face a trade-off: discrete-time methods using surrogate gradients support arbitrary neuron models but introduce gradient bias and constrain spike-time resolution, while continuous-time methods that compute exact gradients require analytical expressions for spike times and state evolution, restricting them to simple neuron types such as Leaky Integrate and Fire (LIF). We introduce the Eventax framework, which resolves this trade-off by combining differentiable numerical ODE solvers with event-based spike handling. Built in JAX, our frame-work uses Diffrax ODE-solvers to compute gradients that are exact with respect to the forward simulation for any neuron model defined by ODEs . It also provides a simple API where users can specify just the neuron dynamics, spike conditions, and reset rules. Eventax prioritises modelling flexibility, supporting a wide range of neuron models, loss functions, and network architectures, which can be easily extended. We demonstrate Eventax on multiple benchmarks, including Yin-Yang and MNIST, using diverse neuron models such as Leaky Integrate-and-fire (LIF), Quadratic Integrate-and-fire (QIF), Exponential integrate-and-fire (EIF), Izhikevich and Event-based Gated Recurrent Unit (EGRU) with both time-to-first-spike and state-based loss functions, demonstrating its utility for prototyping and testing event-based architectures trained with exact gradients. We also demonstrate the application of this framework for more complex neuron types by implementing a multi-compartment neuron that uses a model of dendritic spikes in human layer 2/3 cortical Pyramidal neurons for computation. Code available at https://github.com/efficient-scalable-machine-learning/eventax.

脉冲神经网络微分方程可微分编程JAX

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。