[Paper Review] Gradient Descent: The Ultimate Optimizer
This paper proposes a fully automated, differentiable framework for recursive hyperparameter optimization in deep learning, using automatic differentiation to compute hypergradients for learning rates and other optimizer hyperparameters. By stacking multiple levels of gradient-based hyperoptimizers, the method reduces sensitivity to initial hyperparameter choices, achieving robust training across MLPs, CNNs, and RNNs with only 1–2% additional runtime per level.
Working with any gradient-based machine learning algorithm involves the tedious task of tuning the optimizer's hyperparameters, such as its step size. Recent work has shown how the step size can itself be optimized alongside the model parameters by manually deriving expressions for "hypergradients" ahead of time. We show how to automatically compute hypergradients with a simple and elegant modification to backpropagation. This allows us to easily apply the method to other optimizers and hyperparameters (e.g. momentum coefficients). We can even recursively apply the method to its own hyper-hyperparameters, and so on ad infinitum. As these towers of optimizers grow taller, they become less sensitive to the initial choice of hyperparameters. We present experiments validating this for MLPs, CNNs, and RNNs. Finally, we provide a simple PyTorch implementation of this algorithm (see people.csail.mit.edu/kach/gradient-descent-the-ultimate-optimizer).
Motivation & Objective
- To address the challenge of manual hyperparameter tuning in gradient-based optimization by automating the computation of hypergradients.
- To extend beyond learning rate adaptation to include other hyperparameters like momentum coefficients.
- To enable recursive stacking of hyperoptimizers (hyper-hyperparameters, etc.) to reduce sensitivity to initial hyperparameter choices.
- To provide a practical, efficient implementation that scales linearly with stack depth and integrates seamlessly with PyTorch.
Proposed method
- Automatically compute hypergradients using reverse-mode automatic differentiation instead of manual derivation, eliminating error-prone symbolic manipulation.
- Modify standard SGD update rules to include joint optimization of model weights and hyperparameters like learning rate α and momentum μ.
- Derive recursive update rules where both weights and hyperparameters are updated at each step using gradients computed via backpropagation through the optimization process.
- Implement a differentiable programming interface that supports arbitrary stacking of hyperoptimizer levels, enabling higher-order hyperoptimization.
- Use a PyTorch-based implementation that properly manages computation graphs and avoids memory leaks via tensor detachment in logging.
- Apply the method to train MLPs, CNNs, and RNNs with varying initial hyperparameter values to evaluate robustness.
Experimental results
Research questions
- RQ1Can automatic differentiation eliminate the need for manual derivation of hypergradients in optimizer hyperparameter tuning?
- RQ2Does extending hyperparameter optimization beyond learning rate (e.g., to momentum) improve training robustness?
- RQ3Can recursive stacking of hyperoptimizers reduce sensitivity to initial hyperparameter values?
- RQ4What is the computational cost of increasing the depth of the hyperoptimizer stack?
- RQ5How does the method perform across diverse architectures like MLPs, CNNs, and RNNs under suboptimal initial hyperparameters?
Key findings
- A height-1 hyperoptimizer achieved ~11% error on Caltech-256 with both α = 10⁻⁶ and α = 10⁻⁴, while standard SGD failed with α = 10⁻⁶ (91.5% error).
- A height-2 hyperoptimizer enabled significant training progress even with α = 10⁻², demonstrating increased robustness to poor initial choices.
- Runtime increased by only 1–2% per additional hyperoptimizer level, showing linear and efficient scaling with stack depth.
- The method generalized naturally to momentum coefficients and other hyperparameters without additional derivation.
- Recursive hyperoptimization towers became progressively less sensitive to initial hyperparameters, validating the hypothesis of increasing robustness with depth.
- The implementation successfully avoided common AD pitfalls like memory leaks through proper tensor detachment in logging and computation graph management.
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.