arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.02175cs.CL
收藏

动量解码:作为图形探索的开放式文本生成

Momentum Decoding: Open-ended Text Generation As Graph Exploration

Beijing Institute of Technology(北京理工大学)

Tian Lan, Yixuan Su, Shuhang Liu, Heyan Huang, Xian-Ling Mao

摘要:

基于自回归语言模型的开放式文本生成是自然语言处理的核心任务之一。然而,基于最大化的解码方法(例如,贪婪/束搜索)经常导致退化问题,即,所生成的文本是不自然的并且包含不期望的重复。这个问题的现有解决方案要么引入随机性,倾向于不一致性,或需要一个前瞻机制,需要额外的计算开销。在本研究中,我们从一个新的角度,即,我们将其视为有向图中的探索过程。因此,我们将退化现象理解为有向图中的循环回路。基于我们的配方,我们提出了一种新的解码方法- \textit{momentum decoding} -它鼓励LM \textit{greedily}探索当前图之外的新节点。同时,它还允许LM返回到现有的节点与一个预先定义的阻力函数降级的动量。我们通过自动和人工评估,在来自不同领域的三个基准上广泛测试了我们的方法。结果表明,动量解码的性能与当前的最先进的,同时享有显着提高的推理速度和计算FLOPs。此外,我们进行了详细的分析,以揭示我们的方法的优点和内部工作。我们的代码和其他相关资源可在https://github.com/gmftbyGMFTBY/MomentumDecoding上公开获取。

英文摘要:

Open-ended text generation with autoregressive language models (LMs) is one of the core tasks in natural language processing. However, maximization-based decoding methods (e.g., greedy/beam search) often lead to the degeneration problem, i.e., the generated text is unnatural and contains undesirable repetitions. Existing solutions to this problem either introduce randomness prone to incoherence or require a look-ahead mechanism that demands extra computational overhead. In this study, we formulate open-ended text generation from a new perspective, i.e., we view it as an exploration process within a directed graph. Thereby, we understand the phenomenon of degeneration as circular loops within the directed graph. Based on our formulation, we propose a novel decoding method -- \textit{momentum decoding} -- which encourages the LM to \textit{greedily} explore new nodes outside the current graph. Meanwhile, it also allows the LM to return to the existing nodes with a momentum downgraded by a pre-defined resistance function. We extensively test our approach on three benchmarks from different domains through automatic and human evaluations. The results show that momentum decoding performs comparably with the current state of the art while enjoying notably improved inference speed and computation FLOPs. Furthermore, we conduct a detailed analysis to reveal the merits and inner workings of our approach. Our codes and other related resources are publicly available at https://github.com/gmftbyGMFTBY/MomentumDecoding.

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

↑