Abstract
Quantifying uncertainty in automatically generated text is important for letting humans check potential hallucinations and making systems more reliable. Conformal prediction is an attractive framework to provide predictions imbued with statistical guarantees, however, its application to text generation is challenging since any i.i.d. assumptions are not realistic. In this paper, we bridge this gap by leveraging recent results on *non-exchangeable* conformal prediction, which still ensures bounds on coverage. The result, *non-exchangeable conformal nucleus sampling*, is a novel extension of the conformal prediction framework to generation based on nearest neighbors. Our method can be used post-hoc for an arbitrary model without extra training and supplies token-level, calibrated prediction sets equipped with statistical guarantees. Experiments in machine translation and language modeling show encouraging results in generation quality. By also producing tighter prediction sets with good coverage, we thus give a more theoretically principled way to perform sampling with conformal guarantees.- Anthology ID:
- 2024.findings-eacl.129
- Volume:
- Findings of the Association for Computational Linguistics: EACL 2024
- Month:
- March
- Year:
- 2024
- Address:
- St. Julian’s, Malta
- Editors:
- Yvette Graham, Matthew Purver
- Venue:
- Findings
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 1909–1929
- Language:
- URL:
- https://aclanthology.org/2024.findings-eacl.129
- DOI:
- Cite (ACL):
- Dennis Ulmer, Chrysoula Zerva, and Andre Martins. 2024. Non-Exchangeable Conformal Language Generation with Nearest Neighbors. In Findings of the Association for Computational Linguistics: EACL 2024, pages 1909–1929, St. Julian’s, Malta. Association for Computational Linguistics.
- Cite (Informal):
- Non-Exchangeable Conformal Language Generation with Nearest Neighbors (Ulmer et al., Findings 2024)
- PDF:
- https://preview.aclanthology.org/proper-vol2-ingestion/2024.findings-eacl.129.pdf