Trajectory-Level Speculation with Semantic Verification for Tool-Using Agents
Organizations: LARK, HKUST (GZ) · Yinwang · University of Cambridge · HKUST
Abstract
Large language model agents solve tasks through long sequences of tool calls, and the prevailing design has a single strong model generate every step, although many steps are routine enough for a much smaller model. Existing ways of sharing this work keep the strong model as the generator: routers and collaborative agents decide which model handles each query or step, and speculative methods check a small model's drafts one step at a time, usually against the strong model's own action. We introduce SpecAgent, a collaboration protocol that turns the strong model from the author of each step into a reviewer of steps drafted by a weak model. The weak model executes read-only tool calls as it drafts, so that every step is grounded in real observations, and holds the first action that would modify the environment. The strong model then verifies the drafted segment in a single prefill pass, commits the longest prefix it judges semantically valid, and repairs the first rejected step. Because verification replaces autoregressive decoding with parallel prefill, the strong model decodes only short verdicts and occasional repairs rather than every step. On -Bench, SpecAgent comes within one point of the strong model's success rate while roughly halving memory traffic and wall time, and on AutomationBench and VitaBench it recovers 44-75% of the quality gap while lowering both. In an edge-cloud deployment on MCP-Atlas with three cloud models, it closes 53-75% of the weak-strong quality gap while the strong model generates at most half as many tokens. These results suggest that a strong model need not author every step of an agent: reviewing grounded drafts retains most of its quality while cutting both latency and memory traffic.
Figures & tables
| Real-World MCP Services | Transactional Interaction | Business Workflows | Life Services |
| ( 3 ) | ( 4 ) | ( 30 ) | ( 16 ) |
| 20–30 turns | 30–80 turns | 40–60 turns | 50–100 turns |
| Method | Pass@1 (%) | HBM-read (TB) | Wall-time (s) | Est. compute (PFLOP) | GPU s | Calls (W/S) |
| -Bench (Airline) | ||||||
| Weak-only (4B) | 80.0 | 69.7 | 0.18 | 66.0 | ||
| Strong-only (397B) | 86.0 | 305.2 | 0.78 | 4828.4 | ||
| AgentCollab | 85.3 | 385.2 | 1.12 | 5629.3 | ||
| Speculative Actions | 72.0 | 665.6 | 0.89 | 9990.6 | ||
| SpecAgent | 86.0 | 126.2 | 1.01 | 860.4 | ||
| Method | Pass@1 (%) | HBM-read (TB) | Strong output tokens | Wall-time (s) | Est. compute (PFLOP) | API cost (\downarrow$ |
| Weak-only (4B) | 44.6 | 39.1 | – | 109 | 0.67 | 0.00 |
| Strong: Qwen3.5-397B-A17B | ||||||
| Strong-only (397B) | 72.3 | 3.6k | 105 | 1.72 | 1.39 | |
| SpecAgent | 59.4 | 1.8k | 120 | 2.64 | 1.12 | |
| Strong: GLM-5 | ||||||
| Strong-only (GLM-5) | 76.2 | 4.6k | 110 | 10.07 | 8.91 | |
| Verify | Repair | Predicted | Observed | ||||
| decoded | HBM | time | |||||
| Airline | 0.145 | 0.67 | 0.046 | 1.27 | 0.17 | 0.17 | 0.16 |
| Retail | 0.152 | 1.35 | 0.057 | 1.32 | 0.30 | 0.30 | 0.30 |
| AutomationBench | 0.277 | 0.25 | 0.204 | 1.52 | 0.53 | 0.54 | 0.38 |
| VitaBench | 0.216 | 0.53 | 0.100 | 1.36 | 0.28 | 0.29 | 0.24 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Request family | Newly processed tokens | Rationale |
| Weak draft, Strong act | append-only transcript | |
| Strong verification | candidate is new text | |
| Strong repair | rejection note is new text |
| Qwen3.5-4B (Weak) | Qwen3.5-397B-A17B (Strong) | |
| Hidden size / vocabulary | 2560 / 248,320 | 4096 / 248,320 |
| Layers: full attention / Gated DeltaNet | 8 / 24 | 15 / 45 |
| Query / KV heads, head dim | 16 / 4, 256 | 32 / 2, 256 |
| DeltaNet value heads , | 32, 128 | 64, 128 |
| MLP | dense, | MoE, , |
| Expert / shared width / | – | 1024 / 1024 |
| GLM-5 | DeepSeek-V4-Flash-0731 | |
| Hidden size / vocabulary | 6144 / 154,880 | 4096 / 129,280 |
| Layers | 78 (first 3 dense) | 43 |
| Attention | MLA + DSA | sliding window + compressed |
| Query / KV heads | 64 / 64 | 64 / 1 |
| Head dim (q/k, v) | 256 (192 + 64 rope), 256 | 512 (64 rope) |
| Low-rank projection dims | query 2048, KV 512 | query 1024, output 1024 (8 groups) |
| Domain | Method | Pass@1 (%) | Pass@3 (%) | Pass 3 (%) |
| Airline | Weak-only (4B) | 80.0 | 96.0 | 64.0 |
| Strong-only (397B) | 86.0 | 96.0 | 72.0 | |
| Retail | Weak-only (4B) | 80.4 | 95.6 | 61.4 |
| Strong-only (397B) | 88.6 | 96.5 | 76.3 |
| -Bench | AutomationBench | VitaBench | MCP-Atlas | |
| Held ( ) | writes, transfer | writes, final message | writes | writes, final answer |
| Chunk size | 6 | 8 | 6 | 6 |
| Verifier context | full history | full history | tool results cut | old tool results cut |
Tool-Using Agents
Tool-using agents plan and act through external tools, APIs, software interfaces, and environments to complete tasks beyond language generation.
See all 289 papers