A Simple Contrastive Learning Objective for Alleviating Neural Text Degeneration

Shaojie Jiang, Ruqing Zhang, Svitlana Vakulenko, Maarten de Rijke
5/5/2022
cs.CL
contrastive-ssl

Official code: ShaojieJiang/CT-Loss (13 stars, Python, MIT, last commit 2022-05-11).

Abstract

The cross-entropy objective has proved to be an all-purpose training objective for autoregressive language models (LMs). However, without considering the penalization of problematic tokens, LMs trained using cross-entropy exhibit text degeneration.

Show full abstract

To address this, unlikelihood training has been proposed to reduce the probability of unlikely tokens predicted by LMs. But unlikelihood does not consider the relationship between the label tokens and unlikely token candidates, thus showing marginal improvements in degeneration. We propose a new contrastive token learning objective that inherits the advantages of cross-entropy and unlikelihood training and avoids their limitations. The key idea is to teach a LM to generate high probabilities for label tokens and low probabilities of negative candidates. Comprehensive experiments on language modeling and open-domain dialogue generation tasks show that the proposed contrastive token objective yields much less repetitive texts, with a higher generation quality than baseline approaches, achieving the new state-of-the-art performance on text degeneration.

View on arXivView PDF

Code Implementations(1)

MIT

The contrastive token loss function for reducing generative repetition of autoregressive neural language models.

130Python, MustacheApr 19, 20224 years agoMIT

Similar Papers

Cite this paper

@article{jiang2022simple,
  title  = {A Simple Contrastive Learning Objective for Alleviating Neural Text Degeneration},
  author = {Shaojie Jiang and Ruqing Zhang and Svitlana Vakulenko and Maarten de Rijke},
  year   = {2022},
  eprint = {2205.02517},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.02517}
}

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.02517.svg)](https://codeofpaper.com/paper/2205.02517)

Discussion