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

On First-Order Meta-Learning Algorithms

Alex Nichol, Joshua Achiam, John SchulmanarXiv 2018

TL;DR

This paper introduces Reptile, a remarkably simple first-order meta-learning algorithm that discovers optimal parameter initializations for fast adaptation to new tasks. By avoiding the computationally expensive second-order derivatives required by standard Model-Agnostic Meta-Learning (MAML), Reptile achieves comparable performance on few-shot classification benchmarks while being as easy to implement as standard joint training.

What Problem Does This Paper Address?

Meta-learning, or "learning to learn," aims to train models that can rapidly adapt to new, unseen tasks using only a handful of examples (few-shot learning). A prominent approach is MAML, which looks for a network initialization from which a few steps of gradient descent yield excellent performance on any target task.

However, MAML achieves this by differentiating through the gradient descent steps of the inner loop. This requires computing second-order derivatives (Hessians), which is computationally expensive, memory-intensive, and complex to implement. While a simplified version called First-Order MAML (FOMAML) drops these second-order terms to save computation, the machine learning community lacked a rigorous theoretical understanding of why such first-order approximations perform so well, and whether even simpler formulations were possible.

Methods

The authors introduce Reptile, a first-order meta-learning algorithm that operates via a surprisingly straightforward loop:

  1. Sample a task from the task distribution.
  2. Perform $k$ steps of standard stochastic gradient descent (SGD) or Adam on that specific task to compute updated weights.
  3. Move the original initialization weights slightly toward these newly trained weights.
The serial version of the Reptile algorithm.

Unlike MAML and FOMAML, Reptile does not require splitting each task's data into separate training and validation sets during the meta-training phase.

To explain why this works, the authors perform a mathematical analysis using a Taylor series expansion. They demonstrate that when executing multiple sequential gradient steps ($k > 1$), the update rule implicitly generates a second-order term called AvgGradInner. This term maximizes the inner product (agreement) between gradients computed on different minibatches of the same task, directly optimizing the model for within-task generalization.

Datasets

The authors evaluated their approach on three benchmarks:

  • 1D Sine Wave Regression: A toy problem where the model must predict a sine wave's shape from just a few sampled points.
  • Omniglot: A few-shot dataset containing handwritten characters across 50 different alphabets.
  • Mini-ImageNet: A challenging few-shot image classification dataset derived from ImageNet, featuring 100 diverse classes.

Key Insights and Ideas

  • The Power of Multi-step Updates: If Reptile only takes a single gradient step ($k=1$), it reduces to standard joint training (minimizing expected loss across all tasks). However, taking multiple steps ($k > 1$) allows the algorithm to exploit the non-linearity of the optimization landscape, injecting higher-order derivative information that forces the model to learn a flexible initialization.
  • Geometric Intuition: Geometrically, Reptile can be viewed as an algorithm that finds a point in parameter space that minimizes the Euclidean distance to the optimal solution manifolds of all training tasks.
Figure 2: The above illustration shows the sequence of iterates obtained by moving alternately towards two optimal solution manifolds W1 and W2 and converging to the point that minimizes the average squared distance. One might object to this picture on the grounds that we converge to the same point regardless of whether we perform one step or multiple steps of gradient descent. That statement is true, however, note that minimizing the expected distance objective Eτ [D(φ, Wτ)] is different than minimizing the expected loss objective Eτ [Lτ(fφ)]. In particular, there is a high-dimensional manifold of minimizers of the expected loss Lτ (e.g., in the sine wave case, many neural network parameters give the zero function f(φ) = 0), but the minimizer of the expected distance objective is typically a single point.
  • Data Overlap Robustness: FOMAML is highly sensitive to how minibatches are sampled; its performance drops significantly if the final gradient step uses data that overlaps with earlier steps. Reptile, by contrast, is highly robust to minibatch cycling and overlap.

Key Results

Reptile performs competitively with MAML and FOMAML across standard few-shot classification benchmarks:

  • Mini-ImageNet: In the 5-way, 5-shot classification setup with transduction (sharing information between test samples via batch normalization), Reptile achieved 65.99% ± 0.58% accuracy, outperforming MAML's 63.11% ± 0.92%. In the 1-shot setup, Reptile reached 49.97% ± 0.32% compared to MAML's 48.70% ± 1.84%.
  • Omniglot: Reptile achieved 99.48% accuracy on 5-way, 5-shot classification with transduction, matching MAML's 99.9% within a fraction of a percent.

Limitations and Future Work

  • Theoretical Bounds: The Taylor series expansion used to justify the algorithm only holds strictly for small total learning steps ($\alpha k$).
  • Reinforcement Learning: While highly effective for vision and regression, the authors noted that Reptile yielded negative results when applied to reinforcement learning problems, where standard joint training remained a stubborn baseline to beat.
  • Regularization Gap: There remains a significant gap between training and testing errors in few-shot settings, suggesting that exploring better regularization techniques alongside Reptile is a vital next step.

Summary updated

BibTeX
@misc{nichol2018first,
  author = {Alex Nichol and Joshua Achiam and John Schulman},
  title = {{On First-Order Meta-Learning Algorithms}},
  year = {2018},
  eprint = {1803.02999},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1803.02999},
}
Figure