This paper studies meta-learning, where an agent is trained on a distribution of tasks so that it can learn a previously unseen task from the same distribution quickly. The authors analyze a family of algorithms that learns a parameter initialization fine-tunable on new tasks using only first-order derivatives. This family includes first-order MAML and Reptile, a new algorithm the authors introduce. The paper extends earlier results showing these first-order methods perform well on few-shot classification benchmarks, and it offers theoretical analysis of why they work.
### Problem Setting
- A meta-learner is trained over a distribution of tasks.
- The goal is an initialization that adapts quickly, so the agent performs well on an unseen task after only a few gradient steps.
### First-Order Meta-Learning Algorithms
- The family analyzed uses only first-order derivatives in its meta-updates.
- It includes first-order MAML, which approximates MAML by dropping second-order derivative terms.
- It generalizes these first-order methods within a single analytical framework.
### Reptile
- Reptile repeatedly samples a task, trains on it, and moves the initialization toward the weights obtained on that task.
- It is a first-order method, so it avoids the cost of computing second-order derivatives.
### Empirical and Theoretical Findings
- The results extend Finn et al. and show that first-order methods perform well on established few-shot classification benchmarks.
- The authors provide theoretical analysis aimed at explaining why these first-order algorithms succeed.
# Reptile: A Simple, Scalable Meta-Learning Algorithm
Reptile is a meta-learning algorithm that finds a neural network initialization from which new tasks can be learned quickly from few examples. It works by repeatedly sampling a task, running standard SGD on it, and moving the initial parameters toward the adapted result. Mathematically it resembles first-order MAML, but it needs only black-box access to an optimizer such as SGD or Adam, and it achieves similar performance with lower computational cost.
## Meta-Learning and the Few-Shot Setting
- Meta-learning takes a distribution of tasks, each a learning problem, and produces a learner that generalizes from a small number of examples.
- A well-studied case is few-shot classification, where the learner sees only 1–5 examples per class before classifying new inputs.
## How Reptile Differs from MAML
- MAML unrolls and differentiates through the gradient descent computation graph, which requires second derivatives.
- Reptile runs ordinary SGD on each task and never builds a computation graph or computes second derivatives, so it uses less computation and memory.
- The update moves the initialization toward the task-adapted parameters. Treating that difference as a gradient allows plugging it into a more sophisticated optimizer such as Adam.
## Why It Works
- With one SGD step per task (k=1), the method reduces to joint training on the mixture of all tasks. Joint training learns little when zero-shot learning is impossible, such as when output labels are randomly permuted.
- Reptile requires multiple steps (k>1), where the update depends on higher-order derivatives of the loss.
- A Taylor-series analysis shows that the Reptile update maximizes the inner product between gradients from different minibatches of the same task, which corresponds to better generalization. The authors suggest this may also help explain the generalization of SGD outside meta-learning.
- Reptile and MAML produce similar updates, containing the same two terms with different weights.
## Experimental Results
- On the Omniglot and Mini-ImageNet few-shot classification benchmarks, Reptile and MAML perform similarly.
- Reptile converges faster because its update has lower variance.
- Summing different combinations of SGD minibatch gradients yields a family of algorithms. Using only the second gradient corresponds to first-order MAML. Including more gradients speeds learning through variance reduction, and using only the first gradient makes no progress, as the analysis predicts.
## Implementations
- The official implementation uses TensorFlow and includes code to replicate the Omniglot and Mini-ImageNet experiments.
- A smaller JavaScript implementation fine-tunes a TensorFlow-pretrained model and powers the interactive 1-shot classification demo.
- A minimal PyTorch example performs few-shot regression on random sine waves from 10 (x, y) pairs.
## Relationship to Prior Work
The authors note that first-order MAML and Reptile are more closely related than the names suggest. They take different perspectives but compute similar updates. Reptile's contribution builds on Shortest Descent and on avoiding second derivatives in meta-learning. The post's first paragraph was updated to reflect this.