[Paper Review] ProtoPFormer: Concentrating on Prototypical Parts in Vision Transformers for Interpretable Image Recognition
ProtoPFormer introduces global and local prototypes tailored for Vision Transformers to improve interpretability and accuracy in image recognition by concentrating prototypes on foreground parts and enabling mutual correction between branches.
Prototypical part network (ProtoPNet) has drawn wide attention and boosted many follow-up studies due to its self-explanatory property for explainable artificial intelligence (XAI). However, when directly applying ProtoPNet on vision transformer (ViT) backbones, learned prototypes have a "distraction" problem: they have a relatively high probability of being activated by the background and pay less attention to the foreground. The powerful capability of modeling long-term dependency makes the transformer-based ProtoPNet hard to focus on prototypical parts, thus severely impairing its inherent interpretability. This paper proposes prototypical part transformer (ProtoPFormer) for appropriately and effectively applying the prototype-based method with ViTs for interpretable image recognition. The proposed method introduces global and local prototypes for capturing and highlighting the representative holistic and partial features of targets according to the architectural characteristics of ViTs. The global prototypes are adopted to provide the global view of objects to guide local prototypes to concentrate on the foreground while eliminating the influence of the background. Afterwards, local prototypes are explicitly supervised to concentrate on their respective prototypical visual parts, increasing the overall interpretability. Extensive experiments demonstrate that our proposed global and local prototypes can mutually correct each other and jointly make final decisions, which faithfully and transparently reason the decision-making processes associatively from the whole and local perspectives, respectively. Moreover, ProtoPFormer consistently achieves superior performance and visualization results over the state-of-the-art (SOTA) prototype-based baselines. Our code has been released at https://github.com/zju-vipa/ProtoPFormer.
Motivation & Objective
- Motivate prototypical-part explanations for ViT-based image recognition and address prototype distraction in ViT backbones.
- Propose a two-branch ProtoPFormer framework with global and local prototypes that align with ViT architecture.
- Develop foreground-preserving and prototypical-part concentration mechanisms to improve interpretability and accuracy.
- Demonstrate mutual correction between global and local prototypes to produce faithful, interpretable decisions.
Proposed method
- Split ViT outputs into a class token stream (global branch) and image token stream (local branch).
- Introduce m_g global prototypes and m_l local prototypes per class to compute similarity with class token and image tokens, respectively.
- Use a foreground-preserving (FP) mask derived from attention rollout to retain foreground tokens and suppress background in the local branch.
- Model each local prototype’s similarity map as a Gaussian; estimate mean and covariance to drive a prototypical-part concentration (PPC) loss.
- Define PPC loss to minimize the trace of the covariance and maximize separation of prototype centers within a class to encourage diverse, localized parts.
- Combine global and local branch logits with learned weights to form final predictions, trained with cross-entropy and PPC losses.
Experimental results
Research questions
- RQ1Can ViT-based prototype networks suffer from prototype distraction, where prototypes activate on background rather than meaningful parts?
- RQ2Can introducing global (class-token-driven) and local (token-driven) prototypes, with foreground masking and Gaussian-based supervision, improve interpretability and accuracy of ProtoPNets in ViTs?
- RQ3Do global and local prototypes mutually correct and jointly influence final decisions for better explanations and performance?
Key findings
- ProtoPFormer consistently outperforms seven prototype-based baselines across three datasets and three ViT backbones.
- The two-branch design enables mutual correction, with global prototypes capturing holistic features and local prototypes focusing on discriminative parts.
- Foreground-preserving masking and PPC loss help local prototypes concentrate on prototypical parts, reducing background distraction.
- Visualization shows ProtoPFormer produces localized, semantically meaningful prototypes unlike prior methods that spread attention over background.
- Ablation indicates joint global/local decisions outperform separate branches, and increasing prototype counts generally improves accuracy within practical limits.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.