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.
翻译:我们引入了一种测量大型语言模型中不确定性的方法。对于像问答这样的任务,知道我们何时可以信任基础模型的自然语言输出是至关重要的。我们展示了测量自然语言中的不确定性很具有挑战性,因为存在“语义等价性”——不同的句子可能意味着相同的事情。为了克服这些挑战,我们引入了语义熵——一种蕴含由共享含义创建的语言不变量的熵。我们的方法是无监督的,仅使用单个模型,无需对现成的语言模型进行修改。在广泛的混淆研究中,我们证明语义熵比可比制基线更具有预测问题回答数据集上模型准确性的功能。