Changing an attribute of a text without changing the content usually requires to first disentangle the text into irrelevant attributes and content representations. After that, in the inference phase, the representation of one attribute is tuned to a different value, expecting that the corresponding attribute of the text can also be changed accordingly. The usual way of disentanglement is to add some constraints on the latent space of an encoder-decoder architecture, including adversarial-based constraints and mutual-information-based constraints. However, the previous semi-supervised processes of attribute change are usually not enough to guarantee the success of attribute change and content preservation. In this paper, we propose a novel approach to achieve a robust control of attributes while enhancing content preservation. In this approach, we use a semi-supervised contrastive learning method to encourage the disentanglement of attributes in latent spaces. Differently from previous works, we re-disentangle the reconstructed sentence and compare the re-disentangled latent space with the original latent space, which makes a closed-loop disentanglement process. This also helps content preservation. In addition, the contrastive learning method is also able to replace the role of minimizing mutual information and adversarial training in the disentanglement process, which alleviates the computation cost. We conducted experiments on three text datasets, including the Yelp Service review dataset, the Amazon Product review dataset, and the GoEmotions dataset. The experimental results show the effectiveness of our model.
翻译:改变文本属性而不改变内容,通常需要先将文本解耦为不相关属性与内容表示。在推理阶段,将某一属性的表示调整至不同值,期望文本对应的属性也能随之改变。常规解耦方式是在编码器-解码器架构的隐空间上添加约束,包括基于对抗的约束和基于互信息的约束。然而,以往属性变化的半监督过程通常不足以确保属性改变与内容保留的成功。本文提出一种新方法,在增强内容保留的同时实现对属性的稳健控制。该方法采用半监督对比学习促进隐空间中的属性解耦。与以往研究不同,我们对重构后的句子进行再解耦,并将再解耦后的隐空间与原始隐空间进行对比,形成闭环解耦过程,这也有助于内容保留。此外,对比学习还能替代解耦过程中最小化互信息与对抗训练的作用,从而降低计算成本。我们在三个文本数据集(Yelp服务评论数据集、亚马逊产品评论数据集和GoEmotions数据集)上进行了实验,实验结果证明了模型的有效性。