Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Mix and Match: Learning-free Controllable Text Generation using Energy Language Models

About

Recent work on controlled text generation has either required attribute-based fine-tuning of the base language model (LM), or has restricted the parameterization of the attribute discriminator to be compatible with the base autoregressive LM. In this work, we propose Mix and Match LM, a global score-based alternative for controllable text generation that combines arbitrary pre-trained black-box models for achieving the desired attributes in the generated text without involving any fine-tuning or structural assumptions about the black-box models. We interpret the task of controllable generation as drawing samples from an energy-based model whose energy values are a linear combination of scores from black-box models that are separately responsible for fluency, the control attribute, and faithfulness to any conditioning context. We use a Metropolis-Hastings sampling scheme to sample from this energy-based model using bidirectional context and global attribute features. We validate the effectiveness of our approach on various controlled generation and style-based text revision tasks by outperforming recently proposed methods that involve extra training, fine-tuning, or restrictive assumptions over the form of models.

Fatemehsadat Mireshghallah, Kartik Goyal, Taylor Berg-Kirkpatrick• 2022

Related benchmarks

TaskDatasetResultRank
DetoxificationJigsaw (test)
Perplexity (PPL)65.2
29
Sentiment ControlIMDB (test)
Sentiment Accuracy (Avg)82.8
11
Topic ControlAGNews (test)
Avg Topic Accuracy75.6
11
Sentiment Controlled Text GenerationAmazon Reviews
PPL (Pos.)15.94
10
Controllable Text GenerationMulti-Attribute Control
Average Score79.7
10
Sentence Agency RevisionROC-story corpus (test)
BLEU (Source)0.6334
9
Sentiment TransferYelp (test)
Sentiment Accuracy97.53
7
Multi-attribute Controllable Text GenerationMulti-attribute Control GPT-2 medium (evaluation set)
Average Score0.797
7
Single-attribute Controllable Text GenerationPPLM 35 Neutral Prompts GPT2-medium base (test)
Sentiment (Avg)82.8
7
Prompted Sentiment Controlled GenerationSentiment Controlled Generation Prompts
GPT-2 Score264.1
6
Showing 10 of 16 rows

Other info

Code

Follow for update