Detecting out-of-distribution inputs is critical for safe deployment of machine learning models in the real world. However, neural networks are known to suffer from the overconfidence issue, where they produce abnormally high confidence for both in- and out-of-distribution inputs. In this work, we show that this issue can be mitigated through Logit Normalization (LogitNorm) -- a simple fix to the cross-entropy loss -- by enforcing a constant vector norm on the logits in training. Our method is motivated by the analysis that the norm of the logit keeps increasing during training, leading to overconfident output. Our key idea behind LogitNorm is thus to decouple the influence of output's norm during network optimization. Trained with LogitNorm, neural networks produce highly distinguishable confidence scores between in- and out-of-distribution data. Extensive experiments demonstrate the superiority of LogitNorm, reducing the average FPR95 by up to 42.30% on common benchmarks.
翻译:检测分配外的投入对于在现实世界安全部署机器学习模式至关重要。 但是,神经网络已知存在过度自信问题,因此对分配内外的投入产生异常高的自信。在这项工作中,我们表明,可以通过Logit 正常化(LogitNorm)来缓解这一问题 -- -- 这是解决跨物种损失的一个简单办法 -- -- 在培训的登录上执行一个不变的矢量规范。我们的方法的动机是分析,在培训期间,对日志的规范不断提高,导致过度自信的产出。我们LogitNorm背后的关键想法是,在网络优化过程中,分解产出规范的影响。在LogitNorm培训后,神经网络产生高度区别的在分配数据与分配外的数据之间的信任分数。广泛的实验表明LogitNorm的优势,在共同基准上将平均FPR95降低到42.30%。