Deep neural networks are susceptible to generating overconfident yet erroneous predictions when presented with data beyond known concepts. This challenge underscores the importance of detecting out-of-distribution (OOD) samples in the open world. In this work, we propose a novel feature-space OOD detection score that jointly reasons with both class-specific and class-agnostic information. Specifically, our approach utilizes Whitened Linear Discriminant Analysis to project features into two subspaces - the discriminative and residual subspaces - in which the ID classes are maximally separated and closely clustered, respectively. The OOD score is then determined by combining the deviation from the input data to the ID distribution in both subspaces. The efficacy of our method, named WDiscOOD, is verified on the large-scale ImageNet-1k benchmark, with six OOD datasets that covers a variety of distribution shifts. WDiscOOD demonstrates superior performance on deep classifiers with diverse backbone architectures, including CNN and vision transformer. Furthermore, we also show that our method can more effectively detect novel concepts in representation space trained with contrastive objectives, including supervised contrastive loss and multi-modality contrastive loss.
翻译:深度神经网络在面对超出已知概念的数据时,容易产生过度自信但错误的预测。这一挑战凸显了在开放世界中检测分布外(OOD)样本的重要性。本文提出了一种新颖的特征空间OOD检测分数,该分数联合考虑了类别特定信息和类别无关信息。具体而言,我们的方法利用白化线性判别分析将特征投影到两个子空间——判别子空间和残差子空间中,在这两个子空间中,已知类别分别被最大程度地分离和紧密聚类。随后,通过结合输入数据在这两个子空间中与已知类别分布的偏差来确定OOD分数。我们提出的方法名为WDiscOOD,其有效性在大型ImageNet-1k基准上得到了验证,使用了涵盖多种分布偏移的六个OOD数据集。WDiscOOD在具有多种骨干架构(包括CNN和视觉Transformer)的深度分类器上表现出了优越性能。此外,我们还展示了该方法能够更有效地检测出使用对比目标(包括监督对比损失和多模态对比损失)训练的表征空间中的新概念。