Prompting approaches have been recently explored in text style transfer, where a textual prompt is used to query a pretrained language model to generate style-transferred texts word by word in an autoregressive manner. However, such a generation process is less controllable and early prediction errors may affect future word predictions. In this paper, we present a prompt-based editing approach for text style transfer. Specifically, we prompt a pretrained language model for style classification and use the classification probability to compute a style score. Then, we perform discrete search with word-level editing to maximize a comprehensive scoring function for the style-transfer task. In this way, we transform a prompt-based generation problem into a classification one, which is a training-free process and more controllable than the autoregressive generation of sentences. In our experiments, we performed both automatic and human evaluation on three style-transfer benchmark datasets, and show that our approach largely outperforms the state-of-the-art systems that have 20 times more parameters. Additional empirical analyses further demonstrate the effectiveness of our approach.
翻译:最近,在文本样式传输中探索了提示方法,在这种方式中,用文字提示来查询一个经过预先训练的语言模式,以自动递增的方式逐字生成样式转移的文本。然而,这种代代相传的过程不太能控制,早期预测错误可能会影响未来的单词预测。在本文中,我们为文本样式传输提出了一个基于快速的编辑方法。具体地说,我们为样式分类和分类概率的计算,提出了一个经过预先训练的语言模式。然后,我们用文字级别的编辑进行分解搜索,以尽量扩大样式转移任务的综合评分功能。这样,我们把基于快速生成的问题转换成一个分类,这是一个没有培训的过程,比自动递增生成的句子更能控制。在我们的实验中,我们对三个样式转移基准数据集进行了自动和人文评价,并表明我们的方法基本上超越了具有20倍以上参数的状态艺术系统。其他经验分析进一步证明了我们的方法的有效性。