SUNY: A Visual Interpretation Framework for Convolutional Neural Networks from a Necessary and Sufficient Perspective

Xiwei Xuan, Ziquan Deng, Hsuan-Tien Lin, Zhaodan Kong, Kwan-Liu Ma

Abstract

Deep learning models, particularly Convolutional Neural Networks (CNNs), are often criticized as "black boxes," hindering trust in high-stakes applications. We present SUNY (SUfficiency and NecessitY), a novel visual explanation framework that mimics human counterfactual reasoning. By evaluating image features through the dual lenses of necessity and sufficiency and employing game-theoretic Shapley values to quantify marginal contributions, SUNY produces cleaner and more faithful heatmaps than traditional gradient or perturbation-based methods. Our evaluation on ImageNet and CUB-200-2011 benchmarks demonstrates that SUNY significantly improves localization and model faithfulness, outperforming state-of-the-art methods like Grad-CAM and RISE.

Introduction

Visual explanations, typically rendered as heatmaps, are essential for understanding the decision-making processes of CNNs. However, existing methods often fall short: gradient-based approaches (e.g., Grad-CAM) can be noisy due to saturation, while perturbation-based methods (e.g., RISE) may fail to capture complex feature interactions. Crucially, these tools often overlook the fundamental logic of human cognition: counterfactual thinking. When humans explain a decision, they consider both Necessity ("If this feature were absent, would the prediction fail?") and Sufficiency ("If only this feature were present, would the prediction hold?"). SUNY addresses this by formalizing these concepts into a unified interpretation framework.

Methodology: The SUNY Framework

SUNY treats feature maps at a specific convolutional layer as hypothesized "causes" for the model's prediction. The framework operates through three primary components:

  1. Bi-directional Quantification: It defines two value functions: Necessity ($E_N$), measuring the drop in prediction probability when a feature is removed, and Sufficiency ($E_S$), measuring prediction stability when only that feature is preserved.
  2. Shapley Value Integration: To account for feature coordination, SUNY utilizes Shapley values to calculate the "marginal contribution" of each feature map across all possible combinations (coalitions).
  3. Intervention Mechanism: The framework intervenes at the convolutional layer level, upsampling feature maps to create masks that either "keep" or "remove" regions in the input space before re-evaluating the model output.
Overview of the SUNY framework including feature map intervention, Shapley value calculation, and final saliency map generation.

Experimental Results

We evaluated SUNY using VGG16, Inception-v3, and ResNet50 architectures on the ILSVRC2012 (ImageNet) and CUB-200-2011 datasets.

Comparative Performance

SUNY consistently outperformed seven state-of-the-art methods across several key metrics:

  • Faithfulness (Deletion/Insertion AUC): SUNY achieved superior scores, indicating that the pixels it highlights are the most critical to the model's decision. A lower Deletion score proves that removing SUNY-highlighted pixels causes an immediate crash in model confidence.
  • Saliency Attack: In tests identifying "minimal and essential" regions, SUNY scored significantly higher than competitors (e.g., 2.04 vs. 0.96 for Grad-CAM on VGG16).
  • Localization: Through the "energy-pointing game," SUNY demonstrated a higher concentration of heatmap energy within ground-truth bounding boxes compared to other methods. Furthermore, SUNY passed the "cascading randomization" sanity check, confirming its sensitivity to learned model weights.
Visual comparison of SUNY against state-of-the-art methods. The colormap illustrates the integration of Necessity (blue) and Sufficiency (red) into a unified explanation.

Discussion and Insights

SUNY's dual-perspective approach provides unique insights into model behavior, particularly in fine-grained classification tasks. For example, in the CUB bird dataset, the framework reveals that models often rely on "head and neck" features for sufficiency (identifying the general family) but require specific "belly color" for necessity (distinguishing between species). This semantic complementarity allows SUNY to naturally filter out background noise, as features must contribute significantly to both metrics to be highlighted prominently.

Limitations and Future Work

While SUNY provides high-fidelity explanations, it entails higher computational overhead due to the complexity of Shapley value calculations. Future work will focus on optimizing these calculations for real-time applications and extending the framework to other architectures, such as Vision Transformers.

Conclusion

By formalizing the concepts of necessity and sufficiency, SUNY offers a robust, human-centric approach to CNN interpretation. It produces saliency maps that are not only cleaner but also more semantically meaningful, providing a deeper understanding of the internal logic of deep learning models.

Summary updated

BibTeX
@inproceedings{xuan2024suny,
  author = {Xiwei Xuan and Ziquan Deng and Hsuan-Tien Lin and Zhaodan Kong and Kwan-Liu Ma},
  title = {{SUNY: A Visual Interpretation Framework for Convolutional Neural Networks from a Necessary and Sufficient Perspective}},
  booktitle = {XAI4CV},
  year = {2024},
}
Figure