DisCup: Discriminator Cooperative Unlikelihood Prompt-tuning for Controllable Text Generation

Hanqing Zhang, Dawei Song
10/18/2022
cs.CL
lora-peft-merging

Official code: littlehacker26/Discriminator-Cooperative-Unlikelihood-Prompt-Tuning (27 stars, Python, last commit 2023-11-13).

Abstract

Prompt learning with immensely large Casual Language Models (CLMs) has been shown promising for attribute-controllable text generation (CTG). However, vanilla prompt tuning tends to imitate training corpus characteristics beyond the control attributes, resulting in a poor generalization ability.

Show full abstract

Moreover, it is less able to capture the relationship between different attributes, further limiting the control performance. In this paper, we propose a new CTG approach, namely DisCup, which incorporates the attribute knowledge of discriminator to optimize the control-prompts, steering a frozen CLM to produce attribute-specific texts. Specifically, the frozen CLM model, capable of producing multitudinous texts, is first used to generate the next-token candidates based on the context, so as to ensure the diversity of tokens to be predicted. Then, we leverage an attribute-discriminator to select desired/undesired tokens from those candidates, providing the inter-attribute knowledge. Finally, we bridge the above two traits by an unlikelihood objective for prompt-tuning. Extensive experimental results show that DisCup can achieve a new state-of-the-art control performance while maintaining an efficient and high-quality text generation, only relying on around 10 virtual tokens.

View on arXivView PDF

Code Implementations(1)

The code implementation of the EMNLP2022 paper: DisCup: Discriminator Cooperative Unlikelihood Prompt-tuning for Controllable Text Generation

272Python, ShellOct 9, 20223 years ago
controllable-text-generationprompt-tuningtext-generation

Similar Papers

Cite this paper

@article{zhang2022discup,
  title  = {DisCup: Discriminator Cooperative Unlikelihood Prompt-tuning for Controllable Text Generation},
  author = {Hanqing Zhang and Dawei Song},
  year   = {2022},
  eprint = {2210.09551},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.09551}
}

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

Discussion