统一多层特征建模,提升跨域异常检测准确性
Unified Multi-Layer Subspace Modeling for Cross-Domain OOD Detection

- 融合中间与深层特征构建分层嵌入,避免依赖特定层
- 在统一子空间中结合马氏距离与残差能量,识别异常
- 无需调参,适用于图像、医疗、工业等多种场景
分布外(OOD)检测仍是神经网络的关键挑战,其预测对偏离训练分布的输入可能过度自信。现有后处理方法通常基于单一层级表示(如最终输出或倒数第二层特征)或通过深度选择、校准加权组合多层特征。然而,由于分布偏移类型多样,最优表示层级在不同异常类型和领域间差异显著,固定层选择与校准聚合方法脆弱。本文提出PRISM(投影表示与中间层子空间建模),一种模型无关的后处理OOD检测方法,不独立评分各层后聚合,而是建模统一的多层特征表示。该方法将中间与深层特征融合为单一分层嵌入,估计内分布(ID)主子空间,并结合两种互补信号:(i) 在投影子空间中的类别条件马氏距离,以及 (ii) 正交于学习流形的残差能量。这一设计避免了针对特定异常类型的层权重调整,同时捕捉子空间内语义偏差与子空间外异常。在涵盖自然图像、医学影像与工业视觉检测的多个基准上,PRISM仅用单一默认配置即实现一致的当前最佳跨域OOD检测性能。此外,我们验证其推理开销极小,适合实际部署。
原文摘要 · Abstract (English)
Out-of-Distribution (OOD) detection remains a fundamental challenge for neural networks, whose predictions can be overconfident on inputs that deviate from the training distribution. Most post-hoc OOD detection methods derive scores from a single representation level (eg., logits or penultimate features) or combine multiple layers via depth selection or OOD-calibrated weighting. However, because OOD shifts are diverse, the most informative representation level can vary strongly across OOD types and domains, making fixed-layer choices and OOD-calibrated aggregation brittle. In this paper, we propose PRISM (Projected Representation with Intermediate-layer Subspace Modeling), a model-agnostic post-hoc OOD detection method that models a unified multi-layer feature representation rather than aggregating independently scored layers. PRISM fuses intermediate and deep features into a single hierarchical embedding, estimates an in-distribution (ID) principal subspace, and then combines two complementary signals: (i) a class-conditional Mahalanobis distance in the projected subspace and (ii) the residual energy orthogonal to the learned manifold. This simple design avoids OOD-tuned layer weighting while capturing both in-subspace semantic deviations and off-subspace anomalies. Across diverse benchmarks spanning natural images, medical imaging, and industrial visual inspection, PRISM achieves consistent state-of-the-art cross-domain OOD detection performance with a single default configuration across all evaluated domains and architectures. We further show that PRISM incurs minimal inference overhead, making it practical for real-world deployment.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。