17 天前

Grad-CAM:通过基于梯度的定位从深度网络中生成可视化解释

Grad-CAM:通过基于梯度的定位从深度网络中生成可视化解释

摘要

我们提出了一种技术,用于为大量基于卷积神经网络(CNN)的模型决策生成“视觉解释”,从而提升模型的可解释性。我们的方法——梯度加权类激活映射(Gradient-weighted Class Activation Mapping, Grad-CAM),利用流向最终卷积层的任意目标概念的梯度信息,生成粗略的定位图,以突出图像中对预测该概念起关键作用的区域。Grad-CAM 适用于多种CNN模型架构,包括:(1)包含全连接层的CNN;(2)用于结构化输出的CNN;(3)应用于多模态输入任务或强化学习任务的CNN,且无需任何架构修改或重新训练。我们将Grad-CAM与细粒度可视化相结合,生成高分辨率、具有类别区分能力的可视化结果,并将其应用于现成的图像分类、图像字幕生成以及视觉问答(Visual Question Answering, VQA)模型,包括基于ResNet的架构。在图像分类任务中,我们的可视化结果具有以下优势:(a)揭示模型的失效模式;(b)对对抗样本具有鲁棒性;(c)在定位性能上优于以往方法;(d)更忠实于底层模型的决策机制;(e)有助于提升泛化能力,通过识别数据集偏差来改进模型表现。对于图像字幕生成和VQA任务,我们证明了即使是非注意力机制的模型也具备输入区域的定位能力。我们进一步提出一种通过Grad-CAM识别关键神经元的方法,并结合神经元名称,为模型决策提供文本化解释。最后,我们设计并开展了人类实验,评估Grad-CAM是否有助于用户建立对模型预测结果的合理信任。实验结果表明,即使两个模型做出完全相同的预测,未经训练的用户也能借助Grad-CAM成功区分出“更强”与“更弱”的模型。相关代码已开源,可访问 https://github.com/ramprs/grad-cam/,配套演示网站为 http://gradcam.cloudcv.org,视频演示链接为 youtu.be/COjUB9Izk6E。

代码仓库

