Papers › Improving Deep Metric Learning by Divide and Conquer

Improving Deep Metric Learning by Divide and Conquer

9 Sep 2021arXiv:2109.04003archive 2025-07-28

Artsiom Sanakoyeu, Pingchuan Ma, Vadim Tschernezki, Björn Ommer

Deep metric learning (DML) is a cornerstone of many computer vision applications. It aims at learning a mapping from the input domain to an embedding space, where semantically similar objects are located nearby and dissimilar objects far from another. The target similarity on the training data is defined by user in form of ground-truth class labels. However, while the embedding space learns to mimic the user-provided similarity on the training data, it should also generalize to novel categories not seen during training. Besides user-provided groundtruth training labels, a lot of additional visual factors (such as viewpoint changes or shape peculiarities) exist and imply different notions of similarity between objects, affecting the generalization on the images unseen during training. However, existing approaches usually directly learn a single embedding space on all available training data, struggling to encode all different types of relationships, and do not generalize well. We propose to build a more expressive representation by jointly splitting the embedding space and the data hierarchically into smaller sub-parts. We successively focus on smaller subsets of the training data, reducing its variance and learning a different embedding subspace for each data subset. Moreover, the subspaces are learned jointly to cover not only the intricacies, but the breadth of the data as well. Only after that, we build the final embedding from the subspaces in the conquering stage. The proposed algorithm acts as a transparent wrapper that can be placed around arbitrary existing DML methods. Our approach significantly improves upon the state-of-the-art on image retrieval, clustering, and re-identification tasks evaluated using CUB200-2011, CARS196, Stanford Online Products, In-shop Clothes, and PKU VehicleID datasets.

PaperPDFCodeCode 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="2109.04003")

Code

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

By repository: official repository: 16 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.

compvis/metric-learning-divide-and-conquer-improved 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

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

16unverified

Licence: 0 of the 16 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 compvis/metric-learning-divide-and-conquer-improved. “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.

empty_if_default compvis/metric-learning-divide-and-conquer-improved/experiment/margin_loss_resnet50.py official repository unverified MIT (permissive) · f35dabf7a95feead · report
fetch_recall compvis/metric-learning-divide-and-conquer-improved/eval_model.py official repository unverified MIT (permissive) · 7e2ff61e53717e1a · report
index_dataset compvis/metric-learning-divide-and-conquer-improved/dataset/npairs.py official repository unverified MIT (permissive) · b38d84edfb1e99ae · report
is_match compvis/metric-learning-divide-and-conquer-improved/browse_results.py official repository unverified MIT (permissive) · d9a66474dd07a91d · report
make_args compvis/metric-learning-divide-and-conquer-improved/experiment/base.py official repository unverified MIT (permissive) · cfde26759e9d9c42 · report
merge_clusters compvis/metric-learning-divide-and-conquer-improved/utils.py official repository unverified MIT (permissive) · 12d14d2613022a8b · report
parse_bool compvis/metric-learning-divide-and-conquer-improved/experiment/margin_loss_resnet50.py official repository unverified MIT (permissive) · 88137d9a7fe8cbfe · report
parse_clustering_method compvis/metric-learning-divide-and-conquer-improved/experiment/margin_loss_resnet50.py official repository unverified MIT (permissive) · aa9272a8a0d334bf · report
preprocess_features compvis/metric-learning-divide-and-conquer-improved/metriclearning/faissext.py official repository unverified MIT (permissive) · 38ac9dc17918d04e · report
reassign_clusters compvis/metric-learning-divide-and-conquer-improved/dataset/loader.py official repository unverified MIT (permissive) · 93db13d8a6478b7c · report
reserve_faiss_gpu_memory compvis/metric-learning-divide-and-conquer-improved/metriclearning/faissext.py official repository unverified MIT (permissive) · 094e0f4940c1d413 · report
run compvis/metric-learning-divide-and-conquer-improved/collect_env_info.py official repository unverified MIT (permissive) · 6f559a6380486ff9 · report
run_and_parse_first_match compvis/metric-learning-divide-and-conquer-improved/collect_env_info.py official repository unverified MIT (permissive) · ab7aeddfa9e9fb2e · report
run_and_read_all compvis/metric-learning-divide-and-conquer-improved/collect_env_info.py official repository unverified MIT (permissive) · 84905132fbc263e3 · report
sample_from_class compvis/metric-learning-divide-and-conquer-improved/dataset/npairs.py official repository unverified MIT (permissive) · 8b0a5832a7d73092 · report
train_kmeans compvis/metric-learning-divide-and-conquer-improved/metriclearning/faissext.py official repository unverified MIT (permissive) · f9c73077030737d4 · report

Tasks

Image RetrievalMetric LearningRetrieval

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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