Skip to main content
QUICK REVIEW

[Paper Review] Forward and Reverse Gradient-Based Hyperparameter Optimization

Luca Franceschi, Michele Donini|arXiv (Cornell University)|Mar 6, 2017
Stochastic Gradient Optimization TechniquesComputer Science24 references56 citations
TL;DR

The paper presents two gradient-based hyperparameter optimization methods for iterative learning algorithms: a reverse-mode (RMD) and a forward-mode (FMD) approach, with a real-time forward-mode variant for efficient online hyperparameter updates.

ABSTRACT

We study two procedures (reverse-mode and forward-mode) for computing the gradient of the validation error with respect to the hyperparameters of any iterative learning algorithm such as stochastic gradient descent. These procedures mirror two methods of computing gradients for recurrent neural networks and have different trade-offs in terms of running time and space requirements. Our formulation of the reverse-mode procedure is linked to previous work by Maclaurin et al. [2015] but does not require reversible dynamics. The forward-mode procedure is suitable for real-time hyperparameter updates, which may significantly speed up hyperparameter optimization on large datasets. We present experiments on data cleaning and on learning task interactions. We also present one large-scale experiment where the use of previous gradient-based methods would be prohibitive.

Motivation & Objective

  • Motivate gradient-based hyperparameter optimization as an alternative to grid/random/Bayesian methods.
  • Derive and compare reverse-mode and forward-mode hypergradient computations for iterative training dynamics.
  • Introduce a real-time forward-mode hypergradient method for online hyperparameter updates.
  • Analyze time/space complexity and demonstrate scalability on large-scale experiments.
  • Showcase constrained HO scenarios (data cleaning and multitask learning) to highlight practical benefits.

Proposed method

  • Formulate training as a dynamical system s_t = Phi_t(s_{t-1}, lambda) with hyperparameters lambda.
  • Derive reverse-mode hypergradient using a Lagrangian with multipliers alpha_t and show its relation to back-propagation through time.
  • Derive forward-mode hypergradient via total derivative ds_T/dlambda leading to a recurrence Z_t = A_t Z_{t-1} + B_t.
  • Provide a real-time forward-mode variant (RTRL-like) that computes partial hypergradients at each time step for potential online updates.
  • Discuss computational complexity: forward-mode costs O(T m g(d,m)) time and O(h(d,m)) space; reverse-mode costs O(T g(d,m)) time and O(s(d,m)) space.

Experimental results

Research questions

  • RQ1How can we efficiently compute the gradient of the validation error with respect to hyperparameters for iterative learning algorithms?
  • RQ2What are the trade-offs between reverse-mode and forward-mode hypergradient computations in terms of time, space, and real-time applicability?
  • RQ3Can real-time (online) hyperparameter updates via forward-mode significantly speed up hyperparameter optimization on large datasets?
  • RQ4How do constrained hyperparameter optimization settings (e.g., sparsity, nonnegativity) affect HO performance?
  • RQ5Can gradient-based HO scale to large models and tasks where previous gradient-based methods were prohibitive?

Key findings

  • Reverse-mode hypergradient provides a principled, Lagrangian-based gradient but has high space complexity due to trajectory storage.
  • Forward-mode hypergradient enables efficient computation when the number of hyperparameters is small relative to parameter count.
  • Real-time forward-mode (RTRL-like) allows updating hyperparameters during training, enabling online adaptation on large datasets.
  • Experiments demonstrate applicability to data cleaning and multitask learning, including large-scale settings where prior gradient methods would be prohibitive.
  • Constrained HO (e.g., L1 sparsity) can help identify noisy examples and reveal task interactions in multitask learning.
  • The forward-mode approach can significantly speed up hyperparameter optimization on large datasets and supports online updates.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.