View a PDF of the paper titled Randomized Forward Mode of Automatic Differentiation For Optimization Algorithms, by Khemraj Shukla and Yeonjong Shin
Abstract:Reverse mode automatic differentiation (AD) computes a gradient in a single sweep, but at a memory cost that grows with the length of the computational graph. That cost becomes the binding constraint when the graph is long, as in parameter identification governed by differential equations or in training on memory-limited hardware. We study a randomized forward mode gradient (RFG) as an alternative to backpropagation in precisely this regime. RFG is a random gradient estimator built from the directional derivative along a random vector, a quantity that forward mode AD computes without storing a tape. Replacing the gradient with RFG yields a class of optimization algorithms; for RFG-based gradient descent (GD) and Polyak’s heavy ball (PHB) methods, we establish convergence results on quadratic functions. The analysis reveals that using random vectors from a probability distribution with the smallest kurtosis yields the fastest rate of convergence. Computational experiments demonstrate the performance of the proposed algorithms and verify the theoretical findings, including beyond quadratic functions. We further characterize when RFG is computationally preferable to backpropagation. Since the variance of RFG grows with the parameter dimension $d$ while the memory required by the reverse mode grows with the length $\ell$ of the computational graph, the relevant figure of merit is the ratio $\ell/d$. We confirm this by measurement against reverse mode with checkpointing. For a physics-informed neural network, where $d$ is large and $\ell$ short, RFG is not competitive. For parameter identification governed by differential equations, where a handful of coefficients is recovered from a long time integration, RFG requires one to three orders of magnitude less memory. The price is a larger iteration count, which leaves its time to solution comparable to or worse than a well-tuned reverse mode.
Submission history
From: Khemraj Shukla [view email]
[v1]
Sun, 22 Oct 2023 04:02:39 UTC (4,753 KB)
[v2]
Tue, 24 Oct 2023 04:20:24 UTC (4,754 KB)
[v3]
Thu, 1 Feb 2024 20:33:02 UTC (5,451 KB)
[v4]
Mon, 23 Nov 2026 20:49:54 UTC (2,521 KB)
![[2310.14168] Randomized Forward Mode of Automatic Differentiation For Optimization Algorithms [2310.14168] Randomized Forward Mode of Automatic Differentiation For Optimization Algorithms](https://techwavedispatch.com/wp-content/uploads/2026/11/231014168-Randomized-Forward-Mode-of-Automatic-Differentiation-For-Optimization-Algorithms-1024x597.png)