English

Conformal Nucleus Sampling

Computation and Language 2023-05-05 v1 Machine Learning

Abstract

Language models generate text based on successively sampling the next word. A decoding procedure based on nucleus (top-pp) sampling chooses from the smallest possible set of words whose cumulative probability exceeds the probability pp. In this work, we assess whether a top-pp set is indeed aligned with its probabilistic meaning in various linguistic contexts. We employ conformal prediction, a calibration procedure that focuses on the construction of minimal prediction sets according to a desired confidence level, to calibrate the parameter pp as a function of the entropy of the next word distribution. We find that OPT models are overconfident, and that calibration shows a moderate inverse scaling with model size.

Keywords

Cite

@article{arxiv.2305.02633,
  title  = {Conformal Nucleus Sampling},
  author = {Shauli Ravfogel and Yoav Goldberg and Jacob Goldberger},
  journal= {arXiv preprint arXiv:2305.02633},
  year   = {2023}
}

Comments

Accepted as a short paper in Findings of ACL23

R2 v1 2026-06-28T10:25:23.528Z