arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.10685cs.CLcs.AIcs.LG
收藏

基于逆映射的预训练语言模型的可控生成

Controllable Generation from Pre-trained Language Models via Inverse Prompting

Tsinghua University(清华大学);Beijing Academy of Artificial Intelligence(北京智源人工智能研究院);Recurrent AI, Ltd.(Recurrent AI 有限公司);DAMO Academy, Alibaba Inc.(阿里巴巴达摩院)

Xu Zou, Da Yin, Qingyang Zhong, Ming Ding, Hongxia Yang, Zhilin Yang, Jie Tang

摘要:

大规模预训练的语言模型已经展示出强大的生成真实文本的能力。然而,控制生成结果仍然具有挑战性。以往的方法如提示等还远远不够,这限制了语言模型的使用。为了应对这一挑战,我们提出了一种创新的方法,反向提示,以更好地控制文本生成。反向提示的核心思想是在束搜索过程中,利用生成文本对提示进行反向预测,增强了提示与生成文本的相关性,提供了更好的可控性。在实验上,我们预训练了一个大规模的汉语语言模型,对开放域诗歌生成和开放域长篇问答任务进行了系统的研究。我们的研究结果表明,我们提出的方法大大优于基线,我们的生成质量接近人类的一些任务的表现。叙述者可以在https://pretrain.aminer.cn/apps/poetry.html尝试我们的诗歌生成演示,而我们的QA演示可以在https://pretrain.aminer.cn/app/qa找到。对于研究人员,代码在https://github.com/THUDM/InversePrompting中提供。

英文摘要:

Large-scale pre-trained language models have demonstrated strong capabilities of generating realistic text. However, it remains challenging to control the generation results. Previous approaches such as prompting are far from sufficient, which limits the usage of language models. To tackle this challenge, we propose an innovative method, inverse prompting, to better control text generation. The core idea of inverse prompting is to use generated text to inversely predict the prompt during beam search, which enhances the relevance between the prompt and the generated text and provides better controllability. Empirically, we pre-train a large-scale Chinese language model to perform a systematic study using human evaluation on the tasks of open-domain poem generation and open-domain long-form question answering. Our results show that our proposed method substantially outperforms the baselines and that our generation quality is close to human performance on some of the tasks. Narrators can try our poem generation demo at https://pretrain.aminer.cn/apps/poetry.html, while our QA demo can be found at https://pretrain.aminer.cn/app/qa. For researchers, the code is provided in https://github.com/THUDM/InversePrompting.

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

↑