support set
**Support Set** is the **small collection of labeled examples provided at inference time in few-shot learning that defines the classes a model must distinguish, forming the episodic context from which the learner classifies new query examples** — enabling meta-learned models to rapidly adapt to novel classification tasks using only a handful of demonstrations per class, without any gradient-based fine-tuning on the new task.
**What Is a Support Set?**
- **Definition**: The set of K labeled examples per class provided at test time in N-way K-shot evaluation — "5-way 1-shot" means 5 classes with 1 labeled example each, giving 5 total support examples.
- **N-way K-shot Structure**: N classes × K examples each = N×K total support examples; the model classifies query examples using only these support examples as context.
- **Episodic Evaluation**: Each episode samples a new support set and query set; models must classify queries using only the current support context — simulating real deployment conditions.
- **No Gradient Updates**: Unlike fine-tuning, the support set is used for retrieval, comparison, or in-context learning — not backpropagation through the model weights.
**Why Support Sets Matter**
- **Data-Efficient Deployment**: New classes can be registered by providing a handful of examples rather than collecting hundreds of labeled samples.
- **Dynamic Class Expansion**: Adding a new product, person, or category requires only a few support examples at inference time — no retraining pipeline needed.
- **Realistic Evaluation**: Support sets simulate real-world scenarios where users have limited examples of novel categories they want to classify.
- **Meta-Learning Benchmark**: Few-shot benchmarks (miniImageNet, Omniglot, FEWGLUE) standardize support set protocols for fair comparison of meta-learning algorithms.
- **In-Context Learning**: Large language models treat prompt examples as an implicit support set, adapting behavior without any weight updates.
**How Support Sets Are Used**
**Metric Learning (Prototypical Networks)**:
- Compute per-class prototype as mean embedding of support examples for that class.
- Classify query by nearest prototype in embedding space using cosine or Euclidean distance.
- Support set size (K) directly controls prototype quality — more shots yield more representative prototypes.
**Meta-Learning (MAML)**:
- Support set used for the inner-loop gradient update during both meta-training and meta-testing.
- Model adapts rapidly to support distribution; query set evaluates generalization after adaptation.
- At test time, a few gradient steps on support examples adapt the model to the new task distribution.
**In-Context Learning (LLMs)**:
- Support examples appear in the prompt as formatted input-output demonstrations before the query.
- Model performs in-context inference without any parameter updates — pure forward pass.
- Performance sensitive to example ordering, formatting, and representativeness of the class.
**Support Set Selection Strategies**
| Strategy | Description | Performance Impact |
|----------|-------------|-------------------|
| **Random** | Sample K examples randomly per class | High variance baseline |
| **Diverse** | Maximize intra-class visual coverage | More robust prototypes |
| **Prototypical** | Select examples near class centroid | Reduces outlier effects |
| **Hard** | Include challenging boundary examples | Tests model limits |
Support Set is **the episodic memory that enables few-shot generalization** — the minimal labeled context that transforms a general-purpose embedding model into a task-specific classifier for any novel category encountered at deployment time, making it the foundational concept of practical few-shot and meta-learning systems.