A Contrastive Framework for Neural Text Generation
Yixuan Su, Tian Lan, Yan Wang, Dani Yogatama, Lingpeng, Kong, Nigel Collier

TL;DR
This paper introduces a contrastive training and decoding framework to improve neural text generation, addressing issues of unnatural and repetitive outputs by calibrating token representations and encouraging diversity.
Contribution
It proposes a novel contrastive training objective and a decoding method, contrastive search, to enhance diversity and coherence in neural text generation.
Findings
Outperforms state-of-the-art methods on multiple benchmarks
Improves diversity and coherence in generated text
Validated by human and automatic evaluations
Abstract
Text generation is of great importance to many natural language processing applications. However, maximization-based decoding methods (e.g. beam search) of neural language models often lead to degenerate solutions -- the generated text is unnatural and contains undesirable repetitions. Existing approaches introduce stochasticity via sampling or modify training objectives to decrease probabilities of certain tokens (e.g., unlikelihood training). However, they often lead to solutions that lack coherence. In this work, we show that an underlying reason for model degeneration is the anisotropic distribution of token representations. We present a contrastive solution: (i) SimCTG, a contrastive training objective to calibrate the model's representation space, and (ii) a decoding method -- contrastive search -- to encourage diversity while maintaining coherence in the generated text. Extensive…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗cambridgeltl/simctg_english_wikipediamodel· 15 dl15 dl
- 🤗cambridgeltl/simctg_lccc_dialoguemodel· 12 dl· ♡ 112 dl♡ 1
- 🤗cambridgeltl/simctg_wikitext103model· 12 dl· ♡ 112 dl♡ 1
- 🤗cambridgeltl/simctg_writingpromptsmodel· 12 dl· ♡ 112 dl♡ 1
- 🤗cambridgeltl/simctg_rocstoriesmodel· 10 dl· ♡ 210 dl♡ 2
- 🤗PahaII/gpt-neo-1.3b-simctg-NewsCtrlGenmodel· 3 dl· ♡ 23 dl♡ 2
Videos
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Computational and Text Analysis Methods
