Large language models benefit from training with a large amount of unlabeled text, which gives them increasingly fluent and diverse generation capabilities. However, using these models for text generation that takes into account target attributes, such as sentiment polarity or specific topics, remains a challenge. We propose a simple and flexible method for controlling text generation by aligning disentangled attribute representations. In contrast to recent efforts on training a discriminator to perturb the token level distribution for an attribute, we use the same data to learn an alignment function to guide the pre-trained, non-controlled language model to generate texts with the target attribute without changing the original language model parameters. We evaluate our method on sentiment- and topic-controlled generation, and show large performance gains over previous methods while retaining fluency and diversity.
翻译:大型语言模型受益于大量未加标签文本的培训,这使得它们越来越流畅和多样化的生成能力。然而,利用这些模型来生成考虑到情绪极极或特定主题等目标属性的文本,仍是一项挑战。我们建议了一种简单和灵活的方法来控制文本生成,办法是将分解的属性表达方式结合起来。与最近努力培训歧视者来扰乱某一属性的象征级别分布相比,我们使用同样的数据来学习调整功能,以指导预先训练的、非控制的语言模型,在不改变原始语言模型参数的情况下生成带有目标属性的文本。我们评估我们关于情绪和专题控制的生成方法,在保留流利和多样性的同时,显示与以往方法相比的巨大绩效收益。