Few-shot Learning
Few-shot learning means a model can learn to recognize a new class from only a handful of examples (usually 1 to 5). It mimics human ability: a person who has seen one photo of a zebra can recognize every zebra, while conventional deep learning needs hundreds or thousands of images.
Why It Is Hard
Deep learning is essentially about estimating regularities from large samples. When the sample count drops to single digits, the model cannot estimate the within-class distribution and easily overfits to the surface features of a few examples (background color rather than the object itself).
Three Technical Routes
Meta-learning: train the model to "learn how to learn." MAML (Model-Agnostic Meta-Learning) looks for an initial set of parameters such that, starting from them, a few gradient steps on a few samples yield good performance on a new task. What it trains is a good starting point, not a good result.
Metric learning: learn an embedding space where samples of the same class are close and different classes are far apart. Siamese networks compare the similarity of two images; Prototypical Networks compute a prototype vector per class and classify by nearest prototype. No parameter update is needed at inference time.
Data augmentation and generation: use GANs or diffusion models to synthesize extra samples, turning a few-shot problem back into a many-shot one.
Few-shot in the Large-Model Era
After GPT-3, few-shot took on a new meaning: in-context learning. Without changing any model parameters, a few examples placed in the prompt let the model infer the task format and handle a new sample. This is one of the most striking abilities of large models, and it laid the groundwork for prompt engineering.
Key Points
Choosing examples matters more than how many you use. Studies show that 4 carefully selected examples can beat 16 randomly chosen ones. Example order also affects results (known as recency bias, where the model pays more attention to later examples).
Applications
Rare disease diagnosis (very few cases), defect detection for new products (no time to collect data), low-resource language translation, cold start in personalized recommendation, and prompt design for large models.