HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

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

Yue Song Nicu Sebe Wei Wang

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

Abstract

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.

Code Repositories

kingjamessong/rankfeat
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
out-of-distribution-detection-on-imagenet-1k-10RankFeat (ResNetv2-101)
AUROC: 91.7
FPR95: 37.29
out-of-distribution-detection-on-imagenet-1k-12RankFeat (ResNetv2-101)
AUROC: 92.15
FPR95: 36.8
out-of-distribution-detection-on-imagenet-1k-3RankFeat (ResNetv2-101)
AUROC: 91.91
FPR95: 41.31
out-of-distribution-detection-on-imagenet-1k-8RankFeat (ResNetv2-101)
AUROC: 94.07
FPR95: 29.27
out-of-distribution-detection-on-imagenet-1k-9RankFeat (ResNetv2-101)
AUROC: 90.93
FPR95: 39.34

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
RankFeat: Rank-1 Feature Removal for Out-of-distribution Detection | Papers | HyperAI