Skip to main content
QUICK REVIEW

[论文解读] NECO: NEural Collapse Based Out-of-distribution detection

Mouïn Ben Ammar, Nacim Belkhir|arXiv (Cornell University)|Oct 10, 2023
Adversarial Robustness in Machine LearningComputer Science被引用 3
一句话总结

NECO 是一种新颖的后训练分布外(OOD)检测方法,利用神经坍缩特性——特别是分布内特征向量坍缩为等角紧框架(ETF)的几何结构,以及分布内与分布外数据之间逐渐显现的正交性。通过测量样本在ETF子空间内的相对范数,NECO 在多种架构和基准测试中实现了最先进性能,具备出色的泛化能力和理论支持。

ABSTRACT

Detecting out-of-distribution (OOD) data is a critical challenge in machine learning due to model overconfidence, often without awareness of their epistemological limits. We hypothesize that ``neural collapse'', a phenomenon affecting in-distribution data for models trained beyond loss convergence, also influences OOD data. To benefit from this interplay, we introduce NECO, a novel post-hoc method for OOD detection, which leverages the geometric properties of ``neural collapse'' and of principal component spaces to identify OOD data. Our extensive experiments demonstrate that NECO achieves state-of-the-art results on both small and large-scale OOD detection tasks while exhibiting strong generalization capabilities across different network architectures. Furthermore, we provide a theoretical explanation for the effectiveness of our method in OOD detection. Code is available at https://gitlab.com/drti/neco

研究动机与目标

  • 为解决深度神经网络中模型对分布外输入仍保持过度自信的严峻挑战。
  • 探究在训练后期通常在分布内数据中观察到的神经坍缩现象是否也出现在分布外数据中,并可否用于检测。
  • 开发一种与模型架构无关、高效且无需微调或额外数据的后训练 OOD 检测方法。
  • 基于神经坍缩的几何特性,为所提方法的有效性提供理论基础。

提出的方法

  • 该方法基于样本特征向量在由分布内类别均值张成的子空间内的相对范数计算得分,这些类别均值在神经坍缩条件下形成单纯形等角紧框架(ETF)。
  • 通过将特征向量在 ETF 子空间内的范数归一化为总范数,生成标量 OOD 得分。
  • 该方法利用在训练后期观察到的 ID/OOD 正交性(NC5)特性,即 OOD 样本随训练推进逐渐与 ETF 结构正交。
  • 该方法为后训练方法:使用预训练模型,无需微调或额外数据,仅依赖倒数第二层的特征。
  • 得分基于神经坍缩的几何特性推导,特别是类别均值收敛至 ETF 及简化为最近类别中心分类的特性。
  • 该方法对模型架构和超参数调优具有不变性,可在 ViT、Swin 和 ResNet 等多种模型中实现广泛泛化。
Figure 1: Convergence to ID/OOD orthogonality for ViT-B (left), Resnet-18 (right) both trained on CIFAR-10 as ID and tested in the presence of OOD data. Dashed purple lines indicate the end of warm-up steps in the case of ViT and learning rate decay epochs for ResNet-18.
Figure 1: Convergence to ID/OOD orthogonality for ViT-B (left), Resnet-18 (right) both trained on CIFAR-10 as ID and tested in the presence of OOD data. Dashed purple lines indicate the end of warm-up steps in the case of ViT and learning rate decay epochs for ResNet-18.

实验结果

研究问题

  • RQ1神经坍缩现象是否延伸至分布外数据,且可否用于 OOD 检测?
  • RQ2在训练后期观察到的分布内与分布外特征之间的几何正交性,能否作为可靠的 OOD 信号?
  • RQ3NECO 在性能和跨架构泛化能力方面与现有后训练 OOD 检测方法相比如何?
  • RQ4NECO 基于神经坍缩几何特性区分 OOD 样本的有效性,其理论基础是什么?

主要发现

  • 在 openOOD 基准上,NECO 实现了最先进性能,在 ImageNet-1K 上对多个 OOD 数据集和架构的平均 AUROC 达 75.94%,FPR95 为 65.55%,优于 18 种基线方法。
  • 在 CIFAR-10/CIFAR-100 基准上,当使用 ViT-B/16 检测 SVHN 为 OOD 时,NECO 实现近乎完美的分离(AUROC > 89.5),展现出强大的判别能力。
  • 该方法在架构间具有良好的泛化能力:ViT-B/16 表现最佳,表明其展现出更强的神经坍缩特性,这与更好的 OOD 检测性能相关。
  • NECO 在多种 OOD 基准上表现一致,包括 ImageNet-R、ImageNet-C、Textures 和 iNaturalist,在多个组合中 AUROC 值超过 80%。
  • NECO 得分分布在许多设置中清晰区分了分布内与分布外样本,尤其在 ViT 模型中表现显著,验证了该方法的判别能力。
  • 理论分析证实,NECO 的有效性源于分布内特征的几何坍缩,以及 OOD 数据对 ETF 子空间的正交性增强。
Figure 2: Feature projections on the first 2 principal components of a PCA fitted on CIFAR-10 (ID) using the ViT penultimate layer representation. OOD data are ImageNet-O (left), Textures (middle) and SVHN (right) . The Figure shows how NC1( 1 ) property is satisfied by ID data, and that OOD data li
Figure 2: Feature projections on the first 2 principal components of a PCA fitted on CIFAR-10 (ID) using the ViT penultimate layer representation. OOD data are ImageNet-O (left), Textures (middle) and SVHN (right) . The Figure shows how NC1( 1 ) property is satisfied by ID data, and that OOD data li

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。