Metric-Guided Synthesis of Class Activation Mapping
Alejandro Luque-Cerpa, Elizabeth Polgreen, Ajitha Rajan, Hazem Torfah
TL;DR
SyCAM presents a metric-guided framework for automatically synthesizing CAM expressions that explain CNN decisions. By framing CAM weight computation as a synthesizable expression within a syntax-guided grammar and using OGIS with equivalence and correctness oracles, it tailors heatmaps to specific evaluation metrics, including ground-truth and robustness measures. The approach is instantiated with a gradient- and Score/Ablation-based CAM grammar and evaluated on ResNet50, VGG16, and VGG19 across multiple datasets, outperforming common CAM methods on selected metrics. This methodology enables domain- and metric-aware saliency maps, potentially improving interpretability and trust in CNN explanations while accommodating expert knowledge through targeted metrics.
Abstract
Class activation mapping (CAM) is a widely adopted class of saliency methods used to explain the behavior of convolutional neural networks (CNNs). These methods generate heatmaps that highlight the parts of the input most relevant to the CNN output. Various CAM methods have been proposed, each distinguished by the expressions used to derive heatmaps. In general, users look for heatmaps with specific properties that reflect different aspects of CNN functionality. These may include similarity to ground truth, robustness, equivariance, and more. Although existing CAM methods implicitly encode some of these properties in their expressions, they do not allow for variability in heatmap generation following the user's intent or domain knowledge. In this paper, we address this limitation by introducing SyCAM, a metric-based approach for synthesizing CAM expressions. Given a predefined evaluation metric for saliency maps, SyCAM automatically generates CAM expressions optimized for that metric. We specifically explore a syntax-guided synthesis instantiation of SyCAM, where CAM expressions are derived based on predefined syntactic constraints and the given metric. Using several established evaluation metrics, we demonstrate the efficacy and flexibility of our approach in generating targeted heatmaps. We compare SyCAM with other well-known CAM methods on three prominent models: ResNet50, VGG16, and VGG19.
