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.
翻译:基于属性的控制文本生成(CTG) 指的是生成符合适当属性的句子(例如情感和议题) 现有作品通常使用微调或诉诸额外的属性分类器,但又受到存储和推断时间的增加。为了解决这些关切,我们以快速为基础探索基于属性的CTG。简言之,拟议的定制代表每个属性,作为预先培训的连续矢量(即单属性提示)和引导生成固定的PLM切换到预指定的属性。我们实验发现,这些提示器可以仅仅在不经过任何再培训的情况下,将整体与多属性分类的CT相匹配或采用额外的属性分类,但又会引发流度下降和位置敏感性的问题。为此,Lateror提供了一种多属性的快速掩码和重新定位定位序列,以弥合培训(每项任务一次提示)和测试阶段(一次比一次更快地排序)之间的差距。为了进一步加强这种单一属性的快速组合,在不经过再培训的Otalat快速连接或多属性上引入一种可导出性快速连接的G。