Development and multi-center validation of a machine learning‑based prediction model for mortality in tumor-related sepsis Authors: Lingyu Jiang, Luming Zhang, Weisheng Chen, Yonglong Zhong, Junlin Zhang, Miao Hu, Lu Huang, Lin Han, Shulin Xiang, Bin Xiong, Haiyan Yin Published: 2026 ABSTRACT AbstractBackgroundTumor-Related Sepsis requires a novel, straightforward model for early and precise prognosis prediction due to inadequate current assessments.MethodsThis retrospective study utilized data from the MIMIC-IV 3.0 database for model development and internal validation. External validation was performed using datasets from different centers to enhance the model’s generalizability. Three machine learning techniques were employed for variable selection. After comparing multiple models, the best-performing one was selected and used to develop a clinically applicable nomogram.ResultsThis study included 3777 cases for the development of the model. Four distinct prediction models were developed by integrating various machine learning techniques and clinical characterization methods. These models incorporated 8, 14, 8, and 9 variables, respectively. During internal validation, Model 4 demonstrated acceptable discriminative performance, with AUC values of 0.771 (95% CI: 0.750–0.791) for the training set and 0.769 (95% CI: 0.738–0.799) for the test set. Compared to other models, Model 4 exhibited comparable calibration accuracy and higher clinical utility. It also yielded higher AUC values than the APACHE II, SOFA, and LODS scoring systems. In external validation, Model 4 maintained consistent performance, achieving AUC values of 0.703 (95% CI: 0.676–0.730) for the EICU-CARD database and 0.714 (95% CI: 0.633–0.796) for the Guangxi tertiary hospital dataset. A nomogram was developed to facilitate clinical interpretation and decision-making.ConclusionsDespite the retrospective design, this study developed a concise nomogram prediction model using multiple machine learning approaches and multi-database validation. The model demonstrated moderate discriminative ability in both internal and external validation, suggesting potential clinical utility that requires further prospective evaluation.Clinical trial registrationThis study was registered with the Chinese Clinical Trial Registry on April 22, 2025 (registration number ChiCTRPID270259).Supplementary InformationThe online version contains supplementary material available at 10.1186/s12879-026-14096-7.Keywords: Sepsis cancer, Machine learnings, Clinical prediction model Introduction Sepsis, classified as a critical and severe clinical condition, manifests with heightened complexity and severity in cancer patients. Their compromised immune systems render them more vulnerable to infections that can escalate into sepsis, thereby not only accelerating the progression of their underlying oncological conditions but also markedly elevating their mortality risk [1, 2]. Therefore, accurately predicting the mortality risk in cancer patients with sepsis holds immense importance for directing clinical treatment strategies, optimizing resource distribution, and enhancing patient outcomes. Yet, traditional risk assessment methodologies typically hinge on solitary physiological indices or clinical scoring systems, which exhibit considerable constraints in terms of precision and suitability when forecasting sepsis in the context of cancer. Using commonly employed clinical scoring systems as illustrations, including Sequential Organ Failure Assessment (SOFA), Modified Early Warning Score (MEWS), and Acute Physiology and Chronic Health Evaluation II (APACHE II), these tools can evaluate patients’ physiological functions and disease severity, offering significant value in the overall prognosis of sepsis patients. Nevertheless, their predictive utility varies across diverse clinical subtypes, indicating a need for further enhancement [3–5]. When cancer patients exhibit suspected infections, the Area Under the Curve (AUC) value of the SOFA score for predicting in-hospital mortality is 0.69 [6]. Additionally, KoBS et al. [7] conducted an observational study using multicenter, retrospective data from the Korean Shock Society Shock Registry between October 2016 and June 2019. Their findings revealed that the AUC of SOFA score for predicting 28-day mortality in patients with cancer-associated sepsis was only 0.672, while the AUC for APACHE II score was even lower (0.662). Machine learning has exhibited significant potential to diverse medical fields as predicting diseases, facilitating diagnoses, and assessing prognoses [8–10]. By comprehensively analyzing multidimensional information such as patients’ medical histories, physiological indicators, and genetic data, machine learning can establish precise prediction models, thereby providing doctors with more accurate and personalized medical advice [11, 12]. Although a few scholars have employed machine learning methods to predict the mortality risk of patients with sepsis with cancer [13], They have yet to consider tumor-related characteristics, including varying tumor locations, radiotherapy, chemotherapy, surgical treatments, leading to a necessity for the enhancement and refinement of the overall prediction efficiency. This study utilizes big data technology to thoroughly analyze the intrinsic features of sepsis patients with tumor by amalgamating diverse data sources, including clinical records, laboratory test and tumor-specific factors. Our objective is to develop a highly accurate prediction model through the comparison and application of various machine learning techniques. Furthermore, we will utilize multicenter clinical data for external validation to ascertain the model’s good generalization capabilities and practical utility. By executing these steps, we anticipate offering reliable predictive insights to enhance the clinical management of sepsis patients with tumors, ultimately aiming to decrease their mortality rates. Study design and methods Data sources In this study, the structured query language was utilized to extract data from the Medical Information Mart for Intensive Care IV version 3.0 (MIMIC IV 3.0), a large ICU database in the United States, and the EICU database. The MIMIC IV 3.0 database encompasses comprehensive information on approximately 250,000 patients admitted to Beth Israel Deaconess Medical Center in Boston, Massachusetts, USA, from 2008 to 2021. This database has obtained approval from the institutional review boards of the Massachusetts Institute of Technology and BIDMC. The EICU database, is a multicenter database containing admission data from over 200,000 patients in various ICUs across the United States, covering cases from 2014 to 2015. Based on the variables of the optimal model, we extracted data information on sepsis patients with an oncologic background from this database. Additionally, this study retrospectively collected clinical data from 192 sepsis patients with an oncologic background admitted to the ICU of Guangxi Zhuang Autonomous Region People’s Hospital between January 2021 and December 2023(QYY). This data collection has also been reviewed and approved by the hospital’s ethics committee. The three components of clinical data in this study are independent of each other yet provide mutual support. The inclusion criteria were as follows: [1] All sepsis patients met the diagnostic criteria of the International Consensus on the Definition of Sepsis 3.0, updated in 2016 [2]. All patients had a confirmed Comorbidity of tumor [3]. Initial ICU admission [4]. ICU stay duration > 24 h [5]. Age ≥ 18 years. Exclusion Criteria: [1] Patients with multiple ICU admissions [2]. Age < 18 years [3]. ICU stay duration < 24 h [4]. Variables with missing values exceeding 20% were excluded. Data collection The primary outcome was in-hospital death, defined as death from any cause between hospital admission and discharge, which was recorded as a binary outcome for each patient. General Information: admission time, ICU admission time, time of death, gender, age, weight, height. Disease-Related Scores: Commonly used clinical severity scores on the first day of ICU admission include: SOFA, APACHE II, APS III, Charlson Comorbidity Index (CCI), logistic organ dysfunction score (LODS), and Glasgow Coma Scale (GCS). The worst value of continuous indicators monitored on the first day of ICU admission include: heart rate (HR), respiratory rate (RR), temperature (T), systolic blood pressure (SBP), diastolic blood pressure (DBP), mean arterial pressure (MAP), and peripheral oxygen saturation (SPO₂). Laboratory test results collected on the first day after ICU admission are also included, encompassing blood routine tests, liver function, renal function, coagulation function, and blood gas analysis. Comorbidity data were also collected. Myocardial infarction, congestive heart failure, peripheral vascular disease, cerebrovascular disease, dementia, chronic lung disease, rheumatic disease, peptic ulcer disease, liver disease, diabetes, paraplegia, and renal disease were included in analysis. Prior to the sepsis diagnosis during this hospitalization, the Surgical procedures were undertaken, such as open surgical intervention, endovascular interventional surgery, biopsy, as well as undergoing chemotherapy and radiotherapy treatments. We have systematically classified the types of tumors. The classification is based on tumor type, which includes hematological tumors and solid tumors. Hematological tumors include all lymphomas and leukemias of the hematological system, as well as multiple myeloma, etc. Solid tumors are classified according to their location of occurrence, specifically as follows: craniocerebral tumors, tumors of the five senses, respiratory system tumors, urinary system tumors, gastrointestinal tumors, hepatobiliary tumors, pancreatic tumors, bone tumors, skin and soft tissue tumors, and other tumors. Sepsis identification and malignancy screening The complete SQL logic, including all ICD-9/10 code definitions for sepsis (Sepsis-3 criteria with suspected infection) and for malignancy, has been consolidated into Supplementary Script S1. This script can be executed directly on the MIMIC-IV 3.0 database to reproduce both the sepsis cohort and the initial malignancy screening. Tumor subtype classification and tumor-related treatment After obtaining the malignancy‑positive patients from Script S1, we extracted all diagnostic texts from the current hospitalization for each patient. Two independent investigators manually reviewed these texts and classified each patient into predefined tumor subtype categories (brain, ENT, respiratory, urinary, gastrointestinal, hepatobiliary, pancreatic, bone, skin/soft tissue, others) based on the recorded primary tumor site. Disagreements were resolved by consensus. The complete classification rules (including keyword examples) are documented in Supplementary Script S2. From the same set of diagnostic texts, we manually extracted treatment history using a standardized keyword list (e.g., chemotherapy, radiotherapy, immunotherapy, targeted therapy) with double‑independent review. The keyword list and annotation rules are provided in Supplementary Script S2. The establishment and evaluation methods of clinical prediction models During the process of statistical analysis, we employed a golden split ratio of 3:7 to randomly and evenly divide the entire patient cohort into a training set (70%) and a validation set (30%). Balance tests between the two groups indicated that they were comparable (Supplementary Table 1). Through LASSO regression, Random Forest analysis, and Best Subset selection, and these methodologies alongside clinical expertise, we successfully developed four unique Clinical Prediction Models (CPMs). The validation set was exclusively used for internal validation of the models to ensure their stability and predictive accuracy. The evaluation metrics for the CPMs included the Receiver Operating Characteristic Curve (ROC), Calibration Curve, and Decision Curve Analysis (DCA). Through this comprehensive model comparison, we determined the final indicator variables to be included in the CPM. To transform the optimal CPM into a tool that is easily understandable and usable in clinical practice, we adopted a visualization method, namely, the creation of a Nomogram. To further verify the performance of the CPM, the external validation data used primarily originated from cohort information from two centers which are the EICU-CARD database and Guangxi Zhuang Autonomous Region People’s Hospital. These data were utilized to comprehensively assess the generalization performance and robustness of the models in both the validation set and real-world application scenarios, thereby demonstrating the predictive accuracy and adaptability of the models when dealing with external unknown data. Statistical analysis In this study, indicators were categorized into continuous and categorical variables. Continuous variables were characterized using the median and interquartile ranges (IQR), whereas categorical variables were represented as “frequency (percentage)”. Missing value handling involved deleting variables with a missing data ratio exceeding 20% and applying median imputation for those with a ratio of 20% or below. To address outliers, we first examined the data distribution type of each indicator, presenting it in terms of quartiles, minimum value, mean ± standard deviation, and maximum value. For indicators with excessively large or small data that deviated from clinical characteristics, only data within the 1% to 99% percentile range were retained to mitigate their impact on data analysis (Supplementary Fig. 1).Categorical variables were complete with no missing data. During the research, the Shapiro-Wilk test was predominantly used to ascertain the normality of continuous variables. Preliminary analysis employed either the T-test or Mann-Whitney U test, contingent on the normality of the distribution, while categorical variables were compared using the χ² test. To screen for potential predictors, we employed three variable selection methods: LASSO regression, Random Forest analysis, and Best Subset selection. The variables identified by these methods, in combination with clinically relevant factors, were subsequently entered into multivariable logistic regression analysis to develop the final prediction models.All aforementioned statistical and machine learning methodologies were efficiently executed using the R 4.4.1 statistical software package, with statistical significance defined as p < 0.05. Sample size calculation The sample size for this study was determined based on the Events Per Variable (EPV) principle to ensure adequate statistical power and avoid over-fitting in prediction model development. A total of 31 independent variables were anticipated for analysis. Based on the actual in-hospital mortality rate of 25.4% in our cohort, and allocating 70% of the total sample to the training set, the minimum required sample size for the training set was calculated as follows. Required training set sample size = (Number of anticipated variables × 10) / Event rate = (31 × 10) / 0.254 ≈ 1,220.5 cases.After accounting for 10% potentially invalid samples, the final minimum required total sample size was calculated to be 1,938 cases. Result Patient characteristics A flowchart of the patient selection process is shown in Fig. 1. This study encompassed a cohort of 3,777 sepsis patients, with 959 (25.4%) succumbing to their condition during hospitalization. Detailed comparisons of baseline characteristics between the survived and non-survived groups are presented in Table 1.The median age of patients in non-survival group was significantly higher compared to those who survived (70.64 years vs. 68.85 years). In comparison to survivors, non-survivors exhibited a greater prevalence of chronic respiratory conditions (27.7% vs. 24.4%) and liver disease (21.8% vs. 14.9%). However, no statistically significant differences were observed in the prevalence of other comorbidities. Furthermore, patients in non-survival group experienced a longer ICU stay but a relatively shorter overall hospital stay compared to survivors (P < 0.01). The deceased group also exhibited higher incidence of AKI than the survivor group (89.5% vs. 79.5%). In terms of critical illness scoring indices, such as GCS, APACHE II, APS III, LODS, and SOFA, the deceased group scored significantly higher than the survivor group. Notably, during ICU treatment, patients in the deceased group had statistically significant higher proportions of using vasoactive medications, undergoing deep venous catheterization procedures, and requiring invasive mechanical ventilation(IMV) compared to the survivor group. Following an analysis of the tumor-related treatment records for both groups preceding their sepsis diagnosis, we uncovered a notably higher incidence of open surgical treatment among survivors compared to those who deceased (36.2% vs. 17.2%). In contrast, a relatively elevated proportion of deceased patients had undergone radiotherapy. Nevertheless, no considerable disparities were detected between the two groups in the application of other treatments, including vascular interventional procedures, puncture biopsies or chemotherapy. Flowchart for patient selection from MIMIC IV 3.0, EICU-CRD, and Guangxi hospital data Table 1Comparison of baseline profiles between non-survived and survived group patients in sepsis with tumorNon-Survived Group(n = 959)Survived Group(n = 2818) p Demographic characteristics Male, n (%)403(42.03)1116(39.60)0.200 Age(year) (median, IQR)70.64(62.16,79.92)68.85 (60.54,78.40)< 0.01Comorbidities CCI (median, IQR)9(7,11)8(6,10)<0.01 Diabetes, n (%)251(26.17)758(26.90)0.692 Paraplegia, n (%)41(4.28)118(4.19)0.981 Kidney disease, n (%)209(21.80)569(20.20)0.311 Chronic pulmonary disease,n (%)266(27.74)683(24.24)0.034 Myocardial infarction, n (%)132(13.76)329(11.68)0.099 Congestive heart failure, n (%)234(24.40)587(20.83)0.232 Peripheral vascular disease, n (%)77(8.03)204(7.24)0.463 Cerebrovascular disease, n (%)112(11.68)270(9.58)0.072 Rheumatoid diseases, n (%)37(3.86)86(3.05)0.267 Digestive tract ulcer, n (%)36(3.75)94(3.34)0.609 Liver disease, n (%)209(21.79)419(14.87)< 0.01 Dementia, n (%)22(2.29)75(2.66)0.615 AIDS, n (%)11(1.15)22(0.78)0.394Scores APACHE II (median, IQR)26(21,31)21(17,26)< 0.01 APS III (median, IQR)64(49,80)46(35,58)< 0.01 SOFA (median, IQR)7(4,10)5(3,7)< 0.01 GCS (median, IQR)15(13,15)15(13,15)0.014 LODS (median, IQR)7(5,9.5)5(3,7)< 0.01Treatment prior to sepsis Open surgery, n (%)165(17.20)1019(36.16)< 0.01 Indovascular intervention, n (%)190(19.81)478(16.96)0.051 Biopsy, n (%)68(7.09)174(6.17)0.355 Radiotherapy, n (%)20(2.09)19(0.67)< 0.01 Chemotherapy, n (%)35(3.65)80(2.84)0.249Organ Support During ICU AKI, n (%)670(69.86)2148(76.22)< 0.01 Vasoactive drugs, n (%)639(66.32)1099(39.00)< 0.01 IMV, n (%)601(62.67)1340(47.55)< 0.01 Central venous catheter, n (%)664(69.24)1474(52.31)< 0.01Length of Stay Los of ICU (median, IQR)4.11(2.19,8.14)2.94(1.84,5.21)< 0.01 Los of hospital (median, IQR)9.06(4.21,16.72)10.54(6.58,18.57)< 0.01 Comparison of baseline profiles between non-survived and survived group patients in sepsis with tumor Chronic pulmonary disease, n (%) By monitoring vital sign, the non-survived group exhibited a higher HRmax of 121 bpm compared to 111 bpm in survived group, and a higher RRmax. Conversely, their SPO2 min and BPmin readings were significantly lower. Peak body temperature did not differ significantly between the two groups. Laboratory analysis further revealed statistically significant elevations in WBC, BE, AG, BUN, Crs, blood glucose, PT, and APTT in non-survived group compared to the survived group (p < 0.01). However, non-survived group showed lower platelet count and hemoglobin levels. Notably, no statistically significant differences were observed in neutrophil and lymphocyte counts between the two groups, as detailed in Supplementary Table 2. To gain deeper insights into the mortality risk associated with various tumor types, this study undertook a comprehensive statistical analysis, focusing specifically on tumors originating from different body parts. The findings revealed that, within the cohort of patients who succumbed during hospitalization, the percentages of respiratory system tumors (39.6% vs. 26.8%), hepatobiliary tumors (39.7% vs. 28.5%), and bone tumors (17.0% vs. 11.0%) were markedly elevated compared to the survived group, with these differences being statistically significant (p < 0.01). Likewise, individuals with urinary system tumors, and reproductive system tumors displayed a notably heightened mortality rate when complicated by sepsis, as detailed in Supplementary Table 3. Feature selection Initially, we utilized the Best Subset Selection(BSS) approach to screen variables and pinpointed eight pivotal variables (Supplementary Fig. 2). Using these variables, we developed Prediction Model 1, which included HR_max, SBP_min, IMV, SPO2_min, AG_max, Pre-existing liver disease, Open surgery, and Respiratory system tumors.Secondly, we employed the LASSO machine learning algorithm for variable selection. We chose the λ value corresponding to 1 standard error (se) and identified 23 variables as shown in Supplementary Fig. 3A. Principal Component Analysis(PCA) was conducted on these 23 variables (Supplementary Fig. 3B), resulting in 14 final variables included in the prediction model to establish model 2. The final model included the following predictors: open surgery before sepsis, pre-existing liver disease, central venous catheter (CVC), maximum respiratory rate (RR_max), maximum heart rate (HR_max), minimum base excess (BE_min), acute kidney injury (AKI), radiotherapy, minimum oxygen saturation (SPO2_min), minimum mean blood pressure (MBP_min), maximum partial thromboplastin time (PTT_max), age, maximum anion gap (AG_max), and minimum systolic blood pressure (SBP_min). Additionally, we also conducted variable selection using the Random Forest machine learning method, yielding eight important variables. Based on the variables that ranked within the top 10 in terms of importance in both indices and were identical, we included a total of eight variables (Supplementary Fig. 4) in the final model 3,which consisted of HR_max, PT_max, SPO2_min, BE_min, SBP_min, AG_max, BUN_max, and PLT_min. Finally, based on the variables that consistently appeared as important predictors in Models 1–3, combined with clinical expertise, we adjusted and optimized the model by including a total of nine independent variables to construct Model 4 for predicting the prognosis of sepsis patients with an underlying malignancy. The detailed variable selection process for Model 4, including the specification of which variables were identified by data-driven algorithms and which were added based on clinical judgment.Specifically, these variables are: HR_max, SBP_min, SPO2_min, AG_max, AKI, Pre-existing liver disease, IMV, Open surgery before sepsis, and Respiratory system tumors. Full details of Model 4, including regression coefficients, intercept, odds ratios, and variable coding, are presented in Supplementary Table 4. The predicted probability of in-hospital mortality can be calculated using the logistic equation provided therein. Internal assessment and comparative analysis of the newly developed predictive models The AUCs for models 1, 2, 3, and 4 for predicting in-hospital mortality in sepsis patients all exceeded 0.700, indicating moderate to acceptable discriminatory power. Notably, model 4 achieved the highest AUC in the training set at 0.771 (95% CI: 0.750–0.791), and the test set AUC was 0.769 (95% CI: 0.738–0.799). Detailed results are shown in Fig. 2. Internal calibration plots generated using the Bootstrap method showed that the predicted probabilities of the four models agreed well with observed outcomes, with model 4 demonstrating the closest alignment to the ideal calibration curve (Fig. 3), suggesting acceptable calibration during internal validation. Comparison of ROC curves for different predictive models in the training and test sets (top left: model 1, top right: model 2, bottom left: model 3, bottom right: model 4) Comparison of calibration curves for different predictive models in the training and test sets (top left: model 1, top right: model 2, bottom left: model 3, bottom right: model 4) As illustrated in Fig. 4, across most threshold probability ranges, the four predictive models constructed in this study surpass both the ALL line (“treat all patients”) and the None line (“treat no patients”), highlighting their substantial practical significance. In the high threshold region, all models demonstrate considerable net benefit. Nevertheless, model 3’s curves in both the training and test sets align most closely with the extreme ALL and None lines, hinting at its potentially lower application value. Conversely, in the low threshold region, model 4 outperforms other models in terms of net benefit, with a stable curve progression. This underscores model 4’s capacity to offer the utmost benefit for clinical decision-making across various thresholds and its good generalization ability. Consequently, the model 4 can more adeptly strike a balance between the potential benefits and risks of treatment, facilitating more rational decision-making. The DCA curves for different predictive models in the training and test sets (top left: model 1, top right: model 2, bottom left: model 3, bottom right: model 4) Construct the nomogram of the newly CPM and external validate Construction of the nomogram for the prediction model After conducting a thorough analysis of the assessments and evaluations of the four machine learning models mentioned above, model 4 exhibited excellent discriminatory accuracy and a notable net benefit during external data validation, thereby confirming its pivotal guiding significance in clinical decision-making and demonstrating strong generalization capabilities. As a result, the indicator variables from the model 4 were selected for inclusion in the CPM. Consequently, this study incorporated a total of nine variables to develop a nomogram aimed at predicting the risk of in-hospital mortality among septic patients with an underlying tumor (Fig. 5). The Nomogram for Predicting in-Hospital Mortality Risk in Septic Patients with Tumor. The steps of the nomogram are as follows: [1] Determine the score for each variable: For each parameter in the nomogram (such as age, disease severity, etc.), locate the corresponding score point on the vertical axis based on its position in the diagram [2]. Calculate the total score: Sum the scores of all parameters to obtain a total score [3]. Assess the risk: Using the total score, find the corresponding position on the total points axis of the nomogram. Draw a horizontal line from this position, which will intersect with the risk axis at the bottom [4]. Read the risk value: The position where the horizontal line intersects the risk axis indicates the risk value for the patient’s in-hospital mortality Comparison of the CPM developed with commonly used clinical scoring systems We compared commonly used clinical scoring systems for disease severity with the prediction model and evaluated the discriminative ability of various variables in predicting the risk of in-hospital mortality. The results, as shown in Supplementary Fig. 5, indicate that the AUC values for the commonly used clinical scoring systems were 0.665 for APACHE II, 0.73 for APSIII, 0.71 for LODS, and 0.672 for SOFA. Generally, the AUC values of these scoring systems were lower than that of the prediction model developed in this study. Similarly, this suggests that the existing scoring systems do not have high discriminative ability in predicting the risk of in-hospital mortality among tumor related sepsis, which aligns with previous findings. Multicenter external validation for the CPM established in this research To validate the CPM and evaluate its generalization capability, we organized anonymized data from two centers, the EICU-CARD database and a tertiary hospital located in Guangxi Province. After applying the data inclusion and exclusion criteria, we obtained a total of 2,418 cases from the EICU cohort and 192 cases from the Guangxi cohort. Figure 6 demonstrates the model’s moderate discriminative ability, with AUCs of 0.703 (EICU) and 0.714 (Guangxi), indicating consistent risk stratification across diverse clinical settings. As shown in Fig. 7-A, DCA analysis confirmed the model’s significant clinical utility, with substantial net benefits observed in both cohorts, underscoring its potential for broad clinical application. Figure 7-B demonstrated excellent calibration, performing particularly well in the external validation cohorts, although a slightly reduced fit was noted in the Guangxi cohort. ROC Curves of the CPM Developed for the EICU Database and a cohort of Tertiary Hospital in Guangxi Province (A) The DCA curves of the CPM developed for the EICU database and the QYY data from a Tertiary Hospital in Guangxi Province. (B) The calibration curves of the CPM for the EICU database and a Tertiary Hospital in Guangxi Province Discussion Due to the heterogeneity of sepsis [14], it is difficult to assess its prognosis timely and accurately. Thus, the search for effective biomarkers to evaluate its prognosis has become a hotpot. The co-occurrence of sepsis and cancer amplifies disease heterogeneity, resulting in increased complexity in both pathological mechanisms and clinical presentations. The presence of sepsis in cancer patients not only substantially increases mortality risk compared to non-cancer patients but also represents a major indicator for ICU admission [15, 16] and an independent determinant of short-term clinical outcomes [17]. Mortality rates remain alarmingly high, with 65% occurring during hospitalization and 72% within six months, reflecting the critical nature of this condition [18]. This study systematically evaluated prognostic indicators through multiple machine learning algorithms to develop an optimized predictive model for septic cancer patients. The resulting nomogram provides clinicians with a practical tool for visualizing and quantifying prognosis probabilities, offering substantial clinical value for therapeutic decision-making. The integration of multiple machine learning methods has emerged as a crucial strategy to overcome the limitations of single-algorithm models, enabling more comprehensive pattern recognition and enhanced predictive accuracy through complementary algorithmic strengths [19–21]. Kolasseri AE et al. [22] aimed to improve predictive accuracy and identify key risk factors for cervical cancer. Through comprehensive analysis of the GEO database using Elastic Net, Support Vector Machines, RF, and Extreme Gradient Boosting, researchers identified five key genes and developed a highly accurate nomogram for acute lung injury prediction [23]. Our comparative analysis revealed that the BSS-selected eight-variable model demonstrated good clinical utility, outperforming both the RF model, which showed limited predictive performance, and the LASSO model, which required 14 variables despite comparable accuracy to the BSS approach. The BSS method demonstrated optimal performance in our study, achieving an effective balance between model simplicity and clinical utility while preventing overfitting. Recognizing the necessity of clinical relevance, we developed Model 4 by incorporating essential clinical indicators to enhance practical applicability. Model 4 demonstrated better predictive performance for sepsis-related short-term mortality in cancer patients, exhibiting enhanced discrimination, greater net benefit in DCA, and improved clinical practicality through its streamlined structure of readily available indicators, making it particularly suitable for clinical implementation. Vital signs, including HR, RR, SBP, and T, are important indicators for clinically assessing the prognosis of critically ill patients and are also considered independent risk factors for mortality in sepsis patients [24–27]. In our nomogram, the highest RR and HR, and SBPmin were identified as risk factors for in-hospital mortality in sepsis patients with cancer. An increased RR indicates increased respiratory distress and severity of hypoxia. And a decreased SBP is an important manifestation of shock, suggesting possible insufficient effective circulating blood volume. An increased HR may be a manifestation of circulatory dysfunction and an early sign of shock [28]. This study also showed that the use of IMV and respiratory injury were poor prognostic factors for sepsis patients, similar to most studies [29]. Sepsis-associated AKI indicates a worse prognosis than sepsis or AKI alone [30, 31]. In fact, among 525 critically ill cancer patients, 40% developed sepsis, and early ICU admission was associated with improved 1-year prognosis [32]. The same effect is observed in sepsis patients with an underlying malignancy. These variables all suggest, to varying degrees, that sepsis patients with an underlying malignancy are critically ill and have a poor prognosis or even a risk of death. Undoubtedly, different tumor types and tumor-related treatments will profoundly affect the prognosis of sepsis. The type of cancer itself, recent anticancer treatment, and neutropenia are no longer the primary determinants of short-term mortality in critically ill cancer patients [18]. This study incorporated the classification of tumors and cancer-related treatment modalities into the variable selection for the model. The baseline cancers ultimately included in the CPM model were lung cancer. The results showed a higher risk of in-hospital mortality and significantly poorer prognosis in lung cancer, ORs as 1.77. Hensley MK et al. [33] found through analyzing the impact of different tumor types on prognosis that secondary malignancies (37.9%, OR 2.4), lung cancer (37.1%, OR 2.2), had higher in-hospital mortality rates. Recently, a two-sample Mendelian randomization analysis revealed a significant association between genetically predicted non-small cell lung cancer and increased susceptibility to sepsis, confirming that non-small cell lung cancer can significantly increase susceptibility to sepsis at the genetic level [34]. This may suggest the need for in-depth genetic exploration of sepsis in lung cancer patients. However, other studies have shown that after the onset of septic shock, the overall short-term prognosis of sepsis patients with tumor may not be significantly related to different cancer sites [29], reminding clinicians to treat these patients as early as possible. In addition, this study showed that undergoing tumor treatment-related surgical procedures before sepsis occurring can be considered a protective factor. This phenomenon may be attributed to two key factors: [1] surgical candidates typically present with better baseline health status and earlier-stage cancers, ensuring greater treatment tolerance, and [2] tumor resection directly eliminates immune system suppression and systemic inflammatory responses caused by malignant tissues, and [3] Tumor-related complications like luminal stenosis and obstruction, particularly in pulmonary and gastrointestinal malignancies, significantly increase infection risk, and their timely surgical intervention can effectively reduce infection sources and improve sepsis outcomes. However, an assessment of risk factors for prognosis in patients admitted to the SICU after elective gastroesophageal and pancreatic surgery found that postoperative sepsis was the only major postoperative event associated with long-term mortality, with no significant impact on short-term prognosis [35]. In addition, an analysis of data from the MIMIC III by Yuan ZN et al. [36] showed that the prognosis of cancer patients admitted to hospital through emergency department was worse than that of those admitted on a scheduled basis, and the prognosis of internal medicine admissions was worse than that of surgical admissions. To accurately assess the clinical status of these patients, we devised a novel prediction model and conducted rigorous validation. Compared with existing scoring systems, the model demonstrated substantial predictive superiority, with AUCs reaching 0.77 in both training and test sets. Although the APS-III score possesses a certain capacity for predicting mortality risk, it encompasses numerous variables and does not exhibit a clear advantage over the nomogram developed in this study [37, 38]. To validate the broad applicability of the CPM, we selected data from the EICU-CARD and a tertiary hospital in China for external validation. The results indicated that the CPM exhibited strong predictive capability in clinical practice (AUCs > 0.7). This not only validates the clinical predictive worth of the new model in sepsis patients with tumors but also underscores its extensive potential in guiding clinical decisions, refining treatment strategies, and enhancing patient outcomes. Study limitations This study has several limitations. First, its retrospective design may introduce unmeasured confounders.Second, predictive indicators were collected at a single time point post-ICU admission, requiring prospective validation. Additionally, due to the limitations of the MIMIC-IV database, we were unable to distinguish between active malignancy and a history of cancer, which may influence patient prognosis. Although we collected data on tumor-related treatments (e.g., surgery, chemotherapy, radiotherapy) as surrogate markers, the absence of direct tumor activity status represents a potential confounding factor that should be addressed in future studies. Furthermore, tumor subtype classification and treatment history (chemotherapy, radiotherapy, immunotherapy) were manually extracted from diagnostic texts using keyword searches and double‑independent review. This manual process may introduce information bias because diagnostic documentation may be incomplete or inconsistent across patients, and it does not capture exact timing, dosage, or treatment completion status. Such misclassification could bias the observed associations toward the null.Third, the Chinese validation cohort’s limited sample size affected calibration curve accuracy, necessitating larger-scale studies. Fourth, the nomogram’s current applicability is restricted to septic cancer patients’ short-term mortality, warranting expansion to other comorbidities in future research. In conclusion, the nomogram model for predicting short-term mortality risk in cancer patients with sepsis exhibits excellent discrimination and calibration. Compared to traditional scoring systems, this model offers a more significant net benefit on the clinical decision curve and maintains moderate discrimination following multi-center external validation. In terms of model complexity and generalizability, our nomogram model stands out due to its inclusion of fewer, yet commonly available clinical indicators, enhancing its practicality. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 2 Supplementary Material 3