Abstract
Deep learning models are often criticized for their "black-box" nature, which hinders trust in high-stakes applications. We present PIP-Net (Patch-based Intuitive Prototypes Network), a framework designed for interpretability by design. PIP-Net learns to classify images by identifying prototypical visual patches that correspond to human-recognizable concepts. By leveraging self-supervised pre-training and a sparse, non-negative scoring sheet, PIP-Net closes the "semantic gap" found in earlier prototype-based models. Our results show that PIP-Net achieves competitive accuracy on fine-grained benchmarks while providing significantly purer and more intuitive explanations, along with the ability to detect out-of-distribution data.
Introduction
Standard deep neural networks lack transparency, making it difficult to understand the reasoning behind their predictions. Previous interpretable models, such as ProtoPNet, attempted to use "prototypes"—representative image patches—to explain decisions. However, these models often suffered from a semantic gap: the learned prototypes were frequently visually incoherent or represented noise rather than distinct object parts. Furthermore, these models struggled with out-of-distribution (OoD) data, often forcing a confident but incorrect classification. PIP-Net addresses these issues by ensuring prototypes are semantically meaningful and allowing the model to abstain when no familiar features are present.
Methods: Interpretable by Design
PIP-Net introduces a multi-stage approach to ensure both accuracy and interpretability.
Self-Supervised Learning
To ensure that prototypes correspond to consistent visual concepts (e.g., a specific bird's beak), PIP-Net employs a self-supervised pre-training phase using contrastive learning. This phase maps different augmented views of the same image patch to the same prototype node, forcing the model to learn stable visual features rather than discriminative noise.
The Sparse Scoring Sheet
The final classification layer in PIP-Net is a sparse linear layer with non-negative weights. This architecture functions as a "scoring sheet": if a prototype is detected in an image, it contributes a positive score to a specific class; otherwise, it contributes nothing. This makes the decision process highly transparent and compact.
Global and Local Interpretability
PIP-Net provides global interpretability by allowing users to inspect the entire set of prototypes learned for a class. Locally, for any given image, the model highlights the specific patches that triggered its decision, providing a clear "I classified this as X because I saw Y" explanation.
Results and Discussion
The authors evaluated PIP-Net on several fine-grained datasets, including CUB-200-2011 (birds) and Oxford-IIIT Pet.
Closing the Semantic Gap
A key metric for interpretability is "prototype purity"—the degree to which a prototype consistently represents the same semantic object part. PIP-Net significantly outperforms previous methods in this regard. On the CUB dataset, PIP-Net achieved a purity score of 0.93, compared to just 0.44 for ProtoPNet.
Performance and Robustness
PIP-Net achieved 84.3% accuracy on the CUB-200-2011 dataset, surpassing both ProtoPNet (79.2%) and ProtoTree (82.2%). Additionally, its non-negative scoring mechanism allows for effective OoD detection. When trained on pet breeds and tested on car images, PIP-Net correctly identified 99.1% of the car images as out-of-distribution by producing near-zero scores across all known classes.
Conclusion
PIP-Net demonstrates that interpretability does not have to come at the cost of performance. By ensuring prototypes are semantically pure and using a sparse scoring mechanism, it provides human-understandable explanations that align with actual object parts. Future work will focus on enabling the model to count object instances and further optimizing performance across diverse neural architectures.
Code is available at: https://github.com/M-Nauta/PIPNet
Summary updated