Papers › CPT: Colorful Prompt Tuning for Pre-trained Vision-Language Models

CPT: Colorful Prompt Tuning for Pre-trained Vision-Language Models

24 Sep 2021arXiv:2109.11797archive 2025-07-28

Yuan YAO, Ao Zhang, Zhengyan Zhang, Zhiyuan Liu, Tat-Seng Chua, Maosong Sun

Pre-Trained Vision-Language Models (VL-PTMs) have shown promising capabilities in grounding natural language in image data, facilitating a broad variety of cross-modal tasks. However, we note that there exists a significant gap between the objective forms of model pre-training and fine-tuning, resulting in a need for large amounts of labeled data to stimulate the visual grounding capability of VL-PTMs for downstream tasks. To address the challenge, we present Cross-modal Prompt Tuning (CPT, alternatively, Colorful Prompt Tuning), a novel paradigm for tuning VL-PTMs, which reformulates visual grounding into a fill-in-the-blank problem with color-based co-referential markers in image and text, maximally mitigating the gap. In this way, CPT enables strong few-shot and even zero-shot visual grounding capabilities of VL-PTMs. Comprehensive experimental results show that the prompt-tuned VL-PTMs outperform their fine-tuned counterparts by a large margin (e.g., 17.3% absolute accuracy improvement, and 73.8% relative standard deviation reduction on average with one shot in RefCOCO evaluation). We make the data and code for this paper publicly available at https://github.com/thunlp/CPT.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2109.11797")

Code

Syntology Ran 3 of 13 code samples harvested from 1 repository linked to this paper; 10 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 1 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

thunlp/cpt officialmentioned in papermentioned on GitHubpytorchMIT report
lunaproject22/rpa mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 3 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
1ran
10unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from thunlp/cpt. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

compute_score_with_logits thunlp/cpt/Oscar/oscar/fewshot/gqa_cpt.py official repository ran fingerprinted MIT (permissive) · 89bdd6decba2b415 · report
instance_bce_with_logits thunlp/cpt/Oscar/oscar/fewshot/gqa_cpt.py official repository ran · our draft was wrong MIT (permissive) · e36ec4e0a52c6a4b · report
trim_batch thunlp/cpt/Oscar/oscar/fewshot/gqa_cpt.py official repository ran · our draft was wrong MIT (permissive) · 12516cd21b436092 · report
get_evaluate_file thunlp/cpt/Oscar/oscar/fewshot/refcoco_cpt.py official repository unverified MIT (permissive) · 01da88ba6172509e · report
get_evaluate_method thunlp/cpt/Oscar/oscar/fewshot/refcoco_cpt.py official repository unverified MIT (permissive) · e040a3d039f5af10 · report
restore_training_settings thunlp/cpt/Oscar/oscar/fewshot/refcoco_cpt.py official repository unverified MIT (permissive) · 5ddea353591c2338 · report
template1 thunlp/cpt/Oscar/oscar/datasets/refcoco_zsl_cpt_dataset.py official repository unverified MIT (permissive) · d48bb07bc01dfdb7 · report
template2 thunlp/cpt/Oscar/oscar/datasets/refcoco_zsl_cpt_dataset.py official repository unverified MIT (permissive) · c0fd672552e0160f · report
template3 thunlp/cpt/Oscar/oscar/datasets/refcoco_zsl_cpt_dataset.py official repository unverified MIT (permissive) · 39e9626ebfd96e62 · report
tokenize thunlp/cpt/Oscar/oscar/datasets/refcoco_fsl_cpt_dataset.py official repository unverified MIT (permissive) · 7ab756d02fb91e21 · report
tokenize thunlp/cpt/Oscar/oscar/datasets/vg_cpt_dataset.py official repository unverified MIT (permissive) · 0a1867725d8d31b1 · report
vcr_collate_fn thunlp/cpt/Oscar/oscar/fewshot/vcr_nsp_cpt.py official repository unverified MIT (permissive) · 2e1b1ca48e16a324 · report
vcr_collate_fn thunlp/cpt/Oscar/oscar/fewshot/vcr_qar_nsp_cpt.py official repository unverified MIT (permissive) · ffe4043326409d20 · report

Tasks

Visual Grounding

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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