Evade the Trap of Mediocrity: Promoting Diversity and Novelty in Text Generation via Concentrating Attention

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.
Anthology ID:
2022.emnlp-main.745
Volume:
Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing
Month:
December
Year:
2022
Address:
Abu Dhabi, United Arab Emirates
Editors:
Yoav Goldberg, Zornitsa Kozareva, Yue Zhang
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
10834–10858
Language:
URL:
https://aclanthology.org/2022.emnlp-main.745
DOI:
10.18653/v1/2022.emnlp-main.745
Bibkey:
Cite (ACL):
Wenhao Li, Xiaoyuan Yi, Jinyi Hu, Maosong Sun, and Xing Xie. 2022. Evade the Trap of Mediocrity: Promoting Diversity and Novelty in Text Generation via Concentrating Attention. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 10834–10858, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
Cite (Informal):
Evade the Trap of Mediocrity: Promoting Diversity and Novelty in Text Generation via Concentrating Attention (Li et al., EMNLP 2022)
Copy Citation:
PDF:
https://aclanthology.org/2022.emnlp-main.745.pdf