[论文解读] How to Train Your MAML to Excel in Few-Shot Classification
本文提出 unicorn-MAML,一种改进的 MAML 算法,通过使用大量内层优化步数并利用共享权重向量对所有类别强制实现排列不变性,从而提升少样本分类性能。该方法在不增加复杂度的前提下,在 Mini ImageNet 和 Tiered ImageNet 上实现了最先进或具有竞争力的性能,优于许多近期算法,同时保持了 MAML 的简洁性。
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.
研究动机与目标
- 探究为何标准 MAML 尽管具有坚实的理论基础,但在少样本分类任务中表现不佳。
- 解决 MAML 在元测试过程中因类别标签排列导致的不稳定性问题。
- 在不牺牲模型无关简洁性或增加复杂子网络的前提下,提升 MAML 的性能。
- 识别最优超参数,特别是少样本设置下 MAML 的内层优化步数。
提出的方法
- 该方法在元训练和元测试阶段均使用大量内层梯度更新步数(15–20 步),与典型 MAML 的做法相反。
- 引入一个共享权重向量,仅初始化一次,并用于初始化分类头中的所有 N 个类别特定的权重向量,从而强制实现排列不变性。
- 该共享向量在元训练过程中被优化,使得模型初始化对推理阶段类别标签的排列方式保持不变。
- 该方法保持了 MAML 的双层优化框架,但重新定义了分类头的初始化方式,使其在各类别间保持对称性。
- 该方法在使用 ResNet 主干网络的 Mini ImageNet 和 Tiered ImageNet 上进行评估,并开展了关于样本数量和跨数据集泛化能力的消融研究。
实验结果
研究问题
- RQ1为何标准 MAML 尽管具备强大的元学习框架,但在少样本分类中表现不佳?
- RQ2内层梯度更新步数的多少如何影响 MAML 在少样本设置下的性能?
- RQ3为何 MAML 在元测试过程中对类别标签排列敏感?这种不稳定性如何缓解?
- RQ4能否通过排列不变的初始化方式提升 MAML 性能,同时不增加网络架构的复杂度?
主要发现
- 在 Mini ImageNet 和 Tiered ImageNet 上,MAML 在使用 15–20 次内层梯度更新步数时达到性能峰值,远超以往工作常用的 1–5 步。
- 表现最佳的排列不变方法是 unicorn-MAML,其通过单一共享权重向量初始化所有类别头,优于其他变体。
- 在 5 类 1 样本分类任务中,unicorn-MAML 在 Mini ImageNet 上达到 88.38% 的准确率,超过标准 MAML(88.08%),并匹配或超过 ProtoNet 和 SimpleShot。
- 在 5 类 50 样本任务中,unicorn-MAML 在 Mini ImageNet 上达到 92.86% 的准确率,优于标准 MAML(92.14%)和现有基线方法。
- 在跨数据集迁移(Mini ImageNet → CUB)中,unicorn-MAML 在 5 样本设置下达到 75.67% 的准确率,优于标准 MAML(73.86%)和 ProtoNet(72.02%)。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。