Introduction
The learning rate (LR) is arguably the most critical hyperparameter in deep learning, yet finding the "perfect" schedule—determining exactly when to decay and by how much—usually requires extensive trial-and-error. MARTHE (Moving Average Real-Time Hyperparameter Estimation) addresses this by automatically tuning LR schedules during training. It approximates the "hypergradient," the gradient of the validation error with respect to the learning rate, to optimize for model generalization in real-time.
The Challenge of Automated Learning Rate Scheduling
Existing automated methods for LR scheduling generally fall into two categories, both of which possess significant drawbacks. Hypergradient Descent (HD) methods are "shortsighted," updating the LR to minimize the loss in the immediate next step. This often leads to an underestimation of the LR needed for long-term progress. Conversely, Real-Time Hyperparameter Optimization (RTHO) methods accumulate information from the entire training history. While theoretically sound, they often become unstable because they fail to "forget" outdated information from early training phases when the loss surface was significantly different.
As shown in Figure 3, these baseline methods can be highly sensitive to their own hyper-parameters (like the hyper-learning rate $\beta$) and may fail to reach the global minimum effectively on complex loss surfaces.
The MARTHE Approach: Balancing Memory and Agility
MARTHE bridges the gap between HD and RTHO by treating the learning rate schedule as a vector of hyperparameters and using forward-mode algorithmic differentiation. The core innovation is the introduction of Hyper-Momentum ($\mu$), a discounting factor $\in [0, 1]$ that controls the "memory" of the hypergradient calculation.
- $\mu = 0$: The algorithm behaves like the greedy HD.
- $\mu = 1$: It behaves like the full-history RTHO.
- Moving Average Approximation: By using a moving average of past gradients, MARTHE simulates a longer-horizon objective without the instability of infinite memory.
This allows the LR to be updated at every iteration of the inner optimizer (e.g., SGD or Adam) using a hyper-learning rate ($\beta$), specifically targeting validation error to ensure better generalization.
Key Insights and Results
The authors evaluated MARTHE across MNIST, CIFAR-10 (with VGG-11), and CIFAR-100 (with ResNet-18). A key finding was the existence of a "Goldilocks" horizon; a hyper-momentum of $\mu \approx 0.99$ consistently provided the best results, looking neither too close nor too far into the past.
As illustrated in Figure 2, full-history methods like RTHO can suffer from exploding learning rates when the optimization trajectory encounters sharp peaks. MARTHE's discounting mechanism provides the necessary stability to avoid these issues while maintaining better progress than the shortsighted HD.
Performance Summary
- Accuracy: On MNIST, MARTHE achieved 94.2% validation accuracy, significantly outperforming a fixed LR (87.5%) and approaching the performance of expensive offline searches (96.1%).
- Efficiency: While roughly 4x slower per iteration than standard SGD due to extra calculations, MARTHE reaches higher peak accuracy faster than competing methods within a fixed time budget.
- Robustness: MARTHE proved to be a more "set-and-forget" solution, showing superior adaptability across different random seeds and hyper-hyperparameters.
Conclusion and Future Work
MARTHE offers a computationally efficient, online solution for the critical task of learning rate scheduling. By balancing short-term greediness with long-term stability through hyper-momentum, it achieves superior generalization. While it introduces some computational overhead and requires its own hyper-parameters ($\beta$ and $\mu$), its robustness makes it a powerful tool for modern deep learning. Future work will explore automatically tuning these remaining parameters and expanding MARTHE's application to domains like Reinforcement Learning and Natural Language Processing.
Summary updated