Speculate While You Reason: Teaching Agents to Predict Their Next Tool Call via Joint Agent-Speculator RL
Source: https://arxiv.org/abs/2607.25816
arXiv: 2607.25816
Authors: Jiabao Ji, Yujian Liu, Li An, Rohit Jain, Gungor Polatkan, Siyu Zhu, Shiyu Chang
Published: 2026-07-28
Categories: cs.AI
PDF: https://arxiv.org/pdf/2607.25816v1
Abstract (en)
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.
Summary (zh)
Agent 大量墙钟时间花在等待工具返回。本文指出独立 draft 模型或缓存轨迹与目标 Agent 行为不对齐(speculator-agent gap),最好的下一跳工具预测器往往是 Agent 自身。设计同一模型:agent mode 解题,speculator mode 从部分轨迹预测下一 tool call,并复用 prefix KV。Joint agent-speculator RL 从自身 rollout 派生投机目标并交替更新。Qwen3-4B Hit@1 44.1→61.2,Qwen3.5-4B 48.9→66.3,任务成功率保持。
One-liner
工具等待可以同模型投机:Self-Speculating Agent 用 agent/speculator 双模式 + 联合 RL 抬高 next-call Hit@1。
Obsidian evidence
OpenClaw定时任务/论文流水线/2026-07-29-论文流水线.md- opencli:
arxiv paper 2607.25816 -f json - Run date: 2026-07-29