改进视觉语言模型提示词预训练,提升泛化能力
Revisiting Prompt Pretraining of Vision-Language Models
- 采用独立查询/键/值提示,增强模型拟合能力
- 用CLIP生成软标签,更好捕捉类别间关系
- 适合作为多种视觉任务的通用提示初始化
提示学习是定制视觉语言模型(VLMs)的有效方法,仅需微调少量提示词参数。近期在大规模数据集(如ImageNet-21K)上进行提示词预训练,在通用视觉区分中起关键作用。然而,我们发现有限的可学习提示词在大量图像训练下存在欠拟合风险,导致泛化性能差。为此,本文提出通用框架Revisiting Prompt Pretraining(RPP),从提示结构和提示监督两方面提升拟合与泛化能力。在结构上,打破传统中查询、键、值向量共享可学习提示词的限制,引入独立的查询、键、值提示词,通过增加参数多样性提升拟合能力。在监督上,利用预训练对比语言图像预训练(CLIP)教师模型提供的零样本概率预测生成软标签,提供更细腻的类别间关系信息,增强预训练的泛化能力。RPP生成更鲁棒的提示初始化,显著提升跨多种视觉识别任务的迁移能力。多基准测试一致验证了其当前最优(SOTA)性能。代码与模型将很快公开。
原文摘要 · Abstract (English)
Prompt learning is an effective method to customize Vision-Language Models (VLMs) for various downstream tasks, involving tuning very few parameters of input prompt tokens. Recently, prompt pretraining in large-scale dataset (e.g., ImageNet-21K) has played a crucial role in prompt learning for universal visual discrimination. However, we revisit and observe that the limited learnable prompts could face underfitting risks given the extensive images during prompt pretraining, simultaneously leading to poor generalization. To address the above issues, in this paper, we propose a general framework termed Revisiting Prompt Pretraining (RPP), which targets at improving the fitting and generalization ability from two aspects: prompt structure and prompt supervision. For prompt structure, we break the restriction in common practice where query, key, and value vectors are derived from the shared learnable prompt token. Instead, we introduce unshared individual query, key, and value learnable prompts, thereby enhancing the model's fitting capacity through increased parameter diversity. For prompt supervision, we additionally utilize soft labels derived from zero-shot probability predictions provided by a pretrained Contrastive Language Image Pretraining (CLIP) teacher model. These soft labels yield more nuanced and general insights into the inter-class relationships, thereby endowing the pretraining process with better generalization ability. RPP produces a more resilient prompt initialization, enhancing its robust transferability across diverse visual recognition tasks. Experiments across various benchmarks consistently confirm the state-of-the-art (SOTA) performance of our pretrained prompts. Codes and models will be made available soon.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。