Papers › Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training

Efficient Token-Guided Image-Text Retrieval with Consistent Multimodal Contrastive Training

15 Jun 2023arXiv:2306.08789archive 2025-07-28

Chong Liu, Yuqi Zhang, Hongsong Wang, Weihua Chen, Fan Wang, Yan Huang, Yi-Dong Shen, Liang Wang

Image-text retrieval is a central problem for understanding the semantic relationship between vision and language, and serves as the basis for various visual and language tasks. Most previous works either simply learn coarse-grained representations of the overall image and text, or elaborately establish the correspondence between image regions or pixels and text words. However, the close relations between coarse- and fine-grained representations for each modality are important for image-text retrieval but almost neglected. As a result, such previous works inevitably suffer from low retrieval accuracy or heavy computational cost. In this work, we address image-text retrieval from a novel perspective by combining coarse- and fine-grained representation learning into a unified framework. This framework is consistent with human cognition, as humans simultaneously pay attention to the entire sample and regional elements to understand the semantic content. To this end, a Token-Guided Dual Transformer (TGDT) architecture which consists of two homogeneous branches for image and text modalities, respectively, is proposed for image-text retrieval. The TGDT incorporates both coarse- and fine-grained retrievals into a unified framework and beneficially leverages the advantages of both retrieval approaches. A novel training objective called Consistent Multimodal Contrastive (CMC) loss is proposed accordingly to ensure the intra- and inter-modal semantic consistencies between images and texts in the common embedding space. Equipped with a two-stage inference method based on the mixed global and local cross-modal similarity, the proposed method achieves state-of-the-art retrieval performances with extremely low inference time when compared with representative recent approaches.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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="2306.08789")

Code

Syntology Ran 6 of 15 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 1 ran · violated contract; 1 ran · our draft was wrong; 4 ran with no contract checked.

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

lcfractal/tgdt mentioned in paperpytorchMIT 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

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

1ran · violated contract
1ran · our draft was wrong
4ran
9unverified

Licence: 0 of the 15 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 lcfractal/tgdt. “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.

cosine_sim lcfractal/tgdt/utils.py named in the paper ran MIT (permissive) · f2e17288ada8cf89 · report
dot_sim lcfractal/tgdt/models/loss.py named in the paper ran MIT (permissive) · 6a49bab714ec6122 · report
generate_square_subsequent_mask lcfractal/tgdt/models/utils.py named in the paper ran · violated contract fingerprinted MIT (permissive) · 894b253f35765276 · report
get_paths lcfractal/tgdt/data.py named in the paper ran MIT (permissive) · 66f891f51e3bec44 · report
get_transform lcfractal/tgdt/data.py named in the paper ran MIT (permissive) · e7518699cbc1bd68 · report
l2norm lcfractal/tgdt/models/utils.py named in the paper ran · our draft was wrong fingerprinted MIT (permissive) · f92e514b398e75d8 · report
EncoderText lcfractal/tgdt/models/text.py named in the paper unverified MIT (permissive) · e1d7360c5be25e25 · report
accuracy lcfractal/tgdt/train_ft.py named in the paper unverified MIT (permissive) · f0c9a29156911331 · report
cosine_sim lcfractal/tgdt/models/loss.py named in the paper unverified MIT (permissive) · 7f3908ad08980104 · report
dot_sim lcfractal/tgdt/utils.py named in the paper unverified MIT (permissive) · 36545e75ca862270 · report
encode_data lcfractal/tgdt/evaluation.py named in the paper unverified MIT (permissive) · 5a365ec8a05fffb9 · report
find_nhead lcfractal/tgdt/models/visual.py named in the paper unverified MIT (permissive) · 6e963f0bd8b4ec0f · report
get_model lcfractal/tgdt/utils.py named in the paper unverified MIT (permissive) · a1ea9bbed7fcc094 · report
my_collate lcfractal/tgdt/evaluate_utils/compute_relevance.py named in the paper unverified MIT (permissive) · d9047caaedf4aadb · report
order_sim lcfractal/tgdt/models/loss.py named in the paper unverified MIT (permissive) · da16023b8239c604 · report

Tasks

Image-text RetrievalRepresentation LearningRetrievalText Retrieval

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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