A Learning Paradigm for Interpretable Gradients

Felipe Torres, Hanwei Zhang, Ronan Sicre, Yannis Avrithis, Stéphane Ayache · DOI · OpenReview

TL;DR

This paper introduces a novel training method that regularizes standard backpropagation gradients to be more like "guided" backpropagation gradients. This approach improves the quality of saliency maps used for interpreting deep learning models, leading to better visualizations without sacrificing model accuracy or requiring extra computation at inference time.

What Problem Does This Paper Address?

Deep learning models, especially in computer vision, have become incredibly powerful but also notoriously opaque. Understanding why a model makes a particular prediction is crucial, especially in high-stakes applications. Saliency maps are a popular post-hoc method for visualizing which parts of an input image are most important for a model's decision. Many of these methods rely on gradients derived from backpropagation. However, standard gradients can be "noisy" due to the non-linearities and downsampling operations within neural networks, leading to less precise and informative saliency maps. While techniques like guided backpropagation offer cleaner gradients, they are typically applied at inference. This paper aims to improve gradient quality during training itself, making interpretability methods more effective without adding computational overhead at inference.

Methods

The core contribution is a new training paradigm that adds a regularization loss to the standard classification loss. This regularization term encourages the standard gradient of the loss with respect to the input image ($\nabla_{x} L_c$) to align with the gradient obtained from guided backpropagation ($\nabla_{x}^{guided} L_c$).

Here's how it works:

  1. Forward Pass: An input image is passed through the network to compute class probabilities and the classification loss ($L_c$).
  2. Two Backward Passes:
    • A standard backward pass computes the usual gradient of $L_c$ with respect to the input image ($\nabla_{x} L_c$).
  3. A guided backward pass computes the guided gradient ($\nabla_{x}^{guided} L_c$). Crucially, the gradient computation for this guided pass is "detached" so it acts as a fixed target (a "teacher") and doesn't influence the network's weights directly through this branch.
  4. Regularization Loss ($L_R$): An error function (e.g., Mean Absolute Error, Mean Squared Error, Cosine Similarity) is used to measure the difference between the standard and guided gradients. This forms the regularization loss.
  5. Total Loss: The final loss is a weighted sum of the classification loss and the regularization loss: $L = L_c + \lambda L_R$, where $\lambda$ is a hyperparameter controlling the strength of the regularization.
  6. Training: The network is trained by backpropagating the total loss $L$ through the standard gradient path.

This method is designed to be orthogonal to existing interpretability techniques, meaning it can be used with any saliency map method (like CAM, Grad-CAM, etc.) at inference time.

Datasets

The paper evaluates its method on the CIFAR-100 dataset. This dataset consists of 60,000 images (32x32 pixels) across 100 categories, split into 50,000 for training and 10,000 for testing.

Key Insights and Ideas

  • Gradient Noise is a Bottleneck: The paper clearly articulates that noisy gradients are a fundamental limitation for many interpretability methods, and directly addressing this during training is a promising avenue.
  • Guided Backprop as a "Teacher": Using guided backpropagation not for direct visualization but as a "teacher" signal during training to regularize standard gradients is an elegant way to leverage its strengths without altering the inference pipeline.
  • Orthogonal Improvement: The method doesn't replace existing interpretability techniques but enhances them by providing better quality inputs (gradients) for them to work with. This makes it broadly applicable.
  • Balancing Accuracy and Interpretability: The core hypothesis is that aligning gradients won't hurt classification accuracy, and the results support this, showing only minor drops or even slight improvements in some cases.

Key Results

  • Improved Saliency Maps: Qualitative results (Figure 2) show that saliency maps generated using the proposed training method are often sharper and highlight more relevant areas, particularly for methods like Grad-CAM that directly use gradients.
  • Better Gradient Quality: Figure 3 visually demonstrates that the gradients produced by the trained model are less noisy and retain finer details compared to standard training.
  • Quantitative Improvements: Tables 1 and 2 show that the method consistently improves interpretability metrics (like Average Drop, Average Gain, and Average Increase) across different models (ResNet-18, MobileNet-V2) and various CAM-based attribution methods, while maintaining competitive classification accuracy (within 0.5% of the baseline).
  • Robustness to Hyperparameters: The method shows good performance across different error functions (MAE, MSE, Cosine Similarity) and is not overly sensitive to the regularization coefficient $\lambda$, suggesting practical usability.

Limitations and Future Work

  • Metric Limitations: The authors note that some interpretability metrics, particularly "Deletion," might not fully capture the improvements, possibly due to inherent limitations of the metrics themselves.
  • Computational Cost: While inference is not affected, the training process requires five passes through the network per iteration (two forward, three backward) compared to two passes for standard training. This is a trade-off for improved interpretability.
  • Future Work: The paper suggests that the improvements observed in Score-CAM (which doesn't directly use gradients but relies on activation maps) indicate that the training might also lead to better activation maps. Further exploration of this aspect could be a future direction. The authors also mention that their method is orthogonal and can be combined with other interpretability techniques, implying potential for further integration and enhancement.

Summary updated

BibTeX
@inproceedings{torres2024learning,
  author = {Felipe Torres and Hanwei Zhang and Ronan Sicre and Yannis Avrithis and Stéphane Ayache},
  title = {{A Learning Paradigm for Interpretable Gradients}},
  booktitle = {VISIGRAPP (3): VISAPP},
  year = {2024},
  doi = {10.5220/0012466800003660},
}
Figure