Papers › Align before Fuse: Vision and Language Representation Learning with Momentum Distillation

Align before Fuse: Vision and Language Representation Learning with Momentum Distillation

16 Jul 2021NeurIPS 2021 12arXiv:2107.07651archive 2025-07-28

Junnan Li, Ramprasaath R. Selvaraju, Akhilesh Deepak Gotmare, Shafiq Joty, Caiming Xiong, Steven Hoi

Large-scale vision and language representation learning has shown promising improvements on various vision-language tasks. Most existing methods employ a transformer-based multimodal encoder to jointly model visual tokens (region-based image features) and word tokens. Because the visual tokens and word tokens are unaligned, it is challenging for the multimodal encoder to learn image-text interactions. In this paper, we introduce a contrastive loss to ALign the image and text representations BEfore Fusing (ALBEF) them through cross-modal attention, which enables more grounded vision and language representation learning. Unlike most existing methods, our method does not require bounding box annotations nor high-resolution images. In order to improve learning from noisy web data, we propose momentum distillation, a self-training method which learns from pseudo-targets produced by a momentum model. We provide a theoretical analysis of ALBEF from a mutual information maximization perspective, showing that different training tasks can be interpreted as different ways to generate views for an image-text pair. ALBEF achieves state-of-the-art performance on multiple downstream vision-language tasks. On image-text retrieval, ALBEF outperforms methods that are pre-trained on orders of magnitude larger datasets. On VQA and NLVR², ALBEF achieves absolute improvements of 2.37% and 3.84% compared to the state-of-the-art, while enjoying faster inference speed. Code and pre-trained models are available at https://github.com/salesforce/ALBEF/.

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

Code

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

By repository: community (archive-listed): 5 samples from 2 repositories, 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.

salesforce/lavis officialmentioned on GitHubpytorchBSD-3-Clause report
salesforce/ALBEF mentioned in papermentioned on GitHubpytorchBSD-3-Clause report
amazon-research/mix-generation mentioned on GitHubpytorchApache-2.0 report
facebookresearch/multimodal mentioned on GitHubpytorch report
salesforce/pb-ovd mentioned on GitHubpytorchBSD-3-Clause report
yuliangcai2022/clumo mentioned on GitHubpytorchBSD-3-Clause 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

5 samples harvested; 3 ran; 0 honoured the contract we drafted; 2 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 · our draft was wrong
2ran · fixture could not drive it
2unverified

Licence: 3 of the 5 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 2 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_image facebookresearch/multimodal/examples/albef/finetune_retrieval.py community (archive-listed) ran · our draft was wrong BSD-3-Clause (permissive) · 0ebf6e3d4677547a · report
encode_text facebookresearch/multimodal/examples/albef/finetune_retrieval.py community (archive-listed) ran · fixture could not drive it BSD-3-Clause (permissive) · e59b9b43e8146d5e · report
itm_eval yuliangcai2022/clumo/Retrieval.py community (archive-listed) ran · fixture could not drive it BSD-3-Clause recorded; this copy not marked cleared · pointer only · c7f85279d772ea19 · report
avg_distance yuliangcai2022/clumo/CLOVE.py community (archive-listed) unverified BSD-3-Clause recorded; this copy not marked cleared · pointer only · 06916278a4ead58c · report
concat_all_gather yuliangcai2022/clumo/models/model_pretrain.py community (archive-listed) unverified BSD-3-Clause recorded; this copy not marked cleared · pointer only · 73cecca9f3575f09 · report

Tasks

Cross-Modal RetrievalGrounded language learningImage-text RetrievalImage-text matchingImage-to-Text RetrievalOpen Vocabulary Attribute DetectionRepresentation LearningRetrievalText RetrievalVisual Question Answering (VQA)Visual ReasoningZero-Shot Cross-Modal Retrieval

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Cross-Modal Retrieval COCO 2014 ALBEF Image-to-text R@1 77.6 #15 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 ALBEF Image-to-text R@10 97.2 #15 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 ALBEF Image-to-text R@5 94.3 #15 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 ALBEF Text-to-image R@1 60.7 #15 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 ALBEF Text-to-image R@10 90.5 #15 of 36 Archive leaderboard report
Cross-Modal Retrieval COCO 2014 ALBEF Text-to-image R@5 84.3 #15 of 36 Archive leaderboard report
Image-text matching CommercialAdsDataset ALBEF ADD(S) AUC 82.74 #8 of 8 Archive leaderboard report
Image-to-Text Retrieval Flickr30k ALBEF Recall@1 95.9 #7 of 11 Archive leaderboard report
Image-to-Text Retrieval Flickr30k ALBEF Recall@10 100.0 #7 of 11 Archive leaderboard report
Image-to-Text Retrieval Flickr30k ALBEF Recall@5 99.8 #7 of 11 Archive leaderboard report
Open Vocabulary Attribute Detection OVAD-Box benchmark ALBEF mean average precision 21.0 #5 of 7 Archive leaderboard report
Visual Question Answering (VQA) VQA v2 test-dev ALBEF (14M) Accuracy 75.84 #19 of 56 Archive leaderboard report
Visual Question Answering (VQA) VQA v2 test-std ALBEF (14M) overall 76.04 #14 of 38 Archive leaderboard report
Visual Reasoning NLVR2 Dev ALBEF (14M) Accuracy 83.14 #11 of 15 Archive leaderboard report
Visual Reasoning NLVR2 Test ALBEF (14M) Accuracy 82.55 #10 of 14 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 ALBEF Image-to-text R@1 68.7 #7 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 ALBEF Image-to-text R@10 94.7 #7 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 ALBEF Image-to-text R@5 89.5 #7 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 ALBEF Text-to-image R@1 50.1 #7 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 ALBEF Text-to-image R@10 84.5 #7 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval COCO 2014 ALBEF Text-to-image R@5 76.4 #7 of 18 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k ALBEF Image-to-text R@1 90.5 #10 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k ALBEF Image-to-text R@10 99.7 #10 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k ALBEF Image-to-text R@5 98.8 #10 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k ALBEF Text-to-image R@1 76.8 #10 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k ALBEF Text-to-image R@10 96.7 #10 of 22 Archive leaderboard report
Zero-Shot Cross-Modal Retrieval Flickr30k ALBEF Text-to-image R@5 93.7 #10 of 22 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.

Methods

Introduced by this paper: ALBEF

ALBEF

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