Source-linked AI summary
Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks
Haofan Wang, Zifan Wang, Mengnan Du, Fan Yang, Zijian Zhang, Sirui Ding, Piotr Mardziel, Xia Hu
TL;DR
The paper addresses limitations of gradient-dependent and architecture-sensitive visual explanations for CNN decisions. It introduces Score-CAM, which weights activation maps using target-class confidence from forward passes, and reports stronger recognition and localization results than previous methods. The method is also presented as useful for interpreting decisions and debugging model misbehavior.
Problem
Existing visual explanation methods can produce noisy gradient maps, while CAM depends on architectural components such as global pooling layers.
Method
Score-CAM is a post-hoc, gradient-free CAM variant that weights activation maps by their increase in target-class confidence during forward passing.
Results
Score-CAM outperforms previous CAM-based and other state-of-the-art methods on recognition and localization evaluations, with 31.5% average drop and 30.6% average increase.
Takeaways & Limitations
Score-CAM provides a visual explanation method that more faithfully reveals CNN decision-making evidence and can be applied to debugging model misbehavior.
Takeaways & Limitations
CAM-based explanations remain constrained by architectural requirements, while gradient information can be noisy or vanish because of saturation and zero-gradient regions.
Abstract
from arXiv · showhide
Recently, increasing attention has been drawn to the internal mechanisms of convolutional neural networks, and the reason why the network makes specific decisions. In this paper, we develop a novel post-hoc visual explanation method called Score-CAM based on class activation mapping. Unlike previous class activation mapping based approaches, Score-CAM gets rid of the dependence on gradients by obtaining the weight of each activation map through its forward passing score on target class, the final result is obtained by a linear combination of weights and activation maps. We demonstrate that Score-CAM achieves better visual performance and fairness for interpreting the decision making process. Our approach outperforms previous methods on both recognition and localization tasks, it also passes the sanity check. We also indicate its application as debugging tools. Official code has been released.
1. Introduction
Score-CAM is introduced as a gradient-free post-hoc visual explanation method intended to address limitations of gradient-based and architecture-sensitive CAM approaches. The paper evaluates it for recognition, localization, visualization, fairness, and debugging.
- Visualization: Score-CAM shows potential high concentration on the object compared with Grad-CAM and Grad-CAM++ in the paper’s visualization.Figure 1 provides a qualitative comparison among the three methods.
- Motivation: Gradient-based explanations can be noisy, while CAM requires a global pooling layer and is therefore architecture-sensitive.Grad-CAM and Grad-CAM++ generalize CAM to models without global pooling, but the paper questions whether gradients are optimal for this purpose.
- Method: Score-CAM assigns activation-map weights using forward-passing evidence for the target class rather than gradients.This encodes the global contribution of corresponding input features and produces the final explanation through weighted activation maps.
- Contribution: Score-CAM bridges perturbation-based and CAM-based explanations while representing activation-map weights in an intuitively understandable way.The method is presented as a novel gradient-free visual explanation approach.
- Evaluation: The authors report better recognition fairness, visualization, and localization performance, and describe applications to debugging model misbehavior.Recognition is evaluated with Average Drop, Average Increase, Deletion curve, and Insertion curve metrics.
2. Background
CAM explains class-specific regions through weighted activation maps but depends on architectural conditions. Grad-CAM broadens applicability using gradients, while the paper identifies gradient-based importance problems motivating a confidence-based alternative.
- CAM: CAM identifies discriminative regions by linearly combining activation maps from the last convolutional layer before global pooling.Each channel’s importance comes from the corresponding fully connected-layer weight used for class confidence.
- CAM limitations: CAM fails when the model lacks global pooling or has no single fully connected layer after it.These architectural requirements prevent defining the channel weights used by CAM.
- Grad-CAM: Grad-CAM extends CAM by defining channel importance through the gradient of class confidence with respect to activation maps.It uses global pooling in the Grad-CAM formulation and applies to broader CNN architectures.
- Grad-CAM: Gradient-based channel importance is natural and preserves CAM as a special case when one fully connected layer follows the chosen layer.The paper nevertheless argues that increase of confidence better quantifies channel importance than gradient information.
- Gradient issues: Gradients can become noisy or vanish because of sigmoid saturation and zero-gradient regions in ReLU.The paper presents this as a source of visually noisy gradient explanations.
- Gradient issues: Grad-CAM can assign higher weights to activation maps that contribute less to the output than a zero baseline.In the example, the head activation map receives the highest weight but produces the lowest target-score increase; the paper associates this with pooling and gradient vanishing.
3. Score-CAM: Proposed Approach
Score-CAM assigns activation-map weights using forward-passing class scores rather than gradients, then combines the weighted maps into a visual explanation. Its pipeline masks the input with normalized, upsampled activations and uses post-softmax scores for class discrimination.
- Core mechanism: Score-CAM measures each activation map’s importance through its increase of confidence instead of gradient information.The approach adapts input-level contribution to channel-wise activation maps.
- Input masking: Each activation map is upsampled to input size, normalized into [0, 1], and used directly as a mask on the input.This avoids generating separate perturbation masks through Monte Carlo sampling.
- Pipeline: The pipeline extracts activation maps, evaluates masked inputs N times, and linearly combines score-based weights with the activation maps.N equals the number of activation maps, and both phases share the same CNN feature extractor.
- Output construction: Score-CAM applies ReLU to the weighted map combination and can use any intermediate convolutional layer, although the last convolutional layer is preferred.ReLU retains features with positive influence on the class of interest.
- Score normalization: Score-CAM uses post-softmax values as weights because normalization rescales scores into a fixed range and improves class discrimination.With pre-softmax weights, the method may highlight both dog and cat regions; softmax weighting distinguishes the categories better in the described example.
4. Experiments
Experiments evaluate Score-CAM across visualization, recognition faithfulness, localization, and model debugging. Across these settings, the method produces less noisy and more class-discriminative maps, improves recognition and localization measures, and supports diagnosing model behavior.
- Visualization: Score-CAM produces smoother saliency maps with less random noise than several gradient-based, perturbation-based, and CAM-based methods.The qualitative comparison includes eight state-of-the-art methods.
- Visualization: Score-CAM correctly explains both a high-confidence ‘bull mastiff’ prediction and a much lower-confidence ‘tiger cat’ target.The reported confidences are 49.6% for ‘bull mastiff’ and 0.2% for ‘tiger cat’.
- Multi-Target Visualization: Score-CAM highlights multiple same-class objects more effectively than Grad-CAM and more focusedly than Grad-CAM++.Grad-CAM tends to focus on one object, whereas Grad-CAM++ and Score-CAM can locate multiple objects.
- Faithfulness Evaluation via Image Recognition: 31.5% average drop and 30.6% average increase are reported for Score-CAM, which outperforms other perturbation-based and CAM-based methods on recognition.The evaluation uses 2,000 randomly selected ILSVRC2012 validation images.
- Faithfulness Evaluation via Image Recognition: Score-CAM performs better than gradient-based CAM methods on both deletion and insertion metrics averaged over 2,000 images.Deletion evaluates probability decrease as important pixels are removed, while insertion evaluates probability increase as pixels are introduced.
- Localization Evaluation: Score-CAM’s localization evaluation uses energy inside target bounding boxes, and the authors report less noisy maps consistent with localization there.The experiment excludes images where the object occupies more than 50% of the image and considers single-target bounding boxes.
- Applications: Score-CAM supports model analysis because classification-related saliency noise decreases as classification performance improves, while class comparisons can expose dataset bias and misclassification causes.The authors describe using these maps to assess possible convergence and to analyze a bicycle image misclassified as person.
5. Conclusion
The paper presents Score-CAM as a visual explanation method that removes gradient dependence and reports stronger performance than prior methods across recognition and localization evaluations.
- Score-CAM incorporates increase in confidence when designing activation-map weights, providing a more reasonable weight representation without gradients.
- The method outperforms previous CAM-based and other state-of-the-art methods on recognition and localization evaluation metrics.
- The paper analyzes Score-CAM’s motivation, implementation, and qualitative and quantitative evaluations in depth.
- Future work will explore connections among different weight representations in other CAM variants.
Appendix
The appendix presents visualization results for single objects, multiple objects, and other model architectures.
- Figure 12 presents visualization results on single objects.
- Figure 13 presents visualization results on multiple objects.
- Figure 14 presents Score-CAM results on other model architectures.