提出分支策略优化,让语言智能体在沙盒中更高效地学习决策。
Branching Policy Optimization: Sandbox-Native Language Agent Reinforcement Learning

- 基于沙盒可快照、可恢复特性,构建共享前缀的单棵决策树。
- 在相同算力下,任务成功率提升3.6至6.1个百分点,梯度方差减半。
- 适合需要高效训练的代码生成、复杂任务规划等场景使用。
强化学习已成为训练大语言模型(LLM)智能体与可执行沙盒交互的主要范式。当前最先进的算法如PPO、RLOO和GRPO沿用来自RLHF的采样结构:对每个提示,从初始状态独立采样N条轨迹,并通过减去群体基线计算优势。这一设计忽略了智能体沙盒的关键特性——确定性、可快照、可从任意中间状态恢复。我们提出,该特性允许一种根本不同的采样结构:与其采样N棵深度为T的独立轨迹树,不如构建一棵拥有N个叶节点的单一树,其兄弟节点共享前缀,从而共享方差。我们实现此思想为分支策略优化(BPO),该算法(i)在主干轨迹的高熵决策点自适应地快照沙盒,(ii)每个分支点分叉出K个替代动作并分别推进至终止,(iii)从兄弟返回值计算每步优势,而非依赖独立提示。我们证明该估计器无偏且方差严格低于轨迹级基线,方差降低量等于前缀解释的回报方差部分。在WebShop、ALFWorld和SWE-bench Verified数据集上,使用Qwen2.5-7B和Llama-3.1-8B作为骨干模型,BPO在匹配计算量下相比GRPO和RLOO成功提升3.6–6.1个百分点,梯度范数方差减半,仅需38%的策略更新次数即可达到最佳基线性能。
原文摘要 · Abstract (English)
Reinforcement learning has emerged as the dominant paradigm for training large language model (LLM) agents that interact with executable sandboxes. State-of-the-art algorithms such as PPO, RLOO, and GRPO inherit their rollout topology from RLHF: for each prompt, N independent trajectories are sampled from the initial state, and an advantage is computed by subtracting a group baseline. This design ignores a defining property of agent sandboxes. They are deterministic, snapshottable, and resumable from any intermediate state. We argue that this property enables a fundamentally different rollout topology: rather than N independent trees of depth T, one can construct a single tree of N leaves whose siblings share prefixes, and therefore share variance. We instantiate this idea as Branching Policy Optimization (BPO), a sandbox-native RL algorithm that (i) adaptively snapshots the sandbox at high-entropy decision points along a backbone trajectory, (ii) forks K alternative actions per branch point and rolls out each to termination, and (iii) computes per-step advantages from sibling returns rather than from independent prompts. We prove this estimator is unbiased and has strictly lower variance than the trajectory-level baseline, with the reduction equal to the prefix-explained portion of return variance. On WebShop, ALFWorld, and SWE-bench Verified with Qwen2.5-7B and Llama-3.1-8B backbones, BPO improves success by 3.6--6.1 absolute points over GRPO and RLOO at matched compute, halves gradient-norm variance, and matches the best baseline using 38% fewer policy updates.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。