Diffusion Language Models Know the Answer Before Decoding
这篇论文提出了一种名为Prophet的训练无关快速解码范式,通过利用扩散语言模型(DLM)中被忽视的“早期答案收敛”特性,显著减少解码步骤,从而加快DLM的推理速度,同时保持较高的生成质量。
更新于 2025-10-08。作者:Pengxiang Li、Yefan Zhou、Dilxat Muhtar、Lu Yin、Shilin Yan、Li Shen、Yi Liang、Soroush Vosoughi、Shiwei Liu。
中文摘要
扩散语言模型 (DLMs) 最近已成为自回归方法的替代方案,提供并行序列生成和灵活的标记顺序。然而,它们的推理速度仍然慢于自回归模型,这主要是因为双向注意力成本高以及高质量输出需要大量的细化步骤。在这项工作中,我们着重强调并利用了 DLM 一个被忽视的特性:早期答案收敛:在许多情况下,正确的答案可以在最终解码步骤之前的半步中被内部识别出来,无论是在半自回归还是随机重新掩蔽调度下。例如,在 GSM8K 和 MMLU 上,分别高达 97% 和 99% 的实例可以使用一半的细化步骤正确解码。基于这一观察结果,我们引入了 Prophet,这是一种无需训练的快速解码范式,它能够实现早期确定解码。具体来说,Prophet 动态地决定是继续细化还是“孤注一掷”(即一步解码所有剩余标记),使用前两个预测候选之间的置信度差距作为标准。它可以无缝集成到现有的 DLM 实现中,产生的额外开销可以忽略不计,并且不需要额外的训练。对 LLaDA-8B 和 Dream-7B 在多个任务上的实证评估表明,Prophet 将解码步骤的数量减少了高达 3.4 倍,同时保持了较高的生成质量。这些结果将 DLM 解码重新定义为何时停止采样的问题,并证明早期解码收敛提供了一种简单而强大的机制来加速 DLM 推理,可以补充现有的加速技术。我们的代码已公开发布在 https://github.com/pixeli99/Prophet。
英文摘要
Diffusion language models (DLMs) have recently emerged as an alternative to autoregressive approaches, offering parallel sequence generation and flexible token orders. However, their inference remains slower than that of autoregressive models, primarily due to the cost of bidirectional attention and the large number of refinement steps required for high quality outputs. In this work, we highlight and leverage an overlooked property of DLMs early answer convergence: in many cases, the correct answer can be internally identified by half steps before the final decoding step, both under semi-autoregressive and random remasking schedules. For example, on GSM8K and MMLU, up to 97% and 99% of instances, respectively, can be decoded correctly using only half of the refinement steps. Building on this observation, we introduce Prophet, a training-free fast decoding paradigm that enables early commit decoding. Specifically, Prophet dynamically decides whether to continue refinement or to go "all-in" (i.e., decode all remaining tokens in one step), using the confidence gap between the top-2 prediction candidates as the criterion. It integrates seamlessly into existing DLM implementations, incurs negligible overhead, and requires no additional training. Empirical evaluations of LLaDA-8B and Dream-7B across multiple tasks show that Prophet reduces the number of decoding steps by up to 3.4x while preserving high generation quality. These results recast DLM decoding as a problem of when to stop sampling, and demonstrate that early decode convergence provides a simple yet powerful mechanism for accelerating DLM inference, complementary to existing speedup techniques. Our code is publicly available at https://github.com/pixeli99/Prophet.
解读
一句话总结
这篇论文提出了一种名为Prophet的训练无关快速解码范式,通过利用扩散语言模型(DLM)中被忽视的“早期答案收敛”特性,显著减少解码步骤,从而加快DLM的推理速度,同时保持较高的生成质量。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:扩散语言模型(DLMs)虽然具有并行生成和灵活的token顺序等优点,但其推理速度通常比自回归模型慢,主要原因是双向注意力机制的计算成本高以及高质量输出需要大量的细化步骤。
- 现有方案不足:现有的加速DLM推理的方法主要集中在改进KV缓存机制或优化采样方法上,而忽略了DLM本身的一些特性。
- 研究目标:论文的目标是探索并利用DLM的特性来加速推理过程,提高其效率。
问题2:论文的核心创新点是什么?
- 技术创新:提出了一种名为Prophet的训练无关快速解码范式,该范式能够在答案收敛后提前结束解码过程。
- 方法改进:Prophet利用top-2预测候选之间的置信度差距作为判断是否提前解码的标准,动态地决定是继续细化还是直接解码所有剩余token。
- 优势:与现有方法相比,Prophet无需额外的训练,且计算开销可忽略不计,能够在保持高生成质量的同时,将解码步骤减少高达3.4倍。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在多个任务和数据集(GSM8K,MMLU等)上,对LLaDA-8B和Dream-7B模型进行了实验,比较了Prophet、标准全步解码和仅使用一半步骤的解码方法的性能。
- 性能提升:Prophet将解码步骤减少了高达3.4倍。
- 对比结果:在大多数任务上,Prophet的性能与标准全步解码方法相当,甚至在某些任务上超过了后者,并且显著优于仅使用一半步骤的解码方法。
问题4:这个研究的实际应用价值是什么?
- 应用场景:Prophet可以应用于各种需要使用DLMs的场景,例如文本生成、问答等,以提高这些应用的效率。
- 实施建议:Prophet可以作为现有的DLM推理代码的包装器,方便集成到现有的系统中。
- 局限与展望:论文中未明确指出Prophet方法的局限性。未来可以探索更精细的置信度差距计算方法,以及将Prophet与其他加速技术结合使用,进一步提高DLM的推理速度。