Gastric cancer is the fifth most common cancer type worldwide and one of the most frequently diagnosed cancers in South Korea. In this study, we propose DeepPrevention, which comprises a prediction module to predict the possibility of progression from atrophic gastritis to gastric cancer and an explanation module to identify risk factors for progression from atrophic gastritis to gastric cancer, to identify patients with atrophic gastritis who are at high risk of gastric cancer. The data set used in this study was South Korea National Health Insurance Service (NHIS) medical checkup data for atrophic gastritis patients from 2002 to 2013. Our experimental results showed that the most influential predictors of gastric cancer development were sex, smoking duration, and current smoking status. In addition, we found that the average age of gastric cancer diagnosis in a group of high-risk patients was 57, and income, BMI, regular exercise, and the number of endoscopic screenings did not show any significant difference between groups. At the individual level, we identified that there were relatively strong associations between gastric cancer and smoking duration and smoking status.
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.