Introduction
Skin cancers are the most commonly occurring cancers in humans, especially among individuals with lighter skin pigmentation [1, 2]. They are generally categorized into two major subtypes: melanoma and nonmelanoma skin cancer (NMSC) [3]. Melanoma, which originates from pigment cells of the skin, is a relatively rare, dangerous, and lethal type of skin cancer [3].
More commonly occurring NMSC includes basal cell carcinoma (BCC) and squamous cell carcinoma (SCC), accounting for > 95% of skin cancers [1, 4].
Another type of chronic disease that is rising in its incidence is type 2 diabetes mellitus (T2DM) [5]. T2DM, characterized by hyperglycemia resulting from a progressive decline in adequate insulin production, was estimated to affect 462 million individuals in 2017, accounting for 6.28% of the global population [5]. A Global Burden of Disease 2019‐based analysis projected a continued increase in the global incidence and mortality burden of T2DM through 2034 [6], which is especially concerning given recent evidence linking T2DM with an increased risk of cancer [7].
Studies have found associations between T2DM and colorectal, hepatocellular, gallbladder, breast, endometrial, and pancreatic cancers [7, 8]. However, the underlying association between T2DM and skin cancers has been less extensively studied, particularly in comparison with other cancer types, despite shared risk factors such as obesity, dietary patterns, and smoking for both T2DM and skin cancer [9]. In addition, T2DM may also adversely influence cancer progression through biological mechanisms, including hyperinsulinemia‐related activation of insulin/insulin‐like growth factor (IGF) pathways, chronic inflammation, and impaired immune function, which may synergistically worsen patient prognosis [10].
Survival analysis is a widely used method in oncology and can be applied to estimate how long NMSC patients might survive after being diagnosed [11]. Over the past decades, machine learning (ML) methods have increasingly complemented traditional Cox proportional hazards models for medical researchers in cancer prognosis due to the advent of new technologies and the availability of large‐scale cancer survival data [12]. In 2023, a study based on the Surveillance, Epidemiology, and End Results (SEER) database developed a nomogram to predict the survival of patients with a rare cutaneous SCC subtype [13].
The application of ML methods may improve the accuracy of cancer prediction outcomes, as suggested in a previous study [14]. There are many ML methods that have been applied in cancer prognosis and diagnosis with better accuracy, including artificial neural networks (ANNs), support vector machines (SVMs), decision trees (DTs), and k‐nearest neighbors (KNNs) techniques [15]. Other ML methods, such as Survival Tree and Random Survival Forest (RSF), are widely used for survival analysis, addressing challenges associated with traditional statistics by analyzing nonlinear effects in high‐dimensional data without making any assumptions about the data distribution [16, 17, 18, 19].
Moreover, ML techniques are able to perform classification, creating risk scores to predict the survival probability of patients in different categories [12]. This may support more efficient and accurate decision‐making for clinicians to improve the survival outcomes of cancer patients [20]. Thus, the aim of this study is to identify risk factors, construct different ML models, and develop a comprehensive risk score for the survival of NMSC patients with T2DM.
Methods
Data Source and Population
The Hong Kong Hospital Authority Data Collaboration Laboratory (HADCL), now transitioned to EH Plus Digital/EHP Data Collaboration Laboratory (EHPDCL), serves as a Big Data Analytics Platform that provided anonymized healthcare data for this study. The available data include demographic information, inpatient and outpatient records, cancer diagnosis records, health screening procedures, medication records, and laboratory test outcomes [21]. Different data records use the same unique pseudonymized patient identifiers to protect patient privacy and facilitate matching the records across databases.
The databases used in this study include Patient Demographic records, Diabetes Mellitus Complication Screening records, and Diagnosis Progress records, spanning from 2000 to 2020 [22]. 1325 NMSC patients with T2DM were selected in this retrospective study.
Over 90% of patients with T2DM receive treatment in public medical institutions in Hong Kong [23]. In 2009, the Hospital Authority (HA) launched the Risk Assessment and Management Programme‐Diabetes Mellitus (RAMP‐DM), which offered thorough evaluations and risk stratification for patients with T2DM and was integrated with the public primary care system soon after. RAMP‐DM records provide valuable data for the current study with comprehensive information on diabetes complications, disease control, medications, and lifestyle factors [24].
Through synthesizing the Patient Demographic Record, Diabetes Mellitus Complication Screening Record, and Diagnosis Progress Records from HADCL, we identified the target patients with both NMSC and T2DM. NMSC cases were identified under the code C44, following the International Classification of Diseases for Oncology, 3rd edition, and the International Statistical Classification of Diseases and Related Health Problems, 10th revision (ICD‐10) [25, 26]. T2DM was confirmed using the ICD‐10 code E11 or the third edition of the International Classification of Primary Care (ICPC‐3) code TD72.
In the Diagnosis Progress dataset, patients were included in the analysis population only if the NMSC diagnosis was classified as the “principal diagnosis” to ensure consistency of index cancer attribution. Exclusion criteria comprised patients with type 1 diabetes, gestational diabetes, or other cancer diagnoses. The index date was established as the date of NMSC diagnosis, and patients were monitored until either death or the end of the study period (December 2020), whichever came first.
The outcome of the study was defined as mortality, indicating the occurrence of death from any cause during the study period (2000–2020). Mortality data were collected via HADCL, derived from the Hong Kong death registry, which encompasses all deaths reported both within and outside public hospitals. From the HADCL database, we initially identified 58,033 cancer patients with diabetes.
Excluding 672 patients without T2DM and 56,036 patients without NMSC as their principal diagnosis resulted in a final sample of 1325 NMSC patients with T2DM.
Variables and Statistical Analysis
Demographic variables like age, sex, and status were retrieved from patient demographic records, while clinical and health behavior variables were collected from Diabetes Mellitus Complication Screening records. Variables related to NMSC and T2DM were kept for further analysis. In case of multiple records, the one closest to the time of NMSC diagnosis (baseline measurement) was selected from Diabetes Mellitus Complication Screening records, providing patient characteristics at cohort entry.
We used the KNN approach to impute the missing values for the selected variables. Any variables with over 10% incompleteness were excluded from the final analysis [27]. The summary of missing data was presented in Table S1.
Continuous variables were classified into different groups to visualize the variable effects in the survival curve and calculate the risk score in risk score models. The patients were divided into three age groups (≤ 50, 51–74, and ≥ 75 years). The cut‐offs were defined as follows: for body mass index (BMI), normal as < 24 kg/m2 and abnormal as ≥ 24 kg/m2; for glycated hemoglobin (HbA1c), controlled as < 7% and elevated as ≥ 7%; for fasting glucose, controlled as < 7 mmol/L and elevated as ≥ 7 mmol/L; for low‐density lipoprotein cholesterol (LDL‐C), desirable as < 3.4 mmol/L and undesirable as ≥ 3.4 mmol/L; for high‐density lipoprotein cholesterol (HDL‐C), desirable as > 1 mmol/L and undesirable as <= 1 mmol/L; for triglyceride, desirable as < 1.7 mmol/L and undesirable as ≥ 1.7 mmol/L; and for total cholesterol, desirable as < 6.2 mmol/L and undesirable as ≥ 6.2 mmol/L.
In this study, central obesity was defined as a waist circumference ≥ 90 cm for males and ≥ 80 cm for females.
Models
To ensure reproducible and unbiased analysis, the target cohort was randomly split into 70% for training and 30% for testing using Python's “sample()” function with a fixed random seed [28], without stratification. All analyses were executed in Python 3.8.18 and R 4.3.3. Patient characteristics, laboratory tests, and treatment characteristics for the cohort of patients with a history of NMSC and T2DM were described.
The distributions of patient characteristics in the training and test sets were compared, with t‐tests for continuous variables and chi‐squared tests for categorical variables used to assess whether the randomization produced a balanced allocation.
SHapley Additive exPlanations (SHAP) interpretation and survival modeling were performed with Python packages such as “shap,” “sksurv,” “lifelines,” “pycox,” and “scikit‐learn.” The risk score system and time‐dependent predictive accuracy were derived using R packages including “AutoScore,” “TimeROC,” and “survival.” The test set was held out from model training, thereby ensuring evaluative independence. This approach strengthens the validity of the findings and provides a clear framework for replication.
Univariable and multivariable Cox regression analyses were performed to evaluate the impact of various variables on the survival time of individuals after being diagnosed with NMSC (long‐term survival). To visually illustrate the effects of these variables on survival, the Kaplan–Meier (KM) method was utilized, providing a graphical representation of survival probabilities over time.
In this analysis, four distinct algorithms were employed to develop risk prediction models. The dataset was split into a training set (70%) and a test set (30%) to develop and validate the model. Cox proportional hazards (CoxPH) regression is a semi‐parametric model designed to evaluate the influence of covariates on the hazard function across different time periods.
This model is instrumental in elucidating the relationship between risk factors and the timing of events, enabling researchers to identify critical predictors of outcomes. The least absolute shrinkage and selection operator‐Cox model (LASSO‐Cox) enhances this approach by integrating a LASSO penalty. This data‐driven LASSO method selects significant variables while reducing overfitting.
By focusing on the most impactful predictors, this approach effectively mitigates the risk of overfitting, which can compromise model validity. Additionally, survival trees serve as foundational models that generate decision rules from input features, typically illustrated as branching structures. This methodology provides a clear and intuitive visualization of how various factors influence outcomes, making it easier for clinicians to interpret the results and apply them in practice.
Lastly, RSF models are constructed from ensembles of decision trees, utilizing bootstrapped training data and random subsets of input variables. This technique enhances predictive accuracy and robustness by aggregating the predictions from multiple trees, thus providing a more comprehensive understanding of survival outcomes across different patient profiles. The integration of these methodologies allows for a thorough examination of the relationships between variables and long‐term survival, ultimately contributing to more informed clinical decision‐making and risk assessment strategies.
Training and Benchmarking
Hyper‐parameter optimization was performed using grid search for the four machine learning models: CoxPH, LASSO‐Cox, survival trees, and RSF. The performance of each model was evaluated using the concordance index (C‐index) and the time‐dependent mean area under the curve (AUC), with values ranging from 0.5 (indicating random chance) to 1.0 (indicating a perfect fit). To ensure robust benchmarking, a 2‐fold cross‐validation was repeated five times for consistency.
This approach helps to validate the models by providing insights into their generalization capabilities. To address the issue of missing data, KNN imputation was applied exclusively to the training set of each fold to prevent data leakage and ensure the independence of the validation process. This comprehensive evaluation framework facilitates a balanced comparison of the strengths and limitations of the various modeling techniques.
Additionally, SHAP values were computed to quantify the contribution of each variable to the predictions made by the four models, offering deeper insights into the factors influencing the outcomes.
AutoScore
AutoScore is an advanced machine learning framework developed to streamline the creation of interpretable clinical scoring models, particularly for point‐based systems. To construct time‐to‐event scoring models using right‐censored survival data, an updated version named AutoScore‐Survival was designed and applied. By integrating machine learning techniques with Cox regression modeling, this framework produces efficient time‐to‐event score models for predefined outcomes.
To facilitate the analysis, the survival data were split into a training set comprising 70% of the data and a test set consisting of 30%. The training set was instrumental in ranking variables, selecting significant predictors, and generating scores, while the independent testing set was employed to evaluate the performance of the risk score models. RSF analysis was utilized to rank variables based on nonlinear and heterogeneous effects on survival outcomes, with variable selection guided by a parsimony plot and ranking results to achieve a balance between accuracy and model complexity.
Continuous variables were categorized using predefined thresholds, which allowed for the modeling of nonlinear relationships. Multivariable Cox regression was applied to determine scoring weights, with scores derived from the estimated β coefficients and the category with the smallest coefficient used as a reference. The overall risk score for each individual was calculated by summing the individual scores of the selected variables.
The final score ranges from 0 to 100, where a higher score reflects a higher risk of mortality. AutoScore‐Survival also offers the flexibility for users to customize cut‐off points for predictor variable categories in line with clinical standards, ensuring that the risk models meet professional norms for practical application.
The predictive performance of the risk score model was assessed using receiver operating characteristic (ROC) analysis on the test set. The area under the ROC curve (AUC) was calculated to evaluate overall model performance, along with time‐dependent AUC(t) for specific time points. Additionally, AutoScore‐Survival provided integrated AUC (iAUC) and Harrell's C‐index for a thorough evaluation of predictive capability.
Risk score thresholds were applied to stratify subjects into distinct risk groups, and KM survival curves were generated to display survival probabilities at critical time points (1, 3, and 5 years) for these groups. This comprehensive approach enhances the interpretation of risk scores in the context of survival outcomes.
Ethics
Ethical approval was obtained from the Survey and Behavioral Research Ethics Committee, The Chinese University of Hong Kong (No. SBRE‐22‐0303) and the Joint Chinese University of Hong Kong (CUHK) and New Territories East Cluster (NTEC) Clinical Research Ethics Committee (CREC) (NTEC‐2024‐446). A waiver of informed consent was provided by the committee, given the retrospective nature of this analysis and the use of data that did not contain personally identifiable information.
Results
Characteristics of the Cohorts
In this study, 1325 NMSC patients with T2DM were followed up. Figure 1 presents the framework of data derivation and analysis. Table 1 presents the baseline characteristics of the cohort.
There were 684 (51.62%) female patients. A total of 357 (26.94%) patients died, and the mean (standard deviation (SD)) survival time for the overall cohort was 80.33 (63.15) months.
The mean (SD) age at cancer diagnosis of the cohort was 73.19 (10.86) years. The mean (SD) duration of T2DM was 4.67 (4.50) years. A total of 468 participants (35.32%) had a family history of T2DM.
Meanwhile, 84.60% (1121) of the patients had hypertension. They were predominantly overweight, with a mean (SD) BMI of 25.33 (3.92) kg/m2. A total of 390 (29.43%) subjects had a positive smoking history.
In laboratory tests, the mean (SD) HbA1c level was 7.16 (2.25) %, which was much higher than the normal value threshold (< 5.7%) [29]. The mean fasting blood glucose (7.24 mmol/L) was also higher than the normal value (< 5.6 mmol/L) [30]. Only 133 (10.04%) patients received insulin treatment.
KM Analysis
Stratified survival functions as estimated by the KM estimator are shown in Figures 2 and 3. There were statistically significant differences in survival between patients stratified by age at cancer diagnosis, family history of T2DM, smoking, BMI, coronary heart disease (CHD), stroke, total cholesterol, LDL‐C levels, insulin treatment, antihypertensive medication use, and anti‐lipid medication use. Table 2 shows the median survival time of patients stratified by the significant variables.
Univariable and Multivariable Cox Regression Results
Table 3 shows the univariable and multivariable Cox regression among the subjects. In univariable Cox regression, 10 significant predictors were identified as being positively associated with the risk of death. These variables included age at cancer diagnosis (hazard ratio (HR) = 1.12, 95% confidence interval (CI) [1.10, 1.13], p < 0.001), duration of T2DM (HR = 1.14, 95% CI [1.12, 1.16], p < 0.001), smoking (HR = 1.41, 95% CI [1.14, 1.75], p = 0.002), CHD (HR = 1.52, 95% CI [1.13, 2.05], p = 0.005), stroke (HR = 1.60, 95% CI [1.21, 2.12], p < 0.001), total cholesterol (HR = 1.21, 95% CI [1.09, 1.33], p < 0.001), LDL‐C (HR = 1.31, 95% CI [1.16, 1.47], p < 0.001), creatinine (HR = 1.00, 95% CI [1.00, 1.00], p < 0.001), insulin treatment (HR = 1.95, 95% CI [1.46, 2.60], p < 0.001), and antihypertensive medication use (HR = 1.85, 95% CI [1.27, 2.69], p = 0.001).
In contrast, 3 significant variables were found to be associated with lower mortality risk, including family history of T2DM (HR = 0.78, 95% CI [0.62, 0.97], p = 0.027), BMI (HR = 0.96, 95% CI [0.93, 0.98], p = 0.002), and anti‐lipid medication use (HR = 0.59, 95% CI [0.48, 0.72], p < 0.001).
In multivariable Cox regression, 6 significant predictors were found to be associated with higher mortality, including the age at cancer diagnosis (HR = 1.11, 95% CI [1.09, 1.12], p < 0.001), male sex (HR = 1.42, 95% CI [1.08, 1.86], p = 0.013), duration of T2DM (HR = 1.09, 95% CI [1.06, 1.12], p < 0.001), creatinine (HR = 1.00, 95% CI [1.00, 1.00], p < 0.001), smoking (HR = 1.44, 95% CI [1.09, 1.90], p = 0.009), and HbA1c (HR = 1.05, 95% CI [1.01, 1.10], p = 0.019). In contrast, only fasting glucose (HR = 0.93, 95% CI [0.88, 0.98], p = 0.012) was negatively associated with mortality risk.
A sensitivity analysis was further conducted using multiple imputation with the inclusion of additional clinical variables, including peripheral artery disease (PAD) and chronic kidney disease (CKD). The results were presented in Table S2. The sensitivity analysis after multiple imputation showed broadly similar associations for age at cancer diagnosis, duration of T2DM, creatinine, smoking, HbA1c, and fasting glucose; however, the association for sex was attenuated and no longer statistically significant, and insulin treatment became statistically significant.
In addition, PAD and CKD were not identified as significant predictors in the multivariable model.
Model Performance and Variable Importance
The RSF model showed both the highest mean AUC (0.887) in the time‐dependent AUC curve (Figure 4) and the best C‐index (0.86 in the training set, 0.80 in the test set) (Table 4). As the RSF model had the highest performance, the SHAP summary plot of RSF was used to explain the feature importance. As Figure 5 shows, the five most important SHAP features of the best model were age at cancer diagnosis (31.29), duration of T2DM (19.92), creatinine (12.91), LDL‐C (6.46), and anti‐lipid medication use (4.37), respectively.
Risk Scores Developed by AutoScore
In the parsimony plot (Figure 6), there is no significant change in AUC after including 6 variables in the prediction model. Considering the complexity, the 6 most important variables (age at cancer diagnosis, duration of T2DM, creatinine, insulin treatment, stroke, and HbA1c) were selected to develop a risk score model, and the total risk scores ranged from 0 to 100.
The first model used the predefined quantiles (0, 0.05, 0.2, 0.8, 0.95, 1) to transform continuous variables into categorical variables. The second model used the manually selected cut‐off values.
In the predefined model, the cut‐offs and their corresponding time‐to‐event scores for age at cancer diagnosis were < 54 (0), 54–63 (1), 64–82 (18), 83–88 (38) and ≥ 89 years (46); for duration of T2DM were < 0.26 (0), [0.26,8.5) (19), [8.5,13.3) (25) and ≥ 13.3 years (25); for creatinine were < 54 (2), [54,66) (0), [66,112) (1), [112,172) (7) and ≥ 172 μmol/L (16); for insulin treatment were No (1) and Yes (0); for stroke were No (0) and Yes (7); and for HbA1c were < 5.8% (0), [5.8,6.2)% (4), [6.2,7.7)% (3), [7.7,9.6)% (5), and ≥ 9.6% (3) (Table 5). In the tuned model, the cut‐offs and their corresponding time‐to‐event scores for age at cancer diagnosis were < 50 (6), 50–59 (0), 60–69 (15), and ≥ 70 years (45); for duration of T2DM were < 1 year (0), [1,5) years (17) and ≥ 5 years (26); for creatinine were < 54 (4), [54,66) (0), [66,112) (2), [112,172) (11) and ≥ 172 μmol/L (15); for insulin treatment were No (2) and Yes (0); for stroke were No (0) and Yes (6); and for HbA1c were < 7% (0), and ≥ 7% (6) (Table 5). HbA1c was dichotomized in the tuned model based on a clinically relevant threshold of 7%.
The scoring system presented in Table 5 may be directly used as a lookup table, where the total risk score was calculated by summing the assigned scores for each predictor category. Table 6 presents the 1‐, 3‐, and 5‐year AUC(t) and C‐index of the two models in the training and test sets to evaluate the model performance. The C‐index of the predefined model in the test set was 0.740 (0.686, 0.784), and the C‐index of the tuned model in the test set was 0.712 (0.664, 0.757).
Although a statistically significant difference in mortality proportion was observed between the training and test sets (25.24% vs. 30.90%, p = 0.038), the absolute difference was modest. The test set was used as an independent validation cohort, and model performance remained consistent across datasets, as demonstrated by similar C‐index and time‐dependent AUC values.
Figure 7 and Table 7 present the KM curves and the survival probabilities at 1, 3, and 5 years of stratified risk groups under different models. For the predefined model, the patients with a risk score value < 45 were identified as the low‐risk group, while those with a risk score value ≥ 45 were classified into the high‐risk group. The predicted 5‐year survival probability of the low‐risk group is 90.6%, compared with 69.5% in the high‐risk group.
For the tuned model, scores < 65 defined the low‐risk group and scores ≥ 65 defined the high‐risk group. The predicted 5‐year survival probability was 90.5% in the low‐risk group compared with 73.6% in the high‐risk group.
Discussion
Summary of Major Findings
We found that an older age at cancer diagnosis, male sex, smoking, longer duration of T2DM, higher creatinine and HbA1c, and lower fasting glucose are associated with poorer overall survival in patients with T2DM. The RSF model showed better predictive performance among the evaluated models for long‐term survival prediction. Variable importance analysis indicated that age at cancer diagnosis, duration of T2DM, creatinine levels, LDL‐C, and anti‐lipid medication use were among the most influential predictors of survival outcomes in patients with both T2DM and NMSC.
Our tuned risk scoring system categorized 49.50% of patients into the group with risk scores ≥ 65, showing 1‐, 3‐, and 5‐ year survival probabilities of 95.3%, 83.1%, and 73.6%, respectively, with a C‐index of 0.712 in the test set.
Evidence From Previous Literature
Some findings of this study are consistent with previous studies. A prospective cohort study of patients with NMSC reported that NMSC predominantly affects older patients, and that patients with limited life expectancy—defined by age ≥ 85 years or substantial comorbidity—had high 5‐year mortality, although deaths were not attributable to NMSC [31]. Similarly, older age at NMSC diagnosis in our study cohort was associated with poorer survival, highlighting the need for closer clinical follow‐up of older patients with NMSC and T2DM.
Furthermore, there appears to be a sex disparity in the survival of a wide range of cancers. This sex disparity also appears relevant to NMSC. A multicenter population‐based study of cutaneous squamous cell carcinoma, one of the major subtypes of NMSC, reported that the 5‐year relative survival was slightly higher in women than in men [32].
Consistently, male patients in our study had 42% higher risk of all‐cause mortality compared to female patients. Duration of T2DM was also associated with the survival of NMSC patients. According to an Australian study that assessed the impact of age at T2DM diagnosis and T2DM duration on mortality, a 10‐year earlier diagnosis or 10 years' longer duration of T2DM was associated with 1.2–1.3 times higher risk of all‐cause mortality [33].
Another study reported an inverse relationship between age of diabetes onset and standardized mortality ratios [34]. However, the effect of duration of T2DM on cancer survival is less conclusive. A retrospective study assessing the influence of T2DM duration on colorectal cancer outcomes reported that patients with a T2DM duration of ≤ 5 years had the best survival during the first 3 years after colorectal cancer diagnosis.
However, survival became comparable across diabetes‐duration groups thereafter [35]. In contrast, the Australian study found that longer duration of T2DM was associated with lower cancer‐related mortality compared with shorter duration [33]. In regard to NMSC, although there is no previous study directly suggesting an association between longer duration of T2DM and poorer NMSC survival, the relationship is plausible, considering the progressive nature of T2DM and increasing evidence that longer duration of T2DM is associated with a higher burden of multimorbidity and related comorbid conditions [36].
The prognostic value of serum creatinine levels in patients with different types of cancer is becoming increasingly evident. Higher serum levels of creatinine are found to be associated with poorer survival of epithelial ovarian cancer, non‐metastatic rectal cancer, vulvar cancer, and colorectal cancer [37, 38, 39, 40]. Interestingly, our study revealed that higher serum creatinine levels were also associated with poorer survival of NMSC patients with T2DM.
On one hand, it could be attributed to the fact that elevated serum creatinine levels are associated with impaired kidney function [41]. On the other hand, studies suggested that the altered levels of creatinine may reflect disturbances in creatine–creatinine metabolism, as it is a waste product of creatine metabolism, an important energy source for cancer cells [42, 43]. HbA1c is known as an important long‐term glycemic indicator that represents the glycemic control ability of patients within 3 months [44].
The increase in HbA1c levels is believed to be associated with increased risk of long‐term diabetes complications [44], while our study also identified its prognostic value in NMSC patients with T2DM. The elevated HbA1c levels were associated with the survival of different types of cancers, such as advanced pancreatic cancer, early‐stage breast cancer, and gastrointestinal cancer [45, 46, 47]. According to a systematic review of 19 studies, the increase in HbA1c levels is associated with increased incidence and mortality risk across multiple cancer types [48].
Fasting glucose was inversely associated with the hazard of all‐cause mortality. Similar paradoxical findings have been reported in other cancer populations, although the direction of association remains inconsistent across studies. A study conducted in 2016 found that fasting glucose level is related to poorer survival of postoperative patients with esophageal cancer [49].
Another study reported that low levels of fasting glucose can be used as an important predictor of death in patients with non‐small‐cell lung cancer [50]. It was also found that stage I‐III colorectal cancer patients with high levels of postoperative fasting glucose had a significantly better disease‐free survival than those with low levels [51]. However, a study reported no significant association between fasting plasma glucose levels and survival outcomes in patients with advanced colorectal cancer [52], whereas another found that higher preoperative fasting glucose levels were associated with poorer survival among patients with esophageal SCC [49].
The inverse association between fasting glucose and mortality should be interpreted with caution. This finding does not imply a protective effect of higher glucose levels but may reflect reverse causation or underlying frailty, as lower glucose levels can be observed in patients with advanced disease or poor nutritional status [53]. In our model, smoking was a poor prognostic factor in NMSC patients.
However, there is limited research exploring the impact of smoking on NMSC survival. Most research has focused on the impact of smoking on the risk of NMSC incidence, suggesting that current smoking and heavy smoking would increase the risk of SCC of the skin [54]. On the other hand, a recent study found that the risk of death from melanoma increased 81% in persistent smokers and 75% in former smokers compared with never smokers [55].
Although smoking behavior is believed to be connected to poorer prognostic factors in melanoma, such as sentinel lymph node metastasis, increased Breslow thickness, and ulceration of the microscopic tumor [56], there is a lack of evidence supporting its impact on the prognosis of NMSC.
Some previous studies have developed several risk models of skin cancer [57, 58]. One of the studies created a risk model with an AUC score of 0.97 (95% CI 0.96–0.99), showing the relationship between the risk of skin cancer development and risk factors including age, sunburns, exposure to sun, use of sunscreen, exposure to radiological materials, drug administration, and family history of skin cancer [57]. Another study developed a primary disease risk score using 32 identified genetic and non‐genetic risk factors for the risk of three major types of skin cancers, achieving the best AUC score of 0.80 for predicting SCC [58].
In addition, there are some skin cancer risk scores developed based entirely on genetic information [59, 60]. However, few studies have reported risk scores for predicting the survival of NMSC patients with T2DM.
Strengths and Limitations
One key strength of this research lies in the use of a large and diverse sample, retrieved from the HADCL. HADCL provides health data covering over 80% of patients from all public hospitals and clinics in Hong Kong, enhancing the robustness and generalizability of our findings. Another notable advantage is our focus on long‐term survival outcomes for cancer patients, rather than simple binary endpoints, which provides a more nuanced understanding of patient survival probability.
Our study also utilized multiple algorithms to derive the most accurate prognostic model and applied SHAP values to enhance the interpretability of our machine learning results. Importantly, our risk score model is the first to predict the survival probability for NMSC patients with T2DM. This study developed and validated a machine learning–based survival risk score specifically for NMSC patients with T2DM using non‐genetic clinical variables, which achieved respectable AUC and C‐index scores.
Despite these strengths, there are some limitations to our study. First, the retrospective design introduces potential selection bias and challenges related to missing data, as certain important details may have been lost during data imputation and exclusion. NMSC is likely underreported in cancer registries due to its high incidence and typically low mortality.
Second, our prognostic model has yet to be validated with prospective data, raising concerns about its applicability in real‐world clinical scenarios. Additionally, we did not include NMSC patients without T2DM as a comparison group, failing to identify risk factors that may be unique to NMSC patients with T2DM, which limited the potential for personalized treatment recommendations. Moreover, our study lacked detailed clinical and pathological data, including tumor stage, tumor grade, and metabolic markers, which precluded a more in‐depth exploration of the underlying mechanisms linking the identified prognostic factors to cancer progression.
Finally, our study lacked subtype‐specific data for NMSC, including BCC and SCC, which have distinct etiologies, metastatic potential, and clinical prognoses. As a result, the model may not fully capture subtype‐specific risk patterns, and its predictive performance could vary across different histological subtypes. Future studies incorporating detailed pathological classification are warranted to refine and validate subtype‐specific prognostic models.
Implications for Further Research
The generalizability of the present model to non‐Asian populations should be interpreted with caution. A previous study reported substantial ethnic differences in the incidence of NMSC, with Asian populations generally showing lower incidence rates than Caucasian populations, possibly due to differences in melanin pigmentation and ultraviolet susceptibility [61]. In addition, the distribution of pathological subtypes may differ across ethnic groups, which could influence prognostic patterns and the relative contribution of predictors within risk models [61, 62, 63].
Furthermore, differences in healthcare systems and chronic disease management may also affect survival outcomes and model performance. For example, the relatively standardized diabetes follow‐up and public healthcare system in Hong Kong may differ from Western healthcare settings in terms of disease detection and long‐term management [64, 65, 66]. Therefore, although the present model demonstrated satisfactory predictive performance within a Hong Kong Chinese population, external validation in ethnically diverse cohorts is still required before broader clinical application.
Given the limitations of our study, additional research is essential to enhance the validity and applicability of our findings. First, prospective external validation is needed to assess the reliability of our prognostic prediction model in real‐world clinical settings. It is also important to account for variations in healthcare systems across different regions.
Therefore, future studies should include patient data from diverse geographical areas with different characteristics to ensure the generalizability of our model across different populations. Furthermore, incorporating NMSC patients without T2DM in future research would offer a more comprehensive view of the identified risk factors, potentially aiding clinicians in making more informed decisions regarding precision medicine. Risk models developed for melanoma or subtypes of NMSC will help to improve our understanding of the prognosis of NMSC.
Addressing these gaps will advance our understanding of both NMSC and its relationship with T2DM.
Conclusions
To summarize, we identified age at cancer diagnosis, sex, smoking, duration of T2DM, creatinine levels, HbA1c, and fasting glucose as prognostic factors for NMSC patients with T2DM. The RSF model showed the highest discrimination among the models evaluated. Our risk score is user‐friendly and can serve as an effective tool for physicians to stratify their patients, with the potential to improve the clinical outcomes of NMSC patients with T2DM.
However, further research is necessary to validate its efficacy across various clinical settings.
Author Contributions
Junjie Huang: conceptualization, supervision, writing – original draft. Claire Chenwen Zhong: conceptualization, supervision, data curation, formal analysis, writing – original draft. Zhaojun Li: data curation, formal analysis.
Zehuan Yang: writing – original draft. Yu Jiang: data curation, formal analysis. Jinqiu Yuan: writing – review and editing.
Jonathan Poon: writing – review and editing. Qi Dou: writing – review and editing. Martin C.
S. Wong: writing – review and editing, conceptualization, supervision.
Funding
The authors have nothing to report.
Ethics Statement
Ethical approval was obtained from the Survey and Behavioral Research Ethics Committee, The Chinese University of Hong Kong (No. SBRE‐22‐0303) and the Joint Chinese University of Hong Kong (CUHK) and New Territories East Cluster (NTEC) Clinical Research Ethics Committee (CREC) (NTEC‐2024‐446) in accordance with the Declaration of Helsinki.
Consent
As the data utilized in this retrospective analysis were de‐identified and contained no personal details, the committee waived the requirement for informed consent.
Conflicts of Interest
The authors declare no conflicts of interest.
Supporting information