Adversarial Draft Rejection Boosts Long-Horizon Agent Accuracy
In long-horizon coding agents, speculative decoding is not only an accelerator: training the draft to be rejected at critical decision points reallocates context precision to the target model’s least noisy slot and raises end-to-end success without changing the target distribution.
On this page
A team has 3 vendor proposals for a faster coding agent, but the real decision is whether the speed gain changes the answer on a 30-turn task. The usual advice is that speed tricks do not change model answers: a small guesser proposes words, the large model checks a block, and a rejection rule keeps the output distribution fixed. The paper [1] argues this breaks for long-horizon agents. Later positions in a checked block are noisier; after 30 turns, extreme deviations grow; and training the guesser to be rejected at critical reasoning points pushes those words through the large model’s cleanest position. End-to-end success on DeepSWE rises without changing the target model.
The Default View: Speed Only, No Behavior Change
Speculative decoding is usually described as a speed-only trick. A small draft model proposes a block of tokens; the target model scores the whole block in one forward pass; a rejection-sampling rule accepts a prefix and resamples rejected positions from a residual distribution. Under an idealized target, a fixed function from prefix to next-token distribution, the output distribution is exactly preserved, so draft quality is judged by accepted tokens per step. The paper [1] says that description assumes a target that is not bitwise reproducible. Served models use low-precision weights, quantized key-value caches, and sparse attention; their logits depend on how the computation is laid out. A verification pass lays computation out differently from ordinary decoding, so the distribution can be exact while the precision of each committed token is not uniform.
Where the Noise Lives: Slot Position Inside a Verification Block
The paper measures repeated forward passes on an identical prefix. It reports absolute log-probability shifts in nats; 1 nat is about a factor of 2.7 in probability, and 2 nats about 7.4. On GLM-5.3 with an 8-position DFlash2 block, slot 0 has 0.473 nats of noise, close to single-token decoding at 0.478. Each later slot adds 0.0195 nats, roughly 4% of slot 0, and the last slot is 34% noisier than the first. The share of tokens shifting by more than 2 nats rises from 3.2% to 6.2%; beyond 3 nats, from 1.1% to 2.1%. DeepSeek-V4.1-Flash with a 6-position DSPARK block has about half the absolute noise, but the same relative growth: 0.0094 nats per slot. The measurement uses DeepSWE prompts with 6k–24k tokens of context: 1631 positions on GLM-5.3 and 1294 on DeepSeek-V4.1-Flash.
| Model / draft | Block width | Slot 0 noise | Per-slot growth | >2 nats share |
|---|---|---|---|---|
| GLM-5.3 (NVFP4, DFlash2) | 8 positions | 0.473 nats (decoding 0.478) | +0.0195 nats, about 4% | 3.2% → 6.2% |
| DeepSeek-V4.1-Flash (DSPARK) | 6 positions | about half of GLM | +0.0094 nats, about 4% | 0.41% → 0.68% |
After 30 Turns, Extreme Deviations Grow
One forward pass is not the whole story, because an agent writes every token into its context and reads it back. The paper follows 96 DeepSWE tasks, scoring 6.38M assistant tokens per build. It selects the longest reasoning turn, median 9k tokens after a median 45k-token prefix, then scores up to 128k further tokens, a median of 95 assistant turns. The key finding is not uniform drift but a thicker extreme tail after 30 turns. For deviations beyond 4 nats, the ratio between verification-written and decoding-written context is 0.98 in turns 11–30, 1.09 in turns 31–50, and 1.16 in turns 51–70; an independent build gives 1.20 beyond turn 30. The paper reads this as a 10–20% excess of extreme deviations after about 30 turns.
Train the Draft to Be Rejected at Decision Points
The method is called Adversarial Speculative Reasoning. The authors first locate decision points in agent traces, where the model frames a choice as principle, evidence, or a test, versus a guess about likelihood or risk. In their audit, principle-, evidence-framed, or test-driven decisions took the correct side about twice as often as likelihood- or risk-guided reasoning. They build fork pairs between alternative framings and train the draft with DPO in reverse; DPO is a preference optimization that learns from paired comparisons without a separate reward model. The draft learns to prefer the framing the target should avoid. At inference, the draft and target diverge at these points, verification restarts, and the critical token is resampled by the target at slot 0. Only 0.06% to 0.28% of hosted parameters are trained.
DeepSWE Results: +7.0 and +4.0 Points
DeepSWE is a benchmark of complex software-engineering tasks, run with the standard harness and environments. The paper reports end-to-end success rate, not a proxy.
| Model | Baseline | With method | Change |
|---|---|---|---|
| GLM-5.3-nvfp4 | 60.6% | 67.6% | +7.0 points |
| DeepSeek-V4.1-Flash | 67.8% | 71.8% | +4.0 points |
The target model and its output distribution are unchanged, and the paper says inference efficiency is not hurt. The gain comes from where the draft is rejected, not from a larger target or extra sampling at the output.
When This Method Does Not Apply
The method does not apply when the horizon is short. The 30-turn threshold and the noise curve come from long-horizon coding agents; in single-turn QA or a few tool calls, verification noise has little chance to accumulate, and the paper does not show a gain. It also fails when the serving stack has no draft model or verification block, because there is no rejection channel to control. It is out of scope when decision points cannot be labeled reliably from traces: reverse DPO needs preference pairs, and noisy labels would train the draft to reject the wrong places. Finally, it does not raise general model capability; it reallocates context precision, and the paper does not report non-coding tasks, closed models with no trainable draft, or robustness to annotation error. Those are extrapolation boundaries, not measured results.
