Hybrid ViT-Prototypical Reptile Learning for Few-Shot Brain Tumor MRI Classification
DOI:
https://doi.org/10.4108/eettti.13414Keywords:
Brain tumor classification, few-shot learning, meta learning, MRI, Prototypical Network, Vision TransformerAbstract
Accurate brain tumor classification from magnetic resonance imaging (MRI) is vital for clinical diagnosis, yet the scarcity of labeled data often hinders the deployment of deep learning models. To address this challenge, we propose the hybrid Vision Transformer (ViT)-Reptile framework, which integrates a partially fine-tuned ViT-B/16 for feature extraction with a Prototypical Network (ProtoNet) for metric-based classification, enhanced by the Reptile meta-learning algorithm for rapid parameter adaptation at test time. We evaluated the framework on a public brain tumor MRI dataset containing 3,264 T1-weighted images across four categories (glioma, meningioma, pituitary tumor, and healthy brain) under a 4-way K-shot episodic protocol with K ∈ {1, 3, 5}. Our model consistently outperforms baselines including ResNet-50, DenseNet-121, and a non-adaptive ViT-based ProtoNet. Specifically, at K = 5, the framework reaches 87.43 ± 0.28% accuracy with a macro F1-score of 0.8700 ± 0.0029. Performance confirms that Reptile’s test-time refinement leads to cumulative gains, especially in the challenging 1-shot setting. Visualization of the embedding space further reveals that the model produces distinct feature clusters for all four tumor categories, with separability improving as K increases. These findings suggest that combining ViT with first-order meta-learning is an effective and efficient way to handle data scarcity in medical imaging.
References
[1] S. Bhuvaji, A. Kadam, P. Bhumkar, S. Dedge, and S. Kanchan, “Brain tumor classification (MRI),” Kaggle, vol. 10, 2020.
[2] T.-N. T. Nguyen, M. Fahim, B. D. E. McNiven, Q. N. Le, and N. D. Le, “Few-shot classification of brain cancer images using meta-learning algorithms,” EAI Endorsed Transactions on Industrial Networks and Intelligent Systems, vol. 12, no. 4, pp. 1–10, Sep. 2025.
[3] J. Snell, K. Swersky, and R. S. Zemel, “Prototypical networks for few-shot learning,” in Proc. 31st Conf. Neural Inf. Process. Syst. (NeurIPS), Long Beach, CA, Dec. 2017, pp. 4080–4090.
[4] C. Matsoukas, J. F. Haslum, M. Söderberg, and K. Smith, “Is it time to replace cnns with transformers for medical images?” in Proc. IEEE/CVF Int. Conf. Comput. Vis. (ICCV) Workshops, Montreal, QC, Canada, Oct. 2021, pp. 3262–3271.
[5] A. Nichol, J. Achiam, and J. Schulman, “On first-order meta-learning algorithms,” OpenAI, Tech. Rep., 2018, technical Report, arXiv:1803.02999.
[6] C. Finn, P. Abbeel, and S. Levine, “Model-agnostic meta-learning for fast adaptation of deep networks,” in Proc. 34th International Conference on Machine Learning, vol. 70, Aug. 2017, pp. 1126–1135.
[7] M. Soltaninejad, L. Zhang, T. Lambrou, G. Yang, N. Allinson, and X. Ye, “MRI brain tumor segmentation and patient survival prediction using random forests and fully convolutional networks,” in Brainlesion: Glioma, Multiple Sclerosis, Stroke and Traumatic Brain Injuries, ser. Lecture Notes in Computer Science, vol. 10670. Springer, Cham, Feb. 2018, pp. 204–215.
[8] G. Litjens, T. Kooi, B. E. Bejnordi, A. A. A. Setio, F. Ciompi, M. Ghafoorian, J. A. W. M. van der Laak, B. van Ginneken, and C. I. Sánchez, “A survey on deep learning in medical image analysis,” Medical Image Analysis, vol. 42, pp. 60–88, Dec. 2017.
[9] H. H. Sultan, N. M. Salem, and W. Al-Atabany, “Multi- classification of brain tumor images using deep neural network,” IEEE Access, vol. 7, pp. 69 215–69 225, May 2019.
[10] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 2016, pp. 770–778.
[11] G. Huang, Z. Liu, L. van der Maaten, and K. Q. Weinberger, “Densely connected convolutional networks,” in Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jul. 2017, pp. 4700-4708.
[12] S. Deepak and P. M. Ameer, “Brain tumor classification using deep CNN features via transfer learning,” Computers in Biology and Medicine, vol. 111, p. 103345, Aug. 2019.
[13] Z. N. K. Swati, Q. Zhao, M. Kabir, F. Ali, Z. Ali, S. Ahmed, and J. Lu, “Brain tumor classification for MR images using transfer learning and fine-tuning,” Computerized Medical Imaging and Graphics, vol. 75, pp. 34–46, Jul. 2019.
[14] G. Koch, R. Zemel, and R. Salakhutdinov, “Siamese neural networks for one-shot image recognition,” in Proc. ICML Deep Learning Workshop, vol. 2, Jul. 2015.
[15] O. Vinyals, C. Blundell, T. P. Lillicrap, K. Kavukcuoglu, and D. Wierstra, “Matching networks for one shot learning,” in Proc. 30th Conf. Neural Inf. Process. Syst. (NeurIPS), Dec. 2016, pp. 3630–3638.
[16] S. Ravi and H. Larochelle, “Optimization as a model for few-shot learning,” in Proc. International Conference on Learning Representations (ICLR), Apr. 2017.
[17] B. Liao, H. Zuo, X. Chen, Y. Yu, and Y. Li, “GraphMriNet: A few-shot brain tumor MRI image classification model based on prewitt operator and graph isomorphic network,” Complex & Intelligent Systems, vol. 10, pp. 6917–6930, Jun. 2024.
[18] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly et al., “An image is worth 16x16 words: Transformers for image recognition at scale,” in International Conference on Learning Representations (ICLR), May 2021.
[19] H. Cao, Y. Wang, J. Chen, D. Jiang, X. Zhang, Q. Tian, and M. Wang, “Swin-Unet: Unet-like pure transformer for medical image segmentation,” in Proc. Computer Vision – ECCV 2022 Workshops, ser. Lecture Notes in Computer Science, vol. 13803. Springer, Cham, Feb. 2023, pp. 205–218.
[20] F. Shamshad, S. Khan, S. W. Zamir, M. H. Khan, M. Hayat, F. S. Khan, and H. Fu, “Transformers in medical imaging: A survey,” Medical Image Analysis, vol. 88, p. 102802, Aug. 2023.
[21] S. Tummala, S. Kadry, S. A. C. Bukhari, and H. T. Rauf, “Classification of brain tumor from magnetic resonance imaging using vision transformers ensembling,” Current Oncology, vol. 29, no. 10, pp. 7498–7511, Oct. 2022.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Tuyet-Nhi T. Nguyen, Tuan Thanh Nguyen, Quang Nhat Le, Nhan Dac Le

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
This is an open access article distributed under the terms of the CC BY-NC-SA 4.0, which permits copying, redistributing, remixing, transformation, and building upon the material in any medium so long as the original work is properly cited.