arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.10841cs.CLcs.CV
收藏

基于原型的预训练视觉语言模型快速学习

Prompting through Prototype: A Prototype-based Prompt Learning on Pretrained Vision-Language Models

Baidu Research(百度研究院)

Yue Zhang, Hongliang Fei, Dingcheng Li, Tan Yu, Ping Li

摘要:

提示学习是一种新的学习范式,它通过利用文本提示将下游任务重构为预训练模型上的类似预训练任务。最近的工作表明,快速学习对于少样本学习特别有用,其中训练数据有限。根据提示的粒度,这些方法可以大致分为任务级提示和实例级提示。任务级提示方法为所有输入样本学习一个通用提示,这是有效的,但无法捕捉不同类之间的细微差异。实例级提示方法为每个输入学习特定的提示,虽然有效但效率低下。在这项工作中,我们开发了一种新的基于原型的提示学习方法,以克服上述限制。特别是,我们专注于预训练的视觉语言模型(PVLM)上的Few-Shot图像识别任务,并开发了一种通过原型(PTP)进行提示的方法,其中我们定义了$K$图像原型和$K$提示原型。在PTP中,图像原型表示潜空间中某个图像簇的质心,提示原型定义为连续空间中的软提示。查询图像和图像原型之间的相似性决定了这种预测在多大程度上依赖于相应的提示原型。因此,在PTP中,类似的图像将使用类似的提示方式。通过对七个真实世界的基准测试进行广泛的实验,我们表明PTP是一种有效的方法来利用潜在的知识和适应各种PVLM。此外,通过详细分析,我们讨论了在少样本学习背景下快速学习和参数高效微调的利弊。

英文摘要:

Prompt learning is a new learning paradigm which reformulates downstream tasks as similar pretraining tasks on pretrained models by leveraging textual prompts. Recent works have demonstrated that prompt learning is particularly useful for few-shot learning, where there is limited training data. Depending on the granularity of prompts, those methods can be roughly divided into task-level prompting and instance-level prompting. Task-level prompting methods learn one universal prompt for all input samples, which is efficient but ineffective to capture subtle differences among different classes. Instance-level prompting methods learn a specific prompt for each input, though effective but inefficient. In this work, we develop a novel prototype-based prompt learning method to overcome the above limitations. In particular, we focus on few-shot image recognition tasks on pretrained vision-language models (PVLMs) and develop a method of prompting through prototype (PTP), where we define $K$ image prototypes and $K$ prompt prototypes. In PTP, the image prototype represents a centroid of a certain image cluster in the latent space and a prompt prototype is defined as a soft prompt in the continuous space. The similarity between a query image and an image prototype determines how much this prediction relies on the corresponding prompt prototype. Hence, in PTP, similar images will utilize similar prompting ways. Through extensive experiments on seven real-world benchmarks, we show that PTP is an effective method to leverage the latent knowledge and adaptive to various PVLMs. Moreover, through detailed analysis, we discuss pros and cons for prompt learning and parameter-efficient fine-tuning under the context of few-shot learning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