揭示马氏距离检测性能波动的几何根源,提出可调半径归一化方法提升效果。
A Geometry-Based View of Mahalanobis OOD Detection
- 从特征空间几何角度分析马氏距离OOD检测的成败机制。
- 发现类内谱结构与局部内在维数决定检测性能,且可量化追踪。
- 引入径向缩放归一化,仅调整半径不改变方向,提升检测鲁棒性。
分布外(OOD)检测对视觉模型可靠部署至关重要。基于马氏距离的检测器虽为强基线,但其性能在现代预训练表示中差异显著,且缺乏对影响其成败的特征空间属性的理解。本文在多种基础模型主干网络和马氏变体上开展大规模研究。首先,证明马氏风格的OOD检测并非普遍可靠:性能高度依赖于特征表示,随预训练数据与微调策略变化显著。其次,将这一可变性归因于分布内几何特性,识别出两个能一致追踪马氏检测行为的分布内总结指标:类内谱结构与局部内在维度。最后,将归一化视为几何调控手段,提出径向缩放ℓ₂归一化ϕ_β(z)=z/‖z‖^β,保留方向的同时收缩或扩展特征半径。通过调节β改变半径而保持方向不变,同一二次型检测器面对不同分布内几何。基于仅来自分布内信号选择β,通常优于固定归一化基线。
原文摘要 · Abstract (English)
Out-of-distribution (OOD) detection is critical for reliable deployment of vision models. Mahalanobis-based detectors remain strong baselines, yet their performance varies widely across modern pretrained representations, and it is unclear which properties of a feature space cause these methods to succeed or fail. We conduct a large-scale study across diverse foundation-model backbones and Mahalanobis variants. First, we show that Mahalanobis-style OOD detection is not universally reliable: performance is highly representation-dependent and can shift substantially with pretraining data and fine-tuning regimes. Second, we link this variability to in-distribution geometry and identify a two-term ID summary that consistently tracks Mahalanobis OOD behavior across detectors: within-class spectral structure and local intrinsic dimensionality. Finally, we treat normalization as a geometric control mechanism and introduce radially scaled $\ell_2$ normalization, $ϕ_β(z)=z/\|z\|^β$, which preserves directions while contracting or expanding feature radii. Varying $β$ changes the radii while preserving directions, so the same quadratic detector sees a different ID geometry. We choose $β$ from ID-only geometry signals and typically outperform fixed normalization baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。