通过重加权推理令牌提升工具使用大模型的训练稳定性与效果
ResT: Reshaping Token-Level Policy Gradients for Tool-Use Large Language Models
- 基于熵感知机制动态重加权令牌,引导模型聚焦关键推理步骤
- 在多轮任务中实现比基线最高提升8.76%的性能,超越GPT-4o
- 适合需要稳定多步推理的大模型工具调用场景
大语言模型通过调用外部工具从被动生成转变为目标驱动的智能体。强化学习为优化此类工具使用策略提供了理论框架,但现有方法仅依赖稀疏结果奖励,忽视工具使用任务特性,导致策略梯度方差大、训练效率低。本文首次建立策略熵与工具使用训练稳定性的理论关联,揭示结构化低熵令牌是奖励的关键决定因素。据此提出熵感知的令牌级策略梯度重塑方法ResT,随训练进程逐步提升推理令牌权重,平滑实现从结构正确性到语义推理的过渡,显著稳定多轮任务收敛。在BFCL和API-Bank数据集上,ResT达到最先进水平,性能优于此前方法最高8.76%;在40亿参数基模型上微调后,单轮任务超越GPT-4o 4.11%,多轮任务超越1.50%。代码已开源。
原文摘要 · Abstract (English)
Large language models (LLMs) transcend passive generation and act as goal-directed agents by invoking external tools. Reinforcement learning (RL) offers a principled framework for optimizing these emergent tool-use policies, yet the prevailing paradigm relies exclusively on sparse outcome rewards and lacks consideration of the particularity of tool-use tasks, inflating policy-gradient variance and resulting in inefficient training. To better understand and address these challenges, we first establish a theoretical link between policy entropy and training stability of tool-use tasks, which reveals that structured, low-entropy tokens are primary determinants of rewards. Motivated by this insight, we propose \textbf{Res}haped \textbf{T}oken-level policy gradients (\textbf{ResT}) for tool-use tasks. ResT reshapes the policy gradient through entropy-informed token reweighting, progressively upweighting reasoning tokens as training proceeds. This entropy-aware scheme enables a smooth shift from structural correctness to semantic reasoning and stabilizes convergence in multi-turn tool-use tasks. Evaluation on BFCL and API-Bank shows that ResT achieves state-of-the-art results, outperforming prior methods by up to $8.76\%$. When fine-tuned on a 4B base LLM, ResT further surpasses GPT-4o by $4.11\%$ on single-turn tasks and $1.50\%$ on multi-turn base tasks. Code is available at https://github.com/1229095296/ResT_Tool_use_LLM.git.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。