Methods
The study included 871 patients who underwent FET treatment from Luohe Central Hospital between June 2017 and July 2023. Approval was obtained from the Luohe Center Hospital ethics committee (Reg. No. 2024–19) in November 2024. For the external validation, we collected data of 142 patients who underwent FET treatment from Xiangya Hospital of Central South University between August and September 2024. Due to the retrospective nature of the study, individual informed consent was waived. Clinical pregnancy was diagnosed through ultrasound visualization of the gestational sac or fetal heartbeat. For the female partners, the inclusion criteria were restricted to frozen-thawed cycles involving the transfer of top- or good-quality embryos. Day 3 cleavage stage embryos were defined as top- or good-quality if they had six to nine cells with < 20% fragmentation, according to the Istanbul consensus. Day 5 or 6 blastocysts were assessed using the Gardner grading system, with top- or good-quality defined as those graded ≥ 4BB. Additionally, an endometrial thickness of ≥ 7 mm, measured by transvaginal ultrasound on the day of progesterone initiation, was required. For the male partners, only cycles with complete semen analysis data (including semen volume, concentration, motility, morphology, and progressive motility) were included for model training and validation. Flow chart of patient enrollment was illustrated in Fig. 1 . Fig. 1 Flow chart of patient enrollment
Flow chart of patient enrollment
A total of 35 features were collected, including 26 female and nine male features (Table 1 ). These features were classified as continuous, binary, or categorical. The primary outcome assessed was clinical pregnancy, which was represented as a binary variable.
Table 1 Baseline characteristics of patients in internal cohort Characteristics Overall ( n = 871) No pregnancy ( n = 429) Clinical pregnancy ( n = 442) P -value Demographics Age-female, mean (SD) 33.2 (5.1) 34.9 (5.5) 31.5 (4.1) < 0.001 BMI-female, mean (SD) 22.4 (2.5) 22.4 (2.3) 22.4 (2.6) 0.921 Menstrual cycle, mean (SD) 0.3 (0.4) 0.2 (0.4) 0.3 (0.5) 0.007 < 0.001 Age-male, mean (SD) 33.9 (5.6) 35.2 (5.9) 32.5 (5.0) BMI-male, mean (SD) 25.3 (3.6) 25.5 (3.5) 25.1 (3.7) 0.192 Smoking-male, n (%) No 525 (60.3) 244 (56.9) 281 (63.6) 0.051 Yes 346 (39.7) 185 (43.1) 161 (36.4) Drinking-male, n (%) No 847 (97.2) 416 (97.0) 431 (97.5) 0.779 Yes 24 (2.8) 13 (3.0) 11 (2.5) Medical history Infertility-female, n (%) Primary 360 (41.3) 150 (35.0) 210 (47.5) < 0.001 Secondary 511 (58.7) 279 (65.0) 232 (52.5) Infertility duration, mean (SD) 3.6 (2.8) 3.6 (3.1) 3.5 (2.5) 0.350 Adenomyosis, n (%) No 847 (97.2) 416 (97.0) 431 (97.5) 0.779 Yes 24 (2.8) 13 (3.0) 11 (2.5) Endometriosis, n (%) No 787 (90.4) 385 (89.7) 402 (91.0) 0.625 Yes 84 (9.6) 44 (10.3) 40 (9.0) Pelvic or fallopian tube factors, n (%) No 401 (46.0) 201 (46.9) 200 (45.2) 0.684 Yes 470 (54.0) 228 (53.1) 242 (54.8) PCOS, n (%) No 733 (84.2) 382 (89.0) 351 (79.4) < 0.001 Yes 138 (15.8) 47 (11.0) 91 (20.6) Thyroid factors, n (%) No 841 (96.6) 410 (95.6) 431 (97.5) 0.166 Yes 30 (3.4) 19 (4.4) 11 (2.5) POR, n (%) No 738 (84.7) 322 (75.1) 416 (94.1) < 0.001 Yes 133 (15.3) 107 (24.9) 26 (5.9) Clinical marker Basal FSH, mean (SD) 7.7 (3.1) 8.2 (3.5) 7.1 (2.5) < 0.001 Basal LH, mean (SD) 5.4 (3.8) 5.1 (3.3) 5.6 (4.2) 0.050 Basal E2, mean (SD) 44.2 (26.3) 44.5 (22.9) 43.8 (29.3) 0.683 PRL, mean (SD) 313.9 (188.1) 295.1 (153.1) 332.0 (215.4) 0.004 Total testosterone, mean (SD) 0.5 (0.2) 0.5 (0.2) 0.5 (0.2) 0.012 Progesterone, mean (SD) 0.7 (0.7) 0.7 (0.5) 0.8 (0.9) 0.141 AMH, mean (SD) 4.3 (3.8) 3.3 (3.2) 5.2 (4.1) < 0.001 AFC-left, mean (SD) 7.4 (4.1) 6.4 (4.0) 8.2 (4.0) < 0.001 AFC-right, mean (SD) 7.7 (4.2) 6.9 (4.2) 8.6 (4.0) < 0.001 Abnormal sperm morphology, mean (SD) 95.5 (3.4) 95.4 (4.3) 95.6 (2.2) 0.408 Semen volume, mean (SD) 2.6 (1.1) 2.5 (1.0) 2.7 (1.2) 0.106 Semen concentration, mean (SD) 59.7 (35.1) 59.2 (34.4) 60.1 (35.7) 0.715 Sperm motility, mean (SD) 53.2 (13.1) 52.3 (13.2) 54.0 (13.0) 0.066 PR, mean (SD) 38.8 (12.3) 38.1 (12.0) 39.5 (12.7) 0.109 Treatment COS, n (%) GnRH-a long protocol 511 (58.7) 222 (51.7) 289 (65.4) < 0.001 GnRH antagonist protocol 104 (11.9) 55 (12.8) 49 (11.1) Ultra-long GnRH-a protocol 28 (3.2) 7 (1.6) 21 (4.8) Minimal stimulation protocol 21 (2.4) 13 (3.0) 8 (1.8) Progestin-primed ovarian stimulation 156 (17.9) 115 (26.8) 41 (9.3) GnRH-a short protocol 51 (5.9) 17 (4.0) 34 (7.7) FET, n (%) HRT 391 (44.9) 185 (43.1) 206 (46.6) 0.215 GnRH-a-HRT 423 (48.6) 210 (49.0) 213 (48.2) NC 57 (6.5) 34 (7.9) 23 (5.2) Number of FET embryos, n (%) 1 315 (36.2) 155 (36.1) 160 (36.2) 1.000 2 556 (63.8) 274 (63.9) 282 (63.8) Embryo-1, n (%) 4AA 26 (3.0) 3 (0.7) 23 (5.2) 0.000 4AB 4 (0.5) 1 (0.2) 3 (0.7) 4BA 3 (0.3) 0 (0.0) 3 (0.7) 4BB 185 (21.2) 43 (10.0) 142 (32.1) 4BC 182 (20.9) 43 (10.0) 139 (31.4) 4CB 83 (9.5) 70 (16.3) 13 (2.9) 8I/9I 41 (4.7) 20 (4.7) 21 (4.8) 6II/7II/8II 267 (30.7) 187 (43.6) 80 (18.1) 9II/10II/12II 48 (5.5) 31 (7.2) 17 (3.8) 8III/10III 22 (2.5) 21 (4.9) 1 (0.2) 6III 10 (1.1) 10 (2.3) 0 (0.0) Embryo-2, n (%) None 316 (36.3) 156 (36.4) 160 (36.2) < 0.001 4AB 1 (0.1) 0 (0) 1 (0.2) 4BB 36 (4.1) 7 (1.6) 29 (6.6) 4BC 81 (9.3) 17 (4.0) 64 (14.5) 4CB 140 (16.1) 52 (12.1) 88 (19.9) 8I/9I 8 (0.9) 4 (0.9) 4 (0.9) 6II/7II/8II 154 (17.7) 91 (21.2) 63 (14.3) 9II/10II/12II 46 (5.3) 34 (7.9) 12 (2.7) 8III/10III 39 (4.5) 30 (7.0) 9 (2.0) 6III 50 (5.7) 38 (8.9) 12 (2.7)
Baseline characteristics of patients in internal cohort
0.007
< 0.001
Data analysis was conducted to assess clinical pregnancy. The dataset from Luohe Center Hospital was divided into model development (70%) and model internal testing (30%) datasets using stratified random sampling, resulting in approximately equal frequencies of outcomes in both subsets (Supplementary Table 1 ).
Feature selection was independently performed using LASSO regression within three predefined feature sets: female-specific, male-specific, and combined female and male features. This yielded three corresponding feature subsets—female, male, and combined—for model development (Supplementary Fig. 1 ). To enhance model interpretability and preserve clinically relevant information, we further incorporated expert knowledge to select additional clinically relevant features in combined features [ 19 ]. These expert-selected features were then integrated with the LASSO-derived combined features to construct models (Supplementary Table 2 ). This combined approach facilitates more clinically grounded post hoc interpretation using Shapley Additive Explanations (SHAP) analysis.
The development dataset was used to develop four predictive models for binary classification of clinical pregnancy, the modeled outcome: a logistic regression model, an XGboost model, a random forest model, and a deep neural network. Models were trained using a stratified fivefold cross-validation method, where the development dataset was partitioned into five “folds.” To improve training, the training subset was rebalanced with respect to the outcome using synthetic minority oversampling (SMOTE). Hyperparameter tuning was then performed using a random grid search strategy to select the optimal hyperparameters. This cross-validation process was repeated five times to ensure each fold was used for validation exactly once. For each validation fold, the receiver operating characteristic (ROC) area under the curve (AUC) was calculated, and the threshold closest to the (0, 1) point on the ROC curve was chosen.
Upon completion of cross-validation, the model with the highest validation AUC was selected, and its corresponding hyperparameters were saved. This model was then evaluated on a holdout testing dataset. For the testing dataset, ROC AUC was computed, and the optimal prediction threshold determined during validation was applied to predict outcomes. After development and internal testing, the performance of the model was evaluated using an external validation dataset.
To comprehensively assess the model’s performance, we calculated key performance metrics including ROC AUC, accuracy, precision, sensitivity, specificity, and F1 score, as well as their respective 95% confidence intervals. To evaluate clinical utility, decision curve analysis (DCA) was used to quantify the net benefit of each model across a range of probability thresholds. Additionally, calibration curves were generated on the internal test set, and Brier scores were calculated to quantify the overall accuracy of predicted probabilities.
Model interpretability was assessed using SHAP values, which estimate the relative contribution of each input feature to a given prediction. In addition, feature importance analysis was performed to quantify the overall influence of each variable across the selected features.
The process of model development, validation, and exploration was depicted in the graphical model workflow.
Clinical pregnancy and no-pregnancy groups were compared using the χ 2 test for categorical features and the t -test for continuous features. Model classification performance was assessed using multiple metrics, including ROC AUC, accuracy, precision, sensitivity, specificity, and F1 score. Variability in these metrics was estimated through bootstrapping, with 95% confidence intervals (95% CI) reported. Pairwise DeLong tests were conducted to statistically compare ROC AUC performance across individual models. A p -value of less than 0.05 was considered statistically significant.
All analyses were performed with Python version 3.12.6. Data preprocessing, model development, and performance metric calculations were conducted with the scikit-learn package (version 1.5.2), which was selected due to its recent optimizations in model training speed and cross-validation functionality. Random forest, logistic regression, and deep neural network models were implemented in scikit-learn. SMOTE-Tomek was applied using the imblearn package (version 0.12.3), selected for its efficient handling of imbalanced datasets. The XGBoost model was implemented in the XGBoost package (version 2.1.1), which provides enhanced GPU support and faster training times compared to earlier versions. Statistical analyses were conducted using scipy (version 1.14.1), chosen for its extensive statistical functions and robust numerical capabilities.
Results
The internal cohort included 871 patients, with 442 (50.7%) achieving clinical pregnancy and 429 (49.3%) not achieving clinical pregnancy (Table 1 ). The mean female and male ages were 33.2 ± 5.1 and 33.9 ± 5.6 years, respectively. Primary infertility was observed in 41.3% of patients, while 15.8% had polycystic ovary syndrome (PCOS), which was more prevalent in the pregnancy group ( p < 0.001). Poor ovarian response (POR) occurred in 15.3% of patients and was significantly associated with lower pregnancy rates ( p < 0.001). Compared to the no-pregnancy group, the clinical pregnancy group had lower basal FSH, higher AMH, and more frequent use of the GnRH-a Long Protocol (all p < 0.001). Embryo quality also differed significantly between groups. Among male partners, age was significantly lower in the pregnancy group ( p < 0.001), while smoking status showed a non-significant trend ( p = 0.051); other semen parameters were comparable. Finally, significant differences in baseline characteristics between the clinical pregnancy and no-pregnancy groups included female age, PCOS status, POR, basal FSH, AMH levels, AFC, COS protocol, as well as menstrual cycle length, male age, infertility type, PRL, and total testosterone levels (Table 1 ). For the external validation cohort, 142 patients were included in the final model (Supplementary Table 3 ).
Feature selection was performed with LASSO on three predefined sets: female-specific (Fig. 2 A), male-specific (Fig. 2 B), and combined features (Fig. 2 C), and then supplemented with expert-chosen clinical features to create an expanded combined set (Fig. 2 D; Supplementary Table 2 ). Four corresponding feature panels were used to train and compare logistic regression, XGBoost, random forest, and deep neural network (DNN) models. Fig. 2 Classification performance of machine learning models in predicting clinical pregnancy using different feature sets in internal cohort. Receiver operating characteristic (ROC) curves, decision curve analysis (DCA), and calibration curves are shown for four models—logistic regression, XGBoost, random forest, and deep neural network—developed using A female-specific features, B male-specific features, C combined female and male features, and D combined features supplemented with expert-selected clinical features
Classification performance of machine learning models in predicting clinical pregnancy using different feature sets in internal cohort. Receiver operating characteristic (ROC) curves, decision curve analysis (DCA), and calibration curves are shown for four models—logistic regression, XGBoost, random forest, and deep neural network—developed using A female-specific features, B male-specific features, C combined female and male features, and D combined features supplemented with expert-selected clinical features
In Table 2 , XGBoost delivered the highest discrimination (AUC = 0.7904) with balanced sensitivity/specificity (0.7152/0.7672), narrowly ahead of random forest (AUC = 0.7763). DeLong tests (Supplementary Table 4 ) confirmed both tree-based models were superior to logistic regression and DNN (all p < 0.05). DCA showed XGBoost offered the greatest net benefit from 20 to 80% thresholds. The model’s calibration was evaluated using calibration curves and Brier scores. As illustrated in Fig. 2 A, the calibration curve revealed good agreement between predicted probabilities and actual outcomes. Both apparent and bias-corrected curves closely followed the ideal diagonal line, suggesting well-calibrated predictions. XGBoost calibration curve yielded the lowest Brier score (0.186).
Table 2 Performance metrics of machine learning models constructed using female-specific features in the internal cohort Feature Model ROC AUC (95% CI) Accuracy (95% CI) Precision (95% CI) Sensitivity (95% CI) Specificity (95% CI) F1 score (95% CI) Female Logistic regression 0.7489 (0.6896–0.8047) 0.7068 (0.6527–0.7595) 0.6845 (0.6090–0.7561) 0.7838 (0.7121–0.8571) 0.6274 (0.5403–0.7121) 0.7300 (0.6717–0.7842) XGBoost 0.7904 (0.7347–0.8410) 0.7408 (0.6907–0.7901) 0.7600 (0.6855–0.8308) 0.7152 (0.6308–0.7907) 0.7672 (0.6984–0.8359) 0.7361 (0.6742–0.7941) Random forest 0.7763 (0.7207–0.8294) 0.7412 (0.6908–0.7939) 0.7604 (0.6833–0.8320) 0.7158 (0.6356–0.7926) 0.7675 (0.6967–0.8385) 0.7366 (0.6749–0.7941) Deep neural network 0.7126 (0.6478–0.7704) 0.6730 (0.6145–0.7252) 0.6632 (0.5869–0.7334) 0.7234 (0.6457–0.7956) 0.6211 (0.5410–0.7029) 0.6912 (0.6284–0.7446) Table 3 Performance metrics of machine learning models constructed using male-specific features in the internal cohort Feature Model ROC AUC (95% CI) Accuracy (95% CI) Precision (95% CI) Sensitivity (95% CI) Specificity (95% CI) F1 score (95% CI) Male Logistic regression 0.5696 (0.5020–0.6386) 0.5794 (0.5266–0.6374) 0.5899 (0.5041–0.6783) 0.5631 (0.4741–0.6434) 0.5964 (0.5113–0.6791) 0.5752 (0.5021–0.6408) XGBoost 0.5250 (0.4573–0.5947) 0.5447 (0.4885–0.6069) 0.5350 (0.4700–0.6031) 0.7887 (0.7176–0.8547) 0.2933 (0.2222–0.3732) 0.6369 (0.5786–0.6970) Random forest 0.5386 (0.4701–0.6073) 0.5494 (0.4885–0.6107) 0.5598 (0.4746–0.6429) 0.5261 (0.4412–0.6111) 0.5734 (0.4927–0.6586) 0.5414 (0.4667–0.6166) Deep neural network 0.5521 (0.4810–0.6201) 0.5603 (0.5000–0.6183) 0.5536 (0.4834–0.6316) 0.6913 (0.6107–0.7681) 0.4253 (0.3450–0.5083) 0.6140 (0.5474–0.6772)
Performance metrics of machine learning models constructed using female-specific features in the internal cohort
Performance metrics of machine learning models constructed using male-specific features in the internal cohort
All algorithms performed near chance (0.5250–0.5696; Table 3 , Fig. 2 B). XGBoost and random forest edged the other methods, yet overall discrimination remained poor, underscoring the limited standalone value of paternal features.
With combined male and female features (Table 4 ), XGBoost again ranked first (AUC = 0.7895; sensitivity/specificity = 0.6931/0.7909), followed by random forest (AUC = 0.7703). Both tree-based models significantly outperformed logistic regression and DNN (Supplementary Table 5 ). XGBoost provided the highest DCA net benefit throughout the 20–80% range and retained the best calibration (Brier = 0.188).
Table 4 Performance metrics of machine learning models constructed using combined male and female features in the internal cohort Feature Model ROC AUC (95% CI) Accuracy (95% CI) Precision (95% CI) Sensitivity (95% CI) Specificity (95% CI) F1 score (95% CI) Combined Logistic regression 0.7445 (0.6855–0.7993) 0.7029 (0.6489–0.7595) 0.6899 (0.6115–0.7609) 0.7534 (0.6774–0.8261) 0.6508 (0.5649–0.7273) 0.7195 (0.6566–0.7754) XGBoost 0.7895 (0.7332–0.8395) 0.7412 (0.6907–0.7939) 0.7736 (0.6942–0.8426) 0.6931 (0.6148–0.7717) 0.7909 (0.7234–0.8537) 0.7303 (0.6719–0.7915) Random forest 0.7703 (0.7139–0.8239) 0.7488 (0.6985–0.8015) 0.7820 (0.7059–0.8515) 0.7006 (0.6180–0.7811) 0.7986 (0.7310–0.8637) 0.7382 (0.6775–0.7984) Deep neural network 0.4225 (0.3531–0.4935) 0.5077 (0.4466–0.5725) 0.5077 (0.4466–0.5725) 1.0000 (1.0000–1.0000) 0.0000 (0.0000–0.0000) 0.6729 (0.6174–0.7282)
Performance metrics of machine learning models constructed using combined male and female features in the internal cohort
Adding expert features produced a modest lift (Table 5 ): XGBoost reached an AUC of 0.7922 (sensitivity/specificity = 0.7309/0.7755) and random forest of 0.7758. DeLong tests (Supplementary Table 6 ) again favored the tree-based models over logistic regression and DNN (all p < 0.05). XGBoost remained dominant in DCA and calibration (Brier = 0.186), confirming its robustness across all feature strategies.
Table 5 Performance metrics of machine learning models constructed using combined male and female features and expert selected features in the internal cohort Feature Model ROC AUC (95% CI) Accuracy (95% CI) Precision (95% CI) Sensitivity (95% CI) Specificity (95% CI) F1 score (95% CI) Combined + expert selected Logistic regression 0.7440 (0.6866–0.7998) 0.7100 (0.6603–0.7634) 0.7110 (0.6326–0.7857) 0.7227 (0.6428–0.7983) 0.6971 (0.6142–0.7717) 0.7160 (0.6535–0.7731) XGBoost 0.7922 (0.7348–0.8421) 0.7528 (0.6985–0.8015) 0.7704 (0.6947–0.8374) 0.7309 (0.6496–0.8047) 0.7755 (0.7037–0.8417) 0.7494 (0.6905–0.8046) Random forest 0.7758 (0.7197–0.8290) 0.7297 (0.6793–0.7863) 0.7590 (0.6825–0.8319) 0.6852 (0.6043–0.7669) 0.7757 (0.7043–0.8462) 0.7194 (0.6557–0.7823) Deep neural network 0.5895 (0.5197–0.6567) 0.5809 (0.5191–0.6412) 0.6370 (0.5361–0.7363) 0.4058 (0.3178–0.4925) 0.7616 (0.6860–0.8309) 0.4946 (0.4085–0.5727)
Performance metrics of machine learning models constructed using combined male and female features and expert selected features in the internal cohort
Based on its performance in the internal cohort, the XGBoost model using combined male and female features supplemented with expert-selected features demonstrated the best overall predictive ability. For external validation, this model was applied to an independent dataset of 142 patients. As shown in Table 6 , the model achieved an AUC of 0.7519, with a sensitivity of 0.7348 and a specificity of 0.7142. As illustrated in Fig. 3 , decision curve analysis showed that XGBoost consistently provided the highest net clinical benefit across a threshold probability range of 30 to 80%, underscoring its strong potential to guide individualized decision-making in predicting clinical pregnancy outcomes. The Brier scores were 0.184 (apparent) and 0.180 (bias-corrected), further supporting the reliability of XGBoost in estimating absolute risk in the external cohort.
Table 6 Predictive performance of the XGBoost model for clinical pregnancy using combined male and female features and expert selected features in the external dataset Feature Model ROC AUC (95% CI) Accuracy (95% CI) Precision (95% CI) Sensitivity (95% CI) Specificity (95% CI) F1 score (95% CI) Combined + expert selected XGBoost 0.7519 (0.6640–0.8306) 0.7284 (0.6127–0.8310) 0.8585 (0.7592–0.9572) 0.7348 (0.5158–0.9278) 0.7142 (0.4583–0.9388) 0.7813 (0.6518–0.8850) Fig. 3 Classification performance of machine learning models in predicting clinical pregnancy using combined male and female features supplemented with expert-selected features in the external validation cohort was evaluated using A ROC curves, B DCA, and C calibration curves
Predictive performance of the XGBoost model for clinical pregnancy using combined male and female features and expert selected features in the external dataset
Classification performance of machine learning models in predicting clinical pregnancy using combined male and female features supplemented with expert-selected features in the external validation cohort was evaluated using A ROC curves, B DCA, and C calibration curves
Figure 4 illustrates the feature importance and global SHAP value rankings for the XGBoost model trained on combined and expert-selected features. The top features identified by both metrics were consistent, with embryo 1, age-female, and AMH ranking highest across both the gain-based importance score and the SHAP value distribution. Additional key contributors included infertility duration, BMI-female, and BMI-male, underscoring the relevance of both embryo quality and maternal characteristics. These findings emphasize that features reflecting ovarian reserve, embryo viability, and maternal physiological status play a central role in predicting clinical pregnancy outcomes. Fig. 4 A Feature importance matrix plot of the XGBoost model trained on combined male and female features supplemented with expert-selected features. B SHAP summary plot illustrating the overall contribution of combined and expert-selected features to the XGBoost model’s predictions for clinical pregnancy
A Feature importance matrix plot of the XGBoost model trained on combined male and female features supplemented with expert-selected features. B SHAP summary plot illustrating the overall contribution of combined and expert-selected features to the XGBoost model’s predictions for clinical pregnancy
Using SHAP model interpretation, both global and local observations can be made. SHAP values represent the respective weight of each variable on the model’s prediction, with each patient having a unique SHAP value for each variable. The sum of all SHAP values across features for an individual patient equals the model’s final prediction probability. Positive SHAP values indicate an increased probability of pregnancy, while negative SHAP values indicate a decreased probability of pregnancy. Global interpretation involves analysis of plots, as shown in Fig. 4 B, which visualizes the SHAP values for all features in the XGBoost model for all patients. At the local level, the probability of pregnancy for an individual patient can be analyzed and contrasted with different ART strategies, as illustrated in Fig. 5 . Fig. 5 A – E Beeswarm plot illustrating the SHAP values for COS, FET, number of embryos, embryos-1, and embryos-2 in XGBoost model trained on combined male and female features supplemented with expert-selected features
A – E Beeswarm plot illustrating the SHAP values for COS, FET, number of embryos, embryos-1, and embryos-2 in XGBoost model trained on combined male and female features supplemented with expert-selected features
Global SHAP plots provide insights into the decision-making process of the model as a whole. While certain strategies are generally beneficial, the extent of their impact, as measured by the SHAP values, varies based on individual patient characteristics. Key clinically relevant features, including controlled ovarian stimulation (COS), frozen embryo transfer (FET) protocols, the number of embryos transferred, and embryo grades, are illustrated in Fig. 5 .
For COS, the GnRH-a short protocol was associated with a reduced likelihood of pregnancy, whereas the GnRH-a long protocol demonstrated a higher probability of success (Fig. 5 A). In the context of FET, hormone replacement therapy (HRT) was associated with a lower chance of pregnancy, whereas GnRH-a-HRT showed a higher likelihood of success (Fig. 5 B). The number of embryos transferred also significantly influenced success rates, with the transfer of two embryos yielding a higher likelihood of pregnancy compared to a single embryo transfer (Fig. 5 C). The quality of embryos, as indicated by their grades, also played a crucial role in the outcome. Embryo quality was graded based on morphological characteristics, such as cell number, symmetry, and fragmentation, with higher grades (e.g., 4AA) indicating better quality. Of note, grades reflect the developmental potential of the embryo, directly influencing the likelihood of successful implantation and clinical pregnancy. Lower-quality grades were associated with a decreased probability of pregnancy, while higher-quality grades were linked to an increased likelihood of success (Fig. 5 D, E ). Overall, the SHAP values provide valuable insights into the factors influencing the model’s decision-making process.
SHAP values were also applied to simulate different operative strategies (Fig. 6 ). For index patient 1, a 39-year-old woman with poor ovarian reserve (POR) presented with an AMH level of 1.45 ng/mL, baseline estradiol (E2) of 86 pg/mL, and FSH of 5.6 mIU/mL. Based on these characteristics, she was categorized as Poseidon Group 2 [ 20 ], with an initial predicted probability of pregnancy of 0.25 under FET Strategy 0, which included a mini-stimulation protocol, GnRH-a-HRT, and the transfer of two embryos, both graded 6III. Applying FET Strategy 1, which involved switching to HRT, while maintaining the two-embryo transfer, reduced the predicted probability of pregnancy to 0.22. However, further adjustments under FET Strategy 2, involving a change to the ultra-long GnRH-a protocol and upgrading the embryos to 4AA and 4BB, increased the probability to 0.45. Fig. 6 Simulation of individualized treatment strategies in four real patients using SHAP-informed XGBoost model predictions. Each panel illustrates a patient’s baseline predicted probability of clinical pregnancy under their original FET strategy (Strategy 0), followed by predicted changes after modifying key clinically relevant features (Strategies 1 and 2). Index patient 1: A 39-year-old with poor ovarian reserve (AMH: 1.45 ng/mL, FSH: 5.6 mIU/mL) undergoing mini-stimulation + GnRH-a-HRT with two grade 6III embryos. Strategy 2 (ultra-long GnRH-a + 4AA/4BB embryos) increased probability from 0.25 to 0.45. Index patient 2: A 29-year-old post-endometriosis surgery with low AMH (1.6 ng/mL), initially treated with PPOS + HRT and two cleavage-stage embryos (7II). Embryo and protocol upgrade increased predicted probability from 0.48 to 0.70. Index patient 3: Baseline strategy (GnRH antagonist + GnRH-a-HRT, 1 embryo, 4BB) yielded 0.65; alternative with lower embryo quality (4CB) reduced probability to 0.26. Index patient 4: Initially high predicted probability (0.88) with GnRH-a long protocol and 4BB embryo; switching to lower quality embryo (4CB) dropped prediction to 0.33
Simulation of individualized treatment strategies in four real patients using SHAP-informed XGBoost model predictions. Each panel illustrates a patient’s baseline predicted probability of clinical pregnancy under their original FET strategy (Strategy 0), followed by predicted changes after modifying key clinically relevant features (Strategies 1 and 2). Index patient 1: A 39-year-old with poor ovarian reserve (AMH: 1.45 ng/mL, FSH: 5.6 mIU/mL) undergoing mini-stimulation + GnRH-a-HRT with two grade 6III embryos. Strategy 2 (ultra-long GnRH-a + 4AA/4BB embryos) increased probability from 0.25 to 0.45. Index patient 2: A 29-year-old post-endometriosis surgery with low AMH (1.6 ng/mL), initially treated with PPOS + HRT and two cleavage-stage embryos (7II). Embryo and protocol upgrade increased predicted probability from 0.48 to 0.70. Index patient 3: Baseline strategy (GnRH antagonist + GnRH-a-HRT, 1 embryo, 4BB) yielded 0.65; alternative with lower embryo quality (4CB) reduced probability to 0.26. Index patient 4: Initially high predicted probability (0.88) with GnRH-a long protocol and 4BB embryo; switching to lower quality embryo (4CB) dropped prediction to 0.33
Similarly, for index patient 2, a 29-year-old woman who had undergone surgery for endometriosis had a low AMH level of 1.6 ng/mL and an antral follicle count (AFC) of 3 on the left ovary and 4 on the right, placing her in Poseidon Group 1. Her initial pregnancy probability was 0.48 under FET Strategy 0, which included progestin-primed ovarian stimulation (PPOS), HRT, and transfer of two embryos, both graded 7II. Applying FET Strategy 1, which selected mini-stimulation protocol and two embryos, with embryos grade 8III and 6III, reduced the predicted probability of pregnancy to 0.30. Further adjustments under FET Strategy 2, involving a switch in COS to ultra-long GnRH-a protocol and upgrade in embryo grade to 4AA and 4AA, increased this probability to 0.70.
Additionally, index patient 3, initially assessed with a predicted pregnancy probability of 0.65 under FET Strategy 0 (GnRH antagonist protocol, GnRH-a-HRT, one embryo graded 4BB), experienced a notable reduction to 0.26 under FET Strategy 1, which used PPOS and transferred an embryo graded 4CB. Similarly, patient 4, who started with a relatively high predicted probability of 0.88 (GnRH-a long protocol, HRT, one embryo graded 4BB), saw this decrease to 0.33 when FET Strategy 1 was applied (PPOS and an embryo graded 4CB). This sequential analysis underscores how individualized, strategic adjustments in clinical parameters can profoundly impact patient outcomes.
Conclusion
Our findings highlight the value of ML models, particularly XGBoost, in predicting clinical pregnancy outcomes and optimizing FET treatment strategies. The personalized capabilities of the XGBoost model allow clinicians to assess how various clinical and embryological factors influence an individual patient’s likelihood of success, facilitating the development of tailored treatment plans that bypass the limitations of a one-size-fits-all approach. This patient-specific adaptability has the potential to improve FET success rates by allowing patients to receive the most effective, individualized care, while also enabling clinicians to allocate their time and resources more efficiently. This study adds to the growing body of evidence supporting the application of ML in reproductive medicine, emphasizing the need for further research and validation of these models to fully harness their potential in clinical practice.
Discussion
In this study, we utilized ML models to predict clinical pregnancy success following FET treatments. Our findings highlight three key points: (1) ML models, particularly XGboost, can effectively predict clinical pregnancy success; (2) clinical decisions have an impact on patient outcomes; and (3) post hoc interpretability using SHAP values provides valuable insights at both the global (dataset-level) and local (patient-level) levels, enhancing interpretation and application of model predictions.
Shapley Additive Explanations (SHAP) is a post hoc explainability technique that serves as an additive feature attribution method. It quantifies the contribution of each feature to a ML model’s prediction by creating an interpretable approximation of the original model’s behavior. Post hoc methods like SHAP are essential for understanding the decision-making processes of complex models, such as XGBoost and random forest, which prioritize performance over inherent simplicity and transparency. SHAP values unify four distinct feature attribution approaches to provide a comprehensive measure of a feature’s importance, including both its magnitude and directional impact on the model’s predictions.
In the modeling process, 35 features were assessed, with 26% related to clinical decision-making and embryological factors. SHAP analysis identified that five of the top 10 predictors in the XGBoost model included age, embryo quality, and ovarian reserve indicators. Notably, age and AMH levels were significantly associated with embryo quality [ 21 , 22 ], highlighting the critical role of female-related factors in predicting FET outcomes. Consequently, these findings underscore the importance of personalized IVF treatment strategies tailored to each patient’s unique reproductive profile. Although numerous studies have explored the impact of patient demographics and laboratory techniques on embryo quality, specific findings further illustrate these associations. For example, Sun (2020) reported that AMH levels and the number of retrieved oocytes significantly influence clinical pregnancy outcomes [ 23 ]. Wang (2025) found that elevated prolactin (PRL) levels prior to endometrial transformation were associated with poorer reproductive outcomes [ 24 ]. Farzaneh (2024) showed that elevated serum progesterone levels on the day of oocyte retrieval may predict positive pregnancy outcomes [ 25 ]. Despite these insights, comprehensive optimization for high-risk populations remains in its early stages.
Advanced ML models, such as XGBoost and random forest, have become a common approach for predicting FET outcomes by analyzing a comprehensive range of clinical and embryological features [ 26 , 27 ]. SHAP analysis consistently highlights top predictors, including embryo quality, ovarian reserve, and patient age, as critical influences on clinical pregnancy rates. Embryo quality, particularly in terms of morphology and grade, plays a pivotal role, with higher-quality embryos (e.g., grade 4AA) associated with improved outcomes. Similarly, ovarian reserve markers, such as AMH and female age, are essential for tailoring stimulation protocols and maximizing success. Different COS protocols also demonstrate varied effectiveness depending on patient characteristics. For instance, the GnRH-a long protocol is commonly chosen for patients with irregular menstrual cycles, polycystic ovarian syndrome, ovarian cysts, thin endometrium, or diminished ovarian reserve. While this protocol often yields better results in these populations, it requires careful monitoring to prevent complications such as ovarian hyperstimulation syndrome (OHSS) [ 28 ]. In contrast, the GnRH antagonist protocol has proven particularly advantageous for women with PCOS, particularly in overweight and obese PCOS patients [ 29 ], by reducing the risk of OHSS and improving pregnancy outcomes.
Our ML modeling techniques provide a powerful means to assess both the impact and relative importance of individual clinical and embryological factors for each patient while also offering insights on a global data scale. For instance, insights derived from SHAP analysis guided adjustments in COS protocols for certain patients, prioritizing protocols associated with higher success probabilities. This approach enabled clinicians to tailor interventions more precisely, improving the likelihood of successful pregnancy outcomes. By allowing simulation of various IVF treatment strategies, this approach supports the development of highly personalized protocols that optimize patient outcomes. In this study, XGBoost outperformed other models in predicting clinical pregnancy, demonstrating superior accuracy due to its ability to capture complex interactions between multiple features—a crucial advantage for understanding the combined effects of patient-specific and treatment-related factors. XGBoost’s strengths lie in its capability to handle categorical features, non-linear relationships, and intricate dependencies, which are especially critical in predicting outcomes influenced by ovarian reserve, embryo quality, and stimulation protocols [ 30 , 31 ]. Decision curve analysis further highlighted XGBoost’s clinical utility, showing its ability to deliver the highest net benefit across a wide range of threshold probabilities. Furthermore, the XGBoost model maintained its accuracy and discrimination capabilities in the external cohort, confirming its ability to predict clinical pregnancy outcomes effectively beyond the development dataset. This indicates its effectiveness in identifying patients who are most likely to benefit from tailored interventions, ultimately improving FET success rates, particularly for high-risk populations.
The use of SHAP values to simulate precise operations in FET treatment highlights the potential for customizing strategies tailored to individual patients. Adjusting COS protocols and embryo transfer parameters can significantly influence the likelihood of achieving a clinical pregnancy. This indicates that personalized interventions can improve outcomes by allowing clinicians to tailor treatment protocols based on each patient’s unique characteristics. By modeling the impact of key clinical decisions—including COS regimen, FET strategy, and embryo number and quality—SHAP-based simulations offer clinicians a powerful tool for optimizing treatment plans. These individualized case analyses demonstrate that even subtle modifications in treatment can lead to clinically meaningful changes in pregnancy outcomes, reinforcing the value of personalized care in assisted reproduction.
Limitations
Several limitations of this study should be acknowledged. First, its retrospective design may introduce selection bias; future prospective studies are needed to provide more robust validation of the findings. Second, this study highlights the limited predictive value of male-specific and uterine factors; future research should further investigate additional features in these domains to enhance both model performance and biological interpretability. Lastly, challenges remain in predicting FET outcomes, particularly concerning the generalizability and interpretability of machine learning models. Variability in data quality, relatively small sample sizes, and patient heterogeneity may affect the reliability and applicability of predictive results.
Introduction
Infertility, defined as the inability to conceive after 12 months or more of consistent, unprotected sexual intercourse, affects millions of individuals and couples worldwide and presents significant clinical and psychosocial challenges [ 1 – 3 ]. In vitro fertilization and embryo transfer (IVF-ET) has become a widely adopted treatment for infertility, with frozen-thawed embryo transfers (FET) now accounting for over 65% of all transfer cycles globally [ 4 – 6 ]. Despite advancements in the optimization of multiple follicle protocols and the development of technologies to evaluate embryo quality, pregnancy and live birth rates for IVF in FET cycles remain highly variable, ranging from 29.6 to 59.2% globally [ 4 , 7 – 9 ]. For many patients, repeated FET attempts contribute to emotional, physical, and financial burdens [ 10 ]. Given these challenges, there is an urgent need for improved predictive tools that can support clinical decision-making to enhance success rates and reduce the number of required treatment cycles [ 11 ].
Machine learning (ML) has emerged as a promising strategy for improving outcome prediction in assisted reproductive technologies. Unlike conventional approaches, ML dynamically adapts to complex datasets, unveiling insights that may elude linear models [ 12 ]. Within the field of reproductive medicine, ML algorithms have been applied to predict implantation success during IVF, guide embryo selection with greater precision, and assess treatment-related risks [ 13 – 15 ]. These tools often highlight the role of the critical influence of patient-specific factors such as age and body mass index (BMI) on IVF success, highlighting the intricate relationship between patient characteristics and predictive analytics [ 16 – 18 ].
However, most existing models focus on global predictive accuracy, with limited attention to individualized interpretation that could inform patient-specific counseling or treatment discussions. Moreover, few studies have evaluated how such predictive tools might be leveraged to simulate potential outcome changes under alternative clinical scenarios.
In this study, we aimed to develop and validate a machine learning model capable of predicting clinical pregnancy outcomes following FET using routinely collected clinical and embryological data and interpret the model using SHAP (Shapley Additive Explanations) to identify the relative influence of individual predictors and simulate how hypothetical changes in treatment decisions may affect predicted success. By enabling the generation of personalized clinical decisions tailored to individual patients, this approach seeks to refine treatment strategies, enhancing both accuracy and efficiency of interventions in order to improve patient outcomes.
Supplementary Material
Below is the link to the electronic supplementary material. Supplementary file1 (PDF 2232 KB) Supplementary file2 (DOCX 42 KB)
Supplementary file1 (PDF 2232 KB)
Supplementary file2 (DOCX 42 KB)
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.