Automatic Classification of Tumor Microenvironment Tissues in Gastric Cancer Using a Stacking Ensemble
Abstract
Gastric cancer remains a major cause of cancer-related mortality, and characterization of the tumor microenvironment (TME) is essential for prognosis and therapeutic planning. However, the morphological heterogeneity of gastric tissues still poses challenges for automated classification, despite advances in deep learning (DL). This study proposes a stacking-based ensemble of DL models for multiclass classification of TME tissues in H&E-stained histopathological images using the HMU-GC-HE-30K dataset. Eight pretrained architectures were employed as base models, and their predictions were combined by an MLP meta-model capable of refining decision boundaries by learning a nonlinear combination of the base-model outputs. Data augmentation and transfer learning were adopted to mitigate dataset limitations and improve generalization. The results indicate that the tuned stacking ensemble statistically outperformed the baseline, achieving an F1-score of 81.3%, surpassing individual models and suggesting increased robustness in distinguishing complex tissue classes. Overall, the proposed method shows potential to support decision-making in digital pathology.
References
Demšar, J. (2006). Statistical comparisons of classifiers over multiple data sets. Journal of Machine learning research, 7(Jan):1–30.
Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. (2009). Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition. IEEE.
Dietterich, T. G. (2000). Ensemble methods in machine learning. In Multiple Classifier Systems, pages 1–15. Springer Berlin Heidelberg, Berlin, Heidelberg.
Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., and Houlsby, N. (2021). An image is worth 16×16 words: Transformers for image recognition at scale. In International Conference on Learning Representations (ICLR), Austria. Disponível em: [link].
Ferlay, J., Ervik, M., Lam, F., Laversanne, M., Colombet, M., Mery, L., Piñeros, M., Znaor, A., Soerjomataram, I., and Bray, F. (2024). Global cancer observatory: Cancer today. Site institucional da International Agency for Research on Cancer.
Guehria, S., Belleili, H., and Azizi, N. (2023). A survey on ensemble multi-label classifiers. In Abraham, A. et al., editors, Proceedings of the 14th International Conference on Soft Computing and Pattern Recognition (SoCPaR 2022), volume 648 of Lecture Notes in Networks and Systems, pages 100–109. Springer Nature Switzerland, Cham.
He, K., Zhang, X., Ren, S., and Sun, J. (2016). Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770–778.
Howard, A., Sandler, M., Chu, G., Chen, L.-C., Chen, B., Tan, M., Wang, W., Zhu, Y., Pang, R., Vasudevan, V., Le, Q. V., and Adam, H. (2019). Searching for mobilenetv3. arXiv preprint arXiv:1905.02244.
Huang, G., Liu, Z., van der Maaten, L., and Weinberger, K. Q. (2017). Densely connected convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4700–4708.
Iglovikov, V., Druzhinin, M., Buslaev, A., et al. (2025). Albumentations documentation. [link]. Acesso em: 12 ago. 2025.
Kablan, R., Miller, H. A., Suliman, S., and Frieboes, H. B. (2023). Evaluation of stacked ensemble model performance to predict clinical outcomes: A covid-19 study. International Journal of Medical Informatics, 175:105090.
Kather, J. N., Krisam, J., Charoentong, P., Luedde, T., Herpel, E., Weis, C.-A., and et al. (2019). Predicting survival from colorectal cancer histology slides using deep learning: A retrospective multicenter study. PLoS Medicine, 16(1):e1002730.
Lou, S., Ji, J., Li, H., and et al. (2025). A large histological images dataset of gastric cancer with tumour microenvironment annotation for ai. Scientific Data, 12:138.
Lou, S., Ji, J., Li, H., Zhang, X., Jiang, Y., Hua, M., Chen, K., Ge, K., Zhang, Q., Wang, L., Han, P., and Cao, L. (2024). Gastric cancer histopathology tissue image dataset (gchtid). Dataset.
Mandal, S., Baker, A.-M., Graham, T. A., and Bräutigam, K. (2025). The tumour histopathology “glossary” for ai developers. PLOS Computational Biology, 21(1):e1012708.
Mikhailov, I., Khvostikov, A., and Krylov, A. (2022). Methodical approaches to annotation and labeling of histological images in order to automatically detect the layers of the stomach wall and the depth of invasion of gastric cancer. Archive of Pathology = Arkhiv patologii, 84(6):67–73. In Russian.
Mohammed, M., Mwambi, H., Mboya, I. B., Elbashir, M. K., and Omolo, B. (2021). A stacking ensemble deep learning approach to cancer type classification based on tcga data. Scientific Reports, 11(1):15626.
Mumuni, A. and Mumuni, F. (2022). Data augmentation: A comprehensive survey of modern approaches. Array, 16:100258.
Naimi, A. I. and Balzer, L. B. (2018). Stacked generalization: An introduction to super learning. European Journal of Epidemiology, 33(5):459–464.
Rong, R., Sheng, H., Jin, K. W., Wu, F., Luo, D., Wen, Z., Tang, C., Yang, D. M., Jia, L., Amgad, M., Cooper, L. A. D., Xie, Y., Zhan, X., Wang, S., and Xiao, G. (2022). A deep learning approach for histology-based nuclei segmentation and tumor microenvironment characterization. bioRxiv. Preprint.
Su, X., Mao, Q., Wu, Z., et al. (2025). Large language models driven neural architecture search for universal and lightweight disease diagnosis on histopathology slide images. npj Digital Medicine, 8:682.
Taifa, I. A., Setu, D. M., Islam, T., Dey, S. K., and Rahman, T. (2024). A hybrid approach with customized machine learning classifiers and multiple feature extractors for enhancing diabetic retinopathy detection. Healthcare Analytics, 5:100346.
Tan, M. and Le, Q. V. (2019). Efficientnet: Rethinking model scaling for convolutional neural networks. In Proceedings of the 36th International Conference on Machine Learning (ICML). Disponível em: [link].
Wang, Z., Peng, H., Wan, J., and et al. (2024). Identification of histopathological classification and establishment of prognostic indicators of gastric adenocarcinoma based on deep learning algorithm. Medical Molecular Morphology, 57:286–298.
