Source-linked AI summary
Diverse by Design: Architectural Constraints for Prototype-Based Interpretability
Xinmiao Lin, Matthew Wright
TL;DR
Prototype-based networks offer case-based interpretability, but prototypes can be redundant and activate on background regions. DAPL uses attention-to-prototype constraints, foreground-aware training, and quantitative interpretability metrics; on CUB-200-2011, its foreground-aware variant achieves the best overall balance across evaluated prototype-based methods.
Problem
Prototype-based methods can learn redundant features and activate on background regions rather than meaningful object parts.
Source: §1 · p. 1Method
DAPL pairs multi-head attention heads one-to-one with prototypes, adds contrastive regularization and foreground-aware training, and assesses Coverage and Diversity.
Source: §1 · pp. 1–2Results
Takeaways & Limitations
DAPL's architectural inductive biases can effectively enforce diversity in learned prototype representations.
Source: §5 · p. 4
Abstract
from arXiv · showhide
Prototype-based neural networks provide inherent interpretability through case-based reasoning, yet suffer from critical limitations: prototypes converge to redundant features, fail to capture diverse semantic parts, and lack quantitative interpretability assessment. We propose Diversity-Aware Prototype Learning (DAPL), which enforces prototype diversity through architectural constraints rather than explicit regularization. Our approach leverages multi-head self-attention with strict one-to-one attention-to-prototype mapping, ensuring each prototype specializes in distinct visual features. We further introduce foreground-aware training to focus prototypes on semantically meaningful regions and develop comprehensive evaluation metrics (Coverage and Diversity) for quantitative interpretability assessment. Experiments on CUB-200-2011 demonstrate substantial improvements: DAPL with foreground-aware training achieves 81.69\% accuracy with 0.596 Coverage and 0.427 Diversity, providing the best overall balance across all evaluated prototype-based methods. Code is available at https://github.com/xinmiaolin/DAPL.
1 Introduction
Prototype-based networks offer case-based interpretability, but existing methods can learn redundant prototypes and activate on background regions. DAPL combines attention-to-prototype constraints, foreground-aware training, and Coverage and Diversity metrics; on CUB-200-2011, its foreground-aware variant achieves the best overall balance among evaluated methods.
1 Introduction
- Existing methods can learn redundant prototypes focused on similar discriminative features, while prototypes may also activate on background rather than meaningful object parts.ProtoPNet learns 6 of 10 prototypes on nearly identical wing patterns while missing other anatomical features.Source: §1 · p. 1
- DAPL combines multi-head self-attention with one-to-one attention-to-prototype mapping and contrastive regularization to encourage distinct prototype features.The architecture pairs each attention head with specific prototypes.Source: §1 · pp. 1–2, Figure 2 · p. 2
- Foreground-aware training penalizes prototype activations on background regions while encouraging greater weight on object-relevant features without excluding context.The foreground loss targets background activation, while contextual information may still contribute.Source: §1 · p. 1
- Coverage measures alignment with semantic object parts, while Diversity assesses whether prototypes are spatially distinct and evenly distributed across parts.The metrics use ground-truth part annotations to assess interpretability quantitatively.Source: §1 · pp. 1–2
- 81.69% accuracy, 0.596 Coverage, and 0.427 Diversity give DAPL with foreground-aware training the best overall balance across evaluated prototype-based methods.These results are on CUB-200-2011.Source: §1 · p. 2
2 Related Work
Prior prototype-based methods explore varied grounding, sharing, attention, and visualization approaches, while broader interpretability work uses several other evaluation strategies. The reviewed work identifies prototype redundancy and semantic coverage as gaps not directly assessed by existing approaches.
2 Related Work
- Prototype-based methods explore cross-class sharing, pixel-level grounding, deformable prototypes, differentiable assignment, attention, visualization, patch-based grounding, and domain-specific extensions.The passage states that these works do not explicitly address prototype redundancy or provide quantitative diversity metrics.Source: §2 · p. 2
- Attention-based interpretability includes attention flow and gradient-based ViT explainability, while prototype-based ViTs are another line of work.DAPL instead uses CNN backbones for compatibility with established baselines and maps attention one-to-one to prototypes.Source: §2 · p. 2
- Existing interpretability evaluation covers stability, consistency, purity, sparsity, prototype quality, human studies, faithfulness, deletion, perturbation, and transferable pathways.The passage identifies direct assessment of prototype redundancy and semantic coverage as missing.Source: §2 · p. 2
3 Method
DAPL pairs attention heads one-to-one with prototypes to encourage distinct visual features, adds foreground-aware training to penalize background activation, and evaluates semantic-part coverage and prototype diversity.
3.1 Diversity-Aware Prototype Learning
- Each class has one prototype per attention head, with exclusive head-to-prototype comparisons and contrastive regularization encouraging separation from unassigned prototypes.The similarity scores feed a fully connected layer to produce class logits.Source: §3.1 · pp. 2–3
3.2 Foreground-Aware Training
- Foreground-aware training penalizes excessive background activation and adds its weighted loss to the standard ProtoPNet objective.The total objective combines classification, cluster, and separation losses with contrastive and foreground losses.Source: §3.2 · p. 3
3.3 Evaluation Metrics
- Coverage measures prototype precision and part recall, while Diversity captures same-part spatial redundancy and imbalance in prototype distribution across parts.Part overlap is normalized by part size, and a prototype is assigned to a part when overlap exceeds threshold τ.Source: §3.3 · p. 3
4 Experiments
Experiments compare DAPL with prototype-based baselines on CUB-200-2011 and examine its overall performance, prototype activations, foreground guidance, and key hyperparameters.
4.1 Experimental Setup
- The experiments use CUB-200-2011 with a DenseNet-161 backbone, 2,000 prototypes, 10 attention heads, and 15 part annotations.The listed baselines are ProtoPNet, ProtoPShare, and PixPNet.Source: §4.1 · p. 3
4.2 Main Results
- In Table 1, DAPL with foreground-aware training achieves the best overall balance, scoring 81.69% accuracy, 0.596 Coverage, and 0.427 Diversity.Source: §4.2 · p. 3
- DAPL covers 10 distinct anatomical regions, unlike ProtoPNet's redundant activations on background and identical wing patterns.The comparison attributes DAPL's diversity to multi-head attention and one-to-one mapping, with contrastive regularization further promoting distinct representations.Source: §4.2 · p. 4, Figure 4 · p. 4
- Foreground training localizes activations on specific bird parts rather than diffuse background regions, explaining the Coverage improvements reported in Table 1.The comparison is between standard DAPL and foreground-trained DAPL.Source: §4.2 · p. 4, Figure 5 · p. 4
4.3 Ablation Studies
- Moderate contrastive regularization gives the best Coverage (0.600 at λc = 0.5) and accuracy (80.98%), while very low or high values are less suitable.The figure's left panel examines the contrastive loss coefficient.Source: §4.3 · p. 4, Figure 3 · p. 4
- Increasing foreground guidance improves accuracy (from 81.17% to 81.95%) and Coverage (from 0.446 to 0.596), with performance plateauing around λfg = 10.0-15.0.The middle panel varies λfg at τbg = 0.3.Source: §4.3 · p. 4, Figure 3 · p. 4
- Moderate background activation (τbg = 0.20-0.25) yields the best accuracy (82.02%) and Coverage (0.584), whereas thresholds below 0.10 hurt performance.The right panel varies τbg at λfg = 20; the passage attributes the moderate-threshold result to contextual information at object boundaries.Source: §4.3 · p. 4, Figure 3 · p. 4
5 Conclusion
DAPL combines multi-head self-attention, one-to-one prototype assignment, and foreground-aware training to address prototype redundancy. On CUB-200-2011, it achieves the best overall balance across accuracy, Coverage, and Diversity.
5 Conclusion
- 81.69% accuracy, 0.596 Coverage, and 0.427 Diversity give DAPL the best overall balance on CUB-200-2011.The conclusion attributes this result to multi-head self-attention with one-to-one prototype assignment and foreground-aware training.Source: §5 · p. 4
A.1 Multi-Head Self-Attention Details
- Each multi-head attention output captures different spatial relationships, providing natural diversity for the assigned prototypes.The attention heads are reshaped back to spatial dimensions before prototype comparison.Source: §A.1 · p. 7
A.2 Similarity Computation
- Max-pooling over spatial locations selects the most similar patch and yields one similarity score per prototype.The compared patch comes from an attention-head output and is measured against its assigned prototype.Source: §A.2 · p. 7
A.3 One-to-One Prototype Assignment Details
- Each class receives N prototypes, one per attention head, and each prototype is compared exclusively with its assigned head.This constraint is intended to prevent prototypes from converging to similar representations; the study explores D1 values of 32, 16, and 8 across backbones.Source: §A.3 · p. 7
A.4 Classification
- A class logit is a weighted sum of similarity scores from that class’s N assigned prototypes, and softmax produces the final prediction.Each head contributes through its specialized prototype.Source: §A.4 · p. 7
A.5 Contrastive Regularization Details
- One-to-one assignment alone does not guarantee distinct prototypes, so contrastive regularization raises assigned-pair similarity and lowers similarity to unassigned prototypes.A subset of negative prototypes is sampled per batch to reduce computational cost.Source: §A.5 · p. 7
B.1 Prototype-Part Assignment
Prototype-part assignment compares activation regions with semantic part masks, enabling Coverage and Diversity scores to quantify semantic alignment and prototype distribution. On FaceForensics++, DAPL shows broader facial-region coverage than ProtoPNet.
B.1 Prototype-Part Assignment
- A prototype is assigned to a semantic part when its activation overlap with that part’s mask exceeds threshold τ.Overlap uses the thresholded activation region and binary part mask, normalized by part size so small parts are not underweighted.Source: §B.1 · p. 7
- On FaceForensics++, ProtoPNet has 2 cheek and 8 background prototypes, while DAPL covers 6 facial regions and improves Coverage (F-1 Score) by 169.7%.The figure compares prototype activations for the two methods.Source: Figure 6 · p. 8
B.2 Coverage Score
- Coverage assesses whether prototypes capture meaningful semantic parts using precision and recall.The supplied passage identifies precision and recall but does not provide their formulas.Source: §B.2 · p. 8
B.3 Diversity Score
- Diversity combines spatial redundancy between prototypes assigned to the same part with imbalance in how prototypes are distributed across parts.Redundancy scores depend on prototype-part assignment quality and may be sensitive to threshold τ; high Diversity indicates spatially distinct prototypes with balanced part coverage.Source: §B.3 · p. 8
C FaceForensics++ Results
On FaceForensics++, DAPL with foreground-aware training maintains strong accuracy while improving Coverage and Diversity over ProtoPNet. DAPL with a higher attention dimension also attains the highest reported Coverage.
C FaceForensics++ Results
- 93.66% accuracy (+0.42% over ProtoPNet), +66% Coverage (0.288 →0.478), and +42% Diversity (0.312 →0.442) are reported for foreground-aware training.The evaluation uses FaceForensics++ with DenseNet161.Source: C FaceForensics++ Results · p. 8
- DAPL with D1 = 32 achieves the highest Coverage, 0.654, while ProtoPNet has 8 of 10 prototypes activating on background regions.Only 2 ProtoPNet prototypes capture facial features, both on cheeks; DAPL prototypes cover 6 distinct facial regions.Source: C FaceForensics++ Results · p. 8
D Detailed Ablation Studies
Ablations show that moderate contrastive and foreground-loss settings balance interpretability and accuracy, while minimal background tolerance can support contextual features. FaceForensics++ foreground masks are generated from facial landmarks and refined with SAM.
D Detailed Ablation Studies
- At λc = 0.5, Coverage peaks at 0.600 and accuracy reaches 80.98%; λc ≥1.0 reduces Coverage to 0.434–0.579.At λc = 0.01, Coverage is 0.523; the reported interpretation is that very low regularization gives insufficient diversity and very high values over-constrain prototypes.Source: D Detailed Ablation Studies · pp. 8–9
- With τbg = 0.3, accuracy peaks at 81.95% for λfg = 15.0, while Coverage reaches 0.596 at λfg = 10.0.The passage reports the best interpretability-accuracy balance for λfg = 10.0–15.0 and slight declines beyond λfg = 15.0.Source: D Detailed Ablation Studies · p. 9
- With λfg = 20 fixed, accuracy rises from 80.79% at τbg = 0.01 to 82.02% at τbg = 0.25, while Coverage increases from 0.552 to 0.584.The passage says allowing minimal background activation at τbg = 0.20–0.25 is beneficial and warns that τbg < 0.10 may exclude valid boundary features.Source: D Detailed Ablation Studies · p. 9
E Foreground Mask Generation
- For FaceForensics++, foreground masks are built from MediaPipe facial landmarks, then refined with SAM using the landmarks’ convex hull as a prompt.The refinement is described as producing facial contours while excluding background regions.Source: E Foreground Mask Generation · p. 9
E.1 Foreground-Aware Projection and Pruning
Foreground-aware projection restricts candidate patches by foreground overlap, and pruning removes prototypes with low average validation bias scores. The preferred attention dimension and foreground guidance vary by domain.
E.1 Foreground-Aware Projection and Pruning
- Projection considers only patches with foreground overlap above τFG = 0.5, requiring majority foreground content for both datasets.The threshold is applied during replacement of prototype vectors with nearest training patches.Source: §E.1 · p. 9
- After projection, prototypes with average validation bias scores below τbias = 0.3 are removed because they consistently activate on background regions.Source: §E.1 · p. 9
F Domain-Specific Hyperparameter Discussion
- Hyperparameters differ by domain: CUB-200-2011 uses D1 = 16 and λfg = 10.0–15.0, while FaceForensics++ uses D1 = 8 and λfg = 20.0.The passage associates these settings with balancing fine-grained features and context for birds, and avoiding background bias for facial manipulation detection.Source: F Domain-Specific Hyperparameter… · p. 9