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

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

18 Sep 2022arXiv:2209.08590archive 2025-07-28

Yue Song, Nicu Sebe, Wei Wang

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.,} 𝐗- 𝐬₁𝐮₁𝐯₁ᵀ). \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.

PaperPDFCode

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Code

kingjamessong/rankfeat officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Out-of-Distribution Detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Out-of-Distribution Detection ImageNet-1k vs Curated OODs (avg.) RankFeat (ResNetv2-101) AUROC 92.15 #8 of 16 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs Curated OODs (avg.) RankFeat (ResNetv2-101) FPR95 36.8 #8 of 16 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs Places RankFeat (ResNetv2-101) AUROC 90.93 #8 of 25 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs Places RankFeat (ResNetv2-101) FPR95 39.34 #8 of 25 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs SUN RankFeat (ResNetv2-101) AUROC 94.07 #8 of 22 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs SUN RankFeat (ResNetv2-101) FPR95 29.27 #8 of 22 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs Textures RankFeat (ResNetv2-101) AUROC 91.7 #15 of 34 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs Textures RankFeat (ResNetv2-101) FPR95 37.29 #15 of 34 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs iNaturalist RankFeat (ResNetv2-101) AUROC 91.91 #19 of 28 Archive leaderboard report
Out-of-Distribution Detection ImageNet-1k vs iNaturalist RankFeat (ResNetv2-101) FPR95 41.31 #19 of 28 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections