GeDi: Generative Discriminator Guided Sequence Generation

TL;DR

GeDi uses smaller LMs as generative discriminators to guide large LMs, enhancing safety and control.

cs.CL 🔴 Advanced 2020-09-15 5 views
Ben Krause Akhilesh Deepak Gotmare Bryan McCann Nitish Shirish Keskar Shafiq Joty Richard Socher Nazneen Fatema Rajani
generative models discriminator language models text generation safety

Key Findings

Methodology

GeDi employs smaller language models as generative discriminators to guide large language models. The core mechanism involves computing classification probabilities for all possible next tokens using Bayes rule, normalized over desired and undesired attributes. This method achieves generation speeds 30 times faster than existing methods and enables zero-shot topic generation after training on just four topics.

Key Results

  • In sentiment control experiments, GeDi trained on movie review sentiment generates book text better than existing baselines.
  • In detoxification experiments, GeDi significantly reduces GPT-2 toxicity without sacrificing linguistic quality.
  • In multi-topic control experiments, GeDi achieves zero-shot topic generation using only four training topics.

Significance

GeDi provides an efficient method for controlling text generation, addressing safety and controllability issues in large language models. This method has significant academic impact and offers safer language model applications for industry.

Technical Contribution

GeDi significantly improves generation controllability and efficiency by using generative discriminators. Compared to existing methods, GeDi offers new theoretical guarantees and engineering possibilities, especially in generation speed and zero-shot learning.

Novelty

GeDi is the first method to use generative discriminators to guide large language model generation. Compared to the most related work, GeDi provides a more efficient generation control mechanism and achieves zero-shot topic generation.

Limitations

  • GeDi may perform poorly on complex topics, especially when training data is insufficient.
  • The method relies on the accuracy of generative discriminators, which may fail in extreme cases.
  • Further research is needed to optimize generation quality.

Future Work

Future directions include expanding GeDi's application scope, optimizing generation quality, and exploring zero-shot generation capabilities for more topics.

AI Executive Summary

GeDi is an innovative text generation control method designed to address safety and controllability issues in large language models. Existing large language models often generate text influenced by negative factors like toxicity and bias present in training data. GeDi uses smaller language models as generative discriminators to guide the generation of large language models, enhancing safety and controllability.

The core mechanism of GeDi involves computing classification probabilities for all possible next tokens using Bayes rule, normalized over desired and undesired attributes. Experimental results show that GeDi performs excellently in sentiment control, detoxification, and multi-topic control experiments. Notably, in sentiment control experiments, GeDi trained on movie review sentiment can generate book text better than existing baselines.

The significance of GeDi lies in providing an efficient method for controlling text generation, addressing safety and controllability issues in large language models. This method has significant academic impact and offers safer language model applications for industry. Future research directions include expanding GeDi's application scope, optimizing generation quality, and exploring zero-shot generation capabilities for more topics.

Deep Analysis

Background

The field of natural language generation has seen great progress with the advent of Transformer models. Large language models like GPT-2 and GPT-3 can learn the distribution of their training set well enough to generate realistic text. However, these models are often trained on data containing toxicity, bias, and misinformation, making control during generation crucial.

Core Problem

Large language models struggle to control the regions of distribution they generate, especially avoiding negative content like toxicity and bias. This is due to the negative factors present in training data, and existing control methods are inefficient and ineffective.

Innovation

GeDi uses smaller language models as generative discriminators to guide large language model generation. This method computes classification probabilities using Bayes rule, normalized over desired and undesired attributes, achieving efficient generation control.

Methodology

  • �� Use smaller language models as generative discriminators
  • �� Compute classification probabilities using Bayes rule
  • �� Normalize over desired and undesired attributes
  • �� Train GeDi for zero-shot topic generation

Experiments

Experiments include sentiment control, detoxification, and multi-topic control. IMDb movie reviews and Jigsaw toxic comment datasets are used for training and evaluation. The experiments compare GeDi with existing baselines in terms of generation quality and speed.

Results

GeDi performs better than existing baselines in sentiment control experiments, especially in generating book text. In detoxification experiments, GeDi significantly reduces GPT-2 toxicity while maintaining linguistic quality. In multi-topic control experiments, GeDi achieves zero-shot topic generation.

Applications

GeDi can be used for safer text generation, applicable in scenarios like social media content filtering and automated customer service systems. Its efficient generation control mechanism offers safer language model applications for industry.

Limitations & Outlook

GeDi may perform poorly on complex topics, especially when training data is insufficient. The method relies on the accuracy of generative discriminators, which may fail in extreme cases. Further research is needed to optimize generation quality.

Plain Language Accessible to non-experts

Imagine you're in a kitchen cooking a meal. A large language model is like a chef with lots of ingredients (training data), but sometimes it picks the wrong ones and makes a dish that's not very tasty (generates toxic or biased content). GeDi is like a smart assistant who gives advice when the chef is choosing ingredients, ensuring every dish matches your taste (desired attributes) and not those you dislike (undesired attributes). This way, the chef can quickly make delicious meals without worrying about picking the wrong ingredients.

ELI14 Explained like you're 14

Imagine you're playing a game where the characters talk, but sometimes they say things that aren't very nice. GeDi is like a super cool game plugin that gives advice when characters talk, making sure they say things you like and not things that make you unhappy. This way, you can enjoy the game without worrying about characters saying the wrong things! Isn't that awesome?

Glossary

Generative Discriminator

A technique using generative models for discrimination, guiding generation by classifying generated text.

GeDi uses generative discriminators to guide large language model generation.

Bayes Rule

A rule in probability theory used to update event probabilities.

GeDi computes classification probabilities using Bayes rule.

Control Code

An attribute variable used to guide the generation process.

GeDi uses control codes to achieve controllable text generation.

Toxicity

Negative content in text, such as insults or threats.

GeDi is used to reduce the toxicity of generated text.

Zero-shot Generation

The ability to generate new topics without training samples.

GeDi achieves zero-shot generation in multi-topic control experiments.

Open Questions Unanswered questions from this research

  • 1 How to improve GeDi's generation quality in extreme cases?
  • 2 How to optimize GeDi's performance on complex topics?
  • 3 How to further reduce the toxicity of generated text?

Applications

Immediate Applications

Social Media Content Filtering

GeDi can be used to filter harmful content on social media, ensuring user safety.

Long-term Vision

Automated Customer Service Systems

GeDi can be used in customer service systems to ensure generated responses meet user expectations, enhancing service quality.

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. Lastly, we show that GeDi can make GPT-2 (1.5B parameters) significantly less toxic without sacrificing linguistic quality, making it by far the most practical existing method for detoxifying large language models while maintaining a fast generation speed.

cs.CL cs.LG