학술

Randomized Forward Mode of Automatic Differentiation For Optimization Algorithms

arXiv CS.AI
CC BY
이 매체는 공공·자유 라이선스로 본문을 직접 표시합니다.

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.

관련 뉴스