Papers › Recall@k Surrogate Loss with Large Batches and Similarity Mixup

Recall@k Surrogate Loss with Large Batches and Similarity Mixup

25 Aug 2021CVPR 2022 1arXiv:2108.11179archive 2025-07-28

Yash Patel, Giorgos Tolias, Jiri Matas

This work focuses on learning deep visual representation models for retrieval by exploring the interplay between a new loss function, the batch size, and a new regularization approach. Direct optimization, by gradient descent, of an evaluation metric, is not possible when it is non-differentiable, which is the case for recall in retrieval. A differentiable surrogate loss for the recall is proposed in this work. Using an implementation that sidesteps the hardware constraints of the GPU memory, the method trains with a very large batch size, which is essential for metrics computed on the entire retrieval database. It is assisted by an efficient mixup regularization approach that operates on pairwise scalar similarities and virtually increases the batch size further. The suggested method achieves state-of-the-art performance in several image retrieval benchmarks when used for deep metric learning. For instance-level recognition, the method outperforms similar approaches that train using an approximation of average precision.

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

Code

Syntology Ran 0 of 11 code samples harvested from 1 repository linked to this paper; 11 have no recorded run.

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

yash0307/RecallatK_surrogate officialmentioned in papermentioned on GitHubpytorchMIT report
yash0307/recallatk officialmentioned in papermentioned on GitHubpytorchMIT 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

11 samples harvested; 0 ran; 0 honoured the contract we drafted; 11 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.

11unverified

Licence: 0 of the 11 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 yash0307/RecallatK_surrogate. “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.

args2exp_name yash0307/RecallatK_surrogate/src/auxiliaries.py official repository unverified MIT (permissive) · 019b75de18e8ab7f · report
f1_score yash0307/RecallatK_surrogate/src/auxiliaries_nofaiss.py official repository unverified MIT (permissive) · b0205d59d4a00b5a · report
gimme_params yash0307/RecallatK_surrogate/src/auxiliaries.py official repository unverified MIT (permissive) · 049ad9e860c15601 · report
gimme_params yash0307/RecallatK_surrogate/src/auxiliaries_nofaiss.py official repository unverified MIT (permissive) · 02b6004c0868bbed · report
gimme_save_string yash0307/RecallatK_surrogate/src/auxiliaries.py official repository unverified MIT (permissive) · cae4f556b09f25d9 · report
give_cars196_datasets yash0307/RecallatK_surrogate/src/datasets.py official repository unverified MIT (permissive) · 7e84aa6527b513e2 · report
give_dataloaders yash0307/RecallatK_surrogate/src/datasets.py official repository unverified MIT (permissive) · f8348d227363bb5b · report
give_sop_datasets yash0307/RecallatK_surrogate/src/datasets.py official repository unverified MIT (permissive) · 96d316d0c04aa0ec · report
loss_select yash0307/RecallatK_surrogate/src/losses.py official repository unverified MIT (permissive) · ea5fce69ce75d25e · report
pos_mixup yash0307/RecallatK_surrogate/src/mixup.py official repository unverified MIT (permissive) · a187cbe2495a9595 · report
sigmoid yash0307/RecallatK_surrogate/src/losses.py official repository unverified MIT (permissive) · b8a4ba5e22a6de79 · report

Tasks

Image RetrievalMetric LearningRetrievalVehicle Re-Identification

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Retrieval iNaturalist Recall@k Surrogate loss (ViT-B/16) R@1 83.0 #3 of 10 Archive leaderboard report
Image Retrieval iNaturalist Recall@k Surrogate loss (ViT-B/16) R@16 95.9 #3 of 10 Archive leaderboard report
Image Retrieval iNaturalist Recall@k Surrogate loss (ViT-B/16) R@32 97.2 #3 of 10 Archive leaderboard report
Image Retrieval iNaturalist Recall@k Surrogate loss (ViT-B/16) R@5 92.1 #3 of 10 Archive leaderboard report
Image Retrieval iNaturalist Recall@k Surrogate loss (ResNet-50) R@1 71.8 #5 of 10 Archive leaderboard report
Image Retrieval iNaturalist Recall@k Surrogate loss (ResNet-50) R@16 91.9 #5 of 10 Archive leaderboard report
Image Retrieval iNaturalist Recall@k Surrogate loss (ResNet-50) R@32 94.3 #5 of 10 Archive leaderboard report
Image Retrieval iNaturalist Recall@k Surrogate loss (ResNet-50) R@5 84.7 #5 of 10 Archive leaderboard report
Metric Learning CARS196 Recall@k Surrogate loss (ViT-B/16) R@1 89.5 #11 of 36 Archive leaderboard report
Metric Learning CARS196 Recall@k Surrogate loss (ResNet-50) R@1 88.3 #17 of 36 Archive leaderboard report
Metric Learning Stanford Online Products Recall@k Surrogate Loss (ViT-B/16) R@1 88.0 #3 of 33 Archive leaderboard report
Metric Learning Stanford Online Products Recall@k Surrogate Loss (ViT-B/32) R@1 85.1 #8 of 33 Archive leaderboard report
Metric Learning Stanford Online Products Recall@k Surrogate Loss (ResNet-50) R@1 82.7 #11 of 33 Archive leaderboard report
Vehicle Re-Identification VehicleID Large Recall@k Surrogate loss (ViT-B/16) Rank-1 94.7 #1 of 10 Archive leaderboard report
Vehicle Re-Identification VehicleID Large Recall@k Surrogate loss (ViT-B/16) Rank-5 97.1 #1 of 10 Archive leaderboard report
Vehicle Re-Identification VehicleID Large Recall@k Surrogate loss (ResNet-50) Rank-1 93.8 #2 of 10 Archive leaderboard report
Vehicle Re-Identification VehicleID Large Recall@k Surrogate loss (ResNet-50) Rank-5 96.6 #2 of 10 Archive leaderboard report
Vehicle Re-Identification VehicleID Medium Recall@k Surrogate loss (ViT-B/16) Rank-1 95.2 #1 of 9 Archive leaderboard report
Vehicle Re-Identification VehicleID Medium Recall@k Surrogate loss (ViT-B/16) Rank-5 97.2 #1 of 9 Archive leaderboard report
Vehicle Re-Identification VehicleID Medium Recall@k Surrogate loss (ResNet-50) Rank-1 94.6 #2 of 9 Archive leaderboard report
Vehicle Re-Identification VehicleID Medium Recall@k Surrogate loss (ResNet-50) Rank-5 96.9 #2 of 9 Archive leaderboard report
Vehicle Re-Identification VehicleID Small Recall@k Surrogate loss (ViT-B/16) Rank-1 96.2 #1 of 13 Archive leaderboard report
Vehicle Re-Identification VehicleID Small Recall@k Surrogate loss (ViT-B/16) Rank-5 98.0 #1 of 13 Archive leaderboard report
Vehicle Re-Identification VehicleID Small Recall@k Surrogate loss (ResNet-50) Rank-1 95.7 #2 of 13 Archive leaderboard report
Vehicle Re-Identification VehicleID Small Recall@k Surrogate loss (ResNet-50) Rank-5 97.9 #2 of 13 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

Mixup

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