Abstract
Background
Primary gastrointestinal melanoma (PGIM) is a rare and highly aggressive malignancy with a poor prognosis, and accurate survival prediction models are currently lacking. This study aims to analyze the clinical characteristics of PGIM and develop machine learning models to predict 1-, 3-, and 5-year overall survival (OS).
Methods
We retrospectively analyzed patients diagnosed with PGIM from January 2000 to December 2021 in the Surveillance, Epidemiology, and End Results (SEER) database. Patients were randomly split into training and testing sets at an 8:2 ratio. Six algorithms were employed to construct survival prediction models: Cox proportional hazards, least absolute shrinkage and selection operator (LASSO) regression, Random Forest, Extreme Gradient Boosting (XGBoost), Gradient Boosting Machine (GBM), and Neural Network. Model performance and clinical utility were comprehensively evaluated using the C-index, area under the curve (AUC), Brier score, and decision curve analysis (DCA). For the best-performing model, we further utilized variable importance ranking, SHapley Additive exPlanations (SHAP) plots, individual prediction probability plots, and single-case prediction plots for interpretability, and deployed it as an online tool for clinical use.
Results
A total of 1,060 patients were included, with 845 in the training set and 215 in the testing set. Tumors were predominantly located in the rectum and anus, with a median survival of 16 months (mean: 30.3 months). The 1-, 3-, and 5-year OS rates were 61%, 30%, and 20%, respectively. Among the six algorithms, the Random Forest survival model demonstrated superior performance: in the training set, the C-index was 0.732, with AUCs of 0.813, 0.808, and 0.840 for 1-, 3-, and 5-year OS, respectively, and Brier scores of 0.175, 0.164, and 0.130. DCA confirmed high clinical net benefit. In the testing set, the model remained robust. Model analysis identified clinical stage, age, and surgical treatment as the three most critical prognostic factors.
Conclusions
The Random Forest survival model excels in predicting OS for patients with PGIM, demonstrating strong generalizability and clinical applicability, making it a valuable tool for clinical decision-making.
Keywords: Machine learning; primary gastrointestinal melanoma (PGIM); Surveillance, Epidemiology, and End Results database (SEER database); prognosis
Highlight box.
Key findings
• The Random Forest model achieved the highest C-index and area under the curve, along with the lowest Brier scores, indicating excellent predictive accuracy and strong clinical utility.
What is known and what is new?
• Traditional Cox regression models are commonly used for survival prediction but are limited by linearity and proportional hazards assumptions.
• This is the first study to apply and compare multiple machine learning algorithms specifically for primary gastrointestinal melanoma (PGIM) survival prediction, demonstrating that the Random Forest model provides superior performance and interpretability.
What is the implication, and what should change now?
• Machine learning models, particularly Random Forest, offer more accurate and clinically useful survival predictions for PGIM compared to traditional methods.
• Future clinical decision-making and prognostic assessments for PGIM should consider integrating machine learning-based tools to enhance individualized patient care.
Introduction
Primary gastrointestinal melanoma (PGIM) is a rare and highly aggressive malignancy, primarily affecting the rectum, and anus. Its incidence is significantly lower than that of cutaneous melanoma, accounting for approximately 1–2% of all melanomas (1,2). Due to its insidious clinical presentation and diagnostic challenges, most patients are diagnosed at advanced stages, resulting in a dismal prognosis, with a 5-year overall survival (OS) rate of approximately 20% and a median survival of less than 2 years (3). In recent years, advances in understanding the molecular mechanisms of melanoma and the application of immunotherapies have improved survival outcomes for some patients through targeted therapies or immune checkpoint inhibitors. However, treatment outcomes for PGIM remain suboptimal, underscoring the urgent need for precise prognostic tools to guide clinical decision-making (4).
Traditional survival prediction models, primarily based on Cox proportional hazards regression (CoxPH), are limited by assumptions of linearity and proportional hazards, which may fail to capture the complex, non-linear prognostic features of gastrointestinal melanoma (5,6). In recent years, machine learning algorithms such as Random Forest, Gradient Boosting Machine (GBM), and deep neural networks have shown superior performance in medical data analysis, effectively handling high-dimensional data and uncovering intricate interactions between variables, thereby enhancing prediction accuracy (7). Studies have demonstrated the superior performance of machine learning models in survival prediction for cutaneous melanoma and other solid tumors (8,9). However, no studies have yet reported prediction models specifically for PGIM.
This study aims to systematically characterize the clinicopathological features of PGIM patients using the Surveillance, Epidemiology, and End Results (SEER) database and develop machine learning-based models to predict 1-, 3-, and 5-year OS. By comparing the predictive performance of different models, we seek to identify the optimal model and use variable importance analysis and SHapley Additive exPlanations (SHAP) methods to elucidate key prognostic factors, providing clinicians with a reliable tool for individualized prognosis assessment. Additionally, by deploying the best model on a web-based platform, we aim to facilitate its application in clinical practice. We present this article in accordance with the TRIPOD reporting checklist (available at https://tcr.amegroups.com/article/view/10.21037/tcr-2025-1029/rc).
Methods
Study population
Patients diagnosed with PGIM between January 1, 2000, and December 31, 2021, were identified from the SEER database {Research Data, 17 Registries, Nov 2023 Sub [2000–2021]} using SEER*Stat 8.4.3 software. Inclusion criteria were: (I) International Classification of Diseases for Oncology, 3rd Edition (ICD-O-3) histological codes: 8720, 8721–8722, 8730, 8742–8746, 8761, 8770–8772, 8780, with malignant behavior; (II) tumor site codes: esophagus (C15.0–C15.9), stomach (C16.0–C16.9), duodenum (C17.0, C24.1), small intestine (C17.1–C17.3, C17.8–C17.9), colon (C18.0–C19.9), rectum (C20.9), anus and anal canal (C21.0–C21.2), overlapping lesion of rectum, anus, and anal canal (C21.8), intestinal tract (C26.0), gastrointestinal tract (C26.9). Exclusion criteria were: (I) lack of pathological confirmation; (II) survival time less than 1 month. The patient selection process and study flowchart are presented in Figure 1.
Figure 1.
Flowchart of this study. CoxPH, Cox proportional hazards regression; DCA, decision curve analysis; GBM, gradient boosting machine; LASSO, least absolute shrinkage and selection operator; ROC, receiver operating characteristic; RSF, Random Survival Forests; SEER, Surveillance; SHAP, SHapley Additive exPlanations; XGBoost, Extreme Gradient Boosting.
The study was conducted in accordance with the Declaration of Helsinki and its subsequent amendments. As the SEER database contains no individually identifiable information and is publicly accessible, ethical approval was not required for this part of the study, and individual consent for this retrospective study was waived since the data were sourced from a public database.
Variables and outcomes
Variables collected included age, sex, race, marital status, diagnosis year, primary malignancy status, median household income, tumor site, tumor size, tumor stage, receipt of radiotherapy, chemotherapy, or surgery, and follow-up information. Race was categorized as White, Black, or others (including American Indian/Alaska Native, Asian/Pacific Islander). Marital status was classified as Married or Unmarried (including divorced, separated, widowed, or never married). Median household income was dichotomized at $65,000 into low-income (<$65,000) and high-income (≥$65,000) groups. Tumor sites were grouped as anus, rectum, anorectal junction, or other gastrointestinal sites. Residential areas were classified as rural (including areas adjacent or non-adjacent to metropolitan areas) or urban (including populations >1 million, 250,000–1 million, or <250,000). The primary endpoint was OS, defined as the time from diagnosis to death from any cause or the last follow-up. The secondary endpoint was cancer-specific survival (CSS), defined as the time from diagnosis to death from the tumor or last follow-up. The final follow-up date was December 31, 2021.
Multiple imputation
To address missing data for race (0.2%), marital status (5.1%), tumor size (42.5%), residence (0.2%), and surgery (0.4%), multiple imputation was performed using the “mice” package in R. Polyreg imputation was used for race and tumor size, while Logreg imputation was applied for marital status, surgery, and residence. Data consistency was maintained pre- and post-imputation.
Machine learning methods
Six machine learning algorithms were employed to predict OS: CoxPH, least absolute shrinkage and selection operator (LASSO) regression, Random Forest, Extreme Gradient Boosting (XGBoost), GBM, and Neural Network. To optimize performance, non-linear models (Random Forest, XGBoost, GBM, Neural Network) underwent hyperparameter tuning and 5-fold cross-validation, while linear models (CoxPH, LASSO) were optimized using respective methods. CoxPH: implemented via surv.coxph, optimized using partial likelihood estimation, assuming proportional hazards, with no hyperparameter tuning. LASSO: implemented via surv.cv_glmnet with a distribution synthesizer, selecting the L1 regularization parameter through cross-validation for variable selection and coefficient optimization. Random Forest: implemented via surv.rfsrc, optimizing parameters including the number of trees, features per split, and minimum node size using grid search. XGBoost: implemented via surv.xgboost.cox with a distribution synthesizer, optimizing parameters such as iteration count, maximum tree depth, learning rate, and regularization parameters using random search. GBM: implemented via surv.gbm with a distribution synthesizer, optimizing parameters including the number of trees, interaction depth, minimum node observations, and learning rate using grid search. Neural Network: implemented via surv.deepsurv, optimizing hidden layers, nodes per layer, learning rate, dropout rate, and weight decay. Early stopping, batch size, and maximum training epochs were set to prevent overfitting.
Model evaluation and interpretation
Model performance was evaluated using a multidimensional framework. Discrimination was assessed using time-dependent area under the ROC curve (AUC) and the concordance index (C-index). Calibration was evaluated using the Brier score, reflecting both accuracy and reliability. Clinical utility was assessed via decision curve analysis (DCA). For interpretability, the best-performing model was analyzed using advanced methods. Variable importance analysis identified key predictors, while SHAP values quantified the contribution and direction of each variable to individual predictions. Partial dependence plots (PDPs) visualized the marginal effects of key predictors, revealing non-linear relationships with outcomes. Individualized prediction functions generated patient-specific survival probability curves. To facilitate clinical translation, an interactive web-based prediction platform was developed using the R Shiny framework, enabling clinicians to input patient characteristics and obtain real-time individualized survival predictions.
Statistical analysis
All analyses were conducted using R version 4.4.2. Normally distributed continuous data were expressed as mean ± standard deviation (mean ± SD) and compared using independent t-tests. Non-normally distributed data were presented as median and interquartile range [M (Q1, Q3)] and compared using the Mann-Whitney U test. Categorical data were expressed as counts and percentages [n (%)], with unordered categorical variables compared using χ2 tests or Fisher’s exact test, and ordered categorical variables compared using the Mann-Whitney U test. Kaplan-Meier (KM) curves assessed OS, and cumulative incidence function (CIF) curves evaluated cancer-specific mortality. Key R packages included tidyverse (2.0.0), mlr3 (0.22.1), mlr3proba (0.6.0), mlr3verse (0.3.0), and mlr3extralearners (0.8.0).
Results
Patient characteristics
A total of 1,060 patients with PGIM were included, comprising 460 males (43.4%) and 600 females (56.6%). The mean age was 68.5±13.7 years. Tumors were predominantly located in the rectum and anus (84.2%), with 30.8% of patients presenting with distant metastases at diagnosis (Table S1). Compared to the survival group in the training set, patients in the death group were older, had lower household income, more distant metastases, were less likely to undergo surgery, and more likely to receive chemotherapy (Table 1). Figure S1 illustrates the annual number of diagnoses and tumor sites from 2000 to 2021. The median survival was 16 months (mean: 30.3 months), with 1-, 3-, and 5-year OS rates of 61%, 30%, and 20%, respectively, and CSS rates of 66%, 39%, and 30%.
Table 1. Compares the clinical characteristics between the survival and death groups in the training and test sets before imputation.
| Variable | Train data (N=845) | Test data (N=215) | |||||
|---|---|---|---|---|---|---|---|
| Alive | Dead | P value | Alive | Dead | P value | ||
| Race | 0.62 | 0.85 | |||||
| Black | 11 (5.6) | 32 (4.9) | 1 (2.8) | 12 (6.7) | |||
| Others | 22 (11.2) | 59 (9.1) | 3 (8.3) | 15 (8.4) | |||
| White | 163 (83.2) | 556 (85.9) | 32 (88.9) | 152 (84.9) | |||
| Sex | 0.77 | 0.56 | |||||
| Female | 113 (57.4) | 364 (56.2) | 19 (52.8) | 104 (58.1) | |||
| Male | 84 (42.6) | 284 (43.8) | 17 (47.2) | 75 (41.9) | |||
| Year of diagnosis | <0.001 | <0.001 | |||||
| 2000–2006 | 15 (7.6) | 213 (32.9) | 3 (8.3) | 58 (32.4) | |||
| 2007–2013 | 32 (16.2) | 224 (34.6) | 7 (19.4) | 56 (31.3) | |||
| 2014–2021 | 150 (76.1) | 211 (32.6) | 26 (72.2) | 65 (36.3) | |||
| Tumor site | 0.09 | 0.23 | |||||
| Anus and anal canal | 78 (39.6) | 200 (30.9) | 15 (41.7) | 55 (30.7) | |||
| Others | 32 (16.2) | 106 (16.4) | 7 (19.4) | 23 (12.8) | |||
| Overlapping | 27 (13.7) | 125 (19.3) | 7 (19.4) | 39 (21.8) | |||
| Rectum | 60 (30.5) | 217 (33.5) | 7 (19.4) | 62 (34.6) | |||
| Surgery | 0.004 | 0.96 | |||||
| No | 38 (19.3) | 195 (30.2) | 10 (27.8) | 49 (27.4) | |||
| Yes | 159 (80.7) | 451 (69.8) | 26 (72.2) | 130 (72.6) | |||
| Radiation | 0.28 | 0.12 | |||||
| No/unknown | 160 (81.2) | 503 (77.6) | 24 (66.7) | 141 (78.8) | |||
| Yes | 37 (18.8) | 145 (22.4) | 12 (33.3) | 38 (21.2) | |||
| Chemotherapy | 0.003 | 0.08 | |||||
| No/unknown | 180 (91.4) | 533 (82.3) | 33 (91.7) | 138 (77.1) | |||
| Yes | 17 (8.6) | 115 (17.7) | 3 (8.3) | 41 (22.9) | |||
| First malignant primary | 0.73 | 0.71 | |||||
| No | 43 (21.8) | 149 (23.0) | 8 (22.2) | 35 (19.6) | |||
| Yes | 154 (78.2) | 499 (77.0) | 28 (77.8) | 144 (80.4) | |||
| Marital | 0.26 | 0.13 | |||||
| Married | 99 (52.1) | 348 (56.8) | 26 (72.2) | 105 (58.7) | |||
| Unmarried | 91 (47.9) | 265 (43.2) | 10 (27.8) | 74 (41.3) | |||
| Residence | 0.24 | 0.19 | |||||
| Rural | 20 (10.2) | 86 (13.3) | 7 (19.4) | 18 (10.1) | |||
| Urban | 177 (89.8) | 560 (86.7) | 29 (80.6) | 161 (89.9) | |||
| Household income | 0.002 | 0.07 | |||||
| Low | 27 (13.7) | 158 (24.4) | 13 (36.1) | 39 (21.8) | |||
| High | 170 (86.3) | 490 (75.6) | 23 (63.9) | 140 (78.2) | |||
| Stage | <0.001 | 0.03 | |||||
| Distant | 41 (20.8) | 217 (33.5) | 5 (13.9) | 63 (35.2) | |||
| Localized | 88 (44.7) | 195 (30.1) | 16 (44.4) | 52 (29.1) | |||
| Regional | 56 (28.4) | 165 (25.5) | 13 (36.1) | 45 (25.1) | |||
| Unstaged | 12 (6.1) | 71 (11.0) | 2 (5.6) | 19 (10.6) | |||
| Age (years) | 64.1±14.2 | 69.7±13.5 | <0.001 | 66.8±12.6 | 69.6±13.2 | 0.25 | |
| Tumor size (mm) | 35.0 (20.5, 49.0) | 39.0 (22.0, 55.0) | 0.48 | 34.0 (18.8, 40.0) | 39.0 (25.0, 60.0) | 0.09 | |
Data are presented as n (%) or mean ± standard deviation or M (Q1, Q3). Overlapping: overlapping lesion of rectum, anus, and anal canal. M (Q1, Q3), median (first quartile, third quartile); SD, standard deviation.
Sensitivity analysis of imputation
The dataset was randomly split into a training set (845 patients) and a testing set (215 patients) at an 8:2 ratio. Baseline patient characteristics of the training and testing cohorts before imputation are presented in Table S1, while characteristics after imputation are provided in Table S2. The distributions of key variables, including race, surgery, tumor site, marital, residence, and tumor size, were well balanced between the training and testing sets both before and after imputation. Importantly, despite the relatively high proportion of missing tumor size data (42.5%), the imputed dataset demonstrated consistent distributions compared to the original dataset (Figure S2).
Performance of six machine learning models
As shown in Figures 2-4, the Random Forest survival model outperformed CoxPH, LASSO, XGBoost, GBM, and Neural Network models. Key performance metrics included the C-index, AUC, and Brier score. The Random Forest model achieved a C-index of 0.732, surpassing CoxPH (0.685), LASSO (0.670), GBM (0.695), NN (0.621), and XGBoost (0.688). For 1-, 3-, and 5-year OS, the AUCs were 0.813 [95% confidence interval (CI): 0.783–0.843], 0.808 (95% CI: 0.774–0.841), and 0.840 (95% CI: 0.803–0.876), respectively, all higher than other models. The Brier scores, indicating calibration, were the lowest among all models: 0.175 (95% CI: 0.165–0.186) for 1-year OS, 0.164 (95% CI: 0.152–0.177) for 3-year OS, and 0.130 (95% CI: 0.115–0.145) for 5-year OS. In terms of clinical utility, the Random Forest model’s DCA curves consistently outperformed other models across most threshold probabilities, indicating superior net benefit for clinical decision-making. In the testing set, the model maintained robust performance, with a C-index of 0.701, AUCs of 0.776 (95% CI: 0.711–0.841), 0.733 (95% CI: 0.655–0.811), and 0.715 (95% CI: 0.605–0.825), and Brier scores of 0.190 (95% CI: 0.169–0.211), 0.180 (95% CI: 0.154–0.206), and 0.135 (95% CI: 0.103–0.167) for 1-, 3-, and 5-year OS, respectively.
Figure 2.
Comparison of ROC curves for six models—CoxPH, LASSO, RSF, XGBoost, GBM, and Neural Network—in the training set (A-C) and test set (D-F). AUC, area under the curve; CoxPH, Cox proportional hazards regression; GBM, gradient boosting machine; LASSO, least absolute shrinkage and selection operator; NN, Neural Network; ROC, receiver operating characteristic; RSF, Random Survival Forests; XGBoost, Extreme Gradient Boosting.
Figure 3.
Comparison of Brier scores for six models—CoxPH, LASSO, RSF, XGBoost, GBM, and Neural Network—in the training set (A) and test set (B). CoxPH, Cox proportional hazards regression; GBM, gradient boosting machine; LASSO, least absolute shrinkage and selection operator; NN, Neural Network; RSF, Random Survival Forests; XGBoost, Extreme Gradient Boosting.
Figure 4.
Decision curve analysis comparisons for six models—CoxPH, LASSO, RSF, XGBoost, GBM, and Neural Network—across the training set (A-C) and the test set (D-F). CoxPH, Cox proportional hazards regression; DCA, decision curve analysis; GBM, gradient boosting machine; LASSO, least absolute shrinkage and selection operator; NN, Neural Network; RSF, Random Survival Forests; XGBoost, Extreme Gradient Boosting.
Interpretation of the best model
Using the Random Forest survival model, we analyzed the impact of features on survival probability. SHAP analysis (Figure 5) identified clinical stage as the primary risk factor, with distant metastasis (stage =1) significantly reducing survival probability (positive SHAP values, increased risk), while surgery (surgery =1) improved survival (negative SHAP values). Advanced age (age =78 years) and earlier diagnosis year (year =1) also increased mortality risk. Time-dependent feature importance (Figure 6) showed that stage and age had the greatest impact on short-term survival predictions, though their influence diminished over time. Surgery and tumor site had moderate effects in the short-to-mid-term, weakening in the long term. Partial dependence survival curves (Figure 7) further elucidated feature effects: patients with distant metastases (stage =1) had the lowest survival probability, approaching zero long-term; tumors located in the anus (site =1) had the best prognosis; surgically treated patients had significantly higher survival probabilities than those without surgery; and older age and larger tumors were associated with markedly reduced survival. These findings highlight advanced stage as the primary mortality risk, surgery as a critical intervention for improving prognosis, and the need for personalized management in elderly patients and those with large tumors. Specific clinical variable values are provided in Table S1.
Figure 5.
SHAP summary plot of the random forest survival model. Positive SHAP values indicate increased risk, while negative SHAP values indicate decreased risk. SHAP, SHapley Additive exPlanations.
Figure 6.
Time-dependent feature importance (A) and feature importance at different time points (B) of the random forest survival prediction model.
Figure 7.
Partial dependence plots for key variables in the random forest survival prediction model, illustrating the relationship between each variable and the predicted survival outcome.
For a randomly selected patient in the testing set, we predicted OS using the Random Forest model. The left bar chart in Figure 8 displays local feature importance, indicating each feature’s contribution to the survival prediction. Positive values (green) denote positive impacts on survival, while negative values (red) indicate adverse effects. The right curve plot compares the Random Forest model’s “black-box” survival function prediction (blue) with the LIME (locally interpretable model-agnostic explanations)-interpreted survival function (green). The green curve approximates the survival function based on feature explanations, and closer alignment with the blue curve indicates higher explanatory accuracy. Both curves declined rapidly, suggesting a low survival probability in the early stages for this patient.
Figure 8.
Single-sample prediction with a random forest survival model. The left bar chart displays the local importance of each feature, while the right curve plot compares the survival function predicted by the random forest model (“black box”) against the survival function estimated by the LIME explanation model. LIME, locally interpretable model-agnostic explanations.
Deployment of the best model
To facilitate clinical translation, we developed an online prediction tool for gastrointestinal melanoma OS based on the Random Forest survival model. This interactive web application is publicly accessible at https://gaofuli.shinyapps.io/random_survival_forest/. Clinicians can input patient clinical characteristics to obtain real-time individualized survival probability predictions and visualized survival curves.
Discussion
This study utilized the SEER database to develop machine learning models predicting 1-, 3-, and 5-year OS for patients with PGIM. The Random Forest model demonstrated superior performance, with a training set C-index of 0.732, a testing set C-index of 0.701, AUCs ranging from 0.808 to 0.840, and Brier scores as low as 0.130–0.175. DCA confirmed significant clinical net benefit across a wide range of threshold probabilities, outperforming CoxPH, LASSO, XGBoost, GBM, and Neural Network models. These results highlight the Random Forest model’s ability to capture complex non-linear relationships and handle high-dimensional data and variable interactions, offering higher predictive accuracy than traditional linear models. The superior performance of Random Forest models in cancer prognosis has been previously recognized (10).
Despite their predictive and decision-making prowess, machine learning models are often criticized for their opaque computational reasoning and decision logic, creating a “black-box” effect (11). To address this, we employed SHAP value analysis, variable importance evaluation, and PDPs to elucidate the predictive mechanisms of the Random Forest survival model. Clinical stage, age, and surgical treatment emerged as the core prognostic factors, with significantly greater importance than other variables. Time-dependent analysis further revealed that stage and age predominantly influence short-term survival predictions, while the long-term effect of surgery diminishes. These findings provide critical insights for developing dynamic follow-up and personalized treatment strategies, such as more frequent imaging for high-risk patients or avoiding overtreatment in low-risk individuals.
Clinical stage was the most influential predictor. Previous studies have reported 5-year survival rates of up to 45% for stage I/II gastrointestinal melanoma, compared to a median survival of approximately 6 months for stage IV (12,13). Age also significantly impacts prognosis, with studies suggesting that mutational burden increases with age, potentially enhancing tumor invasiveness and metastatic risk (14). This is unsurprising, as melanoma incidence rises with age, particularly in individuals over 50 years, and elderly patients often exhibit compromised immune function, increasing tumor malignancy and invasiveness. Additionally, comorbidities in older patients may limit their tolerance for radical surgery, further impacting treatment efficacy and prognosis (15). Surgery markedly influences outcomes, with radical resection in early-stage patients significantly improving 5-year survival (approximately 40–50%) and reducing recurrence risk (16). However, advanced-stage patients rely primarily on immunotherapy and targeted therapies, with surgery serving as an adjunct (17). Patients with BRAF mutations may benefit from targeted therapies, while PD-1 inhibitors have become a first-line option for advanced melanoma (18). Future treatment strategies should emphasize precision medicine and multidisciplinary collaboration to further improve outcomes.
Compared to machine learning models for cutaneous melanoma (8), our model’s performance was slightly inferior, likely due to the biological complexity of PGIM and the smaller sample size. As a rare disease, PGIM exhibits distinct clinical and prognostic features compared to cutaneous melanoma, potentially reducing model accuracy. Nevertheless, given the rarity of the disease and the representativeness of the SEER data, our model demonstrates robust predictive capability, highlighting the potential of machine learning in rare diseases. Unlike previous PGIM prognostic models, which often rely on Cox regression-based nomograms (19), our study offers unique advantages. The Random Forest model’s strong non-linear modeling capacity and its deployment as an online tool enable clinicians to input patient-specific parameters for real-time, precise survival predictions, significantly enhancing clinical decision-making.
However, there are limitations in this study. First, the retrospective design of the SEER database may introduce selection bias, and the presence of missing data could potentially influence the results. A key methodological concern was the relatively high proportion of missing tumor size data (42.5%). To mitigate this issue, we employed multiple imputation, a widely recommended approach for reducing bias and preserving statistical power. Sensitivity analyses demonstrated that the distributions of clinical variables were comparable before and after imputation, and the predictive performance of the Random Forest model remained largely unaffected. These findings support the robustness of our imputation strategy. Second, molecular markers such as KIT proto-oncogene, receptor tyrosine kinase (KIT), B-Raf proto-oncogene, serine/threonine kinase (BRAF), or neuroblastoma RAS viral oncogene homolog (NRAS) mutations, which are prognostically and therapeutically significant in mucosal melanoma, were not included. For instance, KIT-mutated patients may benefit from imatinib (20). Third, the model underwent only internal validation, potentially limiting its generalizability across diverse populations. Fourth, immunotherapy [e.g., programmed cell death protein 1 (PD-1) inhibitors], a standard treatment for melanoma since 2011 (21), was not captured in the SEER database, potentially underestimating its long-term effects. Future studies should address these limitations by integrating molecular markers to enhance prediction accuracy, conducting multicenter prospective studies for external validation, and optimizing the online tool’s functionality, such as incorporating treatment response predictions or integration with clinical decision support systems.
Conclusions
We established a Random Forest survival model with strong performance and clinical applicability for PGIM. This model provides a foundation for personalized management and warrants further validation with molecular data and prospective studies.
Supplementary
The article’s supplementary files as
Acknowledgments
None.
Ethical Statement: The authors are accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved. The study was conducted in accordance with the Declaration of Helsinki and its subsequent amendments. As the SEER database contains no individually identifiable information and is publicly accessible, ethical approval was not required for this part of the study, and individual consent for this retrospective study was waived since the data were sourced from a public database.
Footnotes
Reporting Checklist: The authors have completed the TRIPOD reporting checklist. Available at https://tcr.amegroups.com/article/view/10.21037/tcr-2025-1029/rc
Funding: This work was supported by the Suzhou 23rd Science and Technology Development Program Project (Clinical Trial Organization Capacity Enhancement) (SLT2023006) and 2023 Suzhou Municipal Special Project on Clinical Key Disease Diagnosis and Treatment Technologies (LCZX202334).
Conflicts of Interest: Both authors have completed the ICMJE uniform disclosure form (available at https://tcr.amegroups.com/article/view/10.21037/tcr-2025-1029/coif). The authors have no conflicts of interest to declare.
References
- 1.Olla D, Neumeister MW. Mucosal Melanoma. Clin Plast Surg 2021;48:707-11. 10.1016/j.cps.2021.05.010 [DOI] [PubMed] [Google Scholar]
- 2.Shan Z, Liu F. Advances in immunotherapy for mucosal melanoma: harnessing immune checkpoint inhibitors for improved treatment outcomes. Front Immunol 2024;15:1441410 . 10.3389/fimmu.2024.1441410 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Du Y, Chang X, Li X, et al. Incidence and survival of patients with primary gastrointestinal melanoma: a population-based study. Int J Colorectal Dis 2023;38:87 . 10.1007/s00384-023-04385-x [DOI] [PubMed] [Google Scholar]
- 4.Kohoutova D, Worku D, Aziz H, et al. Malignant Melanoma of the Gastrointestinal Tract: Symptoms, Diagnosis, and Current Treatment Options. Cells 2021;10:327 . 10.3390/cells10020327 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Badakhshi H, Wang ZM, Li RJ, et al. Survival and Prognostic Nomogram for Primary Gastrointestinal Melanoma (PGIM): A Population-based Study. Anticancer Res 2021;41:967-74. 10.21873/anticanres.14850 [DOI] [PubMed] [Google Scholar]
- 6.Zeng J, Zhu L, Zhou G, et al. Prognostic models based on lymph node density for primary gastrointestinal melanoma: a SEER population-based analysis. BMJ Open 2023;13:e073335 . 10.1136/bmjopen-2023-073335 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Binson VA, Thomas S, Subramoniam M, et al. A Review of Machine Learning Algorithms for Biomedical Applications. Ann Biomed Eng 2024;52:1159-83. 10.1007/s10439-024-03459-3 [DOI] [PubMed] [Google Scholar]
- 8.Yu H, Yang W, Wu S, et al. Deep-learning-based survival prediction of patients with cutaneous malignant melanoma. Front Med (Lausanne) 2023;10:1165865 . 10.3389/fmed.2023.1165865 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Grossarth S, Mosley D, Madden C, et al. Recent Advances in Melanoma Diagnosis and Prognosis Using Machine Learning Methods. Curr Oncol Rep 2023;25:635-45. 10.1007/s11912-023-01407-3 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Kourou K, Exarchos TP, Exarchos KP, et al. Machine learning applications in cancer prognosis and prediction. Comput Struct Biotechnol J 2015;13:8-17. 10.1016/j.csbj.2014.11.005 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Allen GI, Gan L, Zheng L. Interpretable Machine Learning for Discovery: Statistical Challenges and Opportunities. Annual Review of Statistics and Its Application 2024;11:97-121. [Google Scholar]
- 12.Kahl AR, Gao X, Chioreso C, et al. Presentation, Management, and Prognosis of Primary Gastrointestinal Melanoma: A Population-Based Study. J Surg Res 2021;260:46-55. 10.1016/j.jss.2020.11.048 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Zhang K, Fu Y. Clinicopathologic Observations on Primary Malignant Melanoma of the Digestive Tract. Int J Surg Pathol 2025;33:1570-82. 10.1177/10668969251329557 [DOI] [PubMed] [Google Scholar]
- 14.Wang Z, Luo M, Liang Q, et al. Landscape of enhancer disruption and functional screen in melanoma cells. Genome Biol 2023;24:248 . 10.1186/s13059-023-03087-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Bastiaannet E, Battisti N, Loh KP, et al. Immunotherapy and targeted therapies in older patients with advanced melanoma; Young International Society of Geriatric Oncology review paper. J Geriatr Oncol 2019;10:389-97. 10.1016/j.jgo.2018.06.009 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Mellotte GS, Sabu D, O'Reilly M, et al. The challenge of primary gastric melanoma: a systematic review. Melanoma Manag 2020;7:MMT51 . 10.2217/mmt-2020-0009 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Yang J, Wang X, Meng Y, et al. Combination Immunotherapy for Mucosal Melanoma: Molecular Mechanism, Research Status, and Future Directions. Curr Treat Options Oncol 2025;26:431-44. 10.1007/s11864-025-01321-9 [DOI] [PubMed] [Google Scholar]
- 18.Amaral T, Ottaviano M, Arance A, et al. Cutaneous melanoma: ESMO Clinical Practice Guideline for diagnosis, treatment and follow-up. Ann Oncol 2025;36:10-30. 10.1016/j.annonc.2024.11.006 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Qiu S, Chen R, Yu Z, et al. The Development and Validation of a Nomogram for Predicting Cancer-Specific Survival and a Risk Stratification System for Patients with Primary Gastrointestinal Melanoma. Turk J Gastroenterol 2023;34:850-8. 10.5152/tjg.2023.22711 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Teixido C, Castillo P, Martinez-Vila C, et al. Molecular Markers and Targets in Melanoma. Cells 2021;10:2320 . 10.3390/cells10092320 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Muto Y, Fujimura T, Asano Y. Recent Advances in Immunotherapy for Melanoma: Perspectives on the Development of Novel Treatments: A Mini Review. Cancers (Basel) 2025;17:2265 . 10.3390/cancers17132265 [DOI] [PMC free article] [PubMed] [Google Scholar]








