Concept Based Explanations and Class Contrasting

Rudolf Herdt, Daniel Otero Baguer
2/5/2025
cs.CV

Official code: rherdt185/concept-based-explanations-and-class-contrasting (0 stars, MIT, last commit 2025-06-02).

Abstract

Explaining deep neural networks is challenging, due to their large size and non-linearity. In this paper, we introduce a concept-based explanation method, in order to explain the prediction for an individual class, as well as contrasting any two classes, i.e. explain why the model predicts one class over the other. We test it on several openly available classification models trained on ImageNet1K. We perform both qualitative and quantitative tests. For example, for a ResNet50 model from pytorch model zoo, we can use the explanation for why the model predicts a class 'A' to automatically select four dataset crops where the model does not predict class 'A'. The model then predicts class 'A' again for the newly combined image in 91.1% of the cases (works for 911 out of the 1000 classes). The code including an .ipynb example is available on github: https://github.com/rherdt185/concept-based-explanations-and-class-contrasting

View on arXivView PDF

Code Implementations(1)

MIT
00Python, Jupyter NotebookFeb 5, 20251 years agoMIT

Similar Papers

Cite this paper

@article{herdt2025concept,
  title  = {Concept Based Explanations and Class Contrasting},
  author = {Rudolf Herdt and Daniel Otero Baguer},
  year   = {2025},
  eprint = {2502.03422},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.03422v2}
}

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/2502.03422.svg)](https://codeofpaper.com/paper/2502.03422)

Discussion