Speculate While You Reason: Teaching Agents to Predict Their Next Tool Call via Joint Agent-Speculator RL

📄 arXiv: 2607.25816v1 📥 PDF

作者: Jiabao Ji, Yujian Liu, Li An, Rohit Jain, Gungor Polatkan, Siyu Zhu, Shiyu Chang

分类: cs.AI

发布日期: 2026-07-28


💡 一句话要点

提出自我推测代理以解决工具调用延迟问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 工具调用推测 自我推测代理 联合强化学习 大型语言模型 任务成功率 模型整合 延迟问题

📋 核心要点

  1. 现有工具调用推测方法通常与代理的实际行为不一致,导致性能低下和延迟问题。
  2. 本文提出自我推测代理,通过将代理和推测器整合为一个模型,利用部分轨迹预测下一个工具调用。
  3. 实验显示,Qwen3-4B和Qwen3.5-4B模型的下一个工具调用命中率分别从44.1%提升至61.2%和从48.9%提升至66.3%。

📝 摘要(中文)

大型语言模型代理在等待工具调用结果时常常消耗大量时间。工具调用推测可以通过预测并预执行代理的下一个工具调用来隐藏这种延迟,但现有的推测器通常是与代理行为不一致的独立模型。本文提出自我推测代理,将代理和推测器统一为同一模型,利用联合强化学习方法来提升工具调用的预测准确性。实验结果表明,该方法在多个任务中显著提高了工具调用的命中率,同时保持了代理的任务成功率。

🔬 方法详解

问题定义:本文旨在解决大型语言模型代理在工具调用时的延迟问题,现有方法的推测器通常与代理的行为不一致,导致性能下降。

核心思路:提出自我推测代理,通过将代理和推测器整合为同一模型,利用代理自身的轨迹进行下一个工具调用的预测,从而简化设计并提高准确性。

技术框架:整体架构包括两个主要模式:代理模式和推测器模式。在代理模式下,模型执行任务;在推测器模式下,模型从部分轨迹中预测下一个工具调用,并重用前缀KV缓存。

关键创新:最重要的创新在于将代理和推测器统一为一个模型,利用联合强化学习方法进行训练,显著提高了工具调用的预测准确性。

关键设计:采用联合强化学习方法,推测目标来源于代理自身的回滚,交替更新代理和推测器的参数,以确保性能不下降。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,Qwen3-4B模型的下一个工具调用命中率从44.1%提升至61.2%,而Qwen3.5-4B模型的命中率从48.9%提升至66.3%,同时保持了代理的任务成功率,展示了方法的有效性。

🎯 应用场景

该研究的潜在应用领域包括智能助手、自动化工具和对话系统等,能够显著提升用户体验,减少等待时间,增强系统的响应能力。未来,该方法可能推动更高效的多任务学习和实时决策系统的发展。

📄 摘要(原文)

Large language model agents often spend substantial wall-clock time waiting for tool call results. Tool-call speculation can hide this latency by predicting and pre-executing an agent's next tool call if the prediction matches the agent's eventual tool call, but existing speculators are typically separate draft models or cached traces that are poorly aligned with the deployed agent's own behavior. We identify this speculator-agent gap and show that the target agent itself is a strong next-call speculator. This points to a simpler design: unifying the agent and speculator within the same model. In this paper, we introduce the self-speculating agent, a single model that both solves tasks in agent mode and predicts its next tool call from partial trajectories in speculator mode, fully reusing prefix KV cache. To enable this dual-mode agent without degrading performance, we propose a joint agent-speculator reinforcement learning method, which derives speculation targets from the agent's own rollouts and alternates agent and speculator updates. Across agentic search QA and conversational tool-use agentic tasks, our method improves average next tool-call Hit@1 from 44.1 to 61.2 for Qwen3-4B and from 48.9 to 66.3 for Qwen3.5-4B, while preserving agent task success.