TL;DR
This paper introduces DoG (Distance over Gradients), a simple, parameter-free step size schedule for Stochastic Gradient Descent (SGD) that eliminates the need for manual learning rate tuning. By automatically adapting the step size based on the model's distance from its starting point and the norm of observed gradients, DoG achieves performance competitive with—and sometimes superior to—carefully tuned SGD and Adam across a wide range of vision and language tasks.
What Problem Does This Paper Address?
Choosing the right learning rate is arguably the most tedious and computationally expensive part of training machine learning models. Standard practice involves "grid searches" or "sweeps," where researchers train the same model multiple times with different learning rates to find the best one. This process can increase the total training cost by an order of magnitude.
While adaptive optimizers like Adam were designed to be more robust, they still require a "base learning rate" parameter that needs tuning for optimal performance. Existing "parameter-free" theoretical methods often rely on unrealistic global assumptions (like gradients being bounded everywhere) or are too complex for practical use. The authors aim to bridge this gap with a method that is both theoretically sound and practically effective without any multiplicative "learning rate" constant.
Methods
The core contribution is the DoG step size formula. For an SGD update $x_{t+1} = x_t - \eta_t g_t$, the step size $\eta_t$ is defined as:
$$\eta_t = \frac{\max_{i \le t} \|x_i - x_0\|}{\sqrt{\sum_{i \le t} \|g_i\|^2}}$$
In plain English, the step size at any moment is the maximum distance the model has traveled from its starting point ($x_0$), divided by the root sum of all squared gradient norms seen so far.
The authors propose three versions:
- DoG: The basic version described above.
- T-DoG (Tamed DoG): A theoretical variant that adds a logarithmic factor to the denominator. This ensures the iterates stay within a bounded region, allowing the authors to prove convergence guarantees even when gradients are only locally bounded.
- L-DoG (Layer-wise DoG): A practical variant that applies the DoG formula independently to each layer of a neural network, similar to how Adam scales updates per parameter.
Datasets
The authors evaluated their methods on a massive testbed of 23 tasks using 8 different model architectures:
- Natural Language Understanding (NLU): Fine-tuning RoBERTa-base and T5-base on the GLUE benchmark (8 tasks including SST-2, MNLI, and QQP) and the SQuAD 1.1 question-answering dataset.
- Computer Vision: Fine-tuning five architectures (VGG11, ResNet50, Densenet121, ViT-B/32, ConvNeXt-T) on 12 tasks from the VTAB benchmark (e.g., CIFAR-100, Caltech101, SVHN, Sun397).
- Large-scale Fine-tuning: Fine-tuning a CLIP ViT-B/32 model on ImageNet.
- Training from Scratch: Training a Wide ResNet 28-10 on CIFAR-10.
Key Insights and Ideas
- Distance from Initialization Matters: Most adaptive methods focus solely on gradient statistics. DoG’s use of the distance from $x_0$ is a critical "parameter-free" signal. As the model moves further from its start, it can afford larger steps; as gradients accumulate, the denominator naturally decays the step size.
- The Universal Constant $c=1$: The authors show that while one could add a constant $c$ to the formula ($\eta_t = c \cdot \dots$), setting $c=1$ is a "universally good" choice. This is the "aha" moment that makes the method truly parameter-free.
- Stabilization Behavior: As shown in Figure 1, DoG step sizes typically start small, increase rapidly, and then stabilize near the optimal tuned learning rate for the specific problem.
- Local vs. Global Bounds: Theoretically, T-DoG is significant because it provides convergence guarantees without assuming gradients are bounded globally across the entire space—an assumption that fails even for simple problems like least squares.
Key Results
- Competitive with Tuned SGD: In almost all 80 model/task combinations, DoG performed as well as SGD with a perfectly tuned learning rate.
- L-DoG Closes the Adam Gap: While basic DoG sometimes lagged behind tuned Adam, the layer-wise version (L-DoG) significantly closed this gap, often matching or exceeding Adam's performance without any tuning.
- Robustness: DoG is highly robust to its only minor configuration setting, $r_\epsilon$ (the initial step size), working well across several orders of magnitude.
- Efficiency: Because it requires no tuning, DoG can save roughly 5x to 7x the total computation time typically spent on learning rate sweeps.
Limitations and Future Work
- Batch Normalization: The authors noted that models using Batch Normalization (like ResNet50) can sometimes make DoG sensitive to the initial step size. They hypothesize this is due to the scale-invariance BN introduces.
- Momentum: The current version of DoG does not explicitly incorporate momentum, which is a staple of modern deep learning. Integrating momentum while maintaining parameter-free guarantees is a key next step.
- Training from Scratch: While successful on CIFAR-10, the authors suggest more extensive testing is needed for training massive models from scratch (rather than fine-tuning).
Summary updated