TL;DR
The paper introduces Distinct Leaf Enumeration (DLE), a deterministic decoding method that systematically explores unique reasoning paths in an LLM's decoding tree instead of relying on stochastic sampling. By eliminating redundant token generation and maximizing search space coverage, DLE significantly boosts both accuracy and compute efficiency on highly constrained tasks like math and coding.
What Problem Does This Paper Address?
To get LLMs to solve complex reasoning problems, a common strategy is self-consistency: sample multiple reasoning paths in parallel and take a majority vote. While effective, this approach is highly compute-inefficient in constrained domains like mathematics or code generation. Because standard methods sample with replacement, they repeatedly regenerate the exact same high-probability prefixes and duplicate full solutions.
As shown above, up to 17% of prefix tokens are completely redundant during code generation. Standard self-consistency essentially wastes budget re-treading the same early branches of the decoding tree instead of exploring novel, viable alternatives.
Methods
Instead of stochastically sampling from a next-token distribution, DLE treats the generation process as a deterministic traversal of a pruned decoding tree.
The core components of DLE include:
- Deterministic Tree Expansion (
PROBFIRST): DLE scores each potential branch based on its accumulated path probability mass and greedily prioritizes expanding the branch with the highest score. - Prefix Reuse: Because DLE explicitly structures generation as a tree, it can natively reuse the Key-Value (KV) caches of shared prefixes using modern inference engines like SGLang or vLLM.
- Semantic Early Stopping: Often, different token paths converge to the same semantic meaning. DLE introduces an early-stopping rule: if a new branch generates $n$ (default 10) consecutive tokens that match an already explored sibling branch, it halts generation early to avoid redundant work.
Datasets
The authors evaluated DLE across three distinct benchmarks using Qwen2.5 (0.5B to 14B) and Llama3.2 (1B and 3B) models:
- GSM8K: Grade-school math word problems.
- HumanEval: Python coding tasks.
- MMLU-Pro: A more challenging, multi-task dataset focused on general reasoning.
Key Insights and Ideas
- Coverage Correlates with Performance: The authors define "coverage" as the total probability mass captured by a set of generated sequences. They discover a clean, positive correlation between search space coverage and downstream accuracy across various truncation samplers (top-$p$, min-$p$, $\epsilon$-sampling).
- DLE Maximizes Budget Efficiency: Under a fixed sequence budget, stochastic sampling wastes time on lower-probability branches or duplicates. DLE systematically targets unvisited high-probability branches, moving further along the coverage-accuracy curve for the same compute budget.
- Higher Quality Paths: Sequences generated by DLE exhibit higher sequence-level log-probabilities and are more accurate on average than those from standard stochastic sampling.
Key Results
- Accuracy Boosts: DLE consistently outperforms standard self-consistency. For example, using Qwen2.5-0.5B, DLE improved performance on GSM8K by 3–9% and on HumanEval by 4–7% depending on the exact sampler used.
- Token Efficiency: To reach a target accuracy of ~34% on GSM8K, standard $\epsilon$-sampled self-consistency required generating over 150 tokens per question, whereas DLE achieved the same performance generating fewer than 20 new tokens on average.
- Inference Speedups: When integrated with tree-optimized inference engines like SGLang, DLE's prefix reuse translated into substantial real-world latency reductions, particularly at smaller batch sizes where parallel trace generation cannot be fully exploited by standard baselines.
Limitations and Future Work
While DLE marks a significant step forward for test-time compute scaling, the authors note a few areas for improvement:
- Static Branching Policies: Currently, DLE relies purely on next-token probabilities to guide tree exploration. Future work could integrate task-dependent quality signals or verifiers to dynamically guide the search.
- Hybrid Exploration: Purely deterministic exploration might miss creative solutions in highly open-ended tasks. A promising direction is developing adaptive hybrids that use DLE for high-probability mass regions and stochastic sampling for the long tails.
- Dependency on Serving Stacks: The systemic speedups of DLE are tightly coupled with the underlying inference engine's ability to handle advanced KV-cache management and radix-tree structures efficiently.
Summary updated