Evade the Trap of Mediocrity: Promoting Diversity and Novelty in Text Generation via Concentrating Attention
Authors: Wenhao Li, Xiaoyuan Yi, Jinyi Hu, Maosong Sun, Xing Xie
Abstract
Recently, powerful Transformer architectures have proven superior in generating high-quality sentences. Nevertheless, these models tend to produce dull high-frequency phrases, severely hurting the diversity and novelty of generated text. In this work, we dig into the intrinsic mechanism of this problem and found that sparser attention values in Transformer could improve diversity. To understand such a phenomenon, we first conduct both empirical and theoretical analysis and then attribute it to representation degeneration caused by the attentive mixture of the hidden states during training. We term this process the Trap of Mediocrity. To escape from such a trap, we introduce a novel attention regularization loss to control the sharpness of the attention distribution, which is transparent to model structures and can be easily implemented within 20 lines of python code. We prove that this method could be mathematically regarded as learning a Bayesian approximation of posterior attention. Experiments show that our method improved the diversity and novelty of the generated text while maintaining comparable quality on a variety of conditional and unconditional generation tasks.
The papers around it, by date and closeness
Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper
Papers around this one
Ranked by how close their title and abstract are to this paper’s. Select some to read them together.
Closest papers
-
DiffSampling: Enhancing Diversity and Accuracy in Neural Text GenerationGiorgio Franceschelli, Mirco Musolesi · 2025 · Trans. Mach. Learn. Res. · cited 6 times · Not summarized yet
DiffSampling changes token decoding to balance contextual accuracy and diversity, while this paper sharpens Transformer attention during training.
Abstract
Despite their growing capabilities, language models still frequently reproduce content from their training data, generate repetitive text, and favor common grammatical patterns and vocabulary. A possible cause is the decoding strategy: the most common strategies either consider only the most probable tokens, which reduces output diversity, or increase the likelihood of unlikely tokens, compromising output accuracy and correctness. In this paper, we propose DiffSampling, a new decoding method that leverages a mathematical analysis of the token probability distribution to ensure the generation of contextually appropriate text. In particular, the difference between consecutive, sorted probabili…
-
Diversity-Promoting GAN: A Cross-Entropy Based Generative Adversarial Network for Diversified Text GenerationJing-Jing Xu, Xuancheng Ren, Jun-Yang Lin et al. · 2018 · Conference on Empirical Methods in Natural Language Processing · cited 154 times · Not summarized yet
Diversity-Promoting GAN rewards novel, fluent outputs in review and dialogue generation, whereas this paper regularizes attention to increase novelty.
Abstract
Existing text generation methods tend to produce repeated and ”boring” expressions. To tackle this problem, we propose a new text generation model, called Diversity-Promoting Generative Adversarial Network (DP-GAN). The proposed model assigns low reward for repeatedly generated text and high reward for ”novel” and fluent text, encouraging the generator to produce diverse and informative text. Moreover, we propose a novel language-model based discriminator, which can better distinguish novel text from repeated text without the saturation problem compared with existing classifier-based discriminators. The experimental results on review generation and dialogue generation tasks demonstrate that …
-
On-the-Fly Attention Modulation for Neural GenerationYue Dong, Chandra Bhagavatula, Ximing Lu et al. · 2021 · Findings · cited 17 times · Not summarized yet
On-the-Fly Attention Modulation injects priors into attention at inference to address degeneration, while this paper regularizes attention during training.
Abstract
Despite considerable advancements with deep neural language models (LMs), neural text generation still suffers from degeneration: the generated text is repetitive, generic, self-contradictory, and often lacks commonsense. Our analyses on sentence-level attention patterns in LMs reveal that neural degeneration may be associated with insufficient learning of task-specific characteristics by the attention mechanism. This finding motivates on-the-fly attention modulation -- a simple but effective method that enables the injection of priors into attention computation during inference. Automatic and human evaluation results on three text generation benchmarks demonstrate that attention modulation …
-
TILGAN: Transformer-based Implicit Latent GAN for Diverse and Coherent Text GenerationShizhe Diao, Xinwei Shen, Kashun Shum et al. · 2021 · Findings · cited 29 times · Not summarized yet
TILGAN combines a Transformer autoencoder with a latent-space GAN for diverse coherent text, whereas this paper controls attention sharpness.
Abstract
Conventional autoregressive models have achieved great success in text generation but suffer from the exposure bias problem in that token sequences in the training and in the generation stages are mismatched. While generative adversarial networks (GANs) can remedy this problem, existing implementations of GANs directly on discrete outputs tend to be unstable and lack diversity. In this work, we propose TILGAN , a T ransformer-based I mplicit L atent GAN , which combines a Transformer autoencoder and GAN in the latent space with a novel design and distribution matching based on the Kullback-Leibler (KL) divergence. Specifically, to improve local and global coherence, we explicitly introduce a …
-
Generating Diverse Translation by Manipulating Multi-Head AttentionZewei Sun, Shujian Huang, Hao-Ran Wei et al. · 2019 · AAAI Conference on Artificial Intelligence · cited 37 times · Not summarized yet
Generating Diverse Translation manipulates decoder attention heads to produce varied translations, while this paper regularizes attention to diversify generated text.
Abstract
Transformer model (Vaswani et al. 2017) has been widely used in machine translation tasks and obtained state-of-the-art results. In this paper, we report an interesting phenomenon in its encoder-decoder multi-head attention: different attention heads of the final decoder layer align to different word translation candidates. We empirically verify this discovery and propose a method to generate diverse translations by manipulating heads. Furthermore, we make use of these diverse translations with the back-translation technique for better data augmentation. Experiment results show that our method generates diverse translations without a severe drop in translation quality. Experiments also show …
-
Diversity regularized autoencoders for text generationHye-Jung Ko, Junhyuk Lee, Jinhong Kim et al. · 2020 · ACM Symposium on Applied Computing · cited 2 times · Not summarized yet
Diversity regularized autoencoders use sentence modifications and adversarial training for diverse coherent text, unlike this paper’s attention regularization.
Abstract
In this paper, we propose a simple yet powerful text generation model, called diversity regularized autoencoders (DRAE). The key novelty of the proposed model lies in its ability to handle various sentence modifications such as insertions, deletions, substitutions, and maskings, and to take them as input. Because the noise-injection strategy enables an encoder to make the latent distribution smooth and continuous, the proposed model can generate more diverse and coherent sentences. Also, we adopt the Wasserstein generative adversarial networks with a gradient penalty to achieve stable adversarial training of the prior distribution. We evaluate the proposed model using quantitative, qualitati…
-
Breaking the Attention BottleneckKalle Hilsenbek · 2024 · arXiv.org · preprint, not peer reviewed · cited 2 times · Not summarized yet
Breaking the Attention Bottleneck replaces attention with a generative function to address computational and decoder-pattern issues, rather than text diversity.
Abstract
Attention-based transformers have become the standard architecture in many deep learning fields, primarily due to their ability to model long-range dependencies and handle variable-length input sequences. However, the attention mechanism with its quadratic complexity is a significant bottleneck in the transformer architecture. This algorithm is only uni-directional in the decoder and converges to a static pattern in over-parametrized decoder-only models. I address this issue by developing a generative function as attention or activation replacement. It still has the auto-regressive character by comparing each token with the previous one. In my test setting with nanoGPT this yields a smaller …
-
Attention with Markov: A Framework for Principled Analysis of Transformers via Markov ChainsAshok Vardhan Makkuva, Marco Bondaschi, Adway Girish et al. · 2024 · Machine Learning · preprint, not peer reviewed · cited 46 times · AI summary available
Attention with Markov analyzes Transformer sequence modeling using Markov chains, while this paper studies attention and diversity in text generation.
Abstract
In recent years, attention-based transformers have achieved tremendous success across a variety of disciplines including natural languages. A key ingredient behind their success is the generative pretraining procedure, during which these models are trained on a large text corpus in an auto-regressive manner. To shed light on this phenomenon, we propose a new framework that allows both theory and systematic experiments to study the sequential modeling capabilities of transformers through the lens of Markov chains. Inspired by the Markovianity of natural languages, we model the data as a Markovian source and utilize this framework to systematically study the interplay between the data-distribu…
Prior work it builds on
-
The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du et al. · 2019 · International Conference on Learning Representations · cited 4,752 times · Not summarized yet
The Curious Case of Neural Text Degeneration links likelihood-based decoding to bland, repetitive text, motivating this paper’s focus on generated-text diversity.
Abstract
Despite considerable advancements with deep neural language models, the enigma of neural text degeneration persists when these models are tested as text generators. The counter-intuitive empirical observation is that even though the use of likelihood as training objective leads to high quality models for a broad range of language understanding tasks, using likelihood as a decoding objective leads to text that is bland and strangely repetitive. In this paper, we reveal surprising distributional differences between human text and machine text. In addition, we find that decoding strategies alone can dramatically effect the quality of machine text, even when generated from exactly the same neura…
-
A Simple, Fast Diverse Decoding Algorithm for Neural GenerationJiwei Li, Will Monroe, Dan Jurafsky · 2016 · arXiv.org · preprint, not peer reviewed · cited 261 times · Not summarized yet
A Simple, Fast Diverse Decoding Algorithm adds sibling penalties to beam search for diverse outputs, while this paper regularizes attention.
Abstract
In this paper, we propose a simple, fast decoding algorithm that fosters diversity in neural generation. The algorithm modifies the standard beam search algorithm by adding an inter-sibling ranking penalty, favoring choosing hypotheses from diverse parents. We evaluate the proposed model on the tasks of dialogue response generation, abstractive summarization and machine translation. We find that diverse decoding helps across all tasks, especially those for which reranking is needed. We further propose a variation that is capable of automatically adjusting its diversity decoding rates for different inputs using reinforcement learning (RL). We observe a further performance boost from this RL t…
-
Generating Long Sequences with Sparse TransformersRewon Child, Scott Gray, Alec Radford et al. · 2019 · Machine Learning · preprint, not peer reviewed · cited 2,780 times · AI summary available
Generating Long Sequences with Sparse Transformers introduces sparse attention factorizations, relevant to this paper’s finding that sparser attention improves diversity.
Abstract
Transformers are powerful sequence models, but require time and memory that grows quadratically with the sequence length. In this paper we introduce sparse factorizations of the attention matrix which reduce this to $O(n \sqrt{n})$. We also introduce a) a variation on architecture and initialization to train deeper networks, b) the recomputation of attention matrices to save memory, and c) fast attention kernels for training. We call networks with these changes Sparse Transformers, and show they can model sequences tens of thousands of timesteps long using hundreds of layers. We use the same architecture to model images, audio, and text from raw bytes, setting a new state of the art for dens…
-
Representation Degeneration Problem in Training Natural Language Generation ModelsJun Gao, Di He, Xu Tan et al. · 2019 · International Conference on Learning Representations · cited 438 times · Not summarized yet
Representation Degeneration Problem studies narrowing word embeddings during language-generation training, a representation-degeneration issue related to this paper’s account of attention mixtures.
Abstract
We study an interesting problem in training neural network-based models for natural language generation tasks, which we call the \emph{representation degeneration problem}. We observe that when training a model for natural language generation tasks through likelihood maximization with the weight tying trick, especially with big training datasets, most of the learnt word embeddings tend to degenerate and be distributed into a narrow cone, which largely limits the representation power of word embeddings. We analyze the conditions and causes of this problem and propose a novel regularization method to address it. Experiments on language modeling and machine translation show that our method can …
-
On the Relation between Quality-Diversity Evaluation and Distribution-Fitting Goal in Text GenerationJianing Li, Yan-Yan Lan, Jia-Feng Guo et al. · 2020 · International Conference on Machine Learning · cited 8 times · Not summarized yet
On the Relation between Quality-Diversity Evaluation and Distribution-Fitting Goal analyzes how quality and diversity metrics relate to distribution fitting, rather than proposing an attention method.
Abstract
The goal of text generation models is to fit the underlying real probability distribution of text. For performance evaluation, quality and diversity metrics are usually applied. However, it is still not clear to what extend can the quality-diversity evaluation reflect the distribution-fitting goal. In this paper, we try to reveal such relation in a theoretical approach. We prove that under certain conditions, a linear combination of quality and diversity constitutes a divergence metric between the generated distribution and the real distribution. We also show that the commonly used BLEU/Self-BLEU metric pair fails to match any divergence metric, thus propose CR/NRR as a substitute for qualit…
Papers that cite it
-
Breaking the Likelihood Trap: Variance-Calibrated Modulation for Large Language Model DecodingYuanhao Ding, Meimingwei Li, E. Arias et al. · 2026 · Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing · cited 4 times · Not summarized yet
Variance-Calibrated Modulation cites this paper and proposes a training-free decoding intervention for repetitive, dull output, instead of training-time attention regularization.
Abstract
In open-ended generation, LLMs frequently fall into the"likelihood trap", characterized by repetitive degeneration and vocabulary dullness, resulting in a discrepancy between machine-generated and human-written text. While post-hoc tail truncation (e.g., Top-p, Min-p) avoids sampling from the unreliable tail, it can misalign generation with human lexical preferences by over-sampling from the uncalibrated head; fixed scalar repetition penalties, in turn, ignore how the scale of the logit distribution varies across inference steps, which can disrupt semantic coherence. To address both shortcomings, we propose Variance-Calibrated Modulation (VCM), a training-free pre-decoding intervention. VCM …
-
A survey of diversity quantification in natural language processing: The why, what, where and howLouis Estève, Marie-Catherine de Marneffe, Nurit Melnik et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 10 times · Not summarized yet
A Survey of Diversity Quantification reviews diversity concepts and measures in NLP, including work on text-generation diversity.
Abstract
The concept of diversity received increasing attention in natural language processing (NLP) in recent years. It became an advocated property of datasets and systems, with many measures used to quantify it, but also many cross-paper inconsistencies. To address this fragmentation, we take inspiration from other scientific fields where diversity has been more thoroughly conceptualized. We build upon (Sarkar, 2010) and (Stirling, 2007), two unified cross-domain frameworks inspired from ecology, economy and other domains. The first one advocates explicit justification of diversity endorsement. The latter distinguishes three dimensions of diversity: variety, balance, and disparity. Surveying over …
-
Prompting Test-Time Scaling Is A Strong LLM Reasoning Data AugmentationS. Mahmoud Bsharat, Zhi-Qiang Shen · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 3 times · Not summarized yet
Prompting Test-Time Scaling synthesizes varied reasoning contexts for LLM fine-tuning, a different application of generation diversity.
Abstract
Large language models (LLMs) have demonstrated impressive reasoning capabilities when provided with chain-of-thought exemplars, but curating large reasoning datasets remains laborious and resource-intensive. In this work, we introduce Prompting Test-Time Scaling (P-TTS), a simple yet effective inference-time data augmentation strategy for enhancing LLM reasoning through finetuning. Rather than collecting thousands or even millions of examples, P-TTS leverages a small pool of only 90 manually selected reasoning instances and systematically varies exemplar augmentation through principled instruction prompting intensities at test time to synthesize diverse reasoning trajectory contexts. Then we…
-
Putting on the Thinking Hats: A Survey on Chain of Thought Fine-tuning from the Perspective of Human Reasoning MechanismXiao-Shu Chen, Si-Hang Zhou, K. Liang et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 8 times · Not summarized yet
Putting on the Thinking Hats surveys chain-of-thought fine-tuning and reasoning capabilities, rather than attention-based text diversity.
Abstract
Chain of thought (CoT) fine-tuning aims to endow large language models (LLMs) with reasoning capabilities by training them on curated reasoning traces. It leverages both supervised and reinforced fine-tuning to cultivate human-like reasoning skills in LLMs, including detailed planning, divergent thinking, intuitive judgment, timely reflection, internal thinking, and fact perception, etc. As CoT fine-tuning has advanced, LLMs have demonstrated substantial improvements in tasks such as mathematical reasoning and code generation. However, existing surveys about CoT fine-tuning primarily focus on technical aspects and overlook a systematic analysis from the perspective of human reasoning mechani…
Go further
How are these papers found?
We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.
Updated on 6 November 2026.