{"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/das-densely-anchored-sampling-for-deep-metric","title":"DAS: Densely-Anchored Sampling for Deep Metric Learning","arxiv_id":"2208.00119","date":"2022-07-30","proceeding":null,"authors":["Lizhao Liu","Shangxin Huang","Zhuangwei Zhuang","Ran Yang","Mingkui Tan","YaoWei Wang"],"abstract":"Deep Metric Learning (DML) serves to learn an embedding function to project semantically similar data into nearby embedding space and plays a vital role in many applications, such as image retrieval and face recognition. However, the performance of DML methods often highly depends on sampling methods to choose effective data from the embedding space in the training. In practice, the embeddings in the embedding space are obtained by some deep models, where the embedding space is often with barren area due to the absence of training points, resulting in so called \"missing embedding\" issue. This issue may impair the sample quality, which leads to degenerated DML performance. In this work, we investigate how to alleviate the \"missing embedding\" issue to improve the sampling quality and achieve effective DML. To this end, we propose a Densely-Anchored Sampling (DAS) scheme that considers the embedding with corresponding data point as \"anchor\" and exploits the anchor's nearby embedding space to densely produce embeddings without data points. Specifically, we propose to exploit the embedding space around single anchor with Discriminative Feature Scaling (DFS) and multiple anchors with Memorized Transformation Shifting (MTS). In this way, by combing the embeddings with and without data points, we are able to provide more embeddings to facilitate the sampling process thus boosting the performance of DML. Our method is effortlessly integrated into existing DML frameworks and improves them without bells and whistles. Extensive experiments on three benchmark datasets demonstrate the superiority of our method.","url_abs":"https://arxiv.org/abs/2208.00119v1","url_pdf":"https://arxiv.org/pdf/2208.00119v1.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":"das-densely-anchored-sampling-for-deep-metric","repo_url":"https://github.com/lizhaoliu-Lec/DAS","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"face-recognition","task_name":"Face Recognition"},{"task_slug":"image-retrieval","task_name":"Image Retrieval"},{"task_slug":"metric-learning","task_name":"Metric Learning"},{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/metric-learning-on-cars196","task":"Metric Learning","dataset":"CARS196","model":"Margin + DAS","rank_in_archive_order":15,"of":36,"metrics":{"R@1":"88.34"},"uses_additional_data":false},{"leaderboard":"/sota/metric-learning-on-cars196","task":"Metric Learning","dataset":"CARS196","model":"MS + SEC + DAS","rank_in_archive_order":20,"of":36,"metrics":{"R@1":"87.8"},"uses_additional_data":false},{"leaderboard":"/sota/metric-learning-on-cub-200-2011-4","task":"Metric Learning","dataset":"CUB-200-2011","model":"MS + DAS (K=8)","rank_in_archive_order":2,"of":2,"metrics":{"R@1":"69.19"},"uses_additional_data":false},{"leaderboard":"/sota/metric-learning-on-stanford-online-products-1","task":"Metric Learning","dataset":"Stanford Online Products","model":"MS + DAS (K=8)","rank_in_archive_order":23,"of":33,"metrics":{"R@1":"80.59"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2208.00119","atlas_url":"https://app.syntology.ai/?focus=2208.00119","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2208.00119"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"deterministic:regex_extraction","url":"https://github.com/lizhaoliu-Lec/DAS","reach":null}],"summary":{"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":0,"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":"5904b0baadcac152","entry":"Sampler","repo":"lizhaoliu-Lec/DAS","repo_kind":"official","path":"datasampler/d2_coreset_sampler.py","file_url":"https://github.com/lizhaoliu-Lec/DAS/blob/HEAD/datasampler/d2_coreset_sampler.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":"5904b0baadcac152"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}