How to Probe: Simple Yet Effective Techniques for Improving Post-hoc Explanations

Siddhartha Gairola, Moritz Böhle, Francesco Locatello, Bernt Schiele

Abstract

Post-hoc explanation methods are widely used to interpret deep neural networks, but their quality heavily depends on the training dynamics of the model's final classification layer, or "probe." This paper reveals that the standard practice of using Cross-Entropy (CE) loss for training probes on frozen features often leads to uncalibrated and distributed explanations. By simply swapping CE for Binary Cross-Entropy (BCE) and employing slightly more complex, interpretable Multi-Layer Perceptron (MLP) probes, researchers can drastically improve the localization and faithfulness of post-hoc explanations across various pre-training paradigms, including self-supervised and vision-language models.

Introduction

To understand the decisions of "black box" neural networks, researchers frequently employ post-hoc attribution methods—such as GradCAM, Layer-wise Relevance Propagation (LRP), or Integrated Gradients—to generate heatmaps indicating which input features influenced a prediction. A common assumption in the field is that these explanation methods are largely independent of the specific training quirks of the classification layer, provided the model achieves high accuracy.

However, with the rise of foundation models and self-supervised learning (SSL), the standard workflow has shifted toward freezing a massive pre-trained backbone and training only a tiny linear probe for downstream tasks. This paper investigates a critical gap in this workflow: does the way we train this small probe impact the resulting post-hoc explanations? The findings suggest that the training objective of the probe actually matters more than the pre-training scheme of the backbone itself, challenging established norms in Explainable AI (XAI).

Methodology

The authors systematically evaluated the impact of probe training by standardizing a multi-stage pipeline:

  1. Frozen Backbones: The study utilized a variety of pre-trained architectures, including ResNet-50 and ViT-B/16, trained via fully-supervised, self-supervised (MoCoV2, BYOL, DINO), and vision-language (CLIP) methods.
  2. Probe Variations: Probes were trained on frozen features using either standard Cross-Entropy (CE) loss or Binary Cross-Entropy (BCE) loss. Additionally, the researchers compared standard linear probes against Multi-Layer Perceptron (MLP) probes using inherently interpretable "B-cos" layers.
  3. Attribution Suite: A wide array of attribution methods (LRP, IntGrad, GradCAM, LIME, Rollout, etc.) were applied to the trained probes.
  4. Quantitative Evaluation: Explanation quality was measured using localization metrics such as the Grid Pointing Game (GridPG) and Energy Pointing Game (EPG), alongside pixel deletion tests to measure faithfulness and complexity scores to measure clarity.

The Shift-Invariance Flaw in Cross-Entropy

A key insight of the paper is the technical limitation of the Softmax function used in standard Cross-Entropy loss. Softmax is shift-invariant; adding a constant value to all class logits does not change the resulting probability distribution or the loss. Consequently, there are infinite "functionally equivalent" linear probes that produce identical predictions but possess wildly different weight configurations.

Because attribution methods rely on these weights to calculate importance, CE-trained probes often yield messy, uncalibrated explanations. In contrast, Binary Cross-Entropy (BCE) loss is not shift-invariant. It penalizes the model for positive shifts in non-target classes, forcing the probe's weights to align strictly with class-specific features. This results in naturally localized, crisp explanations without requiring any changes to the underlying backbone.

Enhancing SSL Features with MLP Probes

While linear probes are the industry standard for evaluating SSL features, the authors argue they may be insufficient for interpretability. Features extracted by self-supervised models are not always perfectly linearly separable for every downstream task.

By upgrading to a 2- or 3-layer B-cos MLP probe, the model can better distill complex features. This architectural shift does more than just improve accuracy; it actively enhances the explanation's ability to focus on the primary object rather than background noise. For instance, using a 3-layer B-cos MLP on DINO features improved downstream accuracy from 70.6% to 73.1% while simultaneously boosting explanation localization (GridPG) from 70.0% to 89.0%.

Key Results

The empirical evidence across ImageNet-1K, PASCAL VOC, and MS COCO demonstrates a consistent advantage for BCE and MLP-based probing:

  • Significant Localization Gains: Switching from CE to BCE loss for linear probes improved GridPG localization scores by up to 40 percentage points (e.g., from 52% to 92% for a DINO backbone explained via LRP).
  • Broad Consistency: The BCE advantage held true across both CNNs and Vision Transformers, benefiting nearly all tested attribution methods, including LRP, Integrated Gradients, and LIME.
  • Improved Explanation Properties: BCE-trained probes consistently produced explanations that were more compact (higher Gini index), less complex (lower entropy), and more stable during pixel deletion tests.

Conclusion and Practical Implications

The findings present a new directive for the XAI community: the quality of an explanation is inextricably linked to the training details of the classification head. For practitioners seeking interpretable models on downstream tasks, the authors provide a simple, actionable guideline: train probes using Binary Cross-Entropy loss rather than standard Cross-Entropy, and consider the use of lightweight, interpretable MLP architectures like B-cos to better capture the nuances of self-supervised features.

Summary updated

BibTeX
@inproceedings{gairola2025how,
  author = {Siddhartha Gairola and Moritz Böhle and Francesco Locatello and Bernt Schiele},
  title = {{How to Probe: Simple Yet Effective Techniques for Improving Post-hoc Explanations}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=57NfyYxh5f},
}
Figure