# Grad-CAM for Visualizing Attention Regions of PCA and SVM Layers in Convolutional Neural Networks

arXiv: https://arxiv.org/abs/2508.11880 · HTML: https://mlsanity.com/paper/2508.11880/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 20 of its 83 references that are in the map.
- First posted on arXiv 16 Aug 2025.

## Builds on (most cited first, 20 of 20)

- [Very Deep Convolutional Networks for Large-Scale Image Recognition](https://mlsanity.com/paper/1409.1556/) (2014)
- [Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization](https://mlsanity.com/paper/1610.02391/) (2016)
- [Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms](https://mlsanity.com/paper/1708.07747/) (2017)
- [Learning Deep Features for Discriminative Localization](https://mlsanity.com/paper/1512.04150/) (2015)
- [SmoothGrad: removing noise by adding noise](https://mlsanity.com/paper/1706.03825/) (2017)
- [Grad-CAM++: Improved Visual Explanations for Deep Convolutional Networks](https://mlsanity.com/paper/1710.11063/) (2017)
- [RISE: Randomized Input Sampling for Explanation of Black-box Models](https://mlsanity.com/paper/1806.07421/) (2018)
- [Score-CAM: Score-Weighted Visual Explanations for Convolutional Neural Networks](https://mlsanity.com/paper/1910.01279/) (2019)
- [Deep learning in agriculture: A survey](https://mlsanity.com/paper/1807.11809/) (2018)
- [Smooth Grad-CAM++: An Enhanced Inference Level Visualization Technique for Deep Convolutional Neural Network Models](https://mlsanity.com/paper/1908.01224/) (2019)
- [COVID-19 Image Data Collection: Prospective Predictions Are the Future](https://mlsanity.com/paper/2006.11988/) (2020)
- [Use HiResCAM instead of Grad-CAM for faithful explanations of convolutional neural networks](https://mlsanity.com/paper/2011.08891/) (2020)
- [Towards Better Explanations of Class Activation Mapping](https://mlsanity.com/paper/2102.05228/) (2021)
- [Shap-CAM: Visual Explanations for Convolutional Neural Networks based on Shapley Value](https://mlsanity.com/paper/2208.03608/) (2022)
- [Simultaneous Food Localization and Recognition](https://mlsanity.com/paper/1604.07953/) (2016)
- [ResFeats: Residual Network Based Features for Image Classification](https://mlsanity.com/paper/1611.06656/) (2016)
- [CAMs as Shapley Value-based Explainers](https://mlsanity.com/paper/2501.06261/) (2025)
- [Explanation of Face Recognition via Saliency Maps](https://mlsanity.com/paper/2304.06118/) (2023)
- [Automated Machine Learning for Positive-Unlabelled Learning](https://mlsanity.com/paper/2401.06452/) (2024)
- [Exploring Hierarchical Classification Performance for Time Series Data: Dissimilarity Measures and Classifier Comparisons](https://mlsanity.com/paper/2402.05275/) (2024)

## Abstract (arXiv)

Convolutional Neural Networks (CNNs) are an effective approach for classification tasks, particularly when the training dataset is large. Although CNNs have long been considered a black-box classification method, they can be used as a white-box method through visualization techniques such as Grad-CAM. When the training samples are limited, incorporating a Principal Component Analysis (PCA) layer and/or a Support Vector Machine (SVM) classifier into a CNN can effectively improve the classification performance. However, a conventional Grad-CAM cannot be directly applied to PCA and/or SVM layers. Generating attention regions for PCA and/or SVM layers in CNNs is important to facilitate the development of white-box methods. Therefore, we propose ``PCA-Grad-CAM'', a method for visualizing attention regions in PCA feature vectors, and ``SVM-Grad-CAM'', a method for visualizing attention regions in an SVM classifier layer. Solving a closed-form Jacobian problem comprising partial derivatives from the last convolutional layer to the PCA and/or SVM layers is necessary to complete the proposed methods analytically. In this paper, we present the exact closed-form Jacobian and visualization results of the proposed methods applied to several major datasets. In addition, the insertion and deletion metrics, which are major evaluation metrics in explainable AI, were applied to PCA- and SVM-Grad-CAM. The results suggest that the proposed method can successfully visualize the attention regions of PCA and SVM.
