Table of Contents
Fetching ...

Gradients without Backpropagation

Atılım Güneş Baydin, Barak A. Pearlmutter, Don Syme, Frank Wood, Philip Torr

TL;DR

This paper tackles the dominance of backpropagation in gradient based ML training by proposing forward gradient descent, an unbiased gradient estimation method computed entirely with forward mode automatic differentiation. The core idea is to replace the true gradient with a forward gradient g(θ) = (∇f(θ)·v) v where v is a random direction with independent zero-mean unit-variance components, yielding an unbiased estimator of the gradient. The authors provide a formal unbiasedness proof, implement a forward mode AD engine in PyTorch, and compare forward gradient descent to standard backpropagation across logistic regression, MLPs, and CNNs, observing substantial speedups (up to about 2x) with comparable memory usage and learning performance. The findings suggest that gradient based ML pipelines can operate without backpropagation, opening avenues for faster training, different hardware tradeoffs, and potential insights into biological learning mechanisms.

Abstract

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.

Gradients without Backpropagation

TL;DR

This paper tackles the dominance of backpropagation in gradient based ML training by proposing forward gradient descent, an unbiased gradient estimation method computed entirely with forward mode automatic differentiation. The core idea is to replace the true gradient with a forward gradient g(θ) = (∇f(θ)·v) v where v is a random direction with independent zero-mean unit-variance components, yielding an unbiased estimator of the gradient. The authors provide a formal unbiasedness proof, implement a forward mode AD engine in PyTorch, and compare forward gradient descent to standard backpropagation across logistic regression, MLPs, and CNNs, observing substantial speedups (up to about 2x) with comparable memory usage and learning performance. The findings suggest that gradient based ML pipelines can operate without backpropagation, opening avenues for faster training, different hardware tradeoffs, and potential insights into biological learning mechanisms.

Abstract

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.
Paper Structure (20 sections, 3 theorems, 7 equations, 6 figures, 1 algorithm)

This paper contains 20 sections, 3 theorems, 7 equations, 6 figures, 1 algorithm.

Key Result

Theorem 1

The forward gradient $\bm{g}(\bm{\theta})$ is an unbiased estimator of the gradient $\nabla f(\bm{\theta})$ .

Figures (6)

  • Figure 1: Five samples of forward gradient, the empirical mean of these five samples, and the true gradient for the Beale function (Section \ref{['sec:test_funcs']}) at $x=1.5, y=-0.1$. Star marks the global minimum.
  • Figure 2: Comparison of forward gradient and backpropagation in test functions, showing ten independent runs. Top row: Beale function, learning rate 0.01. Bottom row: Rosenbrock function. Learning rate $5\times 10^{-4}$. Rightmost column: Optimization trajectories in each function's domain, shown over contour plots of the functions. Star symbol marks the global minimum in the contour plots.
  • Figure 3: Comparison of forward gradient and backpropagation in logistic regression, showing five independent runs. Learning rate $10^{-4}$.
  • Figure 4: Comparison of forward gradient and backpropagation for the multi-layer NN, showing two learning rates. Top row: learning rate $2\times 10^{-5}$. Bottom row: learning rate $2\times 10^{-4}$. Showing five independent runs per experiment.
  • Figure 5: Comparison of forward gradient and backpropagation for the CNN. Learning rate $2\times 10^{-4}$. Showing five independent runs.
  • ...and 1 more figures

Theorems & Definitions (7)

  • Definition 1
  • Theorem 1
  • proof
  • Lemma 1
  • proof
  • Lemma 2
  • proof