Detecting out-of-distribution (OOD) data is crucial for ensuring the safe deployment of machine learning models in real-world applications. However, existing OOD detection approaches primarily rely on the feature maps or the full gradient space information to derive OOD scores neglecting the role of most important parameters of the pre-trained network over in-distribution (ID) data. In this study, we propose a novel approach called GradOrth to facilitate OOD detection based on one intriguing observation that the important features to identify OOD data lie in the lower-rank subspace of in-distribution (ID) data. In particular, we identify OOD data by computing the norm of gradient projection on the subspaces considered important for the in-distribution data. A large orthogonal projection value (i.e. a small projection value) indicates the sample as OOD as it captures a weak correlation of the ID data. This simple yet effective method exhibits outstanding performance, showcasing a notable reduction in the average false positive rate at a 95% true positive rate (FPR95) of up to 8% when compared to the current state-of-the-art methods.
翻译:摘要:在现实应用中,确保机器学习模型安全部署的关键在于检测分布外(OOD)数据。然而,现有OOD检测方法主要依赖特征图或全梯度空间信息计算OOD分数,忽视了预训练网络中与分布内(ID)数据最相关参数的重要作用。本研究基于一个引人注目的观测——识别OOD数据的关键特征位于ID数据的低秩子空间中——提出名为GradOrth的新方法以促进OOD检测。具体而言,我们通过计算梯度在ID数据重要子空间上的投影范数来识别OOD数据。较大的正交投影值(即较小的投影值)表明样本与ID数据相关性较弱,从而将其判为OOD。这种简单而有效的方法展现出卓越性能:与当前最先进方法相比,在95%真阳性率下的平均假阳性率(FPR95)显著降低高达8%。