{"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/arxiv-2604-27599","title":"One Pass, Any Order: Position-Invariant Listwise Reranking for LLM-Based Recommendation","arxiv_id":"2604.27599","date":"2026-04-30","proceeding":null,"authors":["Ethan Bito","Yongli Ren","Estrid He"],"abstract":"Large language models (LLMs) are increasingly used for recommendation reranking, but their listwise predictions can depend on the order in which candidates are presented. This creates a mismatch between the set-based nature of recommendation and the sequence-based computation of decoder-only LLMs, where permuting an otherwise identical candidate set can change item scores and final rankings. Such order sensitivity makes LLM-based rerankers difficult to rely on, since rankings may reflect prompt serialization rather than user preference. We propose InvariRank, a permutation-invariant listwise reranking framework that addresses this dependence at the architectural level. InvariRank blocks cross-candidate attention with a structured attention mask and negates position-induced scoring changes through shared positional framing under Rotary Positional Embeddings (RoPE). Combined with a listwise learning-to-rank objective, the model scores all candidates in a single forward pass, avoiding permutation-based invariance training objectives that require multiple permutations of a candidate set. Experiments on recommendation benchmarks show that InvariRank maintains competitive ranking effectiveness while producing stable rankings across candidate permutations. The results suggest that architectural invariance is a practical route to reliable and efficient LLM-based recommendation reranking. The source code is at https://github.com/ejbito/InvariRank.","url_abs":"https://arxiv.org/abs/2604.27599","url_pdf":"https://arxiv.org/pdf/2604.27599","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2604.27599","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2604.27599"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/ejbito/InvariRank","reach":null}],"summary":{"ran":18,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":21,"ran":18,"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":"c3a384dc22d47af5","entry":"build_candidate_interaction","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/interactions.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/interactions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c3a384dc22d47af5"}},{"code_sha256_prefix":"f97677f8570c1943","entry":"candidate_id","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/prompts.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f97677f8570c1943"}},{"code_sha256_prefix":"7e8c38139d9ac58c","entry":"ensure_dir","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/training.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/training.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e8c38139d9ac58c"}},{"code_sha256_prefix":"6655d3145e66c701","entry":"evaluate_at_k","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/metrics.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6655d3145e66c701"}},{"code_sha256_prefix":"792fd2c13deb2736","entry":"global_preference_inconsistency","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/preference.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/preference.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"792fd2c13deb2736"}},{"code_sha256_prefix":"d91d03fb0d2fc06a","entry":"hit_rate_at_k","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/metrics.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d91d03fb0d2fc06a"}},{"code_sha256_prefix":"892aae0040720850","entry":"item_fields","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/prompts.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"892aae0040720850"}},{"code_sha256_prefix":"c060abb0abd4293e","entry":"listwise_collator","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/training.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/training.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c060abb0abd4293e"}},{"code_sha256_prefix":"235d0ccc9ee9dd9b","entry":"load_template","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/prompts.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"235d0ccc9ee9dd9b"}},{"code_sha256_prefix":"776af5b4244f944d","entry":"marginal_position_exposure","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/position_bias.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/position_bias.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"776af5b4244f944d"}},{"code_sha256_prefix":"c127a43848d15fe3","entry":"method_from_config","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/config.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/config.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c127a43848d15fe3"}},{"code_sha256_prefix":"c4ac6c200cfb9f23","entry":"order_user_ids","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/sampling.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/sampling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c4ac6c200cfb9f23"}},{"code_sha256_prefix":"18aaf88796801c06","entry":"position_bias_metrics_path","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/position_bias.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/position_bias.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"18aaf88796801c06"}},{"code_sha256_prefix":"20d2254a15485774","entry":"recall_at_k","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/metrics.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"20d2254a15485774"}},{"code_sha256_prefix":"f97a2e08f775f1b8","entry":"resolve_dtype","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/modeling.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f97a2e08f775f1b8"}},{"code_sha256_prefix":"750d88b81ce8918f","entry":"sample_permutation","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/training.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/training.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"750d88b81ce8918f"}},{"code_sha256_prefix":"1b3da8d667ff6ca4","entry":"select_device","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/modeling.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/modeling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1b3da8d667ff6ca4"}},{"code_sha256_prefix":"51956f680bfe0400","entry":"select_user_ids","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/sampling.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/sampling.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"51956f680bfe0400"}},{"code_sha256_prefix":"6d2f32351f12ba2b","entry":"load_tokenizer","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"invarirank/modeling.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/invarirank/modeling.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":"6d2f32351f12ba2b"}},{"code_sha256_prefix":"fa5041287e45f1db","entry":"pairwise_preference_instability","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/preference.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/preference.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":"fa5041287e45f1db"}},{"code_sha256_prefix":"db3a38a24e82111c","entry":"preference_consistency_metrics","repo":"ejbito/InvariRank","repo_kind":"found_in_text","path":"experiments/evaluation/preference.py","file_url":"https://github.com/ejbito/InvariRank/blob/HEAD/experiments/evaluation/preference.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":"db3a38a24e82111c"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}