Prediction of early death in peripheral T-cell lymphoma-NOS patients based on machine learning Authors: Changjiu Liang, Ruilan Zhong, Limei Li, Chunyu Zhang, Lihua Hu, Chunlan Chen, Caizhu Fu, Min Dong, Zhenxin Mei Published: 2026 ABSTRACT Peripheral T-cell lymphoma-not otherwise specified (PTCL-NOS) is a highly aggressive and heterogeneous lymphoma subtype with a poor prognosis. This study aims to develop a machine learning-based model to predict early death (within 3 months of diagnosis) in PTCL-NOS patients using data from the SEER database (2016–2021). A total of 1,156 patients were included and randomly divided into training (n = 809) and validation (n = 347) sets. Key predictive factors were identified through Boruta and LASSO algorithms, including chemotherapy, radiotherapy, age, B symptoms, primary tumor site, Summary Stage, and Ann Arbor Stage. Seven machine learning models were constructed and evaluated using AUROC, AUPRC, calibration curves, Brier scores, and decision curve analysis. XGBoost demonstrated the best predictive performance (AUROC = 0.842 in training and 0.774 in validation). This study provides a novel and interpretable predictive tool that can aid in early risk stratification and personalized treatment planning for PTCL-NOS patients, ultimately improving clinical outcomes.Supplementary InformationThe online version contains supplementary material available at https://doi.org/10.1007/s00277-026-07121-x. Introduction Peripheral T-cell lymphoma-not otherwise specified (PTCL-NOS), is the most common subtype of peripheral T-cell lymphoma (PTCL), accounting for approximately 36% of all PTCL cases [1]. Owing to its aggressive and heterogeneous nature, PTCL-NOS has a poor prognosis, with a 5-year overall survival rate of less than 30% and frequent presentation at advanced stages [2]. Although previous prognostic studies have mainly focused on clinical and pathological factors, integrating demographic and treatment-related variables may improve survival prediction [3]. Therefore, identifying determinants of early mortality and developing reliable predictive models are clinically important for risk stratification and management of PTCL-NOS. Machine learning (ML) has been increasingly applied to disease prediction and prognostic assessment because of its ability to handle high-dimensional data and complex variable interactions [4]. However, predictive models for early death risk in PTCL-NOS remain limited. Therefore, this study used clinical, pathological, and demographic data from the SEER database to develop and compare multiple ML models, aiming to identify high-risk patients early and support individualized clinical management. Methods This study followed the standards of the TRIPOD. The overall workflow chart was illustrated in Fig. 1. Fig. 1Schematic of the study workflow Schematic of the study workflow Data source and participants Data were obtained from the 17 registries of the Surveillance, Epidemiology, and End Results (SEER) database (November 2022 submission, 2000–2021), which covers approximately 30% of the U.S. population. Patients diagnosed with PTCL-NOS (ICD-O-3 code: M9702/3) between 2016 and 2021 were identified using SEER*Stat software (version 8.4.3). Patients were excluded if they had non-pathologically confirmed disease, more than one primary tumor, unknown survival time, or missing information on race, marital status, stage, B symptoms, distant metastases, treatment, Rural-Urban Continuum Code, or primary site. The patient selection process is shown in Fig. 2. Fig. 2Flowchart illustrating patient selection for this study Flowchart illustrating patient selection for this study The variables included in the analysis were age, marital, race, sex, Summary Stage, Ann Arbor Stage, liver metastasis, lung metastasis, bone metastasis, brain metastasis, surgery, radiotherapy, chemotherapy, B symptoms, median household income, Rural-Urban Continuum Code, and primary site. Early death was defined as death occurring within 3 months of diagnosis. After excluding patients with incomplete information, 1,156 patients with PTCL-NOS were included in the study. These patients were randomly assigned to the training set (n = 809) and the validation set (n = 347) in a 7:3 ratio. Feature selection Boruta and LASSO algorithms were used for variable selection. Boruta identified important variables by comparing them with randomly permuted shadow features, whereas LASSO excluded less relevant predictors by shrinking their coefficients to zero. The intersection of variables selected by both methods was retained to improve model robustness and reduce overfitting [5]. Model development and validation After taking the intersection of the predictive factors selected by the Boruta and LASSO algorithms, the most relevant variables were identified and used to construct a series of machine learning models. Seven machine learning models were developed, including decision tree (DT), K-nearest neighbors (KNN), light gradient boosting machine (LGBM), logistic regression (LR), random forest (RF), support vector machine (SVM), and extreme gradient boosting (XGBoost). These algorithms cover linear, distance-based, tree-based, ensemble, and gradient boosting approaches, allowing comprehensive comparison of model performance [4–6]. In this study, patients were randomly stratified into training and validation sets in a 7:3 ratio. All models were developed using the same variables, and hyperparameters were optimized by grid and random searches with the area under the receiver operating characteristic curve (AUROC) as the optimization metric. Ten-fold cross-validation was performed to assess model robustness. Model performance was evaluated using the AUROC, area under the precision-recall curve (AUPRC), calibration curves, Brier score, decision curve analysis (DCA), and radar charts. These metrics were used to comprehensively assess model discrimination, calibration, prediction error, clinical utility, and overall performance. Additionally, the confusion matrix was employed to calculate various metrics, including Sensitivity, Specificity, Positive Predictive Value (PPV), Negative Predictive Value (NPV), Precision, Recall, F1 score, Prevalence, Detection Rate, Detection Prevalence, and Balanced Accuracy, providing a comprehensive evaluation of model prediction performance. Model interpretability and feature importance Model interpretability was assessed using feature importance and Shapley Additive Explanations (SHAP) values. Feature importance identified variables with the greatest overall contribution to model prediction, whereas SHAP values quantified the direction and magnitude of each feature’s contribution to individual predictions [7]. Statistical analysis Rank-sum tests were used for ordinal data analysis, and chi-square (χ²) tests were performed for categorical data, which were presented as counts and percentages. All data analyses were conducted using R software (version 4.1.3), and statistical analyses were performed using SPSS (version 26.0; IBM, Armonk, New York, United States). A two-sided P-value of < 0.05 was considered statistically significant. Results Baseline characteristics of patients The optimal age cutoffs were determined using X-tile software and categorized as ≤ 58, 59–73, and ≥ 74 years (Fig. 3A–C). Baseline characteristics are summarized in Table 1. In the overall cohort, most patients were male (62.80%), aged ≥ 59 years (63.92%), White (69.12%), married (56.06%), and diagnosed with advanced disease, including Ann Arbor stage III–IV (72.57%) and distant Summary Stage (72.15%). B symptoms were present in 35.99% of patients, and bone was the most common distant metastatic site (8.39%). Surgery and radiotherapy were uncommon (17.82% and 9.34%, respectively), whereas 71.97% received chemotherapy. As shown in Supplementary Table 1, early death occurred in 58.33%, 15.91%, 12.50%, and 4.76% of patients receiving neither treatment, chemotherapy alone, radiotherapy alone, and combined chemoradiotherapy. Most patients lived in urban areas (89.19%), and lymph nodes and spleen were the predominant primary sites (82.70%). No significant differences were observed between the training and validation sets. Fig. 3The optimal cut-off values for age were determined by X-tile software (A-C) The optimal cut-off values for age were determined by X-tile software (A-C) Table 1Demographic and treatment characteristics of patients with PTCL-NOSVariableTotal N = 1156Validationset N = 347Training set N = 809P valueAge, n(%)0.541 ≤ 58417 (36.07%)118 (34.01%)299 (36.96%) 59–73437 (37.80%)132 (38.04%)305 (37.70%) ≥ 74302 (26.12%)97 (27.95%)205 (25.34%)Sex, n(%)0.955 Female430 (37.20%)130 (37.46%)300 (37.08%) Male726 (62.80%)217 (62.54%)509 (62.92%)Race, n(%)0.259 White799 (69.12%)239 (68.88%)560 (69.22%) Black205 (17.73%)55 (15.85%)150 (18.54%) Other152 (13.15%)53 (15.27%)99 (12.24%)Marital, n(%)0.940 Married648 (56.06%)195 (56.20%)453 (56.00%) Unmarried270 (23.36%)79 (22.77%)191 (23.61%) SDW238 (20.59%)73 (21.04%)165 (20.40%)Summary Stage, n(%)0.757 Distant834 (72.15%)249 (71.76%)585 (72.31%) Localized174 (15.05%)50 (14.41%)124 (15.33%) Regional148 (12.80%)48 (13.83%)100 (12.36%)Ann Arbor Stage, n(%)0.988 I173 (14.97%)51 (14.70%)122 (15.08%) II144 (12.46%)43 (12.39%)101 (12.48%) III295 (25.52%)87 (25.07%)208 (25.71%) IV544 (47.05%)166 (47.84%)378 (46.72%)Surgery, n(%)1.000 No/Unknown950 (82.18%)285 (82.13%)665 (82.20%) Yes206 (17.82%)62 (17.87%)144 (17.80%)Radiotherapy, n(%)0.672 No/Unknown1048 (90.66%)317 (91.35%)731 (90.36%) Yes108 (9.34%)30 (8.65%)78 (9.64%)Chemotherapy, n(%)0.211 No/Unknown324 (28.03%)88 (25.36%)236 (29.17%) Yes832 (71.97%)259 (74.64%)573 (70.83%)B Symptoms, n(%)0.960 No/Unknown740 (64.01%)223 (64.27%)517 (63.91%) Yes416 (35.99%)124 (35.73%)292 (36.09%)Bone Metastasis, n(%)0.403 No/Unknown1059 (91.61%)322 (92.80%)737 (91.10%) Yes97 (8.39%)25 (7.20%)72 (8.90%)Brain Metastasis, n(%)0.187 No/Unknown1150 (99.48%)347 (100.00%)803 (99.26%) Yes6 (0.52%)0 (0.00%)6 (0.74%)Liver Metastasis, n(%)1.000 No/Unknown1104 (95.50%)331 (95.39%)773 (95.55%) Yes52 (4.50%)16 (4.61%)36 (4.45%)Lung Metastasis, n(%)0.371 No/Unknown1104 (95.50%)328 (94.52%)776 (95.92%) Yes52 (4.50%)19 (5.48%)33 (4.08%)Median Household Income, n(%)0.565 < $40,00016 (1.38%)7 (2.02%)9 (1.11%) $40,000–79,999509 (44.03%)149 (42.94%)360 (44.50%) $80,000-119,999549 (47.49%)164 (47.26%)385 (47.59%) ≥$120,00082 (7.09%)27 (7.78%)55 (6.80%)Rural-Urban Continuum Cord, n(%)0.683 Metropolitan counties1031 (89.19%)307 (88.47%)724 (89.49%) Nonmetropolitan counties125 (10.81%)40 (11.53%)85 (10.51%)Primary Site, n(%)0.099 Head and neck43 (3.72%)9 (2.59%)34 (4.20%) Thoracic and breast18 (1.56%)6 (1.73%)12 (1.48%) Abdomen(include retroperitoneum, liver, gastrointestinal and genitourinary)69 (5.97%)25 (7.20%)44 (5.44%) Skin and tissue51 (4.41%)18 (5.19%)33 (4.08%) Bone and bone marrow19 (1.64%)1 (0.29%)18 (2.22%) Lymph nodes and spleen956 (82.70%)288 (83.00%)668 (82.57%)SDW Separated, divorced, widowed Table 1Demographic and treatment characteristics of patients with PTCL-NOSVariableTotal N = 1156Validationset N = 347Training set N = 809P valueAge, n(%)0.541 ≤ 58417 (36.07%)118 (34.01%)299 (36.96%) 59–73437 (37.80%)132 (38.04%)305 (37.70%) ≥ 74302 (26.12%)97 (27.95%)205 (25.34%)Sex, n(%)0.955 Female430 (37.20%)130 (37.46%)300 (37.08%) Male726 (62.80%)217 (62.54%)509 (62.92%)Race, n(%)0.259 White799 (69.12%)239 (68.88%)560 (69.22%) Black205 (17.73%)55 (15.85%)150 (18.54%) Other152 (13.15%)53 (15.27%)99 (12.24%)Marital, n(%)0.940 Married648 (56.06%)195 (56.20%)453 (56.00%) Unmarried270 (23.36%)79 (22.77%)191 (23.61%) SDW238 (20.59%)73 (21.04%)165 (20.40%)Summary Stage, n(%)0.757 Distant834 (72.15%)249 (71.76%)585 (72.31%) Localized174 (15.05%)50 (14.41%)124 (15.33%) Regional148 (12.80%)48 (13.83%)100 (12.36%)Ann Arbor Stage, n(%)0.988 I173 (14.97%)51 (14.70%)122 (15.08%) II144 (12.46%)43 (12.39%)101 (12.48%) III295 (25.52%)87 (25.07%)208 (25.71%) IV544 (47.05%)166 (47.84%)378 (46.72%)Surgery, n(%)1.000 No/Unknown950 (82.18%)285 (82.13%)665 (82.20%) Yes206 (17.82%)62 (17.87%)144 (17.80%)Radiotherapy, n(%)0.672 No/Unknown1048 (90.66%)317 (91.35%)731 (90.36%) Yes108 (9.34%)30 (8.65%)78 (9.64%)Chemotherapy, n(%)0.211 No/Unknown324 (28.03%)88 (25.36%)236 (29.17%) Yes832 (71.97%)259 (74.64%)573 (70.83%)B Symptoms, n(%)0.960 No/Unknown740 (64.01%)223 (64.27%)517 (63.91%) Yes416 (35.99%)124 (35.73%)292 (36.09%)Bone Metastasis, n(%)0.403 No/Unknown1059 (91.61%)322 (92.80%)737 (91.10%) Yes97 (8.39%)25 (7.20%)72 (8.90%)Brain Metastasis, n(%)0.187 No/Unknown1150 (99.48%)347 (100.00%)803 (99.26%) Yes6 (0.52%)0 (0.00%)6 (0.74%)Liver Metastasis, n(%)1.000 No/Unknown1104 (95.50%)331 (95.39%)773 (95.55%) Yes52 (4.50%)16 (4.61%)36 (4.45%)Lung Metastasis, n(%)0.371 No/Unknown1104 (95.50%)328 (94.52%)776 (95.92%) Yes52 (4.50%)19 (5.48%)33 (4.08%)Median Household Income, n(%)0.565 < $40,00016 (1.38%)7 (2.02%)9 (1.11%) $40,000–79,999509 (44.03%)149 (42.94%)360 (44.50%) $80,000-119,999549 (47.49%)164 (47.26%)385 (47.59%) ≥$120,00082 (7.09%)27 (7.78%)55 (6.80%)Rural-Urban Continuum Cord, n(%)0.683 Metropolitan counties1031 (89.19%)307 (88.47%)724 (89.49%) Nonmetropolitan counties125 (10.81%)40 (11.53%)85 (10.51%)Primary Site, n(%)0.099 Head and neck43 (3.72%)9 (2.59%)34 (4.20%) Thoracic and breast18 (1.56%)6 (1.73%)12 (1.48%) Abdomen(include retroperitoneum, liver, gastrointestinal and genitourinary)69 (5.97%)25 (7.20%)44 (5.44%) Skin and tissue51 (4.41%)18 (5.19%)33 (4.08%) Bone and bone marrow19 (1.64%)1 (0.29%)18 (2.22%) Lymph nodes and spleen956 (82.70%)288 (83.00%)668 (82.57%)SDW Separated, divorced, widowed Demographic and treatment characteristics of patients with PTCL-NOS SDW Separated, divorced, widowed Table 2 summarizes the characteristics of patients with and without early death. Among 1,156 patients, 301 (26.04%) experienced early death. In the early death group, patients were more commonly aged ≥ 74 years (47.51%) and had advanced disease, including distant Summary Stage (82.39%) and Ann Arbor stage III–IV (83.39%). Surgery, radiotherapy, and chemotherapy were recorded in 12.62%, 2.33%, and 40.86% of these patients. B symptoms were present in 37.54%, and lymph nodes and spleen were the predominant primary sites (82.39%). Table 2A comparison of demographic and treatment characteristics between patients with and without early death among patients with PTCL-NOSVariableEarly deathYesNoAge, n(%) ≤ 5846 (15.28%)413 (48.30%) 59–73112 (37.21%)302 (35.32%) ≥ 74143 (47.51%)140 (16.38%)Sex, n(%) Female120 (39.87%)310 (36.26%) Male181 (60.13%)545 (63.74%)Race, n(%) White199 (66.11%)600 (70.17%) Black59 (19.60%)146 (17.08%) Other43 (14.29%)109 (12.75%)Marital, n(%) Married166 (55.15%)482 (56.38%) Unmarried64 (21.26%)206 (24.09%) SDW71 (23.59%)167 (19.53%)Summary Stage, n(%) Distant248 (82.39%)586 (68.54%) Localized22 (7.31%)152 (17.78%) Regional31 (10.30%)117 (13.68%)Ann Arbor Stage, n(%) I23 (7.64%)150 (17.54%) II27 (8.97%)117 (13.68%) III81 (26.91%)214 (25.03%) IV170 (56.48%)374 (43.75%)Surgery, n(%) No/Unknown263 (87.38%)687 (80.35%) Yes38 (12.62%)168 (19.65%)Radiotherapy, n(%) No/Unknow294 (97.67%)754 (88.19%) Yes7 (2.33%)101 (11.81%)Chemotherapy, n(%) No/Unknown178 (59.14%)146 (17.08%) Yes123 (40.86%)709 (82.92%)B Symptoms, n(%) No/Unknown188 (62.46%)552 (64.56%) Yes113 (37.54%)303 (35.44%)Bone Metastasis, n(%) No/Unknown278 (92.36%)781 (91.35%) Yes23 (7.64%)74 (8.65%)Brain Metastasis, n(%) No/Unknown300 (99.67%)850 (99.42%) Yes1 (0.33%)5 (0.58%)Liver Metastasis, n(%) No/Unknown287 (95.35%)817 (95.56%) Yes14 (4.65%)38 (4.44%)Lung Metastasis, n(%) No/Unknown281 (93.36%)823 (96.26%) Yes20 (6.64%)32 (3.74%)Median Household Income, n(%) < $40,0005 (1.66%)11 (1.29%) $40,000–79,999134 (44.52%)375 (43.86%) $80,000-119,999144 (47.84%)405 (47.37%) ≥$120,00018 (5.98%)64 (7.48%)Rural-Urban continuum, n(%) Metropolitan counties267 (88.70%)764 (89.36%) Nonmetropolitan counties34 (11.30%)91 (10.64%)Primary Site, n(%) Head and neck7 (2.33%)36 (4.21%) Thoracic and breast8 (2.66%)10 (1.17%) Abdomen include retroperitoneum, liver, gastrointestinal and genitourinary29 (9.63%)40 (4.68%) Skin and tissue5 (1.66%)46 (5.38%) Bone and Bone marrow4 (1.33%)15 (1.75%) Lymph nodes and spleen248 (82.39%)708 (82.81%)SDW Separated, divorced, widowed Table 2A comparison of demographic and treatment characteristics between patients with and without early death among patients with PTCL-NOSVariableEarly deathYesNoAge, n(%) ≤ 5846 (15.28%)413 (48.30%) 59–73112 (37.21%)302 (35.32%) ≥ 74143 (47.51%)140 (16.38%)Sex, n(%) Female120 (39.87%)310 (36.26%) Male181 (60.13%)545 (63.74%)Race, n(%) White199 (66.11%)600 (70.17%) Black59 (19.60%)146 (17.08%) Other43 (14.29%)109 (12.75%)Marital, n(%) Married166 (55.15%)482 (56.38%) Unmarried64 (21.26%)206 (24.09%) SDW71 (23.59%)167 (19.53%)Summary Stage, n(%) Distant248 (82.39%)586 (68.54%) Localized22 (7.31%)152 (17.78%) Regional31 (10.30%)117 (13.68%)Ann Arbor Stage, n(%) I23 (7.64%)150 (17.54%) II27 (8.97%)117 (13.68%) III81 (26.91%)214 (25.03%) IV170 (56.48%)374 (43.75%)Surgery, n(%) No/Unknown263 (87.38%)687 (80.35%) Yes38 (12.62%)168 (19.65%)Radiotherapy, n(%) No/Unknow294 (97.67%)754 (88.19%) Yes7 (2.33%)101 (11.81%)Chemotherapy, n(%) No/Unknown178 (59.14%)146 (17.08%) Yes123 (40.86%)709 (82.92%)B Symptoms, n(%) No/Unknown188 (62.46%)552 (64.56%) Yes113 (37.54%)303 (35.44%)Bone Metastasis, n(%) No/Unknown278 (92.36%)781 (91.35%) Yes23 (7.64%)74 (8.65%)Brain Metastasis, n(%) No/Unknown300 (99.67%)850 (99.42%) Yes1 (0.33%)5 (0.58%)Liver Metastasis, n(%) No/Unknown287 (95.35%)817 (95.56%) Yes14 (4.65%)38 (4.44%)Lung Metastasis, n(%) No/Unknown281 (93.36%)823 (96.26%) Yes20 (6.64%)32 (3.74%)Median Household Income, n(%) < $40,0005 (1.66%)11 (1.29%) $40,000–79,999134 (44.52%)375 (43.86%) $80,000-119,999144 (47.84%)405 (47.37%) ≥$120,00018 (5.98%)64 (7.48%)Rural-Urban continuum, n(%) Metropolitan counties267 (88.70%)764 (89.36%) Nonmetropolitan counties34 (11.30%)91 (10.64%)Primary Site, n(%) Head and neck7 (2.33%)36 (4.21%) Thoracic and breast8 (2.66%)10 (1.17%) Abdomen include retroperitoneum, liver, gastrointestinal and genitourinary29 (9.63%)40 (4.68%) Skin and tissue5 (1.66%)46 (5.38%) Bone and Bone marrow4 (1.33%)15 (1.75%) Lymph nodes and spleen248 (82.39%)708 (82.81%)SDW Separated, divorced, widowed A comparison of demographic and treatment characteristics between patients with and without early death among patients with PTCL-NOS SDW Separated, divorced, widowed Risk factors for early death from PTCL-NOS In the LASSO regression analysis, the lambda 1se criterion was selected by ten-fold cross-validation, retaining 12 variables with non-zero coefficients (Fig. 4A–C). The Boruta algorithm classified variables as important (green), tentative (yellow), or unimportant (red), and variables labeled as important or tentative were retained (Fig. 4D). By integrating the LASSO and Boruta results, seven overlapping predictors were identified: age, chemotherapy, radiotherapy, B symptoms, primary tumor site, Summary Stage, and Ann Arbor Stage (Fig. 4E). Fig. 4The LASSO regression analysis (A-C) and Boruta algorithm (D) were used to determine the important variables for early death of PTCL-NOS (E). a: include retroperitoneum, liver, gastrointestinal and genitourinary The LASSO regression analysis (A-C) and Boruta algorithm (D) were used to determine the important variables for early death of PTCL-NOS (E). a: include retroperitoneum, liver, gastrointestinal and genitourinary Model development and validation Seven machine learning models were developed using the seven predictors selected by Boruta and LASSO. XGBoost showed the highest AUROC in both the training and validation sets (0.842 and 0.774), followed by LR and KNN in the training set and LGBM and LR in the validation set. DT showed the lowest AUROC in both sets (0.764 and 0.667) (Fig. 5A–B). PR curve analysis further supported the favorable performance of XGBoost and LGBM in both the training and validation sets, whereas DT and KNN showed relatively poor performance (Fig. 5C–D). Calibration curves indicated better agreement between predicted and observed outcomes for LGBM, LR, XGBoost, and RF, while DT, KNN, and SVM showed poorer calibration (Fig. 5E–F). DCA showed that LGBM and XGBoost provided higher net benefits across a broad range of threshold probabilities than the other models (Fig. 5G–H). Fig. 5Seven machine learning-based predictive model in training and validation set. Receiver operating characteristic (ROC) curves (A-B). Precision-recall (PR)curve (C-D).Calibration curve (E-F). Decision curve analysis (G-H). Radar chart (I-J). LR: Logistic Regression, DT: Decision Tree, RF: Random Forest, XGB: Extreme Gradient Boosting (XGBoost), SVM: Support Vector Machine, KNN: K-Nearest Neighbors, LGBM: Light Gradient Boosting Machine Seven machine learning-based predictive model in training and validation set. Receiver operating characteristic (ROC) curves (A-B). Precision-recall (PR)curve (C-D).Calibration curve (E-F). Decision curve analysis (G-H). Radar chart (I-J). LR: Logistic Regression, DT: Decision Tree, RF: Random Forest, XGB: Extreme Gradient Boosting (XGBoost), SVM: Support Vector Machine, KNN: K-Nearest Neighbors, LGBM: Light Gradient Boosting Machine Brier score analysis further supported these results. In the validation set, XGBoost achieved the lowest Brier score (0.1614), followed by SVM (0.1699) and LR (0.1709), indicating favorable predictive accuracy. In contrast, RF showed a marked increase in Brier score from the training to validation set, suggesting potential overfitting, while KNN also showed limited generalizability (Table 3). Table 3Brier score of machine learning approaches for predicting early death among PTCL-NOSModelBrier scoreTraining setValidation setXGBoost0.1260 (0.1124–0.1392)0.1614 (0.1361–0.1882)SVM0.1392 (0.1249–0.1558)0.1699 (0.1448–0.1988)RF0.1182 (0.1002–0.1397)0.2197 (0.1817–0.2619)LR0.1220 (0.1079–0.1385)0.1709 (0.1448–0.1989)LGBM0.1652 (0.1520–0.1796)0.1874 (0.1665–0.2098)KNN0.1306 (0.1125–0.1508)0.2275 (0.1888–0.2694)DT0.1345 (0.1182–0.1515)0.1722 (0.1442–0.2022)LR Logistic Regression, DT Decision Tree, RF Random Forest, XGBoost Extreme Gradient Boosting, SVM Support Vector Machine, KNN K-Nearest Neighbors, LGBM Light Gradient Boosting Machine Table 3Brier score of machine learning approaches for predicting early death among PTCL-NOSModelBrier scoreTraining setValidation setXGBoost0.1260 (0.1124–0.1392)0.1614 (0.1361–0.1882)SVM0.1392 (0.1249–0.1558)0.1699 (0.1448–0.1988)RF0.1182 (0.1002–0.1397)0.2197 (0.1817–0.2619)LR0.1220 (0.1079–0.1385)0.1709 (0.1448–0.1989)LGBM0.1652 (0.1520–0.1796)0.1874 (0.1665–0.2098)KNN0.1306 (0.1125–0.1508)0.2275 (0.1888–0.2694)DT0.1345 (0.1182–0.1515)0.1722 (0.1442–0.2022)LR Logistic Regression, DT Decision Tree, RF Random Forest, XGBoost Extreme Gradient Boosting, SVM Support Vector Machine, KNN K-Nearest Neighbors, LGBM Light Gradient Boosting Machine Brier score of machine learning approaches for predicting early death among PTCL-NOS LR Logistic Regression, DT Decision Tree, RF Random Forest, XGBoost Extreme Gradient Boosting, SVM Support Vector Machine, KNN K-Nearest Neighbors, LGBM Light Gradient Boosting Machine Confusion matrix-based evaluation showed that LGBM and XGBoost achieved relatively balanced validation performance, with F1 scores of 0.516 and 0.511 and specificities of 0.821 and 0.837, respectively (Table 4). RF and DT performed well in the training set but showed reduced validation performance, suggesting limited generalizability. LR maintained stable performance, with a validation balanced accuracy of 0.660. Radar charts further supported the overall advantages of XGBoost and LGBM across multiple metrics, whereas KNN showed the weakest performance (Fig. 5I–J). Table 4Prediction performance of machine learning approaches for predicting early death among PTCL-NOSModelSensitivitySpecificityPPVNPVPrecisionRecallF1PrevalenceDetection RateDetection PrevalenceBalanced AccuracyTraining set LR0.7170.8590.6340.8990.6340.7170.6730.2530.1820.2870.788 DT0.7360.8550.5320.9350.5320.7360.6180.1830.1350.2530.796 RF0.7460.8990.7150.9130.7150.7460.730.2530.1890.2650.823 XGBoost0.7070.8660.6420.8970.6420.7070.6730.2530.1790.2790.787 SVM0.7170.8280.5860.8960.5860.7170.6450.2530.1820.310.772 KNN0.6490.9210.7350.8850.7350.6490.6890.2530.1640.2240.785 LGBM0.7070.8340.5920.8940.5920.7070.6440.2530.1790.3030.771Validation set LR0.50.8210.5160.8110.5160.50.5080.2770.1380.2680.66 DT0.6790.8010.3960.9280.3960.6790.50.1610.110.2770.74 RF0.4170.8490.5130.7920.5130.4170.460.2770.1150.2250.633 XGBoost0.490.8370.5340.8110.5340.490.5110.2770.1350.2540.663 SVM0.5520.7890.50.8220.50.5520.5250.2770.1530.3050.67 KNN0.3650.880.5380.7840.5380.3650.4350.2770.1010.1870.623 LGBM0.510.8210.5210.8140.5210.510.5160.2770.1410.2710.666LR Logistic Regression, DT Decision Tree, RF Random Forest, XGBoost Extreme Gradient Boosting, SVM Support Vector Machine, KNN K-Nearest Neighbors, LGBM Light Gradient Boosting Machine Table 4Prediction performance of machine learning approaches for predicting early death among PTCL-NOSModelSensitivitySpecificityPPVNPVPrecisionRecallF1PrevalenceDetection RateDetection PrevalenceBalanced AccuracyTraining set LR0.7170.8590.6340.8990.6340.7170.6730.2530.1820.2870.788 DT0.7360.8550.5320.9350.5320.7360.6180.1830.1350.2530.796 RF0.7460.8990.7150.9130.7150.7460.730.2530.1890.2650.823 XGBoost0.7070.8660.6420.8970.6420.7070.6730.2530.1790.2790.787 SVM0.7170.8280.5860.8960.5860.7170.6450.2530.1820.310.772 KNN0.6490.9210.7350.8850.7350.6490.6890.2530.1640.2240.785 LGBM0.7070.8340.5920.8940.5920.7070.6440.2530.1790.3030.771Validation set LR0.50.8210.5160.8110.5160.50.5080.2770.1380.2680.66 DT0.6790.8010.3960.9280.3960.6790.50.1610.110.2770.74 RF0.4170.8490.5130.7920.5130.4170.460.2770.1150.2250.633 XGBoost0.490.8370.5340.8110.5340.490.5110.2770.1350.2540.663 SVM0.5520.7890.50.8220.50.5520.5250.2770.1530.3050.67 KNN0.3650.880.5380.7840.5380.3650.4350.2770.1010.1870.623 LGBM0.510.8210.5210.8140.5210.510.5160.2770.1410.2710.666LR Logistic Regression, DT Decision Tree, RF Random Forest, XGBoost Extreme Gradient Boosting, SVM Support Vector Machine, KNN K-Nearest Neighbors, LGBM Light Gradient Boosting Machine Prediction performance of machine learning approaches for predicting early death among PTCL-NOS LR Logistic Regression, DT Decision Tree, RF Random Forest, XGBoost Extreme Gradient Boosting, SVM Support Vector Machine, KNN K-Nearest Neighbors, LGBM Light Gradient Boosting Machine Fig. 6Variable importance and SHAP interpretation of the XGBoost model. Importance ranking of features that have an impact on model prediction (A). Impact of each feature on model prediction (B).Individualized predictions of the model for one patient (C-D). Primary site: Abdomen(include retroperitoneum, liver, gastrointestinal and genitourinary); 0: indicates no event, 1: indicates the occurrence of an event. a : include retroperitoneum, liver, gastrointestinal and genitourinary Variable importance and SHAP interpretation of the XGBoost model. Importance ranking of features that have an impact on model prediction (A). Impact of each feature on model prediction (B).Individualized predictions of the model for one patient (C-D). Primary site: Abdomen(include retroperitoneum, liver, gastrointestinal and genitourinary); 0: indicates no event, 1: indicates the occurrence of an event. a : include retroperitoneum, liver, gastrointestinal and genitourinary Overall, multidimensional evaluation of discrimination, calibration, prediction error, clinical utility, and validation performance indicated that XGBoost had the most robust overall performance and was selected as the optimal model for predicting early death. Optimal models interpretability and feature importance Given the superior overall performance of XGBoost, feature importance and SHAP analyses were performed to interpret its predictions. Feature importance based on the “Cover” metric showed that B symptoms, Ann Arbor stage IV, and chemotherapy contributed most to model prediction (Fig. 6A). SHAP analysis illustrated the contribution of the seven predictors in the XGBoost model (Fig. 6B). Positive SHAP values indicated increased model-predicted risk of early death, whereas negative values indicated reduced risk. Chemotherapy and younger age were associated with negative SHAP values, suggesting lower predicted risk. Individual-level SHAP decomposition further explained the prediction for a representative patient, with a final SHAP value of − 1.55 and a predicted early death probability of 17.5% (Fig. 6C–D). Discussion Peripheral T-cell lymphoma, not otherwise specified (PTCL-NOS), is a highly heterogeneous and aggressive subtype of lymphoma. Several previous studies have attempted to develop prognostic models for peripheral T-cell lymphoma [8–10]. However, research on predictive models for early death in PTCL-NOS remains extremely limited, and there is a lack of effective tools to support early intervention and personalized treatment strategies. This patient population typically exhibits poor prognosis and significantly shortened survival, with a particularly high risk of early mortality [11]. Early risk stratification is crucial for improving clinical management and patient outcomes. Therefore, developing an accurate and efficient predictive model for early death is not only necessary but also urgent, as it can provide clinicians with robust decision-making support and play a critical role in disease management. In this study, based on PTCL-NOS data from the SEER database, seven key risk factors were identified: chemotherapy, radiotherapy, age, B symptoms, primary tumor site, Summary Stage, and Ann Arbor Stage. These findings align with clinical experience and existing prognostic indicators. Notably, Chemotherapy was associated with a lower predicted risk of early death in our model, which is consistent with current clinical guidelines, highlighting the crucial role of chemotherapy in the management of lymphoma. Furthermore, with the emergence of an increasing number of novel agents, the combination of CHOP (cyclophosphamide, doxorubicin, vincristine, prednisone) with new therapies has led to improved remission rates and significantly prolonged survival [12, 13]. Radiotherapy was also associated with a lower predicted risk of early death, but this finding should be interpreted cautiously for the same reason, particularly because radiotherapy may have been used selectively in patients with limited-stage disease or better performance status. However, radiotherapy alone does not appear to significantly improve OS in PTCL-NOS [14]. Combined chemoradiotherapy may be beneficial for selected early-stage patients [15]. Age is a well-established key factor influencing survival in cancer patients. Multiple studies developing prognostic models for PTCL have identified age as an independent risk factor, which is consistent with our findings [9, 10]. Elderly patients generally have a higher disease burden, impaired immune function, and reduced treatment tolerance, making them more susceptible to adverse events and an increased risk of mortality [16, 17]. In our study, 47.51% of patients who experienced early death were aged ≥ 74 years. B symptoms, including fever, night sweats, and weight loss, are common clinical manifestations in lymphoma and are often associated with higher tumor burden, increased disease aggressiveness, and poor prognosis. As a risk factor, the presence of B symptoms typically indicates rapid disease progression and unfavorable outcomes [18]. In 2023, Ludvigsen et al. conducted a study on 239 PTCL patients and identified B symptoms as a key determinant of survival outcomes [19]. Consistently, our study found that B symptoms were an independent risk factor for early death in PTCL-NOS, aligning with previous research. Similarly, advanced tumor stage is often indicative of high tumor aggressiveness, increased disease burden, and shortened survival. Accurate baseline staging should also be emphasized. Because Ann Arbor stage and primary tumor site were important predictors in our model, complete whole-body assessment at diagnosis is essential for accurate staging and extranodal disease mapping. Imaging and tissue-confirmation approaches, including FDG-PET/CT, contrast-enhanced CT, spleen-focused ultrasonography, and endoscopic ultrasound-guided fine-needle aspiration in selected cases, may improve the detection of occult nodal, extranodal, subdiaphragmatic, or splenic involvement. Such assessment may reduce stage misclassification, guide front-line treatment decisions, and improve the reliability of prognostic risk stratification [20–22]. Numerous studies have demonstrated that patients with late-stage disease have significantly poorer prognoses and shorter OS compared to those diagnosed at an earlier stage [18, 23–25]. Our study yielded similar results, with late-stage disease observed in 72.15% (Summary Stage: Distant) and 72.57% (Ann Arbor Stage: III + IV) of the overall cohort. However, among patients who experienced early death, these proportions markedly increased to 82.39% (Summary Stage: Distant) and 83.39% (Ann Arbor Stage: III + IV), further emphasizing the prognostic impact of disease stage. In 2023, Davis et al. investigated the impact of the primary tumor site on survival outcomes in PTCL-NOS. Their study revealed that PTCL-NOS originating in the gastrointestinal tract, genitourinary system, thorax, and breast was significantly associated with lower survival rates, whereas cases arising from the bones, soft tissue, and skin exhibited higher survival rates [25]. Consistently, our study also found that primary tumors originating in the gastrointestinal tract, genitourinary system, thorax, and breast exhibited high variable importance in our predictive model, suggesting a strong association with an increased risk of early death. In contrast, tumors arising from the bones, soft tissue, and skin had a relatively smaller impact on early mortality. Notably, for certain primary sites, higher feature values were correlated with poorer survival outcomes. This may be attributed to the increased likelihood of these tumors developing into more aggressive forms or the challenges associated with treatment, leading to suboptimal therapeutic efficacy. Interestingly, our study identified that tumors originating in the lymph nodes and spleen had a significant impact on the risk of early death in PTCL-NOS. This finding suggests that, as common primary sites, the lymph nodes and spleen may have been homogenized in certain studies, potentially masking their underlying prognostic significance. In recent years, machine learning techniques have gained widespread recognition in cancer prediction, particularly in assessing survival and mortality risk. Existing studies suggest that machine learning models offer significant advantages over traditional statistical models in handling high-dimensional data and capturing complex relationships among variables. For instance, in 2019, Weng et al. utilized ML models to predict premature mortality and found that their performance surpassed that of conventional methods [26]. Similarly, in 2024, Lim et al. developed a real-time ML model that demonstrated exceptional sensitivity and specificity in predicting short-term mortality among critically ill patients [27]. Based on these key risk factors, we further developed and validated a machine learning-based model to predict early mortality risk in PTCL-NOS patients. By integrating multiple advanced machine learning algorithms with large-scale data from the SEER database, our study achieved significant advancements in both model performance and clinical applicability. Among the evaluated models, XGBoost demonstrated the best performance, achieving an AUROC of 0.842 in the training set and 0.774 in the validation set. This performance surpassed that of traditional statistical models and aligned with previous studies utilizing machine learning for predictive modeling. For example, in 2023, Chung et al. developed an XGBoost model to predict 1-year and 5-year survival in postoperative gastric cancer patients, achieving AUROC values of 0.8237 and 0.8903 in internal and external validation, respectively. Their findings further confirmed the superiority of XGBoost in handling high-dimensional data and modeling nonlinear relationships [28]. Our study also validated the model’s precision using AUPRC and confirmed its predictive capability through Brier score analysis. Additionally, DCA demonstrated that XGBoost provided higher net benefits across various clinical decision thresholds, highlighting its potential in risk stratification and clinical decision-making. A comprehensive evaluation using the confusion matrix further confirmed the stability of XGBoost. Compared with traditional logistic regression, XGBoost exhibited superior predictive accuracy and generalization ability in this study. Moreover, model interpretability was achieved through SHAP value analysis and feature importance evaluation, which revealed the critical role of predictive factors at both global and individual levels. This study leveraged the large-scale SEER database, incorporating comprehensive demographic and clinical characteristics to ensure the broad applicability of the findings. Additionally, rigorous variable selection and model validation were conducted following strict scientific protocols. By integrating Boruta and LASSO algorithms, we ensured the robustness of predictive factors and the reliability of model performance. Furthermore, multiple machine learning algorithms were introduced, with XGBoost outperforming traditional statistical models in both the training and validation sets. This highlights its superior ability to handle high-dimensional data and complex variable relationships. Multidimensional model evaluations further validated the reliability and practicality of the proposed approach. The interpretability of the model, achieved through SHAP value analysis, enhances its potential for clinical translation, making the predictive outcomes more intuitive and credible for clinicians. Moreover, this study addresses a critical gap in predicting early mortality risk in PTCL-NOS patients, providing a novel tool for patient stratification and personalized treatment planning. This study addresses an important gap in predicting early death risk among patients with PTCL-NOS and provides a practical tool for risk stratification. However, several limitations should be acknowledged. First, important clinical and molecular variables, including CD30 expression, lactate dehydrogenase levels, ECOG performance status, and comorbidities, were unavailable in SEER, which may have limited model refinement. Treatment-related variables should also be interpreted cautiously because SEER records chemotherapy and radiotherapy only as binary variables and lacks regimen-level details, including specific drugs, doses, treatment intensity, sequence, line of therapy, treatment combinations, treatment intent, and novel-agent use. Therefore, treatment-related predictors in our model should be interpreted as associations rather than causal effects, and residual confounding related to treatment selection or combined modality treatment may remain. Moreover, in aggressive lymphomas, novel agents and intensified regimens, including high-dose liposomal anthracycline-based and brentuximab vedotin strategies, have been increasingly explored, suggesting that treatment advances may affect patient outcomes and model performance [29]. Nevertheless, given the rarity of PTCL-NOS and the scarcity of large-scale datasets with detailed molecular and treatment information, this study remains valuable by identifying readily available prognostic factors in a nationally representative cohort. Finally, the U.S.-based population and lack of external validation may limit generalizability. Future studies should validate and recalibrate this model in contemporary multicenter and multinational cohorts receiving modern front-line therapies. Conclusion This study demonstrates that machine learning models, particularly XGBoost, exhibit significant advantages in predicting early mortality in PTCL-NOS patients. Most existing prognostic studies have primarily focused on clinical variables, while research integrating epidemiological factors with clinical indicators for assessing the risk of early mortality remains limited. This study partially addresses this gap by constructing a predictive model based on the integration of multidimensional data. The application of these models in clinical practice can assist clinicians in early identification of high-risk patients and facilitate the development of personalized treatment strategies. Future efforts should focus on further optimization and validation of these models to fully harness the potential of machine learning in PTCL-NOS prognostic prediction. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Supplementary Material 1