## TL;DR
Few-shot learning teaches AI to recognize new concepts from just a handful of examples -- the way humans learn (see one panda, recognize all pandas). From Prototypical Networks to MAML to in-context learning in foundation models, the ability to generalize from few examples is transforming AI from narrow specialists to flexible generalists.
## Core Explanation
The N-way K-shot classification problem: given N classes with K labeled examples each, classify a new query example. Meta-learning (learning to learn): train on many small tasks (episodes), each with N-way K-shot structure. Three paradigms: (1) Metric-based -- ProtoNet computes class prototypes as mean embedding of support examples, classifies query by nearest-prototype distance; (2) Optimization-based -- MAML trains parameters such that one gradient step on a new task's loss produces good performance; (3) Hallucination-based -- generate additional training examples via data augmentation or generative models.
## Detailed Analysis
ProtoNet (Snell et al., 2017): embedding function maps inputs to a metric space where Euclidean distance corresponds to semantic similarity. Compute prototype per class, classify query as closest prototype. Works well when classes are visually distinct, struggles with fine-grained categories. MAML (Finn et al., 2017): learns initialization sensitive to task-specific gradients. Inner loop: task-specific adaptation (few gradient steps). Outer loop: meta-update across tasks. Foundation model few-shot: rather than meta-training, simply prompt a frozen LLM with examples. Key observation (Min et al., 2022): demonstration labels need not be correct -- model learns task format, not specific answers. Ground-truth labels provide marginal gain over random labels. Applications: medical imaging (rare disease classification), personalized NLP, and robotics (adapting manipulation to novel objects).
## Further Reading
- Learn2Learn: PyTorch Meta-Learning Library
- Meta-Dataset: Few-Shot Learning Benchmark
- ChatGPT Few-Shot Prompting Guide