Learned Optimizers that Scale and Generalize

Olga Wichrowska, Niru Maheswaranathan, Matthew W. Hoffman, Sergio Gomez Colmenarejo, Misha Denil, Nando de Freitas, Jascha Sohl-Dickstein

TL;DR

The authors introduce a meta-learned optimizer driven by a novel hierarchical RNN architecture that successfully scales and generalizes to large-scale deep learning tasks. Trained entirely on a diverse set of small, synthetic mathematical functions, this optimizer successfully generalizes to train complex convolutional networks and massive ImageNet models (like ResNet and Inception) without ever seeing a neural network during its training phase.

What Problem Does This Paper Address?

"Learning to learn" (meta-learning) aims to replace hand-engineered optimization algorithms like ADAM or RMSProp with neural networks trained specifically to optimize other models. While promising, previous attempts have suffered from two fatal flaws:

  1. Poor Generalization: Optimizers meta-trained on one type of network fail completely when applied to different architectures or even different activation functions (e.g., failing when moving from Sigmoid to ReLU units).
  2. Extreme Compute Overhead: Operating an RNN per parameter introduces massive memory and computational overhead, making it impossible to scale these learned optimizers to modern, large-scale machine learning problems.

This paper tackles both challenges, creating a learned optimizer that scales efficiently and generalizes robustly across vastly different optimization landscapes.

Methods

The authors introduce three core innovations to overcome the limitations of previous learned optimizers:

  • Hierarchical RNN Architecture: Instead of running a large, independent RNN for every single parameter, they introduce a three-tiered hierarchy to share information and reduce overhead:
  • Parameter RNN: A tiny RNN (hidden size of 10) that directly processes scalar gradient inputs for each individual parameter.
  • Tensor RNN: An intermediate RNN (hidden size of 20) for each parameter tensor (e.g., a layer's weight matrix) that takes the average state of its constituent Parameter RNNs.
  • Global RNN: A single network-wide RNN (hidden size of 20) that tracks the overall state of the entire optimization problem.

    This structure allows parameters within the same layer and across the network to coordinate while keeping per-parameter costs minimal.

Figure 1. Hierarchical RNN architecture. At the lowest level, a small Parameter RNN processes the inputs and outputs (Section 3.3) for every parameter (θij) in the target problem. At the in- termediate level, a medium-sized Tensor RNN exists for every parameter tensor (denoted by θi) in the target problem. It takes as input the average latent state across all Parameter RNNs belong- ing to the same tensor. Its output enters those same Parameter RNNs as a bias term. At the top level, a single Global RNN re- ceives as input the average hidden state of all Parameter RNNs, and its output enters the Tensor RNNs as a bias term and is added to the Parameter RNN bias term. This architecture has low per- parameter overhead, while the Tensor RNNs are able to capture inter-parameter dependencies, and the Global RNN is able to cap- ture inter-tensor dependencies.
  • Optimization Literature Priors: Rather than treating the system as a pure black box, they bake successful hand-designed optimization features directly into the RNN. These include Nesterov-style attention (evaluating gradients at extrapolated future positions), multi-timescale momentum, dynamic input scaling, and a strict decomposition of the output into separate step directions and step lengths.
  • Meta-Training Pipeline Enhancements: They utilize a log-loss meta-objective to better encourage exact convergence to minima and sample the optimization training horizons from a heavy-tailed distribution to ensure the optimizer can handle long training runs.

Datasets

  • Meta-Training Ensemble: The optimizer was trained on a diverse corpus of small, synthetic mathematical functions designed to mimic common optimization pathologies (e.g., Rosenbrock, Ackley, Beale, quadratic bowls, and simple logistic regression with noisy minibatches). Crucially, no neural networks were included in the meta-training set.
  • Evaluation Tasks: The model was evaluated on image classification tasks using the MNIST dataset (on MLPs and ConvNets with both Sigmoid and ReLU activations) and the ImageNet dataset (on large-scale Inception V3 and ResNet V2 architectures).

Key Insights and Ideas

  • Synthetic Diversity Trumps Real Data: You do not need to train an optimizer on neural networks for it to optimize neural networks well. Training on a rich, mathematically diverse set of simple landscapes teaches the optimizer fundamental geometric principles of optimization that generalize universally.
  • Inductive Biases are Essential: Pure black-box meta-learning struggles to generalize. By embedding structural assumptions from classical optimization (like scale invariance and multi-scale momentum), the learned model's generalization capability is dramatically amplified.
  • Hierarchy Solves the Scaling Bottleneck: Aggregating information via layer-wide (Tensor) and network-wide (Global) averages allows the per-parameter models to remain tiny, keeping compute costs manageable even as the target model scales to millions of parameters.

Key Results

  • Outperforming Baselines on Synthetic Tasks: The learned optimizer consistently matched or outperformed tuned ADAM and RMSProp baselines on the synthetic problems within its training corpus.
Figure 3. Three sample problems from the meta-training cor- pus on which the learned optimizer outperforms RMSProp and ADAM. The learning rates for RMSProp (1e-2) and ADAM (2e- 3) were chosen for good average performance across all problem types in the training and test set. The learned optimizer generally beats the other optimizers on problems in the training set.
  • Zero-Shot Architecture Generalization: When applied to MNIST MLPs and ConvNets with ReLU activations, the optimizer successfully minimized loss, whereas previous meta-learned optimizers completely diverged or failed.
Generalization to MNIST architectures
  • Scaling to ImageNet: The optimizer stably trained massive architectures like Inception V3 and ResNet V2 on ImageNet for the first 10,000 to 20,000 steps, performing comparably to meticulously hand-tuned traditional optimizers.
  • Hyperparameter Robustness: The learned optimizer demonstrated significantly higher robustness to initial learning rate configurations compared to ADAM and RMSProp, showing stable descent across a wider range of initializations.
Figure 5. Learned optimizer performance is robust to learning rate hyperparameter. Training curves on a randomly generated quadratic loss problem with different learning rate initializations.

Limitations and Future Work

  • Late-Stage Stagnation: While the optimizer excels at early-to-mid training on large-scale tasks like ImageNet, its progress stalls later in training, where the loss approaches a constant value. The authors identify fixing this late-stage convergence issue as a primary goal for future work.
  • Wall-Clock Overhead: For small batch sizes, the computational overhead of running the hierarchical RNN makes it slower in wall-clock time than standard SGD or ADAM, though this overhead becomes negligible as the batch size increases.

Summary updated

BibTeX
@inproceedings{wichrowska2017learned,
  author = {Olga Wichrowska and Niru Maheswaranathan and Matthew W. Hoffman and Sergio Gomez Colmenarejo and Misha Denil and Nando de Freitas and Jascha Sohl-Dickstein},
  title = {{Learned Optimizers that Scale and Generalize}},
  booktitle = {International Conference on Machine Learning},
  year = {2017},
  url = {https://openreview.net/forum?id=rkWLPh-dWB},
}
Figure