Textual style transfer is the task of transforming stylistic properties of text while preserving meaning. Target "styles" can be defined in numerous ways, ranging from single attributes (e.g, formality) to authorship (e.g, Shakespeare). Previous unsupervised style-transfer approaches generally rely on significant amounts of labeled data for only a fixed set of styles or require large language models. In contrast, we introduce a novel diffusion-based framework for general-purpose style transfer that can be flexibly adapted to arbitrary target styles at inference time. Our parameter-efficient approach, ParaGuide, leverages paraphrase-conditioned diffusion models alongside gradient-based guidance from both off-the-shelf classifiers and strong existing style embedders to transform the style of text while preserving semantic information. We validate the method on the Enron Email Corpus, with both human and automatic evaluations, and find that it outperforms strong baselines on formality, sentiment, and even authorship style transfer.
翻译:文本风格迁移是指在不改变语义的前提下转换文本风格属性的任务。目标“风格”可通过多种方式定义,涵盖从单一属性(如正式程度)到作者特征(如莎士比亚风格)的范畴。以往的無监督风格迁移方法通常依赖大量标注数据来处理固定风格集合,或依赖于大规模语言模型。相比之下,我们提出了一种新颖的基于扩散模型的通用风格迁移框架,该框架可在推理阶段灵活适配任意目标风格。我们的参数高效方法ParaGuide利用释义条件扩散模型,结合现成分类器与现有强风格嵌入器的梯度引导,在保留语义信息的同时转换文本风格。我们在Enron邮件语料库上通过人工评估与自动评估验证了该方法,结果表明其在正式度、情感乃至作者风格迁移任务上均优于强基线方法。