TL;DR
State-of-the-art speculative decoding speeds up Large Language Models (LLMs) by drafting trees of candidate tokens, but these dynamic trees break down when you turn up the temperature ($T > 0$) for creative, random generation. RheoSampling fixes this by giving randomly sampled tokens a clever "double life"—using a fake proxy probability to help them survive tree pruning, and their true probability during verification. The result is faster, mathematically lossless LLM generation that gets the best of both worlds: context-aware tree structures and genuine randomness.
What Problem Does This Paper Address?
Generating text with LLMs one token at a time is notoriously slow. Speculative decoding speeds this up by having a tiny, fast "draft" model guess several future tokens at once, which the massive "target" model then verifies in a single parallel pass. Recently, methods like EAGLE-3 took this further by drafting branching trees of tokens that dynamically adapt their shape to the context, keeping only the highest-scoring paths.
Here’s the catch: building and pruning these dynamic trees is completely deterministic—it relies on picking the strict top-K most likely tokens. When you want deterministic, greedy outputs ($T = 0$), this works brilliantly. However, when you want creative, stochastic outputs ($T > 0$), top-K selection collapses the rich tail of the probability distribution into isolated point masses (the "one-hot dilemma"). Your acceptance rate plummets because the draft model stops exploring the unlikely-yet-plausible tokens the target model actually wants to sample.
Why not just randomly sample tokens to build the tree? Because if a low-probability token gets sampled from the tail, its tiny raw probability means it will immediately get axed during global tree pruning. Worse, conditioning a token's survival on its own probability distorts the underlying math, breaking losslessness—meaning the LLM no longer generates text from its true target distribution.
Methods
To resolve the conflict between building a strong tree and verifying random tokens, the authors decouple the two jobs using RheoSampling (named after a rheostat, an adjustable electrical resistor):
- Hybrid Candidate Pool & The Rheostat ($m$): When expanding $K$ branches from a node, the algorithm deterministically picks the top-$m$ tokens, randomly samples one token from the remaining tail distribution, and fills the remaining $K - m - 1$ slots deterministically.
- Dual-Identity Decoupling: This single sampled token is given two separate probabilities. During tree expansion and global pruning, it wears a proxy probability—an artificially high score anchored to the $m$-th deterministic token—ensuring its survival in the tree is completely independent of which specific word was drawn. Later, during verification, it takes off the mask and is evaluated using its true sampling probability, preserving exact mathematical losslessness.
- RheoVerification (Optimal Transport): Instead of verifying tokens sequentially, the authors use an Optimal Transport-inspired algorithm that checks the stochastic token first, globally reallocating probability mass to maximize overlap with the target model.
- Sparse Draft Distributions: Sampling from a 100,000+ word vocabulary adds latency. The authors truncate draft logits to the top-128 entries before applying softmax during both drafting and verification, keeping sampling fast while remaining lossless with respect to the truncated draft.
Datasets
No new datasets or draft models were trained; the authors used existing EAGLE-3 checkpoints out-of-the-box. They evaluated generation efficiency across six standard benchmarks (80 questions each) covering diverse domains:
- Alpaca (instruction following) & MT-bench (multi-turn dialogue)
- GSM8K (math reasoning) & HumanEval (coding)
- Natural Questions (QA) & CNN/DailyMail (summarization)
Key Insights and Ideas
- Survival must be blind to identity: The biggest "aha" moment is why naive stochastic trees fail losslessness. If token $B$ survives pruning when sampled, while token $C$ gets pruned when sampled, the surviving token distribution is warped. Giving the sampled slot a fixed rank via a proxy probability freezes its local sibling order, keeping the math pure.
- One random token is enough: You don't need a fully random tree. Injecting just one stochastic probe per expansion provides all the distributional flexibility needed to unlock Optimal Transport verification and capture tail probabilities.
- The $m=1$ "Sweet Spot": Tuning the rheostat parameter $m$ reveals a clean trade-off. At $m=1$ (placing the random token in the #2 slot right behind the top deterministic choice), the proxy score is high enough to survive global pruning while keeping a rock-solid deterministic backbone. By $m \ge 3$, the proxy score drops too low, the sampled token gets pruned, and gains vanish.
Key Results
Tested at standard temperature ($T = 1.0$, $m = 1$) across Vicuna-13B, Llama-3.1-8B-Instruct, and DeepSeek-R1-Distill-Llama-8B, RheoSampling beat the EAGLE-3 top-K baseline on every single benchmark:
- Longer Accepted Drafts: Average accepted tokens per cycle ($\tau$) increased across the board, with average gains ranging from +0.14 on Vicuna-13B to +0.22 on DeepSeek-R1-Distill-8B (e.g., jumping from 5.43 to 5.79 on coding).
- Real Wall-Clock Speedups: Despite the slight extra compute of random sampling, end-to-end speedups improved consistently—pushing Llama-3.1-8B from 2.84$\times$ to 2.93$\times$, DeepSeek-8B from 2.89$\times$ to 2.99$\times$, and Vicuna-13B from 3.37$\times$ to 3.43$\times$ over standard autoregressive decoding.
Limitations and Future Work
- Sampling Overhead: Actual wall-clock speedup gains (e.g., +3.2% on Llama-3.1-8B) are slightly smaller than the raw token acceptance gains (+4.2%) due to the computational overhead of sampling and verifying the stochastic probe.
- Low-Temperature Quirks: As $T \to 0$, setting $m=1$ causes a slight structural mismatch compared to pure
top-Kbecause the proxy probability alters path scores even when sampling becomes nearly deterministic. Furthermore, the theoretical dominance of their OT verification over sequential rejection relies on an approximation and isn't guaranteed for every pathological distribution pair. - Future Work: The authors suggest their equivalence-class proof technique—which tames the sprawling probability space of coupled random trees—can serve as a mathematical template for designing and analyzing even more complex stochastic tree structures in the future.
Summary updated