Pre-trained vision-language (V-L) models such as CLIP have shown excellent generalization ability to downstream tasks. However, they are sensitive to the choice of input text prompts and require careful selection of prompt templates to perform well. Inspired by the Natural Language Processing (NLP) literature, recent CLIP adaptation approaches learn prompts as the textual inputs to fine-tune CLIP for downstream tasks. We note that using prompting to adapt representations in a single branch of CLIP (language or vision) is sub-optimal since it does not allow the flexibility to dynamically adjust both representation spaces on a downstream task. In this work, we propose Multi-modal Prompt Learning (MaPLe) for both vision and language branches to improve alignment between the vision and language representations. Our design promotes strong coupling between the vision-language prompts to ensure mutual synergy and discourages learning independent uni-modal solutions. Further, we learn separate prompts across different early stages to progressively model the stage-wise feature relationships to allow rich context learning. We evaluate the effectiveness of our approach on three representative tasks of generalization to novel classes, new target datasets and unseen domain shifts. Compared with the state-of-the-art method Co-CoOp, MaPLe exhibits favorable performance and achieves an absolute gain of 3.45% on novel classes and 2.72% on overall harmonic-mean, averaged over 11 diverse image recognition datasets. Code: https://tinyurl.com/2dzs8f3w.
翻译:诸如 CLIP 等经过预先培训的视觉语言模型(V-L) 显示对下游任务具有极佳的概括性能力。 但是,它们对于选择输入文本的提示很敏感,需要仔细选择迅速的模板才能很好地发挥作用。 在自然语言处理文献的启发下, CLIP 适应方法最近学习了作为微调 CLIP 的文字投入的提示,用于下游任务的微调 CLIP 的微调 CLIP 。 我们注意到, 利用快速使 CLIP (语言或愿景) 的单个分支的表达方式适应性是次优的,因为它不允许在下游任务中动态地调整两个代表空间的灵活性。 在这项工作中,我们提议为视觉和语言分支提供多式快速学习(MAPL ) 。 我们的设计促进了视觉语言提示之间的强烈组合,以确保相互协同,并阻碍学习独立的单式解决方案。 此外,我们在不同早期阶段分别学习了不同的提示, 以逐步模拟阶段性特征关系, 以便进行丰富的背景学习。 我们评估了我们三种具有代表性的通用图象学分级图象学分级图的3级图级图级、 目标图象级图象级图级图级图级图象学分级图级图案。