Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (5): 146-155.DOI: 10.3778/j.issn.1002-8331.2211-0317

• Pattern Recognition and Artificial Intelligence • Previous Articles     Next Articles

Prompt-Learning Inspired Approach to Unsupervised Sentiment Style Transfer

CAI Guoyong, LI Anqing   

  1. 1.School of Computer Science and Information Security, Guilin University of Electronic Technology, Guilin, Guangxi 541004, China
    2.Guangxi Key Laboratory of Trusted Software, Guilin, Guangxi 541004, China
  • Online:2024-03-01 Published:2024-03-01

提示学习启发的无监督情感风格迁移研究

蔡国永,李安庆   

  1. 1.桂林电子科技大学 计算机与信息安全学院,广西 桂林 541004
    2.广西可信软件重点实验室,广西 桂林 541004

Abstract: Text style transfer is the task of transferring text generation with certain desired style properties while preserving the original text content. In order to improve the transfer quality under non-parallel style corpus, this paper proposes a new method to guide the fill-mask model to rewrite the sentence into the target style. Overall, this approach is based on the delete-retrieve-generate style transfer framework, but employs a large unsupervised pre-trained language model and Transformer architecture. According to the working principle of Transformer, firstly, the method of filtering style attributes from the source sentence is improved, and then the internal knowledge of the pre-trained model is mined by the prompt learning method to generate the target style words. Experiments on two sentiment benchmark datasets show that the method outperforms existing editing methods, with an average improvement of more than 14% in relative scores on the comprehensive metrics.

Key words: text generation, text style transfer, sentiment transfer, prompt learning, Transformer

摘要: 文本样式迁移是在保留文本内容信息的同时移植具有某种所需样式属性的文本生成任务。为了提高在非平行样式语料下的迁移质量,提出了一种指导填充掩码模型将句子重写为目标样式的新方法。该方法总体上基于“删除-检索-生成”样式迁移框架,但采用大型无监督预训练语言模型和Transformer架构。根据Transformer的工作机理,改进了从源语句中筛选样式属性的方法,通过提示学习方法挖掘预训练模型的内部知识以实现对目标样式词的生成。在两个情感基准数据集上的实验表明,该方法在文本样式迁移任务上明显优于现有的编辑类方法,综合指标的相对分数平均提高了14%以上。

关键词: 文本生成, 文本样式迁移, 情感迁移, 提示学习, Transformer