Prototype Rectification for Few-Shot Learning

Jinlu Liu, Liang Song, Yongqiang Qin

Abstract

Prototypical Networks are a cornerstone of few-shot learning (FSL), yet they suffer from biased prototype estimation due to extreme data scarcity. This paper presents a "Prototype Rectification" framework that addresses intra-class and cross-class biases through pseudo-labeling and feature shifting. By operating in a transductive setting, the proposed Bias-Diminishing Cosine Similarity Prototypical Network (BD-CSPN) leverages unlabeled query data to refine class representations. Experimental results on miniImageNet, tieredImageNet, and Meta-Dataset demonstrate that this simple yet effective approach achieves state-of-the-art performance without the need for complex meta-learning optimizations.

Introduction

In Few-Shot Learning (FSL), the objective is to recognize novel objects using only a handful of labeled examples, known as the support set. A popular approach is the Prototypical Network, which computes a "prototype" (the mean vector) for each class and classifies new "query" samples based on their distance to these prototypes.

The fundamental challenge in this paradigm is data scarcity. When only 1 or 5 samples are available, the calculated mean is often a poor representation of the true class distribution. The authors identify two specific types of bias that degrade performance:

  1. Intra-Class Bias: The discrepancy between the expected (true) class center and the prototype computed from a tiny support set.
  2. Cross-Class Bias: The distribution shift between the support set (training) and the query set (testing), often resulting from independent sampling from a limited pool.

Methodology

The proposed framework, BD-CSPN (Bias-Diminishing Cosine Similarity Prototypical Network), operates in a transductive setting, utilizing the entire batch of unlabeled query samples to improve predictions through a multi-step rectification process.

The BD-CSPN framework pipeline, illustrating the rectification of prototypes through cross-class ($BD_{cross}$) and intra-class ($BD_{intra}$) bias diminishing steps.

1. Cosine Similarity Based Prototypical Network (CSPN)

Instead of standard Euclidean distance, the model employs a cosine similarity-based classifier. This approach encourages the model to learn a discriminative embedding space where features of the same class cluster tightly on a hypersphere, facilitating better separation.

2. Diminishing Cross-Class Bias (Feature Shifting)

To address the distribution shift between support and query sets, the authors introduce a shifting term $\xi$. This term represents the difference between the mean of all support features and the mean of all query features. By shifting query features toward the support set center ($BD_{cross}$), the distributions are aligned before classification.

3. Diminishing Intra-Class Bias (Pseudo-Labeling)

To rectify "noisy" prototypes, the model performs label propagation. It predicts labels for unlabeled query samples, and those with the highest similarity to initial prototypes are added to the support set. To ensure robustness against misclassification, the rectified prototype is calculated as a weighted sum ($BD_{intra}$) of the original support features and the pseudo-labeled query features.

Theoretical Analysis

A key contribution of this work is a rigorous theoretical analysis proving that the lower bound of expected accuracy is positively correlated with the number of samples used to compute the prototype. This provides a mathematical justification for pseudo-labeling: by artificially increasing the sample size, the model effectively raises the performance floor.

Unlike many meta-learning approaches that require complex, second-order gradient optimizations (e.g., MAML), this method acts as a smart post-processing step. It can be applied to a standard backbone trained with simple cross-entropy loss, making it both powerful and computationally efficient.

Experimental Results

BD-CSPN achieved state-of-the-art (SOTA) performance on major FSL benchmarks at the time of publication:

  • miniImageNet: Reached 70.31% on 1-shot and 81.89% on 5-shot tasks.
  • tieredImageNet: Reached 78.74% on 1-shot and 86.92% on 5-shot tasks.
  • Meta-Dataset: The model demonstrated strong generalization across diverse domains (e.g., Omniglot, Aircraft), proving the bias-diminishing logic is robust beyond ImageNet-derived datasets.

Conclusion and Limitations

Prototype Rectification offers a simple yet potent solution to the data scarcity problem in FSL. However, the method relies on a transductive setting, requiring a batch of query samples for feature shifting and pseudo-labeling. Future work may explore how these bias-diminishing strategies can be integrated directly into the training phase or adapted for streaming scenarios where query samples arrive individually.

Summary updated

BibTeX
@inproceedings{liu2020prototype,
  author = {Jinlu Liu and Liang Song and Yongqiang Qin},
  title = {{Prototype Rectification for Few-Shot Learning}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58452-8\_43},
}
Figure