DiffuCD: 面向扩散语言模型的高效对比解码
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

TP18

基金项目:

北京市自然科学基金 (4264107); 清华大学-浙江开创电气有限公司多模态具身智能联合研究中心项目


DiffuCD: Efficient Contrastive Decoding for Diffusion Language Models
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    当前主流大语言模型大多采用自回归生成范式, 需要逐token生成文本, 难以满足实际应用对高效推理的需求. 扩散语言模型通过迭代去噪实现并行解码, 在推理效率上具有一定理论优势, 因而被视为提升大语言模型推理效率的一条重要技术路径. 然而, 现有扩散语言模型的生成质量仍有较大提升空间. 对比解码是一种被广泛证明有效的提升语言模型生成质量的方法, 其核心思想是利用能力较弱的业余分布对能力较强的专家分布进行校正. 然而, 现有对比解码方法主要面向自回归语言模型设计, 通常需要额外引入模型来提供业余分布, 这会显著增加推理开销, 削弱扩散语言模型高效推理的核心优势. 为此, 提出一种面向扩散语言模型的高效对比解码方法DiffuCD. 该方法基于一个关键观察: 在扩散语言模型的去噪过程中, 早期时间步由于可利用的上下文信息有限, 预测质量较低; 随着去噪推进, 预测质量逐步提升. 这一特性天然满足对比解码对分布强弱差异的要求. 基于此, DiffuCD直接将历史时间步的预测分布作为业余分布, 将当前时间步的预测分布作为专家分布, 从而对当前分布进行校正. 在4个扩散语言模型和6个评估基准上进行广泛实验. 实验结果表明, DiffuCD能够在多种模型和任务上稳定提升模型生成质量, 并且在吞吐量和峰值显存占用方面与未使用对比解码的对比方法几乎一致, 较好地保留了扩散语言模型高效推理的理论优势.

    Abstract:

    Most mainstream large language models adopt an autoregressive generation paradigm, requiring text to be generated token by token, which makes it difficult to meet the demands of efficient inference in practical applications. Diffusion language models achieve parallel decoding through iterative denoising and therefore offer certain theoretical advantages in inference efficiency, making them an important technical approach to improving the inference efficiency of large language models. However, the generation quality of existing diffusion language models still leaves considerable room for improvement. Contrastive decoding is a method that has been widely demonstrated to be effective in enhancing the generation quality of language models. Its core idea is to correct a stronger expert distribution using a weaker amateur distribution. However, existing contrastive decoding methods are primarily designed for autoregressive language models and typically require an additional model to provide the amateur distribution, which significantly increases inference overhead and undermines the core advantage of efficient inference in diffusion language models. To address this issue, this study proposes DiffuCD, an efficient contrastive decoding method for diffusion language models. The method is based on a key observation: during the denoising process of diffusion language models, predictions at earlier timesteps are of lower quality due to limited available contextual information, while prediction quality progressively improves as denoising proceeds. This property naturally satisfies the requirement of contrastive decoding for distributions of different strengths. Based on this, DiffuCD directly uses the predicted distributions from historical timesteps as the amateur distributions and treats the predicted distribution at the current timestep as the expert distribution, thus correcting the current distribution. This study conducts extensive experiments on multiple diffusion language models and multiple evaluation benchmarks. Experimental results demonstrate that DiffuCD can consistently improve model generation quality across various models and tasks, while maintaining nearly identical throughput and peak memory usage to those of the comparison method without contrastive decoding, effectively preserving the theoretical advantage of diffusion language models in efficient inference.

    参考文献
    相似文献
    引证文献
引用本文

李佳,张奕彤,金芝. DiffuCD: 面向扩散语言模型的高效对比解码.软件学报,2026,37(11):4033-4056

复制
相关视频

分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2026-04-15
  • 最后修改日期:2026-06-24
  • 录用日期:
  • 在线发布日期: 2026-10-14
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62562563 传真:010-62562533 Email:jos@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号