Papers › Stacked Cross Attention for Image-Text Matching

Stacked Cross Attention for Image-Text Matching

21 Mar 2018ECCV 2018 9arXiv:1803.08024archive 2025-07-28

Kuang-Huei Lee, Xi Chen, Gang Hua, Houdong Hu, Xiaodong He

In this paper, we study the problem of image-text matching. Inferring the latent semantic alignment between objects or other salient stuff (e.g. snow, sky, lawn) and the corresponding words in sentences allows to capture fine-grained interplay between vision and language, and makes image-text matching more interpretable. Prior work either simply aggregates the similarity of all possible pairs of regions and words without attending differentially to more and less important words or regions, or uses a multi-step attentional process to capture limited number of semantic alignments which is less interpretable. In this paper, we present Stacked Cross Attention to discover the full latent alignments using both image regions and words in a sentence as context and infer image-text similarity. Our approach achieves the state-of-the-art results on the MS-COCO and Flickr30K datasets. On Flickr30K, our approach outperforms the current best methods by 22.1% relatively in text retrieval from image query, and 18.2% relatively in image retrieval with text query (based on Recall@1). On MS-COCO, our approach improves sentence retrieval by 17.8% relatively and image retrieval by 16.6% relatively (based on Recall@1 using the 5K test set). Code has been made available at: https://github.com/kuanghuei/SCAN.

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

Code

Syntology Ran 7 of 16 code samples harvested from 4 repositories linked to this paper; 9 have no recorded run. Of those that ran: 1 ran · honoured contract; 5 ran · our draft was wrong; 1 ran · fixture could not drive it.

By repository: official repository: 1 sample from 1 repository, 0 ran; community (archive-listed): 15 samples from 3 repositories, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

kuanghuei/SCAN officialmentioned in papermentioned on GitHubpytorch report
MysteryVaibhav/SCAN mentioned on GitHubpytorch report
abhidipbhattacharyya/srl_aware_ret mentioned on GitHubpytorch report
adlnlp/attention_vl mentioned on GitHubpytorch report
idejie/SCAN 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

16 samples harvested; 7 ran; 1 honoured the contract we drafted; 9 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.

1ran · honoured contract
5ran · our draft was wrong
1ran · fixture could not drive it
9unverified

Licence: 1 of the 16 samples is 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 4 repositories linked to this paper, official or community; each sample names its own and says which. “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.

encode_data kuanghuei/SCAN/evaluation.py official repository unverified Apache-2.0 (permissive) · 77cfc8299b5facec · report
deserialize_vocab abhidipbhattacharyya/srl_aware_ret/vocab.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · cdee6932aa05022e · report
encode_data abhidipbhattacharyya/srl_aware_ret/evaluation.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 1119155cc37cafa8 · report
from_txt abhidipbhattacharyya/srl_aware_ret/vocab.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · ef05dda21c1cc726 · report
from_txt_vocab abhidipbhattacharyya/srl_aware_ret/vocab.py community (archive-listed) ran · our draft was wrong Apache-2.0 (permissive) · 0da42e0e379224b0 · report
process_sim abhidipbhattacharyya/srl_aware_ret/evaluation.py community (archive-listed) ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 05aa9e5fd7ec0e01 · report
read_all_images hthoai/image-text-matching/utils/read_all_images.py community (archive-listed) ran · honoured contract no licence file found · pointer only · 68f208c3005da07a · report
softmax abhidipbhattacharyya/srl_aware_ret/evaluation.py community (archive-listed) ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 652f07c5ff410713 · report
EncoderImage idejie/SCAN/model.py community (archive-listed) unverified Apache-2.0 (permissive) · 07c90e643974e90d · report
build_vocab idejie/SCAN/vocab.py community (archive-listed) unverified Apache-2.0 (permissive) · 7b9b11b5023a6ca4 · report
collate_fn idejie/SCAN/data.py community (archive-listed) unverified Apache-2.0 (permissive) · eb35209092068c75 · report
encode_data idejie/SCAN/evaluation.py community (archive-listed) unverified Apache-2.0 (permissive) · 647842a3913aa59c · report
get_loaders idejie/SCAN/data.py community (archive-listed) unverified Apache-2.0 (permissive) · a3b22af17bee87cc · report
get_precomp_loader idejie/SCAN/data.py community (archive-listed) unverified Apache-2.0 (permissive) · f8b728dce3e79700 · report
l1norm idejie/SCAN/model.py community (archive-listed) unverified Apache-2.0 (permissive) · a1e099b0f700be6a · report
l2norm idejie/SCAN/model.py community (archive-listed) unverified Apache-2.0 (permissive) · fe7440ba7662dcfc · report

Tasks

Cross-Modal RetrievalImage RetrievalImage-text matchingRetrievalSentenceSentence RetrievalText MatchingText Retrievaltext similarity

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Cross-Modal Retrieval COCO 2014 SCAN Image-to-text R@1 50.4 #32 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 SCAN Image-to-text R@10 90.0 #32 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 SCAN Image-to-text R@5 82.2 #32 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 SCAN Text-to-image R@1 38.6 #32 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 SCAN Text-to-image R@10 80.4 #32 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 SCAN Text-to-image R@5 69.3 #32 of 36 Archive leaderboard report
Cross-Modal Retrieval Flickr30k SCAN Image-to-text R@1 67.4 #21 of 27 Archive leaderboard report
Cross-Modal Retrieval Flickr30k SCAN Image-to-text R@10 95.8 #21 of 27 Archive leaderboard report
Cross-Modal Retrieval Flickr30k SCAN Image-to-text R@5 90.3 #21 of 27 Archive leaderboard report
Cross-Modal Retrieval Flickr30k SCAN Text-to-image R@1 48.6 #21 of 27 Archive leaderboard report
Cross-Modal Retrieval Flickr30k SCAN Text-to-image R@10 85.2 #21 of 27 Archive leaderboard report
Cross-Modal Retrieval Flickr30k SCAN Text-to-image R@5 77.7 #21 of 27 Archive leaderboard report
Image Retrieval Flickr30K 1K test SCAN i-t R@1 44.0 #10 of 18 Archive leaderboard report
Image Retrieval Flickr30K 1K test SCAN i-t R@10 82.6 #10 of 18 Archive leaderboard report
Image Retrieval Flickr30K 1K test SCAN i-t R@5 74.2 #10 of 18 Archive leaderboard report
Image Retrieval PhotoChat SCAN R1 10.4 #4 of 5 Archive leaderboard report
Image Retrieval PhotoChat SCAN R@10 37.1 #4 of 5 Archive leaderboard report
Image Retrieval PhotoChat SCAN R@5 27.0 #4 of 5 Archive leaderboard report
Image Retrieval PhotoChat SCAN Sum(R@1,5,10) 74.5 #4 of 5 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

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