用梯度外积解释图像分类模型,提升定位精度且无需额外计算开销。
AGOP as Explanation: From Feature Learning to Per-Sample Attribution in Image Classifiers
- 基于训练分布的梯度外积构建归因权重,抑制噪声并强化关键像素。
- 在合成与真实数据上,归因效果比IG高出44%(线性任务)和7倍(乘法任务)。
- 可零成本部署,适合需要高效可解释性的实际应用场景。
平均梯度外积(AGOP)主导神经网络的特征学习:神经特征假说指出,每一层的权重格拉姆矩阵与训练分布上计算的对应AGOP矩阵对齐。本文提出一个互补问题:该量能否作为个体预测的后验归因方法?我们引入AGOP-Weighted——一种新归因方法,将样本级梯度乘以√(diag(M)/max diag(M)),利用训练分布先验抑制梯度噪声并放大一致重要的像素,这是以往方法未具备的组合。我们形式化了两种配套变体——AGOP-Local(样本梯度,等价于VanillaGrad)和AGOP-Global(直接使用diag(M)作为零成本显著图),并实现高效的训练时累积钩子;其中AGOP-Global仅需磁盘查找即可使用,而AGOP-Weighted只需一次梯度传播。我们在两个具有像素级真值的基准上首次严谨对比了AGOP归因与积分梯度(IG)、SmoothGrad、GradCAM和VanillaGrad:(i) 合成的XAI-TRIS基准(四种分类场景,8×8图像,CNN8by8);(ii) 光学逼真的CLEVR-XAI基准(在ImageNet上微调的ResNet-18)。AGOP-Weighted在线性任务上比IG高44% mIoU;AGOP-Global在乘法任务上比IG高7倍mIoU(IG低于随机水平),且为零推理成本。这些结果在ResNet-18上的CLEVR-XAI也得到验证(分别提升+18%和+37%)。此外,我们发现GradCAM在小分辨率图像上因空间分辨率塌陷而失效,且diag(M)质量在训练中持续提升,即使分类准确率已饱和。
原文摘要 · Abstract (English)
The Average Gradient Outer Product (AGOP) governs feature learning in neural networks: the Neural Feature Ansatz states that weight Gram matrices at each layer align with the corresponding AGOP matrices computed over the training distribution. We ask a complementary question: can this same quantity serve as a post-hoc attribution method for explaining individual predictions? We introduce AGOP-Weighted: a novel attribution method that multiplies the per-sample gradient by sqrt(diag(M) / max diag(M)), a training-distribution prior that suppresses gradient noise and amplifies consistently important pixels -- a combination not present in any prior attribution method. We formalise two companion variants -- AGOP-Local (per-sample gradient, equivalent to VanillaGrad) and AGOP-Global (diag(M) directly as a zero-cost saliency map) -- and implement an efficient training-time accumulation hook; AGOP-Global then requires zero inference cost (disk lookup) while AGOP-Weighted requires only a single gradient pass. We conduct the first rigorous comparison of AGOP attribution against Integrated Gradients (IG), SmoothGrad, GradCAM, and VanillaGrad across two benchmarks with pixel-level ground truth: (i) the synthetic XAI-TRIS benchmark (four classification scenarios, 8x8 images, CNN8by8) and (ii) the photorealistic CLEVR-XAI benchmark (ResNet-18 fine-tuned from ImageNet). AGOP-Weighted achieves 44% higher mIoU than IG on linear tasks; AGOP-Global achieves 7x higher mIoU than IG on multiplicative tasks (where IG falls below random) at zero inference cost. Both findings generalise to ResNet-18 on CLEVR-XAI (+18% and +37% respectively). We further show that GradCAM fails on small-resolution images due to spatial resolution collapse, and that diag(M) quality improves monotonically throughout training even after classification accuracy has plateaued.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。