Automatic Gradient Descent: Deep Learning without Hyperparameters

Jeremy Bernstein, Chris Mingard, Kevin Huang, Navid Azizan, Yisong YuearXiv 2023 · DOI

Introduction

Hyperparameter tuning remains one of the most significant bottlenecks in deep learning research and deployment. Practitioners often spend substantial time and computational resources—sometimes costing millions of dollars—to find the optimal learning rate and decay schedules for a specific model and dataset. This "dark art" of manual optimization persists because current standard optimizers, such as Adam and SGD, are largely architecture-agnostic; they treat neural networks as black-box parameter vectors.

This paper introduces Automatic Gradient Descent (AGD), a first-order optimizer designed to eliminate manual hyperparameter tuning. By leveraging a network’s internal architectural information, specifically its depth and width, AGD provides a principled way to determine optimal step sizes automatically.

The Problem: Architecture-Agnostic Optimization

While "automatic differentiation" has revolutionized how we compute gradients, the subsequent step of optimization remains manual. The authors argue that the need for hyperparameter tuning is a symptom of a fundamental disconnect: current optimizers do not account for how changes in weights propagate through specific layers, widths, and non-linearities. To move beyond heuristics, a rigorous theoretical framework is required to link the network's structure directly to its optimization dynamics.

Methods: Architecture-Aware Optimization

AGD is derived from the Majorise-Minimise (MM) meta-algorithm. Unlike standard gradient descent, which simply follows the steepest descent direction, the MM approach constructs a "majorisation"—a local upper bound of the objective function—and minimizes this bound to ensure consistent progress.

Majorise-Minimise framework and the propagation of perturbations through the model components.

The technical foundation of AGD rests on several key innovations:

  1. Functional Expansion: Utilizing Bregman divergences to model the interaction between the loss function and the network's output.
  2. Deep Relative Trust: A theoretical mechanism to bound how weight perturbations at one layer affect the final output across deep, non-linear architectures.
  3. Dimensional Scaling: A prescription for scaling weight matrices and their updates based on the width ($d_k$) and depth ($L$) of the network.
  4. The AGD Update Rule: The algorithm calculates a "gradient summary" ($G$) across all layers to set an automatic learning rate $\eta = \log \frac{1 + \sqrt{1 + 4G}}{2}$. This logarithmic relationship naturally implements a form of automatic gradient clipping, enhancing stability.

Importantly, AGD remains a first-order optimizer, avoiding the heavy computational costs associated with second-order Hessian-based methods.

Experimental Evaluation

The effectiveness of AGD was tested across several standard benchmarks, ranging from simple fully-connected networks to large-scale ResNets:

  • CIFAR-10: Training 32-layer Fully-Connected Networks (FCNs) and ResNet-18.
  • CIFAR-100: Training VGG-16.
  • ImageNet: Training ResNet-50 to evaluate performance at a production scale.
Performance of AGD compared to SGD and Adam across different architectures and datasets. AGD matches or exceeds tuned baselines without manual intervention.

Key Results and Insights

The experimental results demonstrate that AGD is a robust, "out-of-the-box" solution for deep learning optimization:

  • Competitive Accuracy: On ResNet-18 (CIFAR-10), AGD matched the performance of expertly tuned Adam and SGD. On ImageNet, AGD trained a ResNet-50 to 65.5% top-1 accuracy with zero manual tuning.
  • Robustness to Depth: AGD successfully trained a 32-layer FCN where default configurations of Adam and SGD failed to converge. This highlights AGD's ability to handle "difficult" architectures that typically require extensive tuning.
  • Scale Invariance: The algorithm proved effective across a wide range of network widths (64 to 2048) and depths (2 to 32) without requiring any internal adjustments.
  • Memory Efficiency: AGD is more memory-efficient than its counterparts. While Adam requires storing three times the weight parameters (for running statistics), AGD only needs to store the weights themselves.

Limitations and Future Work

Despite its successes, AGD currently has some limitations. The present implementation does not support biases or the affine parameters in Batch Normalization, which were disabled during testing. Furthermore, while the theory is derived for deterministic "full-batch" settings, practical applications use stochastic mini-batches; bridging this theoretical gap remains an area for future research.

Additionally, AGD focuses strictly on optimization (minimizing training loss). Future iterations could integrate automated regularization techniques to further improve test-time generalization. Finally, extending AGD to modern architectures like Transformers and Attention mechanisms is a key next step for broader adoption.

Summary updated

BibTeX
@misc{bernstein2023automatic,
  author = {Jeremy Bernstein and Chris Mingard and Kevin Huang and Navid Azizan and Yisong Yue},
  title = {{Automatic Gradient Descent: Deep Learning without Hyperparameters}},
  year = {2023},
  eprint = {2304.05187},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.05187},
}
Figure