Brain tumor prediction from magnetic resonance images is an important problem, but it is difficult due to the complexity of brain structure and variability in tumor appearance. There have been various ML and DL-based approaches, but the limitations of current models are a lack of adaptability to new tasks and a need for extensive training on large datasets. To address these issues, a novel meta-learning approach has been proposed, enabling rapid adaptation with limited data. This paper presents a method that integrates a vision transformer with a metric-based model, and few-shot learning to enhance classification performance. The proposed method begins with preprocessing MRI images, followed by feature extraction using a vision transformer. A metric-based Siamese network enhances the model’s learning, enabling quick adaptation to unseen data and improving robustness. Furthermore, applying a few-shot learning strategy enhances performance when there is limited training data. A comparison of the model’s performance with other developed models reveals that it consistently performs better. It has also been compared with previously proposed approaches with the same datasets using evaluation metrics including accuracy, precision, specificity, recall, and F1-score. The results demonstrate the efficacy of our methodology for brain tumor classification, which has significant implications for enhancing diagnostic accuracy and patient outcomes.
Cross-domain few-shot learning (CD-FSL) remains challenging in medical imaging, where labeled data are scarce and source–target domain gaps are often large due to modality differences. In particular, existing few-shot learning methods rely on source–target domain similarity, which limits their effectiveness in cross-modality settings such as MRI-to-CT transfer. To address this problem, this paper proposes an adapter-based Vision Transformer framework for cross-domain few-shot brain tumor classification. Lightweight adapter modules are inserted into a pretrained Vision Transformer to enable parameter-efficient domain adaptation without fine-tuning the entire backbone. In addition, a Prototypical Network is employed to construct class prototypes from limited labeled samples, while a prototype-level Maximum Mean Discrepancy (MMD) loss is introduced to align feature distributions across domains. Unlike prior approaches, the proposed framework introduces a unified prototype-level alignment strategy within an episodic learning paradigm, enabling direct class-wise cross-modal alignment. This design improves generalization under large modality gaps and limited labeled data by jointly optimizing representation learning and domain adaptation. The proposed framework is evaluated on MRI-to-CT brain tumor classification as well as several heterogeneous cross-domain benchmarks, including Chest X-ray, ISIC, CropDisease, and EuroSAT. Experimental results demonstrate that the proposed method achieves competitive performance compared to existing few-shot learning baselines, showing strong robustness under significant domain shifts.