Table of Contents
Fetching ...

Optimizing Optimizers for Fast Gradient-Based Learning

Jaerin Lee, Kyoung Mu Lee

TL;DR

The paper develops a convex-optimization framework that treats optimizers as PSD operators translating gradients into updates, aiming to maximize instantaneous loss reduction. By constraining the optimizer via trust regions, it derives closed-form optimal optimizers across Frobenius, spectral, Lyapunov, and diagonal families, linking them to familiar algorithms such as SGD, AdaGrad, and Adam. The framework extends to dynamic optimizers with memory, providing conditions under which optimal dynamic updates arise and how they relate to RKHS endpoints via OAK kernels. Empirically, the approach enables automatic hyperparameter tuning that matches or surpasses hand-tuned baselines across CNNs, ViTs, and LLM fine-tuning, with tractable overhead and potential validation-aware enhancements. Collectively, it unifies optimizer design, reveals design principles behind popular methods, and offers a principled path to renovating optimizers for specific tasks.

Abstract

We lay the theoretical foundation for automating optimizer design in gradient-based learning. Based on the greedy principle, we formulate the problem of designing optimizers as maximizing the instantaneous decrease in loss. By treating an optimizer as a function that translates loss gradient signals into parameter motions, the problem reduces to a family of convex optimization problems over the space of optimizers. Solving these problems under various constraints not only recovers a wide range of popular optimizers as closed-form solutions, but also produces the optimal hyperparameters of these optimizers with respect to the problems at hand. This enables a systematic approach to design optimizers and tune their hyperparameters according to the gradient statistics that are collected during the training process. Furthermore, this optimization of optimization can be performed dynamically during training.

Optimizing Optimizers for Fast Gradient-Based Learning

TL;DR

The paper develops a convex-optimization framework that treats optimizers as PSD operators translating gradients into updates, aiming to maximize instantaneous loss reduction. By constraining the optimizer via trust regions, it derives closed-form optimal optimizers across Frobenius, spectral, Lyapunov, and diagonal families, linking them to familiar algorithms such as SGD, AdaGrad, and Adam. The framework extends to dynamic optimizers with memory, providing conditions under which optimal dynamic updates arise and how they relate to RKHS endpoints via OAK kernels. Empirically, the approach enables automatic hyperparameter tuning that matches or surpasses hand-tuned baselines across CNNs, ViTs, and LLM fine-tuning, with tractable overhead and potential validation-aware enhancements. Collectively, it unifies optimizer design, reveals design principles behind popular methods, and offers a principled path to renovating optimizers for specific tasks.

Abstract

We lay the theoretical foundation for automating optimizer design in gradient-based learning. Based on the greedy principle, we formulate the problem of designing optimizers as maximizing the instantaneous decrease in loss. By treating an optimizer as a function that translates loss gradient signals into parameter motions, the problem reduces to a family of convex optimization problems over the space of optimizers. Solving these problems under various constraints not only recovers a wide range of popular optimizers as closed-form solutions, but also produces the optimal hyperparameters of these optimizers with respect to the problems at hand. This enables a systematic approach to design optimizers and tune their hyperparameters according to the gradient statistics that are collected during the training process. Furthermore, this optimization of optimization can be performed dynamically during training.

Paper Structure

This paper contains 63 sections, 22 theorems, 165 equations, 5 figures, 18 tables, 3 algorithms.

Key Result

Theorem 1

[sec:appx:proof-of-theorem-stateless-optimizer-under-convex-constraints] Let the trust region$\{0\} \subseteq {\mathcal{Q}} \subseteq \mathbb{S}_+^d$ be a nonempty, compact, convex set. Define (1) its indicator$\delta_{{\mathcal{Q}}}(Q) = 0$ if $Q \in {\mathcal{Q}}$ and $+\infty$ otherwise, (2) its

Figures (5)

  • Figure 1: Just as optimizers train their models by feeding them parameter velocities $\dot{\theta}$, models can also fit the optimizers to the underlying tasks by feeding gradients $g$.
  • Figure 2: Behavior of optimal optimizers under different types of trust regions. (a, d) Dotted lines are suboptimal optimizers with random $\Sigma$ in an equal-power Frobenius family; the straight line shows the optimal optimizer found by our theory, achieving fastest convergence. (b, c, e, f) No free lunch theorem: Frobenius family excels for simple elliptic losses, while spectral and diagonal families excel for nonconvex loss geometries. Each line indicates the best result from dense search among all trust region parameters, e.g, $B$ for Frobenius family, etc.
  • Figure 3: Demonstration of Corollaries \ref{['cor:closed-form-solutions-dynamic-momentum']} and \ref{['cor:closed-form-solutions-dynamic-adam']}. Our instantiations of optimal optimizers are compared with baselines having fixed hyperparameters on the CIFAR-100 dataset krizhevsky2009learning with ResNet-18 he2016deep, following the standard settings of he2016deep. The error bars indicate the mean and standard deviation over 10 runs. Our instantiation shows better performance than every baseline optimizer with fixed hyperparameters, without relying on heavy workload of manual hyperparameter tuning.
  • Figure 4: Demonstration of Corollaries \ref{['cor:closed-form-solutions-dynamic-momentum']} and \ref{['cor:closed-form-solutions-dynamic-adam']}. Our instantiations of optimal optimizers are compared with baselines having fixed hyperparameters on the CIFAR-100 dataset krizhevsky2009learning with ResNet-18 he2016deep, following the standard settings of he2016deep. The line and shaded area indicate the mean and standard deviation over 10 runs. For clear visualization, each baseline plot shows only the best run. For SGD+Momentum, momentum below 0.8 showed suboptimal performance.
  • Figure 5: Demonstration of effectiveness of validation-aware design of gradient-based optimizers. The validation-aware optimizers achieve the highest test accuracy among all optimizers. The SGD+M optimizer is trained on the CIFAR-100 dataset krizhevsky2009learning with ResNet-18 he2016deep.

Theorems & Definitions (44)

  • Theorem 1: Optimal stateless optimizers under convex constraints
  • Corollary 2: Closed-form solutions for common optimizer families
  • Theorem 3: Optimal dynamic optimizers under convex constraints
  • Lemma 4: Conservation of optimality under projection
  • Corollary 5: Instantaneously optimal SGD+Momentum
  • Corollary 6: Instantaneously optimal Adam/AdamW
  • Proposition 7: Convergence endpoint of commutative optimizers for least squares
  • Lemma 8: Commutativity
  • Theorem 9: Convergence endpoint of greedy optimal optimizers
  • Proposition 10: Validation optimality in power
  • ...and 34 more