We propose Prefix-Adaptive Decoding (PREADD), a flexible method for controlled text generation. Unlike existing methods that use auxiliary expert models to control for attributes, PREADD does not require an external model, instead relying on linearly combining output logits from multiple prompts. Specifically, PREADD contrasts the output logits generated using a raw prompt against those generated using a prefix-prepended prompt, enabling both positive and negative control with respect to any attribute encapsulated by the prefix. We evaluate PREADD on three tasks -- toxic output mitigation, gender bias reduction, and sentiment control -- and find that PREADD outperforms not only prompting baselines, but also an auxiliary-expert control method, by 12% or more in relative gain on our main metrics for each task.
翻译:我们提出前缀自适应解码(PREADD),这是一种灵活的受控文本生成方法。与依赖辅助专家模型进行属性控制的现有方法不同,PREADD无需外部模型,而是通过线性组合多个提示(prompt)的输出对数概率(logits)实现控制。具体而言,PREADD将原始提示生成的输出对数概率与附加前缀提示(prefix-prepended prompt)生成的输出对数概率进行对比,从而实现对前缀所封装属性的正向与负向控制。我们针对三项任务——毒性输出抑制、性别偏差减少和情感控制——对PREADD进行评估,发现PREADD不仅优于提示基线方法,还在每项任务的主要指标上相对增益超过12%,甚至超越了基于辅助专家的控制方法。