Determining whether inputs are out-of-distribution (OOD) is an essential building block for safely deploying machine learning models in the open world. However, previous methods relying on the softmax confidence score suffer from overconfident posterior distributions for OOD data. We propose a unified framework for OOD detection that uses an energy score. We show that energy scores better distinguish in- and out-of-distribution samples than the traditional approach using the softmax scores. Unlike softmax confidence scores, energy scores are theoretically aligned with the probability density of the inputs and are less susceptible to the overconfidence issue. Within this framework, energy can be flexibly used as a scoring function for any pre-trained neural classifier as well as a trainable cost function to shape the energy surface explicitly for OOD detection. On a CIFAR-10 pre-trained WideResNet, using the energy score reduces the average FPR (at TPR 95%) by 18.03% compared to the softmax confidence score. With energy-based training, our method outperforms the state-of-the-art on common benchmarks.
翻译:确定投入是否超出分配范围(OOD)是开放世界安全部署机器学习模型的基本基石。然而,以前依赖软体自信分数的方法存在对 OOD 数据过于自信的后端分布。我们提议了一个使用能源分数的 OOD 检测统一框架。我们显示,能源分数比使用软体积分数的传统方法在分配范围内和分配范围之外的样本有更好的区别。与软体积信任分数不同,能源分数理论上与输入的概率密度一致,较不易受到过度信任问题的影响。在这个框架内,能源可以灵活地用作任何预先训练的神经分类器的评分功能以及一种可培训的成本功能,以形成明确用于 OOD 检测的能源表面。在CRIFAR-10 预先训练的WideResNet 上,使用能源分数比软体信任分分数减少平均FPR(在TPR 95%上) 18.03 %。在能源培训中,我们的方法比通用基准的状态要好。