TL;DR
DDTree (Diffusion Draft Tree) significantly accelerates Large Language Model (LLM) inference by combining the speed of block diffusion drafting with the robustness of tree-based verification. By using a provably optimal heap algorithm to select a "tree" of candidate token sequences from a single drafter pass, it achieves up to an 8.2x speedup over standard decoding, consistently outperforming the current state-of-the-art.
What Problem Does This Paper Address?
Generating text with LLMs is notoriously slow because it is autoregressive: the model must predict one token at a time, with each new token requiring a full, computationally expensive forward pass.
Speculative decoding attempts to fix this by using a tiny, fast "drafter" model to guess several future tokens. A large "target" model then checks these guesses in parallel. If the drafter is right, we get multiple tokens for the price of one pass.
However, most drafters are either too slow (if they are autoregressive themselves) or too limited. A recent breakthrough called DFlash uses "block diffusion" to draft an entire block of tokens in a single pass. While fast, vanilla DFlash only proposes a single sequence. If the very first token in that sequence is wrong, the entire block is rejected, wasting the effort. The authors of DDTree asked: How can we use all the distributional information from a block diffusion drafter to propose multiple paths, increasing our chances of success without slowing down the process?
Methods
DDTree introduces a method to construct a draft tree directly from the parallel outputs of a block diffusion drafter.
- One-Pass Drafting: The DFlash drafter produces marginal probability distributions for every position in a future block (e.g., the next 16 tokens) simultaneously.
- Surrogate Optimization: Because the drafter is non-autoregressive, it doesn't provide path-conditioned probabilities. DDTree treats the draft distribution as a factorized product of these marginals. It aims to maximize the "expected acceptance length"—the number of tokens the target model is likely to accept.
- Best-First Tree Construction: The authors prove that the optimal tree for a given "node budget" $B$ consists of the $B$ highest-probability prefixes. They provide a simple, efficient max-heap algorithm to find these prefixes in $O(B \log B)$ time.
- Tree Verification: The resulting tree is flattened into a sequence and verified by the target model in a single pass using tree attention. This allows the target model to check multiple branches of the tree simultaneously.
Datasets
The authors evaluated DDTree across a diverse suite of benchmarks to ensure robustness:
- Reasoning: MATH-500, GSM8K, AIME 2024, AIME 2025.
- Coding: HumanEval, MBPP, LiveCodeBench, SWE-bench Lite.
- General Instruction: MT-Bench, Alpaca.
These were tested using several target models, including Qwen3 (4B, 8B, and 30B-MoE) and Gemma 4 31B.
Key Insights and Ideas
- Factorization is a Feature, Not a Bug: While block diffusion drafters lack the "path awareness" of autoregressive models, their factorized output allows for a mathematically elegant and provably optimal tree construction that is much faster than building trees step-by-step.
- Front-Heavy Trees: The optimal construction naturally favors "front-heavy" trees. It invests more budget in exploring variations at the beginning of the block (where errors are most costly) rather than deep, unlikely branches.
- Hardware-Aware Budgeting: The "optimal" number of nodes in a tree isn't fixed. On high-end hardware like the NVIDIA H200, larger trees (e.g., 512 nodes) are beneficial. On older hardware like the A40, the overhead of tree attention is higher, making smaller trees (e.g., 32-64 nodes) more efficient.
Key Results
DDTree consistently outperformed vanilla DFlash across every model, dataset, and temperature setting tested.
- Massive Speedups: On the HumanEval coding task, DDTree achieved an 8.2x speedup over standard autoregressive decoding using the Qwen3-30B-MoE model.
- Consistent Gains: Compared to vanilla DFlash (the previous state-of-the-art), DDTree typically added an additional 1.5x to 2x speedup.
- Acceptance Length: DDTree significantly shifts the distribution of accepted tokens toward the maximum block size. In many cases, it makes "full-block" acceptances (16 tokens at once) substantially more common.
Limitations and Future Work
- Attention Bottlenecks: The current implementation uses standard PyTorch attention for the tree verification because FlashAttention-2 does not yet support the specific "tree attention" masks required. Integrating this could further reduce latency.
- Surrogate Gap: The tree is optimized based on the drafter's belief of what is likely, which may not perfectly align with the target model's distribution.
- Dynamic Budgeting: While the paper explores different fixed budgets, future work could involve dynamically adjusting the tree size based on the drafter's confidence in real-time.
Summary updated