Journal of Computer Applications

    Next Articles

Unsupervised text sentiment transfer method based on generating prompt

HUANG Yuxin1,2, XU Jialong1,2, YU Zhengtao1,2, HOU Shukai1,2, ZHOU Jiaqi1,2   

  1. 1.Faculty of Information Engineering and Automation, Kunming University of Science and Technology 2.Yunnan Key Laboratory of Artificial Intelligence (Kunming University of Science and Technology
  • Received:2023-09-20 Revised:2023-12-07 Online:2024-03-15 Published:2024-03-15
  • 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. YU Zhengtao, born in 1970, Ph. D., professor. His research interests include natural language processing, information retrieval, machine translation. 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, 62266027, 62266028, 61972186); Yunnan Provincial Major Science and Technology Project (202302AD080003); Yunnan Provincial Basic Research Project (202301AT070471, 202201AS070179); Kunming University of Science and Technology "Double First-Class" Joint Special Project (202201BE070001-021)

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

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

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

Abstract: Text sentiment transfer involves the alteration of text's sentiment attributes while preserving its content. Due to the absence of parallel corpora, existing unsupervised methods for text sentiment transfer are primarily constructed through text reconstruction and classification losses to create latent representations of sentiment and content, enabling sentiment transfer. However, this weakly supervised training strategy resultes in significant performance degradation in models under prompting learning paradigms. To address these issues, a prompted generation method was proposed. Firstly, textual content prompt were initially generated using a prompt generator, followed by the integration of target sentiment prompt as the ultimate prompt. Finally, a two-stage training strategy was formulated to provide smooth training gradients for the model, thereby resolving the problem of performance degradation. Experimental results on the Yelp public dataset for sentiment transfer show that the proposed method significantly outperformes the generated method UnpairedRL in text preservation, sentiment transfer score, and BLEU, achieving improvements of 39.1%, 62.3%, and 14.5%, respectively.

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

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

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

CLC Number: