Introduction
Vision Transformers (ViTs) have achieved state-of-the-art performance in image classification, yet they remain notorious "black boxes." Their core mechanism, Self-Attention, allows every part of an image to interact with every other part across multiple layers. This global mixing of information makes it nearly impossible to pinpoint exactly which image patch led to a specific classification decision.
Existing solutions typically rely on post-hoc methods like Grad-CAM or Attention Rollout. However, these tools are often "unfaithful," meaning they may produce visually pleasing heatmaps that do not accurately reflect the model's internal logic. The Hindered Transformer (HiT) addresses this by being "interpretable-by-design," restricting data flow to ensure that the final classification can be mathematically decomposed into individual patch contributions.
The Hindered Transformer (HiT) Architecture
The name "Hindered Transformer" stems from the intentional restriction of communication pathways within the network to keep patch information disentangled.
As illustrated in the architectural comparison, HiT introduces several key modifications to the standard ViT block:
- Restricted Multi-Head Attention (MHA): In HiT, the classification (CLS) token acts strictly as a query, while image patches act as keys and values. This allows the CLS token to collect information from patches without allowing the patches to exchange information with each other within the MHA block.
- Decoupled MLP Blocks: In standard ViTs, the Multi-Layer Perceptron (MLP) processes all tokens. In HiT, the MLP only updates image patches, while the CLS token bypasses the MLP entirely.
- Token Pooling: To compensate for the lack of inter-patch communication, the authors utilize pooling layers in deeper stages to increase the "receptive field" of individual tokens, helping them capture more complex features.
Inherent Faithfulness through Linear Decomposition
Because the CLS token is never processed by a non-linear MLP and only receives additive updates from patches through the restricted MHA, its final state is simply the sum of contributions from every patch across every layer. This turns a complex non-linear system into a locally linear one. Consequently, the model generates saliency maps that are mathematically derived from the decision-making process itself, ensuring they are inherently faithful to the model's logic rather than being approximations.
Experimental Evaluation
The model was evaluated on six diverse datasets, including the large-scale ImageNet-1K and several fine-grained datasets such as CUB 2011 (Birds) and Oxford-IIIT Pets. These benchmarks test the model's ability to identify subtle, specific features.
Qualitatively, saliency maps generated by HiT are significantly cleaner and more focused on the actual object of interest compared to the noisy maps produced by standard ViTs using post-hoc tools. Quantitatively, HiT outperformed methods like Grad-CAM and B-cos on interpretability metrics. For example, on ImageNet, HiT achieved an Insertion-Zero (I-Z) score of 0.57, compared to 0.49 for HiT + Grad-CAM.
The Interpretability Trade-off
Transparency comes with a performance cost. By hindering the global communication that makes standard Transformers powerful, HiT loses some predictive accuracy. On ImageNet, HiT-B achieved 75.0% Top-1 accuracy. While this is lower than the black-box DeiT3-B baseline (83.6%), it remains competitive with other interpretable-by-design variants like B-cos-B (74.4%). For high-stakes fields like medical imaging or autonomous driving, this trade-off between accuracy and transparency is often necessary.
Conclusion and Future Work
HiT demonstrates that it is possible to build a Transformer-based architecture that is inherently transparent while maintaining competitive performance. By treating the CLS token as a simple accumulator of patch "votes," the authors provide a clear path for auditing model decisions. Future research will focus on narrowing the accuracy gap and improving the model's spatial reasoning capabilities, which are currently limited by the restricted inter-patch communication.
Summary updated