ProtoPNet

Also known as: Prototypical part network · prototype-based explanation

On this page 7

ProtoPNet, short for prototypical part network, is a deep image classifier that reaches its decisions by comparing parts of an input image with learned prototypes, each of which corresponds to a patch from a real training image. In Explainable AI, it is a leading example of an interpretable-by-design model: its reasoning takes the form “this looks like that”, which a person can inspect directly instead of relying on a post hoc explanation.

Introduced in 2019 by researchers working with Cynthia Rudin, ProtoPNet showed that a convolutional network can keep accuracy close to an opaque baseline while exposing a case-based reasoning process. It is often described as prototype-based explanation and has inspired a large family of follow-up architectures.

How ProtoPNet reasons with prototypical parts

ProtoPNet places a prototype layer between a standard convolutional backbone and the final classifier. The backbone, for example VGG, ResNet or DenseNet, turns an image into a grid of latent patch vectors. Each prototype is a learned vector of the same size, and the network measures how close every patch is to every prototype.

For each prototype, the model keeps the maximum similarity across all patches, which answers the question of whether that part appears anywhere in the image. Similarity is a decreasing function of squared L2 distance, typically the logarithm of (d + 1) divided by (d + epsilon). A fully connected last layer then weights these similarity scores to produce class logits.

The table below traces the path of one image through the architecture.

ComponentFunctionOutput
Convolutional backboneExtracts features from the imageGrid of latent patches, for example 7 by 7
Add-on layersAdjust depth and range of featuresPatch vectors in prototype space
Prototype layerMeasures distance to each prototypeSimilarity map per prototype
Max poolingKeeps the best-matching patchOne similarity score per prototype
Last layerCombines evidence for each classClass logits
Components of the ProtoPNet architecture

The three-stage training procedure

ProtoPNet is trained in alternating stages rather than with a single end-to-end loss. This schedule is what ties each abstract prototype to a concrete, viewable image patch.

StageWhat is optimizedPurpose
Stochastic gradient descentBackbone, add-on layers and prototypesLearn a meaningful latent space
Prototype projectionEach prototype is replaced by its nearest training patchMake every prototype visualizable
Last-layer optimizationWeights of the final classifierSparsify reliance on wrong-class prototypes
Training stages and their purpose

The first stage combines cross-entropy with a cluster cost, which pulls patches toward a prototype of their own class, and a separation cost, which pushes them away from prototypes of other classes. The projection step, also called the push step, is decisive for interpretability: after it, every prototype is exactly the latent representation of a real patch, so the explanation can show that patch.

In the original setting of CUB-200-2011 bird species, the network uses 10 prototypes per class, giving 2,000 prototypes for 200 classes. Reported accuracy with single backbones was roughly in the high 70s to low 80s percent, comparable to non-interpretable baselines, and an ensemble raised it further.

ProtoPNet compared with other explanation methods

The key difference is that ProtoPNet explanations are part of the forward computation, whereas saliency maps such as Grad-CAM or attribution methods such as SHAP are computed afterward and may not reflect the model’s actual reasoning. This gives ProtoPNet a structural advantage in explanation faithfulness, though not a guarantee.

ApproachExplanation formBuilt into the model
ProtoPNetSimilar training patches with weightsYes
Grad-CAMHeatmap of influential regionsNo
SHAPAdditive feature contributionsNo
Concept bottleneck modelHuman-named concept scoresYes
Example-based explanationWhole similar training examplesVaries
How ProtoPNet differs from neighboring approaches

Compared with a concept bottleneck model, ProtoPNet needs no concept annotations: prototypes emerge from class labels alone. The cost is that a prototype has no guaranteed human meaning, so its interpretation depends on the person looking at the patch.

Variants and practical use

ProtoPNet started a research line of prototype networks that addresses its redundancy, size and rigidity. Practitioners choose among them according to how compact and how faithful the explanation must be.

VariantMain changeBenefit
ProtoTreePrototypes arranged in a decision treeFewer prototypes, global logic
ProtoPSharePrototypes shared across classesLess redundancy
ProtoPoolSoft assignment from a common poolCompact models
Deformable ProtoPNetSpatially flexible prototype partsHandles pose variation
TesNetPrototypes on a structured basisMore diverse prototypes
Selected successors of ProtoPNet
  • Prototype networks fit fine-grained recognition where experts compare parts, such as species, vehicle models or lesion types.
  • They support model debugging: a prototype that matches background or a watermark exposes a shortcut.
  • Experts can remove or edit prototypes and retrain only the last layer to correct behavior.

Limitations and open criticism

The central criticism is a semantic gap between latent and visual similarity. Two patches can be close in the latent space for reasons a human cannot see, such as texture or color statistics, so “this looks like that” can mislead. Studies have shown that small, imperceptible perturbations or compression artifacts can change which prototype is activated.

Further problems include duplicate prototypes, prototypes that capture background, the coarse upsampled heatmaps used to localize patches, and the burden of reviewing thousands of prototypes. Explanations should therefore be validated with user studies or faithfulness tests rather than assumed to be correct because the model is interpretable by design.

Stripped to the essentials

Think of how a bird expert works. The expert looks at a photo and says: this beak looks like the beak of a finch from an earlier trip. These wings look like those wings. ProtoPNet copies that habit.

During training, it collects small picture pieces from real examples. Later, it compares a new image with those pieces. It then shows which pieces matched and how much each one counted. You see the evidence, not just the answer.

Where it is applied

A research team building a mammography triage model chooses a prototype-based network instead of a standard classifier, because radiologists want to see why a mass is flagged. The model learns prototypes for margin shapes, such as spiculated, circumscribed and indistinct margins, from labeled screening images.

During review, each prediction appears with the three most activated prototypes and the matching region of the current scan. Radiologists discover that several prototypes respond to text markers burned into the images, a classic shortcut. The team removes those prototypes, masks the markers and retrains the last layer. The corrected model keeps similar accuracy while its explanations now point to tissue structures that clinicians can verify.