Training Multi-Turn Search Agent via Contrastive Dynamic Branch Sampling
Yubao Zhao, Weiquan Huang, Sudong Wang, Ruochen Zhao, Chen Chen, Yao Shu, Chengwei Qin
TL;DR
BranPO introduces a tail-focused, contrastive supervision framework for long-horizon agentic RL, addressing credit assignment ambiguity by recursively truncating trajectories from the tail and resampling contrastive suffixes. By coupling difficulty-aware branch sampling with Redundant Step Masking, BranPO concentrates exploration on informative tail decisions while suppressing uninformative continuations, yielding stable, sample-efficient updates. The approach unifies stable prefix gradients (GRPO-like) with DPO-like suffix optimization, improving performance on long-horizon multi-hop QA benchmarks without increasing training budget. Empirical results show BranPO consistently outperforms strong baselines across seven QA datasets and generalizes to web-search scenarios, highlighting its potential for scalable, efficient agentic reasoning. Limitations remain in ultra-long horizons and very hard questions, pointing to future work on data quality and broader tool-use contexts.
Abstract
Agentic reinforcement learning has enabled large language models to perform complex multi-turn planning and tool use. However, learning in long-horizon settings remains challenging due to sparse, trajectory-level outcome rewards. While prior tree-based methods attempt to mitigate this issue, they often suffer from high variance and computational inefficiency. Through empirical analysis of search agents, We identify a common pattern: performance diverges mainly due to decisions near the tail. Motivated by this observation, we propose Branching Relative Policy Optimization (BranPO), a value-free method that provides step-level contrastive supervision without dense rewards. BranPO truncates trajectories near the tail and resamples alternative continuations to construct contrastive suffixes over shared prefixes, reducing credit ambiguity in long-horizon rollouts. To further boost efficiency and stabilize training, we introduce difficulty-aware branch sampling to adapt branching frequency across tasks, and redundant step masking to suppress uninformative actions. Extensive experiments on various question answering benchmarks demonstrate that BranPO consistently outperforms strong baselines, achieving significant accuracy gains on long-horizon tasks without increasing the overall training budget. Our code is available at \href{https://github.com/YubaoZhao/BranPO}{code}.
