Papers
Topics
Authors
Recent
Search
2000 character limit reached

Winsor-CAM: Tunable Visual Explanations for CNNs

Updated 3 July 2026
  • Winsor-CAM is a human-tunable visual explanation method that aggregates saliency data across all CNN layers using winsorization.
  • It employs a percentile-based clipping strategy to suppress outlier activations, producing multi-scale and semantically meaningful heatmaps.
  • Empirical evaluations show that Winsor-CAM improves IoU and CoM metrics compared to Grad-CAM, enhancing CNN interpretability.

Winsor-CAM is a human-tunable, post-hoc visual explanation method for convolutional neural networks (CNNs) designed to address the limitations of conventional Gradient-weighted Class Activation Mapping (Grad-CAM) methods. By employing layer-wise Winsorization—a percentile-based clipping strategy—Winsor-CAM produces saliency maps that robustly aggregate information across all convolutional layers while suppressing outlier attributions. A single percentile parameter enables semantic-level control over the granularity of the explanations, facilitating detailed, trustworthy model introspection without altering network architectures (Wall et al., 14 Jul 2025).

1. Motivation and Conceptual Framework

Grad-CAM, the standard technique for generating class-specific heatmaps, is typically restricted to the final convolutional layer of a CNN. This focus on deep layers captures only high-level semantic concepts but ignores low-level cues such as edges and textures. Furthermore, final-layer activations can be unreliable when the gradients are unstable. Uniform averaging of Grad-CAM outputs from all convolutional layers, a naïve extension, leads to the amplification of noisy or irrelevant signals and dilution of strong, semantically meaningful activations. Winsor-CAM overcomes these deficiencies by combining the following principles:

  • Aggregation of saliency information across all convolutional layers.
  • Winsorization to attenuate extreme (outlier) layer importances.
  • Human tunability via a percentile parameter that controls semantic scale.

2. Layer-Wise Grad-CAM Formulation

Let a CNN have nn convolutional layers i=1,,ni=1,\ldots,n with feature maps AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}. For target class cc, the logit is ycy^c. The spatial gradient of the logit with respect to activation Aki(u,v)A_k^i(u,v) is:

Gi,kc(u,v)=ycAki(u,v)G^c_{i,k}(u,v) = \frac{\partial y^c}{\partial A^i_k(u,v)}

The channel-wise weights are computed as:

αi,kc=1HiWiu,vGi,kc(u,v)\alpha^c_{i,k} = \frac{1}{H_i W_i} \sum_{u,v} G^c_{i,k}(u,v)

The Grad-CAM map for layer ii is then:

LGradCAM,ic(u,v)=ReLU(k=1Ciαi,kcAki(u,v))L^c_{\mathrm{GradCAM},i}(u,v) = \mathrm{ReLU} \left(\sum_{k=1}^{C_i} \alpha^c_{i,k} A^i_k(u,v)\right)

3. Winsorization and Layer Importance Scoring

Layer importances i=1,,ni=1,\ldots,n0 are scalars summarizing each layer’s contribution, using one of two aggregations:

  • Mean:

i=1,,ni=1,\ldots,n1

  • Max:

i=1,,ni=1,\ldots,n2

Let i=1,,ni=1,\ldots,n3 be the set of i=1,,ni=1,\ldots,n4. Given percentile i=1,,ni=1,\ldots,n5, Winsor-CAM clips all positive i=1,,ni=1,\ldots,n6 at threshold i=1,,ni=1,\ldots,n7:

i=1,,ni=1,\ldots,n8

This mechanism controls the influence of outlier layers, preventing domination by layers with excessively large gradient values—a phenomenon frequently observed in deep networks.

4. Cross-Layer Aggregation and Final Saliency Map

Clipped importances are min–max normalized to i=1,,ni=1,\ldots,n9 (by default AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}0):

AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}1

Each AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}2 is upsampled to a common spatial size AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}3. The final Winsor-CAM heatmap is a weighted sum:

AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}4

