Manuscript Offprint
arXiv:2610.10411Training Parallel Speculative Draft Models by Directly Minimizing Expected Decoding Rounds
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Speculative decoding accelerates large language model inference by using a low-cost draft model to propose tokens that the full-size target model verifies in parallel. Parallel and semi-autoregressive (semi-AR) drafters improve drafting efficiency by proposing an entire block in a single forward pass, but training them raises a new difficulty: the draft distribution for a given position depends on where the decoding round starts, and where rounds start depends on how many tokens earlier rounds accepted. Existing training objectives typically rely on block-local surrogates that ignore this cross-round coupling, and therefore do not directly optimize the global decoding efficiency. In this work, we develop a theoretical framework for training and evaluating these drafters by representing speculative decoding as a Markov reward process. This formulation yields the Expected Decoding Rounds (EDR) objective, which weights local rejection costs by state occupancies and exactly equals the expected number of decoding rounds. Unlike prior surrogate objectives, EDR introduces no auxiliary hyperparameters. We then derive an exact temporal-difference gradient that supports unbiased stochastic optimization from target-model rollouts. The same framework also yields an exact offline evaluator for round counts, enabling paired drafter comparisons on shared target rollouts without running speculative decoding. Finetuning two state-of-the-art drafters, DSpark and DFly, with EDR consistently improves mean accepted length and outperforms existing training objectives across nine benchmarks spanning math reasoning, code generation, and chat.
https://github.com/y-x-zhao/AngelSpec-EDR
Contents
1 Introduction 2
2 Preliminaries 3
3 Main Results 4
3.1 Speculative Decoding as a Markov Reward Process 5
3.2 The EDR Objective 6
3.3 TD-Form Gradient of EDR 7
3.4 Exact Offline Evaluation 8
3.5 Suboptimality of Block-Local Surrogates 9
4 Related Work 9
4.1 Literature Review 9
4.2 Comparison of Training Objectives 10
5 Experiments 12
5.1 Experimental Setup 12
5.2 Experimental Results 13
*Department of Industrial and Operations Engineering, University of Michigan, Ann Arbor, MI, USA. Email: {zhyx,cxcai}@umich.edu.
6 Conclusion 13
A Speculative Decoding Algorithm 17
B Proofs 17
B.1 Markov Process Formulation in Section 3.1 17
B.2 Proofs of Proposition 1 and Proposition 2 20
B.3 Proof of Theorem 1 21
B.4 Proof of Theorem 2 21
B.5 Proof of Theorem 3 22
C Additional Details for Expected Decoding Rounds 24
C.1 Draft EOS Probability Does Not Reduce EDR 24
C.2 Fixed-Size Anchor Sampling 24
D Additional Details for Experiments 25
Speculative decoding (Leviathan et al., 2023; Chen et al., 2023) reduces this sequential cost by using a lightweight draft model to propose multiple candidate tokens, which the full-size target model verifies in parallel in a single forward pass. With rejection-sampling verification, the generated sequence follows the target model's distribution exactly. Therefore, speculative decoding accelerates inference without sacrificing quality, and the goal is to reduce expensive target model verifications—equivalently, decoding rounds—while keeping drafting itself inexpensive.
Early work employed AR drafters (Li et al., 2024b) that predict draft tokens sequentially, so the latency contributed in the drafting phase grows linearly with the draft block size. To reduce the sequential work of drafting, parallel drafters (Cai et al., 2024; Chen et al., 2026a) have emerged to propose multiple draft tokens in one forward pass, typically built on masked diffusion language models (Sahoo et al., 2024; Shi et al., 2024). Their semi-AR variants (Cheng et al., 2026; Liu et al., 2026) add limited sequential dependence within each draft block to improve the draft quality. Parallel drafting supports longer draft blocks and deeper drafter networks, with potential to significantly accelerate the inference of a large target model.
Challenges in parallel drafter training: cross-round dependence. For a fixed architecture, a drafter's quality affects inference speed primarily through the number of decoding rounds, so the natural training objective is to minimize the expected number of rounds.
For an AR drafter, the proposal at position is conditioned on the full realized prefix regardless of where the current round started, so its acceptance probability depends only on this prefix. As a result, the standard local training objective for AR drafters—matching the target model's next-token distribution at every prefix—is directly aligned with this goal (Yin et al., 2024a). In contrast, for a parallel or semi-AR drafter, the proposal can instead depend on an earlier prefix with (in a round starting at ), with access to only some or none of the intermediate tokens. Consequently, the same output position can have different draft distributions depending on where the round starts.
This additional dependence breaks the direct link between local distribution matching and global decoding efficiency. The draft for position t from a round starting at n matters only if the decoding trajectory first reaches a round starting at n and then accepts all preceding draft tokens in that round up to position t - 1. Both events depend on earlier acceptance outcomes induced by the drafter itself. Thus, changing the drafter affects both acceptance within a round and which draft distributions are encountered in subsequent rounds, making the training objective inherently coupled across rounds.
However, existing objectives for parallel and semi-AR drafters do not account for these cross-round dependencies and instead rely on local surrogates. Examples include the expected number of tokens accepted within a single round (Li et al., 2026c) and draft-target distributional discrepancies under hand-crafted weights (Chen et al., 2026a; Wu et al., 2026). This motivates the central question:
Can we train parallel and semi-AR drafters by directly minimizing the expected number of decoding rounds?
Our contributions. We answer this question affirmatively. Our approach relies on two key observations. First, conditioned on the output sequence, speculative decoding with a parallel or semi-AR drafter can be formulated as a Markov reward process (MRP) (Howard, 1971): each state records where the current round started and which position is being verified, and each rejection costs one round. Second, since rejection-sampling verification ensures that the output follows the same target distribution for every drafter, averaging over target rollouts recovers the expected number of rounds of actual decoding. Together, these insights allow us to capture the dependencies across decoding rounds explicitly and characterize the expected number of decoding rounds exactly, yielding a unified framework for training and evaluating drafters.
Building on this framework, we introduce the Expected Decoding Rounds (EDR) objective, whose minimization is equivalent to minimizing the expected number of decoding rounds. We then derive a temporal-difference gradient estimator, enabling drafter training from target-model rollouts. EDR applies across drafter architectures and introduces no hyperparameters. We further prove that drafters maximizing the expected accepted length for each round can be strictly suboptimal for EDR, theoretically justifying the advantages of our global objective. The framework also yields an exact offline evaluator of expected round counts, enabling comparisons of drafters on the same target-model rollouts without running online speculative decoding.
Empirically, we finetune two state-of-the-art (SOTA) drafters, DSpark (Cheng et al., 2026) and DFly (Liu et al., 2026), with EDR while keeping their architectures and inference procedures unchanged. Across nine benchmarks spanning mathematical reasoning, code generation, and chat, a single epoch of EDR finetuning consistently improves mean accepted length over the original drafters and existing training objectives.
Our main contributions are summarized as follows:
• A Markov reward process formulation. We provide a theoretical framework that exactly characterizes expected speculative decoding rounds for parallel and semi-AR drafters.
• An exact and trainable global objective. We introduce EDR, establish its equivalence to minimizing the expected number of decoding rounds, derive a tractable gradient for drafter training, and prove its advantage over local surrogates.
• An exact offline evaluator. We provide an offline evaluator of the expected number of decoding rounds, enabling paired evaluation of drafters on the same target-model rollouts.
• Consistent empirical gains. EDR finetuning improves two SOTA drafters across nine benchmarks, outperforming existing training objectives.
2 Preliminaries
Let be a vocabulary of ordinary tokens and , where denotes the end-of-sequence token. For two distributions , define the total variation (TV) distance , where . For any sequence , we denote , , and for . For , .
Target distribution. Let denote the distribution of the target model. It generates tokens autoregressively as for and stops upon sampling . Denote by the sequence length excluding . We assume has a universal constant upper bound for . A complete sequence has probability , and we call target-supported if .
Speculative decoding. Speculative decoding generates a token sequence in rounds. Consider a round that starts from a committed prefix . A drafter first proposes a block of draft tokens with . For simplicity, we write for the draft distribution at position in the current round, suppressing its dependence on the round start , committed prefix , and preceding within-block proposals . We will make this explicit in the next paragraph.
The target model then verifies the draft block from left to right in a single forward pass. When position is verified, all earlier drafts in the block have been accepted, so the current prefix is . Write . The draft is accepted with probability , in which case it is committed as . Otherwise, it is replaced with a correction token drawn from the residual distribution , . The remaining drafts in the block are discarded, and the next round begins from the updated prefix . If all draft tokens are accepted, the same forward pass also yields one additional bonus token , and the next round starts after it. Generation stops when <EOS> is committed. This rejection-sampling verification ensures that the output sequence satisfies for any drafter (Leviathan et al., 2023).
Draft distribution. Drafters differ in what conditions on. An AR drafter proposes each token from the full prefix, whereas parallel and semi-AR drafters propose the whole block from the prefix committed at the start of the round. We now refine the shorthand to make this explicit. For a round starting from a committed prefix , let denote the draft distribution for position . The subscript identifies the position being predicted, and records the position where the round starts. The semicolon separates the committed prefix from the preceding within-block proposals , which the drafter may use in whole or in part.
This notation covers AR, parallel, and semi-AR drafters. An AR drafter is the special case , which conditions on the concatenated prefix and has no further dependence on the round start . A parallel drafter samples the block independently given the committed prefix , i.e., . A semi-AR drafter allows partial dependence on preceding within-block drafts while maintaining parallel prediction across some positions. For parallel and semi-AR drafters, the same current prefix can therefore induce different draft distributions depending on the round start . This dependence is the main difference from AR drafters and the central challenge this work addresses. We give the Pseudocode for speculative decoding process we considered in Algorithm 2 in Appendix A.
Decoding rounds and mean accepted length. Each decoding round requires one forward pass of the target model. Let denote the number of decoding rounds needed to produce a complete output under drafter , including the one that produces . A common metric is the mean accepted length (MAL), the ratio of the expected output length to the expected number of rounds,
where is the length of the complete output counting all committed tokens, including correction tokens, bonus tokens, and the terminal token. As the output sequence follows the target distribution, is independent of the drafter for a fixed target model and evaluation corpus. Consequently, maximizing is equivalent to minimizing .
3 Main Results
This section presents our main results. Section 3.1 presents a Markov reward process (MRP) formulation for speculative decoding. Section 3.2 introduces the EDR objective and Section 3.3 presents a temporal-difference form of its gradient. Section 3.4 gives offline estimators for the decoding statistics, and suboptimality of block-local objectives is discussed in Section 3.5.
3.1 Speculative Decoding as a Markov Reward Process
Recall that denotes the number of decoding rounds in a speculative decoding run with drafter , and let be the output sequence of the same run. Since speculative decoding ensures for any drafter , the overall expected number of decoding rounds satisfies
where is the expected number of rounds conditioned on producing the sequence . Therefore, it suffices to characterize for any target-supported sequence .
Markov reward process. In light of this, we fix a target-supported sequence . Conditioned on the output of a speculative decoding run, the remaining randomness is which positions are filled by accepted drafts and which by the target model after a rejection, and this determines the number of decoding rounds .
This can be described as a Markov chain on states for . (see Appendix B.1 for a detailed derivation). State indicates that the current round started after (i.e., was committed) and is verifying the draft for position . Decoding starts at and terminates when is produced at position .
Note that at state with , the draft for position is drawn from . By Bayes' rule, given that position outputs , the probability that it was produced by an accepted draft is
Denote by the rejection probability. Acceptance continues the current round, whereas rejection starts a new round after position , provided that . Therefore, the Markov chain has two transitions:
We set and for , so the same transition rule covers the case when all tokens in a draft block are accepted and a new round starts after that.
Let denote the occupancy of state : the probability that this state is visited, conditioned on the output sequence being . It is not hard to see that depends on only through and hence we write . Starting from , the occupancies satisfy the forward recursion:
Since every round begins at a diagonal state , the number of rounds equals the number of diagonal states visited, yielding the following exact expression (see Appendix B.2 for proof).
Proposition 1. For any target-supported sequence and any drafter , the expected number of decoding rounds to produce is
The second identity has a direct MRP interpretation. Rejection starts a new round and incurs unit cost, while acceptance incurs zero cost. Hence, the rejection probability is the expected cost of visiting state , and the occupancy-weighted sum of costs gives the round count.
3.2 The EDR Objective
By (2), averaging (6) over provides an exact expression for the overall expected number of decoding rounds . However, each rejection probability uses the target only through the single realized token , even though the full distribution is available. Hence, we average over this token under the target distribution , conditioned on being a non-EOS token.
Definition 1. Define the local rejection cost of state , for , as
where for is the target distribution normalized over non-EOS tokens. For , its value is given by
and for , it is equal to 1. Note that is well-defined because every position outputs a non-EOS token so . We denote for notational convenience, since the EOS token incurs no cost.
In words, the cost is the rejection probability associated with state , given that the committed output token is non-EOS. It measures the local distributional discrepancy between the drafter and target for position t, given by the TV distance between the draft and target distributions for position t, excluding EOS and normalized by the target's non-EOS mass. Excluding EOS reflects the fact that when the target model produces EOS, it never starts another decoding round and incurs no penalty for draft rejection.
We now introduce the Expected Decoding Rounds (EDR) objective, which exactly equals the overall expected number of decoding rounds, as formalized in Theorem 1 below. The proof can be found in Appendix B.3.
Theorem 1. For any drafter q, the EDR objective equals the expected number of decoding rounds:
The EDR objective is a sum of local rejection costs , measuring the local distributional discrepancy between the drafter and target , each weighted by the corresponding occupancy . The quantity inside the expectation, which we call the per-sequence EDR loss,
can be computed exactly given a target-sampled sequence x via the forward occupancy recursion (5) and the local rejection cost (7). Therefore, averaging over a batch of target rollouts provides an empirical EDR loss for drafters that directly targets minimizing the expected number of rounds.
We make several important remarks.
- Replacement of with . The EDR loss (10) replaces in (6) with its conditional expectation . For an individual rollout, it generally differs from , but they agree after averaging over . In return, the EDR loss uses the next-token distribution rather than one sampled token, so its gradient aggregates information across the vocabulary.
• Exact occupancy weighting. Prior surrogate objectives (Chen et al., 2026a; Wu et al., 2026) do not account for EOS termination in their local discrepancy terms, and more importantly, weight them in a heuristic way. These weights can be interpreted as fixed surrogates for the drafter-dependent occupancies . In contrast, EDR combines EOS-aware local costs with the actual occupancies, yielding an exact objective for the expected number of decoding rounds.
Algorithm 1 One EDR training step (sg(·) denotes the stop-gradient operator)
Require: drafter , target model , block size
1: For each prompt , sample an independent target rollout from the target model
2: Compute for all and in one batched target forward pass
3: for (in parallel) do
4: Compute and from at all states
5: Compute by (5) and by (12), without gradients
6: end for
7:
8: Update using
- Parallel vs. AR drafters. For an AR drafter, for all . Without a block cap (), EDR reduces to
EDR hence decouples into local prefix costs, each minimized by matching to . This recovers the result of Yin et al. (2024a, Theorem 1) established for AR drafters and extends it to sequences that terminate with EOS. A finite block size adds only a mild dependence on through the boundary states. Therefore, Theorem 1 highlights the key difference between parallel and AR drafters, and EDR captures the cross-round dependencies exactly.
3.3 TD-Form Gradient of EDR
The per-sequence EDR loss in (10) depends on the drafter through both the local costs and the occupancies . Differentiating it with respect to directly is expensive because it must backpropagate through the entire forward recursion for occupancy (5). Fortunately, the MRP formulation gives the gradient in a temporal-difference (TD) (Sutton, 1988) form that uses only local derivatives.
For a fixed target-supported , consider the MRP with transitions (4) and costs from (7). Define the value function , the expected cumulative cost starting from state . The value function satisfies the Bellman equation (Bellman, 1966)
with the terminal condition for all . Unlike the cost and occupancy, the value function depends on the whole sequence . The value function of the initial state gives the per-sequence EDR loss:
We now present the gradient of the per-sequence EDR loss in the following theorem. The proofs of (13) and Theorem 2 are given in Appendix B.4.
Theorem 2 (EDR gradient). We parametrize the drafter by neural network parameters . For any target-supported sequence , the gradient of the per-sequence EDR loss (10) is given by
As a result, one has
The gradient has a standard one-step TD form, separated into two contributions: the immediate effect on the local rejection cost, and the downstream effect of changing the acceptance probability. The latter is weighted by the value gap, which measures the difference between the cumulative costs of the two possible subsequent states. The occupancies account for how often each state is reached.
Implementation. We compute the occupancies by the forward recursion (5) and the value functions by the backward Bellman recursion (12). Since they enter the gradient expression (14) only as weights, we hold them fixed during differentiation. Gradients are required only through the local quantities and .
By (15), averaging (14) over a batch of i.i.d. target rollouts gives an unbiased stochastic gradient of EDR, which directly optimizes the expected number of decoding rounds. One EDR training step is summarized in Algorithm 1.
3.4 Exact Offline Evaluation
The MRP formulation also yields exact offline evaluators for any drafter, computed from target-model rollouts alone without running speculative decoding. We first give an unbiased estimator of the expected number of decoding rounds, from which we obtain an estimator of the MAL. We then extend it to a finer-grained statistic, the expected number of rounds that commit at least k tokens, which yields an estimator of the position-wise acceptance rate.
3.4.1 Expected Decoding Rounds and MAL
By Proposition 1, the expected number of decoding rounds conditioned on the output equals the sum of the diagonal occupancies. For a target-supported sequence , define
This quantity averages out all randomness of speculative decoding given , namely draft sampling and verifier randomness, and is computed exactly by a single pass of the forward occupancy recursion. Given a dataset of target rollouts independently sampled from , we estimate the expected number of rounds and the MAL by
Since , is an unbiased estimator of , and , a ratio of sample means, is a consistent estimator of . Moreover, since the rollouts do not depend on the drafter, all drafters can be evaluated on the same . This yields paired comparisons free of the rollout variation that arises when each drafter is evaluated on independently generated outputs.
3.4.2 Rounds Committing at Least k Tokens and Acceptance Rate
A finer-grained statistic is the number of rounds whose committed length, i.e., the number of tokens committed in the round including the correction or bonus token, is at least . Let denote this number in a speculative decoding run. Since a round commits at most tokens, we consider . A round starting after position commits at least tokens if and only if its first drafts are accepted, i.e., it visits state . This observation generalizes Proposition 1 as follows; see Appendix B.2 for the proof.
Proposition 2. For any target-supported sequence , any drafter , and any , the expected number of rounds committing at least tokens to produce is
Taking recovers Proposition 1, so that . For , we define the acceptance rate at draft position as
the fraction of rounds reaching draft position k in which the k-th draft is also accepted. Using the same dataset D, we estimate these quantities by
As before, is unbiased for , and is consistent for .
3.5 Suboptimality of Block-Local Surrogates
Finally, we show that maximizing accepted length independently within each block can be strictly suboptimal for the global MAL. Since maximizing MAL is equivalent to minimizing the expected number of decoding rounds (see Section 2), which EDR equals exactly (Theorem 1), this theoretically justifies optimizing the EDR objective rather than block-local surrogates.
We consider semi-AR drafters that condition on earlier drafts in the block only through the immediately preceding token, i.e., , referred to as first-order drafters. This class includes existing semi-AR drafters such as DSpark (Cheng et al., 2026) and DFly (Liu et al., 2026).
The following theorem shows that even when the expected accepted length is optimized in every round, the resulting MAL can be a constant factor below the best achievable within the same drafter class. The construction and proof are deferred to Appendix B.5.
Theorem 3. For any block size , there exists a target distribution p such that, for any first-order drafter that maximizes the expected accepted length in every round, there exists another first-order drafter satisfying
The gap arises from the cross-round interaction ignored by block-local objectives. The draft distribution in the current round determines not only how many tokens are accepted in that round, but also where the next round starts. Consequently, a drafter that is locally optimal for the current round can induce a less favorable distribution of future round starts and result in a lower global MAL.
4 Related Work
4.1 Literature Review
Drafter architectures for speculative decoding. The latency per generated token depends on the accepted length per round as well as the costs of drafting and verification. Architectural work therefore seeks to increase accepted length while keeping drafting inexpensive. Medusa (Cai et al., 2024) attaches multiple prediction heads to target-model features, while Hydra (Ankner et al., 2024) introduces sequential dependencies between these heads to improve draft accuracy. EAGLE-3 (Li et al., 2026d) combines features from multiple target layers. To reduce sequential drafting overhead, parallel and diffusion-based drafters generate multiple proposals in a single forward pass. DFlash (Chen et al., 2026a) uses a lightweight block-diffusion drafter conditioned on target-model context features. DiffuSpec (Li et al., 2026a) repurposes a pretrained diffusion language model as a parallel drafter and uses causal-consistency path search to construct proposals for autoregressive verification. To improve within-block consistency without returning to fully autoregressive drafting, DSpark (Cheng et al., 2026) and DFly (Liu et al., 2026) combine parallel backbones with lightweight sequential heads that condition on preceding draft tokens.
A round whose k-th position produces the terminal <EOS> is counted in but not in , since generation stops there.
Training objectives for speculative drafters. Drafter training commonly uses cross-entropy or KL-divergence objectives to align draft predictions with the target distribution (Li et al., 2026d; Chen et al., 2026a). However, distributional matching under these losses does not necessarily maximize token acceptance when drafter capacity is limited. LK losses (Samarin et al., 2026) address this distinction through acceptance-oriented objectives. For multi-token drafting, the first rejection invalidates all subsequent proposals in the block, making the contributions of different positions unequal. DFlash (Chen et al., 2026a) accounts for this asymmetry using fixed exponentially decaying position weights. D-PACE (Wu et al., 2026) replaces this fixed schedule with adaptive weights derived from a differentiable accepted-length surrogate based on draft confidences. The end-to-end (E2E) multi-step TV loss (Li et al., 2026c) moves beyond independent token-level matching by incorporating the multiplicative structure of acceptance across positions within a block. Recent work addresses the mismatch between drafter training and inference by incorporating verification feedback. Draft-OPD (Lei et al., 2026) replays draft proposals from inference-time anchors and applies acceptance-dependent distillation losses. Verification-Aware Training (Gu et al., 2026) uses simulated verification outcomes to supervise an auxiliary head and adapt position weights. Although these methods incorporate inference-time behavior into training, their objectives remain surrogates for MAL.
Diffusion language models. Diffusion language models (DLMs) (Nie et al., 2025; Inception Labs et al., 2025; Ye et al., 2025) offer an alternative to AR generation by iteratively refining sequences with bidirectional context, enabling parallel token generation. Continuous DLMs (Li et al., 2022; Chen et al., 2026b; Li et al., 2026b) extend continuous diffusion models (Ho et al., 2020; Song et al., 2020b,a) and flow matching (Lipman et al., 2022) to token embedding spaces. Starting from Gaussian noise, they generate continuous token representations through learned denoising or flow dynamics, then map these representations to discrete tokens. This framework facilitates adapting established techniques for controlling and accelerating diffusion sampling, including classifier-free guidance (Ho and Salimans, 2022), self-conditioning (Chen et al., 2022), few-step solvers (Lu et al., 2022; Li and Cai, 2024; Jiao et al., 2026), and distillation (Song and Dhariwal, 2024; Yin et al., 2024b). Discrete DLMs (Lou et al., 2023; Sahoo et al., 2024; Shi et al., 2024) operate directly in token space using categorical corruption. Masked DLMs belong to this category and corrupt sequences by replacing tokens with a special mask token. Then it generate text by progressively unmasking multiple positions in parallel. This formulation underlies many parallel and semi-AR drafters. However, conditionally independent sampling within an update can overlook dependencies among simultaneously generated tokens, creating a trade-off between generation quality and sampling efficiency (Li and Cai, 2025; Chen et al., 2025; Dmitriev et al., 2026; Zhao and Cai, 2026; Cai and Li, 2026).
4.2 Comparison of Training Objectives
In this section, we present a unified summary of existing drafter training objectives in the literature, together with our proposed EDR objective.
Let be a rollout sequence sampled from the target distribution, and let be the number of proposed draft tokens in a block. The block is drafted from the committed prefix ; and denote the draft and target distributions at position , respectively. We suppress their dependence on the sampled sequence for brevity.
Up to additive constants and positive scaling factors, the objectives considered here can be written as
This template separates each objective into three components:
- Per-position loss specifies the local training signal at position for a block drafted from anchor . For token-level alignment surrogates, measures the discrepancy between the draft distribution and the target , whereas for acceptance-aware objectives, is the surrogate for the rejection probability at position . All objectives except EDR set , since no draft token is proposed at the bonus position. EDR keeps this term because a round that reaches the bonus position always ends there ( ).
Table 1: Drafter training objectives as instances of the template in (21).
| Objective | Per-position loss | Block position weight | Anchor weight |
|---|---|---|---|
| Token-level surrogates | |||
| CE | |||
| KL | |||
| TV | |||
| LK (Samarin et al., 2026) | |||
| Block-level surrogates | |||
| Exponential decay (Chen et al., 2026a) | CE / KL / TV / LK or a weighted combination | ||
| D-PACE (Wu et al., 2026) | CE / KL / TV / LK or a weighted combination | ||
| E2E-TV (Li et al., 2026c) | |||
| Exact objective | |||
| EDR (ours) | |||
| EDR (TD form) (ours) | |||
-
Block position weight sets how much position counts relative to the other positions in the same block. Later draft tokens are verified only if all earlier draft tokens in the block are accepted, so their contributions depend on acceptance at preceding positions. Non-uniform position weights reflect this asymmetry between positions.
-
Anchor weight sets how much the block drafted from anchor counts relative to the blocks drafted from other anchors. All objectives except EDR weight anchors equally, i.e., .
Table 1 summarizes the three components of each objective. Here, denotes the stop-gradient operator: has the same value as , but it is treated as a constant when taking gradients with respect to the drafter parameters.
We discuss these three groups below.
Token-level surrogates. Token-level surrogates set and align the draft distribution with the target at each position independently. CE and KL both minimize a KL divergence between a reference distribution and : the reference is the one-hot distribution at the sampled target token for CE and the full target distribution for KL. TV uses the TV distance, which equals the rejection probability at position . LK interpolates between KL and TV using an acceptance-dependent coefficient that balances acceptance awareness against ease of optimization. As the acceptance probability increases, decreases, so LK relies mainly on the KL term that is easier to optimize when acceptance is low and moves weight to the TV term as acceptance improves.
Block-level surrogates. Block-level surrogates extend token-level surrogates with nonuniform block position weights , which reflect the asymmetry between positions within a block. Later positions receive smaller weights because they are verified less often—a position is verified only if all earlier draft tokens in its block are accepted.
Exponential decay and D-PACE multiply a token-level loss by a weight under stop-gradient. The weight is a fixed schedule in exponential decay and a confidence-based surrogate of the accepted length in D-PACE. E2E uses at draft positions and without stop-gradient. Therefore, the inner sum in (21) is given by
the negative of a surrogate for the expected accepted length of the block drafted from anchor . In contrast, the block position weight of EDR is the conditional survival probability along the target rollout. It is exact in expectation, whereas the product of terms in E2E is not.
Like token-level surrogates, block-level surrogates ignore cross-round coupling, treating each block separately and assigning the same weight to all anchors.
EDR. For EDR, the three components are the EOS-aware local rejection cost , the within-round survival probability , and the anchor weight . By the recursion in (5a), we have
which is the probability, conditioned on the target rollout, that decoding visits state . Thus, with these choices, the weighted sum inside the expectation in (21), plus the constant 1, equals the per-sequence EDR loss (10). Taking the expectation over target rollouts gives the expected number of decoding rounds.
Among the objectives in Table 1, only EDR has drafter-dependent anchor weights. These weights capture how acceptance decisions change where later rounds start, that is, the cross-round coupling that the surrogates above ignore.
EDR in TD form. The TD form of EDR is a different scalar loss, but it has the same gradient with respect to the drafter parameters as the EDR loss above (see Theorem 2). It applies stop-gradient to both the block position weights and the anchor weights, and it adds the term to the per-position loss. Gradients therefore flow only through and , not through or , so training with the TD form is more efficient. We use this form in training (see Algorithm 1).
5 Experiments
We evaluate whether directly optimizing EDR improves self-speculative decoding over existing block-local training objectives. We consider two SOTA self-speculative drafters, DSpark (Cheng et al., 2026) and DFly (Liu et al., 2026), paired with Qwen3 (Yang et al., 2025) target models of different scales.
5.1 Experimental Setup
Models and sampling. We evaluate two target-drafter pairs: Qwen3-4B with DSpark and Qwen3-8B with DFly. We set block size B = 7 for both drafters. For Qwen3-4B, target trajectories are sampled with temperature 0.7, top-p = 0.8, and top-k = 20, while the DSpark proposal distribution uses temperature 0.7 without top-p or top-k truncation. For Qwen3-8B, both the target and DFly drafter use temperature 1.0 without top-p or top-k truncation. Thinking mode is disable in all settings.
Table 2: One-epoch finetuning results. We report mean accepted length (MAL; higher is better) after one epoch of draft-model finetuning. Target and draft sampling configurations in evaluation are the same as in training. Block size for all drafters. Bold marks the best finetuned result.
| Target | Drafter | Math | Code | Chat | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| GSM8K | MATH | AIME25 | MBPP | HumanEval | LCB | MT-Bench | Alpaca | Arena-Hard | ||
| Qwen3-4B | DSpark | 6.23 | 6.12 | 5.46 | 5.28 | 5.52 | 5.46 | 3.70 | 3.62 | 3.59 |
| E2E | 6.32 | 6.20 | 5.57 | 5.34 | 5.58 | 5.54 | 3.75 | 3.66 | 3.67 | |
| top-p = 0.8top-k = 20 | EDR (Ours) | 6.32 | 6.20 | 5.59 | 5.34 | 5.59 | 5.56 | 3.78 | 3.70 | 3.70 |
| Qwen3-8B | DFly | 6.30 | 5.94 | 5.15 | 5.26 | 5.58 | 5.23 | 3.57 | 3.45 | 3.18 |
| E2E | 6.34 | 5.98 | 5.18 | 5.32 | 5.62 | 5.26 | 3.61 | 3.49 | 3.21 | |
| no top-p/top-k) | EDR (Ours) | 6.35 | 6.00 | 5.22 | 5.32 | 5.63 | 5.29 | 3.65 | 3.52 | 3.25 |
Training objectives. Starting from the corresponding publicly released draft-model checkpoint, we fine-tune only the drafter parameters. We compare our exact EDR objective against the end-to-end TV (E2E) block-local objective (Li et al., 2026c), using the same model architecture, training data, optimizer configuration, and number of update steps for both objectives. For all methods, we use at most 512 training anchors per trajectory. For EDR, we use importance sampling to select training anchors. For details, see Appendix C.2.
Training data. We train on Open-PerfectBlend (Xu et al., 2024). Rather than using reference answers, we generate a fresh trajectory for each prompt from the target model using the same target sampling configuration as evaluation. Each drafter is finetuned for one epoch with batch size 96.
Evaluation. We use the same evaluation prompts as DSpark (Cheng et al., 2026) on nine benchmarks spanning math (Cobbe et al., 2021; Hendrycks et al., 2021; Zhang and Math-AI, 2025), code (Austin et al., 2021; Chen et al., 2021; Jain et al., 2025), and chat (Zheng et al., 2023; Taori et al., 2023; Li et al., 2024a). We generate at least 1,500 target trajectories per benchmark (multiple trajectories for each prompt) under the same sampling configurations as in training. We compute MAL using the offline estimator introduced in Section 3.4. All methods for the same target model and sampling configurations are evaluated on exactly the same target trajectories. This provides paired comparisons across training objectives and removes additional variance from independently sampled evaluation outputs.
All training and evaluation are performed on a single NVIDIA H200 GPU or H100 GPU. For more experimental details, see Appendix D.
5.2 Experimental Results
Table 2 shows that EDR consistently improves speculative decoding across both DSpark and DFly without modifying the drafter architecture. Compared with E2E finetuning, EDR achieves higher or equal MAL across all benchmarks, with larger gains on AIME25, LiveCodeBench, and the chat benchmarks. These results suggest that directly optimizing the global expected number of decoding rounds provides additional gains beyond block-local end-to-end surrogates, and that the improvement transfers across different semi-AR drafter architectures and target-model scales.
6 Conclusion
We introduced Expected Decoding Rounds (EDR), an exact global training objective for parallel and semi-AR speculative drafters. By formulating speculative decoding as a Markov reward process conditioned on target-model outputs, we derived a tractable gradient for directly minimizing the expected number of verification rounds, together with an exact offline evaluator for paired draft-model comparison. Empirically, EDR consistently improves two strong drafters, DSpark and DFly, across nine benchmarks without modifying their architectures or inference procedures, and outperforms the E2E training objective in overall mean accepted length. These results suggest that explicitly accounting for cross-round dependencies provides a principled and practical direction for training more efficient parallel speculative draft models.
We conclude with several directions for future work. First, our current framework focuses on a fixed draft block size. However, under high-concurrency serving, verifying long draft blocks can become inefficient, especially when many later proposals are likely to be rejected. Adaptive block sizing can reduce unnecessary verification by shortening the draft block when confidence is low, thereby further reducing inference latency (Hu et al., 2026; Huang et al., 2024). An important direction is to extend our framework to adaptive block sizes and to study whether the optimal block size can be selected dynamically for each decoding round. Second, EDR requires computing occupancy weights and value functions V for multiple anchor positions. This is more computationally expensive than block-local objectives. It would be interesting to explore more efficient ways to utilize the occupancy and value computations. Finally, as shown in Table 2, MAL varies substantially across datasets, suggesting that some target distributions are intrinsically more difficult to draft than others. Our current work focuses on optimizing the drafter given a target distribution, but does not provide a complete theoretical characterization of this difficulty. A promising direction is to identify properties of the target distribution that determine the best achievable speculative decoding efficiency.
Acknowledgements
C. Cai is supported by the NSF CAREER Award CCF-2541600 and the NSF grant DMS-2515333.
References
Ankner, Z., Parthasarathy, R., Nrusimha, A., Rinard, C., Ragan-Kelley, J., and Brandon, W. (2024). Hydra: Sequentially-dependent draft heads for medusa decoding. arXiv preprint arXiv:2402.05109.
Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. (2021). Program synthesis with large language models. arXiv preprint arXiv:2108.07732.
Bellman, R. (1966). Dynamic programming. science, 153(3731):34–37.
Cai, C. and Li, G. (2026). Confidence-based decoding is provably efficient for diffusion language models. arXiv preprint arXiv:2603.22248.
Cai, T., Li, Y., Geng, Z., Peng, H., Lee, J. D., Chen, D., and Dao, T. (2024). Medusa: Simple llm inference acceleration framework with multiple decoding heads. arXiv preprint arXiv:2401.10774.
Chen, C., Borgeaud, S., Irving, G., Lespiau, J.-B., Sifre, L., and Jumper, J. (2023). Accelerating large language model decoding with speculative sampling. arXiv preprint arXiv:2302.01318.
Chen, J., Liang, Y., and Liu, Z. (2026a). Dflash: Block diffusion for flash speculative decoding. arXiv preprint arXiv:2602.06036.
Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. (2021). Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374.
Chen, S., Cong, K., and Li, J. (2025). Optimal inference schedules for masked diffusion models. arXiv preprint arXiv:2511.04647.
Chen, T., Zhang, R., and Hinton, G. (2022). Analog bits: Generating discrete data using diffusion models with self-conditioning. arXiv preprint arXiv:2208.04202.
Chen, Y., Liang, C., Sui, H., Guo, R., Cheng, C., You, J., and Liu, G. (2026b). Langflow: Continuous diffusion rivals discrete in language modeling. arXiv preprint arXiv:2604.11748.
Cheng, X., Yu, X., Shao, C., Li, J., Xiong, Y., Qian, Y., Zhu, J., Ma, S., Zhang, X., Ye, J., et al. (2026). Dspark: Confidence-scheduled speculative decoding with semi-autoregressive generation. arXiv preprint arXiv:2607.05147.
Cobbe, K., Kosaraju, V., Bavarian, M., Chen, M., Jun, H., Kaiser, L., Plappert, M., Tworek, J., Hilton, J., Nakano, R., et al. (2021). Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168.
Dmitriev, D., Huang, Z., and Wei, Y. (2026). Efficient sampling with discrete diffusion models: Sharp and adaptive guarantees. arXiv preprint arXiv:2602.15008.
Gu, G., Heo, B., Jun, H., Kang, Y., Lee, S., Yun, S., and Han, D. (2026). Verification-aware training for speculative decoding. arXiv preprint arXiv:2608.30135.
Hendrycks, D., Burns, C., Kadavath, S., Arora, A., Basart, S., Tang, E., Song, D., and Steinhardt, J. (2021). Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874.
Ho, J., Jain, A., and Abbeel, P. (2020). Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840–6851.
Ho, J. and Salimans, T. (2022). Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598.
Howard, R. (1971). Dynamic Probabilistic Systems: Semi-Markov and decision processes. Decision and Control Series. Wiley.
Hu, X., Shen, Y., Zhang, B., Zhang, H., Dai, J., Ge, S., Chen, L., Li, Y., and Wan, M. (2026). Echo: Elastic speculative decoding with sparse gating for high-concurrency scenarios. arXiv preprint arXiv:2604.09603.
Huang, K., Guo, X., and Wang, M. (2024). Specdec++: Boosting speculative decoding via adaptive candidate lengths. arXiv preprint arXiv:2405.19715.
Inception Labs, Khanna, S., Kharbanda, S., Li, S., Varma, H., Wang, E., Birnbaum, S., Luo, Z., Miraoui, Y., Palrecha, A., Ermon, S., Grover, A., and Kuleshov, V. (2025). Mercury: Ultra-fast language models based on diffusion. arXiv preprint arXiv:2506.17298.
Jain, N., Gu, A., Li, W.-D., Yan, F., Zhang, T., Wang, S., Solar-Lezama, A., Sen, K., and Stoica, I. (2025). Livecodebench: Holistic and contamination free evaluation of large language models for code. In International Conference on Learning Representations, volume 2025, pages 58791–58831.
Jiao, Y., Li, N., Cai, C., and Li, G. (2026). Are first-order diffusion samplers really slower? a fast forward-value approach. In International Conference on Machine Learning. PMLR.
Lei, H., Li, Y., Zhang, H., Zhang, S., Cheng, Q., Qu, X., Cui, G., Zhou, B., Ding, N., Luo, Y., et al. (2026). Draft-opd: On-policy distillation for speculative draft models. arXiv preprint arXiv:2605.29343.
Leviathan, Y., Kalman, M., and Matias, Y. (2023). Fast inference from transformers via speculative decoding. In International conference on machine learning, pages 19274–19286. PMLR.
Li, G. and Cai, C. (2024). Provable acceleration for diffusion models under minimal assumptions. arXiv preprint arXiv:2410.23285.
Li, G. and Cai, C. (2025). Breaking AR's sampling bottleneck: Provable acceleration via diffusion language models. In Advances in Neural Information Processing Systems, volume 38, pages 11700–11725.
Li, G., Fu, Z., Fang, M., Zhao, Q., Tang, M., Yuan, C., and Wang, J. (2026a). Diffuspec: Unlocking diffusion language models for speculative decoding. In Findings of the Association for Computational Linguistics: ACL 2026, pages 20896–20910.
Li, N., Jiao, Y., Cai, C., and Li, G. (2026b). Convergeflow: Language flow with provable convergence to token embeddings. arXiv preprint arXiv:2608.23551.
Li, T., Chiang, W.-L., Frick, E., Dunlap, L., Wu, T., Zhu, B., Gonzalez, J. E., and Stoica, I. (2024a). From crowdsourced data to high-quality benchmarks: Arena-hard and benchbuilder pipeline. arXiv preprint arXiv:2406.11939.
Li, X., Thickstun, J., Gulrajani, I., Liang, P. S., and Hashimoto, T. B. (2022). Diffusion-lm improves controllable text generation. In Advances in Neural Information Processing Systems, volume 35, pages 4328–4343.
Li, Y., Jiang, H., Xu, Y., Yang, J., Zhang, Y., Cao, Y., Shen, Y., Zhou, F., Men, R., Zhang, J., et al. (2026c). Breaking entropy bounds: Accelerating rl training via mtp with rejection sampling. arXiv preprint arXiv:2606.12370.
Li, Y., Wei, F., Zhang, C., and Zhang, H. (2024b). Eagle: Speculative sampling requires rethinking feature uncertainty. arXiv preprint arXiv:2401.15077.
Li, Y., Wei, F., Zhang, C., and Zhang, H. (2026d). Eagle-3: Scaling up inference acceleration of large language models via training-time test. Advances in Neural Information Processing Systems, 38:136737–136756.
Lipman, Y., Chen, R. T., Ben-Hamu, H., Nickel, M., and Le, M. (2022). Flow matching for generative modeling. arXiv preprint arXiv:2210.02747.
Liu, H., Cen, R., Shi, J., Qin, G., Zhang, J., Liu, T., Fan, R., Zhao, G., Xie, R., Zhang, K., et al. (2026). Angelspec: Towards real-world high performance inference with speculative decoding. arXiv preprint arXiv:2607.25852.
Lou, A., Meng, C., and Ermon, S. (2023). Discrete diffusion modeling by estimating the ratios of the data distribution. arXiv preprint arXiv:2310.16834.
Lu, C., Zhou, Y., Bao, F., Chen, J., Li, C., and Zhu, J. (2022). Dpm-solver: A fast ode solver for diffusion probabilistic model sampling in around 10 steps. Advances in Neural Information Processing Systems, 35:5775–5787.
Nie, S., Zhu, F., You, Z., Zhang, X., Ou, J., Hu, J., Zhou, J., Lin, Y., Wen, J.-R., and Li, C. (2025). Large language diffusion models. arXiv preprint arXiv:2502.09992.
Sahoo, S., Arriola, M., Schiff, Y., Gokaslan, A., Marroquin, E., Chiu, J., Rush, A., and Kuleshov, V. (2024). Simple and effective masked diffusion language models. Advances in Neural Information Processing Systems, 37:130136–130184.
Samarin, A., Krutikov, S., Shevtsov, A., Skvortsov, S., Fisin, F., and Golubev, A. (2026). Lk losses: Direct acceptance rate optimization for speculative decoding. arXiv preprint arXiv:2602.23881.
Shi, J., Han, K., Wang, Z., Doucet, A., and Titsias, M. (2024). Simplified and generalized masked diffusion for discrete data. Advances in neural information processing systems, 37:103131–103167.
Song, J., Meng, C., and Ermon, S. (2020a). Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502.
Song, Y. and Dhariwal, P. (2024). Improved techniques for training consistency models. In International Conference on Learning Representations, volume 2024, pages 15078–15097.
Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., and Poole, B. (2020b). Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456.
Sutton, R. S. (1988). Learning to predict by the methods of temporal differences. Machine learning, 3(1):9–44.
Taori, R., Gulrajani, I., Zhang, T., Dubois, Y., Li, X., Guestrin, C., Liang, P., and Hashimoto, T. B. (2023). Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca.
Wu, T., Yao, Y., Qi, Z., Zheng, H., Wang, Z., Ma, H., Liao, L., Lakkaraju, H., Li, J., and Du, Y. (2026). D-pace: Dynamic position-aware cross-entropy for parallel speculative drafting. arXiv preprint arXiv:2605.18810.
Xu, T., Helenowski, E., Sankararaman, K. A., Jin, D., Peng, K., Han, E., Nie, S., Zhu, C., Zhang, H., Zhou, W., et al. (2024). The perfect blend: Redefining rlhf with mixture of judges. arXiv preprint arXiv:2409.20370.
Yang, A., Li, A., Yang, B., Zhang, B., Hui, B., Zheng, B., Yu, B., Gao, C., Huang, C., Lv, C., et al. (2025). Qwen3 technical report. arXiv preprint arXiv:2505.09388.
Ye, J., Xie, Z., Zheng, L., Gao, J., Wu, Z., Jiang, X., Li, Z., and Kong, L. (2025). Dream 7b: Diffusion large language models. arXiv preprint arXiv:2508.15487.
Yin, M., Chen, M., Huang, K., and Wang, M. (2024a). A theoretical perspective for speculative decoding algorithm. Advances in Neural Information Processing Systems, 37:128082–128117.
Yin, T., Gharbi, M., Zhang, R., Shechtman, E., Durand, F., Freeman, W. T., and Park, T. (2024b). One-step diffusion with distribution matching distillation. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 6613–6623. IEEE.
Zhang, Y. and Math-AI, T. (2025). American invitational mathematics examination (aime) 2025.
Zhao, Y. and Cai, C. (2026). Adaptation to intrinsic dependence in diffusion language models. arXiv preprint arXiv:2602.20126.
Zheng, L., Chiang, W.-L., Sheng, Y., Zhuang, S., Wu, Z., Zhuang, Y., Lin, Z., Li, Z., Li, D., Xing, E., et al. (2023). Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in neural information processing systems, 36:46595–46623.
A Speculative Decoding Algorithm
Algorithm 2 summarizes the speculative decoding procedure we consider.
B Proofs
B.1 Markov Process Formulation in Section 3.1
In this section, we give a detailed derivation of the rejection-sampling transition dynamics conditioned on a fixed target-supported output sequence . Specifically, we define the Markov chain states, derive the conditional transition probabilities, and prove that the occupancy depends on only through . Throughout, all probabilities refer to speculative decoding with a fixed drafter .
States and decoding histories. For each position t reached by decoding, let denote the round-start index of the round that produces . Thus, immediately before processing position t, the state is
If , then the current round started from the committed prefix , and all preceding drafts in this round have been accepted. Consequently, their values equal . For , position is processed by draft verification; for , it is processed by drawing a target bonus token. States with are unreachable.
Let
denote the history of committed tokens and round-start indices before processing position t. We first analyze the next output token conditional on this history, without conditioning on the complete output sequence.
Algorithm 2 Speculative decoding with a semi-autoregressive drafter
Require: Block size B, target distributions , draft distributions
1: , ▷ n: number of committed ordinary tokens
2: while true do
3: Draw a draft block
4: Evaluate for in one target-model pass
5:
6: rejected false
7: for do
8:
9:
10: Draw
11: if then
12:
13: else
14: Draw
15: rejected true
16: end if
17: if then
18: return and
19: end if
20: if rejected then
21:
22: break
23: end if
24: end for
25: if not rejected then
26: Draw ▷ bonus token
27: if then
28: return and
29: else
30:
31:
32: end if
33: end if
34: end while
The local rejection-sampling law. Consider a history with and at a draft position . For brevity, write
Let and denote the acceptance and rejection events at this position. The verification rule gives
The first identity follows by multiplying the proposal probability by the verifier's acceptance probability. For the second identity, rejection has total probability , and the correction token is drawn from the residual distribution . When , rejection has probability zero and no residual draw is needed.
Adding the two identities yields
At a bonus-token position, the same identity holds because the token is drawn directly from the target distribution. Therefore, conditional on any decoding history, the next committed token has the target conditional distribution, regardless of the current round-start index.
Transition kernels conditioning on the complete output. Equation (22) implies that, on any history with ,
To see this rigorously, use backward induction along the fixed sequence . At , the required remaining output is just , so the identity follows directly from (22). Suppose it holds at for every possible decoding history. After committing , every possible resulting history has the same remaining-output probability . Multiplying this probability by proves the identity at .
In particular, after committing the same non-EOS token , the future suffix has the same probability whether the token was accepted or produced by residual sampling. Thus, for at a draft position, Bayes' rule gives
All target-probability factors being cancelled are positive because x is target-supported. Similarly,
Notice that the ratio here is , rather than the verifier's ratio : we are conditioning on the committed output token, not on the proposed token.
If the token is accepted, the current round continues. If it is rejected, the next round starts after position t. At a bonus-token position , the next round also starts after position t, provided that the bonus token is not EOS. Accordingly, setting
incorporates the bonus-token case into the same transition rule. At such a position, represents a forced round transition, not an actual draft rejection.
It follows that, under , the transitions for are
With x fixed, these probabilities depend on the past history only through the current state . This establishes the Markov property.
The conditional chain has states and is stopped at position . All states are terminal for the round-count process: the final EOS is produced in the current round and does not start another round, regardless of whether it is accepted, sampled as a correction, or sampled as a bonus token.
Occupancy depends only on the committed prefix. Since the position index increases by one at every transition, state is visited exactly when . Hence,
By (23), conditional on the committed prefix , the probability of the remaining output is the same for every possible round-start history. Therefore,
This proves that the occupancy depends only on , even though it was originally defined by conditioning on the complete output sequence.
Starting from , the conditional Markov transitions give the forward recursions
The first recursion accounts for continuing the current round. The second sums over all states from which a new round can start after position t. These are precisely the occupancy recursions used in Section 3.1.
B.2 Proofs of Proposition 1 and Proposition 2
We first prove Proposition 2, and then obtain Proposition 1 as its special case k = 1.
Proof of Proposition 2. Fix . The random variable counts the decoding rounds that commit at least tokens. Conditioned on a fixed output sequence , consider the round that starts after position , i.e., from the committed prefix . By the transition rule (4), a rejection transition always leads to a diagonal state, so a non-diagonal state with can only be reached from by an acceptance. Hence state is visited exactly when this round has started and its drafts at positions have all been accepted. In that case, position is processed in the same round and commits one more token, which is an accepted draft, a correction token, a bonus token, or the terminal <EOS>. Conversely, if the round commits at least tokens, its first committed tokens must be accepted drafts: a correction token or <EOS> ends the round, and a bonus token can only be the -th committed token. Therefore, the round starting after position commits at least tokens exactly when state is visited. It follows that
Conditioned on , the event that state is visited has probability . Therefore, by linearity of expectation,
Proof of Proposition 1. Every round commits at least one token, so . Equivalently, a round starts after position exactly when state is visited. Taking in Proposition 2 gives
Separating the term , using , and substituting the occupancy recursion (5b) for gives
B.3 Proof of Theorem 1
To handle the randomness of the sequence length , we rewrite Proposition 1 and take the expectation over ,
Before is revealed, is determined by , and is exactly the event . Hence, conditioning on and using the definition of ,
(25)
Taking expectations and summing over n and t proves (9).
B.4 Proof of Theorem 2
We first prove (13), which relates the initial-state value to the per-sequence EDR loss.
Now we prove Theorem 2. Differentiating the Bellman equation (12) at one state gives
where we used . Unrolling the last two terms from the initial state weights each local TD gradient by the probability of visiting that state, namely . Apply (26) recursively from (0,1). Every time a state is reached, its local term is accumulated once, while the two recursive terms propagate with transition probabilities and . The total coefficient on the local term at is therefore exactly its state occupancy . Using (13) yields (14). Rigorously,
B.5 Proof of Theorem 3
Let and let the vocabulary be . We independently generate subsequences , where
We refer to these as type-0 and type-1 subsequences, respectively. Let the target distribution be , so that . The integer will be chosen at the end of the proof.
We consider first-order drafters of the form
The block-local optimum. Consider a round that starts exactly at the beginning of a subsequence, following a committed prefix . The first draft positions can match the target distribution exactly:
Here and below, these equalities are understood on target-supported within-block prefixes.
At the final draft position , the target repeats the first bit of the subsequence. Since , the immediately preceding token is a for both types. A first-order drafter must therefore use the same distribution at this position for both types. To maximize the expected accepted length, should maximize probability of accepting the last token in the round, i.e.,
If 0a, all draft tokens are accepted, and the target bonus token commits the final .
If 1, the proposal is rejected at the final draft position, and residual sampling commits the final 1. In either case, the round commits exactly the entire subsequence, and the next round starts at the beginning of . After the subsequences have been generated, one additional round generates . Therefore, every block-local optimal drafter satisfies
A continuation-aware drafter. We next construct another first-order drafter that intentionally sacrifices accepted length in some rounds to obtain more favorable future round starts.
Whenever a round starts at the beginning of a subsequence, let match the target distribution in the first positions:
but choose
If 0a, the final proposal is rejected. The round commits the corrected 0 and advances by tokens, leaving the final for the next round. If 1, all draft tokens are accepted. The bonus token then commits the first token of the next subsequence, or if .
Whenever a round starts inside a subsequence, let match the target conditionals at every draft position. This is possible within the first-order drafter class: the bit defining the current subsequence is already contained in the committed prefix. Any fresh bit from the next subsequence appears at draft position , and its repeated occurrence is at position , outside the draft block. Before that repeated occurrence, the intervening tokens are all a. Thus no draft position needs access to an earlier within-block bit beyond the immediately preceding token. Every such round therefore advances by tokens, unless generation terminates earlier at <EOS>.
To count the decoding rounds, extend to an infinite independent sequence for this calculation. Group consecutive subsequences between successive rounds that start at the beginning of a subsequence.
If a group starts with a type-0 subsequence, its first round leaves the final a uncommitted. Each subsequent round either leaves the final a of another type-0 subsequence or commits an entire type-1 subsequence and returns to a subsequence boundary. The group therefore ends at the first type-1 subsequence after its initial type-0 subsequence. Its expected number of subsequences is , and it uses exactly one round per subsequence.
If a group starts with a type-1 subsequence, every round advances by tokens until a subsequence boundary is reached again. For any initial segment of this group, its total length is times its number of subsequences, minus its number of type-1 subsequences. Consequently, the first return to a subsequence boundary occurs upon completing the -st type-1 subsequence, counting the initial one. The expected number of subsequences in this group is . If the group contains subsequences, its total length is , so it uses exactly rounds and saves one round.
Let denote the number of subsequences in group j. The groups are independent and identically distributed, with
Let
and let be the number of these groups that start with a type-1 subsequence. Since depends only on the preceding groups and , summing expectations gives
All groups except possibly the last are fully generated before termination, and each completed type-1 group saves one round. For the last group, suppose that of its subsequences remain before <EOS>. These subsequences contain at most tokens, and only the first round of the group can lose one token to rejection. Thus generating these subsequences together with <EOS> requires at most
rounds. At most one of the H type-1 groups is the last group, so
Taking expectations yields
Finally, choose any integer . Since both drafters preserve the same target distribution,
This proves the theorem.
C Additional Details for Expected Decoding Rounds
C.1 Draft EOS Probability Does Not Reduce EDR
For the EDR objective, a correctly drafted terminal <EOS> does not save a target-model verification round. Conditional on reaching the terminal position, accepting a drafted <EOS> terminates in the current verification pass. If the draft instead misses <EOS>, the correction branch can generate <EOS> in that same pass and terminates before another round starts. The same holds when the terminal token is produced as the target bonus token after block exhaustion. Accordingly, the EDR sum runs only over ordinary-token positions .
This is also visible in the dense local cost . Its numerator is
which excludes <EOS>. Thus matching target EOS mass is not directly rewarded by EDR.
C.2 Fixed-Size Anchor Sampling
In this section, we explain how to use importance sampling to select a fixed number of anchors in EDR training. We apply anchor sampling separately to each target rollout in Algorithm 1. For a rollout , define
An anchor outside contributes zero to (14), since its occupancy is zero for every .
Let be the maximum number of training anchors per rollout, set to 512 in our experiments. If , select and set for every . Otherwise, choose such that
and set
We draw a set of exactly anchors by random-start systematic sampling, with
For rollout , denote the sampled anchor set by and write . Using the same notation as Algorithm 1, replace its loss by
The occupancies and value functions are still computed by the full recursions in Algorithm 1, without gradients; sampling restricts only which anchor contributions are differentiated. The sampled anchor sets and inclusion probabilities are also held fixed during differentiation.
Conditioned on the target rollouts, the inclusion probabilities cancel the inverse-probability weights. Hence,
where the last equality follows from (14). Taking the expectation over the target rollouts and applying (15) gives
Thus anchor sampling preserves preserves the unbiasedness of the stochastic gradient.
D Additional Details for Experiments
For all training settings and methods, we use the hyperparameters summarized in Table 3.
Table 3: Training hyperparameters used in all experiments.
| Hyperparameter | Value |
|---|---|
| Learning rate | |
| Optimizer | AdamW |
| AdamW | |
| AdamW | |
| Learning-rate schedule | 4% linear warmup of the first epoch, then constant |
| Gradient clipping | Global norm |
| Global batch size |