What does N-way K-shot classification mean?
few-shot evaluation vocabulary.
N is classes per episode, K is labeled examples per class in the support set, prediction is on a separate query set.
confusing K with total training data or swapping N and K.
WHAT THIS TESTS: It checks fluency with the standard episodic protocol used to benchmark few-shot learners such as Prototypical Networks, Matching Networks, and MAML, and whether you grasp why test classes are unseen.
A GOOD ANSWER COVERS: In an N-way K-shot episode, N is the number of distinct classes the model must distinguish, and K is the number of labeled examples provided per class. Those labeled examples form the support set, containing N times K images total. The model uses the support set to adapt its parameters or to compute class representations, then predicts labels for a separate query set drawn from the same N classes but with images it has not seen in that episode. Evaluation averages accuracy over many randomly sampled episodes. Common configurations are 5-way 1-shot and 5-way 5-shot. Crucially, the classes in test episodes are typically novel and disjoint from the meta-training classes, which is what makes the task few-shot rather than ordinary supervised learning.
COMMON WRONG ANSWERS: Saying N is the number of examples and K the number of classes, which reverses the definition. Believing the model trains a fresh classifier from scratch on K samples, ignoring that the value comes from meta-learning. Forgetting the query set exists, or forgetting that test classes must be unseen to measure generalization.
LIKELY FOLLOW-UPS: Why does increasing K generally raise accuracy. How does a Prototypical Network use the support set to form class prototypes. What is the query set used for. How does this episodic split differ from a normal train and test split in supervised learning.
ONE CONCRETE EXAMPLE: A 5-way 1-shot episode samples five bird species the model never trained on, gives one labeled photo of each, then asks the model to label fifteen new query photos as one of those five species. A 5-way 5-shot version gives five photos per species, which is easier because each class prototype is estimated from more examples, reducing variance in the representation.
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.