Source-linked AI summary

Eigen-CAM: Class Activation Map using Principal Components

Mohammed Bany Muhammad, Mohammed Yeasin

arXiv:2008.00299v1cs.CVcs.LG

TL;DR

Deep CNNs learn useful representations but are difficult to explain, motivating a method that provides interpretable visualizations without relying on classifier outputs or model modification. Eigen-CAM computes principal components of convolutional features and is reported to improve weakly supervised localization by up to 12% while remaining robust to classification errors and adversarial noise.

  • Problem

    CNN visualizations can have low accuracy in some applications, fail on misclassified examples, and require computationally costly propagation of gradients, scores, or activations.

  • Method

    Eigen-CAM computes and visualizes principal components of learned representations from convolutional layers to generate class activation maps without modifying or retraining CNNs.

  • Results

    12% improvement was achieved using AlexNet in weakly supervised localization, while Eigen-CAM also produced consistent explanations under adversarial noise.

  • Takeaways & Limitations

    Eigen-CAM provides visual explanations using final convolutional representations and is independent of classification layers and model accuracy.

Abstract

from arXiv · show

Deep neural networks are ubiquitous due to the ease of developing models and their influence on other domains. At the heart of this progress is convolutional neural networks (CNNs) that are capable of learning representations or features given a set of data. Making sense of such complex models (i.e., millions of parameters and hundreds of layers) remains challenging for developers as well as the end-users. This is partially due to the lack of tools or interfaces capable of providing interpretability and transparency. A growing body of literature, for example, class activation map (CAM), focuses on making sense of what a model learns from the data or why it behaves poorly in a given task. This paper builds on previous ideas to cope with the increasing demand for interpretable, robust, and transparent models. Our approach provides a simpler and intuitive (or familiar) way of generating CAM. The proposed Eigen-CAM computes and visualizes the principle components of the learned features/representations from the convolutional layers. Empirical studies were performed to compare the Eigen-CAM with the state-of-the-art methods (such as Grad-CAM, Grad-CAM++, CNN-fixations) by evaluating on benchmark datasets such as weakly-supervised localization and localizing objects in the presence of adversarial noise. Eigen-CAM was found to be robust against classification errors made by fully connected layers in CNNs, does not rely on the backpropagation of gradients, class relevance score, maximum activation locations, or any other form of weighting features. In addition, it works with all CNN models without the need to modify layers or retrain models. Empirical results show up to 12% improvement over the best method among the methods compared on weakly supervised object localization.

I. INTRODUCTION

CNNs learn powerful representations but remain difficult to interpret, motivating visual explanations that connect model behavior with learned features. Eigen-CAM is introduced as a simple CAM method based on convolutional representations and independent of class relevance scores.

  • Visual explanations can help identify prediction failures and support improved performance and trust in complex deep-learning models.
  • CNN nonlinearities improve generalization while making learned decisions difficult to interpret.
  • Existing CAM methods have limited accuracy in some applications and may fail to explain misclassified examples.
  • Eigen-CAM uses principal components of convolutional-layer representations to create visual explanations.
  • Eigen-CAM obtains CAM from convolutional outputs independently of class relevance scores.
  • Eigen-CAM is reported to localize objects robustly without modifying CNN architectures or backpropagating computations.

II. RESEARCH CONTEXT

Prior CNN visualization methods use gradients, relevance scores, or strong activations, creating computational overhead and dependence on correct classification. Eigen-CAM addresses these constraints with an intuitive method compatible with unmodified deep-learning models.

  • CNN visualizations include class non-discriminative methods that identify salient input features and class-discriminative methods that locate features responsible for outputs.
  • CAM modifies CNN architecture by replacing final fully connected layers and adding global average pooling before weighting feature maps.
  • Grad-CAM and Grad-CAM++ generalize CAM using gradients to weight learned feature maps, with Grad-CAM++ adding pixel-wise gradient weighting.
  • CNN Fixations track strong activations from class space to image space and depend on the accuracy of the predicted class.
  • Backpropagating gradients, probabilities, or activations adds computational overhead and can produce distorted visualizations after classification errors.
  • Eigen-CAM is presented as an intuitive visualization method compatible with all deep-learning models without architectural modifications.

