English

Tailor: A Prompt-Based Approach to Attribute-Based Controlled Text Generation

Computation and Language 2022-04-29 v1

Abstract

Attribute-based Controlled Text Generation (CTG) refers to generating sentences that satisfy desirable attributes (e.g., emotions and topics). Existing works often utilize fine-tuning or resort to extra attribute classifiers, yet suffer from storage and inference time increases. To address these concerns, we explore attribute-based CTG in a prompt-based manner. In short, the proposed Tailor represents each attribute as a pre-trained continuous vector (i.e., single-attribute prompt) and guides the generation of a fixed PLM switch to a pre-specified attribute. We experimentally find that these prompts can be simply concatenated as a whole to multi-attribute CTG without any re-training, yet raises problems of fluency decrease and position sensitivity. To this end, Tailor provides a multi-attribute prompt mask and a re-indexing position-ids sequence to bridge the gap between the training (one prompt for each task) and testing stage (concatenating more than one prompt). To further enhance such single-attribute prompt combinations, Tailor also introduces a trainable prompt connector, which can be concatenated with any two single-attribute prompts to multi-attribute text generation. Experiments on 11 attribute-specific generation tasks demonstrate strong performances of Tailor on both single-attribute and multi-attribute CTG, with 0.08\% training parameters of a GPT-2.

Keywords

Cite

@article{arxiv.2204.13362,
  title  = {Tailor: A Prompt-Based Approach to Attribute-Based Controlled Text Generation},
  author = {Kexin Yang and Dayiheng Liu and Wenqiang Lei and Baosong Yang and Mingfeng Xue and Boxing Chen and Jun Xie},
  journal= {arXiv preprint arXiv:2204.13362},
  year   = {2022}
}
R2 v1 2026-06-24T11:01:13.096Z