论文标题
替换语言模型以进行样式转移
Replacing Language Model for Style Transfer
论文作者
论文摘要
我们介绍了替换语言模型(RLM),这是文本样式传输(TST)的序列到序列语言建模框架。我们的方法自动加工将源句子的每个令牌替换为具有相似含义但目标样式的文本跨度。新的跨度是通过非自动回忆性掩盖语言模型生成的,该模型可以更好地保留更换的令牌的局部文字含义。这种RLM生成方案聚集了自动回归模型的灵活性以及非自动回归模型的准确性,这些模型弥合了句子级别和文字级别样式传输方法之间的差距。为了更准确地控制一代风格,我们对RLM的隐藏表示形式进行了令牌级别的风格删除。现实世界文本数据集的经验结果证明了与其他TST基准相比,RLM的有效性。该代码在https://github.com/linear95/rlm上。
We introduce replacing language model (RLM), a sequence-to-sequence language modeling framework for text style transfer (TST). Our method autoregressively replaces each token of the source sentence with a text span that has a similar meaning but in the target style. The new span is generated via a non-autoregressive masked language model, which can better preserve the local-contextual meaning of the replaced token. This RLM generation scheme gathers the flexibility of autoregressive models and the accuracy of non-autoregressive models, which bridges the gap between sentence-level and word-level style transfer methods. To control the generation style more precisely, we conduct a token-level style-content disentanglement on the hidden representations of RLM. Empirical results on real-world text datasets demonstrate the effectiveness of RLM compared with other TST baselines. The code is at https://github.com/Linear95/RLM.