Skip to main content
QUICK REVIEW

[论文解读] Improving Zero-Shot Generalization for CLIP with Synthesized Prompts

Zhengbo Wang, Jian Liang|arXiv (Cornell University)|Jul 14, 2023
Multimodal Machine Learning ApplicationsComputer Science被引用 11
一句话总结

SHIP 增加一个基于 CLIP 的 VAE 生成器,能够基于类别名称为标签仅有的类别创建合成特征,从而实现对 CLIP 的微调,使其在真实数据与合成数据上都能提高基于到新类的泛化、跨数据集迁移以及广义零样本学习。

ABSTRACT

With the growing interest in pretrained vision-language models like CLIP, recent research has focused on adapting these models to downstream tasks. Despite achieving promising results, most existing methods require labeled data for all classes, which may not hold in real-world applications due to the long tail and Zipf's law. For example, some classes may lack labeled data entirely, such as emerging concepts. To address this problem, we propose a plug-and-play generative approach called extbf{S}ynt extbf{H}es extbf{I}zed extbf{P}rompts~( extbf{SHIP}) to improve existing fine-tuning methods. Specifically, we follow variational autoencoders to introduce a generator that reconstructs the visual features by inputting the synthesized prompts and the corresponding class names to the textual encoder of CLIP. In this manner, we easily obtain the synthesized features for the remaining label-only classes. Thereafter, we fine-tune CLIP with off-the-shelf methods by combining labeled and synthesized features. Extensive experiments on base-to-new generalization, cross-dataset transfer learning, and generalized zero-shot learning demonstrate the superiority of our approach. The code is available at \url{https://github.com/mrflogs/SHIP}.

研究动机与目标

  • 为 CLIP 基于视觉语言模型的长尾和新兴概念解决数据稀缺问题。
  • 使 CLIP 微调在已见(基础)和未见(新)类别上都能表现良好,而无需为所有类别提供数据。
  • 引入一个即插即用的生成器,从类别名称中合成标签仅有类别的特征。

提出的方法

  • 使用变分自编码器(VAE)框架训练一个生成器,将从合成提示和类别名称重建 CLIP 特征。
  • 引入一个基于 CLIP 的生成器,配备一个轻量级的多层感知机(MLP),用于在全局可学习提示上添加局部偏置。
  • 将生成的提示和类别名称输入到冻结的 CLIP 文本编码器中,以获得合成特征。
  • 在 CLIP 的视觉特征上训练 VAE 的编码器,并通过重建损失和 KL 散度进行优化。
  • 使用现成的方法(如 CoOp、CLIP-Adapter、Tip-Adapter)对 CLIP 进行微调,混合真实基础特征和新类的合成特征。
  • 提示由全局可学习提示加上实例特定的局部偏置组成;通过冻结的文本编码器使用提示来生成特征。

实验结果

研究问题

  • RQ1SHIP 是否仅凭类别名称就能为未见类别合成有意义的特征?
  • RQ2用合成特征来增强 CLIP 微调是否能在不同数据集上提升基础和新类别的性能?
  • RQ3与现有微调方法相比,SHIP 在基于到新泛化、跨数据集迁移和广义零样本学习方面表现如何?
  • RQ4生成器类型(基于 VAE 的 CLIP 生成器)和提示设计对性能有何影响?
  • RQ5在少样本设置中,基于 CLIP 的生成器是否比从零训练生成器或使用 GAN 框架更有效?

主要发现

  • 相比基线,在基于到新泛化中,使用 SHIP 的方法(如 CoOp + SHIP、CLIP-Adapter + SHIP、Tip-Adapter + SHIP)在新类别和调和均值上有提升。
  • 在跨数据集迁移方面,CoOp + SHIP 在多个目标数据集上带来平均提升,增益相对基线有适度的提升。
  • 在广义零样本学习中,CoOp + SHIP 相对于单独的 CoOp 显著提升未见类别的表现和调和均值。
  • 消融研究表明,基于 CLIP 的生成器优于从零训练的生成器,在此少样本设置中,VAE 比 GAN 表现更好。
  • 全局提示配合相同的局部偏置,在提示配置中表现最佳,突出了全局上下文在提示中的重要性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。