Papers › Cross-Batch Memory for Embedding Learning

Cross-Batch Memory for Embedding Learning

14 Dec 2019CVPR 2020 6arXiv:1912.06798archive 2025-07-28

Xun Wang, Haozhi Zhang, Weilin Huang, Matthew R. Scott

Mining informative negative instances are of central importance to deep metric learning (DML), however this task is intrinsically limited by mini-batch training, where only a mini-batch of instances is accessible at each iteration. In this paper, we identify a "slow drift" phenomena by observing that the embedding features drift exceptionally slow even as the model parameters are updating throughout the training process. This suggests that the features of instances computed at preceding iterations can be used to considerably approximate their features extracted by the current model. We propose a cross-batch memory (XBM) mechanism that memorizes the embeddings of past iterations, allowing the model to collect sufficient hard negative pairs across multiple mini-batches - even over the whole dataset. Our XBM can be directly integrated into a general pair-based DML framework, where the XBM augmented DML can boost performance considerably. In particular, without bells and whistles, a simple contrastive loss with our XBM can have large R@1 improvements of 12%-22.5% on three large-scale image retrieval datasets, surpassing the most sophisticated state-of-the-art methods, by a large margin. Our XBM is conceptually simple, easy to implement - using several lines of codes, and is memory efficient - with a negligible 0.2 GB extra GPU memory. Code is available at: https://github.com/MalongTech/research-xbm.

PaperPDFConference PDFCode

In Syntology View this paper on Syntology, its page in Syntology's graph. That page 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

MalongTech/research-xbm officialmentioned in papermentioned on GitHubpytorchNOASSERTIONSyntology: not harvested report
bnu-wangxun/Deep_Metric mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Multi-Similarity Loss with General Pair Weighting for Deep Metric Learning (arXiv:1904.06627; that paper's own run record: 0 ran · 1 unverified); nothing checks that they implement this paper's method. report
msight-tech/research-xbm mentioned on GitHubpytorchNOASSERTIONSyntology: not harvested report
OML-Team/open-metric-learning pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale (arXiv:2010.11929; that paper's own run record: 307 ran (of which 165 constructed an object rather than computing a result; 286 with no instrument failure: 8 honoured, 2 violated, 276 with no contract checked; 21 where Syntology's instrument failed) · 112 unverified); nothing checks that they implement this paper's method. report
PaddlePaddle/PaddleClas paddleSyntology: not harvested 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Image RetrievalMetric LearningRetrieval

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Retrieval In-Shop Cross-Batch Memory R@1 91.3 #2 of 7 Archive leaderboard report
Image Retrieval SOP Cross-Batch Memory R@1 80.6 #7 of 14 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