Sentiment transfer aims at revising the input text to satisfy a given sentiment polarity while retaining the original semantic content. The nucleus of sentiment transfer lies in precisely separating the sentiment information from the content information. Existing explicit approaches generally identify and mask sentiment tokens simply based on prior linguistic knowledge and manually-defined rules, leading to low generality and undesirable transfer performance. In this paper, we view the positions to be masked as the learnable parameters, and further propose a novel AM-ST model to learn adaptive task-relevant masks based on the attention mechanism. Moreover, a sentiment-aware masked language model is further proposed to fill in the blanks in the masked positions by incorporating both context and sentiment polarity to capture the multi-grained semantics comprehensively. AM-ST is thoroughly evaluated on two popular datasets, and the experimental results demonstrate the superiority of our proposal.
翻译:情感迁移旨在修改输入文本以符合给定情感极性,同时保留原始语义内容。其核心在于精确分离情感信息与内容信息。现有显式方法通常仅基于先验语言知识和人工定义规则识别并掩码情感标记,导致泛化性低且迁移效果不佳。本文将掩码位置视为可学习参数,进一步提出一种新颖的AM-ST模型,通过注意力机制学习自适应任务相关掩码。此外,进一步提出情感感知掩码语言模型,通过结合上下文与情感极性综合捕捉多粒度语义,从而填充掩码位置的空白内容。AM-ST在两个主流数据集上进行了全面评估,实验结果证明了该方法的优越性。