Meta-Learning with Implicit Gradients

Aravind Rajeswaran, Chelsea Finn, Sham M. Kakade, Sergey Levine

arXiv (Cornell University) · 2019 · 217 citations · 0 references

DOIFull text

Open access

Concepts

TL;DR

Intelligent systems must quickly learn new tasks from prior experience, and gradient‑based meta‑learning has emerged as an effective few‑shot approach, but scaling it is hampered by the computational and memory costs of differentiating through the inner‑loop learning process. The authors develop implicit MAML, an algorithm that uses implicit differentiation to compute meta‑gradients based only on the inner‑loop solution, avoiding dependence on the optimizer path. Implicit MAML learns meta‑parameters in an outer loop while task‑specific models are trained in an inner loop on limited data, using implicit differentiation so that the meta‑gradient depends only on the inner‑loop solution and is independent of the optimizer choice. Implicit MAML achieves optimizer‑agnostic meta‑learning, avoids vanishing gradients and memory limits, and, as proven theoretically and validated experimentally, matches the memory cost of a single inner‑loop gradient while delivering empirical gains on few‑shot image‑recognition benchmarks.

Abstract

A core capability of intelligent systems is the ability to quickly learn new tasks by drawing on prior experience. Gradient (or optimization) based meta-learning has recently emerged as an effective approach for few-shot learning. In this formulation, meta-parameters are learned in the outer loop, while task-specific models are learned in the inner-loop, by using only a small amount of data from the current task. A key challenge in scaling these approaches is the need to differentiate through the inner loop learning process, which can impose considerable computational and memory burdens. By drawing upon implicit differentiation, we develop the implicit MAML algorithm, which depends only on the solution to the inner level optimization and not the path taken by the inner loop optimizer. This effectively decouples the meta-gradient computation from the choice of inner loop optimizer. As a result, our approach is agnostic to the choice of inner loop optimizer and can gracefully handle many gradient steps without vanishing gradients or memory constraints. Theoretically, we prove that implicit MAML can compute accurate meta-gradients with a memory footprint that is, up to small constant factors, no more than that which is required to compute a single inner loop gradient and at no overall increase in the total computational cost. Experimentally, we show that these benefits of implicit MAML translate into empirical gains on few-shot image recognition benchmarks.