arXiv:2603.10069cs.LGcs.CL2026-03被引 3

仅一行代码改进搜索代理,解决训练崩溃问题

Improving Search Agent with One Line of Code

  • 用条件性令牌级KL约束稳定强化学习训练
  • 在7个问答数据集上提升10.6%准确率
  • 兼容现有框架,适合部署在各类大模型中

基于工具的智能体强化学习(TARL)已成为训练搜索代理自主与外部工具交互以完成多轮信息检索的有前景范式。然而,我们识别出一种导致灾难性模型崩溃的关键训练不稳定性——重要性采样分布漂移(ISDD)。在广泛采用的分组相对策略优化(GRPO)算法中,ISDD表现为重要性采样比率急剧下降,使梯度更新失效并引发不可逆训练失败。为此,我们提出搜索代理策略优化(SAPO),通过条件性令牌级KL约束实现训练稳定。与忽略分布差异的硬截断不同,SAPO仅对当前策略概率低但发生显著偏移的正向标记施加惩罚,从而防止分布漂移同时保留梯度流动。值得注意的是,SAPO只需对标准GRPO进行一行代码修改即可部署。在七个QA基准上的大量实验表明,相比Search-R1,SAPO实现了绝对提升10.6%(相对提升31.5%),且在不同模型规模(1.5B、14B)和架构(Qwen、LLaMA)下均表现一致优异。

原文摘要 · Abstract (English)

Tool-based Agentic Reinforcement Learning (TARL) has emerged as a promising paradigm for training search agents to interact with external tools for a multi-turn information-seeking process autonomously. However, we identify a critical training instability that leads to catastrophic model collapse: Importance Sampling Distribution Drift(ISDD). In Group Relative Policy Optimization(GRPO), a widely adopted TARL algorithm, ISDD manifests as a precipitous decline in the importance sampling ratios, which nullifies gradient updates and triggers irreversible training failure. To address this, we propose \textbf{S}earch \textbf{A}gent \textbf{P}olicy \textbf{O}ptimization (\textbf{SAPO}), which stabilizes training via a conditional token-level KL constraint. Unlike hard clipping, which ignores distributional divergence, SAPO selectively penalizes the KL divergence between the current and old policies. Crucially, this penalty is applied only to positive tokens with low probabilities where the policy has shifted excessively, thereby preventing distribution drift while preserving gradient flow. Remarkably, SAPO requires only one-line code modification to standard GRPO, ensuring immediate deployability. Extensive experiments across seven QA benchmarks demonstrate that SAPO achieves \textbf{+10.6\% absolute improvement} (+31.5\% relative) over Search-R1, yielding consistent gains across varying model scales (1.5B, 14B) and families (Qwen, LLaMA).

搜索代理强化学习训练稳定代码优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。