III. PROPOSED APPROACH

Eigen-CAM isolates learned convolutional representations and identifies features aligned with maximum variation, rather than weighting feature maps through classification outputs. It computes principal components of the final convolutional output to form the activation map.

  • CNNs separate feature extraction, which learns hierarchical spatial representations, from classification, which uses fully connected layers to draw decision boundaries.
  • Backpropagation-based visualization methods can fail when the classifier is inaccurate even if the learned representation remains correct.
  • CAM-family methods weight feature maps using classifier weights or backpropagated relevance, while gradients may be noisy and redundant features may receive larger weights.
  • Eigen-CAM seeks salient features aligned with the principal component direction of maximum variation in learned representations.
  • The approach assumes relevant spatial features are preserved through optimization while non-relevant features are regularized or smoothed out.
  • Eigen-CAM computes principal components by applying singular value decomposition to the final convolutional-layer output.

IV. APPLICATIONS

Eigen-CAM is evaluated across visual explanation applications, including correctly classified and misclassified ILSVRC images, where it localizes discriminative regions across varied scenarios.

  • Eigen-CAM was evaluated against state-of-the-art visualization methods across multiple computer vision tasks and applications.
  • Eigen-CAM showed better localization consistency than the other methods across the Figure 2 scenarios.
  • Figure 2 compares Grad-CAM, CNN Fixation, and Eigen-CAM on correctly classified VGG-16 ILSVRC images.The examples include single and multiple objects, foreground and background objects, and crowded or plain backgrounds.
  • On two misclassified ILSVRC examples, Eigen-CAM localized features for Collie and Windsor tie despite incorrect top-1 classifications.The VGG-16 top-3 predictions included Dogsled and Collie for one image, and Stole, Kimono, and Windsor tie for the other.

A. Weakly-supervised localization

For weakly supervised localization, Eigen-CAM generates bounding boxes from last-convolutional-layer representations rather than classification labels, and improves reported error rates across evaluated CNNs.

  • Eigen-CAM localizes objects in weakly supervised settings by analyzing the last convolutional layer instead of relying on classification labels.
  • A forward pass extracts the first principal component, scales and reshapes it, then thresholds it to produce a bounding box.Thresholds range from 5–15% of the maximum level, depending on the model.
  • The evaluation used five pretrained CNNs on the 50,000-image ILSVRC validation set and compared Eigen-CAM with other methods.
  • The reported metric is top-1 recognition prediction error rate for localization, with Eigen-CAM evaluated across the entire validation set.Previous methods computed IoU only for correct predictions, whereas Eigen-CAM is class independent.
  • The reported weakly-supervised localization improvements were 12% for AlexNet, 7.5% for VGG-16, 11% for GooLeNet, and 2.7% for DenseNet.

B. Adversarial Examples

The adversarial-example evaluation compares visual explanations on original and DeepFool-perturbed ILSVRC images, finding greater consistency for Eigen-CAM than for Grad-CAM and CNN Fixation.

  • The study perturbed VGG-16 ILSVRC examples with DeepFool to examine which CNN component adversarial examples affect.
  • Figure 4 compares original and adversarial images using Grad-CAM, CNN Fixation, and Eigen-CAM visualizations.Green boxes mark example labels, while red boxes mark adversarial classification results.
  • Eigen-CAM produced almost identical explanations for original and perturbed images and correctly localized objects under adversarial noise.
  • Grad-CAM and CNN Fixation produced different activation maps between original and perturbed images.

V. CONCLUSIONS

The paper concludes that Eigen-CAM provides model-independent visual explanations from final convolutional representations, remaining consistent across model accuracy conditions and adversarial noise.

  • Eigen-CAM provides visual explanations irrespective of model accuracy or the presence of adversarial noise.
  • Eigen-CAM uses learned representations at the final convolutional layer and is independent of classification layers.
  • The method requires no CNN modification and is presented as usable with any CNN-based deep learning model.
  • Empirical evidence reported that Eigen-CAM produced robust, reliable, consistent explanations and outperformed state-of-the-art methods.
Loading 2008.00299v1…