Support Set vs Query Set
What you'll learn: How few-shot learning splits data into a small labeled support set for learning and a query set for evaluation.
The Core Distinction
In few-shot learning, each task is organized into two distinct subsets:
Support Set: A small collection of labeled examples that the model uses to quickly adapt or "learn" the new task. In N-Way K-Shot learning, this contains exactly K examples per class across N classes. Think of this as your mini training set for the current task.
Query Set: Unlabeled examples from the same classes that the model must classify after "seeing" the support set. This is your test set for evaluating how well the model generalized from those few support examples.
The Learning Flow
The process works like this:
- The model receives the support set (e.g., 5 classes with 1 example each in 5-way 1-shot)
- The model adapts its predictions based on these examples
- The model then predicts labels for the query set
- Performance is measured on the query set
A Practical Analogy
Imagine learning to identify rare birds:
- Support Set: A field guide showing you 1 photo each of 5 new bird species with their names
- Query Set: You then go bird-watching and must correctly identify these 5 species in the wild
The support set is your reference material; the query set tests whether you truly learned to distinguish them.
Why This Matters
This separation ensures the model doesn't just memorize the support examples but learns meaningful patterns that generalize. The query set acts as the held-out test data within each episode, measuring true few-shot learning ability.
Key Takeaway: The support set provides the few labeled examples for task adaptation, while the query set evaluates generalization—both are essential components of every few-shot learning episode.