Methods › General › Prompt Engineering › CoOp
Context Optimization
CoOp
Introduced by Kaiyang Zhou et al. in Learning to Prompt for Vision-Language Models
archive 2025-07-28 Description, source and code snippet are the archive's method entry.
CoOp, or Context Optimization, is an automated prompt engineering method that avoids manual prompt tuning by modeling context words with continuous vectors that are end-to-end learned from data. The context could be shared among all classes or designed to be class-specific. During training, we simply minimize the prediction error using the cross-entropy loss with respect to the learnable context vectors, while keeping the pre-trained parameters fixed. The gradients can be back-propagated all the way through the text encoder, distilling the rich knowledge encoded in the parameters for learning task-relevant context.
In Syntology about another paper, arXiv:2311.00591: no code under this name (no_code; paper_only). The lookup matched 'Coop' ignoring case. About another paper: this answer is about arXiv:2311.00591, while the archive credits arXiv:2109.01134, so it does not say whether this method has code.
From the lookup's note on this name: The same name also belongs to “Context Optimization (CoOp)”, a method in the paper “Learning to Prompt for Vision-Language Models” (arXiv:2109.01134, 4,355 citations), which the lookup finds cited far more than the paper this answer is about (9 citations), so this answer may be about a different sense of the name. For arXiv:2109.01134: its page on this site · ask the lookup about it.
Code Syntology holds under other names, as the lookup lists them (code_nearby); not a complete list, and none of them is this method.
- coop-CBM · shares_name_tokens (shares name tokens with this name; a different method) · level V3 · retrieve with
get_reference_implementation(name='coop-CBM') - COOP-KERNELUCB · shares_name_tokens (shares name tokens with this name; a different method) · level V2 · retrieve with
get_reference_implementation(name='COOP-KERNELUCB')
Origin paper of this answer, arXiv:2311.00591 (its page on Syntology).
Syntology's have check for this name (free, it answers coverage only), read 2026-10-05; ask it again live. A level is the served verification level of that one answer; nothing here is summed across methods.
What each level means, quoted from Syntology's server card: V0 “imports”; V1 “executes against a synthesized fixture and returns a value of the recorded type”; V2 “two implementations GENERATED from the paper's signature and spec agree numerically (1e-6) on fixture inputs” “neither of the two ever read the authors' own code, so V2 measures how unambiguously the paper specifies the method, not fidelity to the authors' implementation (measured 2026-09-11, commit 75eaa77: cross_checked_by is a second LLM on 2,628 of 2,831 served samples)”; V3 “paper-derived property tests pass on both of those same two generations.” The card adds: “No rung on this ladder compares the served code against the authors' implementation, so treat every level as evidence about runnability and internal agreement, not about matching the paper's results.” A level quoted in two parts is one definition the card writes as two clauses joined by a double hyphen, each clause quoted on its own (how these levels are quoted).
Papers archive 2025-07-28
archive papers tagged: 30 · with a code link: 18 · where Syntology ran a sample: 9 (9 with a run with no instrument failure, 0 where every run was a failure of Syntology's instrument) Syntology
Show: all tagged papersonly where code ran (9 of 30 tagged: 9 with a run with no instrument failure, 0 where every run was a failure of Syntology's instrument)
Page 1 of 1: papers 1 to 30 of 30, newest first by the archive's date (ties by slug), in archive order.
Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code, as “N ran (of which C constructed an object rather than computing a result; K with no instrument failure: H honoured, V violated, P with no contract checked; I where Syntology's instrument failed) · U unverified”; the instrument figure counts failures of Syntology's instrument, not of the code. It is per sample and not a correctness claim. When the archive marks a repository official for the paper, the line starts with that repository's state (the archive's flag, not a verdict on who wrote the code; “community repositories only” when every sample that ran came from a community repository, “official: no sample here; runs from other or unrecorded repositories” when some came from a repository the paper names or has in its text, or from none recorded); hover it for the repositories the samples that ran came from.
-
FA: Forced Prompt Learning of Vision-Language Models for Out-of-Distribution Detection 6 Jul 2025 · 1 repository · arXiv:2507.04511Syntology official (archive's flag): 5 ran · 5 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 3 where Syntology's instrument failed) · 4 unverified (of 9 harvested samples) · 9 pointer-only (licence)
-
MMRL++: Parameter-Efficient and Interaction-Aware Representation Learning for Vision-Language Models 15 May 2025 · 1 repository · arXiv:2505.10088
-
MMRL: Multi-Modal Representation Learning for Vision-Language Models 11 Mar 2025 · 1 repository · arXiv:2503.08497Syntology official: harvested, nothing ran · 0 ran · 1 unverified (of 1 harvested sample)
-
Multi-Point Positional Insertion Tuning for Small Object Detection 24 Dec 2024 · 0 repositories · arXiv:2412.18090
-
PLPP: Prompt Learning with Perplexity Is Self-Distillation for Vision-Language Models 18 Dec 2024 · 0 repositories · arXiv:2412.15277
-
TextRefiner: Internal Visual Feature as Efficient Refiner for Vision-Language Models Prompt Tuning 11 Dec 2024 · 1 repository · arXiv:2412.08176
-
TransAgent: Transfer Vision-Language Foundation Models with Heterogeneous Agent Collaboration 16 Oct 2024 · 1 repository · arXiv:2410.12183Syntology official (archive's flag): 6 ran · 6 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 1 honoured, 0 violated, 1 with no contract checked; 4 where Syntology's instrument failed) · 2 unverified (of 8 harvested samples) · 2 pointer-only (licence)
-
FLIER: Few-shot Language Image Models Embedded with Latent Representations 10 Oct 2024 · 0 repositories · arXiv:2410.07648
-
Understanding and Mitigating Miscalibration in Prompt Tuning for Vision-Language Models 3 Oct 2024 · 1 repository · arXiv:2410.02681Syntology 4 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 5 unverified (of 9 harvested samples) · 6 pointer-only (licence)
-
Enhancing Robustness of Vision-Language Models through Orthogonality Learning and Self-Regularization 11 Jul 2024 · 0 repositories · arXiv:2407.08374
-
Learning to Adapt Category Consistent Meta-Feature of CLIP for Few-Shot Classification 8 Jul 2024 · 0 repositories · arXiv:2407.05647
-
IntCoOp: Interpretability-Aware Vision-Language Prompt Tuning 19 Jun 2024 · 0 repositories · arXiv:2406.13683
-
AAPL: Adding Attributes to Prompt Learning for Vision-Language Models 25 Apr 2024 · 1 repository · arXiv:2404.16804
-
Weak Distribution Detectors Lead to Stronger Generalizability of Vision-Language Prompt Tuning 31 Mar 2024 · 1 repository · arXiv:2404.00603Syntology official (archive's flag): 4 ran · 4 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified (of 6 harvested samples) · 3 pointer-only (licence)
-
Concept-Guided Prompt Learning for Generalization in Vision-Language Models 15 Jan 2024 · 0 repositories · arXiv:2401.07457
-
Text-driven Prompt Generation for Vision-Language Models in Federated Learning 9 Oct 2023 · 0 repositories · arXiv:2310.06123
-
SwapPrompt: Test-Time Prompt Adaptation for Vision-Language Models 21 Sep 2023 · 0 repositories
-
PRE: Vision-Language Prompt Learning with Reparameterization Encoder 14 Sep 2023 · 2 repositories · arXiv:2309.07760
-
Language Models as Black-Box Optimizers for Vision-Language Models 12 Sep 2023 · 1 repository · arXiv:2309.05950Syntology official (archive's flag): 8 ran · 8 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 2 where Syntology's instrument failed) · 3 unverified (of 11 harvested samples) · 11 pointer-only (licence)
-
Context-Aware Prompt Tuning for Vision-Language Model with Dual-Alignment 8 Sep 2023 · 0 repositories · arXiv:2309.04158
-
Unsupervised Prototype Adapter for Vision-Language Models 22 Aug 2023 · 0 repositories · arXiv:2308.11507
-
MuDPT: Multi-modal Deep-symphysis Prompt Tuning for Large Pre-trained Vision-Language Models 20 Jun 2023 · 1 repository · arXiv:2306.11400
-
LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning 2 Jun 2023 · 2 repositories · arXiv:2306.01293Syntology official (archive's flag): 9 ran · 9 ran (of which 0 constructed an object rather than computing a result; 4 with no instrument failure: 1 honoured, 0 violated, 3 with no contract checked; 5 where Syntology's instrument failed) · 3 unverified (of 12 harvested samples) · 7 pointer-only (licence)
-
Task-Oriented Multi-Modal Mutual Leaning for Vision-Language Models 30 Mar 2023 · 0 repositories · arXiv:2303.17169
-
Understanding and Mitigating Overfitting in Prompt Tuning for Vision-Language Models 4 Nov 2022 · 1 repository · arXiv:2211.02219
-
Prompt Tuning with Soft Context Sharing for Vision-Language Models 29 Aug 2022 · 1 repository · arXiv:2208.13474
-
Learning to Compose Soft Prompts for Compositional Zero-Shot Learning 7 Apr 2022 · 1 repository · arXiv:2204.03574Syntology official (archive's flag): 2 ran · 2 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 1 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified (of 2 harvested samples)
-
Unsupervised Prompt Learning for Vision-Language Models 7 Apr 2022 · 1 repository · arXiv:2204.03649
-
Conditional Prompt Learning for Vision-Language Models 10 Mar 2022 · 12 repositories · arXiv:2203.05557Syntology community repositories only · 4 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 3 where Syntology's instrument failed) · 2 unverified (of 6 harvested samples) · 3 pointer-only (licence)
-
Learning to Prompt for Vision-Language Models 2 Sep 2021 · 18 repositories · arXiv:2109.01134Syntology community repositories only · 3 ran (of which 1 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 1 where Syntology's instrument failed) · 9 unverified (of 12 harvested samples)
Tasks archive 2025-07-28
20 shown of 39 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.
Usage over time archive 2025-07-28
Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).
Categories archive 2025-07-28
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections