Non-Exchangeable Conformal Language Generation with Nearest Neighbors

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Ulmer, Dennis, Zerva, Chrysoula, Martins, André F. T.
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866914663396016128
author Ulmer, Dennis
Zerva, Chrysoula
Martins, André F. T.
author_facet Ulmer, Dennis
Zerva, Chrysoula
Martins, André F. T.
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2402_00707
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Non-Exchangeable Conformal Language Generation with Nearest Neighbors
Ulmer, Dennis
Zerva, Chrysoula
Martins, André F. T.
Computation and Language
Artificial Intelligence
Machine Learning
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.
title Non-Exchangeable Conformal Language Generation with Nearest Neighbors
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2402.00707