Skip to main content
QUICK REVIEW

[论文解读] RankFeat: Rank-1 Feature Removal for Out-of-distribution Detection

Song Yue, Nicu Sebe|arXiv (Cornell University)|Sep 18, 2022
Anomaly Detection Techniques and Applications被引用 15
一句话总结

RankFeat 是一种事后(post-hoc)分布外(OOD)检测方法,通过移除由最大奇异值及其对应奇异向量定义的秩-1分量,从高层深度特征中去除。通过此方法,显著降低了模型在 OOD 样本上的过度自信预测,实现了最先进的性能,相比之前的方法,平均 FPR95 降低 17.90%,AUROC 提高 5.44%。

ABSTRACT

The task of out-of-distribution (OOD) detection is crucial for deploying machine learning models in real-world settings. In this paper, we observe that the singular value distributions of the in-distribution (ID) and OOD features are quite different: the OOD feature matrix tends to have a larger dominant singular value than the ID feature, and the class predictions of OOD samples are largely determined by it. This observation motivates us to propose exttt{RankFeat}, a simple yet effective exttt{post hoc} approach for OOD detection by removing the rank-1 matrix composed of the largest singular value and the associated singular vectors from the high-level feature (\emph{i.e.,} $\mathbf{X}{-} \mathbf{s}_{1}\mathbf{u}_{1}\mathbf{v}_{1}^{T}$). exttt{RankFeat} achieves the \emph{state-of-the-art} performance and reduces the average false positive rate (FPR95) by 17.90\% compared with the previous best method. Extensive ablation studies and comprehensive theoretical analyses are presented to support the empirical results.

研究动机与目标

  • 解决深度学习模型在真实部署中对分布外(OOD)数据产生过度自信预测的挑战。
  • 识别分布内(ID)与 OOD 特征之间奇异值分布的关键结构性差异:OOD 特征表现出显著更大的主导奇异值。
  • 开发一种简单、事后 OOD 检测方法,无需微调或架构修改即可应用于预训练模型。
  • 提升 OOD 检测在多种模型、网络深度和基准测试中的泛化性与鲁棒性。

提出的方法

  • 从预训练模型中提取高层特征(例如 ResNet 的 Block 3 或 Block 4)
  • 对特征矩阵执行截断奇异值分解(SVD),以分离出最高奇异三元组:σ₁, u₁, v₁
  • 从原始特征矩阵中移除秩-1 矩阵 σ₁·u₁·v₁ᵀ,得到扰动后的特征表示
  • 利用移除秩-1 分量后的特征所得到的 logits 计算 OOD 分数,采用不确定性或基于能量的评分方法
  • 在多个网络层应用该方法,并通过逻辑值平均等方式融合特征以提升性能
  • 使用迭代幂迭代(PI)高效近似主导奇异向量对,从而在不损失性能的前提下降低计算成本

实验结果

研究问题

  • RQ1高层特征中的主导奇异值在分布内与分布外样本之间是否存在显著差异?
  • RQ2移除特征矩阵的秩-1 分量是否能有效降低 OOD 数据上的过度自信预测?
  • RQ3RankFeat 在不同模型和数据集上与当前最先进事后 OOD 检测方法相比,性能如何?
  • RQ4秩-1 移除在提升 OOD 检测性能方面的理论基础是什么?
  • RQ5不同的特征融合策略与网络层选择如何影响最终的 OOD 检测性能?

主要发现

  • 与之前最先进方法相比,RankFeat 将平均 FPR95 降低了 17.90%,展现出更优的 OOD 检测性能。
  • 在各类基准测试中,该方法使平均 AUROC 提升 5.44%,表明对 ID 与 OOD 数据分布的分离能力更强。
  • 大量消融实验表明,仅移除秩-1 分量可获得最佳性能,而移除更高秩分量(n > 1)会导致性能下降。
  • 通过逻辑值平均融合多个层(如 Block 3 和 Block 4)的特征可实现最佳性能,优于逐元素或特征级融合。
  • 理论分析表明,秩-1 移除能更有效地降低 OOD 分数的上界,并使 OOD 特征统计特性更接近于随机矩阵。
  • 该方法计算效率高,基于幂迭代的近似实现 48.41% 的时间减少,且仅比 ReAct 高出 4.89% 的成本,同时支持批量推理。

更好的研究,从现在开始

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

无需绑定信用卡

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