Evolving Learning Rate Optimizers for Deep Neural Networks

Pedro Carvalho, Nuno Lourenço, Penousal MachadoarXiv 2021

TL;DR

The authors introduce AutoLR, a framework that uses evolutionary algorithms to automatically design learning rate optimizers tailored for specific deep learning tasks. The system successfully discovered a novel adaptive optimizer called ADES (Adaptive Evolutionary Squared) that matches or exceeds the performance of industry standards like Adam and RMSprop, even when generalized to new datasets.

What Problem Does This Paper Address?

Training deep neural networks is a balancing act, and the learning rate (LR) is arguably the most critical hyperparameter. Set it too low, and training takes forever; set it too high, and the model may never converge.

While we have powerful "hand-crafted" optimizers like Adam, RMSprop, and SGD with Momentum, these are general-purpose solutions. They don't account for the unique topology or data characteristics of a specific network. The authors ask: Can we use search algorithms to evolve specialized optimizers that push performance further than human-designed ones?

Methods

The authors propose AutoLR, which utilizes Dynamic Structured Grammatical Evolution (DSGE) to "breed" new optimizers. The framework operates in two flavors:

  1. Dynamic AutoLR (DLR): Evolving learning rate schedulers (functions that change the LR based on the current epoch and previous LR). These are represented as if-then-else decision trees.
  2. Adaptive AutoLR (ALR): Evolving complex adaptive optimizers that tune the LR for every single weight in the network.

The system uses a defined grammar of mathematical operations (addition, subtraction, square root, etc.) and constants to build these functions. To ensure the evolved optimizers aren't just memorizing the data, the authors use a rigorous data-splitting strategy, separating the data used for the "fitness function" (evolution) from the "benchmark function" (final evaluation).

Figure 1: Difference in data used for evolution (fitness function) and benchmark (benchmark function).

Datasets

  • Fashion-MNIST: The primary dataset used for the evolution phase and initial benchmarking.
  • CIFAR-10: Used as a "transfer" test to see if an optimizer evolved on Fashion-MNIST could generalize to a more complex task and a different architecture.
  • MNIST: Used as a simpler baseline reference.

Key Insights and Ideas

  • The Discovery of ADES: The most significant outcome was the discovery of the Adaptive Evolutionary Squared (ADES) optimizer. Its structure is novel because it utilizes a squared auxiliary variable in a way not found in standard literature.
  • Specialization vs. Generality: A common fear with evolved solutions is that they will be "overfit" to one specific task. However, ADES proved surprisingly robust, outperforming Adam when moved to the CIFAR-10 dataset—a task it was never evolved for.
  • Evolutionary "Sanity Checks": By including standard operations in the grammar, the authors ensured the system could reproduce existing optimizers (like SGD) as a baseline before attempting to innovate.
  • Bias in Grammar: The authors found that biasing the grammar toward using the gradient more frequently helped the system discover functional optimizers much faster.

Key Results

The evolved optimizers were put to the test against the "Big Three": Adam, RMSprop, and Nesterov Momentum.

  • Fashion-MNIST Performance: ADES achieved a test accuracy of 92.45%, placing it neck-and-neck with Adam (92.67%) and RMSprop (92.71%), while significantly outperforming Nesterov Momentum (90.62%).
  • Generalization (CIFAR-10): In a surprising twist, when moved to the CIFAR-10 dataset, ADES achieved 79.72% accuracy, actually outperforming Adam's 78.76%.
  • Simpler Schedulers: Even the simpler "Dynamic AutoLR" policies (like Policy A, which mimics cyclical learning rates) were able to outperform static baselines, achieving 88.68% accuracy vs the 87.47% baseline.
Comparison of evolved policies vs baseline

Limitations and Future Work

  • Computational Overhead: Evolving these optimizers is resource-intensive. While producing a "comparable" optimizer is relatively cheap, evolving one that significantly beats the state-of-the-art requires massive computational power.
  • Grammar Constraints: Due to technical limitations in the underlying training operations (TensorFlow), the system could not evolve certain types of modified gradients, such as the specific "look-ahead" mechanism used in Nesterov Momentum.
  • Hyperparameter Sensitivity: In some tasks, ADES showed "bizarre behavior" when its own internal parameters weren't perfectly tuned, suggesting it might be less "plug-and-play" than Adam in certain niche scenarios.

The authors conclude that AutoLR is a viable path for discovering new general-purpose optimizers that human researchers might never have considered.

Summary updated

BibTeX
@misc{carvalho2021evolving,
  author = {Pedro Carvalho and Nuno Lourenço and Penousal Machado},
  title = {{Evolving Learning Rate Optimizers for Deep Neural Networks}},
  year = {2021},
  eprint = {2103.12623},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.12623},
}
Figure