Skip to main content
QUICK REVIEW

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

Cairong Zhao, Yubin Wang|arXiv (Cornell University)|Dec 8, 2022
Domain Adaptation and Few-Shot Learning被引用 4
一句话总结

该论文提出 MetaPrompt,一种基于元学习的提示微调方法,可为 CLIP 等视觉-语言模型生成领域不变的提示,从而实现对未见领域的强大泛化能力。通过采用具有非对称对比损失的双模态提示网络与课程式训练,MetaPrompt 在 11 个从基础到新类的泛化基准和 4 个领域泛化基准上均达到最先进性能,显著优于现有方法。

ABSTRACT

Prompt learning is one of the most effective and trending ways to adapt powerful vision-language foundation models like CLIP to downstream datasets by tuning learnable prompt vectors with very few samples. However, although prompt learning achieves excellent performance over in-domain data, it still faces the major challenge of generalizing to unseen classes and domains. Some existing prompt learning methods tackle this issue by adaptively generating different prompts for different tokens or domains but neglecting the ability of learned prompts to generalize to unseen domains. In this paper, we propose a novel prompt learning paradigm that directly generates \emph{domain invariant} prompt that can be generalized to unseen domains, called MetaPrompt. Specifically, a dual-modality prompt tuning network is proposed to generate prompts for input from both image and text modalities. With a novel asymmetric contrastive loss, the representation from the original pre-trained vision-language model acts as supervision to enhance the generalization ability of the learned prompt. More importantly, we propose a meta-learning-based prompt tuning algorithm that explicitly constrains the task-specific prompt tuned for one domain or class to also achieve good performance in another domain or class. Extensive experiments on 11 datasets for base-to-new generalization and 4 datasets for domain generalization demonstrate that our method consistently and significantly outperforms existing methods.

研究动机与目标

  • 解决提示微调的视觉-语言模型在未见领域和类别上泛化能力差的问题。
  • 克服现有提示学习方法未能显式强制实现对域外数据泛化的局限性。
  • 开发一种提示微调范式,生成对领域变化不变的提示,同时保持在域内数据上的性能。
  • 利用元学习和课程式训练,提升少样本设置下的泛化保证。
  • 设计一种双模态提示网络,联合学习图像和文本提示向量,并增强其不变性。

提出的方法

  • 提出一种双模态提示微调网络,为图像和文本输入分别学习独立的连续提示向量。
  • 引入一种非对称对比损失,利用预训练模型的表征作为监督信号,以增强提示的泛化能力。
  • 采用小批量课程式训练策略,每个训练周期从一组子领域或类别中采样用于提示微调。
  • 应用元学习优化提示,使得在某一领域上的性能能良好泛化到其他未见领域。
  • 基于 [43] 的理论分析,证明课程式提示微调的泛化界为 O(1/√N)。
  • 在视觉-语言模型的多个层(2–12)上实施提示微调,以研究深度的影响。

实验结果

研究问题

  • RQ1基于元学习的提示微调能否提升视觉-语言模型在未见领域和类别上的泛化能力?
  • RQ2与标准微调相比,所提出的课程式训练策略如何影响提示的泛化性能?
  • RQ3实现领域不变提示性能的最优提示长度和层配置是什么?
  • RQ4与单模态或对称方法相比,采用非对称对比损失的双模态提示网络是否能提升泛化性能?
  • RQ5在零样本和少样本泛化设置下,MetaPrompt 与输入条件提示学习方法相比表现如何?

主要发现

  • MetaPrompt 在 11 个基础到新类的泛化数据集上达到最先进性能,12 层提示配置在基础类别上达到 83.65% 的准确率,在新类别上达到 75.48%。
  • 在 4 个领域泛化数据集上,MetaPrompt 使用 10 层和 8 个提示向量时,平均准确率达到 81.20%,优于先前方法。
  • 课程式训练策略在 FGVCAircraft(基础到新类)和 VLCS(领域泛化)上分别提升性能超过 3%,表明对分布偏移具有强鲁棒性。
  • 消融实验表明,每模态使用 2 个提示向量在基础类别与新类别性能之间达到最佳平衡,而 4 个向量在领域泛化任务中表现最优。
  • 在全部 12 个层上进行提示微调可获得最佳整体性能,且在两种泛化设置下,准确率随深度增加而稳步提升。
  • 非对称对比损失通过利用预训练模型的表征作为监督信号,显著提升泛化能力,减少对域内数据的过拟合。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。