Real-world text applications often involve composing a wide range of text control operations, such as editing the text w.r.t. an attribute, manipulating keywords and structure, and generating new text of desired properties. Prior work typically learns/finetunes a language model (LM) to perform individual or specific subsets of operations. Recent research has studied combining operations in a plug-and-play manner, often with costly search or optimization in the complex sequence space. This paper proposes a new efficient approach for composable text operations in the compact latent space of text. The low-dimensionality and differentiability of the text latent vector allow us to develop an efficient sampler based on ordinary differential equations (ODEs) given arbitrary plug-in operators (e.g., attribute classifiers). By connecting pretrained LMs (e.g., GPT2) to the latent space through efficient adaption, we then decode the sampled vectors into desired text sequences. The flexible approach permits diverse control operators (sentiment, tense, formality, keywords, etc.) acquired using any relevant data from different domains. Experiments show that composing those operators within our approach manages to generate or edit high-quality text, substantially improving over previous methods in terms of generation quality and efficiency.
翻译:现实世界文本应用通常涉及一系列广泛的文本控制操作,例如编辑文本 w.r.t. 属性、操纵关键词和结构,以及生成想要的属性的新文本。 先前的工作通常会学习/ finetunes 一种语言模型(LM) 来执行单个或特定操作子集。 最近的研究研究以插接和播放方式将操作组合在一起,通常在复杂的序列空间中花费昂贵的搜索或优化。 本文提出了在文本的紧凑潜质空间中进行可配置文本操作的一种新的有效方法。 文本潜在矢量的低维度和不同性使我们能够根据普通差异方程式(ODEs) 开发一个高效的样本, 并基于任意插插接操作器( 例如, 属性分类器) 。 通过将预培训的LM( GPT2) 与潜在空间连接起来, 我们随后将抽样矢量的矢量解成理想的文本序列。 灵活的方法允许使用来自不同领域的任何相关数据获得的多种控制操作者( 流、 时间、 、 、 、 格式、 关键字等) 能够开发出一个基于以往领域任何相关数据的高效版本的高效操作者, 。 实验将这些操作者管理到对前质量进行高质量的文本进行重大修改。