English

Controllable Natural Language Generation with Contrastive Prefixes

Computation and Language 2022-03-01 v1

Abstract

To guide the generation of large pretrained language models (LM), previous work has focused on directly fine-tuning the language model or utilizing an attribute discriminator. In this work, we propose a novel lightweight framework for controllable GPT2 generation, which utilizes a set of small attribute-specific vectors, called prefixes, to steer natural language generation. Different from prefix-tuning, where each prefix is trained independently, we take the relationship among prefixes into consideration and train multiple prefixes simultaneously. We propose a novel supervised method and also an unsupervised method to train the prefixes for single-aspect control while the combination of these two methods can achieve multi-aspect control. Experimental results on both single-aspect and multi-aspect control show that our methods can guide generation towards the desired attributes while keeping high linguistic quality.

Keywords

Cite

@article{arxiv.2202.13257,
  title  = {Controllable Natural Language Generation with Contrastive Prefixes},
  author = {Jing Qian and Li Dong and Yelong Shen and Furu Wei and Weizhu Chen},
  journal= {arXiv preprint arXiv:2202.13257},
  year   = {2022}
}
R2 v1 2026-06-24T09:55:05.982Z