The paper explains why Reptile works well from two viewpoints.
Encouraging Generalization Within a Task
Taylor-expanding the gradients of the inner updates and keeping terms up to first order in the learning rate α, the expected updates of MAML, FOMAML, and Reptile are all combinations of the following two kinds of terms (for two inner steps).
- AvgGrad: The gradient of the average task loss Eτ,1[gˉ1]. This term pushes toward the minimum of joint training.
- AvgGradInner: Eτ,1,2[Hˉ2gˉ1], which equals half the gradient of the inner product gˉ1⋅gˉ2 of gradients from different minibatches of the same task. Moving opposite to this term shifts the weights so that within the same task, training on one minibatch also lowers the loss on another minibatch.
E[gMAML]=AvgGrad−2αAvgGradInner,E[gFOMAML]=AvgGrad−αAvgGradInner,E[gReptile]=2AvgGrad−αAvgGradInner
(All omit O(α2) terms.) This shows that even though Reptile computes no second-order derivatives, running SGD while switching minibatches in turn naturally includes the same kind of second-order term as MAML. The weight of AvgGradInner is in the order MAML > FOMAML > Reptile, but in all of them it grows in proportion to the learning rate α and the number of steps k.
Finding a Point Close to Every Task's Optimum
The other explanation is one the paper itself notes is "not rigorous." Let Wτ be the set of optimal weights for task τ, and D(ϕ,Wτ) the Euclidean distance to it. An initialization close to the optima of all tasks is a point that minimizes the following.
ϕminEτ[21D(ϕ,Wτ)2]
The gradient of this objective is ϕ−PWτ(ϕ) (where P is the projection onto the nearest optimum), so one SGD step on a single task gives ϕ←ϕ−ϵ(ϕ−PWτ(ϕ)). Since the projection cannot be computed directly, Reptile's update substitutes "the weights after k training steps" ϕ~ for it.