Papers
Topics
Authors
Recent
Search
2000 character limit reached

an interpretable vision transformer framework for automated brain tumor classification

Published 23 Apr 2026 in cs.CV | (2604.21311v1)

Abstract: Brain tumors represent one of the most critical neurological conditions, where early and accurate diagnosis is directly correlated with patient survival rates. Manual interpretation of Magnetic Resonance Imaging (MRI) scans is time-intensive, subject to inter-observer variability, and demands significant specialist expertise. This paper proposes a deep learning framework for automated four-class brain tumor classification distinguishing glioma, meningioma, pituitary tumor, and healthy brain tissue from a dataset of 7,023 MRI scans. The proposed system employs a Vision Transformer (ViT-B/16) pretrained on ImageNet-21k as the backbone, augmented with a clinically motivated preprocessing and training pipeline. Contrast Limited Adaptive Histogram Equalization (CLAHE) is applied to enhance local contrast and accentuate tumor boundaries invisible to standard normalization. A two-stage fine-tuning strategy is adopted: the classification head is warmed up with the backbone frozen, followed by full fine-tuning with discriminative learning rates. MixUp and CutMix augmentation is applied per batch to improve generalization. Exponential Moving Average (EMA) of weights and Test-Time Augmentation (TTA) further stabilize and boost performance. Attention Rollout visualization provides clinically interpretable heatmaps of the brain regions driving each prediction. The proposed model achieves a test accuracy of 99.29%, macro F1-score of 99.25%, and perfect recall on both healthy and meningioma classes, outperforming all CNN-based baselines

Summary

  • The paper proposes a Vision Transformer framework that achieves 99.29% test accuracy and a macro F1-score of 99.25% in brain tumor MRI classification.
  • It employs domain-specific preprocessing with CLAHE, a two-stage fine-tuning process, and strategic data augmentations to enhance performance.
  • Interpretability is ensured through the Attention Rollout method, which maps attention flows to clinically relevant brain regions for transparent diagnostics.

An Interpretable ViT-Based Framework for Automated Brain Tumor Classification

Introduction

This work presents a comprehensive deep learning framework leveraging the Vision Transformer (ViT) architecture for automated brain tumor classification in magnetic resonance imaging (MRI). In direct response to the practical challenges faced by clinicians—manual MRI interpretation, inter-observer variability, and the critical need for trustworthy, auditable AI—the study develops a model that is both highly accurate and natively interpretable. The proposed pipeline incorporates a series of methodologically rigorous enhancements tailored to the domain-specific traits of neuroimaging.

Methodological Innovations

The framework employs ViT-B/16 pretrained on ImageNet-21k, introducing a domain-specific preprocessing pipeline centered around Contrast Limited Adaptive Histogram Equalization (CLAHE), which boosts local contrast and makes subtle tumor boundaries more discernible. Two-stage fine-tuning is applied: initial warming up of the classification head while keeping the backbone frozen, followed by full model fine-tuning with discriminative learning rates, aligning with best practices to exploit transfer learning in data-constrained medical contexts.

Augmentation strategies are uniquely composed. At the pixel level, a limited suite of spatial and intensity transformations (designed to preserve neuroanatomical plausibility) is combined with batch-level sample augmentations (MixUp, CutMix), proven to be effective regularization and generalization aids in both natural and medical image domains. EMA of weights and Test-Time Augmentation (TTA) are deployed at inference for further robustness and reduction of prediction variance.

Interpretability is addressed using Attention Rollout, which, unlike CNN-specific saliency techniques, leverages the architectural transparency of transformers to generate clinically aligned heatmaps for each prediction, directly mapping attention flows to specific brain regions.

Experimental Setup and Results

The model is evaluated on a 7,023-sample multicenter MRI dataset partitioned into four clinically significant categories: glioma, meningioma, pituitary tumor, and healthy brain. The dataset’s class balance and origin diversity offer improved external validity compared to prior work.

Key quantitative results are as follows:

  • Test accuracy: 99.29%
  • Macro F1-score: 99.25%
  • Perfect recall for both healthy and meningioma classes
  • Only 5 misclassifications out of 703 test samples; notably, there are no false positives between healthy and tumor classes—a critical safety requirement in diagnostic screening

This performance surpasses all CNN and prior ViT baselines, with the closest competitor at 98.70% accuracy. The precision-recall analysis reveals that the few errors are nearly all anatomically plausible confusions between tumor classes with adjacent spatial origins, never between healthy and pathological tissue.

Interpretability and Clinical Relevance

The attention rollout visualizations validate the framework’s interpretability claims. For pathological cases, the model’s attention naturally concentrates on expected tumor locations and boundaries (e.g., infiltrative regions in glioma, peripheral extraaxial masses in meningioma). In healthy MRIs, attention is symmetrically distributed across bilateral central structures, reflecting human radiological practice.

This direct attention mapping supports model auditing by clinical users, a core requirement for regulatory acceptance in high-stakes diagnostic settings.

Implications and Future Directions

The results have both immediate and far-reaching implications:

  • Practical Impact: The model's exceptional sensitivity and specificity, paired with class-explanatory interpretability, strongly recommend its candidacy for real-world deployment as a triage or second-opinion tool in radiology workflows, especially where neuroradiology expertise is scarce.
  • Theoretical Advancement: The methodological synthesis—particularly the marriage of ViT global attention with MRI-specific preprocessing/augmentation and natively architectural explainability—sets a new direction for the design of medical imaging AI.
  • Contradictory Claims: The study’s findings dispute prior CNN-dominance in neuroimaging tasks, showing that ViT architectures, with correct domain adaptation, not only close the performance gap but outperform conventional models when evaluated in clinically realistic settings.

With regards to future research, the authors indicate plans for: cross-scanner and cross-center external validation, multi-sequence MRI integration, extension to hierarchical tumor grading, exploration of larger ViT variants, and prospective clinical trials. These are essential steps for robust, regulatory-grade deployment and further precision improvements.

Conclusion

This study demonstrates that ViT-based architectures, when equipped with medical imaging-aware preprocessing, robust training regimens, and built-in explainability, establish new reference standards in automated brain tumor MRI classification (2604.21311). The combination of high accuracy, low false negative/positive rates, and spatially coherent attention visualizations not only supports clinical integration but also informs the future of interpretable, trustworthy AI in medicine.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 1 like about this paper.