EPIC: Explanation of Pretrained Image Classification Networks via Prototypes

Piotr Borycki, Magdalena Trędowicz, Szymon Janusz, Jacek Tabor, Przemysław Spurek, Arkadiusz Lewicki, Łukasz Struski · 2025

Read EPIC: Explanation of Pretrained Image Classification Networks via Prototypes by Piotr Borycki, Magdalena Trędowicz, Szymon Janusz, Jacek Tabor, Przemysław Spurek, Arkadiusz Lewicki, Łukasz Struski (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-12897.txt.

Introduction

Piotr Borycki and co-authors present EPIC, a way to explain image classifiers with prototypes, in this 2025 paper. Explanation tools split into two camps. Post hoc tools work on any trained model but give coarse heat maps. Built in prototype methods explain clearly but need special training from scratch.

EPIC bridges the two camps. It runs on pretrained models with no architecture change. Yet its explanations show representative image patches, like prototype methods do. Users see concrete examples behind a prediction instead of vague hot regions. The method aims at general use across models and datasets. That breadth was the weakness of earlier prototype systems. Faithful, readable explanations support trust in deployed vision systems.

Catalog record

CREATORPiotr Borycki, Magdalena Trędowicz, Szymon Janusz, Jacek Tabor, Przemysław Spurek, Arkadiusz Lewicki, Łukasz Struski
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE40 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-12897

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

EPIC: Explanation of Pretrained Image Classification Networks via Prototypes Piotr Borycki, Magdalena Trędowicz, Szymon Janusz, Jacek Tabor, Przemysław Spurek, Arkadiusz Lewicki, Łukasz Struski Abstract Explainable AI (XAI) methods generally fall into two categories. Post-hoc approaches generate explanations for pre-trained models and are compatible with various neural network architectures. These methods often use feature importance visualizations, such as saliency maps, to indicate which input regions influenced the model’s prediction. Unfortunately, they typically offer a coarse understanding of the model’s decision-making process. In contrast, ante-hoc (inherently explainable) methods rely on specially designed model architectures trained from scratch. A notable subclass of these methods provides explanations through prototypes, representative patches extracted from the training data. However, prototype-based approaches have limitations: they require dedicated architectures, involve specialized training procedures, and perform well only on specific datasets. In this work, we propose EPIC (Explanation of Pretrained Image Classification), a novel approach that bridges the gap between these two paradigms. Like post-hoc methods, EPIC operates on pre-trained models without architectural modifications. Simultaneously, it delivers intuitive, prototype-based explanations inspired by ante-hoc techniques. To the best of our knowledge, EPIC is the first post-hoc method capable of fully replicating the core explanatory power of inherently interpretable models. We evaluate EPIC on benchmark datasets commonly used in prototype-based explanations, such as CUB-200-2011 and Stanford Cars, alongside large-scale datasets like ImageNet, typically employed by post-hoc methods. EPIC uses prototypes to explain model decisions, providing a flexible and easy-to-understand tool for creating clear, high-quality explanations. 1 Introduction Deep neural networks (DNNs) have revolutionized predictive modeling, frequently achieving performance superior to human experts in numerous fields [ 8 ] . However, despite their impressive results, DNNs are frequently regarded as “black boxes” due to their lack of clear interpretability [ 13 ] . This lack of transparency has led to the fast development of explainable AI (XAI) methods, which aim to make accurate predictions easier for people to understand [ 24 ] . Broadly, XAI methods fall into two categories: post-hoc approaches and ante-hoc (inherently interpretable) models. Post-hoc methods apply explanation techniques to pre-trained architectures without altering their internal mechanisms. Widely adopted examples include SHAP [ 14 ] , LIME [ 17 ] , LRP [ 2 ] , and Grad-CAM [ 19 ] , all of which rely on various notions of feature importance, often visualized through saliency maps. However, while saliency maps highlight input regions contributing to predictions, they frequently fall short in providing causal or concept-level insights. As a result, they may confirm where the model is looking, but not why it arrives at a particular decision, see Fig. 1 . EPIC (our) Grad-CAM LRP Figure 1 : Comparison of explanations constructed by EPIC, and classical post-hoc models: Grad-CAM and LRP. The experiment is presented in the ResNet50 feature space on the Cactus Wren image from the CUB200-2011 dataset. Each row of EPIC (our) represents the prototypical part. The yellow boxes in each row show the activation of a given prototypical part, while in the first column, we show the activation of corresponding prototypical parts in the original image. Observe that contrary to the classical XAI post-hoc approaches (Grad-CAM and LRP), EPIC provides an explanation behind the decision of the model. In contrast, ante-hoc (inherently explainable) models embed interpretability directly into their architectures, producing explanations as part of the prediction process. ProtoPNet [ 5 ] , a seminal example, introduced class-specific prototypes that enable explanations by comparing input image patches with prototypical parts drawn from the training data. Building on this idea, PIPNet [ 15 ] introduced architectural and training innovations to explicitly disentangle feature channels, ensuring that each channel consistently encodes a distinct prototype. More recently, InfoDisent [ 21 ] leveraged a pre-trained backbone but disentangled the final layer through a modified classification head, enabling interpretable outputs without retraining the entire model. Although ante-hoc models offer significant advantages, they encounter two fundamental challenges. First, they typically require specialized architectures and custom training regimes, demanding substantial engineering effort and computational resources. Second, they cannot be added to models that are already in use, especially if the original training data is unavailable or the model’s design cannot be changed. In this work, we introduce Explanation of Pretrained Image Classification (EPIC) 1 1 1 https://github.com/piotr310100/EPIC , the first method that uses prototype-based reasoning without needing to retrain or change the original model’s design. Our approach maintains the model’s original accuracy while providing more precise and detailed explanations than typical saliency methods. We add a plugin to the model’s last layer that separates feature channels, as shown in Fig. 2 . EPIC is the first model that uses prototypes in post-hoc XAI models, see Fig. 1 . Therefore, EPIC approach can be seamlessly applied to widely used datasets in prototype learning, such as CUB-200-2011 and Stanford Cars, as well as general benchmarks like ImageNet, demonstrating broad applicability across tasks. The core idea behind EPIC centers on defining a prototype purity measure, quantifying the degree of disentanglement of feature channels in the final layer. Naively extracting prototypes from a standard trained model typically results in low-quality explanations, as the learned channels are not aligned with coherent, interpretable concepts, see Fig. 3 . To address this, EPIC introduces a lightweight sub-module attached to the final layer, which selectively reshapes the channel representations based on purity criteria. Crucially, this enhancement operates without altering the model’s predictions, focusing solely on producing disentangled, meaningful prototype channels. Our key contributions are summarized as follows: • We propose EPIC, a principled post-hoc explanation framework that integrates prototype-based reasoning into existing deep models without retraining. • We demonstrate that EPIC offers superior interpretability over saliency-map-based approaches by explicitly targeting prototype purity. • We validate the versatility and generality of EPIC on both specialized fine-grained datasets (CUB-200-2011, Stanford Cars) and large-scale classification tasks (ImageNet). Figure 2 : Our image classification interpretation model, EPIC, features three main components: a pre-trained backbone, a disentanglement layer for key features, and a fully connected layer. In contrast to the classical model, we introduce a square matrix of size equal to the number of channels, which enables disentanglement of key features. To ensure the logits remain comparable to those of the classical model, we modify the weights in the fully connected layer by multiplying them with the inverse transformation used in the feature disentanglement step. 2 Related Works With the dynamic development and increasingly widespread deployment of deep learning models in key areas such as healthcare, finance, and autonomous systems, the issue of explainability has acquired the status of a fundamental research challenge. In the scholarly literature on explainable artificial intelligence (XAI), two principal paradigms can be distinguished: post-hoc explanation methods and inherently interpretable (ante-hoc) models. Post-hoc methods focus on analyzing already trained models, providing explanations without interfering with their architecture. One example of such a method is SHAP (SHapley Additive exPlanations), which employs Shapley values to assign importance to individual features in a model’s prediction [ 14 ] . Similarly, the LIME (Local Interpretable Model-agnostic Explanations) method enables the creation of local linear models to interpret predictions [ 17 ] . Techniques such as Grad-CAM (Gradient-weighted Class Activation Mapping) generate attention maps that highlight input regions critical to the model’s decision-making process [ 18 ]

Read the complete text