Explainable machine learning using pretreatment complete blood count parameters and demographic characteristics for gastric cancer risk stratification: a temporal validation study
Related Experiment Videos
Yongfeng Qiao1, Qian Long2, Jin Tang1
1Department of Clinical Laboratory, Hanzhong Central Hospital, Hanzhong, Shaanxi, China.
Background:
Gastric cancer (GC) is often diagnosed at an advanced stage, while endoscopy is invasive and conventional serum tumour markers have limited sensitivity. A low-cost, widely available tool that can identify patients at higher risk and prioritise them for endoscopic evaluation could therefore strengthen early-detection pathways. The complete blood count (CBC) is routinely available and well suited to such first-contact risk stratification; however, existing CBC-based machine-learning models are often developed in cohorts that mix prevalent, postoperative, on-treatment and surveillance records, potentially confounding the haematological signal. We therefore developed and temporally validated an explainable CBC-based model to stratify the risk of newly diagnosed GC versus benign gastric disease in a rigorously verified, treatment-naïve cohort.
Methods:
In this retrospective single-centre study, 2,044 patients (477 pathologically confirmed, newly diagnosed, treatment-naïve GC and 1,567 benign gastric-disease controls) were assembled through case-by-case chart review, patient-level identity de-duplication and application of the same prespecified comorbidity-screening criteria. The baseline CBC was obtained at admission before treatment. A parsimonious model incorporated six routinely available variables: age, sex, and neutrophil, lymphocyte, monocyte and platelet counts. Eight algorithms were trained using five-fold cross-validation in the training cohort (n = 1,309) and evaluated in a temporally separated validation cohort (n = 735). Random forest was designated as the reference explainable model and interpreted using SHAP. Model behaviour in tumour-marker-negative GC and robustness in sensitivity analyses were also assessed.
Results:
Discrimination was similar across algorithms. In temporal validation, random forest achieved an AUC of 0.831 (95% CI 0.798-0.864), which was numerically similar to that of the highest-AUC model, XGBoost (AUC 0.832), with substantially overlapping 95% confidence intervals. Random forest had a low Brier score (0.133) and showed positive net benefit across the evaluated threshold-probability range. SHAP identified lymphocyte count, male sex and age as the leading predictors, with an identical feature ranking under XGBoost (Spearman ρ = 1.00). Adding derived inflammatory ratios did not improve discrimination (ΔAUC -0.010, p = 0.139). Among temporal-validation patients with triple-negative GC, defined as CEA-, CA19-9- and CA72-4-negative disease, the model classified 62.7% (95% CI 50.0-73.9) as high risk.
Conclusions:
A six-variable model combining pretreatment CBC parameters with age and sex discriminated newly diagnosed GC from benign gastric disease in a temporally separated validation cohort and showed broadly acceptable graphical calibration and a low Brier score. The model classified a substantial proportion of tumour-marker-negative GC cases as high risk, supporting further evaluation as a low-cost pre-endoscopic triage aid. External multicentre validation is required.