Despite recent advances in natural language generation, it remains challenging to control attributes of generated text. We propose DExperts: Decoding-time Experts, a decoding-time method for controlled text generation which combines a pretrained language model with experts and/or anti-experts in an ensemble of language models. Intuitively, under our ensemble, output tokens only get high probability if they are considered likely by the experts, and unlikely by the anti-experts. We apply DExperts to language detoxification and sentiment-controlled generation, where we outperform existing controllable generation methods on both automatic and human evaluations. Our work highlights the promise of using LMs trained on text with (un)desired attributes for efficient decoding-time controlled language generation.
翻译:尽管在自然语言生成方面最近有所进展,但控制生成文本的属性仍具有挑战性。我们提议专家:解码时间专家,控制生成文本的一种解码时间方法,将预先培训的语言模式与专家和(或)反专家结合到多种语言模式中。根据我们的组合,产出符号只有在专家认为有可能且反专家不可能的情况下才会获得很高的概率。我们对语言解毒和情绪控制生成应用“解码时间专家 ”, 在自动和人文评估方面,我们采用比现有可控制生成方法更好的方法。我们的工作突出强调了使用经培训的文本LMS和(非)理想属性来高效解码时间控制生成语言的许诺。