journal article·2025-11-23Open access

Ensemble Transfer Learning for Gastric Cancer Prediction Using Electronic Health Records in a Data-Scarce Single-Hospital Setting

Hyon Hee Kim, Ji Yeon Han, Yae Bin Lim, Young Seo Lim, Seung-In Seo, Kyung Joo Lee, Woon Geon Shin

Applied Sciences· Volume 15· Issue 23

Abstract

Gastric cancer is a significant health concern in East Asia, where early risk prediction is critical for prevention. However, the scarcity of single-hospital electronic health records (EHRs) data limits the applicability and generalizability of machine learning models. To address this challenge, we propose an ensemble transfer learning framework for gastric cancer prediction using structured EHRs in a data-scarce single-hospital setting. Three base models, Support Vector Machine (SVM), Random Forest, and Deep Neural Network (DNN), were pretrained on a large-scale national dataset from the Republic of Korean National Health Insurance Service (NHIS) and fine-tuned on a smaller institutional dataset from Kangdong Sacred Heart Hospital (KSHH). These fine-tuned models were combined via stacking ensemble learning with logistic regression as a meta-learner. The proposed model achieved strong performance with precision 0.78, recall 0.92, F1-score 0.83, accuracy 0.91, and AUC 0.93. For interpretability, permutation feature importance and Shapley Additive Explanations (SHAP) were applied. Smoking status, gender, and hypertensive disorder were identified as key predictors consistent with previous studies. This study demonstrates the successful application of transfer learning to overcome data scarcity in single-hospital structured EHRs. Furthermore, our stacking ensemble strategy outperformed the individual fine-tuned models, offering a generalizable framework for gastric cancer prediction in data-scarce clinical settings.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Machine Learning in Healthcare · Artificial Intelligence in Healthcare · Phonocardiography and Auscultation Techniques

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Statistics and Information Science, Dongduk Women’s University, Seoul 02748, Republic of Korea

Department of Internal Medicine, Kangdong Sacred Heart Hospital, College of Medicine, Hallym University, Seoul 05355, Republic of Korea

Department of Medical Informatics and Statistics, Kangdong Sacred Heart Hospital, Seoul 05355, Republic of Korea

Funding

Dongduk Women's University · Ministry of Health & Welfare, Republic of Korea

References (68)

