Source-linked AI summary
Prototype Rectification for Few-Shot Learning
Jinlu Liu, Liang Song, Yongqiang Qin
TL;DR
Few-shot prototype computation is biased when labeled data are scarce, motivating rectification. The paper combines pseudo-labeling and feature shifting in a transductive method, with theoretical analysis and strong benchmark results.
Problem
Scarce few-shot data biases computed class prototypes away from expected prototypes, limiting their representational ability.
Method
BD-CSPN rectifies prototypes by using pseudo-labeling to reduce intra-class bias and feature shifting to reduce cross-class bias in transductive inference.
Results
The method achieves significant improvements on three few-shot benchmarks, including 8.47% on 1-shot miniImageNet and 9.54% on 1-shot tieredImageNet.
Takeaways & Limitations
Theoretical analysis supports raising the lower bound of expected performance, while experiments report state-of-the-art results for the proposed bias-diminishing approach.
Takeaways & Limitations
The feature-shifting derivation assumes that the same shift can be approximately added to all query samples because their class labels are unknown.
Abstract
from arXiv · showhide
Few-shot learning requires to recognize novel classes with scarce labeled data. Prototypical network is useful in existing researches, however, training on narrow-size distribution of scarce data usually tends to get biased prototypes. In this paper, we figure out two key influencing factors of the process: the intra-class bias and the cross-class bias. We then propose a simple yet effective approach for prototype rectification in transductive setting. The approach utilizes label propagation to diminish the intra-class bias and feature shifting to diminish the cross-class bias. We also conduct theoretical analysis to derive its rationality as well as the lower bound of the performance. Effectiveness is shown on three few-shot benchmarks. Notably, our approach achieves state-of-the-art performance on both miniImageNet (70.31% on 1-shot and 81.89% on 5-shot) and tieredImageNet (78.74% on 1-shot and 86.92% on 5-shot).
1 Introduction
Few-shot prototype matching is hindered by bias from scarce data. The paper identifies intra-class and cross-class bias, then proposes prototype rectification using pseudo-labeling and feature shifting, supported by theory and benchmark experiments.
- Few-shot learning uses prior knowledge from base classes to recognize novel classes with scarce labeled data.
- Prototype matching is common in few-shot learning, but scarcity biases computed prototypes away from their expected representations.
- Prototype rectification reduces intra-class bias through pseudo-labeling and cross-class bias through shifting query features toward support features.
- Theoretical analysis relates expected performance's lower bound to sample count and supports the bias-diminishing strategy's effectiveness.
- The proposed method identifies intra-class and cross-class bias as factors restricting prototype representational ability.
- Experiments on three few-shot benchmarks report state-of-the-art performance and significant improvement from the bias-diminishing module.
2 Related Works
Related work situates the approach among gradient-based and metric-learning methods, transductive inference, and semi-supervised few-shot learning with additional unlabeled data.
- Few-Shot Learning: Few-shot methods include gradient-based adaptation and metric-learning approaches that learn informative similarity relationships.
- Few-Shot Learning: Cosine-similarity classifiers are used to learn discriminative embeddings and classify by cosine distance to class prototypes.
- Transductive Few-Shot Learning: Transductive few-shot learning predicts test samples jointly and has been shown to outperform inductive inference when training data is scarce.
- Semi-Supervised Few-Shot Learning: Semi-supervised few-shot methods use extra unlabeled data, including Soft k-Means prototypes or pseudo-labeling followed by retraining and fine-tuning.
3 Methodology
The method learns a discriminative cosine-similarity embedding, computes few-shot prototypes, and rectifies them by addressing intra-class and cross-class bias in a transductive setting.
- 3.2 Cosine Similarity Based Prototypical Network: At inference, N-way K-shot episodes contain labeled support samples and unlabeled query samples, with prototypes computed from support features.
- 3.2 Cosine Similarity Based Prototypical Network: CSPN trains a feature extractor with a cosine classifier on base classes before computing basic prototypes for few-shot classes.
- 3.2 Cosine Similarity Based Prototypical Network: Basic prototypes are obtained by averaging normalized support features, and queries are classified by nearest-prototype cosine similarity.
- 3.3 Bias Diminishing for Prototype Rectification: Intra-class bias is the difference between the expected prototype from all class data and the prototype computed from scarce available samples.
- 3.3 Bias Diminishing for Prototype Rectification: Pseudo-labeling augments the support set with confidently predicted query samples, creating a higher-data regime for prototype computation.
- 3.3 Bias Diminishing for Prototype Rectification: Weighted prototype rectification accounts for possible pseudo-label errors by assigning weights based on sample relations to basic prototypes.
- 3.3 Bias Diminishing for Prototype Rectification: Cross-class bias is the distributional distance between support and query sets, represented through their mean vectors.
- 3.3 Bias Diminishing for Prototype Rectification: The method diminishes cross-class bias by adding a common shifting term ξ to normalized query features, moving queries toward the support set.
4 Theoretical Analysis
The analysis formulates expected prototype performance through cosine similarity and derives a lower bound linked to sample count. It also formalizes accuracy to derive feature shifting for reducing cross-class bias.
- 4.1 Lower Bound of the Expected Performance: The expected prototype is defined as maximizing cosine similarity to all samples within its class, which is positively correlated with classification accuracy.The analysis uses normalized features and prototypes for this objective.
- 4.1 Lower Bound of the Expected Performance: The lower bound of expected performance is positively correlated with the number of samples, motivating the addition of pseudo-labeled samples to prototype computation.The paper states that pseudo-labeling raises this lower bound and improves few-shot accuracy.
- 4.2 Derivation of Shifting Term ξ: Feature shifting reduces cross-class bias by adding a common shifting term ξ to query samples because their class labels are unknown.The shifting term is chosen to maximize cosine similarity under the stated support-query bias assumption.
- 4.2 Derivation of Shifting Term ξ: Few-shot task accuracy is formalized using predicted and true labels, prototypes, and query features, with correct classification determined by cosine-similarity comparisons.The formulation uses an indicator function for whether the predicted label equals the true class label.
5 Experiments
Across miniImageNet, tieredImageNet, and Meta-Dataset, BD-CSPN consistently improves few-shot classification, while ablations support separate benefits from intra-class and cross-class bias diminishing.
- Results on miniImageNet and tieredImageNet: BD-CSPN achieves state-of-the-art performance on miniImageNet and tieredImageNet, consistently outperforming existing transductive methods.The comparison uses average accuracy results reported in Tables 1 and 2.
- Results on miniImageNet and tieredImageNet: 61.74% and 76.12% are achieved on miniImageNet for 1-shot and 5-shot tasks, respectively, surpassing TPN by large margins.The method also outperforms semi-supervised methods while avoiding extra unlabeled data and per-task retraining or fine-tuning.
- Results on Meta-Dataset: The 5-shot Meta-Dataset model obtains an average rank of 1.9 across the evaluated test sources.The model is trained on ILSVRC-2012 and evaluated on listed Meta-Dataset test sources.
- Ablation Study: BD-CSPN improves over CSPN by up to 9% on 1-shot tasks and 3% on 5-shot tasks.The gains are relatively minor in 5-shot scenarios compared with 1-shot scenarios.
- Ablation of Intra-Class Bias Diminishing: 69.81% versus 61.84% on 1-shot miniImageNet and 78.12% versus 69.20% on 1-shot tieredImageNet are reported when adding intra-class bias diminishing.BDi-CSPN produces significant improvements on both datasets, especially in 1-shot settings.
- Ablation of Intra-Class Bias Diminishing: More pseudo-labeled samples produce an obvious growth in classification accuracy, and Z is set to 8 for the Table 1 and Table 2 comparisons.Experimental solid-line trends are consistent with theoretical dashed-line trends on miniImageNet.
- Ablation of Cross-Class Bias Diminishing: Cross-class bias diminishing improves accuracy overall, including a 1.64% gain on 1-shot tieredImageNet.The module shifts the query set toward the support-set center.
- Ablation of Backbone: With ResNet-12, BD-CSPN reaches 79.23% in the 5-shot scenario and exceeds TFT by 3% to 5% with that backbone.The comparison is conducted in the same transductive setting.
6 Conclusions
The paper proposes prototype rectification for few-shot learning by reducing intra-class and cross-class bias, with theoretical and experimental support for its effectiveness.
- The method rectifies class prototypes by diminishing intra-class bias and cross-class bias.
- Theoretical analysis verifies that the bias-diminishing method raises the lower bound of expected performance.
- Extensive experiments on three few-shot benchmarks demonstrate the method's effectiveness.
A.1 Implementation Details
Experiments primarily use WRN-28-10, with additional backbones for ablation studies and results estimated from 600 sampled episodes with 95% confidence intervals.
- WRN-28-10 serves as the main experimental backbone.
- ConvNet-64, ConvNet-128, ConvNet-256, and ResNet-12 are used in the ablation study.
- Reported results are collected from 600 sampled episodes with 95% confidence intervals.
- Training uses SGD with momentum 0.9, weight decay 0.0005, and a maximum of 60 epochs.The initial learning rate is 0.1.
A.2 Results on Omniglot and CUB
Additional experiments cover Omniglot and CUB, with Omniglot evaluated as a handwritten-character benchmark containing augmented higher-way classes.
- Extra experiments are conducted on the Omniglot and CUB benchmarks.
- Omniglot: Omniglot contains 1,623 handwritten-character classes with 20 samples per class.
- Omniglot: Rotating Omniglot images by 90, 180, and 270 degrees creates 6,492 total classes for higher-way testing.
Omniglot
The supplementary benchmark results include Omniglot and CUB, while the supplied dataset description specifies Omniglot’s class construction and CUB’s class split.
- Omniglot: Table 6 reports results on Omniglot.
- CUB: Table 7 reports results on CUB, a fine-grained bird dataset with 200 species.
A.3 Additional Ablation on miniImageNet and tieredImageNet
Additional experiments examine BD-CSPN across backbones, harder higher-way tasks, robustness to unrelated unlabeled samples, and the Meta-Dataset benchmark.
- Additional ablation: Backbone ablations are reported on miniImageNet and tieredImageNet.The supplementary study evaluates performance with different backbones.
- Higher-way tests: Higher-way tests evaluate the method on harder tasks across miniImageNet, tieredImageNet, and Omniglot.The results are presented in Tables 10–12.
- Robustness test: Robustness testing adds unlabeled samples from classes outside the target 5-way episode.Accuracy decreases somewhat as the amount of added unlabeled data increases, while 5-shot cases show little performance drop.
- Meta-Dataset: On Meta-Dataset, the 5-shot model achieves an average rank of 1.9.Results are reported in Table 14.