arXiv:2610.20175cs.CLOct 2026

Manuscript Offprint

arXiv:2610.20175

TreeSpark: Learning to Draft the Trees You Verify for Speculative Decoding

Jihao Zhao, Qianyu Jiang, Shuaishuai Zu, Pengfei Li, Guanghuan Fang, Ben Feng, Biao Qin, Zhibin Wang, Baochuan Yang

ABSTRACT

Parallel drafters such as DFlash and DSpark reduce proposal latency, but early mismatches limit how much of each block can be accepted. Retaining alternatives introduces parent states and candidate choices that reference-conditioned training does not directly supervise. We introduce TreeSpark, a unified training and inference framework extending the semi-autoregressive DSpark architecture. It constructs parent-conditioned candidate trees from one backbone pass and replays their expansion, pruning, and budgeted packing during training. Survival negative log-likelihood weights retained edges by reference-derived path mass, while a capped coverage hinge promotes target-important alternatives near local selection boundaries. Both objectives reuse reference-chain target distributions without additional target forward passes. We evaluate greedy decoding with Qwen3-4B and Qwen3-8B on nine general benchmarks and six writing domains. Across targets and suites, TreeSpark improves mean acceptance length over DSpark by 23.4% to 31.6% and mean single-request throughput by 15.1% to 25.0%. Batched Qwen3-4B throughput improves by 12.6% to 17.2%. At fixed attention capacity and inference policy, the proposed supervision further improves mean acceptance length by approximately 6.4% and mean system throughput by 4.2% to 5.0% on Qwen3-4B. Our code is available at https://github.com/Robot2050/TreeSpark.

1 INTRODUCTION

Speculative decoding reduces the sequential cost of language model inference by separating inexpensive proposal generation from parallel target verification (Xia et al., 2023; Leviathan et al., 2023; Chen et al., 2023). Its efficiency depends on accepted length relative to drafting and verification costs (Xia et al., 2024). Prior work develops feature-level autoregressive drafting (Li et al., 2024a) and blockwise parallel prediction (Stern et al., 2018). DFlash combines target-feature conditioning with block diffusion to predict draft tokens in one backbone pass (Chen et al., 2026). DSpark retains parallel backbone computation and adds lightweight sequential correction for adjacent-token dependencies (Cheng et al., 2026). We study how coordinated training and inference can turn this inexpensive block computation into longer accepted continuations.

Low drafting latency alone does not ensure efficient use of a predicted block. With a single proposed continuation, the first rejection discards the remaining suffix regardless of its local prediction quality (Leviathan et al., 2023; Chen et al., 2023). For a parallel drafter, computation has already been spent on every block position, but later predictions contribute only when the required prefix remains available. DSpark models adjacent-token dependencies, but selecting one continuation still excludes alternatives represented in its distributions. Its correction head is trained on reference parent tokens and encounters model-generated parents at deployment (Cheng et al., 2026). Accurate reference predictions therefore need not yield useful candidates under the deployed policy. Improving acceptance requires considering both the available continuations and the supervision that shapes them.

∗^{*}Corresponding authors

A budgeted candidate tree retains alternatives while reusing parallel computation. Tree verification evaluates continuations with shared prefixes in one target pass (Miao et al., 2024; Cai et al., 2024), with candidate allocation constrained by verification cost (Chen et al., 2024). In the semi-autoregressive architecture, shared backbone outputs support lightweight parent-dependent corrections. This extension creates a specific learning requirement: each depth-specific prediction must support several proposed parents, and only a subset of their children receives verification positions. Reference-token losses do not directly supervise this allocation. Useful alternatives may fall below local selection boundaries or lose their prefixes during pruning. Training must therefore account for both local prediction quality and the selection decisions that determine complete-path availability.

Draft-generated data and online distillation improve alignment with inference-time continuations and query distributions (Zhou et al., 2024; Liu et al., 2024). HASS and EAGLE-3 expose training to simulated inference states (Zhang et al., 2025; Li et al., 2025), while LK losses optimize speculative acceptance directly (Samarin et al., 2026). Our focus is the additional alignment required when a semi-autoregressive drafter retains multiple continuations. The correction head must learn on proposed parents, reinforce retained paths, and promote useful alternatives under the deployed budget. Sharing the backbone and reusing reference target distributions make this feasible without repeated transformer computation or new target evaluations on every branch.

We introduce TreeSpark, which integrates parent-conditioned candidate generation with training under the deployed policy (Figure 1). Training replays expansion, pruning, and packing with the current drafter while retaining reference distillation. Survival weights retained-edge likelihood by reference-derived path mass; capped coverage promotes target-important alternatives near local selection boundaries, including omitted candidates. Both losses update the shared backbone and Markov head on model-generated parents, with discrete selection held fixed. Reference target distributions are reused across branches. Deployment follows the same candidate policy with greedy verification and one draft backbone pass per round. The deployment policy defines the states and selections used for supervision. Learning can therefore improve the candidates presented to a fixed verifier without introducing a separate scoring model at inference.

The main contributions are:

• A unified extension of semi-autoregressive drafting that retains alternative continuations with one backbone pass and trains on model-generated parent states by replaying the deployed expansion, pruning, and packing policy.

• Complementary survival and coverage objectives that weight retained-edge likelihood by reference-derived path mass and promote useful alternatives near local selection boundaries, reusing reference target distributions without additional target forward passes.

• Evaluations against DFlash and DSpark on two Qwen3 targets, with mean single-request throughput gains of 15.1% to 25.0% over DSpark. Controls at fixed attention capacity and inference policy isolate the additional benefit of supervision.