Detecting Out-of-Distribution Through the Lens of Neural Collapse

📅 2023-11-02
🏛️ arXiv.org
📈 Citations: 5
Influential: 0
📄 PDF
🤖 AI Summary
Existing out-of-distribution (OOD) detection methods suffer from poor generalization and high computational overhead. This paper proposes a novel, efficient, and training-free OOD detection paradigm grounded in the neural collapse phenomenon: for the first time, it unifies the modeling of weight alignment and the simplex equiangular tight frame (ETF) structure, revealing that in-distribution (ID) samples exhibit significantly larger feature norm magnitudes—a fundamental geometric property. Leveraging this insight, the method jointly exploits cosine similarity (to measure weight alignment) and L2 norm (to distinguish ID vs. OOD samples), while enforcing simplex geometric constraints—requiring no fine-tuning, auxiliary networks, or gradient computation. The approach is architecture-agnostic, achieving state-of-the-art performance across diverse models (e.g., ResNet, ViT) and benchmarks. It demonstrates strong generalization and incurs inference latency comparable to standard Softmax confidence scoring. Code is publicly available.
📝 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 here: https://github.com/litianliu/NCI-OOD.
Problem

Research questions and friction points this paper is trying to address.

Detecting OOD samples robustly across diverse datasets and models
Leveraging Neural Collapse for efficient OOD detection
Reducing computational costs while maintaining detection accuracy
Innovation

Methods, ideas, or system contributions that make the work stand out.

Leverages Neural Collapse for OOD detection
Uses feature proximity to weight vectors
Incorporates feature norms for OOD filtering
🔎 Similar Papers
No similar papers found.