Lune

CVPR2022Top-tier venue

Conditional Prompt Learning for Vision-Language Models

Kaiyang Zhou, Jingkang Yang, Chen Change Loy, Ziwei Liu

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

743 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models cites A Simple Framework for Contrastive Learning of Visual Representations
  • Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
  • Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
  • Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
  • Prompt-aligned Gradient for Prompt Tuning cites Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models
  • Prompt-aligned Gradient for Prompt Tuning cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
  • Prompt-aligned Gradient for Prompt Tuning cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
  • Prompt-aligned Gradient for Prompt Tuning cites Learning Transferable Visual Models From Natural Language Supervision
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites A Simple Framework for Contrastive Learning of Visual Representations
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
  • Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision cites Learning Transferable Visual Models From Natural Language Supervision
  • S-Prompts Learning with Pre-trained Transformers: An Occam's Razor for Domain Incremental Learning cites A Simple Framework for Contrastive Learning of Visual Representations
  • S-Prompts Learning with Pre-trained Transformers: An Occam's Razor for Domain Incremental Learning cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • S-Prompts Learning with Pre-trained Transformers: An Occam's Razor for Domain Incremental Learning cites Learning Transferable Visual Models From Natural Language Supervision
  • Learning Transferable Visual Models From Natural Language Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
  • Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Learning Transferable Visual Models From Natural Language Supervision cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
  • MedCLIP: Contrastive Learning from Unpaired Medical Images and Text cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
  • MedCLIP: Contrastive Learning from Unpaired Medical Images and Text cites Learning Transferable Visual Models From Natural Language Supervision
  • Self-regulating Prompts: Foundational Model Adaptation without Forgetting cites Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language Models
  • Self-regulating Prompts: Foundational Model Adaptation without Forgetting cites Prompt-aligned Gradient for Prompt Tuning
  • Self-regulating Prompts: Foundational Model Adaptation without Forgetting cites Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
  • Self-regulating Prompts: Foundational Model Adaptation without Forgetting cites The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution Generalization
  • Self-regulating Prompts: Foundational Model Adaptation without Forgetting cites Learning Transferable Visual Models From Natural Language Supervision
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers743

  1. MedCLIP: Contrastive Learning from Unpaired Medical Images and TextZifeng Wang, Zhenbang Wu, Dinesh Agarwal, Jimeng SunEMNLP 2022 · 907 citations
  2. Test-Time Prompt Tuning for Zero-Shot Generalization in Vision-Language ModelsManli Shu, Weili Nie, De-An Huang, Zhiding Yu et al.NeurIPS 2022 · 603 citations
  3. Prompt-aligned Gradient for Prompt TuningBeier Zhu, Yulei Niu, Yucheng Han, Yue Wu et al.ICCV 2023 · 475 citations
  4. S-Prompts Learning with Pre-trained Transformers: An Occam's Razor for Domain Incremental LearningYabin Wang, Zhiwu Huang, Xiaopeng HongNeurIPS 2022 · 397 citations
  5. Self-regulating Prompts: Foundational Model Adaptation without ForgettingMuhammad Uzair Khattak, Syed Talal Wasim, Muzammal Naseer, Salman Khan et al.ICCV 2023 · 365 citations

Builds on18

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
  3. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  4. Scaling Up Visual and Vision-Language Representation Learning With Noisy Text SupervisionChao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen et al.ICML 2021 · 5,401 citations
  5. The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution GeneralizationDan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath et al.ICCV 2021 · 2,294 citations

Related papers

  1. MaPLe: Multi-modal Prompt LearningMuhammad Uzair Khattak, Hanoona Abdul Rasheed, Muhammad Maaz, Salman H. Khan et al.CVPR 2023
  2. Learning to Learn Better Visual PromptsFengxiang Wang, Wanrong Huang, Shaowu Yang, Qi Fan et al.AAAI 2024 · 17 citations
  3. Concept-Guided Prompt Learning for Generalization in Vision-Language ModelsYi Zhang, Ce Zhang, Ke Yu, Yushun Tang et al.AAAI 2024 · 37 citations
  4. Visual-Language Prompt Tuning with Knowledge-Guided Context OptimizationHantao Yao, Rui Zhang, Changsheng XuCVPR 2023
  5. Knowledge-Aware Prompt Tuning for Generalizable Vision-Language ModelsBaoshuo Kan, Teng Wang, Wenpeng Lu, Xiantong Zhen et al.ICCV 2023 · 53 citations
Dusk over the sea between two cliffs drawn in fine vertical lines