A Block Metropolis-Hastings Sampler for Controllable Energy-based Text Generation
Authors:
- Jarad ForristalJFJarad Forristal
- Niloofar MireshghallahNMNiloofar Mireshghallah
- Greg DurrettGDGreg Durrett
- Taylor Berg-KirkpatrickTBTaylor Berg-Kirkpatrick
Preprint
Abstract
Recent work has shown that energy-based language modeling is an effective framework for controllable text generation because it enables flexible integration of arbitrary discriminators. However, because energy-based LMs are globally normalized, approximate techniques like Metropolis-Hastings (MH) are required for inference. Past work has largely explored simple proposal distributions that modify a single token at a time, like in Gibbs sampling. In this paper, we develop a novel MH sampler that, in contrast, proposes re-writes of the entire sequence in each step via iterative prompting of a large language model. Our new sampler (a) allows for more efficient and accurate sampling from a target distribution and (b) allows generation length to be determined through the sampling procedure rather than fixed in advance, as past work has required. We perform experiments on two controlled generation tasks, showing both downstream performance gains and more accurate target distribution sampling in comparison with single-token proposal techniques.Keywords
All Related Versions
This publication has 20 references indexed in Scilit:
- GeDi: Generative Discriminator Guided Sequence Generation2021
- Style Pooling: Automatic Text Style Obfuscation for Improved Classification Fairness2021
- Just Say No: Analyzing the Stance of Neural Dialogue Generation in Offensive Contexts2021
- Olá, Bonjour, Salve! XFORMAL: A Benchmark for Multilingual Formality Style Transfer2021
- Detoxifying Language Models Risks Marginalizing Minority Voices2021
- Exploring Controllable Text Generation Techniques2020
- Plug and Play Autoencoders for Conditional Text Generation2020
- Reformulating Unsupervised Style Transfer as Paraphrase Generation2020
- Don’t Stop Pretraining: Adapt Language Models to Domains and Tasks2020
- Generating Sentences by Editing PrototypesTransactions of the Association for Computational Linguistics, 2018