Know When To Stop: A Study of Semantic Drift in Text Generation

Ava Spataru


Abstract
In this work, we explicitly show that modern LLMs tend to generate correct facts first, then “drift away” and generate incorrect facts later: this was occasionally observed but never properly measured. We develop a semantic drift score that measures the degree of separation between correct and incorrect facts in generated texts and confirm our hypothesis when generating Wikipedia-style biographies. This correct-then-incorrect generation pattern suggests that factual accuracy can be improved by knowing when to stop generation. Therefore, we explore the trade-off between information quantity and factual accuracy for several early stopping methods and manage to improve factuality by a large margin. We further show that reranking with semantic similarity can further improve these results, both compared to the baseline and when combined with early stopping. Finally, we try calling external API to bring the model back to the right generation path, but do not get positive results. Overall, our methods generalize and can be applied to any long-form text generation to produce more reliable information, by balancing trade-offs between factual accuracy, information quantity and computational cost.
Anthology ID:
2024.naacl-long.202
Volume:
Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)
Month:
June
Year:
2024
Address:
Mexico City, Mexico
Editors:
Kevin Duh, Helena Gomez, Steven Bethard
Venue:
NAACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
3656–3671
Language:
URL:
https://aclanthology.org/2024.naacl-long.202
DOI:
Bibkey:
Cite (ACL):
Ava Spataru. 2024. Know When To Stop: A Study of Semantic Drift in Text Generation. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pages 3656–3671, Mexico City, Mexico. Association for Computational Linguistics.
Cite (Informal):
Know When To Stop: A Study of Semantic Drift in Text Generation (Spataru, NAACL 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.naacl-long.202.pdf
Copyright:
 2024.naacl-long.202.copyright.pdf