Show source-provided references
1. Global cancer statistics 2022: GLOBOCAN estimates of incidence and mortality worldwide for 36 cancers in 185 countries
2. Cancer prevention and screening: The next step in the era of precision medicine10.1038/s41698-018-0075-9 ↗
3. National cancer screening program for gastric cancer in Korea: Nationwide treatment benefit and cost10.1002/cncr.32753 ↗
4. Screening and surveillance for gastric cancer in the United States: Is it needed?10.1016/j.gie.2016.02.028 ↗
5. Benefits and harms of endoscopic screening for gastric cancer10.3748/wjg.v22.i28.6385 ↗
6. Opportunities and challenges in developing risk prediction models with electronic health records data: A systematic review10.1093/jamia/ocw042 ↗
7. Solares, J.R.A., Raimondi, F.E.D., Zhu, Y., Rahimian, F., Canoy, D., Tran, J., Gomes, A.C.P., Payberah, A.H., Zottoli, M., and Nazarzadeh, M. (2020). Deep learning for electronic health records: A comparative review of multiple deep neural architectures. J. Biomed. Inform., 101.10.1016/j.jbi.2019.103337 ↗
8. Taninaga, J., Nishiyama, Y., Fujibayashi, K., Gunji, T., Sasabe, N., Iijima, K., and Naito, T. (2019). Prediction of future gastric cancer risk using a machine learning algorithm and comprehensive medical check-up data: A case-control study. Sci. Rep., 9.10.1038/s41598-019-48769-y ↗
9. Kim, H., Lim, Y., Seo, S.-I., Lee, K., Kim, J., and Shin, W. (2021). A deep recurrent neural network-based explainable prediction model for progression from atrophic gastritis to gastric cancer. Appl. Sci., 11.10.3390/app11136194 ↗
10. Methods and dimensions of electronic health record data quality assessment: Enabling reuse for clinical research10.1136/amiajnl-2011-000681 ↗
11. Dietary patterns and gastric cancer risk: A systematic review and meta-analysis10.1093/annonc/mdt108 ↗
12. U.S. Department of Health & Human Services (2025, November 07). Summary of the HIPAA Privacy Rule, Available online: https://www.hhs.gov/hipaa/for-professionals/privacy/laws-regulations/index.html.
13. European Parliament and Council of the European Union (2016). Regulation
14. (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data, and repealing Directive 95/46/EC (General Data Protection Regulation, GDPR). Off. J. Eur. Union, L119, 1-88. Available online: https://eur-lex.europa.eu/eli/reg/2016/679/oj.
15. Ministry of Government Legislation (2025, November 07). Medical Service Act. Available online: https://elaw.klri.re.kr/eng_service/lawView.do?hseq=53532&lang=ENG.
16. A survey on explainable artificial intelligence (XAI): Towards medical XAI10.1109/TNNLS.2020.3027314 ↗
17. A survey on transfer learning10.1109/TKDE.2009.191 ↗
18. Support-vector networks10.1023/A:1022627411411 ↗
19. Random Forests10.1023/A:1010933404324 ↗
20. Deep learning10.1038/nature14539 ↗
21. All models are wrong, but many are useful: Learning a variable’s importance by studying an entire class of prediction models simultaneously
22. Lundberg, S.M., and Lee, S.-I. (2017, January 4–9). A unified approach to interpreting model predictions. Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS), Long Beach, CA, USA.
23. Kim, H.E., Cosa-Linan, A., Santhanam, N., Jannesari, M., Maros, M.E., and Ganslandt, T. (2022). Transfer learning for medical image classification: A literature review. BMC Med. Imaging, 22.10.1186/s12880-022-00793-7 ↗
24. A study in transfer learning: Leveraging data from multiple hospitals to enhance hospital-specific predictions10.1136/amiajnl-2013-002162 ↗
25. Curth, A., Thoral, P., van den Wildenberg, W., Bijlstra, P., de Bruin, D., Elbers, P., and Fornasa, M. (2020). Transferring clinical prediction models across hospitals and electronic health record systems. Machine Learning and Knowledge Discovery in Databases, Springer.10.1007/978-3-030-43823-4_48 ↗
26. Transfusion: Understanding transfer learning for medical imaging
27. Kim, Y.-G., Kim, S., Cho, C.E., Song, I.H., Lee, H.J., Ahn, S., Park, S.Y., Gong, G., and Kim, N. (2020). Effectiveness of transfer learning for enhancing tumor classification with a convolutional neural network on frozen sections. Sci. Rep., 10.10.1038/s41598-020-78129-0 ↗
28. Ebbehoj, A., Thunbo, M.Ø., Andersen, O.E., Glindtvad, M.V., and Hulman, A. (2022). Transfer learning for non-image data in clinical research: A scoping review. PLoS Digit. Health, 1.10.1371/journal.pdig.0000014 ↗
29. He, K., Zhang, X., Ren, S., and Sun, J. (2016, January 27–30). Deep residual learning for image recognition. Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA.10.1109/CVPR.2016.90 ↗
30. Predicting progression to septic shock in the emergency department using an externally generalizable machine-learning algorithm10.1016/j.annemergmed.2020.11.007 ↗
31. Desautels, T., Calvert, J., Hoffman, J., Mao, Q., Jay, M., Fletcher, G., Barton, C., Chettipally, U., Kerem, Y., and Das, R. (2017). Using transfer learning for improved mortality prediction in a data-scarce hospital setting. Biomed. Inform. Insights, 9.10.1177/1178222617712994 ↗
32. Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2018). BERT: Pre-training of deep bidirectional transformers for language understanding. arXiv.
33. Med-BERT: Pretrained contextualized embeddings on large-scale structured electronic health records for disease prediction10.1038/s41746-021-00455-y ↗
34. Li, Y., Rao, S., Solares, J.R.A., Hassaine, A., Ramakrishnan, R., Canoy, D., Zhu, Y., Rahimi, K., and Salimi-Khorshidi, G. (2020). BEHRT: Transformer for electronic health records. Sci. Rep., 10.10.1038/s41598-020-62922-y ↗
35. Shang, J., Ma, T., Xiao, C., and Sun, J. (2019). Pre-training of graph augmented transformers for medication recommendation. arXiv.10.24963/ijcai.2019/825 ↗
36. Deep learning-based multi-modal ensemble classification approach for human breast cancer prognosis10.1109/ACCESS.2023.3304242 ↗
37. Exploring hyper-parameters and feature selection for predicting non-communicable chronic disease using stacking classifier10.1109/ACCESS.2023.3299332 ↗
38. Afrash, M.R., Shafiee, M., and Kazemi-Arpanahi, H. (2023). Establishing machine learning models to predict the early risk of gastric cancer based on lifestyle factors. BMC Gastroenterol., 23.10.1186/s12876-022-02626-x ↗
39. Jiang, S., Gao, H., He, J., Shi, J., Tong, Y., and Wu, J. (2022). Machine learning: A non-invasive prediction method for gastric cancer based on a survey of lifestyle behaviors. Front. Artif. Intell., 5.10.3389/frai.2022.956385 ↗
40. AI in medicine must be explainable10.1038/s41591-021-01461-z ↗
41. Ribeiro, M.T., Singh, S., and Guestrin, C. (2016, January 13–17). “Why should I trust you?”: Explaining the predictions of any classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA.10.1145/2939672.2939778 ↗
42. Explainable artificial intelligence in skin cancer recognition: A systematic review10.1016/j.ejca.2022.02.025 ↗
43. Stenwig, E., Salvi, G., Rossi, P.S., and Skjærvold, N.K. (2022). Comparative analysis of explainable machine learning prediction models for hospital mortality. BMC Med. Res. Methodol., 22.10.1186/s12874-022-01540-w ↗
44. An interpretable machine learning prognostic system for risk stratification in oropharyngeal cancer10.1016/j.ijmedinf.2022.104896 ↗
45. A machine learning risk prediction model for gastric cancer with SHapley additive exPlanations10.4143/crt.2024.843 ↗
46. Using the electronic health record to develop a gastric cancer risk prediction model10.1016/j.gastha.2024.07.001 ↗
47. Du, H., Yang, Q., Ge, A., Zhao, C., Ma, Y., and Wang, S. (2024). Explainable machine learning models for early gastric cancer diagnosis. Sci. Rep., 14.10.1038/s41598-024-67892-z ↗
48. World Health Organization (2019). International Statistical Classification of Diseases and Related Health Problems, 10th Revision (ICD-10), World Health Organization. Available online: https://icd.who.int/browse10/2019/en.
49. Conversion of National Health Insurance Service–National Sample Cohort (NHIS-NSC) database into Observational Medical Outcomes Partnership–Common Data Model (OMOP-CDM)
50. Association between metabolic syndrome and gastric cancer risk: Results from the Health Examinees Study10.1007/s10120-023-01382-5 ↗
51. Tseng, C.H. (2021). The relationship between diabetes mellitus and gastric cancer and the potential benefits of metformin: An extensive review of the literature. Biomolecules, 11.10.3390/biom11071022 ↗
52. Xiang, Z., Li, Y., Zhu, C., Hong, T., He, X., Zhu, H., and Jiang, D. (2021). Gastrointestinal cancers and liver cirrhosis: Implications on treatments and prognosis. Front. Oncol., 11.10.3389/fonc.2021.766069 ↗
53. Impact of chronic kidney disease stage on morbidity after gastrectomy for gastric cancer10.1002/ags3.12441 ↗
54. Risk of gastric cancer in chronic obstructive pulmonary disease10.1097/CEJ.0000000000000710 ↗
55. Second primary cancers after gastric cancer, and gastric cancer as second primary cancer10.2147/CLEP.S304332 ↗
56. Goodness of fit tests for the multiple logistic regression model10.1080/03610928008827941 ↗
57. Chen, T., and Guestrin, C. (2016, January 13–17). XGBoost: A scalable tree boosting system. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA.10.1145/2939672.2939785 ↗
58. TabNet: Attentive interpretable tabular learning
59. Scikit-learn: Machine learning in Python
60. SMOTE: Synthetic minority over-sampling technique10.1613/jair.953 ↗
61. Akiba, T., Sano, S., Yanase, T., Ohta, T., and Koyama, M. (2019, January 4–8). Optuna: A next-generation hyperparameter optimization framework. Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, AK, USA.10.1145/3292500.3330701 ↗
62. Mohammed, E.A., Keyhani, M., Sanati-Nezhad, A., Hejazi, S.H., and Far, B.H. (2021). An ensemble learning approach to digital corona virus preliminary screening from cough sounds. Sci. Rep., 11.10.1038/s41598-021-95042-2 ↗
63. A deep learning-based multi-model ensemble method for cancer prediction10.1016/j.cmpb.2017.09.005 ↗
64. Explainable artificial intelligence model to predict acute critical illness from electronic health records10.1038/s41467-020-17431-x ↗
65. Gong, K., Lee, H.K., Yu, K., Xie, X., and Li, J. (2021). A prediction and interpretation framework of acute kidney injury in critical care. J. Biomed. Inform., 113.10.1016/j.jbi.2020.103653 ↗
66. Smoking and gastric cancer: Systematic review and meta-analysis of cohort studies
67. Sex hormones, hormonal interventions, and gastric cancer risk: A meta-analysis10.1158/1055-9965.EPI-11-0834 ↗
68. Hashimoto, H., Nojiri, S., Takeda, T., Urasaki, W., Nishizaki, Y., Nagahara, A., and Aoki, S. (2025). Examining association of digestive system cancer with hypertension and diabetes using network analysis in older patients. Sci. Rep., 15.10.1038/s41598-025-90734-5 ↗