{"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/robust-and-decomposable-average-precision-for","title":"Robust and Decomposable Average Precision for Image Retrieval","arxiv_id":"2110.01445","date":"2021-10-01","proceeding":"NeurIPS 2021 12","authors":["Elias Ramzi","Nicolas Thome","Clément Rambour","Nicolas Audebert","Xavier Bitot"],"abstract":"In image retrieval, standard evaluation metrics rely on score ranking, e.g. average precision (AP). In this paper, we introduce a method for robust and decomposable average precision (ROADMAP) addressing two major challenges for end-to-end training of deep neural networks with AP: non-differentiability and non-decomposability. Firstly, we propose a new differentiable approximation of the rank function, which provides an upper bound of the AP loss and ensures robust training. Secondly, we design a simple yet effective loss function to reduce the decomposability gap between the AP in the whole training set and its averaged batch approximation, for which we provide theoretical guarantees. Extensive experiments conducted on three image retrieval datasets show that ROADMAP outperforms several recent AP approximation methods and highlight the importance of our two contributions. Finally, using ROADMAP for training deep models yields very good performances, outperforming state-of-the-art results on the three datasets.","url_abs":"https://arxiv.org/abs/2110.01445v3","url_pdf":"https://arxiv.org/pdf/2110.01445v3.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":"robust-and-decomposable-average-precision-for","repo_url":"https://github.com/elias-ramzi/roadmap","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"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/image-retrieval-on-cub-200-2011","task":"Image Retrieval","dataset":"CUB-200-2011","model":"ROADMAP (Deit-B)","rank_in_archive_order":2,"of":8,"metrics":{"R@1":"77.4"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-cub-200-2011","task":"Image Retrieval","dataset":"CUB-200-2011","model":"ROADMAP (ResNet-50)","rank_in_archive_order":4,"of":8,"metrics":{"R@1":"68.5"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-sop","task":"Image Retrieval","dataset":"SOP","model":"ROADMAP (DeiT-B)","rank_in_archive_order":2,"of":14,"metrics":{"R@1":"86.0"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-sop","task":"Image Retrieval","dataset":"SOP","model":"ROADMAP (ResNet-50)","rank_in_archive_order":4,"of":14,"metrics":{"R@1":"83.1"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-inaturalist","task":"Image Retrieval","dataset":"iNaturalist","model":"ROADMAP (DeiT-S)","rank_in_archive_order":4,"of":10,"metrics":{"R@1":"73.6","R@16":"93.1","R@32":"95.2","R@5":"86.2"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-inaturalist","task":"Image Retrieval","dataset":"iNaturalist","model":"ROADMAP (ResNet-50)","rank_in_archive_order":8,"of":10,"metrics":{"R@1":"69.1","R@16":"91.3","R@32":"93.9","R@5":"83.1"},"uses_additional_data":false},{"leaderboard":"/sota/metric-learning-on-stanford-online-products-1","task":"Metric Learning","dataset":"Stanford Online Products","model":"ROADMAP (DeiT-S)","rank_in_archive_order":5,"of":33,"metrics":{"R@1":"86.0"},"uses_additional_data":false},{"leaderboard":"/sota/metric-learning-on-stanford-online-products-1","task":"Metric Learning","dataset":"Stanford Online Products","model":"ROADMAP (ResNet-50)","rank_in_archive_order":9,"of":33,"metrics":{"R@1":"83.1"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.01445","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.01445"}},"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/elias-ramzi/roadmap","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"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":"b8ef2b49a369cb69","entry":"get_color_distortion","repo":"elias-ramzi/roadmap","repo_kind":"official","path":"roadmap/datasets/base_dataset.py","file_url":"https://github.com/elias-ramzi/roadmap/blob/HEAD/roadmap/datasets/base_dataset.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b8ef2b49a369cb69"}},{"code_sha256_prefix":"a2a835592cd98f2b","entry":"heaviside","repo":"elias-ramzi/roadmap","repo_kind":"official","path":"roadmap/losses/smooth_rank_ap.py","file_url":"https://github.com/elias-ramzi/roadmap/blob/HEAD/roadmap/losses/smooth_rank_ap.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a2a835592cd98f2b"}},{"code_sha256_prefix":"2e1e2e8c543195f7","entry":"rank","repo":"elias-ramzi/roadmap","repo_kind":"official","path":"roadmap/losses/blackbox_ap.py","file_url":"https://github.com/elias-ramzi/roadmap/blob/HEAD/roadmap/losses/blackbox_ap.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2e1e2e8c543195f7"}},{"code_sha256_prefix":"ed49cae4f66fd45c","entry":"rank_normalised","repo":"elias-ramzi/roadmap","repo_kind":"official","path":"roadmap/losses/blackbox_ap.py","file_url":"https://github.com/elias-ramzi/roadmap/blob/HEAD/roadmap/losses/blackbox_ap.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed49cae4f66fd45c"}},{"code_sha256_prefix":"74f2a948e1eb6041","entry":"tau_sigmoid","repo":"elias-ramzi/roadmap","repo_kind":"official","path":"roadmap/losses/smooth_rank_ap.py","file_url":"https://github.com/elias-ramzi/roadmap/blob/HEAD/roadmap/losses/smooth_rank_ap.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":"74f2a948e1eb6041"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}