arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.03320cs.CVcs.LG
收藏

鸭嘴兽长什么样?为零样本图像分类生成定制化提示

What does a platypus look like? Generating customized prompts for zero-shot image classification

University of Washington(华盛顿大学);Google DeepMind(谷歌DeepMind);ML Collective(ML集体)

Sarah Pratt, Ian Covert, Rosanne Liu, Ali Farhadi

AI总结:

本文提出CuPL方法,通过结合大语言模型为开放词汇图像分类自动生成包含类别判别特征的定制化提示,在无需额外训练和领域知识的情况下提升零样本分类准确率,并在ImageNet上取得超过一个百分点的提升。

摘要:

开放词汇模型是图像分类中一种很有前景的新范式。与传统分类模型不同,开放词汇模型在推理时可在任意一组用自然语言指定的类别中进行分类。这种自然语言被称为“提示”,通常由一组手工编写的模板组成(例如“一张{}的照片”),并用每个类别名称来填充。本文引入了一种简单的方法来生成更高准确率的提示,不依赖任何关于任务领域的显式知识,并且所需的手工构造句子少得多。为此,我们将开放词汇模型与大语言模型(LLMs)相结合,通过语言模型创建定制化提示(CuPL,发音为“couple”)。具体来说,我们利用LLMs中包含的知识来生成许多描述性句子,这些句子包含图像类别的重要判别特征。这使得模型在做出预测时能够更加重视图像中的这些区域。我们发现,这种直接且通用的方法在一系列零样本图像分类基准上提高了准确率,包括在ImageNet上超过一个百分点的提升。最后,这个简单的基线方法不需要额外的训练,并且完全保持零样本。代码可在 https://github.com/sarahpratt/CuPL 获取。

英文摘要:

Open-vocabulary models are a promising new paradigm for image classification. Unlike traditional classification models, open-vocabulary models classify among any arbitrary set of categories specified with natural language during inference. This natural language, called "prompts", typically consists of a set of hand-written templates (e.g., "a photo of a {}") which are completed with each of the category names. This work introduces a simple method to generate higher accuracy prompts, without relying on any explicit knowledge of the task domain and with far fewer hand-constructed sentences. To achieve this, we combine open-vocabulary models with large language models (LLMs) to create Customized Prompts via Language models (CuPL, pronounced "couple"). In particular, we leverage the knowledge contained in LLMs in order to generate many descriptive sentences that contain important discriminating characteristics of the image categories. This allows the model to place a greater importance on these regions in the image when making predictions. We find that this straightforward and general approach improves accuracy on a range of zero-shot image classification benchmarks, including over one percentage point gain on ImageNet. Finally, this simple baseline requires no additional training and remains completely zero-shot. Code available at https://github.com/sarahpratt/CuPL.

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

↑