BEE: Metric-Adapted Explanations via Baseline Exploration-Exploitation

Oren Barkan, Yehonatan Elisha, Jonathan Weill, Noam Koenigstein

TL;DR

This paper introduces BEE, a novel method for generating more robust and adaptable explanations from deep learning models. BEE addresses the challenge that different evaluation metrics favor different explanation styles by learning to dynamically adjust its "baseline" representation based on the specific metric being used, leading to state-of-the-art performance.

What Problem Does This Paper Address?

Explaining why a deep learning model makes a particular prediction is crucial for trust and debugging, especially in fields like computer vision. A common technique for generating these explanations (called "explanation maps") involves methods like Integrated Gradients (IG). These methods often rely on a "baseline" input that represents "missing information" to compute the explanation. However, two major problems persist:

  1. No Universal Evaluation Metric: Different metrics exist to judge the quality of an explanation map, and they often disagree. What one metric considers a good explanation, another might not.
  2. No Universal Baseline: Similarly, there's no single "best" way to define this "missing information" baseline. Different baseline choices can lead to significantly different explanation maps, and thus, different performance scores across various metrics.

This creates a dilemma: how do you choose the right baseline and evaluation metric to get a truly reliable explanation? The authors argue that the choice of baseline heavily influences which explanation map is favored by a given metric.

Methods

The core innovation of BEE is its Baseline Exploration-Exploitation (BEE) framework. Instead of using a fixed baseline, BEE treats the baseline as a learned random tensor. This tensor is sampled from a mixture of baseline distributions. The key idea is to optimize this mixture of distributions using a contextual exploration-exploitation (EE) procedure.

Here's how it works:

  • Path Integration: BEE builds upon existing path-integration methods (like IG) but extends them to incorporate information from intermediate network representations and their gradients, not just the input image gradients.
  • Learned Baseline Distribution: BEE models the baseline as a random tensor drawn from a learned mixture of distributions. This mixture is trained to adapt to the specific evaluation metric being used.
  • Exploration-Exploitation (EE): The EE mechanism allows BEE to "explore" different baseline types and distributions, and then "exploit" the ones that yield the best performance for a given metric and input. This is done through an iterative process where rewards are generated based on metric scores, and the baseline distribution is updated accordingly.
  • Pretraining and Finetuning: BEE can be used in two modes:
  • Pretrained (pBEE): The baseline distribution is learned offline on a training set.
  • Finetuned (fBEE): The pretrained model is further adapted to specific test instances during inference, allowing for even more tailored explanations.

Datasets

The experiments were conducted using the ImageNet (ILSVRC 2012) validation set as the test set. This dataset contains 50,000 images across 1,000 classes. For pretraining, a subset of 5000 examples from the ImageNet training set was used.

Key Insights and Ideas

  • Metric-Specific Explanations are Necessary: The paper strongly demonstrates that different evaluation metrics have distinct preferences for explanation maps, and these preferences are directly tied to the choice of baseline. This highlights the need for methods that can adapt to the metric.
  • Baselines are Not One-Size-Fits-All: The authors show that no single baseline type (e.g., constant, blurred, uniform) consistently performs best across all metrics. This reinforces the motivation for BEE's adaptive approach.
  • Exploration-Exploitation for Baselines: Applying EE to learn the optimal baseline distribution is a novel and effective way to navigate the complex landscape of explanation evaluation.
  • Intermediate Representations Matter: Incorporating information from internal network representations and their gradients, beyond just input gradients, leads to better explanations.
  • Finetuning Offers an Edge: While pretrained BEE already performs well, finetuning on a per-instance basis further boosts explanation quality, albeit at a higher computational cost.

Key Results

  • State-of-the-Art Performance: BEE (both pretrained and finetuned versions) consistently outperformed existing state-of-the-art explanation methods across a variety of objective evaluation metrics on both CNN and ViT architectures.
  • Superiority over Baseline Types: In quantitative comparisons, BEE's adaptive approach significantly outperformed using any single fixed baseline type.
  • Finetuning Gains: The finetuned version (fBEE) generally achieved higher scores than the pretrained version (pBEE), demonstrating the benefit of instance-specific adaptation.
  • Efficiency: The pretrained BEE (pBEE) achieves comparable runtime to standard methods like IG, especially when parallelized, while offering superior performance.

Limitations and Future Work

  • Computational Cost of Finetuning: The finetuning phase (fBEE) introduces sequential sampling, increasing computational complexity compared to the pretrained version (pBEE). The authors suggest exploring ways to accelerate this process.
  • Optimizing for Multiple Metrics Simultaneously: Currently, BEE optimizes for a single metric at a time. Future work could involve designing reward functions that balance multiple metrics to produce a single, universally "best" explanation.
  • Generalization to Other Domains: The current evaluation is primarily focused on vision models. Extending BEE to natural language processing and audio processing is a promising future direction.
  • Contextual Information for Pretraining: Investigating how to better integrate contextual information about baselines during pretraining could further improve both pBEE and fBEE.

Summary updated

Abstract

Two prominent challenges in explainability research involve 1) the nuanced evaluation of explanations and 2) the modeling of missing information through baseline representations. The existing literature introduces diverse evaluation metrics, each scrutinizing the quality of explanations through distinct lenses. Additionally, various baseline representations have been proposed, each modeling the notion of missingness differently. Yet, a consensus on the ultimate evaluation metric and baseline representation remains elusive. This work acknowledges the diversity in explanation metrics and baselines, demonstrating that different metrics exhibit preferences for distinct explanation maps resulting from the utilization of different baseline representations and distributions. To address the diversity in metrics and accommodate the variety of baseline representations in a unified manner, we propose Baseline Exploration-Exploitation (BEE) - a path-integration method that introduces randomness to the integration process by modeling the baseline as a learned random tensor. This tensor follows a learned mixture of baseline distributions optimized through a contextual exploration-exploitation procedure to enhance performance on the specific metric of interest. By resampling the baseline from the learned distribution, BEE generates a comprehensive set of explanation maps, facilitating the selection of the best-performing explanation map in this broad set for the given metric. Extensive evaluations across various model architectures showcase the superior performance of BEE in comparison to state-of-the-art explanation methods on a variety of objective evaluation metrics.
BibTeX
@inproceedings{barkan2025bee,
  author = {Oren Barkan and Yehonatan Elisha and Jonathan Weill and Noam Koenigstein},
  title = {{BEE: Metric-Adapted Explanations via Baseline Exploration-Exploitation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=r3c84buHMh},
}
Figure