mlsanityData to 14 Oct 2026

Flexible and Efficient Surrogate Gradient Modeling with Forward Gradient Injection

arXiv 2406.00177 ↗First posted 31 May 2024cs.LG cs.NEcited by 2

Not on the map. Why?

Abstract (arXiv)

Automatic differentiation is a key feature of present deep learning frameworks. Moreover, they typically provide various ways to specify custom gradients within the computation graph, which is of particular importance for defining surrogate gradients in the realms of non-differentiable operations such as the Heaviside function in spiking neural networks (SNNs). PyTorch, for example, allows the custom specification of the backward pass of an operation by overriding its backward method. Other frameworks provide comparable options. While these methods are common practice and usually work well, they also have several disadvantages such as limited flexibility, additional source code overhead, poor usability, or a potentially strong negative impact on the effectiveness of automatic model optimization procedures. In this paper, an alternative way to formulate surrogate gradients is presented, namely, forward gradient injection (FGI). FGI applies a simple but effective combination of basic standard operations to inject an arbitrary gradient shape into the computational graph directly within the forward pass. It is demonstrated that using FGI is straightforward and convenient. Moreover, it is shown that FGI can significantly increase the model performance in comparison to custom backward methods in SNNs when using TorchScript. These results are complemented with a general performance study on recurrent SNNs with TorchScript and torch.compile, revealing the potential for a training speedup of more than 7x and an inference speedup of more than 16x in comparison with pure PyTorch.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 7 of its 11 references that are in the map. First posted on arXiv 31 May 2024.

Builds on

7 of 11 references.

References · 7

  1. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
  2. 2019Surrogate Gradient Learning in Spiking Neural Networkscited by 626
  3. 2020Incorporating Learnable Membrane Time Constant to Enhance Learning of Spiking Neural Networkscited by 345
  4. 2018Long short-term memory and learning-to-learn in networks of spiking neuronscited by 181
  5. 2023SpikingJelly: An open-source machine learning infrastructure platform for spike-based intelligencecited by 169
  6. 2021Accurate and efficient time-domain classification with adaptive spiking recurrent neural networkscited by 115
  7. 2022Meta-learning Spiking Neural Networks with Surrogate Gradient Descentcited by 10

Built on by

Cited by year

Citing papers per year: 2025: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023Membrane Potential Distribution Adjustment and Parametric Surrogate Gradient in Spiking Neural Networks
  2. 2025Adaptive Surrogate Gradients for Sequential Reinforcement Learning in Spiking Neural Networks
  3. 2025Breaking the Conventional Forward-Backward Tie in Neural Networks: Activation Functions
  4. 2024Fully Spiking Actor Network with Intra-layer Connections for Reinforcement Learning
  5. 2022Navigating Local Minima in Quantized Spiking Neural Networks
  6. 2026Towards Infinitely Long Neural Simulations: Self-Refining Neural Surrogate Models for Dynamical Systems
  7. 2026A Composite Activation Function for Learning Stable Binary Representations
  8. 2026SURGE: Surrogate Gradient Adaptation in Binary Neural Networks