Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation
Jin Xu, Xiaojiang Liu, Jianhao Yan, Deng Cai, Huayang Li, Jian Li
摘要
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 (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 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 DITTO (PseuDo-RepetITion PenalizaTiOn), 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. Code is released at https://github.com/Jxu-Thu/DITTO .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 38 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Neural Text Generation With Unlikelihood Training 引用了 The Curious Case of Neural Text Degeneration
- The Curious Case of Neural Text Degeneration 引用了 Neural Text Generation With Unlikelihood Training
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformers 引用了 Neural Text Generation With Unlikelihood Training
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformers 引用了 Language Models are Few-Shot Learners
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformers 引用了 The Curious Case of Neural Text Degeneration
- MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers 引用了 Neural Text Generation With Unlikelihood Training
- MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers 引用了 Language Models are Few-Shot Learners
- MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers 引用了 The Curious Case of Neural Text Degeneration
- DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language Models 引用了 Language Models are Few-Shot Learners
- Language Models are Few-Shot Learners 引用了 The Curious Case of Neural Text Degeneration
- PLANNER: Generating Diversified Paragraph via Latent Language Diffusion Model 引用了 Neural Text Generation With Unlikelihood Training
- PLANNER: Generating Diversified Paragraph via Latent Language Diffusion Model 引用了 The Curious Case of Neural Text Degeneration
- PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization 引用了 Neural Text Generation With Unlikelihood Training
- Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data Perspective 引用了 Neural Text Generation With Unlikelihood Training
- Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data Perspective 引用了 MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence Frontiers
- Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data Perspective 引用了 The Curious Case of Neural Text Degeneration
引用它的顶会 Paper38
- DoLa: Decoding by Contrasting Layers Improves Factuality in Large Language ModelsYung-Sung Chuang, Yujia Xie, Hongyin Luo, Yoon Kim 等ICLR 2024 · 354 次引用
- PLANNER: Generating Diversified Paragraph via Latent Language Diffusion ModelYizhe Zhang, Jiatao Gu, Zhuofeng Wu, Shuangfei Zhai 等NeurIPS 2023 · 65 次引用
- Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data PerspectiveHuayang Li, Tian Lan, Zihao Fu, Deng Cai 等NeurIPS 2023 · 54 次引用
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative TransformersMuhammed Emrullah Ildiz, Yixiao Huang, Yingcong Li, Ankit Singh Rawat 等ICML 2024 · 45 次引用
- CodeHalu: Investigating Code Hallucinations in LLMs via Execution-based VerificationYuchen Tian, Weixiang Yan, Qian Yang, Xuandong Zhao 等AAAI 2025 · 41 次引用
它引用的 Paper14
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes 等ICLR 2020 · 4,112 次引用
- PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive SummarizationJingqing Zhang, Yao Zhao, Mohammad Saleh, Peter J. LiuICML 2020 · 2,453 次引用
- Neural Text Generation With Unlikelihood TrainingSean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan 等ICLR 2020 · 683 次引用
- MAUVE: Measuring the Gap Between Neural Text and Human Text using Divergence FrontiersKrishna Pillutla, Swabha Swayamdipta, Rowan Zellers, John Thickstun 等NeurIPS 2021 · 606 次引用
相关 Paper
- Mitigating the Learning Bias towards Repetition by Self-Contrastive Training for Open-Ended GenerationJian Guan, Minlie HuangACL Findings 2023 · 1 次引用
- Rethinking Repetition Problems of LLMs in Code GenerationYihong Dong, Yuchen Liu, Xue Jiang, Bin Gu 等ACL 2025
- FOCUS & RePAIR: Mitigating Text Degeneration via Token-Level Guidance For Pruned Large Language ModelsJunyoung Lee, Sehyeon Park, Shinhyoung Jang, Seonha Ryu 等ICML 2026
- The Hyperfitting Phenomenon: Sharpening and Stabilizing LLMs for Open-Ended Text GenerationFredrik Carlsson, Fangyu Liu, Daniel Ward, Murathan Kurfali 等ICLR 2025 · 1 次引用
- A Contrastive Framework for Neural Text GenerationYixuan Su, Tian Lan, Yan Wang, Dani Yogatama 等NeurIPS 2022 · 349 次引用
