TL;DR
The authors introduce DoG (Distance over Gradients), a parameter-free step size schedule for SGD that eliminates the need to tune the learning rate. By setting the step size based on the maximum distance the model has traveled from its starting point divided by the running sum of gradient norms, DoG achieves performance competitive with expertly tuned SGD and Adam across a wide range of vision and language tasks without the computational overhead of a hyperparameter search.
What Problem Does This Paper Address?
In modern machine learning, the "learning rate headache" is a universal experience. Choosing the right learning rate (LR) is critical: too high, and the model diverges; too low, and it trains at a snail's pace or gets stuck in poor local minima. Standard practice involves "grid searching"—running the same model multiple times with different LRs—which is computationally expensive and environmentally taxing.
While adaptive optimizers like Adam help, they still require a "base" learning rate to be tuned. Theoretical "parameter-free" optimizers exist, but they often rely on unrealistic assumptions (like globally bounded gradients) or use complex online learning machinery that doesn't translate well to practical deep learning. The authors sought a simple, robust, and theoretically grounded formula that just works out of the box.
Methods
The core of the paper is the DoG formula. For an iteration $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}}$$
Where $x_i$ are the model weights and $g_i$ are the stochastic gradients. Essentially, the step size is the Distance traveled from initialization over the Gradients observed so far.
The authors propose three versions:
- DoG: The basic version described above.
- T-DoG (Tamed DoG): A theoretical variant that includes an extra logarithmic factor to provide high-probability convergence guarantees even when gradients are only "locally" bounded.
- L-DoG (Layer-wise DoG): A practical variant where the DoG formula is applied independently to each layer of a neural network. This allows different parts of the network to adapt their own effective learning rates, similar to how Adam operates.
Datasets
The researchers conducted an extensive empirical study across 23 tasks and 8 model architectures:
- Natural Language Understanding (NLU): The GLUE benchmark (including CoLA, SST-2, MRPC, QQP, STS-B, MNLI, QNLI, RTE) and SQuAD 1.1 for question answering. Models used included RoBERTa-base and T5-base.
- Computer Vision: 12 tasks from the VTAB benchmark (e.g., Caltech101, CIFAR-100, Flowers102, Retinopathy) and ImageNet. Models included VGG11, ResNet50, Densenet121, ViT-B/32, and ConvNeXt-T.
- Training from Scratch: A Wide ResNet 28-10 on CIFAR-10.
Key Insights and Ideas
- Distance as a Proxy for Uncertainty: The formula is derived from an "implicit equation" for the optimal step size. If you knew the distance to the optimum, you could set a perfect LR. Since we don't, DoG uses the distance traveled so far as a lower bound for that distance.
- Self-Stabilization: A fascinating property of DoG is that the step size often starts very small, grows exponentially during the first few hundred steps, and then plateaus near the value a human expert would have chosen after hours of tuning.
- Local vs. Global Bounds: Most optimization theory assumes gradients are bounded everywhere in the universe. DoG only requires them to be bounded in a small neighborhood around the starting point, which is a much more realistic assumption for deep learning landscapes.
- The "c=1" Universal Constant: While one could add a multiplier $c$ to the formula, the authors demonstrate that $c=1$ is a "universally good" setting across vastly different tasks, making it truly parameter-free.
Key Results
- Parity with Tuned SGD: In 79 out of 80 model/task combinations, DoG performed as well as SGD with an optimally tuned learning rate.
- Closing the Adam Gap: While standard SGD often lags behind Adam on transformers, L-DoG (the layer-wise version) significantly closed this gap, approaching or matching Adam's performance without any tuning.
- ImageNet Success: When fine-tuning a CLIP ViT-B/32 on ImageNet, L-DoG achieved 80.12% top-1 accuracy, outperforming tuned AdamW (79.04%) and tuned SGD (77.54%).
- Compute Savings: Because DoG requires no tuning, it effectively provides a 5x to 10x "speedup" in terms of total GPU hours required to find a good model, as you only need to run the training once.
Limitations and Future Work
- Batch Normalization (BN): The authors found that models with BN (like ResNet50) can make DoG sensitive to the initial movement parameter ($r_\epsilon$). Disabling BN or using evaluation mode during fine-tuning mitigated this, but a more native solution for BN is a future research direction.
- Momentum: DoG is currently built on top of vanilla SGD. Integrating momentum—a staple of modern training—into the parameter-free framework is a logical next step.
- The $r_\epsilon$ Parameter: While the authors call it "parameter-free," there is a tiny initial movement parameter $r_\epsilon$ to prevent division by zero at step one. While it's very robust, it's technically a parameter (though the authors provide a default that works across almost everything).
- Large-scale Training from Scratch: Most experiments focused on fine-tuning. While the CIFAR-10 "from scratch" results were promising, testing DoG on massive-scale pre-training (like LLMs) remains an open challenge.
Summary updated