DEX: Parallel Depth Exploration for Speculative Decoding

Weisi Yang, Zipeng Sun, Stephen XiaNeurIPS 2026

TL;DR

Large Language Models force every single generated word through their entire stack of neural layers, even when simple words like "the" are already figured out halfway up. While existing shortcuts try to guess a single "early exit" layer—and pay a heavy penalty when they guess wrong—DEX (Depth Exploration Decoding) hedges its bets by exploring multiple intermediate layers in parallel across GPUs. It delivers the exact same output as standard decoding while speeding up generation by up to 61% over competing early-exit methods.

What Problem Does This Paper Address?

Standard autoregressive decoding is a patience game: to generate $T$ tokens with an $L$-layer model, you pay for $L \times T$ layer computations sequentially. Yet researchers know LLMs have massive "depth redundancy"—many tokens reach their final form in shallow or middle layers, a milestone the authors formalize as a token's Earliest Available Depth (EAD).

Recent lossless speculative decoding methods try to exploit this by picking one intermediate layer to draft tokens, using the final layer later to verify them (ensuring zero quality loss). However, this creates a painful selection bottleneck, much like playing The Price is Right with neural layers:

  • Guess too deep (too late): You waste compute running layers the token didn't actually need.
  • Guess too shallow (too early): The prediction is wrong, verification fails, you fall back to the full model, and you throw away all speculative future tokens built on that bad guess.
Figure 1: Comparison of different depth exploitation methods. (a) Autoregressive decoding always performs a full-depth forward pass. (b) Depth selection relies on a single exit-depth decision, risking either full-depth fallback when exiting too early or wasted computation when exiting too late. (c) Parallel depth exploration over candidate depths resolves branches with the final-depth reference and preserves only reusable branches.

Methods

Instead of betting on a single exit layer, DEX replaces depth selection with parallel depth exploration. The model's layer stack is sliced into $K$ sequential stages, each assigned to a "depth explorer" running on its own GPU.

