SAP-ViT: A Self-Attributing Patch Vision Transformer for Medical Image Classification

Wei Zhang, Wolfgang Nejdl, Ming Tang
10/26/2026
cs.AI
transformer-attention

No confident code implementation found for this paper.

Abstract

Vision Transformer (ViT) classifiers commonly rely on a global classification (CLS) token for image-level prediction, which is poorly aligned with local interpretability requirements in medical imaging. We propose SAP-ViT, a Self-Attributing Patch Vision Transformer that replaces CLS-based classification with direct aggregation of last-layer patch embeddings.

Show full abstract

This design makes class predictions decomposable into patch-level contributions as part of the forward pass. To encourage concise and readable evidence, SAP-ViT applies sparsity regularization to the patch-weight distribution. Since self-attention mixes information across patch tokens, we further introduce an input-space back-mapping mechanism to estimate which input patches contribute to influential output patch embeddings. We evaluate SAP-ViT qualitatively and quantitatively on multiple medical image classification datasets spanning different imaging modalities. The results show that SAP-ViT maintains strong classification performance while providing consistent and interpretable patch-level explanations across datasets. Ablation results further show that both sparsity regularization and the alignment component of input-space back-mapping contribute to the final explanation quality. Overall, SAP-ViT provides a favorable trade-off between predictive accuracy and interpretability for ViT-based medical image classification.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2026sapvit,
  title  = {SAP-ViT: A Self-Attributing Patch Vision Transformer for Medical Image Classification},
  author = {Wei Zhang and Wolfgang Nejdl and Ming Tang},
  year   = {2026},
  eprint = {2610.35593},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.35593v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.35593.svg)](https://codeofpaper.com/paper/2610.35593)

Discussion