Skip to main content
QUICK REVIEW

[论文解读] Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation

Jin Xu, Xiaojiang Liu|arXiv (Cornell University)|Jun 6, 2022
Topic ModelingComputer Science被引用 21
一句话总结

该论文分析为何神经语言模型倾向重复先前的句子,并提出一种训练方法 DITTO 以对重复概率实现指数衰减,从而在不降低困惑度的情况下提升生成质量。

ABSTRACT

While large-scale neural language models, such as GPT2 and BART, have achieved impressive results on various text generation tasks, they tend to get stuck in undesirable sentence-level loops with maximization-based decoding algorithms ( extit{e.g.}, greedy search). This phenomenon is counter-intuitive since there are few consecutive sentence-level repetitions in human corpora (e.g., 0.02\% in Wikitext-103). To investigate the underlying reasons for generating consecutive sentence-level repetitions, we study the relationship between the probabilities of the repetitive tokens and their previous repetitions in the context. Through our quantitative experiments, we find that 1) Language models have a preference to repeat the previous sentence; 2) The sentence-level repetitions have a extit{self-reinforcement effect}: the more times a sentence is repeated in the context, the higher the probability of continuing to generate that sentence; 3) The sentences with higher initial probabilities usually have a stronger self-reinforcement effect. Motivated by our findings, we propose a simple and effective training method extbf{DITTO} (Pseu\underline{D}o-Repet\underline{IT}ion Penaliza\underline{T}i\underline{O}n), where the model learns to penalize probabilities of sentence-level repetitions from pseudo repetitive data. Although our method is motivated by mitigating repetitions, experiments show that DITTO not only mitigates the repetition issue without sacrificing perplexity, but also achieves better generation quality. Extensive experiments on open-ended text generation (Wikitext-103) and text summarization (CNN/DailyMail) demonstrate the generality and effectiveness of our method.

研究动机与目标

  • 研究为何基于最大化的解码在神经文本生成中导致句子级重复。
  • 量化重复概率与上下文中先前重复之间的关系。
  • 开发基于训练的解决方案,在不损害语言模型性能的情况下减少重复。
  • 展示该方法在开放式生成和摘要任务中的有效性。

提出的方法

  • 通过构造重复句子并在重复过程中测量令牌概率的变化来分析重复动力学。
  • 定义度量标准:Average Token Probability(TP,平均令牌概率)、Rate of Increased Token Probability(IP,令牌概率增加率)和Winner Rate(WR),以表征自我强化。
  • 提出 DITTO(伪重复惩罚),通过生成伪重复数据并应用对重复惩罚的损失,使重复概率随重复次数衰减(由 lambda 控制)。
  • 使用标准 MLE 损失与 DITTO 损失的混合,对预训练 Transformer 模型进行微调,以学习避免过度重复。
  • 在 Wikitext-103 开放式生成和 CNN/DailyMail 摘要任务上使用 MAUVE、困惑度、准确率和重复指标进行评估;评估与随机采样解码的兼容性。

实验结果

研究问题

  • RQ1在基于最大化的解码下,为何语言模型偏好重复先前的句子?
  • RQ2当历史重复累积时,重复概率如何演变(自我强化)?
  • RQ3哪些句子更容易被重复,原因是什么?
  • RQ4基于训练的方法能否在不牺牲语言模型质量的情况下减轻重复?
  • RQ5所提方法 DITTO 在开放式生成和摘要任务中是否有效?

主要发现

  • 模型表现出强烈偏好重复前一句话,即使在上下文中只有一次重复。
  • 重复概率呈现自我强化效应:随着先前重复次数增加而增加,并在上限处稳定。
  • 初始概率更高的句子经历更强的自我强化,更容易被重复生成。
  • DITTO 训练在减少句子级和短语级重复的同时,提升或保持生成质量(困惑度、准确性、MAUVE)。
  • DITTO 在随机解码策略(Top-k、nucleus 采样)下仍然有效,并提升 CNN/DailyMail 的摘要评估指标。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。