Lune

NeurIPS2022Top-tier venue

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

Yue Song, Nicu Sebe, Wei Wang

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 RankFeat, a simple yet effective 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 (i.e., X−s1u1v1T\mathbf{X}{-} \mathbf{s}_{1}\mathbf{u}_{1}\mathbf{v}_{1}^{T}). RankFeat achieves the 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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

29 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation cites Energy-based Out-of-distribution Detection
  • In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Learning to Shape In-distribution Feature Space for Out-of-distribution Detection cites Energy-based Out-of-distribution Detection
  • Learning to Shape In-distribution Feature Space for Out-of-distribution Detection cites NECO: NEural Collapse Based Out-of-distribution detection
  • Nearest Neighbor Guidance for Out-of-Distribution Detection cites Energy-based Out-of-distribution Detection
  • Nearest Neighbor Guidance for Out-of-Distribution Detection cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • NECO: NEural Collapse Based Out-of-distribution detection cites In or Out? Fixing ImageNet Out-of-Distribution Detection Evaluation
  • NECO: NEural Collapse Based Out-of-distribution detection cites Energy-based Out-of-distribution Detection
  • NECO: NEural Collapse Based Out-of-distribution detection cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Kernel PCA for Out-of-Distribution Detection cites Energy-based Out-of-distribution Detection
  • Kernel PCA for Out-of-Distribution Detection cites Nearest Neighbor Guidance for Out-of-Distribution Detection
  • Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers29

  1. In or Out? Fixing ImageNet Out-of-Distribution Detection EvaluationJulian Bitterwolf, Maximilian Müller, Matthias HeinICML 2023 · 154 citations
  2. Nearest Neighbor Guidance for Out-of-Distribution DetectionJaewoo Park, Yoon Gyo Jung, Andrew Beng Jin TeohICCV 2023 · 74 citations
  3. NECO: NEural Collapse Based Out-of-distribution detectionMouïn Ben Ammar, Nacim Belkhir, Sebastian Popescu, Antoine Manzanera et al.ICLR 2024 · 40 citations
  4. Kernel PCA for Out-of-Distribution DetectionKun Fang, Qinghua Tao, Kexin Lv, Mingzhen He et al.NeurIPS 2024 · 37 citations
  5. Learning to Shape In-distribution Feature Space for Out-of-distribution DetectionYonggang Zhang, Jie Lu, Bo Peng, Zhen Fang et al.NeurIPS 2024 · 33 citations

Builds on36

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetLi Yuan, Yunpeng Chen, Tao Wang, Weihao Yu et al.ICCV 2021 · 2,462 citations
  3. Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
  4. WILDS: A Benchmark of in-the-Wild Distribution ShiftsPang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie et al.ICML 2021 · 1,773 citations
  5. AugMix: A Simple Data Processing Method to Improve Robustness and UncertaintyDan Hendrycks, Norman Mu, Ekin Dogus Cubuk, Barret Zoph et al.ICLR 2020 · 1,572 citations

Related papers

  1. GradOrth: A Simple yet Efficient Out-of-Distribution Detection with Orthogonal Projection of GradientsSima Behpour, Thang Long Doan, Xin Li, Wenbin He et al.NeurIPS 2023 · 34 citations
  2. Activation Subspaces for Out-of-Distribution DetectionBaris Zöngür, Robin Hesse, Stefan RothICCV 2025 · 2 citations
  3. Exploiting Discrepancy in Feature Statistic for Out-of-Distribution DetectionXiaoyuan Guan, Jiankang Chen, Shenshen Bu, Yuren Zhou et al.AAAI 2024 · 4 citations
  4. Leveraging Perturbation Robustness to Enhance Out-of-Distribution DetectionWenxi Chen, Raymond A. Yeh, Shaoshuai Mou, Yan GuCVPR 2025
  5. Out-of-Distribution Detection with Deep Nearest NeighborsYiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan LiICML 2022 · 789 citations
Dusk over the sea between two cliffs drawn in fine vertical lines