cs.LGMar 13, 2026

When Drafts Evolve: Speculative Decoding Meets Online Learning

Authors: Yu-Yang Qian, Hao-Cong Wu, Yichao Fu, Hao Zhang, Peng Zhao

Organizations: State Key Laboratory for Novel Software Technology, Nanjing University · School of Artificial Intelligence, Nanjing University · University of California, San Diego

Abstract

Speculative decoding has emerged as a widely adopted paradigm for accelerating large language model inference, where a lightweight draft model rapidly generates candidate tokens that are then verified in parallel by a larger target model. However, due to limited model capacity, drafts often struggle to approximate the target distribution, resulting in shorter acceptance lengths and diminished speedup. A key yet under-explored observation is that speculative decoding inherently provides verification feedback that quantifies the deviation between the draft and target models at no additional cost. This process naturally forms an iterative "draft commits-feedback provides-draft adapts" evolving loop, which precisely matches the online learning paradigm. Motivated by this connection, we propose OnlineSPEC, a unified framework that systematically leverages interactive feedback to continuously evolve draft models. Grounded in dynamic regret minimization, we establish a formal link between online learning performance and speculative system's acceleration rate, and develop novel algorithms via modern online learning techniques, including optimistic online learning that adaptively reuses historical gradients as predictive update hints, and online ensemble learning that dynamically maintains multiple draft models. Our algorithms are equipped with theoretical justifications and improved acceleration rates, achieving up to 24% speedup over seven benchmarks and five foundation models.

Figures & tables

Appendix figures & tables22 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Learning to Draft: Adaptive Speculative Decoding with Reinforcement Learning

    Mar 2, 2026Jiebin Zhang, Zhenghan Yu, Liang Wang +8Speculative DecodingLLM Inference Acceleration

  2. Draft-OPD: On-Policy Distillation for Speculative Draft Models

    May 28, 2026Haodi Lei, Yafu Li, Haoran Zhang +8Speculative DecodingLLM Inference Acceleration

  3. MineDraft: A Framework for Batch Parallel Speculative Decoding

    Feb 24, 2026Zhenwei Tang, Arun Verma, Zijian Zhou +4Speculative DecodingLLM Inference Acceleration