Skip to main content
QUICK REVIEW

[Paper Review] Revisiting Metric Learning for Few-Shot Image Classification

Xiaomeng Li, Lequan Yu|arXiv (Cornell University)|Jul 6, 2019
Domain Adaptation and Few-Shot LearningComputer Science51 references5 citations
TL;DR

This paper proposes a deep K-tuplet network that revisits metric learning for few-shot image classification by generalizing triplet loss to jointly compare query features with K negative samples, improving feature embedding for novel classes. The method achieves state-of-the-art performance on miniImageNet and generalizes effectively to unseen datasets like CUB-200, Stanford Dogs, and Caltech-101.

ABSTRACT

The goal of few-shot learning is to recognize new visual concepts with just a few amount of labeled samples in each class. Recent effective metric-based few-shot approaches employ neural networks to learn a feature similarity comparison between query and support examples. However, the importance of feature embedding, i.e., exploring the relationship among training samples, is neglected. In this work, we present a simple yet powerful baseline for few-shot classification by emphasizing the importance of feature embedding. Specifically, we revisit the classical triplet network from deep metric learning, and extend it into a deep K-tuplet network for few-shot learning, utilizing the relationship among the input samples to learn a general representation learning via episode-training. Once trained, our network is able to extract discriminative features for unseen novel categories and can be seamlessly incorporated with a non-linear distance metric function to facilitate the few-shot classification. Our result on the miniImageNet benchmark outperforms other metric-based few-shot classification methods. More importantly, when evaluated on completely different datasets (Caltech-101, CUB-200, Stanford Dogs and Cars) using the model trained with miniImageNet, our method significantly outperforms prior methods, demonstrating its superior capability to generalize to unseen classes.

Motivation & Objective

  • Address the neglect of feature embedding quality in existing metric-based few-shot learning methods.
  • Improve generalization to unseen novel classes by leveraging inter-sample relationships during training.
  • Develop a training paradigm that better mimics the few-shot inference setting through episode-based training with K-tuplets.
  • Demonstrate transferability of learned features across diverse datasets beyond the training distribution.
  • Establish a new evaluation protocol that tests generalization to novel classes from different datasets, improving real-world relevance.

Proposed method

  • Propose a deep K-tuplet network that extends the classical triplet loss to include K negative samples per anchor in each episode.
  • Formulate a generalized loss function that encourages intra-class compactness and inter-class separation across K negative samples.
  • Introduce a semi-hard mining strategy to sample informative triplets, accelerating convergence and stabilizing training.
  • Integrate the K-tuplet feature embedding with a learnable non-linear distance metric (e.g., relation network) for end-to-end few-shot classification.
  • Train the model using episode-based meta-learning, where each episode contains support and query sets with K negative samples.
  • Use t-SNE visualization to compare feature embeddings across methods, demonstrating improved clustering on novel classes.

Experimental results

Research questions

  • RQ1Can a generalized metric learning framework that leverages relationships among multiple samples improve few-shot classification performance?
  • RQ2How does K-tuplet learning compare to standard triplet learning in terms of feature generalization to unseen classes?
  • RQ3To what extent can a model trained on one dataset (e.g., miniImageNet) generalize to novel classes in completely different datasets (e.g., CUB-200, Stanford Dogs)?
  • RQ4Does increasing the number of training classes improve the transferability and accuracy of few-shot classification on novel categories?
  • RQ5How does the choice of margin in the K-tuplet loss affect model performance and convergence?

Key findings

  • The proposed K-tuplet network achieves 58.30% accuracy on 5-way 1-shot and 72.37% on 5-way 5-shot classification on miniImageNet, outperforming prior metric-based methods.
  • With additional training classes from ImageNet, the model improves to 65.60% on 5-way 1-shot and 77.74% on 5-way 5-shot, demonstrating scalability with more data.
  • The model generalizes significantly better than prior methods on unseen datasets: Caltech-101, CUB-200, Stanford Dogs, and Cars, even when trained only on miniImageNet.
  • T-SNE visualizations show that the learned features are more discriminative and better separated on novel classes compared to ProtoNet and RelationNet.
  • The optimal margin hyperparameter for the K-tuplet loss is 0.5, as smaller margins underfit inter-class variation and larger margins hinder training convergence.
  • Semi-hard mining sampling improves training stability and speeds up convergence, contributing to consistent performance gains across experiments.

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.