arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2205.11503cs.CL
收藏

基于小语言模型的Zero-Shot和Few-Shot任意文本风格转换方法

Prompt-and-Rerank: A Method for Zero-Shot and Few-Shot Arbitrary Textual Style Transfer with Small Language Models

Stanford University(斯坦福大学);Oxford University(牛津大学)

Mirac Suzgun, Luke Melas-Kyriazi, Dan Jurafsky

摘要:

我们提出了一种任意文本风格转换(TST)的方法-将文本转换为任何给定风格的任务-利用通用的预训练语言模型。我们的方法,重新排序,是基于TST任务的数学公式,将其分解为三个组成部分:文本相似性,目标风格强度和流畅性。具体地说,我们的方法首先使用zero-shot或Few-Shot提示来获得目标风格中的一组候选生成,然后根据上述三个分量的组合来重新排列这些候选生成。从经验上讲,我们的方法使小型预训练语言模型能够与最先进的大规模模型相媲美,同时消耗两个数量级的计算和内存。最后,我们对模型大小和即时设计的影响进行了系统的调查(例如,提示释义和定界符对选择)对七个不同文本样式转换数据集的样式转换质量的影响。

英文摘要:

We propose a method for arbitrary textual style transfer (TST)--the task of transforming a text into any given style--utilizing general-purpose pre-trained language models. Our method, Prompt-and-Rerank, is based on a mathematical formulation of the TST task, decomposing it into three constituent components: textual similarity, target style strength, and fluency. Specifically, our method first uses zero-shot or few-shot prompting to obtain a set of candidate generations in the target style, and then re-ranks these candidates according to a combination of the three components above. Empirically, our method enables small pre-trained language models to perform on par with state-of-the-art large-scale models while consuming two orders of magnitude less compute and memory. Finally, we conduct a systematic investigation of the effect of model size and prompt design (e.g., prompt paraphrasing and delimiter-pair choice) on style transfer quality across seven diverse textual style transfer datasets.

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

↑