Papers › Optimizing CLIP Models for Image Retrieval with Maintained Joint-Embedding Alignment

Optimizing CLIP Models for Image Retrieval with Maintained Joint-Embedding Alignment

3 Sep 2024arXiv:2409.01936archive 2025-07-28

Konstantin Schall, Kai Uwe Barthel, Nico Hezel, Klaus Jung

Contrastive Language and Image Pairing (CLIP), a transformative method in multimedia retrieval, typically trains two neural networks concurrently to generate joint embeddings for text and image pairs. However, when applied directly, these models often struggle to differentiate between visually distinct images that have similar captions, resulting in suboptimal performance for image-based similarity searches. This paper addresses the challenge of optimizing CLIP models for various image-based similarity search scenarios, while maintaining their effectiveness in text-based search tasks such as text-to-image retrieval and zero-shot classification. We propose and evaluate two novel methods aimed at refining the retrieval capabilities of CLIP without compromising the alignment between text and image embeddings. The first method involves a sequential fine-tuning process: initially optimizing the image encoder for more precise image retrieval and subsequently realigning the text encoder to these optimized image embeddings. The second approach integrates pseudo-captions during the retrieval-optimization phase to foster direct alignment within the embedding space. Through comprehensive experiments, we demonstrate that these methods enhance CLIP's performance on various benchmarks, including image retrieval, k-NN classification, and zero-shot text-based classification, while maintaining robustness in text-to-image retrieval. Our optimized models permit maintaining a single embedding per image, significantly simplifying the infrastructure needed for large-scale multi-modal similarity search systems.

PaperPDFCodeCode Syntology ran

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):

Code

Syntology 14 code samples harvested from 1 repository linked to this paper: 11 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 3 violated, 6 with no contract checked; 1 where Syntology's instrument failed) · 3 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: 14 samples from 1 repository, 11 ran (10 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-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

Visual-Computing/MCIP officialpytorchApache-2.0Syntology: 14 samples, 11 ran (1 instrument-failed) · 3 unverified 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

14 samples harvested: 11 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 3 violated, 6 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
3ran · violated contract
1ran · our draft was wrong
6ran
3unverified

Licence: 11 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. For 11 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from Visual-Computing/MCIP. “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.

Visual-Computing/MCIP official repository 14 samples, 11 ran (1 instrument-failed) · 3 unverified
const_lr MCIP/src/realignment/scheduler.py ran Apache-2.0 (permissive) here; the stored copy is pointer only · 04508bbd793cdfb9 · report fixture: signature optimizer:SGD/0/?, base_lr:float/0/float, warmup_length:int/0/int, steps:int/0/int · returned function · level recorded 2026-09-25
const_lr_cooldown MCIP/src/realignment/scheduler.py ran Apache-2.0 (permissive) here; the stored copy is pointer only · cc0d607a8934307d · report fixture: signature optimizer:SGD/0/?, base_lr:float/0/float, warmup_length:int/0/int, steps:int/0/int, cooldown_steps:int/0/int, cooldown_power:float/0/float, cooldown_end_lr:float/0/float · returned function · level recorded 2026-09-25
cosine_lr in 31 papers MCIP/src/realignment/scheduler.py ran Apache-2.0 (permissive) here; the stored copy is pointer only · 932d44bbf8bd0e3f · report fixture: signature optimizer:SGD/0/?, base_lr:float/0/float, warmup_length:int/0/int, steps:int/0/int · returned function · level recorded 2026-09-26
find_unique_indices MCIP/src/gpr-ft/create_pseudo_captions.py ran · honoured contract fingerprinted Apache-2.0 (permissive) · e6be8251c4651cfa · report fixture: signature string_list:list/1/str · returned ndarray · level recorded 2026-09-24
get_autocast in 5 papers MCIP/src/realignment/precision.py ran Apache-2.0 (permissive) here; the stored copy is pointer only · 94a4076103662faf · report fixture: signature precision:str/0/str · returned type · level recorded 2026-09-25
get_default_params in 12 papers MCIP/src/realignment/params.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only · 575ba28efe232215 · report fixture: signature model_name:str/0/str · returned dict · level recorded 2026-09-25
get_imagenet in 13 papers MCIP/src/realignment/data.py ran Apache-2.0 (permissive) · 0aa04fa0c06a8973 · report fixture: signature args:MockArgs/0/?, preprocess_fns:tuple/1/callable, split:str/0/str · returned DataInfo · level recorded 2026-09-24
is_global_master in 11 papers MCIP/src/realignment/distributed.py ran · violated contract Apache-2.0 (permissive) here; the stored copy is pointer only · 7c29b374198bddcd · report fixture: signature args:Args/0/? · returned bool · level recorded 2026-09-22
is_local_master in 9 papers MCIP/src/realignment/distributed.py ran · violated contract Apache-2.0 (permissive) here; the stored copy is pointer only · 0377e309e95cfc3e · report fixture: signature args:Args/0/? · returned bool · level recorded 2026-09-22
is_master in 43 papers MCIP/src/realignment/distributed.py ran · violated contract Apache-2.0 (permissive) here; the stored copy is pointer only · b092791002b40e8a · report fixture: signature args:Args/0/? · returned bool · level recorded 2026-09-22
remote_sync_fsspec in 5 papers MCIP/src/realignment/file_utils.py ran fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only · 5ef1e6fce93e5928 · report fixture: signature local_dir:str/0/str, remote_dir:str/0/str · returned bool · level recorded 2026-09-25
parse_args in 355 papers MCIP/src/realignment/params.py unverified Apache-2.0 (permissive) · a44b7dfe82f0d1af · report
remote_sync in 5 papers MCIP/src/realignment/file_utils.py unverified Apache-2.0 (permissive) here; the stored copy is pointer only · c8826eee91bf0f73 · report
remote_sync_s3 in 5 papers MCIP/src/realignment/file_utils.py unverified Apache-2.0 (permissive) here; the stored copy is pointer only · 0cf5fb2e3a3a9114 · report

Tasks

Image RetrievalRetrievalZero-Shot Learning

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIPk-NN

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