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:
- Sample a task from the task distribution.
- Perform $k$ steps of standard stochastic gradient descent (SGD) or Adam on that specific task to compute updated weights.
- Move the original initialization weights slightly toward these newly trained weights.
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.
- 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