Click: Controllable Text Generation with Sequence Likelihood Contrastive Learning

Chujie Zheng, Pei Ke, Zheng Zhang, Minlie Huang
6/6/2023
cs.CL

No official code found. Best implementation: chujiezheng/Click (18 stars, last commit 2024-02-26).

Abstract

It has always been an important yet challenging problem to control language models to avoid generating texts with undesirable attributes, such as toxic language and unnatural repetition. We introduce Click for controllable text generation, which needs no modification to the model architecture and facilitates out-of-the-box use of trained models. It employs a contrastive loss on sequence likelihood, which fundamentally decreases the generation probability of negative samples (i.e., generations with undesirable attributes). It also adopts a novel likelihood ranking-based strategy to construct contrastive samples from model generations. On the tasks of language detoxification, sentiment steering, and repetition reduction, we show that Click outperforms strong baselines of controllable text generation and demonstrate the superiority of Click's sample construction strategy.

View on arXivView PDF

Code Implementations(1)

chujiezheng/ClickCommunity100%

Codes and data for ACL 2023 Findings paper "Click: Controllable Text Generation with Sequence Likelihood Contrastive Learning"

182Shell, PythonMay 4, 20232 years ago

Similar Papers

Cite this paper

@article{zheng2023click,
  title  = {Click: Controllable Text Generation with Sequence Likelihood Contrastive Learning},
  author = {Chujie Zheng and Pei Ke and Zheng Zhang and Minlie Huang},
  year   = {2023},
  eprint = {2306.03350},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.03350v1}
}

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

Discussion