Pairwise Matching of Intermediate Representations for Fine-grained Explainability

Lauren Shrack, Timm Haucke, Antoine Salaün, Arjun Subramonian, Sara Beery
3/28/2025
cs.CVcs.AI

Official code: pairx-explains/pairx (4 stars, last commit 2025-06-26).

Abstract

The differences between images belonging to fine-grained categories are often subtle and highly localized, and existing explainability techniques for deep learning models are often too diffuse to provide useful and interpretable explanations. We propose a new explainability method (PAIR-X) that leverages both intermediate model activations and backpropagated relevance scores to generate fine-grained, highly-localized pairwise visual explanations. We use animal and building re-identification (re-ID) as a primary case study of our method, and we demonstrate qualitatively improved results over a diverse set of explainability baselines on 35 public re-ID datasets. In interviews, animal re-ID experts found PAIR-X to be a meaningful improvement over existing baselines for deep model explainability, and suggested that its visualizations would be directly applicable to their work. We also propose a novel quantitative evaluation metric for our method, and demonstrate that PAIR-X visualizations appear more plausible for correct image matches than incorrect ones even when the model similarity score for the pairs is the same. By improving interpretability, PAIR-X enables humans to better distinguish correct and incorrect matches. Our code is available at: https://github.com/pairx-explains/pairx

View on arXivView PDF

Code Implementations(1)

Demo code for Pairwise mAtching of Intermediate Representations for eXplainability (PAIR-X).

43PythonMar 7, 20251 years ago

Similar Papers

Cite this paper

@article{shrack2025pairwise,
  title  = {Pairwise Matching of Intermediate Representations for Fine-grained Explainability},
  author = {Lauren Shrack and Timm Haucke and Antoine Salaün and Arjun Subramonian and Sara Beery},
  year   = {2025},
  eprint = {2503.22881},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.22881v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.22881.svg)](https://codeofpaper.com/paper/2503.22881)

Discussion