Detecting out-of-distribution (OOD) data has become a critical component in ensuring the safe deployment of machine learning models in the real world. Existing OOD detection approaches primarily rely on the output or feature space for deriving OOD scores, while largely overlooking information from the gradient space. In this paper, we present GradNorm, a simple and effective approach for detecting OOD inputs by utilizing information extracted from the gradient space. GradNorm directly employs the vector norm of gradients, backpropagated from the KL divergence between the softmax output and a uniform probability distribution. Our key idea is that the magnitude of gradients is higher for in-distribution (ID) data than that for OOD data, making it informative for OOD detection. GradNorm demonstrates superior performance, reducing the average FPR95 by up to 10.89% compared to the previous best method.
翻译:检测分配数据(OOD)已成为确保机器学习模型在现实世界中安全部署的一个关键组成部分。现有的 OOD检测方法主要依靠输出或特性空间得出OOD分数,但基本上忽略了从梯度空间获得的信息。在本文件中,我们介绍了GradNorm,这是利用从梯度空间提取的信息探测OOD输入的简单而有效的方法。GradNorm直接使用梯度的矢量规范,从软模输出与统一概率分布之间的 KL差异反射出来。我们的主要想法是,在分布(ID)数据方面梯度比OOOD数据要高,从而为OOD检测提供信息。 GradNorm展示了优异性,将平均FPR95比以往的最佳方法减少10.89%。