Papers › The Group Loss for Deep Metric Learning

The Group Loss for Deep Metric Learning

1 Dec 2019ECCV 2020 8arXiv:1912.00385archive 2025-07-28

Ismail Elezi, Sebastiano Vascon, Alessandro Torcinovich, Marcello Pelillo, Laura Leal-Taixe

Deep metric learning has yielded impressive results in tasks such as clustering and image retrieval by leveraging neural networks to obtain highly discriminative feature embeddings, which can be used to group samples into different classes. Much research has been devoted to the design of smart loss functions or data mining strategies for training such networks. Most methods consider only pairs or triplets of samples within a mini-batch to compute the loss function, which is commonly based on the distance between embeddings. We propose Group Loss, a loss function based on a differentiable label-propagation method that enforces embedding similarity across all samples of a group while promoting, at the same time, low-density regions amongst data points belonging to different groups. Guided by the smoothness assumption that "similar objects should belong to the same group", the proposed loss trains the neural network for a classification task, enforcing a consistent labelling amongst samples within a class. We show state-of-the-art results on clustering and image retrieval on several datasets, and show the potential of our method when combined with other techniques such as ensembles

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also 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

Syntology 18 code samples harvested from 2 repositories linked to this paper: 12 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 0 violated, 9 with no contract checked; 2 where Syntology's instrument failed) · 6 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 1 sample from 1 repository, 1 ran (1 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 17 samples from 1 repository, 11 ran (9 with no instrument failure; 2 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 2 of the 12 samples that ran have no recorded date.

dvl-tum/group_loss officialmentioned in paperpytorchSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
laurinwagner/grouploss_plus mentioned on GitHubpytorchMITSyntology: 17 samples, 11 ran (2 instrument-failed) · 6 unverified 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

18 samples harvested: 12 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 0 violated, 9 with no contract checked; 2 where Syntology's instrument failed) · 6 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
2ran · our draft was wrong
9ran
6unverified

Licence: 0 of the 18 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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

dvl-tum/group_loss official repository 1 sample, 1 ran (0 instrument-failed) · 0 unverified
rnd train_finetune.py ran · honoured contract fingerprinted MIT (permissive) · e9ea44d93d8ffa92 · report fixture: signature lower:int/0/int, higher:int/0/int · returned float · level recorded 2026-09-22
laurinwagner/grouploss_plus community (archive-listed) 17 samples, 11 ran (2 instrument-failed) · 6 unverified
bn_inception net/inception_bn.py ran MIT (permissive) · 650c1166736654f2 · report fixture: signature nb_classes:int/0/int, is_pretrained:bool/0/bool · returned BNInception · level recorded 2026-09-24
conv1x1 in 691 papers net/resnet.py ran · our draft was wrong MIT (permissive) · d9def42110729a85 · report fixture: signature in_planes:int/0/int, out_planes:int/0/int, stride:int/0/int · returned Conv2d · level recorded, date not recorded
conv3x3 in 1,376 papers net/resnet.py ran · our draft was wrong MIT (permissive) · 160bb14bd76201b4 · report fixture: signature in_planes:int/0/int, out_planes:int/0/int, stride:int/0/int, groups:int/0/int, dilation:int/0/int · returned Conv2d · level recorded, date not recorded
dynamics dynamics.py ran MIT (permissive) · 0fa98ac2194783f3 · report fixture: signature W:Tensor/2/float, X:Tensor/1/float, tol:float/0/float, max_iter:int/0/int, mode:str/0/str · returned Tensor · level recorded 2026-09-24
get_W_gt gtg.py ran fingerprinted MIT (permissive) · 5efaf143a9a72186 · report fixture: signature labels:Tensor/1/int · returned Tensor · level recorded 2026-09-24
get_sim_pairs gtg.py ran MIT (permissive) · d574dd05dd75020c · report fixture: signature labels:ndarray/1/int · returned ndarray · level recorded 2026-09-24
make_embedding_layer net/embed.py ran MIT (permissive) · 4e716cb135e5eb7c · report fixture: signature in_features:int/0/int, sz_embedding:int/0/int, weight_init:callable/0/? · returned Linear · level recorded 2026-09-24
predict_batchwise utils.py ran MIT (permissive) · 21bfe6f420cc452c · report fixture: signature model:callable/0/?, dataloader:list/1/tuple, net_type:str/0/str · returned tuple · level recorded 2026-09-24
predict_batchwise_inshop utils.py ran MIT (permissive) · b8c440cba313c634 · report fixture: signature model:callable/0/?, dataloader:SimpleDataLoader/0/? · returned list · level recorded 2026-09-24
re_rank utils.py ran MIT (permissive) · d477cdb6933c981b · report fixture: signature q_g_dist:ndarray/2/float, q_q_dist:ndarray/2/float, g_g_dist:ndarray/2/float, k1:int/0/int, k2:int/0/int, lambda_value:float/0/float · returned ndarray · level recorded 2026-09-24
update_probs combine_sampler.py ran MIT (permissive) · 108396eb628e18c6 · report fixture: signature l_inds:list/1/list, nb_classes:int/0/int, num_elements:int/0/int · returned ndarray · level recorded 2026-09-24
densenet121 in 43 papers net/densenet.py unverified MIT (permissive) · 662688cdde7e85be · report
densenet161 in 20 papers net/densenet.py unverified MIT (permissive) · a15fc654c671c2bf · report
densenet169 in 42 papers net/densenet.py unverified MIT (permissive) · 2f494ef1c2bb7bab · report
embed in 13 papers net/embed.py unverified MIT (permissive) · 757fc132892039c3 · report
resnet18 in 432 papers net/resnet.py unverified MIT (permissive) · 9771a961f7827f37 · report
thresh_func gtg.py unverified MIT (permissive) · a087db29a375ae43 · report

Tasks

ClusteringImage RetrievalMetric LearningRetrieval

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Metric Learning CARS196 Group Loss R@1 85.6 #26 of 36 Archive leaderboard report
Metric Learning CUB-200-2011 BN-Inception + Group Loss R@1 65.5 #20 of 30 Archive leaderboard report
Metric Learning Stanford Online Products Group Loss R@1 75.7 #33 of 33 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