GeDi: Generative Discriminator guided Sequence Generation
Ben Krause, Akhilesh Deepak Gotmare††, Bryan McCann, Nitish Shirish Keskar Shafiq Joty, Richard Socher††, Nazneen Fatema Rajani Salesforce Research Equal ContributionWork performed while at Salesforce Research
Abstract
While large-scale language models (LMs) are able to imitate the distribution of natural language well enough to generate realistic text, it is difficult to control which regions of the distribution they generate. This is especially problematic because datasets used for training large LMs usually contain significant toxicity, hate, bias, and negativity. We propose GeDi as an efficient method for using smaller LMs as generative discriminators to guide generation from large LMs to make them safer and more controllable. GeDi guides generation at each step by computing classification probabilities for all possible next tokens via Bayes rule by normalizing over two class-conditional distributions; one conditioned on the desired attribute, or control code, and another conditioned on the undesired attribute, or anti control code. We find that GeDi gives stronger controllability than the state of the art method while also achieving generation speeds more than $30$ times faster. Additionally, training GeDi on only four topics allows us to controllably generate new topics zero-shot from just a keyword, unlocking a new capability that previous controllable generation methods do not have. Lastl
原文 arXiv:2009.06367;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2009.06367v2