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

仅使用文本监督学习提示用于视觉-语言模型

Learning to Prompt with Text Only Supervision for Vision-Language Models

Mohamed bin Zayed University of AI(穆罕默德·本·扎耶德人工智能大学);ETH Zurich(苏黎世联邦理工学院);TU Munich(慕尼黑工业大学);Google(谷歌)

Muhammad Uzair Khattak, Muhammad Ferjad Naeem, Muzammal Naseer, Luc Van Gool, Federico Tombari

AI总结:

针对CLIP下游适配中标注数据依赖和免训练方法迁移性差的问题,提出仅用LLM文本数据学习提示的方法,实现零样本迁移并在4个基准上表现优异。

摘要:

诸如 CLIP 等基础视觉-语言模型,因其出色的泛化能力,正在成为视觉领域的新范式。然而,在保持其泛化能力的同时将这些模型适配到下游任务仍是一个挑战。在现有文献中,一种方法是通过利用视觉信息学习提示来适配 CLIP。虽然有效,但这些工作大多需要标注数据,这并不实用,且由于在源数据上过拟合,通常难以泛化到新数据集。另一种方法采用免训练方式,从大型语言模型(LLMs)生成类描述并进行提示集成。然而,这些方法通常生成特定于类的提示,无法迁移到其他类,这会因分别为每个类生成 LLM 描述而产生更高成本。在这项工作中,我们提出结合这两种方法的优点,仅使用从 LLMs 获取的文本数据来学习提示。由于缺乏图像,提示的监督训练并非易事,我们开发了一种训练方法,允许提示从 LLM 数据中提取丰富的上下文知识。此外,通过将 LLM 上下文数据映射到学习到的提示中,实现了提示向新类和数据集的零样本迁移,潜在地降低了 LLM 提示工程成本。据我们所知,这是首个仅使用文本数据学习泛化提示的工作。我们在 4 个基准上进行了广泛评估,我们的方法优于先前的集成工作,同时与利用标注图像的方法具有竞争力。我们的代码和预训练模型可在 https://github.com/muzairkhattak/ProText 获取。

英文摘要:

Foundational vision-language models such as CLIP are becoming a new paradigm in vision, due to their excellent generalization abilities. However, adapting these models for downstream tasks while maintaining their generalization remains a challenge. In literature, one branch of methods adapts CLIP by learning prompts using visual information. While effective, most of these works require labeled data which is not practical, and often struggle to generalize towards new datasets due to over-fitting on the source data. An alternative approach resorts to training-free methods by generating class descriptions from large language models (LLMs) and perform prompt ensembling. However, these methods often generate class specific prompts that cannot be transferred to other classes, which incur higher costs by generating LLM descriptions for each class separately. In this work, we propose to combine the strengths of these both streams of methods by learning prompts using only text data derived from LLMs. As supervised training of prompts is not trivial due to absence of images, we develop a training approach that allows prompts to extract rich contextual knowledge from LLM data. Moreover, with LLM contextual data mapped within the learned prompts, it enables zero-shot transfer of prompts to new classes and datasets potentially cutting the LLM prompt engineering cost. To the best of our knowledge, this is the first work that learns generalized prompts using text only data. We perform extensive evaluations on 4 benchmarks where our method improves over prior ensembling works while being competitive to those utilizing labeled images. Our code and pre-trained models are available at https://github.com/muzairkhattak/ProText.

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

↑