arXiv:2605.14413cs.LGcs.AI2026-05

通过类间马氏距离方差提升分布外检测效果

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

论文配图:MahaVar: OOD Detection via Class-wise Mahalanobis Distance Variance under Neural Collapse
图 1 · 摘自论文原文
  • 利用类内样本到各类中心的马氏距离方差差异区分分布内与分布外数据
  • 在CIFAR-100和ImageNet上达到SOTA,AUROC与FPR@95均优于现有方法
  • 方法简单有效,适用于安全关键场景下的模型可靠性验证

分布外(OOD)检测是保障深度神经网络在安全关键应用中可靠性的关键环节。本文提出一个关键实证观察:对于分布内(ID)样本,类别级马氏距离呈现出明显的尖锐极小结构——到最近类的距离很小,而与其他所有类的距离较大,导致类别间距离方差高;而分布外(OOD)样本则表现出较弱的尖锐极小结构,类别间距离方差较低。我们进一步从神经坍缩几何出发提供理论分析,在放松类内紧凑性与类间分离性假设下,证明了ID样本天然具有高的类别级距离方差,为该指标作为OOD评分提供了理论依据。基于此,我们提出MahaVar,一种简单有效的后处理OOD检测器,将马氏距离与类别级距离方差项结合。遵循OpenOOD v1.5基准协议,MahaVar在CIFAR-100和ImageNet上均达到当前最优性能,在所有基准测试中均显著提升AUROC与FPR@95。

原文摘要 · Abstract (English)

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.

OOD检测马氏距离神经坍缩分类器可靠性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。