We introduce a method to measure uncertainty in large language models. For tasks like question answering, it is essential to know when we can trust the natural language outputs of foundation models. We show that measuring uncertainty in natural language is challenging because of `semantic equivalence' -- different sentences can mean the same thing. To overcome these challenges we introduce semantic entropy -- an entropy which incorporates linguistic invariances created by shared meanings. Our method is unsupervised, uses only a single model, and requires no modifications to `off-the-shelf' language models. In comprehensive ablation studies we show that the semantic entropy is more predictive of model accuracy on question answering data sets than comparable baselines.
翻译:我们在大型语言模型中引入一种测量不确定性的方法。 对于问题解答等任务, 关键是要知道何时我们可以信任基础模型的自然语言输出。 我们证明测量自然语言的不确定性具有挑战性, 因为“ 语义等同性 ”, 不同的句子可能意味着同样的事情。 为了克服这些挑战, 我们引入了语义酶 — — 一种包含语言差异的酶, 它包含由共同意义产生的语言差异。 我们的方法不受监督, 只使用一个单一的模型, 不需要修改“ 现成” 语言模型。 在全面的通缩研究中, 我们显示语义酶比可比基线更能预测回答问题的数据集的模型准确性。