Source-linked AI summary
INTR++: INterpretable TRansformer with better Accuracy, Interpretability, and Adaptability
Dipanjyoti Paul, Arpita Chowdhury, Maneet Chatterjee, Daichi Kitaguchi, Tanya Berger-Wolf, Tetsuya Sakurai, Wei-Lun Chao
TL;DR
Existing Interpretable Transformers have limited adaptability to specialized image inputs, and static prompts also constrain prompt-based classification and interpretability. INTR++ extends Prompt-CAM with a lightweight adapter that enriches prompts with domain-specific knowledge. The paper reports improved accuracy, interpretability, and adaptability across natural and specialized image domains.
Problem
Interpretable Transformers have limited adaptability to specialized inputs with image characteristics that differ from natural images, while prompt-based methods also face accuracy–interpretability trade-offs and static prompts.
Source: §1 · pp. 1–2, §2 · p. 3Method
INTR++ adds a lightweight Prompt Adapter Module that enriches prompts with domain-specific knowledge while retaining the pretrained backbone.
Source: §1 · p. 2Results
Takeaways & Limitations
Across ten datasets spanning natural and specialized domains, the paper presents INTR++ as a lightweight approach to improving accuracy, interpretability, and adaptability.
Source: §1 · p. 2AdaptFormer does not explicitly adapt prompts, limiting its effectiveness in prompt-based classification.
Source: §3.4 · p. 4
Abstract
from arXiv · showhide
Interpretable Transformers often perform well in domain specific settings but lose effectiveness beyond that. Achieving ViT-like broad applicability requires models with consistent performance across domains. Recent works on Interpretable Transformers, INTR and Prompt-CAM, were developed keeping domain adaptability in mind. Prompt-CAM leverages learnable prompts to promote adaptability. However, these prompts are fixed in nature and therefore struggle to adapt to domains with substantial variation in input image characteristics, resulting in reduced interpretability. To address this limitation, we propose INTR++, which extends Prompt-CAM by incorporating a lightweight Prompt Adapter Module (PAM). PAM enables prompts to be adaptive by enriching them with domain-specific knowledge, thereby ensuring consistent interpretability across diverse domains including those with varying image characteristics such as medical imaging, micro-scopic imaging, and remote sensing imagery. INTR++ retains the standard architecture and end-to-end learning of Interpretable Transformer based models, while adding only a small number of additional parameters compared to Prompt-CAM. We demonstrate that INTR++ delivers consistent improvements in all aspects across domains like animals, plants, medical imaging, microscopic imaging, remote sensing imagery and object-centric data.
1. Introduction
Existing Interpretable Transformers perform strongly on natural-image domains but are less adaptable to specialized inputs, whose image characteristics differ substantially. INTR++ extends Prompt-CAM with a lightweight adapter that enriches prompts with domain-specific knowledge while aiming to improve accuracy and interpretability across domains.
1. Introduction
- Interpretable Transformers show strong interpretability on natural-image domains but limited adaptability to medical and microscopic imaging with substantially different image characteristics.The paper calls these specialized image inputs.Source: §1 · p. 1
- Static class-specific prompts lack fine-grained localized information needed for accurate prediction, motivating prompts enriched with domain-specific knowledge.Here, static prompts are learned solely through the frozen backbone's attention mechanism.Source: §1 · pp. 1–2
- INTR++ targets adaptation across natural and specialized image inputs while retaining the pretrained backbone and providing meaningful interpretations alongside high classification accuracy.The framework is designed to address the accuracy–interpretability trade-off.Source: §1 · p. 2
- INTR++ adds a lightweight Prompt Adapter Module that enriches prompts with domain-specific features through cross-attention to image patches while minimally adjusting pretrained backbone representations.The adapter operates on intermediate tokens in each transformer layer.Source: §1 · p. 2
- INTR++ is evaluated on ten datasets spanning animal, plant, object-centric, medical, microscopic, and remote-sensing domains.The paper reports that the approach enhances accuracy, interpretability, and adaptability across natural and specialized images.Source: §1 · p. 2
2. Related Work
Prior interpretable approaches include post-hoc saliency methods, prototype-based models, and Interpretable Transformers. Interpretable Transformers use standard architectures and end-to-end learning, but face adaptability and accuracy–interpretability trade-offs, while other adaptation designs do not directly refine prompts for salient input characteristics.
2. Related Work
- Post-hoc saliency methods such as Grad-CAM [36] and Layer-CAM explain predictions after they are made, which the paper says can limit trustworthiness.The passage also lists Eigen-CAM [27], Attention Roll-out [18], GradCAM++ [5], Ablation-CAM, and XGradCAM.Source: §2 · p. 2
- Prototype-based methods such as ProtoPFormer [44] and TesNet generate interpretations but typically require complex architectures and multi-stage training.The paper says these requirements limit adaptability, applicability, and reproducibility.Source: §2 · p. 2
- INTR [32] and PROMPT-CAM [7] use standard architectures and end-to-end objectives, but struggle with specialized inputs and face an accuracy–interpretability trade-off.PROMPT-CAM's static prompts also limit adaptability beyond natural images.Source: §2 · pp. 2–3
- AdaptFormer [6] and LoRA [15] are not designed to refine prompt representations for salient input characteristics, while DVPT relies on the [CLS] token and limits class-specific attribute capture.Source: §2 · p. 3
3. Method
INTR++ extends Prompt-CAM with PAM, adapting class prompts to domain-specific information while keeping the pretrained backbone largely intact. Its method combines prompt-based prediction and interpretable attention maps with controlled adaptation, comparisons to other adapters, and a small parameter overhead.
3. Method
- The method builds on Prompt-CAM and integrates PAM into transformer layers while retaining the pretrained backbone and standard end-to-end architecture.The paper describes the architecture as simple to integrate into transformer layers.Source: §3 · p. 3
3.1. Vision Transformer Preliminaries
- INTR++ uses a ViT backbone that divides images into fixed-size patches, projects them into embeddings, and processes tokens through attention and MLP layers.The standard classifier uses the final [CLS] token; the attention operation uses query, key, and value vectors derived from input token embeddings.Source: §3.1 · p. 3
3.2. Overall Workings of INTR++
- INTR++ uses class-specific prompts at each layer, predicts class scores from final-layer prompt outputs with a shared learnable vector, and analyzes prompt-to-patch attention for interpretation.The shared vector introduces no class-specific bias, while final-layer attention maps highlight image regions influential to each prediction.Source: §3.2 · p. 3, §3.6 · p. 5
3.3. Prompt Adapter Module (PAM)
- PAM compresses intermediate tokens, applies prompt self-attention and prompt cross-attention to patch and [CLS] tokens, then gates and projects adapter features back for fusion.Prompt self-attention lets prompts share information when classes have overlapping features; the adapter enriches prompts while making only minimal residual adjustments to patch representations.Source: §3.3 · p. 4
3.4. Prompt Adapter vs. Others
- PAM explicitly aligns prompts with salient input characteristics, unlike AdaptFormer and LoRA’s indirect shared-token adaptation; comparisons show richer prompt representations with minimal patch-representation changes.The MLP adapter substantially disrupts backbone representations, whereas INTR++ preserves pretrained visual representations while shifting prompt representations more than LoRA and AdaptFormer.Source: §3.4 · p. 5
3.5. Importance of the gate Value
- The learnable gate starts at one to encourage rapid early adaptation, then its contribution decreases as representations become aligned.The reported gate trend is shown for the last layer on CUB and for GBCU across training epochs.Source: §3.5 · p. 5, Figure 4 · p. 5
3.6. Feature Identification and Interpretation
- For feature interpretation, INTR++ visualizes final-layer attention between class-specific prompts and image patches, selecting top heads sufficient to distinguish categories.The attention maps are superimposed on the input image to show regions influential to the prediction.Source: §3.6 · p. 5
3.7. Additional Parameters Introduced by PAM
- For CUB, PROMPT-CAM learnable parameters are ≈2% of total parameters, compared with ≈3% for INTR++.PAM’s overhead is 2(D × d) + D + d + 8d2, with d ≪ D.Source: §3.7 · p. 5
4. Experiments
INTR++ is evaluated across natural and specialized image domains, with reported gains in accuracy, interpretability, and adaptability. Experiments include comparisons with interpretable, post-hoc, and adapter-based methods.
4.3. Performance on Specialized Image Domains
- INTR++ localized relevant regions in 91% of GBCU expert-evaluated cases, versus 73% for PROMPT-CAM, 69% for Attention Rollout, and 47% for LayerCAM.Five medical experts assessed heatmaps from 10 randomly selected images across malignant and benign categories.Source: §4.3 · p. 6
- On GBCU, INTR++ consistently outperformed other methods on insertion and deletion interpretability metrics, and qualitative comparisons also favored INTR++.The Table 1 caption identifies the metrics and notes that lower deletion and higher insertion scores indicate better performance.Source: Table 1 · p. 6, §4.3 · p. 6, Figure 5 · p. 6
4.2. Overall Performance of INTR++
- INTR++ outperforms PROMPT-CAM across domains on the DINO backbone, with reported gains in accuracy and interpretability.The experiments also report consistent adaptability across diverse domains.Source: §4.2 · p. 6, Table 2 · p. 7
4.4. Performance on Natural Image Domains
- Removing the White-necked Raven’s white-neck trait changes the prediction to American Crow, and the model no longer marks the white neck as important.The paper reports similar attribute-manipulation analysis for medical tasks.Source: Figure 6 · p. 7, §4.4 · p. 7
- Across medical and microscopic imaging, INTR++ shows substantial improvements over PROMPT-CAM; on biodiversity and other tasks, interpretations are comparable or slightly clearer.The comparison also reports cases where INTR++ predicts and interprets correctly while PROMPT-CAM fails.Source: §4.4 · p. 7
- On CUB, INTR++ produces sharper, more localized interpretations with more discriminative traits than ProtoConcepts, PIPNet, and TesNet; its interpretations are clearer than PROMPT-CAM’s.The comparison uses a common DINO backbone and a single example image.Source: §4.4 · p. 7
- Across DINO, DINOv2, and BioCLIP2 backbones, INTR++ consistently identifies distinct traits for prediction.Table 3 compares accuracy on one dataset each from the animal, object, plant, and medical domains.Source: §4.4 · p. 7, Table 3 · p. 7
- INTR++ dominates its LoRA- and AdaptFormer-based variants in accuracy and interpretability, and the ablation study reports the significance of each Prompt Adapter component.The adapter comparison includes results on one dataset from each domain.Source: §4.4 · p. 8, Table 4 · p. 8, Table 5 · p. 8
5. Conclusion
INTR++ adds a lightweight Prompt Adapter to enrich prompts and jointly improve accuracy, interpretability, and adaptability. The paper concludes that it performs consistently across natural and specialized image domains.
5. Conclusion
- INTR++ introduces a lightweight Prompt Adapter that enriches prompts to jointly improve prediction accuracy, interpretability, and adaptability.The conclusion says it effectively resolves the trade-off between accuracy and interpretability.Source: §5 · p. 8
- The paper reports consistent performance on both natural and specialized image domains as evidence of INTR++’s generalizability.Source: §5 · p. 8
Supplementary
The appendix describes AdaptFormer’s bottleneck projections and contrasts its treatment of tokens with INTR++’s prompt-focused cross-attention.
A.1. Adapter Modules
- AdaptFormer processes image patches and prompt tokens equally, whereas INTR++ uses cross-attention between prompt tokens and image patches to learn domain-specific knowledge.Source: §A.1 · p. 11
- The bottleneck projection dimension is set to 64 for INTR++, AdaptFormer, and LoRA because this setting yields the best performance.Source: §A.1 · p. 11
- AdaptFormer applies a lower-dimensional projection, a nonlinear activation, and a projection back to the original dimension.Source: Figure 11 · p. 11, §A.1 · p. 11
A.2. Dataset
The experiments cover ten publicly available datasets across natural and specialized image domains. Training duration and optimizer settings vary by dataset group.
A.2. Dataset
- The dataset suite spans animal, plant, object-centric, medical, microscopic, and remote-sensing image domains.It includes CUB, Stanford Dogs, Oxford Flowers, Medicinal Leaf, Stanford Cars, FGVC Aircraft, MRI Brain Tumors, GBCU, Colon Whole Slide Imaging, and AID.Source: §A.2 · p. 11, Table 6 · p. 11, Table 7 · p. 11
A.3. Model
- Medical and microscopic datasets, along with MedLeaf, were trained for 50 epochs; the remaining datasets were trained for 120 epochs.Source: §A.3 · p. 11
- Training used SGD with momentum 0.9 and zero weight decay; learning rates and batch sizes differed between medical/microscopic data and the remaining datasets.Medical and microscopic datasets used a 0.03 learning rate and batch size 128; remaining datasets used 0.01 and batch size 16.Source: §A.3 · p. 11
B.1. Post-hoc Visual Comparison of INTR++ with Other Methods
Across natural and specialized image domains, INTR++ highlights relevant regions or discriminative traits. Comparisons report advantages over post-hoc and interpretable methods, while manipulation analyses probe the relevance of identified regions and traits.
B.1. Post-hoc Visual Comparison of INTR++ with Other Methods
- On CUB, INTR++ identifies key traits for correct predictions, whereas post-hoc methods typically highlight fewer traits and rely on global features.Figure 12 shows the top two INTR++ attention maps for correct predictions.Source: Figure 12 · p. 11, §B.1 · p. 11
B.2. Performance of INTR++ Across Domains
- Across medical, microscopic, animal, plant, and object-centric images, INTR++ highlights relevant regions or discriminative traits, as illustrated in Figure 13.The visualizations cover Brain, GBCU, Colon, CUB, Dog, MedLeaf, Flower, and Craft.Source: Figure 13 · p. 12, §B.2 · p. 12
B.4. Comparison of INTR++ and PROMPT-CAM on Natural Image Tasks
- On natural-image tasks, INTR++ and PROMPT-CAM often have comparable interpretability, but INTR++ predicts accurately in illustrated cases where PROMPT-CAM fails.Figure 15 shows INTR++ capturing key traits while PROMPT-CAM attends to redundant traits and noisy regions.Source: §B.4 · p. 12
B.3. Comparison of INTR++ with Interpretable Methods for Specialized Images
- On GBCU benign images, INTR++ identifies relevant regions while ProtoConcepts, PIPNet, TesNet, and PROMPT-CAM focus on less relevant regions.Figure 14 presents the comparison on specialized images.Source: §B.3 · p. 12, Figure 14 · p. 13
B.5. Additional Comparison between INTR++ and PROMPT-CAM
- On MedLeaf, Dog, and Craft, interpretations from INTR++ and PROMPT-CAM are comparable, but INTR++ is reported as better suited for interpretable image classification.The paper attributes this judgment to INTR++'s overall adaptability and performance.Source: §B.5 · p. 13
B.6. Attribute Manipulation
- Removing the identified cancerous region from a malignant GBCU image changes INTR++'s prediction to normal.Figure 17 shows attention shifting elsewhere after the region is removed.Source: §B.6 · p. 13
- 97.7% (INTR++) and 97.7% (PROMPT-CAM), versus 90.0% (PIP-Net), were the accuracies for detecting manipulated traits across three CUB bird classes.A trait counted as detected when the model predicted the target category corresponding to the manipulated image.Source: §B.6 · p. 13
C. Additional Analysis on Performance
This section compares classification accuracy and interpretability against existing interpretable methods, then examines performance and interpretations across backbones. The reported comparisons favor INTR++ across these analyses.
C.1. Performance Comparisons
- Table 8 compares classification accuracy across domains and reports consistent superiority for INTR++ over ProtoConcepts, PIPNet, and TesNet.The comparison uses DINO and one dataset from each domain.Source: Table 8 · p. 13, §C.1 · p. 13
C.2. Interpretability Comparisons
- Tables 9 and 10 report superior INTR++ interpretability over other interpretable methods on natural and specialized image datasets, respectively.The comparisons use insertion and deletion metrics.Source: Table 9 · p. 13, Table 10 · p. 13, §C.2 · p. 13
C.3. Interpretation of INTR++ Across Backbones
- In an illustrated failure case, INTR++ captures key traits and predicts accurately, while PROMPT-CAM attends to redundant traits and noisy regions.Figure 15 visualizes all twelve attention heads for both approaches.Source: Figure 15 · p. 14
- Across DINO, DINOv2, and BioCLIP2 backbones, INTR++ interpretation remains consistent, while accuracy gains are attributed primarily to backbones pretrained on larger datasets.Table 3 covers CUB, Car, Flower, GBCU, Colon, and AID.Source: §C.3 · p. 14
D.1. Ablation Study
The analyses examine PAM components, gating, projection size, alternative adapter designs, and statistical testing. They report benefits from the complete PAM, adaptive gating, and a 64-dimensional projection, alongside statistically significant comparisons with Prompt-CAM.
D.1. Ablation Study
- The complete PAM gives the most appropriate interpretations on GBCU and CUB, and the ablation results emphasize the importance of each component, particularly PCA.Figures 18 and 19 show examples for a malignant GBCU case and a Rose-breasted Grosbeak image.Source: Figure 18 · p. 14, §D.1 · p. 14, Figure 19 · p. 15
D.2. Role of Gate g
- Initialized at g=1 for full adapter contribution, the learned gate decreases as representations align, supporting controlled integration without overwhelming the pretrained backbone.Figure 20 plots last-layer gate values over GBCU training epochs.Source: §D.2 · pp. 14–15, Figure 20 · p. 15
D.3. Projection Dimension of the Adaptive Module
- 64 was the best projection dimension for INTR++, INTR-LoRA, and INTR-AdaptFormer, and INTR++ outperformed the other methods at every tested size.The tested dimensions were 8, 16, 32, 64, and 128 on CUB.Source: Figure 21 · p. 15, §D.3 · p. 15
D.4. Comparisons among Different Adapters
- PAM induces larger prompt-representation shifts through prompt-centric interactions while patch tokens remain similar to backbone representations; MLP disrupts pretrained representations and captures noisy, single-attribute attention.The analysis compares MLP, LoRA, AdaptFormer, and PAM; Figure 22 illustrates MLP-based adapter attributes.Source: §D.4 · p. 15, Figure 22 · p. 15
E.1. Statistical Analysis
- Ten-run CUB and GBCU comparisons of INTR++ with Prompt-CAM use paired Wilcoxon signed-rank tests, with Table 11 reporting statistical significance.The table reports mean and standard deviation over ten runs.Source: §E.1 · pp. 15–16, Table 11 · p. 16
E.2. Computational Analysis
The computational analysis compares learnable-parameter counts for interpretable methods using DINO. INTR++ and Prompt-CAM are reported as parameter-efficient, with a small overhead for INTR++ relative to its performance gains.
E.2. Computational Analysis
- INTR++ requires less than 3% of the learnable parameters of existing methods; Prompt-CAM uses slightly fewer, but its marginal parameter advantage is small relative to INTR++'s reported performance gains.Table 12 gives approximate parameter ranges across datasets using DINO as the backbone.Source: Table 12 · p. 16, §E.2 · p. 16
Related papers
This paper cites
- Attention Is All You Need2017
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale2020
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows2021
- Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization2016
- Fine-Grained Visual Classification of Aircraft2013