论文标题

裁缝:基于属性的受控文本生成的及时方法

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

论文作者

Yang, Kexin, Liu, Dayiheng, Lei, Wenqiang, Yang, Baosong, Xue, Mingfeng, Chen, Boxing, Xie, Jun

论文摘要

基于属性的受控文本生成(CTG)是指满足理想属性的句子(例如,情感和主题)。现有的作品通常会利用微调或诉诸额外的属性分类器,但却遭受了存储和推理时间的苦难。为了解决这些问题,我们以基于及时的方式探索基于属性的CTG。简而言之,提出的裁缝表示每个属性作为预训练的连续矢量(即单属性提示),并指导固定的PLM开关的生成到预先指定的属性。我们从实验上发现,这些提示可以简单地将整体连接至多属性CTG而不会进行任何重新训练,但会引起流利度降低和位置敏感性的问题。为此,Tailor提供了一个多属性提示掩码和重新索引位置IDS序列,以弥合训练之间的差距(每个任务的一个提示)和测试阶段(串联多个提示)。为了进一步增强此类单属性提示组合,Tailor还引入了可训练的及时连接器,可以将其与任何两个单属性提示串联到多属性文本生成。在11个属性特定生成任务上进行的实验表明,在单属性和多属性CTG上,量身定制的性能很强,具有GPT-2的0.08 \%训练参数。

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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源