Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

RankFeat: Rank-1 Feature Removal for Out-of-distribution Detection

About

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.

Yue Song, Nicu Sebe, Wei Wang• 2022

Related benchmarks

TaskDatasetResultRank
Out-of-Distribution DetectioniNaturalist
FPR@9541.31
200
Out-of-Distribution DetectionSUN OOD with ImageNet-1k In-distribution (test)
FPR@9527.88
159
Out-of-Distribution DetectionImageNet OOD Average 1k (test)
FPR@9536.8
137
Out-of-Distribution DetectionPlaces
FPR9538.26
110
Out-of-Distribution DetectionPlaces with ImageNet-1k OOD In-distribution (test)
FPR9538.26
99
Out-of-Distribution DetectionAverage (iNaturalist, SUN, Places, Textures)
FPR@9536.8
74
Out-of-Distribution DetectionSUN
FPR@9527.88
71
Out-of-Distribution DetectionImageNet-1k vs Textures (test)
FPR9537.29
65
Out-of-Distribution DetectionImageNet-1K
FPR@9536.8
59
Out-of-Distribution DetectionCIFAR100 (test)
Avg FPR95 (Overall)88.29
46
Showing 10 of 27 rows

Other info

Code

Follow for update