Forward Learning for Gradient-based Black-box Saliency Map Generation

Chenliang XuarXiv 2024 · DOI

TL;DR

This paper introduces a novel "forward learning" framework to generate saliency maps for black-box AI models, overcoming the challenge of inaccessible gradients. By leveraging the likelihood ratio method and a blockwise computation strategy, they achieve accurate and efficient explanations for complex models, even those with text-based outputs.

What Problem Does This Paper Address?

Explaining the decisions of deep neural networks (DNNs) is crucial, especially in safety-critical domains. Saliency maps are a popular method, but they typically rely on gradients, which are inaccessible for "black-box" models. These models, often proprietary or computationally intensive (like large language models or cloud-based APIs), prevent traditional gradient-based explanation techniques. This creates a significant gap: we can build powerful AI, but we struggle to understand why they make specific decisions when their internal workings are hidden.

Methods

The core of this work is a novel framework that estimates gradients for black-box models. Here's how it works:

  • Likelihood Ratio Method for Gradient Estimation: Instead of directly computing gradients (which is impossible), they use the likelihood ratio method. This involves:
  • Injecting Noise: Small, random noise is added to the input image.
  • Forward Pass: The noisy input is passed through the black-box model to get an output (class activation).
  • Proxy Gradient Calculation: A "proxy gradient" is computed using the output and the negative gradient of the noise's probability density function.
  • Averaging: By averaging these proxy gradients over multiple noisy copies, they approximate the true gradient. This is a key innovation, as it bypasses the need for backpropagation.
  • Blockwise Computation for Variance Reduction: A major challenge with gradient estimation, especially for high-dimensional inputs like images, is high variance. To combat this, they propose:
  • Random Blocks: The input image is divided into random blocks.
  • Targeted Noise Injection: Noise is injected only into these selected blocks, leaving the rest of the image unchanged.
  • Averaging over Blocks: The likelihood ratio proxy gradients are averaged across multiple random blocks. This significantly reduces variance, leading to more stable and accurate gradient estimates.
  • Integrating with Existing Saliency Methods: Once the estimated gradient is obtained, it can be seamlessly plugged into any standard gradient-based saliency map generation technique (like vanilla gradient, integrated gradients, etc.) to produce the final saliency map.

Datasets

  • ImageNet-1K: Used extensively for evaluating the effectiveness of their saliency map generation methods on image classification tasks.
  • Not discussed in the paper: Specific datasets for multi-modal large language models (MLLMs) like GPT-Vision are not explicitly detailed, but the paper mentions applying their method to explain GPT-Vision's decisions.

Key Insights and Ideas

  • Gradient Estimation without Backprop: The most significant insight is demonstrating that it's possible to estimate gradients for black-box models using only forward passes and the likelihood ratio method. This opens up explainability for a vast range of models previously inaccessible.
  • Blockwise Noise Injection as a Variance Killer: The blockwise approach is a clever way to tackle the high variance inherent in gradient estimation. By focusing noise injection and computation on smaller regions, they achieve better accuracy and stability, especially for large images.
  • Saliency Maps for LLMs: The paper shows that their method can be adapted to explain the decisions of multi-modal large language models (MLLMs), which often output text. This is a crucial step towards understanding these complex generative models.
  • Noise as a Regularizer: The introduction of noise in the gradient estimation process acts as a form of regularization, helping to alleviate overfitting and improve generalization for saliency map generation.

Key Results

  • Improved Saliency Map Quality: Experiments on deletion/insertion tasks showed that their method, when integrated with methods like integrated gradients, achieved a significant performance improvement (e.g., 1.51% average improvement over white-box integrated gradients).
  • Effective Black-Box Adversarial Attacks: The generated saliency maps were effective in facilitating black-box adversarial attacks, with their integrated gradient approach achieving the best performance (1.7% margin over the runner-up).
  • Good Generalization: The estimated gradients showed good generalization across different models, indicating their robustness.
  • GPT-Vision Explanation: The paper successfully applied their method to explain GPT-Vision's decisions in visual-question answering tasks, highlighting areas of focus for both correct and incorrect predictions. For instance, it revealed GPT-Vision's difficulty in understanding the concept of "speed" from an image.

Limitations and Future Work

  • Computational Cost: While blockwise computation reduces variance, it still involves multiple forward passes, which can be computationally intensive. The paper notes the trade-off between the number of copies (computation efficiency) and gradient estimation performance.
  • Handling Complex Scenes: For GPT-Vision, the paper notes that in complex scenes with many similar objects (e.g., sheep), saliency maps might not perfectly capture all targets, and explanations for "apple" might focus only on local parts, suggesting a reliance on discriminative local features rather than global structure.
  • Future Work: The paper suggests further exploration into optimizing the balance between computation cost and accuracy, and extending the method to more complex multi-modal models and scenarios. The authors also highlight the potential for their method to serve as a foundation for future research in black-box model explainability.

Summary updated

BibTeX
@misc{xu2024forward,
  author = {Chenliang Xu},
  title = {{Forward Learning for Gradient-based Black-box Saliency Map Generation}},
  year = {2024},
  eprint = {2403.15603},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.15603},
}
Figure