Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs

Hongyi Liu, Jiaji Huang, Zhen Jia, Youngsuk Park, Yu-Xiang Wang · DOI

Introduction

Speculative decoding has emerged as a cornerstone technique for accelerating Large Language Model (LLM) inference. By utilizing a smaller, faster "draft" model to predict upcoming tokens, which a massive "target" model then verifies in parallel, the system can generate multiple tokens for the computational cost of a single target model forward pass. However, as the ecosystem of LLMs evolves, we are seeing a proliferation of highly specialized draft models—experts in coding, mathematics, biology, or specific languages. This specialization introduces a new challenge: how to dynamically select the optimal drafter from a diverse pool for any given user query.

The Challenge of Online Drafter Selection

Previous state-of-the-art approaches, such as BanditSpec, framed this selection as a multi-armed bandit problem. These methods relied on balancing exploration (testing different drafters) with exploitation (using the best-performing one found so far). However, exploration in this context is inherently expensive. Every time a sub-optimal drafter is tested, inference speed drops. As the pool of available drafters grows, traditional bandit algorithms spend an increasing—and eventually prohibitive—amount of time exploring, leading to significant performance degradation.

Overview of HedgeSpec workflow and performance across diverse domains.

HedgeSpec: From Bandits to Full-Information Learning

HedgeSpec introduces a paradigm shift by recognizing that exploration is unnecessary in speculative decoding. The framework leverages a unique property of the verification process: once the target model verifies a sequence of tokens, that "verified trajectory" serves as an absolute ground truth.

HedgeSpec utilizes this ground truth to perform Counterfactual Evaluation. Instead of only learning about the chosen drafter, the system feeds the verified trajectory into every drafter in the pool. This allows the system to calculate exactly how every other drafter would have performed—specifically their Expected Acceptance Length (EAL)—without requiring any additional expensive calls to the target model. By transforming the problem from partial-information (bandit) to full-information online learning, HedgeSpec achieves regret that scales only logarithmically with the number of drafters, ensuring scalability even with large pools of specialists.

Methods and Implementation

The core of HedgeSpec is the No-Regret Hedging mechanism. Using algorithms like NormalHedge, the system updates the probability weights for each drafter after every chunk of tokens is verified. To handle the practicalities of system delays and chunk-based verification, the authors developed the Queued Full-Information with Delays (QFI-D) algorithm.

Comparison between token-level and chunk-level online learning feedback mechanisms.

While evaluating alternative drafters is not "free"—it requires forward passes on the small draft models—the cost is roughly 1/25th of a target model forward pass. This overhead is minimal compared to the gains achieved by selecting a more accurate drafter. To further optimize, HedgeSpec employs heuristics like "skipping updates" to minimize compute overhead during parallel evaluation.

Experimental Results

The authors evaluated HedgeSpec using a pool of 21 specialized drafters (based on the EAGLE-3 framework) across domains including Python, Math, Biology, and SQL.

  • Superior Speedups: HedgeSpec outperformed the EAGLE-3 generalist drafter by up to 83.7% in tokens/second on SQL tasks and maintained a 46.1% average improvement across mixed-domain queries.
  • Outperforming Bandits: Compared to the BanditSpec baseline, HedgeSpec delivered a 49% gain in Mean Accepted Tokens (MAT) and a 41% increase in tokens/second.
  • Robustness to Distribution Shift: Static routers (e.g., BERT-based classifiers) often fail when prompts vary slightly. In tests where static routers misrouted up to 98% of queries due to minor prompt variations, HedgeSpec adapted on the fly, achieving up to 2.34x gains over the static approach.

Conclusion

HedgeSpec demonstrates that speculative decoding is a perfect environment for full-information online learning. By treating every verified trajectory as a counterfactual oracle, HedgeSpec eliminates the costly exploration phase of bandit algorithms. This results in a system that is not only faster but also more robust and scalable than previous selection methods. Future work may explore "warm starting" the algorithm with offline routers to further optimize the very first steps of the decoding process.

Summary updated

BibTeX
@inproceedings{liu2026not,
  author = {Hongyi Liu and Jiaji Huang and Zhen Jia and Youngsuk Park and Yu-Xiang Wang},
  title = {{Not-a-Bandit: Provably No-Regret Drafter Selection in Speculative Decoding for LLMs}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=JMmljf895g},
}
Figure