Stage-Aware and Explainable Machine Learning for Predicting IVF Implantation
Journal:
medRxiv
Published Date:
Oct 14, 2026
Abstract
Predicting implantation outcomes in vitro fertilization (IVF) is challenging because clinically relevant information becomes available at different points during treatment. In this study, we developed a stage-aware, leakage-conscious, and explainable machine-learning framework to predict implantation using a public IVF dataset. {beta}-HCG was excluded to avoid potential downstream target leakage. The data were divided into training, validation, and independent test sets. Several machine-learning models, including Logistic Regression, Random Forest (RF), Extra Trees, XGBoost, and Hist Gradient Boosting, were optimized using stratified cross-validation. A fixed RF model was then evaluated at three stages of the IVF process, using baseline couple characteristics, gamete and fertilization variables, and embryological variables, respectively. Model performance improved as additional treatment-related information became available, with the largest improvement observed after the inclusion of embryological variables. The final RF model showed good predictive performance on the independent test set. The number of embryos was consistently identified as the most important predictor across RF, permutation, and SHAP analyses. Overall, the findings suggest that IVF implantation prediction becomes more accurate as later-stage treatment information is incorporated, particularly information related to embryological characteristics. The proposed approach also provides interpretable predictions while reducing the risk of information leakage. Further evaluation using independent clinical datasets is needed before the framework can be considered for clinical use.