面向优化算法的自动微分随机前向模式(RFG)研究
Randomized Forward Mode of Automatic Differentiation For Optimization Algorithms
AI 导读
一篇 arXiv 论文研究了随机前向模式梯度(RFG),用沿随机向量的方向导数构建梯度估计器,替代计算图较长时内存开销大的反向传播。对基于 RFG 的梯度下降和 Polyak 重球法,作者在二次函数上建立了收敛性结果,且随机向量分布峰度越小收敛越快。
正文 · 原文
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.
| Comments: | 38 Pages, 9 Figures |
| Subjects: | Optimization and Control (math.OC); Artificial Intelligence (cs.AI); Machine Learning (cs.LG) |
| MSC classes: | 65K05, 65B99, 65Y20 |
| Cite as: | arXiv:2310.14168 [math.OC] |
| (or arXiv:2310.14168v4 [math.OC] for this version) | |
| https://doi.org/10.48550/arXiv.2310.14168 arXiv-issued DOI via DataCite |
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)
来源:arXiv cs.AI · arxiv.org