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.
This post proposes two meta-reinforcement learning algorithms, E-MAML and E-RL², designed to improve exploration. The authors argue that standard meta-RL methods often fail when an agent must actively explore to find useful information, and they show that both algorithms perform better on tasks where exploration matters.
## Proposed Algorithms
- **E-MAML** extends Model-Agnostic Meta-Learning (MAML) to encourage exploration.
- **E-RL²** extends RL² (Fast Reinforcement Learning via Slow Reinforcement Learning) with the same goal.
## Evaluation Environments
- **Krazy World**: a novel environment the authors created to test exploration.
- **Maze environments**: a set of maze tasks where finding the goal requires exploring unfamiliar layouts.
## Results
- Both E-MAML and E-RL² outperform their baselines on tasks where exploration is important.
This OpenAI post shows that meta-learning can help simulated robots adapt during a competition. A meta-learning agent defeated a stronger non-meta-learning opponent by adjusting its tactics between rounds, and it could also adjust to physical damage. The authors extended Model-Agnostic Meta-Learning (MAML) so that it optimizes across pairs of environments rather than single ones, which lets policies adapt to unseen environments that are not too different from the training ones.
### Extending MAML with Paired Environments
- MAML initializes an agent's policy so that a few gradient ascent steps on the reward from early episodes in a new environment produce better performance there.
- The authors changed the objective to optimize against pairs of environments instead of single ones, producing policies that adapt quickly to new environments as long as they do not diverge too wildly from the training set.
### Multi-Round Wrestling Experiments
- Three agent types were built: Ant (4 legs), Bug (6 legs), and Spider (8 legs).
- Agents played a multi-round game against the same opponent and updated their policy parameters between rounds to counter the opponent's strategy.
- Over a hundred agents were trained, some with fixed policies and others with the ability to adapt. Adaptive agents were much stronger competitors than fixed-policy agents.
### Adapting to Physical Malfunction
- The same on-the-fly learning let agents cope with changes to their own bodies, such as limbs losing function over time.
- The authors suggest this approach could handle both external environmental changes and internal changes to an agent's body or state.
The work is part of OpenAI's large-scale multi-agent research, and the authors released the MuJoCo environments and trained policies so others can experiment with these systems.