Despite recent progress in language models, generating constrained text for specific domains remains a challenge, particularly when utilizing black-box models that lack domain-specific knowledge. In this paper, we introduce ScoPE (Score-based Progressive Editor) generation, a novel approach for controlled text generation for black-box language models. We employ ScoPE to facilitate text generation in the target domain by integrating it with language models through a cascading approach. Trained to enhance the target domain score of the edited text, ScoPE progressively edits intermediate output discrete tokens to align with the target attributes throughout the auto-regressive generation process of the language model. This iterative process guides subsequent steps to produce desired output texts for the target domain. Our experimental results on diverse controlled generations demonstrate that ScoPE effectively facilitates controlled text generation for black-box language models in both in-domain and out-of-domain conditions, which is challenging for existing methods.
翻译:尽管语言模型近期取得了进展,但在特定领域生成受限文本仍具挑战性,尤其当使用缺乏领域特定知识的黑盒模型时。本文提出ScoPE(基于评分的渐进式编辑器)生成方法,这是一种面向黑盒语言模型受控文本生成的新颖方法。我们通过级联方式将ScoPE与语言模型集成,以促进目标域文本生成。ScoPE经过训练可提升编辑文本在目标域的评分,在语言模型自回归生成过程中逐步编辑中间输出的离散标记,使其与目标属性对齐。这种迭代过程引导后续步骤为目标域生成期望的输出文本。我们在多样化受控生成任务上的实验结果表明,ScoPE在域内和域外条件下均能有效实现黑盒语言模型的受控文本生成,而现有方法难以处理此类挑战。