karandesaiii/CheXNet
pytorch
GitHub 中提及
sail-sg/dualformer
pytorch
GitHub 中提及
AlexSzen/wwf_shark_id
pytorch
GitHub 中提及
Onysuke/chainer-grad-cam
GitHub 中提及
sicara/tf-explain
tf
GitHub 中提及
itanvir/gradcam
tf
GitHub 中提及
kjczarne/eager_gradcam_tf
tf
GitHub 中提及
skmda37/shearletx
pytorch
GitHub 中提及
teddykoker/image-forensics
pytorch
GitHub 中提及
ramprs/grad-cam
官方
pytorch
GitHub 中提及
wsanchezdupont1/Grad-CAM
pytorch
GitHub 中提及
Mukundaram/Mukund
tf
GitHub 中提及
hs2k/pytorch-smoothgrad
pytorch
GitHub 中提及
yaleCat/Grad-CAM-pytorch
pytorch
GitHub 中提及
shyhyawJou/Grad-CAM-pytorch
pytorch
GitHub 中提及
eclique/keras-gradcam
tf
GitHub 中提及
msandeep27/Pytorch-Grad-Cam
pytorch
GitHub 中提及
bill86416/trojan_attack
pytorch
GitHub 中提及
LucasElbert/GradCam
pytorch
GitHub 中提及
AlanYangYi/PhotoStyleRecongnizer
pytorch
GitHub 中提及
frgfm/torch-cam
pytorch
GitHub 中提及
dtanoglidis/DeepShadows
tf
GitHub 中提及
vbbphc/GradCAM.jl
GitHub 中提及
meliketoy/gradcam.pytorch
pytorch
GitHub 中提及
TooTouch/WhiteBox-Part1
pytorch
GitHub 中提及
RuizhiZhang/MManGoCam
pytorch
GitHub 中提及
anilkarabulut/copy-LeNet
GitHub 中提及
gshashank84/CheXNet
pytorch
GitHub 中提及
olivesgatech/explanatory-paradigms
pytorch
GitHub 中提及
ShahinSHH/COVID-FACT
tf
GitHub 中提及
novice03/timm-vis
pytorch
GitHub 中提及
xaviercanche/Grad-CAM
pytorch
GitHub 中提及
LuanAdemi/VisualGo
pytorch
GitHub 中提及
Cloud-CV/Grad-CAM
pytorch
GitHub 中提及
yiskw713/SmoothGradCAMplusplus
pytorch
GitHub 中提及
rahulcoding/CheXNet
pytorch
GitHub 中提及
moserle/TSJS-Grad-CAM
tf
GitHub 中提及
jmvuilla/classification
GitHub 中提及
Deepak3994/grad-cam-editted
tf
GitHub 中提及
tanjimin/grad-cam-pytorch-light
pytorch
GitHub 中提及
rshah240/conv_visualiser
tf
GitHub 中提及
MaxHolmberg96/GradCAM
tf
GitHub 中提及
Youngb2n/GradCAM
GitHub 中提及
yiskw713/RISE
pytorch
GitHub 中提及
Deepak3994/Grad-Cam
tf
GitHub 中提及
Hydragon516/Grad-CAM-pytorch
pytorch
GitHub 中提及
Murali81/Grad-CAM
GitHub 中提及
jacobgil/pytorch-grad-cam
pytorch
GitHub 中提及
isaaccasm/GradCAM-keras
tf
GitHub 中提及
ryoasu/grad-cam
tf
GitHub 中提及
Stephenfang51/Grad_CAM
GitHub 中提及
phanav/upsaclay-hygieia
GitHub 中提及
Stomper10/CheXpert
pytorch
GitHub 中提及
idiap/fullgrad-saliency
pytorch
GitHub 中提及
Jmak12/Iris1
pytorch
GitHub 中提及
caggursoy/crossageeffect
GitHub 中提及
rabihchamas/dcls-gradcam-eval
pytorch
GitHub 中提及
wawaku/grad-cam-keras
tf
GitHub 中提及
CMU-CREATE-Lab/deep-smoke-machine
pytorch
GitHub 中提及
xn1997/pytorch-grad-cam
pytorch
GitHub 中提及
yiskw713/ClassActivationMapping
pytorch
GitHub 中提及
priyavrat-misra/xrays-and-gradcam
pytorch
GitHub 中提及
betashort/ClassActivationMappings
pytorch
GitHub 中提及
RasmusAndersen/grad-cam
tf
GitHub 中提及
fitushar/3D-Grad-CAM
tf
GitHub 中提及
JosephElHachem/GradCam
pytorch
GitHub 中提及
AhnYoungBin/Grad_cam
GitHub 中提及
yiskw713/scorecam
pytorch
GitHub 中提及
n-akram/GradCamDDD
tf
GitHub 中提及
notem/keras-alexnet
tf
GitHub 中提及
jacobgil/keras-grad-cam
tf
GitHub 中提及
lpcan/micl
tf
GitHub 中提及
IS2AI/Chest-X-ray-module
pytorch
GitHub 中提及
Wordbe/GradCAM3D
tf
GitHub 中提及
ajaykrishnan23/Grad_Cam
pytorch
GitHub 中提及
chinesh/Guided_Grad_CAM
tf
GitHub 中提及
shucheng-liu/TensorFlow_CAM
tf
GitHub 中提及
thtang/CheXNet-with-localization
pytorch
GitHub 中提及
Sooram/GradCam-tensorflow
tf
GitHub 中提及
TheInfamousWayne/CheXNet
pytorch
GitHub 中提及
JuHyun-E/Attention-ResNet50
tf
GitHub 中提及
chenbys/GradCAM
pytorch
GitHub 中提及
darkonhub/darkon
tf
GitHub 中提及
JuHyun-E/Attention_in_NN
tf
GitHub 中提及
tarolangner/mri-biometry
pytorch
GitHub 中提及
pytorch/captum
pytorch
GitHub 中提及

基准测试

基准方法指标
image-attribution-on-celebaGrad-CAM
Deletion AUC score (ArcFace ResNet-101): 0.2865
Insertion AUC score (ArcFace ResNet-101): 0.3721
image-attribution-on-cub-200-2011-1Grad-CAM
Deletion AUC score (ResNet-101): 0.0810
Insertion AUC score (ResNet-101): 0.7224
image-attribution-on-vggface2Grad-CAM
Deletion AUC score (ArcFace ResNet-101): 0.3103
Insertion AUC score (ArcFace ResNet-101): 0.4733
interpretability-techniques-for-deep-learning-1Grad-CAM
Insertion AUC score: 0.3721

用 AI 构建 AI

从想法到上线——通过免费 AI 协同编程、开箱即用的环境和市场最优价格的 GPU 加速您的 AI 开发

AI 协同编程
即用型 GPU
最优价格
立即开始

Hyper Newsletters

订阅我们的最新资讯
我们会在北京时间 每周一的上午九点 向您的邮箱投递本周内的最新更新
邮件发送服务由 MailChimp 提供
Grad-CAM:通过基于梯度的定位从深度网络中生成可视化解释 | 论文 | HyperAI超神经