Abstract
Class Activation Mapping (CAM) methods are widely used for visualizing neural network decisions, yet they often rely on heuristics that lack theoretical grounding. This paper introduces the Content Reserved Game-theoretic (CRG) Explainer, a framework that proves existing CAMs are first-order approximations of Shapley values. Building on this, we propose ShapleyCAM, which incorporates second-order Taylor expansions (Hessian information) and a novel Residual Softmax Target-Class (ReST) utility function. Our approach significantly improves the faithfulness and clarity of visual explanations, outperforming state-of-the-art methods across diverse architectures on the ImageNet dataset.
Introduction
Visualizing the internal logic of convolutional neural networks (CNNs) is crucial for trust and debugging. While methods like Grad-CAM are industry standards, they often conflate localization (finding an object) with explanation (why a specific class was predicted). This heuristic-driven approach can lead to misleading heatmaps, especially when gradients vanish or when the model is asked to explain unlikely classes. We address these issues by grounding CAM methods in cooperative game theory.
Methodology: The CRG Explainer and ShapleyCAM
The core of our contribution is the Content Reserved Game-theoretic (CRG) Explainer. We model neural network predictions as a cooperative game where individual pixels or activation map elements act as players. The "fair" contribution of each player is determined by their Shapley value.
We demonstrate that popular methods like Grad-CAM and HiResCAM are essentially first-order Taylor approximations of this game. To achieve higher fidelity, ShapleyCAM utilizes a second-order Taylor expansion. By incorporating the Hessian matrix via efficient Hessian-vector products, ShapleyCAM captures feature interactions that first-order methods miss.
Furthermore, we introduce the Residual Softmax Target-Class (ReST) Utility function: $U_{ReST} = y^c + \ln(\text{softmax}(y)^c)$. This function combines the stability of raw logits ($y^c$) with the class-specificity of log-probabilities, effectively mitigating the gradient vanishing problem common in highly confident models.
Experimental Evaluation
We evaluated ShapleyCAM on the ImageNet validation set using 12 diverse architectures, including various ResNet variants, EfficientNet, and Vision Transformers (Swin).
Quantitative Results
ShapleyCAM consistently achieved the highest scores in the ADCC (Average Drop, Coherency, and Complexity) metric. In terms of faithfulness metrics like Average Drop (AD) and Increase in Confidence (IC), ShapleyCAM outperformed Grad-CAM and its variants, indicating that the highlighted regions are more critical to the model's actual decision-making process.
Qualitative Analysis and the "Absurd" Test
Qualitatively, ShapleyCAM produces cleaner and more comprehensive heatmaps. A critical test of an explainer's validity is the "absurd" test: visualizing the least likely class. While heuristic methods often highlight the dominant object regardless of the target class, ShapleyCAM correctly produces near-blank heatmaps for irrelevant classes.
Conclusion
By bridging the gap between efficient CAMs and game-theoretic Shapley values, we provide a more rigorous foundation for neural network explanations. ShapleyCAM offers a superior balance of theoretical soundness, computational efficiency, and empirical performance. Future work will focus on refining these approximations for complex self-attention mechanisms in Transformers and extending the framework to non-visual modalities.
Summary updated