Journal of Computer Applications ›› 2024, Vol. 44 ›› Issue (9): 2667-2673.DOI: 10.11772/j.issn.1001-9081.2023091302

• Artificial intelligence • Previous Articles     Next Articles

Unsupervised text sentiment transfer method based on generation prompt

Yuxin HUANG1,2, Jialong XU1,2, Zhengtao YU1,2(), Shukai HOU1,2, Jiaqi ZHOU1,2   

  1. 1.Faculty of Information Engineering and Automation,Kunming University of Science and Technology,Kunming Yunnan 650500,China
    2.Key Laboratory of Artificial Intelligence in Yunnan Province (Kunming University of Science and Technology),Kunming Yunnan 650500,China
  • Received:2023-09-22 Revised:2023-12-15 Accepted:2023-12-25 Online:2024-03-15 Published:2024-09-10
  • Contact: Zhengtao YU
  • About author:HUANG Yuxin, born in 1983, Ph. D., associate professor. His research interests include information retrieval, natural language processing, text summarization.
    XU Jialong, born in 1999, M. S. candidate. His research interests include natural language processing.
    HOU Shukai, born in 1998, Ph. D. candidate. His research interests include natural language processing, text summarization.
    ZHOU Jiaqi, born in 1996, M. S. candidate. His research interests include natural language processing, knowledge graph.
  • Supported by:
    National Natural Science Foundation of China(U21B2027);Yunnan Provincial Basic Research Project(202301AT070471);Yunnan Provincial Major Science and Technology Project(202302AD080003);Kunming University of Science and Technology “Double First-Class” Joint Special Project(202201BE070001-021)

基于生成提示的无监督文本情感转换方法

黄于欣1,2, 徐佳龙1,2, 余正涛1,2(), 侯书楷1,2, 周家啟1,2   

  1. 1.昆明理工大学 信息工程与自动化学院,昆明 650500
    2.云南省人工智能重点实验室(昆明理工大学),昆明 650500
  • 通讯作者: 余正涛
  • 作者简介:黄于欣(1983—),男,河南洛阳人,副教授,博士,主要研究方向:信息检索、自然语言处理、文本摘要
    徐佳龙(1999—),男,山西运城人,硕士研究生,主要研究方向:自然语言处理
    余正涛(1970—),男,云南曲靖人,教授,博士生导师,博士,主要研究方向:自然语言处理、信息检索、机器翻译
    侯书楷(1998—),男,山西晋中人,博士研究生,主要研究方向:自然语言处理、文本摘要
    周家啟(1996—),男,云南腾冲人,硕士研究生,主要研究方向:自然语言处理、知识图谱。
  • 基金资助:
    国家自然科学基金资助项目(U21B2027);云南省基础研究项目(202301AT070471);云南省重大科技专项(202302AD080003);昆明理工大学“双一流”创建联合专项(202201BE070001-021)

Abstract:

Text sentiment transfer is to change text’s sentiment attribute while preserving its content. Due to the lack of parallel corpora, most of the existing unsupervised methods for text sentiment transfer construct latent representations of sentiment and content through text reconstruction and classification losses, and then realize sentiment transfer. However, this weakly supervised training strategy results in significant model performance degradation under prompt learning paradigms. To address this issue, an unsupervised text sentiment transfer method based on generation prompt was proposed. Firstly, textual content prompts were generated by using a prompt generator. Secondly, the target sentiment prompts were fused as the ultimate prompt. Finally, a two-stage training strategy was formulated to provide smooth training gradients for the model training, thereby solving the problem of model performance degradation. Experimental results on the public dataset for sentiment transfer — Yelp show that the proposed method significantly outperforms the generation based method UnpairedRL in text preservation, sentiment transfer score, and BLEU (BiLingual Evaluation Understudy), and the improvements are 39.1%, 62.3%, and 14.5%, respectively.

Key words: unsupervised, sentiment transfer, content generation prompt, text reconstruction, sentiment classification

摘要:

文本情感转换是在保留内容的基础上更改文本的情感属性。由于缺乏平行语料,现有无监督文本情感转换的方法主要通过文本重建和分类损失来构建情感和内容的潜在表征,实现情感转换。然而,这种弱监督信号训练策略在提示学习范式下的模型性能退化严重。针对以上问题,提出一种基于生成提示的无监督文本情感转换方法。首先,通过提示生成器生成文本内容提示;其次,融合目标情感提示作为最终提示;最后,构建两阶段的训练策略,为模型训练提供平滑的训练梯度以解决模型性能退化的问题。在情感转换的公共数据集Yelp上的实验结果表明,所提方法的文本保留度、情感转换分数和BLEU(BiLingual Evaluation Understudy)显著优于基于生成的方法UnpairedRL,分别提高了39.1%、62.3%和14.5%

关键词: 无监督, 情感转换, 内容生成提示, 文本重建, 情感分类

CLC Number: