arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2205.01543cs.CL
收藏

学习转换文本生成的语法

Learning to Transfer Prompts for Text Generation

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Université de Montréal(蒙特利尔大学);School of Information, Renmin University of China(中国人民大学信息学院)

Junyi Li, Tianyi Tang, Jian-Yun Nie, Ji-Rong Wen, Wayne Xin Zhao

摘要:

预训练的语言模型(PLM)通过微调在文本生成任务中取得了显着进展。然而,在数据稀缺的情况下对PLM进行微调是具有挑战性的。因此,它是不平凡的开发一个通用的和轻量级的模型,可以适应各种文本生成任务的基础上PLM。为了实现这一目标,最近的基于学习的学习提供了一个潜在的解决方案。在本文中,我们改进了这种技术,并提出了一种新的基于文本生成的方法(PTG)在一个可转移的设置。首先,PTG为各种源生成任务学习一组源提示,然后将这些提示转换为目标提示以执行目标生成任务。同时考虑任务和实例级信息,我们设计了一个自适应的注意力机制来获得目标提示。对于每个数据实例,PTG通过关注高度相关的源提示来学习特定的目标提示。在广泛的实验中,PTG产生了比微调方法更好的结果。我们将源代码提示作为开放资源发布,用户可以添加或重用它们来改进新的文本生成任务,以供未来研究。代码和数据可以在https://github.com/RUCAIBox/Transfer-Prompts-for-Text-Generation上获得。

英文摘要:

Pretrained language models (PLMs) have made remarkable progress in text generation tasks via fine-tuning. While, it is challenging to fine-tune PLMs in a data-scarce situation. Therefore, it is non-trivial to develop a general and lightweight model that can adapt to various text generation tasks based on PLMs. To fulfill this purpose, the recent prompt-based learning offers a potential solution. In this paper, we improve this technique and propose a novel prompt-based method (PTG) for text generation in a transferable setting. First, PTG learns a set of source prompts for various source generation tasks and then transfers these prompts as target prompts to perform target generation tasks. To consider both task- and instance-level information, we design an adaptive attention mechanism to derive the target prompts. For each data instance, PTG learns a specific target prompt by attending to highly relevant source prompts. In extensive experiments, PTG yields competitive or better results than fine-tuning methods. We release our source prompts as an open resource, where users can add or reuse them to improve new text generation tasks for future research. Code and data can be available at https://github.com/RUCAIBox/Transfer-Prompts-for-Text-Generation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