NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Keep the Faith: Faithful Explanations in Convolutional Neural Networks for Case-Based Reasoning

Tom Nuno Wolf, Fabian Bongratz, Anne-Marie Rickmann, Sebastian Pölsterl, Christian Wachinger

TL;DR

ProtoPNet is a popular "inherently interpretable" deep learning architecture for case-based reasoning, but this paper proves its visual explanations violate fundamental explainability axioms. The authors introduce ProtoPFaith, a novel method that leverages Shapley values and probabilistic layer conversions to deliver mathematically faithful pixel-level attributions, outperforming the original method on sanity metrics by a factor of over 1,000.

What Problem Does This Paper Address?

As deep neural networks are increasingly deployed in decision-critical fields like medicine, understanding why a model made a specific prediction is paramount. To tackle this, architectures like ProtoPNet use case-based reasoning ("this looks like that") by matching parts of an input image to learned, class-representative training patches called "prototypes."

ProtoPNet explains its decisions by upscaling its internal distance maps to create visual heatmaps on the input image. However, the authors demonstrate a critical flaw: these explanations are unfaithful to the model's actual inner workings. They violate established explainability axioms such as Completeness, Sensitivity, and Dummy. Crucially, the paper proves that upscaling latent feature maps assumes a direct spatial correspondence with the input image that breaks down in deep convolutional networks due to large, overlapping receptive fields.

The ProtoPNet vs ProtoPFaith pipeline overview

Methods

To resolve these violations, the authors propose ProtoPFaith. The method consists of two main steps:

  1. Restoring Linearity: They remove ProtoPNet's non-linear log-activation function in the prototype module, ensuring the final classification layer relies on a purely linear combination of prototype similarities.
  2. Axiomatic Attribution via Shapley Values: To compute true pixel-level importance without exponential computational overhead, they adapt Deep Approximate Shapley Propagation (DASP). This requires transforming the deterministic network into a lightweight probabilistic model that propagates mean and variance. Because standard DASP frameworks do not support ProtoPNet's unique architecture, the authors analytically derive new closed-form solutions for the expectation and variance of the squared $L_2$-norm layer and the ReLU1 activation function.

Datasets

The authors evaluated their approach across five different network backbones (ConvNet, ResNet, ResNet50, Wide-ResNet50, ResNeXt50) using three benchmark datasets:

  • CUB-200-2011: A fine-grained dataset of 200 bird species.
  • Stanford Dogs: A dataset featuring fine-grained dog breed classification.
  • RSNA Pneumonia Detection Challenge: A clinical dataset consisting of chest X-rays categorized as either pneumonia or healthy.

Key Insights and Ideas

  • The Illusion of Spatial Upscaling: The paper provides a clear mathematical counterexample showing that upscaling a latent feature map does not preserve spatial truth. Because deep layers possess global receptive fields, a feature activated in the bottom-right of a latent map could actually be triggered by a pixel in the top-left of the input image.
  • Sparsity vs. Truth: ProtoPNet generates highly localized, sparse heatmaps that are visually appealing to humans but mathematically unfaithful. ProtoPFaith's maps are more diffuse and granular, highlighting a fundamental trade-off in XAI between human aesthetic preference and mathematical rigor.
  • Exposing Model Pathology: By enforcing faithful explanations, ProtoPFaith exposes hidden training failures, such as "prototype collapse" (where a model learns duplicate prototypes) or instances where the model ignores the target object entirely and classifies based purely on background pixels.
Figure 3: Explanations of the forward pass of: (top) a bird with ResNeXt trained on CUB-200-2011; (middle) a dog with ResNeXt trained on Stanford Dogs; (bottom) ConvNet trained for pneumonia detection on RSNA. We explain the layout of each explanation in the top left with formal notation (left to right, top to bottom): (1) explanation of ProtoPNet for the occurrence of a prototype within the test image; (2) explanation of ProtoPNet for the activation of an image, from which a prototype was extracted; (3) test image; (4) training image, from which the prototype was extracted; (5) explanation of ProtoPFaith for the occurrence of a prototype within the test image; (6) explanation of ProtoPFaith about the image, from which the prototype was extracted. We grayed out duplicate prototypes, which are identical feature vectors. Ψk denotes the prototype contribution towards log-probability. See Sec. A.4 for more visual results.

Key Results

  • Quantitative Superiority: The quality of the explanations was measured using the Area Over the Perturbation Curve (AOPC), which tracks how rapidly model performance degrades as highly attributed pixels are removed. ProtoPFaith outperformed ProtoPNet's original explanations by a factor of $>10^3$ across all experiments.
  • Clinical Relevance: On the RSNA dataset, ProtoPNet's unfaithful explanations frequently highlighted arbitrary background regions outside the patient's body. In contrast, ProtoPFaith accurately targeted the lung tissue while correctly ignoring confounding anatomical structures like the ribs.

Limitations and Future Work

Currently, ProtoPFaith is designed for single-label image classification tasks, though the authors note it can be extended to multi-label architectures like XProtoNet. Furthermore, because ProtoPFaith prioritizes mathematical faithfulness, its granular and diffuse attribution maps can be harder for human operators to quickly interpret compared to sparse, localized heatmaps. The authors highlight the need for future research to bridge this gap, finding ways to achieve explanations that are simultaneously human-understandable and strictly faithful to the model.

Summary updated

BibTeX
@inproceedings{wolf2024keep,
  author = {Tom Nuno Wolf and Fabian Bongratz and Anne-Marie Rickmann and Sebastian Pölsterl and Christian Wachinger},
  title = {{Keep the Faith: Faithful Explanations in Convolutional Neural Networks for Case-Based Reasoning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i6.28406},
}
Figure