{"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/rearank-reasoning-re-ranking-agent-via","title":"REARANK: Reasoning Re-ranking Agent via Reinforcement Learning","arxiv_id":"2505.20046","date":"2025-05-26","proceeding":null,"authors":["Le Zhang","Bo wang","Xipeng Qiu","Siva Reddy","Aishwarya Agrawal"],"abstract":"We present REARANK, a large language model (LLM)-based listwise reasoning reranking agent. REARANK explicitly reasons before reranking, significantly improving both performance and interpretability. Leveraging reinforcement learning and data augmentation, REARANK achieves substantial improvements over baseline models across popular information retrieval benchmarks, notably requiring only 179 annotated samples. Built on top of Qwen2.5-7B, our REARANK-7B demonstrates performance comparable to GPT-4 on both in-domain and out-of-domain benchmarks and even surpasses GPT-4 on reasoning-intensive BRIGHT benchmarks. These results underscore the effectiveness of our approach and highlight how reinforcement learning can enhance LLM reasoning capabilities in reranking.","url_abs":"https://arxiv.org/abs/2505.20046v1","url_pdf":"https://arxiv.org/pdf/2505.20046v1.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":"rearank-reasoning-re-ranking-agent-via","repo_url":"https://github.com/lezhang7/rearank","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"information-retrieval","task_name":"Information Retrieval"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"re-ranking","task_name":"Re-Ranking"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reranking","task_name":"Reranking"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2505.20046","atlas_url":"https://app.syntology.ai/?focus=2505.20046","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.20046"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lezhang7/rearank","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":10,"ran_fixture":1,"ran_draft_wrong":1,"unverified":6},"by_repo_kind":{"official":{"samples":18,"ran":12,"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":"f220595adfc5e83c","entry":"compute_ce_dpo_loss_rm","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/recipe/prime/prime_core_algos.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/recipe/prime/prime_core_algos.py","link_basis":"harvester_set","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":"f220595adfc5e83c"}},{"code_sha256_prefix":"e696489c417f49c0","entry":"compute_detach_dpo_loss_rm","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/recipe/prime/prime_core_algos.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/recipe/prime/prime_core_algos.py","link_basis":"harvester_set","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":"e696489c417f49c0"}},{"code_sha256_prefix":"5d2b6f9db0e135ca","entry":"get_post_prompt","repo":"lezhang7/rearank","repo_kind":"official","path":"rank_gpt.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/rank_gpt.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5d2b6f9db0e135ca"}},{"code_sha256_prefix":"64789829d440d8a9","entry":"get_prefix_prompt","repo":"lezhang7/rearank","repo_kind":"official","path":"rank_gpt.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/rank_gpt.py","link_basis":"harvester_set","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":"64789829d440d8a9"}},{"code_sha256_prefix":"e7e1dbf9aa7c650e","entry":"get_results_file","repo":"lezhang7/rearank","repo_kind":"official","path":"utils.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/utils.py","link_basis":"harvester_set","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":"e7e1dbf9aa7c650e"}},{"code_sha256_prefix":"fa5e6d965b07a405","entry":"read_bright_qrels","repo":"lezhang7/rearank","repo_kind":"official","path":"utils.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/utils.py","link_basis":"harvester_set","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":"fa5e6d965b07a405"}},{"code_sha256_prefix":"870dc1e2ca0db4e8","entry":"read_bright_topics","repo":"lezhang7/rearank","repo_kind":"official","path":"utils.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/utils.py","link_basis":"harvester_set","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":"870dc1e2ca0db4e8"}},{"code_sha256_prefix":"4fc539f7640d8633","entry":"remove_duplicate","repo":"lezhang7/rearank","repo_kind":"official","path":"trec_eval.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/trec_eval.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4fc539f7640d8633"}},{"code_sha256_prefix":"c30b2a96103abd2c","entry":"reward_func","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/recipe/r1/reward_score.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/recipe/r1/reward_score.py","link_basis":"harvester_set","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":"c30b2a96103abd2c"}},{"code_sha256_prefix":"1dd27e699c846444","entry":"run_retriever","repo":"lezhang7/rearank","repo_kind":"official","path":"rank_gpt.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/rank_gpt.py","link_basis":"harvester_set","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":"1dd27e699c846444"}},{"code_sha256_prefix":"21331a58f93375e4","entry":"union_tensor_dict","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/verl/protocol.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/verl/protocol.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"DEP_MISSING","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"21331a58f93375e4"}},{"code_sha256_prefix":"25f0ea3f460f6ce1","entry":"unpad_dataproto","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/verl/protocol.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/verl/protocol.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"25f0ea3f460f6ce1"}},{"code_sha256_prefix":"68aa34a57b353cae","entry":"get_generation_config","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/verl/utils/model.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/verl/utils/model.py","link_basis":"harvester_set","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":"68aa34a57b353cae"}},{"code_sha256_prefix":"9411d1fb7e4f68e5","entry":"get_huggingface_actor_config","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/verl/utils/model.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/verl/utils/model.py","link_basis":"harvester_set","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":"9411d1fb7e4f68e5"}},{"code_sha256_prefix":"d2098f88a360e095","entry":"get_qrels_file","repo":"lezhang7/rearank","repo_kind":"official","path":"trec_eval.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/trec_eval.py","link_basis":"harvester_set","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":"d2098f88a360e095"}},{"code_sha256_prefix":"acf240079d434746","entry":"get_weight_loader","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/verl/models/weight_loader_registry.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/verl/models/weight_loader_registry.py","link_basis":"harvester_set","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":"acf240079d434746"}},{"code_sha256_prefix":"d1e077d222a806ec","entry":"get_weight_saver","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/verl/models/weight_loader_registry.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/verl/models/weight_loader_registry.py","link_basis":"harvester_set","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":"d1e077d222a806ec"}},{"code_sha256_prefix":"3b15e2ac7497c441","entry":"squeeze","repo":"lezhang7/rearank","repo_kind":"official","path":"verl/verl/utils/model.py","file_url":"https://github.com/lezhang7/rearank/blob/HEAD/verl/verl/utils/model.py","link_basis":"harvester_set","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":"3b15e2ac7497c441"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}