Skip to main content
QUICK REVIEW

[论文解读] On the Importance of Gradients for Detecting Distributional Shifts in the Wild

Rui Huang, Andrew Geng|arXiv (Cornell University)|Oct 1, 2021
Anomaly Detection Techniques and Applications被引用 88
一句话总结

GradNorm 利用从 softmax 输出与均匀分布之间的 KL 散度反向传播得到的梯度范数来检测超出分布的输入,在 ImageNet 基准测试上相较于以往的输出基和特征基方法实现了更出色的 OOD 检测。

ABSTRACT

Detecting out-of-distribution (OOD) data has become a critical component in ensuring the safe deployment of machine learning models in the real world. Existing OOD detection approaches primarily rely on the output or feature space for deriving OOD scores, while largely overlooking information from the gradient space. In this paper, we present GradNorm, a simple and effective approach for detecting OOD inputs by utilizing information extracted from the gradient space. GradNorm directly employs the vector norm of gradients, backpropagated from the KL divergence between the softmax output and a uniform probability distribution. Our key idea is that the magnitude of gradients is higher for in-distribution (ID) data than that for OOD data, making it informative for OOD detection. GradNorm demonstrates superior performance, reducing the average FPR95 by up to 16.33% compared to the previous best method.

研究动机与目标

  • 推动在超出分布内准确度的前提下,实现现实世界部署的鲁棒 OOD 检测。
  • 探索梯度空间是否包含区分 ID 与 OOD 数据的有用信号。
  • 提出一种简单的、无训练方法(GradNorm),使用梯度幅值作为 OOD 得分。
  • 分析梯度空间信息如何结合特征与输出信号以提高可分离性。

提出的方法

  • 对网络参数计算 softmax 输出与均匀分布之间的 KL 散度的梯度。
  • 对这些梯度进行反向传播,得到梯度向量,并将其向量范数用作 OOD 得分。
  • 使用最后一层全连接层的权重作为梯度来源,以提高效率和性能。
  • 在标签不可知和 OOD 不受限的设置下操作,不需要对反向传播的真值标签。
  • 研究不同 Lp 范数(偏好 L1)和温度 T 对 GradNorm 性能的影响。

实验结果

研究问题

  • RQ1梯度空间是否能为 ID 与 OOD 数据提供超越激活或输出空间的判别信号?
  • RQ2哪种梯度来源(网络的哪一层/参数)能够提供最佳的 OOD 检测性能与计算效率?
  • RQ3在使用基于梯度的分数时,哪种损失形式和向量范数能最大化 ID 与 OOD 的可分离性?
  • RQ4结构选择和温度尺度对基于梯度的 OOD 检测效果有何影响?

主要发现

  • 与之前最佳方法相比,GradNorm 在 ImageNet 基准上将平均 FPR95 降低最多 16.33%。
  • 来自最后一个 FC 层的梯度范数在性能与计算之间提供最佳权衡。
  • 使用 KL 散度的均匀目标(而非 one-hot 目标)获得更强的 ID 与 OOD 分离,GradNorm 比 one-hot 变体在显著的边际上有更优表现。
  • 梯度的 L1 范数在 GradNorm 中始终优于其他范数(包括高阶范数和无穷范数)。
  • GradNorm 能同时从特征和输出空间捕获联合信息,导致比仅使用特征信息或输出信息更强的可分离性。

更好的研究,从现在开始

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

无需绑定信用卡

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