Detecting Out-of-distribution through the Lens of Neural Collapse

Litian Liu, Yao Qin
2/14/2026

No official code found. Best implementation: litianliu/NCI-OOD (7 stars, MIT, last commit 2025-03-18).

Abstract

Out-of-Distribution (OOD) detection is critical for safe deployment; however, existing detectors often struggle to generalize across datasets of varying scales and model architectures, and some can incur high computational costs in real-world applications. Inspired by the phenomenon of Neural Collapse, we propose a versatile and efficient OOD detection method. Specifically, we re-characterize prior observations that in-distribution (ID) samples form clusters, demonstrating that, with appropriate centering, these clusters align closely with model weight vectors. Additionally, we reveal that ID features tend to expand into a simplex Equiangular Tight Frame, explaining the common observation that ID features are situated farther from the origin than OOD features. Incorporating both insights from Neural Collapse, our OOD detector leverages feature proximity to weight vectors and complements this approach by using feature norms to effectively filter out OOD samples. Extensive experiments on off-the-shelf models demonstrate the robustness of our OOD detector across diverse scenarios, mitigating generalization discrepancies and enhancing overall performance, with inference latency comparable to that of the basic softmax-confidence detector. Code is available at: https://github.com/litianliu/NCI-OOD.

View on arXivView PDF

Code Implementations(1)

litianliu/NCI-OODCommunity100%
MIT

Detecting Out-of-Distribution through the Lens of Neural Collapse (CVPR 2025)

72Shell, PythonMar 18, 20251 years agoMIT

Similar Papers

Cite this paper

@article{liu2026detecting,
  title  = {Detecting Out-of-distribution through the Lens of Neural Collapse},
  author = {Litian Liu and Yao Qin},
  year   = {2026},
  eprint = {2311.01479},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2311.01479},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.01479.svg)](https://codeofpaper.com/paper/2311.01479)

Discussion