CURE: Local Uncertainty Repair for Block-Parallel Speculative Decoding
Abstract
Speculative decoding mitigates the latency of sequential generation in autoregressive Large Language Models (LLMs) by interleaving draft generation with target verification. However, existing parallel drafting backends often suffer from rapid accuracy degradation over long horizons, leading to high rejection rates during verification and suboptimal wall-clock speedups. We observe that drafting errors are not uniformly distributed but typically stem from localized high-uncertainty tokens that destabilize downstream generation trajectories. Motivated by this token error pattern, we propose CURE, a budget-aware dynamic repair tree designed to repair errors at uncertainty focal points without incurring prohibitive tree-verification overheads. Specifically, our method uses predictive confidence margins to dynamically locate candidate error tokens within a block-parallel draft, expands bounded repair paths only at these fragile nodes, and employs a novel repair resynchronization mechanism to realign draft states post-verification. Evaluations on code-generation benchmarks (HumanEval, MBPP, and LiveCodeBench-lite) and mathematical reasoning benchmark (GSM8K) demonstrate that CURE increases the average accepted length by 4.2–7.5% over parallel baselines without repair, translating to an end-to-end speedup of 2.66–3.49× over target-only decoding. Furthermore, we provide a plug-and-play repair module compatible with standard parallel drafting frameworks. We also characterize the trade-off between draft compute and verification efficiency.
* These authors contributed equally. † Corresponding authors.
Introduction
Autoregressive inference in Large Language Models (LLMs) suffers from high latency due to sequential, token-by-token generation. Speculative decoding mitigates this memory-bandwidth bottleneck by leveraging a lightweight draft model to generate candidate tokens, which are subsequently verified in parallel by a target LLM (Leviathan, Kalman, and Matias, 2023; Chen et al., 2023; Liu, Zhang, and Song, 2024). Recent advancements expand this paradigm either by constructing candidate trees or by learning specialized draft representations (Cai et al., 2024; Li et al., 2024b). Among these, block-parallel drafting has emerged as an appealing paradigm, generating multi-token blocks in a single forward pass without sequential drafting overhead.
Despite its computational efficiency, block-parallel drafting exhibits an inherent structural fragility: the error propagation cascade. Because block-parallel models generate tokens independently or in coarse blocks, a single localized error at a low-confidence position causes conventional prefix verification to reject the entire subsequent draft sequence, even if the trailing tokens are semantically correct. While unconstrained tree-based speculative decoding can recover alternative trajectories, applying dense tree expansion uniformly across all blocks incurs severe target-verification overhead and memory footprint, wasting compute on predictable spans that require no repair.
In this work, we argue that candidate tree expansion should be frugal and spatially localized. Taking code generation as a representative domain, source code exhibits strong global structural predictability (Hindle et al., 2012), yet local variations (such as identifiers, API calls, and syntax operators) introduce localized uncertainty (Casalnuovo et al., 2020). We observe that draft errors are not uniformly distributed; rather, they originate from a few Uncertainty Focal Points (UFPs). Identifying and repairing these specific focal points can prevent downstream cascade rejections without triggering expensive full-tree construction.
To operationalize this intuition, we propose CURE (Local Uncertainty Repair), a budget-aware dynamic repair tree built atop block-parallel draft backends. Prior to candidate verification, our framework evaluates the top-1/top-2 log-probability margins of the block-parallel draft to pinpoint local UFPs. It then dynamically allocates a bounded verification budget, spawning alternative candidate branches strictly at these fragile positions. To ensure seamless execution, we introduce a cache-resynchronization mechanism that realigns the draft model’s internal state with the target-verified path upon token acceptance, eliminating the need for draft model retraining.
We conduct extensive evaluations on primary code generation benchmarks (HumanEval, MBPP, LiveCodeBench-lite) and out-of-domain reasoning (GSM8K). Experimental results show that CURE consistently increases the accepted tokens per step by 4.2% to 7.5% over single-path parallel backends, achieving a to end-to-end speedup over target-only autoregressive decoding. Crucially, our empirical analysis reveals a fine-grained acceptance–compute Pareto trade-off: while local repair expands the accepted context length, the additional tree-verification compute presents a tunable knob between arithmetic intensity and memory-bound latency, offering valuable insights for hardware-aware speculative decoding design.
Our main contributions are summarized as follows:
- •
Localized Repair Formulation: We formulate draft candidate expansion as a constrained budget-allocation problem, introducing a confidence-margin gating mechanism that confines alternative branching strictly to localized Uncertainty Focal Points (UFPs).
- •
Training-Free & Cache-Consistent Architecture: We design a plug-and-play dynamic repair tree with a novel cache-resynchronization procedure. It enables training-free integration with block-parallel backends while maintaining KV-cache consistency across draft-target state transitions.
- •
Pareto Analysis of Acceptance vs. Cost: We analyze the acceptance-latency trade-off across multiple code and reasoning benchmarks, establishing quantitative guidelines on when local branching yields net wall-clock acceleration versus when it incurs verification saturation.
Related Work
Speculative decoding separates generation into proposal and verification. Draft-then-verify generation was first developed for sequence-to-sequence decoding and later formalized as lossless sampling from an autoregressive target model (Xia et al., 2023; Leviathan, Kalman, and Matias, 2023; Chen et al., 2023). A smaller model proposes several tokens, and one target-model forward pass accepts a prefix and corrects the first rejection. Although this procedure preserves the target distribution, its wall-clock speedup depends jointly on draft latency, verification latency, proposal length, and accepted tokens (Liu, Zhang, and Song, 2024; Yan, Agarwal, and Venkataraman, 2024).
Draft-model research therefore balances proposal cost against target agreement. DistillSpec uses on-policy knowledge distillation and task-dependent divergence objectives, Online Speculative Decoding adapts drafters to observed queries, and HASS aligns representations and token-level objectives (Zhou et al., 2024; Liu et al., 2024; Zhang et al., 2025). Other methods alter the draft architecture. Medusa adds multiple prediction heads to the target, Hydra conditions later heads on earlier draft tokens, and EAGLE performs autoregression in the target feature space (Cai et al., 2024; Ankner et al., 2024; Li et al., 2024b). EAGLE-3 replaces feature prediction with direct token prediction and fuses multiple target layers (Li et al., 2025). Self-speculative methods skip target layers or exit early, while REST retrieves candidate continuations from prior text (Zhang et al., 2024a; Elhoushi et al., 2024; He et al., 2024). These approaches improve acceptance or reduce draft cost through training, adaptation, architectural changes, or retrieval. In contrast, CURE leaves the pretrained block-parallel drafter fixed and alters how uncertain draft positions are repaired at inference time without requiring architectural changes or retraining.
Parallel and non-autoregressive drafting instead reduces the number of drafter calls. Blockwise parallel decoding predicts several future positions simultaneously and accepts a verified prefix (Stern, Shazeer, and Uszkoreit, 2018). Lookahead decoding constructs and verifies Jacobi-style trajectories without a separate draft model, and Lookahead Reasoning extends step-level speculation to long reasoning traces (Fu et al., 2024; Fu et al., 2025). Recent learned drafters replace token-by-token proposals with block-level computation. DFlash uses block diffusion conditioned on target features, whereas DART predicts several masked positions in parallel and prunes the resulting tree with an n-gram constraint (Chen, Liang, and Liu, 2026; Liu et al., 2026). Domino adds causal correction to a parallel backbone so that each position receives prefix-dependent information without returning to full autoregressive drafting (Huang et al., 2026). SpecBlock takes a hybrid approach, generating blocks of dependent positions and constructing a dynamic tree through repeated block expansion (Shi et al., 2026). These methods expose a fundamental trade-off: independent parallel predictions are computationally cheap but lose path consistency, whereas stronger within-path dependence improves proposal quality at added draft cost. CURE operates after a parallel block is generated, preserving the low-cost path and spending additional verification budget strictly where the block reports local ambiguity.
Adaptive candidate construction provides another way to allocate compute. Fixed proposal lengths and static tree shapes spend identical compute on easy and difficult contexts. SpecDec++ learns when to stop autoregressive drafting from conditional acceptance probabilities, while AdaEAGLE predicts a context-dependent draft length (Huang, Guo, and Wang, 2024; Zhang et al., 2024b). Multi-candidate methods instead alter the verification structure. SpecInfer merges proposals into a token tree, GraphSD shares repeated subsequences in a graph, and SpecTr formulates verification through optimal transport (Miao et al., 2024; Gong et al., 2024; Sun et al., 2023). SEQUOIA optimizes tree construction under serving constraints, while SLiM removes low-utility hypotheses before verification (Chen et al., 2024; Lin et al., 2024). Other adaptive trees use draft confidence to decide structure growth: DySpec greedily expands nodes according to draft probabilities, OPT-Tree adapts its topology to the draft distribution, and EAGLE-2 constructs dynamic trees from confidence estimates (Xiong et al., 2024; Wang et al., 2025; Li et al., 2024a). While these methods improve candidate coverage, larger structures increase candidate-construction, attention, and target-verification costs. CURE operates at a distinct boundary: it preserves the block-parallel prediction as branch 0, allocates alternatives exclusively to locally uncertain positions, and replays a winning repair path to maintain draft-cache continuity. It is therefore a selective post-draft repair mechanism under a bounded verification budget rather than a new draft architecture or a general tree-search procedure.
Code generation provides a useful workload for evaluating local repair. Source code contains repeated lexical and syntactic patterns, where local expression choices are often highly predictable (Hindle et al., 2012; Casalnuovo et al., 2020). This regularity can yield long speculative matches, yet identifiers, constants, APIs, and formatting create localized ambiguity that may prematurely terminate an otherwise valid prefix. Work on Verilog generation further shows that syntax-aware token boundaries materially impact speculative-decoding performance (Xu et al., 2025). However, token agreement does not equal functional correctness: two programs may differ textually while passing the same tests, and an identical prefix does not guarantee a correct completion. We therefore evaluate whether local repair recovers accepted tokens and improves latency while reporting execution correctness independently from decoding metrics.
Methodology
Problem Formulation
Let denote the generated context sequence at decoding step . A block-parallel draft model generates a length- candidate sequence alongside its corresponding logit distributions in a single forward pass. A target autoregressive model subsequently verifies candidate trajectories and accepts a prefix. In standard single-path speculative decoding, candidate generation yields a single path . When an error occurs at position , standard prefix verification rejects all trailing tokens (), leading to severe truncation of the accepted length.
To recover valid suffixes beyond early rejection points without full autoregressive drafting, we formulate local repair as a constrained candidate-tree optimization problem. Let represent a tree of candidate execution paths rooted at , where denotes the default block-parallel path and denote candidate repair branches spawned at identified error points. Let be the accepted token length along path , and let denote the total token budget (i.e., tree node count) presented to the target verifier. The optimal candidate trajectory maximizes the accepted sequence length under a strict verification compute budget :
| (1) |
From an efficiency perspective, the effective token generation rate scales with , where is the constant draft overhead and is the memory/compute cost of target tree verification. Therefore, candidate tree expansion yields a positive wall-clock trade-off if and only if the gain in accepted tokens outpaces the increased target verification complexity .
Method Overview
To solve the constrained candidate-tree optimization problem under budget , CURE introduces an end-to-end, inference-only pipeline that operates directly atop any pretrained block-parallel backend without model retraining. As illustrated in Figure 1, each decoding iteration of CURE proceeds through three integrated phases:
- 1.
Uncertainty Focal Point (UFP) Detection: The draft model generates a single-pass block proposal . CURE inspects the per-position top-1/top-2 logit margins to dynamically locate fragile positions (UFPs) where draft confidence drops precipitously.
- 2.
Budget-Aware Dynamic Tree Construction: Instead of uniform or unconstrained tree expansion, CURE dynamically calculates candidate branch allocations strictly at identified UFPs. It attaches alternative candidate tokens to , constructing a sparse repair tree that satisfies .
- 3.
Single-Pass Verification and Cache Resynchronization: The target model verifies all branches in concurrently using Tree Attention. If a repair branch yields a longer accepted prefix, CURE accepts the repaired path and resynchronizes the draft model’s internal KV-cache to realign subsequent drafting states.
Local Uncertainty Gating
For each position within a generated draft block, let and denote the top-1 and top-2 unnormalized log-probabilities emitted by the draft model , respectively. We define the predictive confidence margin as:
| (2) |
A smaller predictive margin indicates that the draft model exhibits lower confidence in distinguishing the leading candidate tokens. Positions with are identified as Uncertainty Focal Points (UFPs). We select positions in ascending order of to prioritize candidate expansion at the most fragile nodes while capping total tree size to remain within the verifier budget .
In our baseline setup, each selected position expands at most candidate branches, with a maximum tree depth of 15, a target verification beam width of 5, and a repair margin threshold . To optimize tree efficiency, we further introduce a dynamic branching mechanism that dynamically maps the normalized uncertainty to a local branch budget :
| (3) | ||||
where denotes the margin scale, , and . This dynamic allocation adjusts only the local tree topology without modifying the underlying draft checkpoint or requiring retraining.
Candidate Tree Construction
For each identified UFP, CURE constructs candidate repair paths by preserving the original prefix while substituting the fragile token with high-scoring alternatives. The remaining suffix tokens are then resampled under the substituted token. Paths sharing a common prefix naturally merge into shared parent nodes within the verification tree, enabling the target verifier to process all candidate paths in a single pass via Tree Attention without independent batch computation. Crucially, the original block-parallel path () is anchored as branch 0 and is protected from pruning by the uncertainty gate.
To ensure computational efficiency, candidate construction is strictly bounded by three complementary constraints: the position gate limits where repair branches may originate, the branch budget caps alternatives per selected position, and the verification beam constrains the active tree frontier. In our primary configuration, at most one low-margin position is repaired per block. This localized strategy concentrates the extra verification budget on critical ambiguous nodes rather than enumerating combinatorial paths across the full sequence block.
Joint Verification and Cache Resynchronization
The constructed candidate paths and the default path are unified into a sparse verification tree . A single forward pass of the target model evaluates all tree positions concurrently via Tree Attention and computes the accepted prefix length for each candidate trajectory . The framework identifies the optimal trajectory that yields the longest accepted prefix:
| (4) |
If branch 0 wins (), the current draft internal states are preserved. If a repair branch wins (), the emitted sequence deviates from the original draft proposal. To maintain state consistency for subsequent drafting steps, CURE replays the selected repair tokens into the draft model’s Key-Value (KV) cache, realigning the draft model’s internal context representation with the verified output sequence.
| TPOT | Speedup vs. Target AR () | Accepted tokens/step | ||||||
|---|---|---|---|---|---|---|---|---|
| Dataset | Target AR | Naive SD | Parallel | Ours | Parallel | Ours | Parallel | Ours |
| HumanEval | 30.430 | 42.203 | 6.232 | 8.718 | 4.883 | 3.490 | 7.165 | 7.641 |
| MBPP | 30.279 | 49.853 | 7.919 | 11.378 | 3.824 | 2.661 | 5.808 | 6.053 |
| LCB-lite | 31.577 | 55.782 | 6.382 | 10.283 | 4.948 | 3.071 | 6.268 | 6.735 |
| GSM8K | 107.070 | 155.153 | 16.165 | 29.461 | 6.624 | 3.634 | 8.514 | 11.231 |
Training and Inference Boundary
While the pretrained block-parallel draft checkpoint requires specialized multi-token training, all components of CURE (including the dynamic repair tree, margin gating, dynamic branch allocation, and KV-cache resynchronization) operate entirely at inference time. These mechanisms introduce zero additional parameters to either the draft or target models and require no retraining or fine-tuning, establishing CURE as a flexible, plug-and-play module for existing parallel drafting backends.
| Speedup vs. Target AR () | |||||
|---|---|---|---|---|---|
| Method | Draft structure | HumanEval | MBPP | LCB-lite | GSM8K |
| CURE (ours) | Parallel draft + repair | 3.49 | 2.66 | 3.07 | 3.63 |
| EAGLE-3 | 16-node tree | 2.17 | 1.93 | 1.80 | 2.21 |
| EAGLE-3 | 60-node tree | 2.50 | 2.22 | 2.03 | 2.56 |
| DART | 60-node tree | 2.52 | 2.39 | 2.24 | 2.28 |
| DFlash | 16-token block | 5.21 | 4.71 | 5.37 | 5.21 |
| Domino | 16-token block | 5.89 | 5.53 | 5.27 | 7.92 |
CURE uses the controlled measurements in Table 1. Related methods use A100 GPUs and a 2048-token generation limit, whereas our runs use a separate implementation and a 256-token limit. The table provides same-target context rather than a controlled ranking.
Experiments
Experimental Setup
Models and Hardware Platform.
We evaluate our framework using the Qwen3 series models. The target model is Qwen3-8B, paired with a pretrained Qwen3-8B-based block-parallel draft backend (block size ). As an autoregressive draft baseline, we employ Qwen3-4B. All experiments are conducted on a single GPU using bfloat16 precision and FlashAttention-2. Decoding temperature is set to (greedy decoding) across all benchmark evaluations. All Time-Per-Output-Token (TPOT) metrics are recorded in seconds per token and reported in milliseconds per token (ms/tok) under sequential single-GPU runs to eliminate inter-request variance.
Datasets and Evaluation Metrics.
We evaluate model performance across three primary code generation benchmarks and one out-of-domain mathematical reasoning stress test:
- •
HumanEval: 164 code-eval prompts for functional python evaluation.
- •
MBPP: 128 sanitized code-eval prompts.
- •
LiveCodeBench-lite (LCB-lite): 128 problems using the public test6.jsonl.
- •
GSM8K: 128 multi-step mathematical reasoning tasks serving as an out-of-domain test.
We evaluate system efficiency and functional correctness using four primary metrics:
- 1.
Accept/step (): The mean number of tokens accepted per draft/verification step.
- 2.
TPOT (ms/tok): Mean end-to-end latency per output token (recorded in seconds and reported in milliseconds).
- 3.
Speedup (): The TPOT ratio relative to target-only autoregressive decoding ().
- 4.
Pass@1 (%): Code-execution or public-test pass rate, reported separately from token-level exactness.
Baselines.
We compare CURE against three representative decoding strategies:
- •
Target AR: Standard single-path autoregressive decoding executed directly on Qwen3-8B.
- •
Parallel Draft: The default block-parallel draft backend producing a single candidate path (), serving as both the low-cost reference and branch 0 () of the repair tree.
- •
Naive SD: Standard speculative decoding drafting each block autoregressively with Qwen3-4B and verifying with Qwen3-8B, measuring the practical cost of token-by-token drafting with a smaller model.
Main Results
Table 1 presents our controlled, same-system evaluation, where CURE is configured with the fast_margin100 variant. To contextualize our results within the broader literature, Table 2 separately summarizes reported speedups from existing literature on Qwen3-8B. We utilize the speedup ratio relative to each benchmark’s target-only AR baseline as the primary unifying metric, since raw TPOT is inherently dependent on specific hardware and execution environments, while accepted-length metrics vary by candidate tree structure. While the target model (Qwen3-8B), decoding temperature (), and evaluation benchmarks are aligned, we explicitly acknowledge that hardware platforms, generation sequence lengths, and underlying framework implementations differ across published works.
Across the three primary code generation benchmarks, CURE achieves an end-to-end speedup of to over target-only AR decoding, and an acceleration of to over Naive SD. Relative to the single-path parallel draft backend, local uncertainty repair consistently increases the accepted token sequence length by 4.2% to 7.5%, while raw TPOT increases by to . These findings establish that the core mechanism of CURE lies in recovering valid candidate trajectories at fragile nodes rather than improving raw latency over the parallel draft baseline. On the out-of-domain GSM8K benchmark, CURE demonstrates a notable 32.0% increase in accepted length, which is analyzed separately as an empirical stress test. Table 2 positions our speedup metrics alongside reported figures for established speculative decoding backends on Qwen3-8B. On shared evaluation benchmarks, the end-to-end speedups achieved by CURE surpass those reported for EAGLE-3 and DART, while remaining lower than DFlash and Domino. Given the variations in execution hardware, generation length, and framework optimizations across these implementations, we interpret this comparison as a system-level context positioning rather than a direct head-to-head benchmark.
| Pass@1 (%) | ||||
|---|---|---|---|---|
| Dataset | Target AR | Parallel | Ours | Naive SD |
| HumanEval | 79.9 (131/164) | 81.1 (133/164) | 79.9 (131/164) | 80.5 (132/164) |
| MBPP | 71.1 (91/128) | 71.1 (91/128) | 71.1 (91/128) | 71.1 (91/128) |
| LCB-lite public | 23.4 (30/128) | 23.4 (30/128) | 23.4 (30/128) | 23.4 (30/128) |
Functional Correctness of Generated Code
To verify that leveraging token error patterns preserves target model alignment without degrading downstream task performance, we evaluate the functional correctness of generated code across standard benchmarks (HumanEval, MBPP, and LCB-lite). Table 3 summarizes the pass rates alongside latency and average accepted sequence length.
Task Performance Parity. Our method matches target-only decoding on all three reported pass@1 counts. Compared with the parallel drafting baseline, it differs by two HumanEval problems and matches MBPP and LCB-lite. These single-run results support comparable test pass counts under the evaluated suites; they do not establish functional equivalence beyond the provided tests.
Scope and Numerical Precision. We note that execution-based test suites evaluate behavioral correctness rather than strict token-level identity. The optimized bfloat16/FlashAttention path exhibits token-level mismatches, while a strict replay path restores target consistency in the tested path at the cost of additional latency.
Ablation Study:
To isolate the system-level contributions of the parallel fallback branch (Branch 0) and the KV cache resynchronization mechanism, we evaluate their individual and combined removals. Experiments are conducted on a representative 64-example subset sampled from HumanEval, MBPP, and LCB-lite. Table 4 summarizes the trade-offs in mean accepted length, end-to-end speedup, and TPOT ratio.
Branch 0 as a Low-Cost Safety Net. Removing Branch 0 results in a 5.7% drop in the average accepted length and reduces the end-to-end speedup from to . This degradation demonstrates that retaining the vanilla parallel proposal path serves as a highly efficient fallback baseline; it ensures candidate diversity when error-pattern repair candidates fail to provide a valid token sequence.
Cache Resynchronization for State Alignment. Omitting the cache resynchronization mechanism leads to a catastrophic performance collapse. The average accepted length plummets by 40.1%, while the TPOT ratio deteriorates sharply from 1.776 to 2.642. From a system perspective, this severe overhead stems from stale draft states accumulating across consecutive decoding blocks, which breaks KV cache alignment and invalidates subsequent token verifications.
| Aggregate performance | Relative to parallel | Token consistency | |||
|---|---|---|---|---|---|
| Configuration | Accepted/step | Speedup vs. AR | TPOT ratio | Accept ratio | Exact rate |
| Full method | 6.826 | 2.708 | 1.776 | 1.055 | 0.854 |
| w/o branch 0 | 6.435 | 2.616 | 1.687 | 0.996 | 0.833 |
| w/o cache resync | 4.089 | 1.733 | 2.642 | 0.637 | 0.849 |
| w/o both | 2.707 | 1.141 | 3.877 | 0.422 | 0.849 |
Offline Analysis: Predictability and Selectivity of Useful Repairs
To understand whether token error repairs can be selectively prioritized before verification, we analyze the ranking capacity of a lightweight scoring mechanism. We define a useful repair as a block where the tree candidate yields strictly more accepted tokens than the fallback Branch 0, quantified by the net token gain:
| (5) |
A lightweight scorer ranks repair candidates immediately after block construction using draft confidence margins, block positions, and candidate statistics. We evaluate the ranking quality under an admitted-block budget across three metrics: Precision (fraction of selected blocks with ), Recall (fraction of useful blocks covered), and Extra-Token Recall (fraction of recovered covered).
High Predictability of Repair Utility. As reported in Table 5, the offline scorer provides a strong ranking signal for repair effectiveness. Prioritizing the top 10% of blocks () captures of all extra accepted tokens with a precision of . Expanding the budget to 30% () recovers of the total extra tokens while maintaining a precision of . This non-linear coverage confirms that useful error repairs are highly concentrated and predictable based on early draft features.
System Trade-offs and Runtime Implications. Because the scorer operates post-candidate construction, it does not bypass the initial candidate generation overhead. In our runtime smoke tests, incorporating a dynamic learned gate yielded negligible end-to-end TPOT improvements due to feature extraction and inference latency overheads. Consequently, we treat Table 5 not as a runtime acceleration claim, but as an insightful offline diagnostic. It demonstrates that a small fraction of candidate blocks drives the majority of acceptance gains, laying the foundation for future zero-overhead, static pattern-pruning strategies.
| Admitted blocks | Precision | Recall | Extra-token recall |
|---|---|---|---|
| 10% | 0.359 | 0.308 | 0.396 |
| 20% | 0.291 | 0.500 | 0.603 |
| 30% | 0.246 | 0.635 | 0.716 |
| 40% | 0.221 | 0.760 | 0.834 |
| 50% | 0.195 | 0.837 | 0.888 |
Per-Dataset Performance & Trade-off Analysis
Table 1 reports the latency (TPOT) and average accepted sequence length across code generation and reasoning benchmarks.
HumanEval & Code Synthesis. On HumanEval, CURE achieves a TPOT of ms/token, delivering a speedup over Naive SD ( ms/token). Compared with the vanilla parallel draft, our repair tree elevates the accepted length per step from to (+6.6%). While tree verification adds runtime compute, local repair recovers additional candidates at a measurable cost relative to the parallel backend.
Trade-off on General/Lighter Workloads. On MBPP and LCB-lite, CURE maintains consistent acceptance gains (e.g., boosting accepted length by 7.5% on LCB-lite). On MBPP, raw TPOT reaches ms/token versus ms/token in Naive SD. We observe that on simpler token distributions, the extra verification latency of candidate trees can marginally exceed the wall-clock savings from higher accepted lengths. This reveals an inherent latency-acceptance trade-off: tree-based repair is most beneficial in high-entropy or error-prone sub-sequences where target-draft misalignment is severe.
Generalization to Non-Code Reasoning (GSM8K). To evaluate cross-domain behavior under the legacy verification protocol, we evaluate on GSM8K. CURE achieves accepted tokens per step, compared with for the parallel draft and for Naive SD, yielding a speedup over target-only AR. This stress test suggests that local repair can recover rejected tokens outside code, but it does not establish protocol-level generality.
Discussion & Conclusion
We presented CURE, a budget-aware repair framework combining candidate trees with cross-block KV cache resynchronization. Across HumanEval, MBPP, and LCB-lite, CURE matches target-only pass counts and is up to faster than Naive SD. However, candidate construction adds a – TPOT overhead over the parallel baseline. Future work should filter low-utility candidates before tree synthesis and resynchronize the cache after a repair wins.
References
- Ankner et al. (2024) Ankner, Z.; Parthasarathy, R.; Nrusimha, A.; Rinard, C.; Ragan-Kelley, J.; and Brandon, W. 2024. Hydra: Sequentially-Dependent Draft Heads for Medusa Decoding. In First Conference on Language Modeling.
- Austin et al. (2021) Austin, J.; Odena, A.; Nye, M.; Bosma, M.; Michalewski, H.; Dohan, D.; Jiang, E.; Cai, C.; Terry, M.; Le, Q.; and Sutton, C. 2021. Program Synthesis with Large Language Models. arXiv preprint arXiv:2108.07732.
- Cai et al. (2024) Cai, T.; et al. 2024. Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads. In Proceedings of the 41st International Conference on Machine Learning, 5209–5235.
- Casalnuovo et al. (2020) Casalnuovo, C.; Lee, K.; Wang, H.; Devanbu, P.; and Morgan, E. 2020. Do Programmers Prefer Predictable Expressions in Code? Cognitive Science, 44(12): e12921.
- Chen et al. (2023) Chen, C.; et al. 2023. Accelerating Large Language Model Decoding with Speculative Sampling. arXiv preprint arXiv:2302.01318.
- Chen, Liang, and Liu (2026) Chen, J.; Liang, Y.; and Liu, Z. 2026. DFlash: Block Diffusion for Flash Speculative Decoding. arXiv preprint arXiv:2602.06036.
- Chen et al. (2021) 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 et al. (2024) Chen, Z.; et al. 2024. SEQUOIA: Scalable and Robust Speculative Decoding. In Advances in Neural Information Processing Systems.
- Cobbe et al. (2021) Cobbe, K.; Kosaraju, V.; Bavarian, M.; Chen, M.; Jun, H.; Kaiser, L.; Plappert, M.; Tworek, J.; Hilton, J.; Nakano, R.; Hesse, C.; and Schulman, J. 2021. Training Verifiers to Solve Math Word Problems. arXiv preprint arXiv:2110.14168.
- Elhoushi et al. (2024) Elhoushi, M.; et al. 2024. LayerSkip: Enabling Early Exit Inference and Self-Speculative Decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics, 12622–12642.
- Fu et al. (2024) Fu, Y.; Bailis, P.; Stoica, I.; and Zhang, H. 2024. Break the Sequential Dependency of LLM Inference Using Lookahead Decoding. In Proceedings of the 41st International Conference on Machine Learning, 14060–14079.
- Fu et al. (2025) Fu, Y.; Ge, R.; Shao, Z.; Deng, Z.; and Zhang, H. 2025. Scaling Speculative Decoding with Lookahead Reasoning. In Advances in Neural Information Processing Systems, volume 38.
- Gong et al. (2024) Gong, Z.; Liu, J.; Wang, Z.; Wu, P.; Wang, J.; Cai, X.; Zhao, D.; and Yan, R. 2024. Graph-Structured Speculative Decoding. In Findings of the Association for Computational Linguistics: ACL 2024, 11404–11415.
- He et al. (2024) He, Z.; Zhong, Z.; Cai, T.; Lee, J.; and He, D. 2024. REST: Retrieval-Based Speculative Decoding. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics, 1582–1595.
- Hindle et al. (2012) Hindle, A.; Barr, E. T.; Gabel, M.; Su, Z.; and Devanbu, P. 2012. On the Naturalness of Software. In Proceedings of the 34th International Conference on Software Engineering, 837–847.
- Huang et al. (2026) Huang, J.; Zhang, Y.; Zhang, Q.; Lin, H.; Xu, H.; and Zhang, L. 2026. Domino: Decoupling Causal Modeling from Autoregressive Drafting in Speculative Decoding. arXiv preprint arXiv:2605.29707.
- Huang, Guo, and Wang (2024) Huang, K.; Guo, X.; and Wang, M. 2024. SpecDec++: Boosting Speculative Decoding via Adaptive Candidate Lengths. arXiv preprint arXiv:2405.19715.
- Jain et al. (2024) Jain, N.; Han, K.; Gu, A.; Li, W.-D.; Yan, F.; Zhang, T.; Wang, S.; Solar-Lezama, A.; Sen, K.; and Stoica, I. 2024. LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code. arXiv preprint arXiv:2403.07974.
- Leviathan, Kalman, and Matias (2023) Leviathan, Y.; Kalman, M.; and Matias, Y. 2023. Fast Inference from Transformers via Speculative Decoding. Proceedings of the 40th International Conference on Machine Learning.
- Li et al. (2024a) Li, Y.; Wei, F.; Zhang, C.; and Zhang, H. 2024a. EAGLE-2: Faster Inference of Language Models with Dynamic Draft Trees. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, 7421–7432.
- Li et al. (2025) Li, Y.; Wei, F.; Zhang, C.; and Zhang, H. 2025. EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test. arXiv preprint arXiv:2503.01840.
- Li et al. (2024b) Li, Y.; et al. 2024b. EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty. In Proceedings of the 41st International Conference on Machine Learning, 28935–28948.
- Lin et al. (2024) Lin, C.-H.; Tuli, S.; Smith, J.; Hsu, Y.-C.; Shen, Y.; and Jin, H. 2024. SLiM: Speculative Decoding with Hypothesis Reduction. In Findings of the Association for Computational Linguistics: NAACL 2024, 1005–1017.
- Liu et al. (2026) Liu, F.; Li, X.; Zhao, K.; Gao, Y.; Zhou, Z.; Zhang, Z.; Wang, Z.; Dou, W.; Zhong, S.; and Tian, C. 2026. DART: Diffusion-Inspired Speculative Decoding for Fast LLM Inference. arXiv preprint arXiv:2601.19278.
- Liu et al. (2024) Liu, X.; Hu, L.; Bailis, P.; Cheung, A.; Deng, Z.; Stoica, I.; and Zhang, H. 2024. Online Speculative Decoding. In Proceedings of the 41st International Conference on Machine Learning, 31131–31146.
- Liu, Zhang, and Song (2024) Liu, Z.; Zhang, C.; and Song, D. 2024. How Speculative Can Speculative Decoding Be? In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation, 8265–8275.
- Miao et al. (2024) Miao, X.; et al. 2024. SpecInfer: Accelerating Large Language Model Serving with Tree-based Speculative Inference and Verification. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, 932–949.
- Shi et al. (2026) Shi, W.; Xu, Q.; Deng, F.; Wu, Y.; Liu, J.; Xu, Y.; Chen, H.; Zhu, J.; Xu, J.; Huang, X.; Yang, J.; and Zhou, X. 2026. SpecBlock: Block-Iterative Speculative Decoding with Dynamic Tree Drafting. arXiv preprint arXiv:2605.07243.
- Stern, Shazeer, and Uszkoreit (2018) Stern, M.; Shazeer, N.; and Uszkoreit, J. 2018. Blockwise Parallel Decoding for Deep Autoregressive Models. In Advances in Neural Information Processing Systems, volume 31.
- Sun et al. (2023) Sun, Z.; Suresh, A. T.; Ro, J. H.; Beirami, A.; Jain, H.; and Yu, F. 2023. SpecTr: Fast Speculative Decoding via Optimal Transport. In Advances in Neural Information Processing Systems, volume 36.
- Wang et al. (2025) Wang, J.; Su, Y.; Li, J.; Xia, Q.; Ye, Z.; Duan, X.; Wang, Z.; and Zhang, M. 2025. OPT-Tree: Speculative Decoding with Adaptive Draft Tree Structure. Transactions of the Association for Computational Linguistics, 13: 188–199.
- Xia et al. (2023) Xia, H.; Ge, T.; Wang, P.; Chen, S.-Q.; Wei, F.; and Sui, Z. 2023. Speculative Decoding: Exploiting Speculative Execution for Accelerating Seq2seq Generation. In Findings of the Association for Computational Linguistics: EMNLP 2023, 3909–3925.
- Xiong et al. (2024) Xiong, Y.; Zhang, R.; Li, Y.; Wu, T.; and Zou, L. 2024. DySpec: Faster Speculative Decoding with Dynamic Token Tree Structure. arXiv preprint arXiv:2410.11744.
- Xu et al. (2025) Xu, C.; Liu, Y.; Zhou, Y.; Huang, S.; Xu, N.; and Xu, Q. 2025. Speculative Decoding for Verilog: Speed and Quality, All in One. arXiv preprint arXiv:2503.14153.
- Yan, Agarwal, and Venkataraman (2024) Yan, M.; Agarwal, S.; and Venkataraman, S. 2024. Decoding Speculative Decoding. arXiv preprint arXiv:2402.01528.
- Zhang et al. (2024a) Zhang, J.; Wang, J.; Li, H.; Shou, L.; Chen, K.; Chen, G.; and Mehrotra, S. 2024a. Draft & Verify: Lossless Large Language Model Acceleration via Self-Speculative Decoding. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics, 11263–11282.
- Zhang et al. (2025) Zhang, L.; Wang, X.; Huang, Y.; and Xu, R. 2025. Learning Harmonized Representations for Speculative Sampling. In International Conference on Learning Representations.
- Zhang et al. (2024b) Zhang, S.; Wang, H.; Ma, D.; Zhu, Z.; Chen, L.; Lan, K.; and Yu, K. 2024b. AdaEAGLE: Optimizing Speculative Decoding via Explicit Modeling of Adaptive Draft Structures. arXiv preprint arXiv:2412.18910.
- Zhou et al. (2024) Zhou, Y.; Lyu, K.; Rawat, A. S.; Menon, A. K.; Rostamizadeh, A.; Kumar, S.; Kagy, J.-F.; and Agarwal, R. 2024. DistillSpec: Improving Speculative Decoding via Knowledge Distillation. In International Conference on Learning Representations.