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

Fatemehsadat Mireshghallah, Kartik Goyal, Taylor Berg-Kirkpatrick
3/24/2022
cs.CLcs.LG

Official code: mireshghallah/mixmatch (47 stars, Python, last commit 2022-03-13).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

Repository for ACL 2022 paper Mix and Match: Learning-free Controllable Text Generation using Energy Language Models

475Python, ShellMar 5, 20224 years ago

Similar Papers

Cite this paper

@article{mireshghallah2022match,
  title  = {Mix and Match: Learning-free Controllable Text Generation using Energy Language Models},
  author = {Fatemehsadat Mireshghallah and Kartik Goyal and Taylor Berg-Kirkpatrick},
  year   = {2022},
  eprint = {2203.13299},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2203.13299}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2203.13299.svg)](https://codeofpaper.com/paper/2203.13299)

Discussion