Local and Global Decoding in Text Generation

Daniel Gareev, Thomas Hofmann, Ezhilmathi Krishnasamy, Tiago Pimentel


Abstract
Text generation, a component in applications such as dialogue systems, relies heavily on decoding algorithms that sample strings from a language model distribution. Traditional methods like top-k and top-𝜋 decoding locally normalise the model’s output, which can significantly distort the original distribution. In this paper, we investigate the effects of such distortions by introducing globally-normalised versions of these decoding methods. Further, we propose an independent Metropolis-Hastings (IMH) algorithm to approximate sampling from these globally-normalised distributions without explicitly computing them. Our empirical analyses compare the performance of local and global decoding across two algorithms (top-k and top-𝜋) with various hyperparameters, using the Pythia language models. Results show that in most configuration, global decoding performs worse than the local decoding versions of the same algorithms, despite preserving the distribution’s integrity. Our results thus suggest that distortion might be an important feature of local decoding algorithms.
Anthology ID:
2024.findings-emnlp.854
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2024
Month:
November
Year:
2024
Address:
Miami, Florida, USA
Editors:
Yaser Al-Onaizan, Mohit Bansal, Yun-Nung Chen
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
14577–14597
Language:
URL:
https://aclanthology.org/2024.findings-emnlp.854
DOI:
Bibkey:
Cite (ACL):
Daniel Gareev, Thomas Hofmann, Ezhilmathi Krishnasamy, and Tiago Pimentel. 2024. Local and Global Decoding in Text Generation. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 14577–14597, Miami, Florida, USA. Association for Computational Linguistics.
Cite (Informal):
Local and Global Decoding in Text Generation (Gareev et al., Findings 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.findings-emnlp.854.pdf