Skip to main content
QUICK REVIEW

[论文解读] GradOrth: A Simple yet Efficient Out-of-Distribution Detection with Orthogonal Projection of Gradients

Sima Behpour, Thang Doan|arXiv (Cornell University)|Aug 1, 2023
Anomaly Detection Techniques and ApplicationsComputer Science被引用 3
一句话总结

GradOrth 提出了一种新颖的分布外(OOD)检测方法,通过奇异值分解(SVD)从分布内(ID)数据激活中提取低秩子空间,并将梯度正交投影到该子空间上。通过测量梯度正交投影的范数,识别出与ID数据子空间相关性较弱的样本作为OOD样本,相比最先进方法将FPR95降低了2.71%至8.05%。

ABSTRACT

Detecting out-of-distribution (OOD) data is crucial for ensuring the safe deployment of machine learning models in real-world applications. However, existing OOD detection approaches primarily rely on the feature maps or the full gradient space information to derive OOD scores neglecting the role of most important parameters of the pre-trained network over in-distribution (ID) data. In this study, we propose a novel approach called GradOrth to facilitate OOD detection based on one intriguing observation that the important features to identify OOD data lie in the lower-rank subspace of in-distribution (ID) data. In particular, we identify OOD data by computing the norm of gradient projection on the subspaces considered important for the in-distribution data. A large orthogonal projection value (i.e. a small projection value) indicates the sample as OOD as it captures a weak correlation of the ID data. This simple yet effective method exhibits outstanding performance, showcasing a notable reduction in the average false positive rate at a 95% true positive rate (FPR95) of up to 8% when compared to the current state-of-the-art methods.

研究动机与目标

  • 为解决深度学习模型中可靠OOD检测的挑战,特别是在安全关键应用中的挑战。
  • 通过聚焦于分布内数据最具信息量的梯度子空间,而非完整梯度空间或启发式稀疏化方法,提升检测性能。
  • 提供一种基于梯度几何、无需微调的系统性、高效且后处理的OOD检测方法。
  • 证明对于OOD检测至关重要的判别性特征存在于ID数据梯度的低秩子空间中。

提出的方法

  • 该方法通过对预训练网络在小部分随机ID数据上的激活应用奇异值分解(SVD),计算分布内(ID)数据的低秩子空间。
  • 将测试样本的完整梯度投影到该学习到的ID子空间上,并计算梯度正交(垂直)分量的范数。
  • 正交投影范数越大,表示与ID数据的相关性越弱,表明样本为OOD。
  • OOD得分定义为正交投影的范数,值越高表示越可能是OOD样本。
  • 该方法为后处理方法,无需微调,每个测试样本仅需一次前向传播和一次梯度计算。
  • 该方法计算高效且可扩展,仅依赖于小部分ID子集的SVD和标准反向传播。
Figure 1 : The main idea of GradOrth : Measuring the orthogonal projection of the gradient of a testing sample onto a $k$ -dimension (e.g $k$ =2 here) subspace of pre-trained network on ID data, by the angle $\alpha$ between $\overrightarrow{g(x_{i})}=\nabla_{\theta^{L}}\mathcal{L}({\bm{\theta}}^{L}
Figure 1 : The main idea of GradOrth : Measuring the orthogonal projection of the gradient of a testing sample onto a $k$ -dimension (e.g $k$ =2 here) subspace of pre-trained network on ID data, by the angle $\alpha$ between $\overrightarrow{g(x_{i})}=\nabla_{\theta^{L}}\mathcal{L}({\bm{\theta}}^{L}

实验结果

研究问题

  • RQ1能否通过分布内激活的低秩分解识别出对OOD检测最具信息量的梯度子空间?
  • RQ2与完整梯度范数或基于特征的方法相比,将梯度正交投影到这些子空间上是否能提升OOD检测性能?
  • RQ3能否设计一种基于梯度子空间几何的系统性、高效且后处理的OOD检测方法?
  • RQ4在FPR95和ID准确率方面,GradOrth与最先进方法相比表现如何?

主要发现

  • GradOrth在多个基准测试中相比最先进基线方法,将FPR95降低了2.71%至8.05%。
  • 该方法在保持高分布内(ID)分类准确率的同时,显著提升了OOD检测的可靠性。
  • 消融实验表明,梯度的低秩子空间在OOD检测中比完整梯度空间或随机子空间更有效。
  • 理论与实证分析验证了正交梯度投影能有效捕捉与ID数据的弱相关性,是强有力的OOD指示信号。
  • GradOrth优于GradNorm、ODIN和MSP等方法,尤其在95%真正率下的误报率降低方面表现突出。
  • 该方法计算高效,无需模型微调或架构修改。
Figure 2 : Orthogonal Projection
Figure 2 : Orthogonal Projection

更好的研究,从现在开始

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

无需绑定信用卡

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