NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning to Optimize

Ke Li, Jitendra Malik

TL;DR

Instead of manually engineering optimization algorithms like Adam or L-BFGS, why not let a machine learn the best way to navigate an error surface? This paper frames optimization as a reinforcement learning problem, using Guided Policy Search to train a neural network "policy" that outperforms traditional hand-designed algorithms in speed and final objective value across both convex and non-convex tasks.

The Problem: Manual Algorithm Design

Optimization is the workhorse of modern machine learning, yet designing a good optimizer is a laborious, iterative process of trial and error. Traditional algorithms (like Gradient Descent or Conjugate Gradient) are often designed based on theoretical analysis of convex functions. Unfortunately, this theory doesn't always translate well to the messy, highly non-convex landscapes of deep neural networks.

The authors ask a provocative question: If we use machine learning to replace manually designed features in vision and NLP, why are we still using manually designed algorithms to train those models? The goal of this research is to automate algorithm design by learning an update rule—a function $\pi$ that takes the history of gradients and objective values and predicts the optimal next step.

Methodology: Optimization as an MDP

The authors treat the execution of an optimization algorithm as a Markov Decision Process (MDP):

  • State: The current iterate ($x$), plus a history of previous gradients and changes in objective values (using a window of the last 25 steps).
  • Action: The step vector ($\Delta x$) used to update the current position.
  • Cost Function: The value of the objective function at the current iterate. By minimizing the cumulative cost over time, the agent is incentivized to find the global minimum as quickly as possible.

To learn this policy, they use Guided Policy Search (GPS). The policy itself is a relatively small neural network (one hidden layer with 50 units). Interestingly, they initialize the training process using trajectories from a standard optimizer (Gradient Descent with Momentum) to give the model a "warm start" before letting it explore and improve upon those strategies.

Datasets and Tasks

The "datasets" in this paper are actually families of objective functions generated from synthetic data. The authors evaluate their learned optimizer on three distinct classes:

  1. Logistic Regression: A standard convex problem.
  2. Robust Linear Regression: Using the Geman-McClure estimator, which makes the problem non-convex.
  3. Neural Network Classifier: A two-layer ReLU network where the error surface is complex with many local minima.

For each class, they generated training sets (e.g., 80-120 objective functions) and test sets (100 unseen functions) by varying the underlying data distributions using mixtures of Gaussians.

Key Insights and Ideas

  • Exploiting Geometry: The learned optimizer (dubbed "Predicted Step Descent") learns to exploit the specific regularities of a problem class. For example, it can learn to leverage the piecewise linearity of ReLU activations in a neural network.
  • Generalization Across Time: Even though the optimizer was only trained on trajectories of 40 steps, it successfully generalized to 100 steps at test time without losing stability.
  • Beyond Greediness: Visualization of the trajectories showed that the learned algorithm isn't always strictly greedy. In some cases, it takes smaller steps initially than L-BFGS but makes much larger, more effective leaps later as it approaches the optimum.
  • Robustness to Non-Convexity: While L-BFGS is a powerhouse for convex problems, it often diverges on non-convex robust regression tasks. The learned optimizer remained stable and outperformed all baselines in these challenging settings.

Key Results

  • The "Margin of Victory": The authors introduced a metric called the "margin of victory"—the difference between an algorithm's performance and the best of its competitors. The learned optimizer maintained a positive margin across almost all iterations for the tested problem classes.
  • Speedup: In the neural network training task, the learned optimizer reached significantly lower objective values much faster than Momentum or Conjugate Gradient.
  • Oscillation Avoidance: Qualitative analysis of the optimization paths showed that the learned model was better at overshooting and recovering quickly without the heavy oscillations that plague standard Gradient Descent.

Limitations and Future Work

  • Dimensionality: The experiments were conducted on relatively low-dimensional problems (e.g., $d=3$ for regression, small hidden layers for neural nets). Scaling this to high-dimensional "foundation models" remains a significant challenge.
  • Class Specificity: While the optimizer generalizes well within a class (e.g., different logistic regression tasks), it is unclear how well a policy trained on one architecture (like a CNN) would transfer to a completely different one (like a Transformer).
  • Training Overhead: Learning the optimizer itself requires a significant amount of computation. The "meta-training" phase must be fast enough to justify the eventual speedup during the "base-training" phase.

The authors suggest that future work could involve learning even more complex functionals or incorporating second-order information more explicitly into the state representation.

Summary updated

BibTeX
@inproceedings{li2017learning,
  author = {Ke Li and Jitendra Malik},
  title = {{Learning to Optimize}},
  booktitle = {International Conference on Learning Representations},
  year = {2017},
  url = {https://openreview.net/forum?id=ry4Vrt5gl},
}
Figure