Exact Gradients for Stochastic Spiking Neural Networks Driven by Rough Signals

Christian Holberg, C. Salvi
2/3/2026

No official code found. Best implementation: cholberg/snnax (8 stars, last commit 2025-04-23).

Abstract

We introduce a mathematically rigorous framework based on rough path theory to model stochastic spiking neural networks (SSNNs) as stochastic differential equations with event discontinuities (Event SDEs) and driven by c\`adl\`ag rough paths. Our formalism is general enough to allow for potential jumps to be present both in the solution trajectories as well as in the driving noise. We then identify a set of sufficient conditions ensuring the existence of pathwise gradients of solution trajectories and event times with respect to the network's parameters and show how these gradients satisfy a recursive relation. Furthermore, we introduce a general-purpose loss function defined by means of a new class of signature kernels indexed on c\`adl\`ag rough paths and use it to train SSNNs as generative models. We provide an end-to-end autodifferentiable solver for Event SDEs and make its implementation available as part of the $\texttt{diffrax}$ library. Our framework is, to our knowledge, the first enabling gradient-based training of SSNNs with noise affecting both the spike timing and the network's dynamics.

View on arXivView PDF

Code Implementations(1)

cholberg/snnaxCommunity100%
81Python, Jupyter NotebookMar 18, 20241 years ago

Similar Papers

Cite this paper

@article{holberg2026exact,
  title  = {Exact Gradients for Stochastic Spiking Neural Networks Driven by Rough Signals},
  author = {Christian Holberg and C. Salvi},
  year   = {2026},
  eprint = {2405.13587},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.13587},
  url    = {https://arxiv.org/abs/2405.13587},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.13587.svg)](https://codeofpaper.com/paper/2405.13587)

Discussion