Conformal Language Modeling

Victor Quach, Adam Fisch, Tal Schuster, Adam Yala, Jae Ho Sohn +2 more
6/16/2023
cs.CLcs.LG

No official code found. Best implementation: Varal7/conformal-language-modeling (31 stars, last commit 2023-12-21).

Abstract

We propose a novel approach to conformal prediction for generative language models (LMs). Standard conformal prediction produces prediction sets -- in place of single predictions -- that have rigorous, statistical performance guarantees. LM responses are typically sampled from the model's predicted distribution over the large, combinatorial output space of natural language. Translating this process to conformal prediction, we calibrate a stopping rule for sampling different outputs from the LM that get added to a growing set of candidates until we are confident that the output set is sufficient. Since some samples may be low-quality, we also simultaneously calibrate and apply a rejection rule for removing candidates from the output set to reduce noise. Similar to conformal prediction, we prove that the sampled set returned by our procedure contains at least one acceptable answer with high probability, while still being empirically precise (i.e., small) on average. Furthermore, within this set of candidate responses, we show that we can also accurately identify subsets of individual components -- such as phrases or sentences -- that are each independently correct (e.g., that are not "hallucinations"), again with statistical guarantees. We demonstrate the promise of our approach on multiple tasks in open-domain question answering, text summarization, and radiology report generation using different LM variants.

View on arXivView PDF

Code Implementations(1)

Conformal Language Modeling

316Shell, PythonDec 21, 20232 years ago
conformal-predictionlanguage-model

Similar Papers

Cite this paper

@article{quach2023conformal,
  title  = {Conformal Language Modeling},
  author = {Victor Quach and Adam Fisch and Tal Schuster and Adam Yala and Jae Ho Sohn and Tommi S. Jaakkola and Regina Barzilay},
  year   = {2023},
  eprint = {2306.10193},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.10193v2},
  journal = {ICLR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.10193.svg)](https://codeofpaper.com/paper/2306.10193)

Discussion