{"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-2605-05802","title":"Selective Rollout: Mid-Trajectory Termination for Multi-Sample Agent RL","arxiv_id":"2605.05802","date":"2026-05-07","proceeding":null,"authors":["Zhiyuan Zhai","Xin Wang"],"abstract":"Group-relative RL training (GRPO) samples a small group of parallel rollouts for every training prompt and uses their within-group reward spread to compute per-trajectory advantages. In agentic environments each rollout is a long multi-turn dialogue with one LLM call per step, so this multi-sample multiplier dominates the total training cost. When every rollout of a prompt ends with the same reward, the group has zero reward variance and contributes no gradient, so the extra rollouts add no information; such groups are common in practice (typically around 40% of all groups), so the wasted-compute fraction is substantial rather than marginal. Existing methods filter such groups at the prompt level, either after their rollouts are paid for or before any rollout begins, but both decide without using information that becomes available during the rollout itself. We instead ask whether the in-group divergence between the partial trajectories at an intermediate step can already predict that the group will be zero-variance: when the parallel rollouts have already converged on the same action prefix, the group is on track to produce a single reward, and we can stop early. We propose a one-parameter gate that stops a group when the mean pairwise prefix edit distance between its partial action sequences falls below a threshold. On a 60-iteration on-policy GRPO run on ALFWorld with Qwen2.5-7B, averaged over four random seeds, the gated arm finishes 10.7% faster in wall-clock (bootstrap 95% CI excludes 0) and shifts held-out success rate on 50 unseen tasks by +2.5 pp, with the held-out gain tracing to a measurable reduction in zero-advantage gradient-batch dilution. Code is available at https://github.com/zhiyuanZhai20/selective-rollout.","url_abs":"https://arxiv.org/abs/2605.05802","url_pdf":"https://arxiv.org/pdf/2605.05802","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=2605.05802","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2605.05802"}},"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/zhiyuanZhai20/selective-rollout","reach":null}],"summary":{"ran":13},"by_repo_kind":{"found_in_text":{"samples":13,"ran":13,"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":13,"samples":[{"code_sha256_prefix":"d17f3c5d626195d7","entry":"divergence_at_K","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/divergence.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/divergence.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d17f3c5d626195d7"}},{"code_sha256_prefix":"0c516a2e6bb36237","entry":"followup_user_message","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/prompts.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0c516a2e6bb36237"}},{"code_sha256_prefix":"5b8db30b398f2e3f","entry":"group_reward_stats","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/divergence.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/divergence.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b8db30b398f2e3f"}},{"code_sha256_prefix":"5819c3b6f199f733","entry":"group_reward_variance","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/divergence.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/divergence.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5819c3b6f199f733"}},{"code_sha256_prefix":"4d7355c6280bd225","entry":"initial_user_message","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/prompts.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4d7355c6280bd225"}},{"code_sha256_prefix":"c7553a721db08d21","entry":"list_games","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/env.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/env.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c7553a721db08d21"}},{"code_sha256_prefix":"17942fd27330ceb9","entry":"parse_action","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/prompts.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/prompts.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"17942fd27330ceb9"}},{"code_sha256_prefix":"2cacdba9dec0b207","entry":"pop","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/queue_fs.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/queue_fs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2cacdba9dec0b207"}},{"code_sha256_prefix":"13a91532a4ad9bc2","entry":"remaining","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/queue_fs.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/queue_fs.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"13a91532a4ad9bc2"}},{"code_sha256_prefix":"35c1f7ccae9126e3","entry":"safe_savefig","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/figutil.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/figutil.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"35c1f7ccae9126e3"}},{"code_sha256_prefix":"683c94d9c4222b3e","entry":"spearman_by_task_type","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/analysis.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"683c94d9c4222b3e"}},{"code_sha256_prefix":"5609356339d9cacb","entry":"spearman_table","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/analysis.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5609356339d9cacb"}},{"code_sha256_prefix":"5fc62a7556363e8d","entry":"verdict","repo":"zhiyuanZhai20/selective-rollout","repo_kind":"found_in_text","path":"src/analysis.py","file_url":"https://github.com/zhiyuanZhai20/selective-rollout/blob/HEAD/src/analysis.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5fc62a7556363e8d"}}]},"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}