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 that combines a pretrained language model with "expert" LMs and/or "anti-expert" LMs in a product of experts. Intuitively, under the ensemble, 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. Moreover, because DExperts operates only on the output of the pretrained LM, it is effective with (anti-)experts of smaller size, including when operating on GPT-3. Our work highlights the promise of tuning small LMs on text with (un)desirable attributes for efficient decoding-time steering.
翻译:尽管在自然语言生成方面最近有所进展,但在控制生成文本的属性方面仍具有挑战性。我们提议专家:解毒时间专家;控制生成文本的一种解码时间方法,将预先培训的语言模式与专家产品“专家”LM和(或)“反专家”LM结合起来。根据统称,如果专家认为有可能,反专家则不可能,象征性产品才具有很高的概率。我们将专家应用于语言解毒和情绪控制生成,在自动和人文评估方面,我们比现有的可控制生成方法都好。此外,由于专家仅根据预先培训的LM的产出运作,因此与较小规模的专家有效,包括在GPT-3上操作时。我们的工作强调,在文本上对小型LMS进行(无法预见的特性)调整,以便高效解毒时间指导。