arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.21357cs.CLcs.LG
收藏

用于文本生成的基于能量的扩散语言模型

Energy-Based Diffusion Language Models for Text Generation

Stanford University(斯坦福大学);NVIDIA(英伟达公司)

Minkai Xu, Tomas Geffner, Karsten Kreis, Weili Nie, Yilun Xu, Jure Leskovec, Stefano Ermon, Arash Vahdat

AI总结:

提出基于能量的扩散语言模型(EDLM),通过在序列级别引入残差形式的能量模型改进扩散近似,并利用并行重要性采样加速生成,显著优于现有扩散模型且接近自回归模型性能。

摘要:

尽管自回归语言模型取得了显著进展,但超越从左到右生成的替代生成范式仍在被积极探索。具有并行生成能力的离散扩散模型最近成为一种有前景的替代方案。不幸的是,这些模型的表现仍然不如自回归模型,并且在减少采样步数时性能差距会增大。我们的分析表明,这种退化是扩散模型所使用的不完美近似所导致的后果。在这项工作中,我们提出了基于能量的扩散语言模型(EDLM),这是一种在每个扩散步骤中于完整序列级别运行的基于能量的模型,旨在改进扩散模型所使用的基础近似。更具体地说,我们以残差形式引入了一个EBM,并表明其参数可以通过利用预训练的自回归模型或通过噪声对比估计微调双向Transformer来获得。我们还提出了一种通过并行重要性采样实现的高效生成算法。在语言建模基准上的综合实验表明,我们的模型能够以显著的幅度持续优于最先进的扩散模型,并接近自回归模型的困惑度。我们进一步表明,在没有任何生成性能下降的情况下,我们的框架比现有的扩散模型提供了1.3倍的采样加速。复现代码可在 https://github.com/MinkaiXu/Energy-Diffusion-LLM 获取。

英文摘要:

Despite remarkable progress in autoregressive language models, alternative generative paradigms beyond left-to-right generation are still being actively explored. Discrete diffusion models, with the capacity for parallel generation, have recently emerged as a promising alternative. Unfortunately, these models still underperform the autoregressive counterparts, with the performance gap increasing when reducing the number of sampling steps. Our analysis reveals that this degradation is a consequence of an imperfect approximation used by diffusion models. In this work, we propose Energy-based Diffusion Language Model (EDLM), an energy-based model operating at the full sequence level for each diffusion step, introduced to improve the underlying approximation used by diffusion models. More specifically, we introduce an EBM in a residual form, and show that its parameters can be obtained by leveraging a pretrained autoregressive model or by finetuning a bidirectional transformer via noise contrastive estimation. We also propose an efficient generation algorithm via parallel important sampling. Comprehensive experiments on language modeling benchmarks show that our model can consistently outperform state-of-the-art diffusion models by a significant margin, and approaches autoregressive models' perplexity. We further show that, without any generation performance drop, our framework offers a 1.3$\times$ sampling speedup over existing diffusion models. Reproduced code is available at https://github.com/MinkaiXu/Energy-Diffusion-LLM.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