arXiv:2605.04543cs.CLcs.LG2026-05

统一多步多草稿推测解码,提升生成效率与准确性

UniVer: A Unified Perspective for Multi-step and Multi-draft Speculative Decoding

论文配图:UniVer: A Unified Perspective for Multi-step and Multi-draft Speculative Decoding
图 1 · 摘自论文原文
  • 将树状候选验证建模为条件最优传输问题,联合优化多步与多草稿
  • 实验显示接受长度提升4.2%至8.5%,且保持目标模型分布一致
  • 适用于需高效生成的场景,如大模型推理加速与资源受限部署

推测解码通过先生成草稿再验证的方式加速大语言模型。现有方法通常孤立处理多草稿与多步问题,或使用平面最优传输处理单步草稿,或对树状候选逐标记拒绝采样。这种分离导致多步依赖与多草稿分支的联合优化不足,局部验证规则无法利用候选树中水平与垂直维度的耦合关系。本文提出统一视角,将基于树的验证视为条件最优传输(Conditional OT)问题。核心洞察是:通过前缀接受概率抽象垂直依赖,作为动态缩放因子主动引导水平草稿选择。基于此,我们提出UniVer算法,在前缀约束下组合局部最优传输计划,实现跨树层级的联合优化。理论证明,UniVer保持无损性,并在所提框架下达到最优接受率。大量实验表明,相比标准递归拒绝采样(无替换),UniVer在不同任务与模型上将接受长度提升4.2%至8.5%,同时维持与目标模型的精确分布对齐。

原文摘要 · Abstract (English)

Speculative decoding accelerates Large Language Models via draft-then-verify, where verification can be framed as an Optimal Transport (OT) problem. Existing approaches typically handle multi-draft and multi-step aspects in isolation, applying either flat OT to single-step drafts or per-token rejection sampling to tree-structured candidates. This separation leaves the joint regime (where multi-step dependencies meet multi-draft branching) poorly optimized, as local verification rules fail to exploit the coupling between horizontal and vertical dimensions of candidate trees. In this paper, we propose a unified perspective that casts tree-based verification as a conditional OT problem. Our key insight is that vertical dependencies can be abstracted through prefix acceptance probabilities, which act as dynamic scaling factors to actively guide horizontal draft selection. Based on this principle, we introduce UniVer, a verification algorithm that jointly optimizes across tree levels by composing local optimal transport plans under prefix constraints. We prove that UniVer remains lossless and achieves the optimal acceptance rate under the proposed conditional framework. Extensive experiments across different tasks and models demonstrate that UniVer improves acceptance length by 4.2% to 8.5% over standard recursive rejection sampling without replacement, while maintaining exact distributional alignment with the target model.

推测解码最优传输大模型加速生成优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。