Maps can be normalized to AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}5 and overlaid on input images for visualization.

5. Tunable Semantic Control via Percentile Parameter AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}6

The parameter AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}7 provides interpretable, human-in-the-loop scaling of semantic granularity:

  • AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}8 (uniform aggregation): All nonzero layers get equal weight; fine-grained, low-semantic visualizations result.
  • Intermediate AiRCi×Hi×WiA^{i} \in \mathbb{R}^{C_i \times H_i \times W_i}9 (e.g., cc0–cc1): Balances suppression of outliers, enabling multi-scale, interpretable heatmaps.
  • cc2 (no clipping): Deep layers dominate; output approximates final-layer Grad-CAM. Empirical evaluations indicate optimal mean Intersection-over-Union (IoU) and center-of-mass (CoM) alignment metrics typically occur for intermediate cc3 values.

6. Algorithmic Workflow

The Winsor-CAM procedure accepts an input image cc4, target class cc5, CNN cc6, the user’s Winsor parameter cc7, aggregation method (mean or max), and interpolation function. The workflow is:

  1. Forward cc8 through cc9, saving all convolutional feature maps.
  2. Backpropagate to compute ycy^c0.
  3. For each layer: compute ycy^c1, produce ycy^c2, upsample with chosen interpolation, and determine ycy^c3.
  4. Winsorize and normalize ycy^c4 to obtain ycy^c5.
  5. Aggregate the reweighted layer maps to obtain ycy^c6.

The method is post-hoc, requiring no architectural modifications, and is compatible with any pretrained CNN.

7. Empirical Evaluation and Comparative Results

Winsor-CAM was evaluated on PASCAL VOC 2012 for single-class localization using 933 training and 928 test images on multiple backbones (ResNet50, DenseNet121, InceptionV3, VGG16) (Wall et al., 14 Jul 2025). Quantitative metrics include mean IoU and mean CoM distance. Table 1 illustrates performance for DenseNet121:

Method IoU CoM Dist. (px)
Winsor-CAM 0.469 ± 0.186 23.055 ± 16.379
Grad-CAM 0.390 ± 0.173 25.684 ± 17.460
Grad-CAM++ 0.368 ± 0.180 24.929 ± 15.609
LayerCAM 0.379 ± 0.174 24.331 ± 15.265
ShapleyCAM 0.377 ± 0.173 26.765 ± 17.528

Across architectures, Winsor-CAM improved IoU by 5–10 points and reduced CoM error by 2–10 pixels over standard Grad-CAM. Naïve averaging of layer saliency maps resulted in coarse, often semantically uninformative heatmaps and inflated CoM error (e.g., ~86 px for ResNet50).

Variation of ycy^c7 yielded small, consistent performance gains toward midrange values. For example, on DenseNet121:

ycy^c8 IoU CoM Dist.
0 0.441 ± 0.182 22.78 ± 16.32
50 0.444 ± 0.184 22.48 ± 16.03
100 0.443 ± 0.185 21.99 ± 15.51

8. Qualitative Effects and Advantages

Adjustment of ycy^c9 modulates the semantic focus of the generated maps. Low Aki(u,v)A_k^i(u,v)0 settings highlight details such as edges and textures by weighting early layers, midrange Aki(u,v)A_k^i(u,v)1 settings produce crisp object regions, and high Aki(u,v)A_k^i(u,v)2 values yield holistic masks akin to standard Grad-CAM. This enables practitioners to explore model focus across semantic hierarchies. Winsor-CAM achieves:

  • Multi-scale semantic representation through cross-layer integration.
  • Robustness to attribution outliers via Winsorization.
  • Human-in-the-loop explanatory control with interpretable, continuous tuning.
  • Full model compatibility as a post-hoc interpretability scheme.

Winsor-CAM advances interpretable AI by delivering layer-aggregated, robust, and tunably semantic visual explanations, outperforming single-layer and naïve multi-layer Grad-CAM variants in both interpretability and quantitative localization metrics (Wall et al., 14 Jul 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Winsor-CAM.