用三种方法提升扩散模型生成文本的推理效率,让预测更准更快。
Teaching Diffusion to Speculate Left-to-Right

- 引入位置加权、首个错误聚焦损失和链式损失,优化训练目标
- 在多个基准上使可接受的生成长度提升21%-76%
- 无需额外推理步骤,兼容现有推理流程
大型语言模型在多项任务中表现优异,但自回归解码因逐词生成导致推理成本高。推测解码通过轻量级草稿模型并行生成多个未来词元,再由大模型并行验证来缓解此问题。最新研究表明,扩散语言模型适合该场景,因其可并行生成整块词元,突破自回归草稿的串行限制。但一个关键问题是:块内扩散模型双向生成词元,而验证模型严格左到右评估,造成训练与验证目标不一致。本文提出三种训练阶段干预:词元位置加权、首个错误聚焦损失(针对每块中首次破坏前缀的位置)、链式损失(用可微代理替代期望接受长度)。三者作用维度互补(位置、块条件首错、联合前缀),可叠加使用,且与测试时对齐机制如多草稿自选择正交,可组合应用。在四个目标模型和六个推理、代码、对话基准上,三者联合使接受的草稿长度相比无位置权重基线平均提升21%-76%,且不增加前向传播次数,也不改变推理管道或拒绝采样的精确性承诺。
原文摘要 · Abstract (English)
Large language models (LLMs) achieve remarkable performance across a wide range of tasks, but their autoregressive decoding process incurs substantial inference costs due to inherently sequential token generation. Speculative decoding addresses this bottleneck by employing a lightweight draft model to propose multiple future tokens that are subsequently verified in parallel by a larger target model. Recent work has demonstrated that diffusion language models are well suited for this setting, as they can generate entire blocks of draft tokens in parallel and thereby alleviate the sequential constraints of autoregressive drafting. A subtlety of this regime is that block-diffusion drafters generate tokens bidirectionally within a block, whereas verification is performed by an autoregressive target model that evaluates tokens in a strictly left-to-right manner, leaving a gap between the symmetric training-time objective and the asymmetric verification-time reward. In this work, we offer an empirical analysis of three training-time interventions that narrow this gap: token positional weighting, a first-error focal loss that targets the position that breaks the accepted prefix within each block, and a chain loss term that substitutes a differentiable surrogate for the expected accepted length. The three interventions act along orthogonal axes (position, block-conditional first error, joint prefix) and compose additively; they are likewise orthogonal to test-time alignment mechanisms such as multi-draft self-selection, with which they can in principle be combined. Across four target models and six reasoning, code, and dialogue benchmarks, the three interventions raise accepted draft length by 21-76% per benchmark over a position-uniform baseline, without adding additional forward passes and without changing the inference pipeline or the rejection-sampling exactness contract.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。