arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2407.21046cs.CLcs.LG
收藏

生成式掩码语言模型的潜力与陷阱:理论框架与实践指南

Promises and Pitfalls of Generative Masked Language Modeling: Theoretical Framework and Practical Guidelines

Carnegie Mellon University(卡内基梅隆大学);Google Research(谷歌研究院)

Yuchen Li, Alexandre Kirchmeyer, Aashay Mehta, Yilong Qin, Boris Dadachev, Kishore Papineni, Sanjiv Kumar, Andrej Risteski

AI总结:

本文提出生成式掩码语言模型的理论框架,通过将T5适配为迭代并行解码实现机器翻译2-3倍加速,并结合消融实验给出设计指南与错误模式分析。

摘要:

自回归语言模型是当前文本生成的主导范式,但它们存在一些无法通过扩大规模来弥补的根本性局限——例如生成过程本质上是顺序且单向的。尽管已有研究探索了其他类别的模型,但我们对它们的基本能力和局限性的数学理解仍然有限。本文聚焦于生成式掩码语言模型(GMLMs),这是一种非自回归范式:我们训练模型通过掩码来拟合数据分布的条件概率,随后将这些条件概率作为马尔可夫链的输入,从而从模型中抽取样本。这些模型在经验上展现出有前景的速度-质量权衡,因为每一步通常可以通过并行解码整个序列来实现并行化。我们开发了一个用于分析和改进此类模型的数学框架,该框架阐明了样本复杂度以及推理速度和质量方面的问题。在实验上,我们将T5模型适配用于迭代精化的并行解码,在机器翻译中实现了2-3倍的加速,且与自回归模型相比质量损失极小。我们进行了细致的消融实验,针对关键设计选择给出建议,并结合我们的理论对常见错误模式进行了细粒度观察。我们的数学分析和实证观察刻画了该方法的潜力和局限性,可应用于未来改进GMLMs理解和性能的工作。我们的代码已发布在https://github.com/google-research/google-research/tree/master/padir。

英文摘要:

Autoregressive language models are the currently dominant paradigm for text generation, but they have some fundamental limitations that cannot be remedied by scale-for example inherently sequential and unidirectional generation. While alternate classes of models have been explored, we have limited mathematical understanding of their fundamental power and limitations. In this paper we focus on Generative Masked Language Models (GMLMs), a non-autoregressive paradigm in which we train a model to fit conditional probabilities of the data distribution via masking, which are subsequently used as inputs to a Markov Chain to draw samples from the model, These models empirically strike a promising speed-quality trade-off as each step can be typically parallelized by decoding the entire sequence in parallel. We develop a mathematical framework for analyzing and improving such models which sheds light on questions of sample complexity and inference speed and quality. Empirically, we adapt the T5 model for iteratively-refined parallel decoding, achieving 2-3x speedup in machine translation with minimal sacrifice in quality compared with autoregressive models. We run careful ablation experiments to give recommendations on key design choices, and make fine-grained observations on the common error modes in connection with our theory. Our mathematical analyses and empirical observations characterize both potentials and limitations of this approach, and can be applied to future works on improving understanding and performance of GMLMs. Our codes are released at https://github.com/google-research/google-research/tree/master/padir

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

↑