Course contentsShow
← Machine Learning and Deep Learning
Lesson 2608 of 3,53856. Few-Shot and Meta-LearningFree lesson

Model-Agnostic Meta-Learning (MAML) Overview

Introduction to MAML: learning initialization parameters that enable fast adaptation through few gradient steps.

Model-Agnostic Meta-Learning (MAML) Overview

What you'll learn: How MAML finds optimal model initialization parameters that allow rapid adaptation to new tasks with just a few gradient steps.

The Core Problem

In meta-learning, we want models that can quickly adapt to new tasks. But what does "quick" really mean? MAML's brilliant insight is this: instead of learning fixed weights for a specific task, learn initialization weights that are just a few gradient steps away from good performance on any new task.

The MAML Approach

Think of MAML like teaching someone to learn quickly rather than teaching them facts. Imagine you're training a student to become good at learning new languages. Rather than making them fluent in one language, you position their foundational knowledge so that with just a few hours of practice, they can speak basic phrases in any new language.

MAML does this by:

  1. Finding an initialization point in parameter space
  2. From that point, any new task can be learned with minimal gradient updates (typically 1-5 steps)
  3. The initialization is "meta-learned" across many training tasks

How It Works in Practice

During meta-training, MAML:

  • Samples a batch of tasks from the meta-training set
  • For each task, takes the current initialization and performs a few gradient steps using the support set
  • Evaluates the adapted model on the query set
  • Updates the initialization based on how well all these quick adaptations performed

The magic is in the bi-level optimization: you're computing gradients through the gradient descent process itself.

Why "Model-Agnostic"?

MAML works with any model trained via gradient descent—CNNs, RNNs, even fully connected networks. The algorithm doesn't care about architecture; it only needs differentiable parameters.

Key Takeaway: MAML learns a single initialization point that enables any gradient-based model to rapidly adapt to new tasks through just a few optimization steps, making it a powerful and flexible meta-learning algorithm.