Detecting out-of-distribution (OOD) examples is crucial to guarantee the reliability and safety of deep neural networks in real-world settings. In this paper, we offer an innovative perspective on quantifying the disparities between in-distribution (ID) and OOD data -- analyzing the uncertainty that arises when models attempt to explain their predictive decisions. This perspective is motivated by our observation that gradient-based attribution methods encounter challenges in assigning feature importance to OOD data, thereby yielding divergent explanation patterns. Consequently, we investigate how attribution gradients lead to uncertain explanation outcomes and introduce two forms of abnormalities for OOD detection: the zero-deflation abnormality and the channel-wise average abnormality. We then propose GAIA, a simple and effective approach that incorporates Gradient Abnormality Inspection and Aggregation. The effectiveness of GAIA is validated on both commonly utilized (CIFAR) and large-scale (ImageNet-1k) benchmarks. Specifically, GAIA reduces the average FPR95 by 23.10% on CIFAR10 and by 45.41% on CIFAR100 compared to advanced post-hoc methods.
翻译:检测分布外样本对于保障深度神经网络在实际应用中的可靠性与安全性至关重要。本文从量化分布内与分布外数据差异的创新视角切入,通过分析模型在解释其预测决策时产生的不确定性展开研究。这一视角源于我们的发现:基于梯度的归因方法在分配特征重要性时,针对分布外数据会遭遇挑战,从而产生差异化的解释模式。为此,我们探究归因梯度如何导致不确定的解释结果,并引入两种用于分布外检测的异常形态:零膨胀异常与通道均值异常。进而提出GAIA,一种融合梯度异常检测与聚合的简洁高效方法。该方法在常用基准(CIFAR)与大规模基准(ImageNet-1k)上均验证了有效性。具体而言,相较于先进的后处理方法,GAIA将CIFAR10的平均FPR95降低23.10%,CIFAR100降低45.41%。