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.
翻译:我们在大型语言模型中引入了一种测量不确定性的方法。 对于问题解答等任务, 关键是要知道我们何时可以信任基础模型的自然语言输出。 我们证明测量自然语言的不确定性具有挑战性, 因为“ 语义等同性 ”, 不同的句子可能意味着同样的事情。 为了克服这些挑战, 我们引入了语义酶, 这是一种包含语言差异的通俗。 我们的方法不受监督, 仅使用一个单一的模型, 不需要修改现成的语言模型。 在全面的通缩研究中, 我们显示语义酶对回答问题的数据集的模型准确性比可比较的基线更具有预测性。