Task Attribute Distance for Few-Shot Learning: Theoretical Analysis and Applications
Minyang Hu, Hong Chang, Zong Guo, Bingpeng Ma, Shiguan Shan, Xilin Chen
TL;DR
Task Attribute Distance (TAD) provides a model-agnostic metric to quantify relatedness between training and novel tasks in few-shot learning by comparing attribute conditional distributions with total variation distance and solving a minimum-weight category matching. The authors derive generalization bounds showing how TAD governs adaptation difficulty on novel tasks and demonstrate a linear relationship between TAD distance and few-shot accuracy across multiple benchmarks, with both human- and auto-annotated attributes. They validate TAD's effectiveness for predicting task difficulty and show practical applications in data augmentation and test-time intervention, including cross-dataset scenarios using CLIP-based auto-annotation. The work offers a principled, scalable approach to assess and leverage task relatedness in FSL.
Abstract
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.
