Skip to main content
QUICK REVIEW

[Paper Review] A Theoretical Analysis of the Number of Shots in Few-Shot Learning

Tianshi Cao, Marc T. Law|arXiv (Cornell University)|Sep 25, 2019
Domain Adaptation and Few-Shot LearningComputer Science29 references12 citations
TL;DR

This paper proposes a theoretical analysis of how the number of shots (k) in few-shot learning affects Prototypical Networks, identifying that k influences performance through intra-class variance scaling. It introduces Embedding Space Transformation (EST), a method that restructures the embedding space to maximize inter-to-intra class variance ratio, significantly reducing performance degradation when training and testing shot numbers mismatch, achieving robust accuracy across diverse shot settings on benchmark datasets.

ABSTRACT

Few-shot classification is the task of predicting the category of an example from a set of few labeled examples. The number of labeled examples per category is called the number of shots (or shot number). Recent works tackle this task through meta-learning, where a meta-learner extracts information from observed tasks during meta-training to quickly adapt to new tasks during meta-testing. In this formulation, the number of shots exploited during meta-training has an impact on the recognition performance at meta-test time. Generally, the shot number used in meta-training should match the one used in meta-testing to obtain the best performance. We introduce a theoretical analysis of the impact of the shot number on Prototypical Networks, a state-of-the-art few-shot classification method. From our analysis, we propose a simple method that is robust to the choice of shot number used during meta-training, which is a crucial hyperparameter. The performance of our model trained for an arbitrary meta-training shot number shows great performance for different values of meta-testing shot numbers. We experimentally demonstrate our approach on different few-shot classification benchmarks.

Motivation & Objective

  • To understand the theoretical impact of shot number (k) on few-shot classification performance in Prototypical Networks.
  • To identify why performance degrades when the number of shots used during meta-training differs from that used during meta-testing.
  • To develop a method that improves generalization across varying shot numbers, reducing dependency on precise k matching.
  • To connect the shot number to the intrinsic dimensionality of the embedding space using VC-learnability theory.
  • To propose a practical, robust method for few-shot learning that maintains high accuracy regardless of shot number mismatch.

Proposed method

  • Theoretical analysis derives a performance bound for ProtoNets, showing that k scales the contribution of intra-class variance to classification error.
  • VC-learnability theory is applied to link the number of shots during meta-training to the intrinsic dimension of the embedding space.
  • A novel method called Embedding Space Transformation (EST) is proposed to restructure the embedding space by maximizing the ratio of inter-class to intra-class variance.
  • EST applies a linear transformation to the embedding space that preserves dimensionality while enhancing class separability.
  • The method is trained end-to-end with the meta-learner, allowing it to adapt to any shot number during inference without retraining.
  • Empirical validation is conducted on standard few-shot benchmarks (e.g., miniImageNet, CUB200) under varying shot settings.

Experimental results

Research questions

  • RQ1How does the number of shots used during meta-training affect the generalization performance of Prototypical Networks?
  • RQ2What is the theoretical relationship between shot number and the intrinsic dimensionality of the embedding space?
  • RQ3Why does performance degrade when the shot number used in meta-training differs from that in meta-testing?
  • RQ4Can a single model be trained to perform well across multiple shot numbers without retraining?
  • RQ5How does the proposed method improve robustness to shot number mismatch compared to standard ProtoNets?

Key findings

  • A 10-shot trained ProtoNet exhibits a 9% absolute drop in 1-shot accuracy compared to a 1-shot trained model, demonstrating significant performance degradation under shot mismatch.
  • Theoretical analysis shows that the shot number k scales the contribution of intra-class variance to the classification error, directly impacting model performance.
  • The intrinsic dimension of the embedding space is shown to vary with the number of shots used during meta-training, as derived from VC-learnability theory.
  • The proposed EST method improves performance on challenging benchmarks like miniImageNet and CUB200, especially under mismatched shot conditions.
  • EST achieves state-of-the-art robustness across different shot numbers, outperforming both standard ProtoNets and direct PCA-based dimensionality reduction.
  • Empirical results confirm that EST's performance gain is not solely due to dimensionality reduction, but stems from improved class separability in the transformed space.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.