DEX operates via an expand–commit–collapse cycle governed by a finite-state machine:

  1. Parallel Lattice Expansion: At every step, a token's state branches in two directions simultaneously: upward in depth (passing hidden states to the next GPU's layers to refine the current token) and forward in position (taking the current layer's candidate token and feeding it back into GPU 0 to start predicting the next word). Over a few steps, this builds a 2D depth-position lattice of speculative futures.
  2. Validate & Commit: Once the current target token's "anchor path" reaches the final layer, that final-layer output serves as the ground-truth reference. DEX checks which of the shallower explorers already guessed that exact token.
  3. Collapse: DEX commits the final-layer token (guaranteeing 100% lossless output), finds the shallowest branch that matched it, and collapses the lattice—pruning dead ends while keeping all pre-computed future tokens and KV-caches spawned from that winning early branch.
DEX execution lattice and finite state machine across four depth explorers

Two clever additions make this sing:

  • Depth-Coupled Sampling (DECS): If Layer 10 guesses "apple", having Layer 20 also guess "apple" wastes a parallel slot. DECS masks out shallower guesses at deeper non-final stages to force diverse backup candidates, while using the Gumbel-Max trick at the final layer so random sampling distributions remain mathematically untouched.
  • Inducing Adapters: Standard LLMs aren't naturally aligned to output readable tokens at middle layers. For off-the-shelf models, the authors attach tiny, self-distilled residual adapters at intermediate boundaries so middle layers can speak the final vocabulary head's language without altering the frozen base model.

Datasets

The authors evaluate DEX across three standard generation benchmarks—no new datasets are introduced:

  • GSM8K (mathematical reasoning)
  • HumanEval (code generation)
  • XSum (text summarization)

(Note: Training datasets used to self-distill the inducing adapters are deferred to the paper's appendix and not detailed in the main text.)

Key Insights and Ideas

  • Turning prediction error into rounding error: Single-exit methods live and die by predictor accuracy. DEX turns an uncertain guessing game into a deterministic upward rounding problem—your worst-case wasted depth is strictly bounded by the spacing between your explorers.
  • Carry-lookahead adders for LLMs: DEX borrows a classic trick from 1950s–70s computer chip design (Kogge-Stone adders). Instead of waiting for a slow sequential signal to ripple through 80 layers, parallel hardware pre-calculates what happens next for multiple intermediate outcomes, snapping onto the right timeline the moment the reference arrives.
  • Another axis for multi-GPU scaling: Tensor parallelism splits matrix math across GPUs, often hitting communication walls during single-stream (batch size 1) decoding. Partitioning GPUs as parallel depth explorers provides a fresh way to turn extra silicon into lower single-user latency.

Key Results

  • Crushing the selection bottleneck: On early-exit-trained models (LayerSkip CodeLlama-34B and Llama-2-70B), DEX beats all depth-selection baselines (LSSD, AdaDecode, DEL) under matched GPU counts—achieving 20% and 38% higher overall throughput, respectively, and up to a 61% speedup on GSM8K.
  • 100% Lossless: Empirical checks confirm a 100% token-for-token match with standard greedy autoregressive decoding.
  • Scaling on Standard LLMs: Using inducing adapters on standard CodeLlama-34B, Llama-2-70B, and Qwen3-32B, DEX matches distributed speculative baselines like PEARL (within 5%) at equal GPU counts (3–4 GPUs). Scaling up to 6–8 GPUs pushes DEX to 2.90×, 3.68×, and 1.80× speedups over standard decoding on those models, outperforming tensor parallelism.
  • Ablations: Full multi-depth exploration runs up to 1.71× faster than a stripped-down single-exit version of DEX, and DECS provides up to a 1.16× boost over naive independent candidate generation.

Limitations and Future Work

  • Multi-GPU hunger: DEX's real-world wall-clock speedups rely on dedicating one GPU per depth explorer ($K$ explorers = $K$ GPUs). Running the exploration lattice sequentially on a single GPU wouldn't yield wall-clock speedups. Also, under smaller matched GPU budgets on standard models, token-axis speculative methods like EAGLE-2/3 still achieve higher raw speeds (though EAGLE requires heavier auxiliary draft-model training).
  • Exponential tree growth: Because candidates branch in both depth and position, $K$ explorers materialize up to $2^K - 1$ tokens per cycle. At $K=8$ GPUs, a single explorer processes batches of up to $2^7 = 128$ tokens. Push $K$ much higher and compute, memory bandwidth, and KV-cache management overheads will saturate the gains.
  • Future Work: To scale to finer resolutions without blowing up compute, the authors suggest designing sparse exploration lattices and dynamically pruning low-value branches on the fly while preserving the lossless final-depth guarantee.

Summary updated

Abstract

Autoregressive LLM decoding processes every generated token through the full layer stack, even though many tokens become available at intermediate depths. Existing lossless depth-adaptive methods exploit this redundancy by choosing a single non-final exit depth and verifying its drafts with the final-depth model. However, our measurements show that this selection-based strategy leaves substantial headroom: choosing an exit too late wastes computation, while choosing one too early triggers fallback and discards dependent drafts. We propose Depth Exploration Decoding (DEX), a lossless speculative decoding algorithm that replaces single-depth selection with parallel exploration over multiple candidate depths. At each commit position, DEX validates candidates against the final-depth reference, commits the final-depth token, and collapses the exploration lattice to retain only reusable branch states. This expand–commit–collapse procedure preserves equivalence to standard autoregressive decoding while reducing the latency of generating each token. Across early-exit-trained and standard LLMs, DEX outperforms representative depth-selection baselines and achieves up to 61% higher decoding speed than the strongest depth-selection baseline. Moreover, DEX improves as the explored depths become finer, showing that parallel depth exploration provides a scalable way to exploit the underused depth axis of LLM decoding.
BibTeX
@inproceedings{yang2026dex,
  author = {Weisi Yang and Zipeng Sun and Stephen Xia},
  title = {{DEX: Parallel Depth Exploration for Speculative Decoding}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=TKWIMojtwx},
}
Figure