The task of out-of-distribution (OOD) detection is crucial for deploying machine learning models in real-world settings. In this paper, we observe that the singular value distributions of the in-distribution (ID) and OOD features are quite different: the OOD feature matrix tends to have a larger dominant singular value than the ID feature, and the class predictions of OOD samples are largely determined by it. This observation motivates us to propose \texttt{RankFeat}, a simple yet effective \texttt{post hoc} approach for OOD detection by removing the rank-1 matrix composed of the largest singular value and the associated singular vectors from the high-level feature (\emph{i.e.,} $\mathbf{X}{-} \mathbf{s}_{1}\mathbf{u}_{1}\mathbf{v}_{1}^{T}$). \texttt{RankFeat} achieves the \emph{state-of-the-art} performance and reduces the average false positive rate (FPR95) by 17.90\% compared with the previous best method. Extensive ablation studies and comprehensive theoretical analyses are presented to support the empirical results.
翻译:分配外检测( OOD) 任务对于在现实世界环境中部署机器学习模型至关重要 。 在本文中, 我们观察到, 分配中( ID) 和 OOOD 特性的单值分布非常不同: OOOD 特征矩阵通常具有比 ID 特性更大的主要单值, 而 OOD 样本的分类预测在很大程度上由它决定 。 这一观察激励我们提出\ texttt{ RankFeat}, 一种简单而有效的 OOD 检测 方法, 包括从高特性(\ emph{ i. e.} $\\ mathbf{X}\\\\ mathbf{ {\\\\\\\\\\\\\\\\\\\ \\\\\\ \\\\\\ \\\\\\\\\\\ \\\\\ \\\\\ \ \ \\\\\\\\\ \ \\\ \\\ \\\\\\\\\ \ \\ \ \ \ \\\\\ \ \ \ \\\\\\\\\\\\\\ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \ \ \ \\ \ \ \\\\\\\\\\\\\\\ \ \ \\\\\\\ \ \ \ \ \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\