{"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/metric-learning-with-adaptive-density","title":"Metric Learning with Adaptive Density Discrimination","arxiv_id":"1511.05939","date":"2015-11-18","proceeding":null,"authors":["Oren Rippel","Manohar Paluri","Piotr Dollar","Lubomir Bourdev"],"abstract":"Distance metric learning (DML) approaches learn a transformation to a\nrepresentation space where distance is in correspondence with a predefined\nnotion of similarity. While such models offer a number of compelling benefits,\nit has been difficult for these to compete with modern classification\nalgorithms in performance and even in feature extraction.\n  In this work, we propose a novel approach explicitly designed to address a\nnumber of subtle yet important issues which have stymied earlier DML\nalgorithms. It maintains an explicit model of the distributions of the\ndifferent classes in representation space. It then employs this knowledge to\nadaptively assess similarity, and achieve local discrimination by penalizing\nclass distribution overlap.\n  We demonstrate the effectiveness of this idea on several tasks. Our approach\nachieves state-of-the-art classification results on a number of fine-grained\nvisual recognition datasets, surpassing the standard softmax classifier and\noutperforming triplet loss by a relative margin of 30-40%. In terms of\ncomputational performance, it alleviates training inefficiencies in the\ntraditional triplet loss, reaching the same error in 5-30 times fewer\niterations. Beyond classification, we further validate the saliency of the\nlearnt representations via their attribute concentration and hierarchy recovery\nproperties, achieving 10-25% relative gains on the softmax classifier and\n25-50% on triplet loss in these tasks.","url_abs":"http://arxiv.org/abs/1511.05939v2","url_pdf":"http://arxiv.org/pdf/1511.05939v2.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":"metric-learning-with-adaptive-density","repo_url":"https://github.com/Abdelhamid-bouzid/Deep-metric-learning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"metric-learning-with-adaptive-density","repo_url":"https://github.com/pumpikano/tf-magnet-loss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"fine-grained-visual-recognition","task_name":"Fine-Grained Visual Recognition"},{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"metric-learning","task_name":"Metric Learning"},{"task_slug":null,"task_name":"Triplet"}],"methods":[{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1511.05939","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1511.05939"}},"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/Abdelhamid-bouzid/Deep-metric-learning","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pumpikano/tf-magnet-loss","reach":null}],"summary":{"ran_draft_wrong":1},"by_repo_kind":{"listed":{"samples":1,"ran":1,"repositories":1}},"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":0,"samples":[{"code_sha256_prefix":"2c4b6ec65759f2f9","entry":"compute_reps","repo":"pumpikano/tf-magnet-loss","repo_kind":"listed","path":"magnet_tools.py","file_url":"https://github.com/pumpikano/tf-magnet-loss/blob/HEAD/magnet_tools.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2c4b6ec65759f2f9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}