CoNT: Contrastive Neural Text Generation

Chenxin An, Jiangtao Feng, Kai Lv, Lingpeng Kong, Xipeng Qiu +1 more
5/29/2022
37 citations
cs.CL
contrastive-ssl

Official code: google-research-datasets/ToTTo (471 stars, last commit 2024-09-11). 1 more implementation below.

Abstract

Recently, contrastive learning attracts increasing interests in neural text generation as a new solution to alleviate the exposure bias problem. It introduces a sequence-level training signal which is crucial to generation tasks that always rely on auto-regressive decoding.

Show full abstract

However, previous methods using contrastive learning in neural text generation usually lead to inferior performance. In this paper, we analyse the underlying reasons and propose a new Contrastive Neural Text generation framework, CoNT. CoNT addresses bottlenecks that prevent contrastive learning from being widely adopted in generation tasks from three aspects -- the construction of contrastive examples, the choice of the contrastive loss, and the strategy in decoding. We validate CoNT on five generation tasks with ten benchmarks, including machine translation, summarization, code comment generation, data-to-text generation and commonsense generation. Experimental results show that CoNT clearly outperforms the conventional training framework on all the ten benchmarks with a convincing margin. Especially, CoNT surpasses previous the most competitive contrastive learning method for text generation, by 1.50 BLEU on machine translation and 1.77 ROUGE-1 on summarization, respectively. It achieves new state-of-the-art on summarization, code comment generation (without external data) and data-to-text generation.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
google-research-datasets/ToTToOfficial471––2024-09-11
Shark-NLP/CoNTOfficial152Python–2023-05-10

ToTTo is an open-domain English table-to-text dataset with over 120,000 training examples that proposes a controlled generation task: given a Wikipedia table and a set of highlighted table cells, produce a one-sentence description. We hope it can serve as a useful research benchmark for high-precision conditional text generation.

47137Apr 21, 20202 years ago
Shark-NLP/CoNTOfficial100%
PyTorch

[NeurIPS'22 Spotlight] Data and code for our paper CoNT: Contrastive Neural Text Generation

15215Python, HTMLMay 28, 20223 years ago
contrastive-learninggenerationmachine-translationpytorchsummarization

Similar Papers

Cite this paper

@article{an2022cont,
  title  = {CoNT: Contrastive Neural Text Generation},
  author = {Chenxin An and Jiangtao Feng and Kai Lv and Lingpeng Kong and Xipeng Qiu and Xuanjing Huang},
  year   = {2022},
  eprint = {2205.14690},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.14690}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.14690.svg)](https://codeofpaper.com/paper/2205.14690)

Discussion