Few-shot learning (FSL) aims to learn novel tasks with very few labeled samples by leveraging experience from \emph{related} training tasks. In this paper, we try to understand FSL by delving into two key questions: (1) How to quantify the relationship between \emph{training} and \emph{novel} tasks? (2) How does the relationship affect the \emph{adaptation difficulty} on novel tasks for different models? To answer the two questions, we introduce Task Attribute Distance (TAD) built upon attributes as a metric to quantify the task relatedness. Unlike many existing metrics, TAD is model-agnostic, making it applicable to different FSL models. Then, we utilize TAD metric to establish a theoretical connection between task relatedness and task adaptation difficulty. By deriving the generalization error bound on a novel task, we discover how TAD measures the adaptation difficulty on novel tasks for FSL models. To validate our TAD metric and theoretical findings, we conduct experiments on three benchmarks. Our experimental results confirm that TAD metric effectively quantifies the task relatedness and reflects the adaptation difficulty on novel tasks for various FSL methods, even if some of them do not learn attributes explicitly or human-annotated attributes are not available. Finally, we present two applications of the proposed TAD metric: data augmentation and test-time intervention, which further verify its effectiveness and general applicability. The source code is available at https://github.com/hu-my/TaskAttributeDistance.
翻译:小样本学习旨在通过利用来自相关训练任务的经验,从极少数标注样本中学习新任务。本文通过探讨两个关键问题来理解小样本学习:(1)如何量化训练任务与新任务之间的相关性?(2)该相关性如何影响不同模型在新任务上的适应难度?为回答上述问题,我们引入基于属性构建的任务属性距离作为度量任务相关性的指标。与现有多种度量不同,任务属性距离与模型无关,可适用于不同的小样本学习模型。随后,我们利用任务属性距离度量建立了任务相关性与任务适应难度之间的理论联系。通过推导新任务上的泛化误差界,我们揭示了任务属性距离如何衡量小样本学习模型在新任务上的适应难度。为验证所提出的任务属性距离度量及理论发现,我们在三个基准数据集上开展实验。实验结果表明,即使部分方法未显式学习属性或缺少人工标注属性,任务属性距离度量仍能有效量化任务相关性并反映不同小样本学习方法在新任务上的适应难度。最后,我们展示了任务属性距离度量的两个应用:数据增强与测试时干预,进一步验证了其有效性与通用适用性。源代码已开源至 https://github.com/hu-my/TaskAttributeDistance。