1
$\begingroup$

I am reading about a method called guided backpropagation. https://ramprs.github.io/2017/01/21/Grad-CAM-Making-Off-the-Shelf-Deep-Models-Transparent-through-Visual-Explanations.html#deconv-and-guided-backprop.

As shown in the figure below, you essentially compute the derivates of the output with respect to the input image while zero-ing out negative gradients along the way. The website mentions

Negative gradients at a particular ReLU neuron, state that this neuron has a negative influence on the class that we are trying to visualize.

During backpropagation there are paths that have positive influence and some that have negative influence, and these end up cancelling out in a weird interference pattern, causing gradients to seem noisy. Whereas in Guided Backpropagation, we only keep paths that lead to positive influence on the class score, and supress the ones that have negative influence, leading to much cleaner looking images.

My question is why does the resulting image have pixels which are negative? Don't negative pixels indicate that the gradient of the output with respect to the pixel is negative? I.e. that pixel has a negative influence on the class score?

enter image description here

enter image description here

$\endgroup$
3
$\begingroup$

Kinda late but According to the gradcam paper (https://arxiv.org/abs/1610.02391), it says that negative gradient of the image will most likely contribute to other class.

We apply a ReLU to the linear combination of maps because we are only interested in the features that have a positive influence on the class of interest, i.e. pixels c whose intensity should be increased in order to increase y. Negative pixels are likely to belong to other categories in the image. As expected, without this ReLU, localization maps sometimes highlight more than just the desired class and achieve lower localization performance

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.