arXiv:2410.07745cs.CL2024-10中稿 · CIKM'25被引 25

用细粒度强化学习提升大模型多步工具使用能力

StepTool: Enhancing Multi-Step Tool Usage in LLMs via Step-Grained Reinforcement Learning

  • 将工具使用建模为分步决策过程,逐步奖励成功调用和任务贡献
  • 在多个基准上任务通过率与工具召回率均优于监督微调和传统强化学习
  • 能发现新策略而非仅调整已有知识,适合复杂任务自动化场景

尽管大语言模型具备强大的文本生成能力,但在利用外部工具解决复杂任务时仍表现不佳,即工具学习难题。现有方法主要依赖监督微调,将工具学习视为文本生成问题,忽略了多步上下文中的决策复杂性。本文提出将工具学习建模为动态决策过程,引入StepTool——一种细粒度强化学习框架,以增强大模型在多步工具使用中的能力。StepTool包含两个关键组件:步骤级奖励塑造,根据每次工具调用的成功率和对任务完成的贡献分配奖励;步骤级优化,采用策略梯度方法在多个决策步骤间优化模型。在多个基准上的实验表明,StepTool在任务通过率和相关工具召回率方面持续优于基于SFT和RL的基线方法。进一步分析显示,StepTool帮助模型发现新的工具使用策略,而不仅仅是重加权已有知识。结果凸显了细粒度决策建模在工具学习中的重要性,并确立StepTool作为提升大模型多步工具使用的通用且稳健方案。代码与数据见https://github.com/yuyq18/StepTool。

原文摘要 · Abstract (English)

Despite their powerful text generation capabilities, large language models (LLMs) still struggle to effectively utilize external tools to solve complex tasks, a challenge known as tool learning. Existing methods primarily rely on supervised fine-tuning, treating tool learning as a text generation problem while overlooking the decision-making complexities inherent in multi-step contexts. In this work, we propose modeling tool learning as a dynamic decision-making process and introduce StepTool, a novel step-grained reinforcement learning framework that enhances LLMs' capabilities in multi-step tool use. StepTool comprises two key components: Step-grained Reward Shaping, which assigns rewards to each tool interaction based on its invocation success and contribution to task completion; and Step-grained Optimization, which applies policy gradient methods to optimize the model across multiple decision steps. Extensive experiments across diverse benchmarks show that StepTool consistently outperforms both SFT-based and RL-based baselines in terms of task Pass Rate and Recall of relevant tools. Furthermore, our analysis suggests that StepTool helps models discover new tool-use strategies rather than merely re-weighting prior knowledge. These results highlight the importance of fine-grained decision modeling in tool learning and establish StepTool as a general and robust solution for enhancing multi-step tool use in LLMs. Code and data are available at https://github.com/yuyq18/StepTool.

工具学习强化学习多步推理

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