A Block Metropolis-Hastings Sampler for Controllable Energy-based Text Generation

Jarad Forristal, Fatemehsadat Mireshghallah, Greg Durrett, Taylor Berg-Kirkpatrick


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.
Anthology ID:
2023.conll-1.26
Volume:
Proceedings of the 27th Conference on Computational Natural Language Learning (CoNLL)
Month:
December
Year:
2023
Address:
Singapore
Editors:
Jing Jiang, David Reitter, Shumin Deng
Venue:
CoNLL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
403–413
Language:
URL:
https://aclanthology.org/2023.conll-1.26
DOI:
10.18653/v1/2023.conll-1.26
Bibkey:
Cite (ACL):
Jarad Forristal, Fatemehsadat Mireshghallah, Greg Durrett, and Taylor Berg-Kirkpatrick. 2023. A Block Metropolis-Hastings Sampler for Controllable Energy-based Text Generation. In Proceedings of the 27th Conference on Computational Natural Language Learning (CoNLL), pages 403–413, Singapore. Association for Computational Linguistics.
Cite (Informal):
A Block Metropolis-Hastings Sampler for Controllable Energy-based Text Generation (Forristal et al., CoNLL 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.conll-1.26.pdf