[Paper Review] Gradients without Backpropagation
The paper introduces the forward gradient, an unbiased gradient estimator computed via forward-mode automatic differentiation, enabling gradient descent without backpropagation and achieving speedups in several ML tasks.
Using backpropagation to compute gradients of objective functions for optimization has remained a mainstay of machine learning. Backpropagation, or reverse-mode differentiation, is a special case within the general family of automatic differentiation algorithms that also includes the forward mode. We present a method to compute gradients based solely on the directional derivative that one can compute exactly and efficiently via the forward mode. We call this formulation the forward gradient, an unbiased estimate of the gradient that can be evaluated in a single forward run of the function, entirely eliminating the need for backpropagation in gradient descent. We demonstrate forward gradient descent in a range of problems, showing substantial savings in computation and enabling training up to twice as fast in some cases.
Motivation & Objective
- Motivate and define a gradient estimation method that relies solely on forward-mode AD instead of backpropagation.
- Prove that the forward gradient is an unbiased estimator of the true gradient.
- Demonstrate practical forward gradient descent on a range of ML architectures.
- Implement a forward-mode AD system in PyTorch and compare its performance to reverse-mode AD.
Proposed method
- Define forward gradient as g(θ) = (∇f(θ)·v) v with v ~ p(v) having independent zero-mean unit-variance components.
- Prove unbiasedness: E[g(θ)] = ∇f(θ).
- Implement a from-scratch forward-mode AD engine in PyTorch independent of PyTorch’s reverse-mode autograd.
- Apply forward gradient descent in SGD across logistic regression, MLPs, and CNNs, with equal iteration budgets to backpropagation.
- Analyze runtime costs with R_f and R_b and compare convergence time T_f vs T_b across architectures.
Experimental results
Research questions
- RQ1Can forward-mode AD provide an unbiased gradient estimation sufficient for SGD optimization?
- RQ2What are the runtime and convergence characteristics of forward gradient descent across simple and deep architectures?
- RQ3Do forward gradients offer practical speedups without sacrificing training quality compared to backpropagation?
- RQ4How does forward gradient descent scale with model depth and data size?
Key findings
- Forward gradient is an unbiased estimator of the gradient, enabling SGD without backpropagation.
- Across MNIST logistic regression, MLPs, and CNNs, forward gradient can be faster in wall-clock time and sometimes achieve similar or better loss per time.
- In MNIST logistic regression, forward gradient is roughly twice as fast as backpropagation in both runtime and loss performance.
- In CNNs, forward gradient shows substantial runtime savings with loss improvements within about a factor of two in time to reach a target loss.
- The forward gradient method scales reasonably with network depth, maintaining favorable runtime characteristics up to larger layer counts.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.