MahaVar: OOD Detection via Class-wise Mahalanobis Distance Variance under Neural Collapse

📅 2026-05-14
📈 Citations: 0
Influential: 0
📄 PDF

career value

244K/year
🤖 AI Summary
This work addresses the insufficient reliability of out-of-distribution (OOD) detection by deep neural networks in safety-critical scenarios. Building upon the geometric structure of neural collapse, it theoretically establishes—for the first time—that in-distribution (ID) samples exhibit a sharply minimized variance of inter-class Mahalanobis distances in the feature space. Leveraging this insight, the authors propose a novel post-hoc OOD detection method that constructs a discriminative signal based on the variance of inter-class Mahalanobis distances. Evaluated on the OpenOOD v1.5 benchmark using CIFAR-100 and ImageNet, the method significantly outperforms existing Mahalanobis-distance-based approaches and achieves state-of-the-art performance in terms of both AUROC and FPR@95 metrics.
📝 Abstract
Out-of-distribution (OOD) detection is a critical component for ensuring the reliability of deep neural networks in safety-critical applications. In this work, we present a key empirical observation: for in-distribution (ID) samples, class-wise Mahalanobis distances exhibit a pronounced sharp minimum structure, where the distance to the nearest class is small while distances to all other classes remain large, resulting in high variance across classes. In contrast, OOD samples tend to exhibit a less pronounced sharp minimum structure, producing comparatively lower variance across classes. We further provide a theoretical analysis grounding this observation in Neural Collapse geometry: under relaxed Neural Collapse assumptions on within-class compactness and inter-class separation, ID samples are shown to structurally exhibit high class-wise distance variance, offering a theoretical basis for its use as an OOD score. Motivated by this observation and its theoretical backing, we propose MahaVar, a simple and effective post-hoc OOD detector that augments the Mahalanobis distance with a class-wise distance variance term. Following the OpenOOD v1.5 benchmark protocol, MahaVar achieves state-of-the-art performance on CIFAR-100 and ImageNet, with consistent improvements in both AUROC and FPR@95 over existing Mahalanobis-based methods across all benchmarks.
Problem

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

Out-of-distribution detection
Mahalanobis distance
Neural Collapse
deep neural networks
reliability
Innovation

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

Mahalanobis distance variance
Neural Collapse
Out-of-distribution detection
class-wise distance structure
post-hoc OOD detection