Non-parallel text style transfer is an important task in natural language generation. However, previous studies concentrate on the token or sentence level, such as sentence sentiment and formality transfer, but neglect long style transfer at the discourse level. Long texts usually involve more complicated author linguistic preferences such as discourse structures than sentences. In this paper, we formulate the task of non-parallel story author-style transfer, which requires transferring an input story into a specified author style while maintaining source semantics. To tackle this problem, we propose a generation model, named StoryTrans, which leverages discourse representations to capture source content information and transfer them to target styles with learnable style embeddings. We use an additional training objective to disentangle stylistic features from the learned discourse representation to prevent the model from degenerating to an auto-encoder. Moreover, to enhance content preservation, we design a mask-and-fill framework to explicitly fuse style-specific keywords of source texts into generation. Furthermore, we constructed new datasets for this task in Chinese and English, respectively. Extensive experiments show that our model outperforms strong baselines in overall performance of style transfer and content preservation.
翻译:非平行文本风格迁移是自然语言生成中的重要任务。然而,以往研究主要聚焦于词或句子级别的风格迁移(如句子情感与正式度转换),忽略了篇章级别的长文本风格迁移。相比句子,长文本通常涉及更复杂的作者语言偏好(如篇章结构)。本文提出非平行故事作者风格迁移任务,要求将输入故事转换为指定作者风格,同时保留源文本语义。为解决该问题,我们提出生成模型StoryTrans,该模型利用篇章表征捕获源文本内容信息,并通过可学习的风格嵌入将其迁移至目标风格。我们引入额外训练目标,将风格特征从所学篇章表征中解耦,防止模型退化为自编码器。此外,为增强内容保留,我们设计了掩码-填充框架,显式融合源文本中风格特定的关键词以辅助生成。我们分别构建了中文和英文任务数据集。大量实验表明,本模型在风格迁移与内容保留的综合性能上优于强基线方法。