Cosine Similarity is Almost All You Need (for Prototypical-Part Models)
Abstract
Prototypical-part networks are a popular interpretable alternative to black-box deep learning models for computer vision because of their faithful, prototype-based self-explanations. However, in practice, they have proven difficult to train because they are highly sensitive to hyperparameter tuning and difficult to comprehend because they contain a large number of prototypes. We show that replacing ℓ2distance with an angular prototype similarity in the original ProtoPNet greatly improves robustness to hyperparameter selection and is sufficient to produce accuracy and sparsity competitive with state-of-the-art on many backbones and datasets. We also show cosine similarity leads to superior accuracy for five different ProtoPNet architectures (ProtoPNet, TesNet, Deformable ProtoPNet, ProtoTree, and ST-ProtoPNet). Finally, we demonstrate ProtoPNet with cosine similarity produces better semantics than ℓ2: prototypes from cosine models score better on prototype quality metrics and are perceived as more similar 3:2 in a user study.1
Fields of Study & Subjects
3D Shape Modeling and Analysis
Manufacturing Process and Optimization
Morphological variations and asymmetry
Publication details
- Journal / source
- 2026 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)
- Publisher
- IEEE
- Pages
- 1586–1596
- Publication date
- 6 March 2026