A randomized route around backpropagation’s memory cost
Source published
A randomized forward-mode gradient method may save memory when computations are long and parameter counts are modest, but it can require more optimization steps.
AI-generated conceptual illustration; not documentary evidence.
Backpropagation is efficient at computing gradients, but it can store substantial information along the way. This study explores a randomized alternative that trades some computational effort for lower memory use in certain problems.
Automatic differentiation lets computers calculate how a model’s output changes when its parameters change. The familiar reverse-mode approach, used in backpropagation, can calculate a full gradient in one backward sweep. But it may need to retain information from many steps of the computation. For long computations—such as simulations of differential equations—that memory requirement can become a bottleneck.
Khemraj Shukla and Yeonjong Shin study a different approach: randomized forward-mode gradients (RFG). Instead of calculating every component of the gradient directly, RFG calculates how the output changes along a randomly chosen direction in parameter space. Forward-mode automatic differentiation can obtain that directional change without storing a full reverse-mode tape. The researchers use the resulting estimate in optimization algorithms, including gradient descent and Polyak’s heavy-ball method.
The paper establishes convergence results for these methods on quadratic functions. Its analysis indicates that, among the probability distributions considered, random vectors from a distribution with the smallest kurtosis give the fastest convergence rate. The authors also report computational experiments, including tests beyond quadratic functions, that they say support the theoretical results.
The central practical question is when saving memory is worth the trade-off. RFG’s estimate becomes more variable as the number of parameters, d, grows. By contrast, the memory burden of reverse mode grows with the length of the computational graph, ℓ. The authors therefore identify the ratio ℓ/d as relevant to deciding which approach may be preferable, and report measurements comparing RFG with reverse mode using checkpointing—a technique that saves memory by recomputing some intermediate values.
The examples illustrate why the method is not a universal replacement for backpropagation. In physics-informed neural networks, the authors describe a setting with many parameters and a short computational graph; there, RFG is not competitive. In differential-equation parameter identification, a small number of coefficients must be inferred through a long time integration. In that setting, the abstract reports that RFG used one to three orders of magnitude less memory. The trade-off was a larger iteration count, leaving total time to solution comparable to or worse than a well-tuned reverse-mode method.
These results point to a specialized option for memory-constrained problems, not a general speedup. Lower memory use does not necessarily mean less total computation, and the reported comparison depends on the problem’s dimensions and computational graph. The available evidence here is the paper’s abstract, so it does not provide the experimental setup, detailed measurements, or enough information to assess how broadly the results generalize. The work is an arXiv preprint; the supplied source does not establish whether it has undergone peer review.
automatic differentiation
randomized gradients
optimization
backpropagation
memory-efficient computing
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.