{"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/adversarial-retriever-ranker-for-dense-text","title":"Adversarial Retriever-Ranker for dense text retrieval","arxiv_id":"2110.03611","date":"2021-10-07","proceeding":"ICLR 2022 4","authors":["Hang Zhang","Yeyun Gong","Yelong Shen","Jiancheng Lv","Nan Duan","Weizhu Chen"],"abstract":"Current dense text retrieval models face two typical challenges. First, they adopt a siamese dual-encoder architecture to encode queries and documents independently for fast indexing and searching, while neglecting the finer-grained term-wise interactions. This results in a sub-optimal recall performance. Second, their model training highly relies on a negative sampling technique to build up the negative documents in their contrastive losses. To address these challenges, we present Adversarial Retriever-Ranker (AR2), which consists of a dual-encoder retriever plus a cross-encoder ranker. The two models are jointly optimized according to a minimax adversarial objective: the retriever learns to retrieve negative documents to cheat the ranker, while the ranker learns to rank a collection of candidates including both the ground-truth and the retrieved ones, as well as providing progressive direct feedback to the dual-encoder retriever. Through this adversarial game, the retriever gradually produces harder negative documents to train a better ranker, whereas the cross-encoder ranker provides progressive feedback to improve retriever. We evaluate AR2 on three benchmarks. Experimental results show that AR2 consistently and significantly outperforms existing dense retriever methods and achieves new state-of-the-art results on all of them. This includes the improvements on Natural Questions R@5 to 77.9%(+2.1%), TriviaQA R@5 to 78.2%(+1.4), and MS-MARCO MRR@10 to 39.5%(+1.3%). Code and models are available at https://github.com/microsoft/AR2.","url_abs":"https://arxiv.org/abs/2110.03611v5","url_pdf":"https://arxiv.org/pdf/2110.03611v5.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":"adversarial-retriever-ranker-for-dense-text","repo_url":"https://github.com/microsoft/ar2","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"natural-questions","task_name":"Natural Questions"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"text-retrieval","task_name":"Text Retrieval"},{"task_slug":"triviaqa","task_name":"TriviaQA"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2110.03611","atlas_url":"https://app.syntology.ai/?focus=2110.03611","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.03611"}},"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/microsoft/AR2","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/ar2","reach":null}],"summary":{"ran_fixture":1,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"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":"1df81ea9d2da7b70","entry":"compute_loss","repo":"microsoft/AR2","repo_kind":"official","path":"AR2/model/models.py","file_url":"https://github.com/microsoft/AR2/blob/HEAD/AR2/model/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1df81ea9d2da7b70"}},{"code_sha256_prefix":"bf4fb435a6b6eb85","entry":"dot_product_scores","repo":"microsoft/AR2","repo_kind":"official","path":"AR2/model/models.py","file_url":"https://github.com/microsoft/AR2/blob/HEAD/AR2/model/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf4fb435a6b6eb85"}},{"code_sha256_prefix":"3c0bc1acb98fd458","entry":"load_data","repo":"microsoft/AR2","repo_kind":"official","path":"AR2/utils/prepare_ce_data.py","file_url":"https://github.com/microsoft/AR2/blob/HEAD/AR2/utils/prepare_ce_data.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":"3c0bc1acb98fd458"}},{"code_sha256_prefix":"ff049d81c99cb397","entry":"read_train_pos","repo":"microsoft/AR2","repo_kind":"official","path":"AR2/utils/prepare_ce_data.py","file_url":"https://github.com/microsoft/AR2/blob/HEAD/AR2/utils/prepare_ce_data.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":"ff049d81c99cb397"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}