Investigating and Simplifying Masking-based Saliency Methods for Model Interpretability

Jason Phang, Jungkyu Park, Krzysztof J. Geras

Abstract

Saliency maps that identify the most informative regions of an image for a classifier are valuable for model interpretability. A common approach to creating saliency maps involves generating input masks that mask out portions of an image to maximally deteriorate classification performance, or mask in an image to preserve classification performance. Many variants of this approach have been proposed in the literature, such as counterfactual generation and optimizing over a Gumbel-Softmax distribution. Using a general formulation of masking-based saliency methods, we conduct an extensive evaluation study of a number of recently proposed variants to understand which elements of these methods meaningfully improve performance. Surprisingly, we find that a well-tuned, relatively simple formulation of a masking-based saliency model outperforms many more complex approaches. We find that the most important ingredients for high quality saliency map generation are (1) using both masked-in and masked-out objectives and (2) training the classifier alongside the masking model. Strikingly, we show that a masking model can be trained with as few as 10 examples per class and still generate saliency maps with only a 0.7-point increase in localization error.

Introduction

Deep learning models, particularly Convolutional Neural Networks (CNNs), are often viewed as "black boxes." In high-stakes domains like medical diagnosis, understanding the rationale behind a model's prediction is critical for trust and safety. Saliency maps address this by producing heatmaps that highlight influential image regions. Among these, masking-based methods learn to generate masks that either preserve or destroy classification performance to identify key features. However, the proliferation of complex variants—incorporating discrete masking or counterfactual generation—has made it difficult to identify which components truly drive performance. This work systematically evaluates these components to propose a simplified, highly effective framework.

Methodology

The proposed framework distills masking-based saliency into three essential pillars:

  1. Dual Objectives: The model utilizes a combination of MaxClass-In (maximizing the target class probability in the masked-in region) and MaxEnt-Out (maximizing prediction entropy when the region is masked out). This dual approach ensures the mask captures regions that are both sufficient and necessary for the prediction.
  2. Classifier-Agnostic (CA) Training: To avoid "adversarial shortcuts" where the masker exploits quirks of a fixed classifier, the masker is trained against a pool of continuously updated classifiers.
  3. Late-Layer Activation Input: The masker achieves optimal performance by processing activations from the later layers of the classifier (e.g., final ResNet blocks) rather than the entire feature hierarchy.
Overview of the masking-based saliency framework (A) and the architecture of the Classifier and Masker (B).

Notably, complex additions like Gumbel-Softmax for discrete masks or counterfactual infilling were found to offer negligible benefits over this well-tuned baseline.

Experimental Results

The models were evaluated on ImageNet (ILSVRC ’14) for Weakly Supervised Object Localization (WSOL) and OpenImages for pixel-level precision (PxAP).

Performance and Efficiency

The "Best CA" model achieved a Localization Error (LE) of 35.8 and a PxAP of 59.4 on ImageNet, surpassing established baselines such as RISE and Grad-CAM. A key finding is the extreme data efficiency of the masker. Training on just 10 examples per class resulted in only a 0.7-point increase in LE compared to full-dataset training.

Localization Error (LE) performance as a function of the number of examples per class and the number of classes used during training.

Data Scaling Insights

The study reveals that diversity in training data is more critical than volume. In few-shot settings, exposing the masker to a few examples from many classes is significantly more effective than many examples from a limited set of classes. This suggests that the masker learns generalizable features of "objectness" relative to the classifier's learned representations.

Discussion and Limitations

While the simplified model demonstrates state-of-the-art performance, some limitations remain. The model is designed to be "label-blind" during inference to simulate real-world deployment, which may impact scores on metrics that assume access to ground-truth labels. Additionally, while the principles are likely generalizable, the optimal layer selection was specifically tuned for ResNet-50; future work should explore these dynamics in modern architectures like Vision Transformers (ViTs). Finally, applying this efficient interpretability tool to specialized domains like medical imaging remains a promising avenue for future research.

Summary updated

BibTeX
@misc{phang2020investigating,
  author = {Jason Phang and Jungkyu Park and Krzysztof J. Geras},
  title = {{Investigating and Simplifying Masking-based Saliency Methods for Model Interpretability}},
  year = {2020},
  eprint = {2010.09750},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.09750},
}
Figure