Papers › Prompt Switch: Efficient CLIP Adaptation for Text-Video Retrieval
Prompt Switch: Efficient CLIP Adaptation for Text-Video Retrieval
Chaorui Deng, Qi Chen, Pengda Qin, Da Chen, Qi Wu
In text-video retrieval, recent works have benefited from the powerful learning capabilities of pre-trained text-image foundation models (e.g., CLIP) by adapting them to the video domain. A critical problem for them is how to effectively capture the rich semantics inside the video using the image encoder of CLIP. To tackle this, state-of-the-art methods adopt complex cross-modal modeling techniques to fuse the text information into video frame representations, which, however, incurs severe efficiency issues in large-scale retrieval systems as the video representations must be recomputed online for every text query. In this paper, we discard this problematic cross-modal fusion process and aim to learn semantically-enhanced representations purely from the video, so that the video representations can be computed offline and reused for different texts. Concretely, we first introduce a spatial-temporal "Prompt Cube" into the CLIP image encoder and iteratively switch it within the encoder layers to efficiently incorporate the global video semantics into frame representations. We then propose to apply an auxiliary video captioning objective to train the frame representations, which facilitates the learning of detailed video semantics by providing fine-grained guidance in the semantic space. With a naive temporal fusion strategy (i.e., mean-pooling) on the enhanced frame representations, we obtain state-of-the-art performances on three benchmark datasets, i.e., MSR-VTT, MSVD, and LSMDC.
In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.
Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, on Syntology's MCP service (how to connect):
get_harvested_code_for_paper(arxiv_id="2308.07648")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="2308.07648", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="2308.07648")
Code
Syntology 16 code samples harvested from 1 repository linked to this paper: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 1 where Syntology's instrument failed) · 12 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.
By repository: official repository: 16 samples from 1 repository, 4 ran (3 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.
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
16 samples harvested: 4 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 1 where Syntology's instrument failed) · 12 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 16 of the 16 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 bladewaltz1/promptswitch. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.
Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.
A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.
6b5c6a4c5fe3629a · report
fixture: signature hidden_states:Tensor/3/float, attention_mask:Tensor/4/float, causal_attention_mask:NoneType/0/?, output_attentions:bool/0/bool · returned tuple · level recorded 2026-09-24 7afff4a1c7789597 · report
fixture: signature input_ids:Tensor/2/int · returned Tensor · level recorded 2026-09-22 97b7de8e8d588a6e · report
fixture: signature pixel_values:Tensor/4/float · returned Tensor · level recorded 2026-09-22 census: 13 implementations from 13 papers, 2 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32 model/prompt_clip.py ran · our draft was wrong no licence file found · pointer only ·
749dd08d5d7409f2 · report
fixture: signature mask:Tensor/2/float, dtype:dtype/0/?, tgt_len:int/0/int · returned Tensor · level recorded 2026-09-22 6b28b5c3f3f4e210 · report
4c0e317bbad36a96 · report
4521a46931a2dd05 · report
072dd8bae2230fa6 · report
01439931fe5d4f12 · report
90804502b77c9f49 · report
be95c1088bdc81ad · report
925873e2ceea0336 · report
e28877d426856a6f · report
90011c4f1d727ebe · report
87939011e0a0b2dd · report
3654adee70b77587 · report
Method as code Syntology
What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.
1 assembly on this paper: 1 harvested, 0 generated.
harvested Assembly for Prompt Switch (graph method: Prompt Switch). 20 bricks; individually on a fixture: 8 ran (of which 2 constructed an object rather than computing a result; 7 with no instrument failure: 1 honoured, 1 violated, 5 with no contract checked; 1 where Syntology's instrument failed) · 12 unverified. The assembly has not been run end-to-end.
- PromptCLIP entry · level 0 · unverified ·
87939011e0a0b2dd - BaselinePooling helper · level 0 · unverified ·
6b28b5c3f3f4e210 - CLIPModel model · level 0 · unverified ·
90804502b77c9f49 - Config helper · level 0 · unverified ·
e28877d426856a6f - Transformer helper · level 0 · unverified ·
3654adee70b77587 - CLIPOutput helper · level 1 · ran ·
58cc0dc08e1bb9df - CLIPTextTransformer helper · level 0 · unverified ·
be95c1088bdc81ad - CLIPVisionTransformer helper · level 0 · unverified ·
925873e2ceea0336 - clip_loss helper · level 1 · ran · violated contract ·
1aa7f7b75b2418fa - MultiHeadedAttention helper · level 0 · unverified ·
90011c4f1d727ebe - CLIPEncoder helper · level 0 · unverified ·
4521a46931a2dd05 - CLIPTextEmbeddings helper · level 1 · ran ·
7afff4a1c7789597 - _expand_mask helper · level 1 · ran · our draft was wrong ·
749dd08d5d7409f2 - CLIPEncoderPT helper · level 0 · unverified ·
01439931fe5d4f12 - CLIPVisionEmbeddings helper · level 1 · ran ·
97b7de8e8d588a6e - contrastive_loss helper · level 1 · ran · honoured contract ·
f2e5f28608115fa6 - CLIPEncoderLayer helper · level 1 · ran ·
6b5c6a4c5fe3629a - CLIPEncoderLayerPT helper · level 0 · unverified ·
072dd8bae2230fa6 - CLIPAttention helper · level 0 · unverified ·
4c0e317bbad36a96 - CLIPMLP helper · level 1 · ran ·
077b0fff3b85e9e1
Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2308.07648") returns these assemblies with each brick's role and wiring (how to connect).
Tasks
Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Methods
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