Speculate While You Reason: Teaching Agents to Predict Their Next Tool Call via Joint Agent-Speculator RL
This paper introduces a self-speculating agent framework that unifies task-solving and next-tool-call prediction within a single model, utilizing a joint reinforcement learning method to significantly improve speculation accuracy and reduce latency without compromising task performance.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are a super-smart detective trying to solve a mystery. You have a brilliant mind that can think through clues, but to get the final answer, you need to ask a few questions to the outside world—like calling a librarian to check a book or asking a weatherman for the forecast. The problem is, every time you make a phone call, you have to hang up, wait for the person on the other end to pick up, listen to their answer, and then hang up again before you can think about the next clue. While you are waiting on hold, your brilliant brain is just sitting there, doing nothing. This "waiting time" is a huge bottleneck for AI agents, which are basically computer programs that act like detectives, using tools to solve complex problems.
To fix this, scientists have tried a trick called "speculation." It's like having a sidekick who guesses what you are about to ask the librarian before you even finish your sentence. If the sidekick guesses right, the librarian starts reading the book while you are still thinking, so the answer is ready the moment you ask. But here's the catch: usually, the sidekick is a different person (a smaller, separate AI model) who doesn't know your thinking style as well as you do. They often guess wrong, or they need their own special notebook and phone, which takes up extra space and energy. The big question is: Can the detective learn to guess their own next move perfectly, without needing a clumsy sidekick?
This paper introduces a clever new way to teach AI agents to do exactly that. The researchers found that the best person to guess what an agent will do next is the agent itself. Instead of hiring a separate "guessing model," they trained a single AI to switch between two modes: "Thinking Mode" (solving the actual task) and "Guessing Mode" (predicting its own next tool call). They used a special training method called "Joint Agent–Speculator RL" (Reinforcement Learning). Think of this like a video game where the character practices both playing the level and predicting the next enemy move at the same time. The AI learns from its own recent games to get better at guessing, while making sure it doesn't forget how to actually win the game.
The results are quite promising. When they tested this "self-guessing" agent on tasks like searching for answers to tricky questions or managing airline bookings, the AI got much better at predicting its next move. For a specific 4-billion-parameter model called Qwen3-4B, the accuracy of guessing the correct next tool call jumped from 44.1% to 61.2%. For a slightly newer version, Qwen3.5-4B, it went from 48.9% to 66.3%. Crucially, while the agent got better at guessing, it didn't get worse at actually solving the tasks; its success rate stayed stable or even improved slightly.
The paper also rules out the idea that a smaller, separate AI model is the best guesser. They tested smaller models as "sidekicks" and found they were often wrong because they didn't match the main agent's style. They also showed that using a separate guesser requires more computer memory and takes longer to switch between models, which defeats the purpose of saving time. By keeping the "thinker" and the "guesser" as the same brain, the system saves memory and avoids the lag of switching between different computers.
However, the authors are careful to note that this method works best for "read-only" tools, like searching for information or looking up data. If the tool involves changing something in the real world—like placing an order or deleting a file—guessing wrong could be dangerous. In those cases, the system would need extra safety checks. But for the vast majority of tasks where an AI just needs to gather information, this self-guessing trick suggests a faster, more efficient way for AI to work, hiding the waiting time behind the thinking time.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.