Flexible and Efficient Surrogate Gradient Modeling with Forward Gradient Injection
Sebastian Otte

TL;DR
This paper introduces forward gradient injection (FGI), a novel method for surrogate gradient modeling that enhances flexibility and efficiency in deep learning frameworks, especially for non-differentiable operations like in spiking neural networks.
Contribution
The paper proposes FGI as an alternative to traditional custom backward methods, enabling direct gradient injection during the forward pass for improved performance and usability.
Findings
FGI significantly improves model performance in SNNs compared to traditional methods.
FGI enables training speedup of over 7x and inference speedup of over 16x with TorchScript.
FGI offers a straightforward and flexible approach for surrogate gradient modeling.
Abstract
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,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMedical Image Segmentation Techniques · 3D Shape Modeling and Analysis · Optical Imaging and Spectroscopy Techniques
MethodsForward gradient
