Skip to main content
QUICK REVIEW

[Paper Review] How to Train Your MAML to Excel in Few-Shot Classification

Han-Jia Ye, Wei‐Lun Chao|arXiv (Cornell University)|Jun 30, 2021
Domain Adaptation and Few-Shot LearningComputer Science111 references16 citations
TL;DR

This paper proposes unicorn-MAML, a modified MAML algorithm that improves few-shot classification by using a large number of inner-loop gradient steps and enforcing permutation invariance through a shared weight vector for all classes. The method achieves state-of-the-art or competitive performance on Mini ImageNet and Tiered ImageNet without adding complexity, outperforming many recent algorithms while preserving MAML’s simplicity.

ABSTRACT

Model-agnostic meta-learning (MAML) is arguably one of the most popular meta-learning algorithms nowadays. Nevertheless, its performance on few-shot classification is far behind many recent algorithms dedicated to the problem. In this paper, we point out several key facets of how to train MAML to excel in few-shot classification. First, we find that MAML needs a large number of gradient steps in its inner loop update, which contradicts its common usage in few-shot classification. Second, we find that MAML is sensitive to the class label assignments during meta-testing. Concretely, MAML meta-trains the initialization of an $N$-way classifier. These $N$ ways, during meta-testing, then have "$N!$" different permutations to be paired with a few-shot task of $N$ novel classes. We find that these permutations lead to a huge variance of accuracy, making MAML unstable in few-shot classification. Third, we investigate several approaches to make MAML permutation-invariant, among which meta-training a single vector to initialize all the $N$ weight vectors in the classification head performs the best. On benchmark datasets like MiniImageNet and TieredImageNet, our approach, which we name UNICORN-MAML, performs on a par with or even outperforms many recent few-shot classification algorithms, without sacrificing MAML's simplicity.

Motivation & Objective

  • To investigate why standard MAML underperforms in few-shot classification despite its strong theoretical foundation.
  • To address MAML's instability caused by class label permutation during meta-testing.
  • To improve MAML's performance without sacrificing its model-agnostic simplicity or adding complex sub-networks.
  • To identify optimal hyperparameters, particularly the number of inner-loop steps, for MAML in few-shot settings.

Proposed method

  • The method uses a large number of inner-loop gradient steps (15–20) during both meta-training and meta-testing, contrary to typical MAML practice.
  • It introduces a shared weight vector initialized once and used to initialize all N class-specific weight vectors in the classifier head, enforcing permutation invariance.
  • This shared vector is optimized during meta-training, making the model initialization invariant to how classes are labeled during inference.
  • The approach maintains MAML’s bi-level optimization framework but redefines the initialization of the classification head to be symmetric across classes.
  • The method is evaluated on Mini ImageNet and Tiered ImageNet using ResNet backbones, with ablation studies on shot numbers and cross-dataset generalization.

Experimental results

Research questions

  • RQ1Why does standard MAML underperform in few-shot classification despite its strong meta-learning formulation?
  • RQ2How does the number of inner-loop gradient steps affect MAML’s performance in few-shot settings?
  • RQ3Why is MAML sensitive to class label permutations during meta-testing, and how can this instability be mitigated?
  • RQ4Can a permutation-invariant initialization improve MAML’s performance without adding architectural complexity?

Key findings

  • MAML achieves peak performance with 15–20 inner-loop gradient steps on Mini ImageNet and Tiered ImageNet, significantly more than the typical 1–5 steps used in prior work.
  • The best-performing permutation-invariant method is unicorn-MAML, which uses a single shared weight vector to initialize all class heads, outperforming other variants.
  • On 5-way 1-shot classification, unicorn-MAML achieves 88.38% accuracy on Mini ImageNet, surpassing standard MAML (88.08%) and matching or exceeding ProtoNet and SimpleShot.
  • On 5-way 50-shot tasks, unicorn-MAML reaches 92.86% accuracy on Mini ImageNet, outperforming standard MAML (92.14%) and existing baselines.
  • On cross-dataset transfer (Mini ImageNet → CUB), unicorn-MAML achieves 75.67% accuracy at 5-shot, outperforming standard MAML (73.86%) and ProtoNet (72.02%).

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.