Uncertainty in Language Models: Assessment through Rank-Calibration

Xinmeng Huang, Shuo Li, Mengxin Yu, Matteo Sesia, Hamed Hassani +3 more
4/4/2024
cs.CLcs.AIcs.LG

No official code found. Best implementation: shuoli90/Rank-Calibration (14 stars, MIT, last commit 2024-04-09).

Abstract

Language Models (LMs) have shown promising performance in natural language generation. However, as LMs often generate incorrect or hallucinated responses, it is crucial to correctly quantify their uncertainty in responding to given inputs. In addition to verbalized confidence elicited via prompting, many uncertainty measures ($e.g.$, semantic entropy and affinity-graph-based measures) have been proposed. However, these measures can differ greatly, and it is unclear how to compare them, partly because they take values over different ranges ($e.g.$, $[0,\infty)$ or $[0,1]$). In this work, we address this issue by developing a novel and practical framework, termed $Rank$-$Calibration$, to assess uncertainty and confidence measures for LMs. Our key tenet is that higher uncertainty (or lower confidence) should imply lower generation quality, on average. Rank-calibration quantifies deviations from this ideal relationship in a principled manner, without requiring ad hoc binary thresholding of the correctness score ($e.g.$, ROUGE or METEOR). The broad applicability and the granular interpretability of our methods are demonstrated empirically.

View on arXivView PDF

Code Implementations(1)

MIT

This is the repo for constructing a comprehensive and rigorous evaluation framework for LLM calibration.

142Shell, PythonJan 25, 20242 years agoMIT

Similar Papers

Cite this paper

@article{huang2024uncertainty,
  title  = {Uncertainty in Language Models: Assessment through Rank-Calibration},
  author = {Xinmeng Huang and Shuo Li and Mengxin Yu and Matteo Sesia and Hamed Hassani and Insup Lee and Osbert Bastani and Edgar Dobriban},
  year   = {2024},
  eprint = {2404.03163},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.03163v2}
}

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/2404.03163.svg)](https://codeofpaper.com/paper/2404.03163)

Discussion