We introduce MM++ (Multilayer Mahalanobis++), a fully unsupervised, strictly post-hoc, and scale-invariant framework for Out-of-Distribution (OOD) detection. To address the trade-off between scale invariance and hierarchical expressivity, MM++ constructs a principled joint feature space. It first identifies discriminative intermediate layers by measuring entropy density drops, which mark the boundaries of sharp semantic compression. By fusing these selected layers with the terminal representation, the framework captures latent cross-layer correlations while mitigating early-layer noise. Crucially, a Ledoit-Wolf regularized tied covariance matrix stabilizes this unified space, enabling reliable distance estimation. Requiring no auxiliary OOD data, classifier fine-tuning, or architectural modifications, MM++ delivers robust performance across distinct architectures for both near- and far-OOD detection.
翻译:我们提出MM++(多层马氏距离++),一种完全无监督、严格事后且尺度不变的分布外(OOD)检测框架。为解决尺度不变性与层次表达力之间的权衡,MM++构建了一个原则性的联合特征空间。首先通过测量熵密度下降来识别判别性中间层,这些下降标志着语义的急剧压缩边界。通过将这些选定层与终端表示进行融合,该框架在减轻早期层噪声的同时,捕捉潜在的跨层相关性。关键在于,采用Ledoit-Wolf正则化的绑定协方差矩阵稳定了这一统一空间,从而实现可靠的距离估计。无需辅助OOD数据、分类器微调或架构修改,MM++在远距离和近距离OOD检测任务中,均能在不同架构上提供稳健的性能。