Skip to main content
QUICK REVIEW

[论文解读] Conditional Prompt Learning for Vision-Language Models

Kaiyang Zhou, Jingkang Yang|arXiv (Cornell University)|Mar 10, 2022
Multimodal Machine Learning ApplicationsComputer Science被引用 73
一句话总结

本论文在 CoOp 的基础上引入一个实例条件提示方法(CoCoOp),它生成输入条件的提示向量以提升对未见类的泛化、跨数据集迁移和对比 CLIP 的视觉语言模型的领域泛化。

ABSTRACT

With the rise of powerful pre-trained vision-language models like CLIP, it becomes essential to investigate ways to adapt these models to downstream datasets. A recently proposed method named Context Optimization (CoOp) introduces the concept of prompt learning -- a recent trend in NLP -- to the vision domain for adapting pre-trained vision-language models. Specifically, CoOp turns context words in a prompt into a set of learnable vectors and, with only a few labeled images for learning, can achieve huge improvements over intensively-tuned manual prompts. In our study we identify a critical problem of CoOp: the learned context is not generalizable to wider unseen classes within the same dataset, suggesting that CoOp overfits base classes observed during training. To address the problem, we propose Conditional Context Optimization (CoCoOp), which extends CoOp by further learning a lightweight neural network to generate for each image an input-conditional token (vector). Compared to CoOp's static prompts, our dynamic prompts adapt to each instance and are thus less sensitive to class shift. Extensive experiments show that CoCoOp generalizes much better than CoOp to unseen classes, even showing promising transferability beyond a single dataset; and yields stronger domain generalization performance as well. Code is available at https://github.com/KaiyangZhou/CoOp.

研究动机与目标

  • 解决静态提示(CoOp)对基础类的过拟合。
  • 开发一种轻量级、输入条件化的提示机制以提升泛化。
  • 展示在多样数据集上对基础到新类、跨数据集迁移以及领域泛化的提升。

提出的方法

  • 在 CLIP/CoOp 的基础上引入可学习的、用于提示的共用上下文向量。
  • 引入一个 Meta-Net(轻量神经网络)来生成输入条件化标记。
  • 将输入条件化标记与共享上下文向量结合,形成每张图像的提示。
  • 仅训练提示组件(上下文向量和 Meta-Net),在保持视觉-语言主干固定的同时。
  • 在基础到新类泛化、跨数据集迁移和领域泛化设定中进行评估。

实验结果

研究问题

  • RQ1与静态 CoOp 提示相比,实例条件化提示是否能降低对基类的过拟合?
  • RQ2输入条件化提示是否提升对数据集内未见类的泛化?
  • RQ3实例条件化提示在跨数据集的可迁移性和对领域变化的鲁棒性方面是否更强?

主要发现

  • CoCoOp 将未见类准确率从63.22%(CoOp)提升到71.69%,在11个数据集上平均如此。
  • 在基础到新类泛化中,CoCoOp 的调和均值(H)高于 CoOp 和 CLIP(例如,Table 1 显示 H=75.83 对比 71.66(CoOp)和 71.70(CLIP))。
  • CoCoOp 在多对源-目标数据集对上实现比 CoOp 更好的跨数据集迁移(例如 Table 2 显示的平均增益)。
  • CoCoOp 在领域泛化基准上持续优于 CLIP 和 CoOp,并提升对领域变化的鲁棒性(Table 3)。
  • 对未见/类泛化的提升通常伴随对基类的少量损失,从而对整体性能产生净积极影响(Figure 3 和 Table 1)。
  • 消融研究表明,较长的上下文和适当的初始化进一步惠及未见类,且 Meta-Net 的贡献不仅仅是增加参数数量(Table 5)。

阅读本论文

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

在 Nubint 中阅读本论文

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