{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/revisiting-training-strategies-and","title":"Revisiting Training Strategies and Generalization Performance in Deep Metric Learning","arxiv_id":"2002.08473","date":"2020-02-19","proceeding":"ICML 2020 1","authors":["Karsten Roth","Timo Milbich","Samarth Sinha","Prateek Gupta","Björn Ommer","Joseph Paul Cohen"],"abstract":"Deep Metric Learning (DML) is arguably one of the most influential lines of research for learning visual similarities with many proposed approaches every year. Although the field benefits from the rapid progress, the divergence in training protocols, architectures, and parameter choices make an unbiased comparison difficult. To provide a consistent reference point, we revisit the most widely used DML objective functions and conduct a study of the crucial parameter choices as well as the commonly neglected mini-batch sampling process. Under consistent comparison, DML objectives show much higher saturation than indicated by literature. Further based on our analysis, we uncover a correlation between the embedding space density and compression to the generalization performance of DML models. Exploiting these insights, we propose a simple, yet effective, training regularization to reliably boost the performance of ranking-based DML models on various standard benchmark datasets. Code and a publicly accessible WandB-repo are available at https://github.com/Confusezius/Revisiting_Deep_Metric_Learning_PyTorch.","url_abs":"https://arxiv.org/abs/2002.08473v9","url_pdf":"https://arxiv.org/pdf/2002.08473v9.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"revisiting-training-strategies-and","repo_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"revisiting-training-strategies-and","repo_url":"https://github.com/Confusezius/Revisiting_Deep_Metric_Learning_PyTorch","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-training-strategies-and","repo_url":"https://github.com/Confusezius/Deep_Metric_Learning_Baselines","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"revisiting-training-strategies-and","repo_url":"https://github.com/Confusezius/ECCV2020_DiVA_MultiFeature_DML","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"revisiting-training-strategies-and","repo_url":"https://github.com/Confusezius/pytorch_deep_metric_learning_research","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-training-strategies-and","repo_url":"https://github.com/anonymous-koala-supporter/adversarial-deep-metric-learning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"revisiting-training-strategies-and","repo_url":"https://github.com/douxiaotian/metric","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"revisiting-training-strategies-and","repo_url":"https://github.com/wzzheng/DCML","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"metric-learning","task_name":"Metric Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2002.08473","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.08473"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Confusezius/Deep_Metric_Learning_Baselines","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/douxiaotian/metric","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wzzheng/DCML","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Confusezius/ECCV2020_DiVA_MultiFeature_DML","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Confusezius/pytorch_deep_metric_learning_research","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Confusezius/Revisiting_Deep_Metric_Learning_PyTorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/anonymous-koala-supporter/adversarial-deep-metric-learning","reach":null}],"summary":{"ran":2,"ran_draft_wrong":1,"unverified":19},"by_repo_kind":{"official":{"samples":16,"ran":1,"repositories":2},"listed":{"samples":6,"ran":2,"repositories":3}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"03d1431453ef1a6b","entry":"Criterion","repo":"Confusezius/ECCV2020_DiVA_MultiFeature_DML","repo_kind":"listed","path":"criteria/stacked_self_distill.py","file_url":"https://github.com/Confusezius/ECCV2020_DiVA_MultiFeature_DML/blob/HEAD/criteria/stacked_self_distill.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"03d1431453ef1a6b"}},{"code_sha256_prefix":"7eb35d3431b4daa0","entry":"TupleSampler","repo":"Confusezius/Deep_Metric_Learning_Baselines","repo_kind":"listed","path":"losses.py","file_url":"https://github.com/Confusezius/Deep_Metric_Learning_Baselines/blob/HEAD/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7eb35d3431b4daa0"}},{"code_sha256_prefix":"5b09d2867ea2a10d","entry":"wandb_parameters","repo":"confusezius/revisiting_deep_metric_learning_pytorch","repo_kind":"official","path":"parameters.py","file_url":"https://github.com/confusezius/revisiting_deep_metric_learning_pytorch/blob/HEAD/parameters.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5b09d2867ea2a10d"}},{"code_sha256_prefix":"135e67099969c757","entry":"MarginLoss","repo":"Confusezius/Deep_Metric_Learning_Baselines","repo_kind":"listed","path":"losses.py","file_url":"https://github.com/Confusezius/Deep_Metric_Learning_Baselines/blob/HEAD/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"135e67099969c757"}},{"code_sha256_prefix":"1edf35955d77e643","entry":"basic_training_parameters","repo":"confusezius/revisiting_deep_metric_learning_pytorch","repo_kind":"official","path":"parameters.py","file_url":"https://github.com/confusezius/revisiting_deep_metric_learning_pytorch/blob/HEAD/parameters.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1edf35955d77e643"}},{"code_sha256_prefix":"aca58e0b4399a88e","entry":"basic_training_parameters","repo":"douxiaotian/metric","repo_kind":"listed","path":"parameters.py","file_url":"https://github.com/douxiaotian/metric/blob/HEAD/parameters.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aca58e0b4399a88e"}},{"code_sha256_prefix":"9ec84718a48b4a71","entry":"extension_parameters","repo":"douxiaotian/metric","repo_kind":"listed","path":"parameters.py","file_url":"https://github.com/douxiaotian/metric/blob/HEAD/parameters.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9ec84718a48b4a71"}},{"code_sha256_prefix":"d629034ac6132f80","entry":"f1_score","repo":"Confusezius/Deep-Metric-Learning-Baselines","repo_kind":"official","path":"auxiliaries.py","file_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines/blob/HEAD/auxiliaries.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d629034ac6132f80"}},{"code_sha256_prefix":"3d33c198f5dfd1d8","entry":"get_data","repo":"Confusezius/Revisiting_Deep_Metric_Learning_PyTorch","repo_kind":"official","path":"Result_Evaluations.py","file_url":"https://github.com/Confusezius/Revisiting_Deep_Metric_Learning_PyTorch/blob/HEAD/Result_Evaluations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3d33c198f5dfd1d8"}},{"code_sha256_prefix":"23c18adfe2fa9b50","entry":"gimme_params","repo":"Confusezius/Deep-Metric-Learning-Baselines","repo_kind":"official","path":"auxiliaries.py","file_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines/blob/HEAD/auxiliaries.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"23c18adfe2fa9b50"}},{"code_sha256_prefix":"88dd3c9b8a356d3a","entry":"gimme_save_string","repo":"Confusezius/Deep-Metric-Learning-Baselines","repo_kind":"official","path":"auxiliaries.py","file_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines/blob/HEAD/auxiliaries.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"88dd3c9b8a356d3a"}},{"code_sha256_prefix":"94a2b3fc9d173339","entry":"give_CARS196_datasets","repo":"Confusezius/Deep-Metric-Learning-Baselines","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines/blob/HEAD/datasets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"94a2b3fc9d173339"}},{"code_sha256_prefix":"4a2b2ab542b49c29","entry":"give_CUB200_datasets","repo":"Confusezius/Deep-Metric-Learning-Baselines","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines/blob/HEAD/datasets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4a2b2ab542b49c29"}},{"code_sha256_prefix":"cea101048260a728","entry":"give_dataloaders","repo":"Confusezius/Deep-Metric-Learning-Baselines","repo_kind":"official","path":"datasets.py","file_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines/blob/HEAD/datasets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cea101048260a728"}},{"code_sha256_prefix":"890262140a75d9b9","entry":"googlenet","repo":"Confusezius/Deep-Metric-Learning-Baselines","repo_kind":"official","path":"googlenet.py","file_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines/blob/HEAD/googlenet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"890262140a75d9b9"}},{"code_sha256_prefix":"719ec941b055b8e4","entry":"loss_select","repo":"Confusezius/Deep-Metric-Learning-Baselines","repo_kind":"official","path":"losses.py","file_url":"https://github.com/Confusezius/Deep-Metric-Learning-Baselines/blob/HEAD/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"719ec941b055b8e4"}},{"code_sha256_prefix":"e7d6234c596e2482","entry":"loss_specific_parameters","repo":"confusezius/revisiting_deep_metric_learning_pytorch","repo_kind":"official","path":"parameters.py","file_url":"https://github.com/confusezius/revisiting_deep_metric_learning_pytorch/blob/HEAD/parameters.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e7d6234c596e2482"}},{"code_sha256_prefix":"6d771473f57274c0","entry":"loss_specific_parameters","repo":"Confusezius/Revisiting_Deep_Metric_Learning_PyTorch","repo_kind":"official","path":"parameters.py","file_url":"https://github.com/Confusezius/Revisiting_Deep_Metric_Learning_PyTorch/blob/HEAD/parameters.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6d771473f57274c0"}},{"code_sha256_prefix":"014edb34f249bcfe","entry":"name_adjust","repo":"Confusezius/Revisiting_Deep_Metric_Learning_PyTorch","repo_kind":"official","path":"Result_Evaluations.py","file_url":"https://github.com/Confusezius/Revisiting_Deep_Metric_Learning_PyTorch/blob/HEAD/Result_Evaluations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"014edb34f249bcfe"}},{"code_sha256_prefix":"08e4d248fe54f413","entry":"name_filter","repo":"Confusezius/Revisiting_Deep_Metric_Learning_PyTorch","repo_kind":"official","path":"Result_Evaluations.py","file_url":"https://github.com/Confusezius/Revisiting_Deep_Metric_Learning_PyTorch/blob/HEAD/Result_Evaluations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"08e4d248fe54f413"}},{"code_sha256_prefix":"1825bfd5a626ed17","entry":"wandb_parameters","repo":"Confusezius/Revisiting_Deep_Metric_Learning_PyTorch","repo_kind":"official","path":"parameters.py","file_url":"https://github.com/Confusezius/Revisiting_Deep_Metric_Learning_PyTorch/blob/HEAD/parameters.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1825bfd5a626ed17"}},{"code_sha256_prefix":"0d2b44d3cf1009d0","entry":"wandb_parameters","repo":"douxiaotian/metric","repo_kind":"listed","path":"parameters.py","file_url":"https://github.com/douxiaotian/metric/blob/HEAD/parameters.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0d2b44d3cf1009d0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}