Machine learning approaches for predicting differentiated thyroid cancer recurrence using thyroglobulin levels and whole-body scans: a retrospective cohort study Authors: Reza Nouri, Erfan Ayubi, Shiva Borzouei, Sajjad Farashi Published: 2026 ABSTRACT AbstractAlthough thyroid cancer generally has a good prognosis, some patients are prone to recurrence. Multiple factors influence recurrence risk. Machine learning (ML) algorithms offer potential for more accurate and precise prediction. The aim of the present study was to evaluate recurrence related factors in thyroid cancer patients using ML algorithms. This retrospective cohort study included patients with differentiated thyroid cancer who, after undergoing total thyroidectomy and ablation with radioactive iodine (RAI) were followed up over a ten-year period. Demographic data, tumor characteristics, and treatment details were extracted from medical records. Six ML algorithms were employed including logistic regression, Naïve Bayes classifier, decision tree, random forest, XGBoost and LightGBM. A total of 355 patients were included (mean age: 41.69 14.04 years, 84.22% female). Among ML algorithms, XGBoost demonstrated superior predictive performance, achieving an accuracy of 97.66(± 2.34) % and an area under the curve of 0.99. The top predictors were the number of recurrences, first-year stimulated thyroglobulin level, regional node involvement, and first response to treatment, respectively. This study also proposed the use of whole-body scans only for high-risk patients.Supplementary InformationThe online version contains supplementary material available at https://doi.org/10.1038/s41598-026-57559-2.Keywords: Differentiated thyroid cancer, Recurrence, Thyroglobulin, Machine learningSubject terms: Cancer, Computational biology and bioinformatics, Endocrinology, Oncology, Risk factors Introduction Thyroid cancer is the most common malignancy of the endocrine system, accounting for approximately 820,000 new cases worldwide and ranking as the seventh most common cancer in 20221. There is a geographical inequality in the incidence of thyroid cancer around the world, with higher rates observed in high-income countries1,2. Thyroid cancer incidence rates in low- and middle-income countries have also emerged as a public health challenge. One of the reasons for the increased incidence is the early diagnosis of this disease due to the increased use of ultrasound and fine needle aspiration under ultrasound guidance3. In addition, nowadays, models designed with the help of artificial intelligence are also very helpful in correctly diagnosing thyroid cancer and preventing invasive and unnecessary surgeries4. Thyroid cancer generally has a good prognosis; however, outcomes such as recurrence remain a significant challenge in some patients. According to the literature, a combination of factors related to treatment approaches, tumor characteristics, clinicopathological features and demographic variables has been identified as predictors of recurrence5–9. These factors vary in their strength of association and predictive performance across populations5,9. Accurate assessment of the impact of predictors on outcome prediction requires rigorously developed and validated predictive models. Advances in bioinformatics and machine learning (ML) algorithms have enabled researchers to develop models that efficiently predict the occurrence of outcomes across various medical fields. ML algorithms identify complex patterns within data, while capturing intricate interactions between variables and the output10,11. Stimulated and non-stimulated thyroglobulin (Tg) tests are commonly used for long-term monitoring of cancer recurrence12,13. In addition, postoperative stimulated Tg level is considered a crucial marker for more effective risk stratification in differentiated thyroid cancer14. It is hypothesized that combining Tg levels with imaging, tumor characteristics, and demographic data can improve the accuracy and precision of recurrence prediction. ML has been employed to predict outcomes such as incidence, malignancy, and metastasis in thyroid cancer research15–21. However, studies focusing on recurrence prediction using these algorithms remain scarce22. Given this gap, the present study aims to predict thyroid cancer recurrence by integrating treatment-related factors, tumor characteristics, and demographic variables, applying ML algorithms in a sample of Iranian thyroid cancer patients. Materials and methods Participants, study design, and variables This retrospective cohort study included 355 thyroid cancer patients (56 males and 299 females; mean age of 41.69 years) with differentiated thyroid cancer who, after total thyroidectomy and ablation with radioactive iodine (RAI), were followed at the university endocrinology subspecialty clinic in Hamadan, Iran over a 10-year period. Demographic and clinical data were recorded for participants. Variables collected included age, gender (male, female), history of thyroid cancer in first-degree relatives (yes, no), pathology type (MPTC: micropapillary thyroid carcinoma, PTC: papillary thyroid carcinoma, FTC: follicular thyroid carcinoma, OTC: oncocytic thyroid carcinoma), co-existing thyroid disorder (euthyroid, hyperthyroid, hypothyroid), classification of tumors according to the TNM system (primary tumor, regional lymph nodes, distant metastasis), thyroid cancer staging (I, II, III, IV), response to treatment according to the ATA guidelines including excellent response (non-stimulated Tg < 0.2 or stimulated Tg < 1 and negative imaging), indeterminate response (nonspecific findings on imaging studies or non-stimulated Tg 0.2-1 or stimulated Tg 1–10 ), biochemically incomplete response (non-stimulated Tg > 1 or stimulated Tg > 10 and negative imaging), structurally incomplete response (structural evidence of disease with suspicious imaging or biopsy proven local or distant metastatic disease23), tumor recurrence status, the location of recurrence, and the final outcome i.e. alive or dead due to thyroid cancer, whole-body scan (WBS) and Tg value. A positive WBS means the presence of uptake in the cervical lymph nodes and distant metastases. Although all patients underwent 10- year follow-up, only the first-year Tg levels and WBS were used for developing a predictive model. First-year Tg levels were measured at 6 months after total thyroidectomy using Electrochemiluminescence assay. Tg values were classified as stimulated Tg or non-stimulated Tg. These two measurements were analyzed separately in ML models. Recurrence was defined based on biochemical (elevated level of serum Tg) and/or structural findings (as confirmed by imaging and/or biopsy) following the diagnosis and initial treatment. To categorize the age variable, available samples were divided into three groups including adolescent and young adults (< 35 years), middle-aged (35 to 55 years), and older adults (> 55 years old). Pathology type was considered to be PTC versus other types (including FTC, OTC and MPTC), primary tumor (T) was considered to be in six categories including (T1a, T1b, T2, T3a, T3b, and T4), lymph node involvement (N) was categorized as two groups (N0 and N1), distant metastasis (M) was divided into two distinct groups (M0, M1) and recurrence status (number of recurrences) was considered to be no recurrence (0) or at least one recurrence that occurred in the first year of evaluation. Using a one-hot-encoding strategy, categorical variables were transformed into numerical vectors for input into the ML models. Descriptions of these variables, their possible categories, and distributions within the cohort are provided in Table 1. Table 1Summary of participants’ profile.VariableDistribution n (%)Mean (std)DescriptionAge41.69(14.04) yearAge of participant in yearGender Male56 (15.77)Gender of participant Female299 (84.22)History of thyroid cancer in first degree Yes19 (5.35)Is there any first order relative with thyroid cancer? No326 (94.65)Co-existing thyroid disorder Euthyroid229 (92.68)Co-existing thyroid disorder including euthyroid, Hypothyroidism, and Hyperthyroidism Clinical hypo thyroid8 (2.25) Sub-clinical hypo thyroid10 (2.82) Clinical hyper thyroid5 (1.41) Sub clinical hyper thyroid2 (0.85)Pathology type MPTC37 (10.42)Pathology type. It can be micro papillary thyroid carcinoma (MPTC), papillary thyroid carcinoma (PTC), follicular thyroid carcinoma (FTC), Oncocytic thyroid carcinoma (OTC), pink-staining cytoplasm PTC284 (80.00) FTC20 (5.62) OTC14 (3.94)Primary tumor T1a42 (11.82)Size and extent of tumor. It can be T1 to T4 T1b85 (23.94) T2166 (46.76) T3a52 (14.65) T3b5 (1.41) T4a4 (1.12) T4b1 (0.28)Nodes involvement N0248 (69.86)The extent of cancer spread to lymph nodes. It can be N0 or N1 with subcategories (i.e. a or b). N1a22 (6.20) N1b85 (23.94)Distance metastasis M0339 (95.49)The extent of metastasis. It can be M0 or M1 with subcategories M116 (4.51)Staging I322 (90.96)Thyroid cancer stages range from I through IV II22 (6.21) IVb10 (2.82)First response to treatment Excellent168 (47.32)It refers to the initial assessment of effectiveness of treatment, based on imaging and thyroglobulin Bio-chemical incomplete58 (16.34) Structural incomplete55 (15.49) Indeterminate74 (20.75)Final outcome Dead6 (1.69)Was the patient deceased vs. alive at the final follow-up? Alive349 (98.31)Tumor recurrence No292 (82.25)Did the tumor relapse once more? Yes62 (17.75)First year stimulated Tg57.45 (289.18)Level of thyroglobulin in the blood after TSH stimulationFirst year non-stimulated Tg7.87 (49.38)Tg level measured during normal thyroid hormone therapyWhole-body scan (WBS) Negative83 (69.17)I-1I-31 (radioiodine) whole-body scan Positive38 (31.67) Summary of participants’ profile. Machine learning This study aims to investigate the association between thyroid cancer recurrence and demographic and clinicopathological characteristics, Tg levels and WBS. To identify these associations, both statistical and ML approaches were incorporated. In supervised ML methods, a dataset with known labeled samples was used to train and test a predictive model for finding the label of an unseen sample. By using Tg levels, whole body scan, ultrasonography and biopsy during the follow-up period, a label was assigned to the patient as “recurrence” or “non-recurrence”. This study incorporated multiple ML algorithms including logistic regression, Naïve Bayes classifier, decision tree, random forest, XGBoost24, and LightGBM25. For all ML methods, 10% of the data was used for classifier optimization using a nested cross-validated grid search method. In such methods, predefined values for hyperparameters were passed to the GridSearchCV function of the Sklearn module of Python. This function finds the optimized parameters by implementing a “fit” and a “score” method. The predefined parameters for different classifiers were as follows. For logistic regression [‘l1’, ‘l2’] as penalty, regularization parameter was optimized in [− 4, 4] range (50 values), for Naïve Bayes, the portion of the largest variance of all variables that is added to variances for calculation stability was optimized in log scale (0, − 9); for the decision tree the criterion method was optimized between ‘gini’ and ‘entropy’, and the max tree depth was optimized in [2, 4, 6, 8, 10, 12] vector. For random forest the predefined parameters were number of estimators: [25, 50, 100, 150], ‘max_features’: [‘sqrt’, ‘log2’, None], maximum depth: [3, 6, 15], maximum leaf nodes: [3, 6, 9]; for XGBoost the predefined parameter set were number of estimators: stats.randint(150, 300), learning rate: stats.uniform(0.01, 0.5), ‘subsample’: stats.uniform(0.3, 0.6), maximum of depth: [3, 6, 9], ‘colsample_bytree’: stats.uniform(0.5, 0.4), ‘min_child_weight’: [1, 2, 4], and finally for LightGBM the predefined parameters were number of levels: [5, 20, 31], learning rate: [0.05, 0.1, 0.2], number of estimators: [50, 100, 150]. For random forest, XGBoost, and LightGBM a random search strategy was used. After ML model parameter optimization, training data was used for model training and testing. In this step, to address the issue of class imbalance, the synthetic minority oversampling technique (SMOTE) algorithm was employed during the model training phase. SMOTE was integrated directly into the modeling pipeline (using imblearn.pipeline). This approach ensureed that oversampling was applied exclusively to the training data within each cross-validation fold, effectively preventing any data leakage into the validation/test sets. To prevent overfitting, a repeated, nested, stratified cross-validation (CV) approach was employed, in which the 10-fold cross-validation was repeated five times and the mean performance value was reported. Statistical analysis and performance measures For numerical variables, when the Shapiro-Wilk test confirmed the normality of the variable, analysis of variance (ANOVA) and post-hoc analysis using Tukey’s HSD were conducted to identify the sources of the observed differences. In cases of non-normality, the Kruskal-Wallis test and Dunn’s test were applied. The Bonferroni method was also used for p-value correction. The significance level was set to 0.05. Additionally, to evaluate the performance of the discrimination models, measures such as accuracy, precision, recall, F1-score, and the area under the receiver operating characteristic curve (AUC) were calculated. The definitions for these metrics are provided in Eq. (1). . In Eq. (1), TP, TN, FP, and FN denote true positives, true negatives, false positives (type I error), and false negatives (type II error). The mean (± standard deviation) of these values for multiple iterations was reported . In this study, data preprocessing, model development, and performance evaluation were conducted using Python libraries including NumPy and pandas for data handling, SciPy for statistical operations, scikit-learn for machine-learning algorithms and evaluation metrics, imbalanced-learn for handling class imbalance (SMOTE), LightGBM, and XGBoost for gradient-boosting models, TensorFlow for supplementary computational support, and Matplotlib/Seaborn for visualization. Results Thyroglobulin value comparison between subgroups Tg value, stimulated or non-stimulated, is one of the primary biomarkers for differentiated thyroid cancer assessment. In the current dataset, Tg levels were the only numerical variable, while other variables were categorical. In this section, statistical analyses for comparing Tg levels between different subgroups (considering other variables) were reported. Furthermore, in the current dataset, variables including ‘history of thyroid cancer in first-degree relatives’, ‘coexisting thyroid disorder’, ‘survival outcome’, ‘TNM system’, ‘staging’, and ‘gender’ were highly imbalanced. Accordingly, subgroup analysis was not conducted for these variables. There was a significant difference between stimulated Tg values of different age categoris (i.e. adolescent and young adults (< 35 years old), middle-aged (36–55) and elderly (> 55 years old)). Kruskal-Wallis test confirmed between-group differences (H(2) = 8.400, p = 0.015). Post-hoc analysis using Dunn’s test revealed that stimulated-Tg was significantly higher in the elderly and middle-aged groups compared with the adolescent group (corrected Bonferroni p = 0.011). For non-stimulated Tg according to Kruskal–Wallis test, no significant difference between subgroups was observed (H(2) = 4.810, p = 0.0903). For both stimulated and non-stimulated Tg, Kruskal-Wallis test revealed that there was no significant difference between PTC and other thyroid cancer types (H(1) = 3.223, p = 0.0726, and H(1) = 0.054, p = 0.8156, respectively). Considering the first response to treatment (i.e. ‘excellent response’, ‘biochemically incomplete response’, or ‘structurally incomplete response’), a significant difference between subgroups was found by Kruskal-Wallis test for stimulated Tg values (H(2) = 9.528, p = 0.008). The post hoc Dunn’s test revealed that the significant difference was observed between the ‘biochemically incomplete response’ and ‘structurally incomplete response’ groups (Bonferroni-corrected p = 0.022). For non-stimulated Tg, no significant differences were found between subgroups (H(2) = 2.656, p = 0.27). For TNM primary tumor classification (primary tumor including T1a, T1b, T2, and T3a), the Kruskal-Wallis test showed no significant differences in neither stimulated or non-stimulated Tg values among groups (H(3) = 3.60, p = 0.31, and H(3) = 2.83, p = 0.42, respectively). Graphical representation for stimulated and non-stimulated Tg levels for different subgroups was shown in supporting materials (Figs. s1 and s2). Machine learning outputs A primary objective of this study was to predict the recurrence of differentiated thyroid cancer using the variables described in Table 1. Models were specifically trained and tested using demographic data and first-year clinical assessments. This means that even though longitudinal data for all patients, such as Tg levels and whole-body scan, were available, only the values for the first-year follow-up were used (i.e. Tg levels and whole-body scan for the first year). Table 2 reports the performance metrics of different ML approaches for predicting the cancer recurrence according to the variables described in Table 1. For some patients, depending on the endocrinologist’s clinical judgement, the value for stimulated Tg was measured, while for others the non-stimulated Tg level was assessed. Results in Table 2 present the performance of different ML models for both stimulated and non-stimulated Tg levels. According to Table 2, the best classifier for cancer recurrence prediction based on non-stimulated Tg was LightGBM. The performance metrics for thyroid cancer prediction were degraded when non-stimulated Tg was used compared with stimulated Tg. In a clinical setting, if the non-stimulated Tg is above 10 ng/mL or is rising, stimulated Tg and a diagnostic whole-body scan are used26. Table 2Performance of machine learning approaches for predicting recurrence of thyroid cancer.Prediction modelAccuracy (%)Precision (%)Recall (%)F1-score (%)AUC*100Stimulated Tg (n = 120) Logistic regression96.56 (± 6.34)95.82(± 11.83)93.00 (± 17.51)92.71 (± 13.14)99.69(± 1.52) Bayes Naïve89.78 (± 6.23)100.00 (± 0.00)60.00(± 25.47)71.70 (± 20.90)89.19(± 1.12) Decision tree95.84(± 4.30)92.38(± 9.98)92.67(± 9.04)92.13 (± 7.61)94.77(± 5.39) Random forest97.21(± 2.28)96.90(± 6.21)92.67(± 9.04)94.28(± 4.76)99.88(± 0.37) XGBoost 97.66(± 2.34) 98.33(± 5.00) 92.67(± 9.04) 95.05 (± 5.00 99.51(± 0.96) LightGBM94.48 ± 3.4492.40 ± 9.6486.67 ± 12.5688.50 ± 7.5899.45 ± 0.89Non-stimulated Tg (n = 235) Logistic regression88.70 (± 5.14)62.31 (± 11.01)86.79 (± 12.04)72.41 (± 11.48)91.84 (± 7.21) Bayes Naïve86.88 (± 2.41)91.67 (± 17.08)24.46 (± 10.72)37.53 (± 13.62)92.16 (± 6.89) Decision tree89.83 (± 3.76)71.02 (± 11.05)67.32 (± 14.49)68.60 (± 11.96)88.18 (± 7.61) Random forest90.05 (± 4.07)70.93 (± 12.90)72.86 (± 14.06)71.12 (± 11.48)92.33(± 6.00) XGBoost90.51(± 4.25)73.80(± 14.53)67.68(± 18.67)69.76 (± 14.60)92.44(± 7.00) LightGBM 92.10 ± 2.76 78.36 ± 12.99 75.18 ± 14.07 75.60 ± 9.4 91.05 ± 7.09 Performance of machine learning approaches for predicting recurrence of thyroid cancer. Given that stimulated Tg is preferable to non-stimulated Tg for recurrence prediction, this study specifically focused on the model trained with stimulated Tg. Based on the results in Table 2, the XGBoost model obtained the best classification accuracy when stimulated Tg was used. The best values for XGBoost parameters were as follows: {‘xgb__colsample_bytree’: 0.65, ‘xgb__learning_rate’: 0.49, ‘xgb__max_depth’: 9, ‘xgb__min_child_weight’: 1, ‘xgb__n_estimators’: 170, ‘xgb__subsample’: 0.39}. Consequently, the importance of different features for this classifier according to the permutation feature importance method was plotted in Fig. 1. In this method, the importance of features was calculated using the decrease in model performance. According to this figure, the most informative features for thyroid cancer recurrence prediction were the number of recurrences, the first-year stimulated Tg level, lymph-node involvement (n_Category), and the first response to treatment. Feature importance for XGBoost classifier in the stimulated Tg group. Mean values with standard deviation for the weight of each feature during nested cross-validation are shown in this plot. Furthermore, to evaluate the importance of features, a SHapley Additive exPlanations (SHAP) feature importance framework was used. Figure 2 shows the SHAP summary bar plot and SHAP beeswarm plot for the features included in the model. According to the SHAP analysis (Fig. 2), the five main variables for the prediction of thyroid cancer recurrence were the number of recurrences, the first-year stimulated Tg, age, lymph-node involvement (n_Category), and the first response to treatment. SHAP analysis for the importance of features. Left panel: SHAP summary bar plot, right panel: SHAP beeswarm plot. Results shown in Figs. 1 and 2 suggest differences in the importance of included features. To determine whether the performance of the predictive model was preserved with a reduced number of features, a feature reduction scheme was applied. To identify the most informative predictors and reduce model complexity, the best features were selected according to the best-performing model (XGBoost model for stimulated Tg and LightGBM model for non-stimulated Tg group) and using a permutation feature importance strategy. After training the optimized model on the full feature set, the decrease in predictive performance (using AUC) resulting from randomly permuting each variable was computed. The mean importance score across 25 permutation repeats was calculated for each feature. Features with importance values greater than half of the overall mean importance value were retained for subsequent modeling. This data-driven threshold allowed preservation of variables with meaningful contributions to model discrimination while removing those with minimal predictive value, thereby improving model interpretability and reducing the risk of overfitting. Table 3 shows how prediction performance was affected when the reduced feature set was used for thyroid cancer recurrence. Table 3Prediction performance of the best classifier using a reduced feature set and repeated cross-validation in both stimulated (n = 120) and non-stimulated (n = 235) Tg groups.Accuracy (%)Precision (%)Recall (%)F1-score (%)AUC*100Non-stimulated Tg (selected features: t_Category, first_response_to_treatment, first_year_nstg), Classifier: LightGBM 86.23 ± 3.0681.50 ± 12.5779.23 ± 9.8679.23 ± 9.8693.31 ± 4.94Stimulated Tg (selected features: first_response_to_treatment, number_of_recurrence, first_year_stg, n_category), Classifier: XGBoost 96.70 ± 1.6594.29 ± 7.0093.81 ± 7.6293.57 ± 3.2699.41 ± 0.99 Prediction performance of the best classifier using a reduced feature set and repeated cross-validation in both stimulated (n = 120) and non-stimulated (n = 235) Tg groups. The confusion matrix of the XGBoost classifier is also shown in Fig. 3 (right panel). Furthermore, a 3D scatter plot of the first three principal components of the feature space is shown in Fig. 3 (left panel). This representation shows a relatively well-separated distribution in the feature space. This finding supports the discriminative capability of the selected feature set of this study and emphasizes the high classification accuracy that achieved by most ML models. 3D scatter plot of the first three principal components of the feature space obtained by PCA (left) and the confusion matrix for the XGBoost classifier (right). Cost-effectiveness model for assessing whole body scan importance In some patients, but not all, a diagnostic WBS with radioactive iodine 123I is used for follow-up and monitoring23. To assess the role of WBS in predicting thyroid tumor recurrence, a cost-effectiveness model27 was employed using the best-performing ML model identified in the results of this study (i.e. XGBoost for stimulated Tg group). For this analysis, the expected cost curve (cost with and without WBS) and net reclassification improvement (NRI) were calculated28. The expected cost plot illustrates how the economic impact of each strategy changes across different threshold values. The costs for FN and FP (C_FN and C_FP) in thyroid cancer recurrence prediction were chosen according to the local health system costs and the expert elicitation considering two different scenarios (high and low C_FN/C_FP). Figure 4 shows the expected cost for including WBS in the predictive model considering these two scenarios. Expected cost plot for the effect of WBS in recurrence prediction under different scenarios. (A) High (C_FN/C_FP = 50), (B) moderate (C_FN/C_FP = 10). Categorical NRI was applied using four predefined risk categories to assess the incremental value of adding WBS to the prediction model. According to the 2025 ATA Differentiated Thyroid Cancer Guidelines, four categories were proposed for risk of recurrence (ROR) including low risk, low–intermediate risk, intermediate–high risk, and high risk23. The results for the 4-level NRI were NRI (recurrence) = − 0.0536; NRI (non-recurrence) = 0.0062; NRI (total) = − 0.0473. Discussion The XGBoost classifier achieved the highest accuracy for tumor recurrence prediction (97.66 ± 2.34%). Other types of classifiers also attained high classification accuracy (> 88%). To avoid model over-fitting, biases due to class imbalance, and to prevent data leakage, several strategies including repeated nested cross-validation, data augmentation using SMOTE, and stratified cross-validation were used. Results demonstrate the predictive potential of the variables described in Table 1 for estimating future thyroid tumor recurrence. The discriminative capability of these features was shown in Fig. 3. The predictive performance of the feature set used in the present study was superior to that reported in similar studies. For example, Schindele et al. proposed an XGBoost model using biomarker and clinical features (including age, primary tumor, and serum Tg level) for thyroid cancer prediction29. The area under curve for their model was 0.88 . The primary tumor size and Tg levels were the most-informative predictors for thyroid recurrence prediction. Xi et al. used a dataset consisting of demographic information, thyroid test measures, nodule characteristics, and six ML methods including gradient boosting machine, logistic regression, linear discriminant analysis, SVM with radial or linear kernel, and random forest to predict nodule malignancy21. According to the results, the random forest model achieved the highest prediction accuracy (78.01%, 95% CI: 0.7670, 0.7930). In another study, Gu et al. proposed a model to predict metastasis of thyroid cancer based on demographic and laboratory tests17. Using the XGBoost model, the best accuracy was 77% for predicting benign versus malignant tumors and 70% for predicting lymph node metastasis. Mao et al. utilized a dataset from the SEER database and used an XGBoost classifier to propose a predictive model for the risk of thyroid cancer recurrence. The model achieved a predictive performance with an AUC of 90.4% and identified age, marital status, TNM category, and surgical methods as the most important risk factors for cancer survival30. In the study by Park and Lee , a dataset was created using demographic, clinicopathological, and ultrasound-extracted parameters and several classifiers were used to develop a predictive model. Using a decision tree classifier, maximum F1-score of 28% was achieved, indicating limited prediction performance with the used dataset. Age, tumor size, and lymph node ratio were among the most informative features22. In another study, Kim et al. utilized a dataset comprising of clinical, genetics, laboratory, and pathological data to develop a predictive model using inductive logic programming31. The tumor recurrence prediction accuracy of this model was 71.4%, while the most-informative parameters were Tg level, body mass index, anti Tg antibody level, TSH, primary tumor, and lymph node involvement31. According to the results reported in Tables 2 and 3, stimulated Tg was a more informative variable for recurrence prediction when compared to non-stimulated Tg. Furthermore, statistical analyses showed that while stimulated Tg significantly differentiated treatment response subgroups, non-stimulated Tg did not. This finding is consistent with current ATA guidelines which provide evidence regarding the predictive power of stimulated Tg in intermediate- to high-risk patients23. According to the results of this study, considering XGBoost as the best classifier, stimulated Tg values, and the permutation feature importance strategy, the most informative features for tumor recurrence prediction were the number of recurrences, first-year stimulated Tg, n_Category, and first response to treatment, respectively. While the SHAP analysis revealed that the number of recurrences, first-year stimulated Tg, age, n_Category, and first response to treatment were the five most important predictors for thyroid cancer prediction. These analyses revealed different weights among the included features for recurrence prediction. According to Table 3, reducing the size of the feature space and considering only the most-informative features degraded the performance of the prediction model. This implies that all features should be considered for the more accurate prediction of thyroid cancer recurrence. WBS is a conventional tool for investigating thyroid cancer. However, this approach has several side effects and drawbacks including nausea/vomiting, changes in taste and smell, bone marrow suppression32, radiation safety concerns, and the inability to differentiate benign from malignant tumors33. In the present study, the necessity of WBS for recurrence prediction was evaluated by SHAP analysis and a cost-effectiveness model. Previous studies have compared the power of Tg for predicting thyroid cancer recurrence with radionuclide methods. For example, a comparison of the sensitivity of 123I scintigraphy and Tg revealed that WBS did not improve the sensitivity34. The results of this study highlighted the moderate importance of WBS in the prediction of tumor recurrence. Based on the SHAP analysis (Fig. 2) first-year WBS was a predictor with a moderate importance in the XGBoost model, while other key variables such as the number of recurrences, first-year stimulated Tg, n_Category, and age were more important predictors. Notably, the first-year WBS is a binary clinical indicator in the current dataset (positive vs. negative). The SHAP summary plot showed that positive first-year WBS results were predominantly associated with higher SHAP values, indicating an increased predicted probability of recurrence. In contrast, negative results (no sign of recurrence in WBS) were generally linked to lower SHAP values and therefore a reduced predicted risk of recurrence. This pattern suggests that a positive first-year WBS result is associated with a higher likelihood of future recurrence according to the model. Although the relative importance of this feature is lower than that of the primary predictors, it still provides a meaningful and independent contribution to the overall predictive performance of the model, particularly among high-risk patients. According to the cost-effectiveness model (Fig. 4), at lower thresholds, where even a small probability of tumor recurrence prompts intervention, the strategy incorporating WBS incurs slightly higher expected costs compared with the non-WBS approach. As the threshold increases, the expected cost of the WBS strategy remains relatively stable, whereas the cost of the non-WBS strategy begins to rise progressively. At higher threshold values, this increase becomes substantial, leading the non-WBS strategy to surpass the WBS strategy in terms of cost. These patterns indicate that while WBS is less cost-efficient at low thresholds (corresponding to a low probability of tumor recurrence), it becomes increasingly favorable as the probability threshold for recurrence rises, ultimately resulting in a lower expected economic burden at higher threshold values. Furthermore, the NRI analysis demonstrated a slightly negative overall reclassification performance (NRI_total = − 0.0473). Among patients who experienced recurrence (events), the NRI_event was − 0.0536, indicating that the inclusion of WBS did not improve risk stratification for these individuals and instead resulted in a net shift toward lower risk categories. For patients without recurrence (non-events), the NRI_nonevent was minimally positive (0.0062), reflecting only a negligible improvement in classification accuracy. Overall, these results suggest that incorporating WBS into the model provided minimal reclassification benefit and slightly worsened the classification of patients with recurrence. Taken together, these findings suggest that WBS may only be more justifiable in patients at higher risk of recurrence. Study limitations Unfortunately, at the time of this study, there was no external independent data to evaluate the generalizability of predictive ML models. This should be considered the main limitation of this study. Future studies with external independent datasets are required to confirm the generalizability of ML models for thyroid cancer recurrence prediction. Furthermore, assay characteristics and sensitivity limits were not available from patients’ records, which represent another limitation of this secondary data analysis. A longer follow-up duration to investigate possible recurrence and data acquisition from multiple centers are proposed for future studies. Conclusion In this study, the potential of different ML models using a set of demographic and clinical data for thyroid cancer recurrence prediction was evaluated. This study revealed that ML models can predict thyroid cancer recurrence according to the thyroid cancer characteristics, demographic data, and measurements such as the first-year stimulated thyroglobulin level. Furthermore, cost-effectiveness models indicated that the usage of WBS, which is an expensive imaging technique with potentially harmful radiation exposure, has a negligible effect on the prediction probability, especially for clinically low-risk patients. The main strength of the model is its predictive capacity using the first-year thyroglobulin level which is routinely available for the majority of patients. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Acknowledgements This article is the result of a general medicine thesis. We sincerely thank the Ethical Research Committee and clinical research development center, Shahid Beheshti Medical Educational Center, Hamadan University of Medical Sciences. The work was funded by Hamadan University of Medical Sciences (No. 140108176791). Author contributions ShB and RN collected the data. SF performed analyses and wrote the initial draft. SF, EA, and ShB discussed the obtained results and finalized the draft. Funding This work was supported by Hamadan University of Medical Sciences, Deputy of research and technology (No. 140108176791). Data availability The datasets of this study are available from the corresponding author upon reasonable request. Declarations Competing interests The authors declare no competing interests. Ethical considerations This study was conducted in accordance with the principles of the Helsinki Declaration and was approved by the Ethics Committee of Hamadan University of Medical Sciences (IR.UMSHA.REC.1401.669). Consent to participate Written informed consent was obtained from all participants prior to data collection. AI application ChatGPT (version 5.4) was used for English editing. Authors rechecked all suggestions by AI model and are solely responsible for the contents. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Contributor Information Shiva Borzouei, Email: borzooeishiva@yahoo.com. Sajjad Farashi, Email: sajjad_farashi@yahoo.com. References Associated Data Data Availability Statement The datasets of this study are available from the corresponding author upon reasonable request.