Embedding Adaptation is Still Needed for Few-Shot Learning

Sébastien M. R. Arnold, Fei ShaOpenReview 2021

TL;DR

This paper introduces ATG, a novel method for automatically generating few-shot learning tasksets with controllable difficulty, eliminating the need for human-annotated semantic relationships. Using ATG, they demonstrate that gradient-based methods, often overlooked, actually outperform metric-based methods when few-shot learning tasks are most challenging.

What Problem Does This Paper Address?

Evaluating few-shot learning (FSL) models is tricky. Current benchmarks either assume train and test tasks are from the same distribution (leading to overly optimistic results) or rely on human-defined semantic class relationships (which are costly and not always available). This makes it hard to truly understand how FSL methods perform in real-world scenarios where task distributions can differ significantly. The authors aim to create a more robust evaluation framework by generating tasksets with varying degrees of difficulty, allowing for a nuanced understanding of FSL algorithm performance.

Methods

The core of this paper is Automatic Taskset Generation (ATG). ATG works by:

  1. Class Embeddings: First, it computes an embedding for each class by averaging the embeddings of all its associated images, using a pre-trained feature extractor.
  2. Penalized Clustering: It then employs a penalized clustering objective to partition these class embeddings into "train" and "test" sets. This objective encourages the train and test clusters to be at a specific, controllable distance from each other. By adjusting this distance, ATG can generate tasksets that are easier (closer distributions) or harder (further apart distributions) for transfer learning.
  3. No Human Knowledge: Crucially, ATG does not require any external semantic information about the classes, making it broadly applicable.

The authors also compare popular FSL methods:

  • Gradient-based: MAML (Model-Agnostic Meta-Learning) and ANIL (Another Interesting Few-shot Learner). These methods adapt model parameters during training.
  • Metric-based: ProtoNet (Prototypical Networks) and Multiclass (a baseline using a standard classifier). These methods rely on learning a good feature extractor and then comparing distances in the embedding space.

Datasets

The authors use ATG to generate tasksets for several standard datasets and introduce two new ones:

  • Existing Datasets: CIFAR100, mini-ImageNet, tiered-ImageNet, EMNIST, and LFW10.
  • New Benchmarks: EMNIST and LFW10 are introduced as new FSL benchmarks. EMNIST is noted for being lightweight with many classes, while LFW10 is derived from face recognition data where semantic relationships are hard to define.

Key Insights and Ideas

  • Controllable Difficulty is Key: The ability to precisely control the divergence between train and test task distributions is crucial for understanding FSL model robustness.
  • Semantic vs. Embedding Clusters: Class embeddings capture visual properties that differ significantly from semantic relationships (e.g., traffic lights and theaters clustering together due to color, while semantically similar animals like orangutans and macaques are far apart). This highlights the limitations of relying solely on semantic information for taskset generation.
  • Gradient-Based Methods Shine in Hard Scenarios: Contrary to some recent trends suggesting feature extractors alone are sufficient, this work strongly indicates that methods capable of adapting their feature extractors (like MAML and Finetune) are essential when transfer is challenging.
  • ATG's Practicality: The automatic nature of ATG makes it a valuable tool for creating diverse and challenging benchmarks without the bottleneck of human annotation.

Key Results

  • ATG Effectiveness: Figure 2 shows that as the divergence between train and test class distributions increases (controlled by ATG), the accuracy of a Multiclass model consistently decreases, confirming ATG's ability to generate tasksets of varying difficulty.
  • Comparison to Semantic Tasksets: Table 4 demonstrates that ATG-generated "hard" tasksets are often more challenging than those built using semantic relationships (denoted by †).
  • Gradient vs. Metric Performance: Table 4 and Table 5 show that gradient-based methods (MAML, ANIL) degrade slower than metric-based methods (ProtoNet, Multiclass) as task difficulty increases. In the most challenging scenarios (Table 1), MAML and Finetune (a variant of Multiclass with adaptation) significantly outperform metric-based approaches.
  • Correlation with Accuracy: Table 2 shows that the symmetrized KL divergence is the best measure for correlating with task difficulty, outperforming Euclidean distance and Wasserstein-2.

Limitations and Future Work

  • Measuring Task Difficulty: The authors acknowledge that accurately measuring individual task difficulty is an open research question, and their method's correlation with accuracy, while indicative, has low magnitudes.
  • Future Work: The authors suggest extending ATG to regression and multi-label classification tasks. They also highlight the potential for future research into more sophisticated methods for measuring task similarity and difficulty.

Summary updated

Abstract

Constructing new and more challenging tasksets is a fruitful methodology to analyse and understand few-shot classification methods. Unfortunately, existing approaches to building those tasksets are somewhat unsatisfactory: they either assume train and test task distributions to be identical -- which leads to overly optimistic evaluations -- or take a "worst-case" philosophy -- which typically requires additional human labor such as obtaining semantic class relationships. We propose ATG, a principled clustering method to defining train and test tasksets without additional human knowledge. ATG models train and test task distributions while requiring them to share a predefined amount of information. We empirically demonstrate the effectiveness of ATG in generating tasksets that are easier, in-between, or harder than existing benchmarks, including those that rely on semantic information. Finally, we leverage our generated tasksets to shed a new light on few-shot classification: gradient-based methods -- previously believed to underperform -- can outperform metric-based ones when transfer is most challenging.
BibTeX
@misc{arnold2021embedding,
  author = {Sébastien M. R. Arnold and Fei Sha},
  title = {{Embedding Adaptation is Still Needed for Few-Shot Learning}},
  year = {2021},
  eprint = {2104.07255},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.07255},
  howpublished = {OpenReview},
}
Figure