A Theoretical Analysis of the Repetition Problem in Text Generation
Abstract
Text generation tasks, including translation, summarization, language models, and etc. see rapid growth during recent years. Despite the remarkable achievements, the repetition problem has been observed in nearly all text generation models undermining the generation performance extensively. To solve the repetition problem, many methods have been proposed, but there is no existing theoretical analysis to show why this problem happens and how it is resolved. In this paper, we propose a new framework for theoretical analysis for the repetition problem. We first define the Average Repetition Probability (ARP) to characterize the repetition problem quantitatively. Then, we conduct an extensive analysis of the Markov generation model and derive several upper bounds of the average repetition probability with intuitive understanding. We show that most of the existing methods are essentially minimizing the upper bounds explicitly or implicitly. Grounded on our theory, we show that the repetition problem is, unfortunately, caused by the traits of our language itself. One major reason is attributed to the fact that there exist too many words predicting the same word as the subsequent word with high probability. Consequently, it is easy to go back to that word and form repetitions and we dub it as the high inflow problem. Furthermore, we extend our analysis to broader generation models by deriving a concentration bound of the average repetition probability for a general generation model. Finally, based on the theoretical upper bounds, we propose a novel rebalanced encoding approach to alleviate the high inflow problem and thus reducing the upper bound. The experimental results show that our theoretical framework is applicable in general generation models and our proposed rebalanced encoding approach alleviates the repetition problem significantly in both the translation task and the language modeling task. The source code of this paper can be obtained from https://github.com/fuzihaofzh/repetition-problem-nlg.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
31 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Neural Text Generation With Unlikelihood Training cites The Curious Case of Neural Text Degeneration
- The Curious Case of Neural Text Degeneration cites Neural Text Generation With Unlikelihood Training
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformers cites Neural Text Generation With Unlikelihood Training
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformers cites Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformers cites Language Models are Few-Shot Learners
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformers cites The Curious Case of Neural Text Degeneration
- Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation cites Neural Text Generation With Unlikelihood Training
- Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation cites Language Models are Few-Shot Learners
- Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation cites The Curious Case of Neural Text Degeneration
- On the Effectiveness of Parameter-Efficient Fine-Tuning cites Language Models are Few-Shot Learners
- Stay on Topic with Classifier-Free Guidance cites Language Models are Few-Shot Learners
- Stay on Topic with Classifier-Free Guidance cites The Curious Case of Neural Text Degeneration
- Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
- Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data Perspective cites Neural Text Generation With Unlikelihood Training
- Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data Perspective cites Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation
- Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data Perspective cites The Curious Case of Neural Text Degeneration
- The Curious Case of Neural Text Degeneration cites Language GANs Falling Short
Cited by top-tier papers31
- On the Effectiveness of Parameter-Efficient Fine-TuningZihao Fu, Haoran Yang, Anthony Man-Cho So, Wai Lam et al.AAAI 2023 · 234 citations
- Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text GenerationJin Xu, Xiaojiang Liu, Jianhao Yan, Deng Cai et al.NeurIPS 2022 · 135 citations
- Stay on Topic with Classifier-Free GuidanceGuillaume Sanchez, Alexander Spangher, Honglu Fan, Elad Levi et al.ICML 2024 · 76 citations
- Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data PerspectiveHuayang Li, Tian Lan, Zihao Fu, Deng Cai et al.NeurIPS 2023 · 54 citations
- From Self-Attention to Markov Models: Unveiling the Dynamics of Generative TransformersMuhammed Emrullah Ildiz, Yixiao Huang, Yingcong Li, Ankit Singh Rawat et al.ICML 2024 · 45 citations
Builds on6
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
- Neural Text Generation With Unlikelihood TrainingSean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan et al.ICLR 2020 · 683 citations
- Language GANs Falling ShortMassimo Caccia, Lucas Caccia, William Fedus, Hugo Larochelle et al.ICLR 2020 · 236 citations
- Partially-Aligned Data-to-Text Generation with Distant SupervisionZihao Fu, Bei Shi, Wai Lam, Lidong Bing et al.EMNLP 2020 · 19 citations
Related papers
- Rethinking Repetition Problems of LLMs in Code GenerationYihong Dong, Yuchen Liu, Xue Jiang, Bin Gu et al.ACL 2025
- Revisiting Representation Degeneration Problem in Language ModelingZhong Zhang, Chongming Gao, Cong Xu, Rui Miao et al.EMNLP Findings 2020 · 19 citations
- Mitigating the Learning Bias towards Repetition by Self-Contrastive Training for Open-Ended GenerationJian Guan, Minlie HuangACL Findings 2023 · 1 citation
- Context Tokens are Anchors: Understanding the Repeat Curse in dMLLMs from an Information Flow PerspectiveQiyan Zhao, Xiaofeng Zhang, Shuochen Chang, Qianyu Chen et al.ICLR 2026 · 3 citations
- Language Generation with Replay: A Learning-Theoretic View of Model CollapseGiorgio Racca, Michal Valko, Amartya SanyalICML 2026 · 4 citations
