Machine Learning-Based Outcome Prediction in Isolated Ventricular Septal Defects
DOI:
https://doi.org/10.37034/medinftech.v4i2.151Keywords:
Congenital Heart Disease, Machine Learning, Risk Stratification, XGBoost, Ventricular Septal DefectAbstract
Ventricular Septal Defect (VSD) is one of the most common congenital heart defects. Predicting whether isolated VSD will close spontaneously, require surgical intervention, or remain unclosed is essential for optimizing patient management and avoiding unnecessary treatment. This study aimed to develop and evaluate machine learning (ML) models for predicting VSD outcomes using maternal and neonatal clinical characteristics. A retrospective dataset of 382 patients with isolated VSD was analyzed and categorized into spontaneous closure, surgical closure, and non-closure outcomes. Data preprocessing included duplicate removal and listwise deletion of records with missing values. To address class imbalance, random undersampling and oversampling were applied exclusively to the training set (80%), while the independent test set (20%) remained unchanged. Five ML algorithms-Decision Tree, Random Forest, K-Nearest Neighbor, Naive Bayes, and XGBoost-were evaluated using accuracy, macro-average area under the receiver operating characteristic curve (AUC), and class-specific F1-scores. XGBoost achieved the best overall performance with an accuracy of 65.8% and a macro-average AUC of 0.81, demonstrating balanced classification across all outcome groups. Although Decision Tree and Random Forest produced the highest F1-score (92.3%) for the minority surgical closure class, their overall multiclass performance was inferior to XGBoost. Sampling strategies had minimal impact on overall predictive performance, although ensemble-based methods showed greater robustness to class imbalance. These findings suggest that ML, particularly XGBoost, provides a promising approach for early risk stratification of isolated VSD, supporting personalized clinical decision-making and improving identification of patients requiring surgical intervention.
Downloads
References
K. Cox, C. Algaze-Yojay, R. Punn, and N. Silverman, “The Natural and Unnatural History of Ventricular Septal Defects Presenting in Infancy: An Echocardiography-Based Review,” Journal of the American Society of Echocardiography, vol. 33, no. 6, pp. 763–770, Jun. 2020, doi: 10.1016/j.echo.2020.01.013.
D. J. Penny and G. W. Vick, “Ventricular septal defect,” in The Lancet, Lancet, 2011, pp. 1103–1112. doi: 10.1016/S0140-6736(10)61339-6.
N. Roguin, Z. D. Du, M. Barak, N. Nasser, S. Hershkowitz, and E. Milgram, “High prevalence of muscular ventricular septal defect in neonates.,” J. Am. Coll. Cardiol., vol. 26, no. 6, pp. 1545–1548, Nov. 1995, doi: 10.1016/0735-1097(95)00358-4.
S. Erdem, N. Özbarlas, O. Küçükosmanoğlu, H. Poyrazoğlu, and O. K. Salih, “Long-term follow-up of 799 children with isolated ventricular septal defects,” Turk Kardiyol Dern Ars, vol. 40, no. 1, pp. 22–25, 2012, doi: 10.5543/tkda.2012.01679.
J. Sun et al., “Leveraging artificial intelligence for predicting spontaneous closure of perimembranous ventricular septal defect in children: a multicentre, retrospective study in China,” Lancet Digit. Health, vol. 7, no. 1, pp. e44–e53, 2025, doi: https://doi.org/10.1016/S2589-7500(24)00245-0.
F. Eckerström, C. Nyboe, A. Redington, and V. E. Hjortdal, “Lifetime Burden of Morbidity in Patients With Isolated Congenital Ventricular Septal Defect,” J. Am. Heart Assoc., vol. 12, no. 1, p. e027477, Jan. 2023, doi: 10.1161/JAHA.122.027477.
F. Eckerström, C. Nyboe, M. Maagaard, A. Redington, and V. E. Hjortdal, “Survival of patients with congenital ventricular septal defect.,” Eur. Heart J., vol. 44, no. 1, pp. 54–61, Jan. 2023, doi: 10.1093/eurheartj/ehac618.
V. Kaul, S. Enslin, and S. A. Gross, “History of artificial intelligence in medicine,” Gastrointest. Endosc., vol. 92, no. 4, pp. 807–812, Oct. 2020, doi: 10.1016/j.gie.2020.06.040.
D. Shah, S. Patel, and S. K. Bharti, “Heart Disease Prediction using Machine Learning Techniques,” SN Comput. Sci., vol. 1, no. 6, p. 345, 2020, doi: 10.1007/s42979-020-00365-y.
Y. Sethi et al., “Artificial Intelligence in Pediatric Cardiology: A Scoping Review,” J. Clin. Med., vol. 11, no. 23, Nov. 2022, doi: 10.3390/jcm11237072.
S. Nurmaini et al., “Deep Learning-Based Computer-Aided Fetal Echocardiography: Application to Heart Standard View Segmentation for Congenital Heart Defects Detection,” Sensors (Basel), vol. 21, no. 23, Nov. 2021, doi: 10.3390/s21238007.
W. R. Thompson, A. J. Reinisch, M. J. Unterberger, and A. J. Schriefl, “Artificial Intelligence-Assisted Auscultation of Heart Murmurs: Validation by Virtual Clinical Trial,” Pediatr. Cardiol., vol. 40, no. 3, pp. 623–629, Mar. 2019, doi: 10.1007/s00246-018-2036-z.
X. Li et al., “Prediction of spontaneous closure of isolated ventricular septal defects in utero and postnatal life,” BMC Pediatr., vol. 16, no. 1, p. 207, Dec. 2016, doi: 10.1186/s12887-016-0735-2.
H. Mori, K. Inai, H. Sugiyama, and Y. Muragaki, “Diagnosing Atrial Septal Defect from Electrocardiogram with Deep Learning,” Pediatr. Cardiol., vol. 42, no. 6, pp. 1379–1387, Aug. 2021, doi: 10.1007/s00246-021-02622-0.
Z. F. Li et al., “Machine learning prediction for prognosis and long-term effectiveness for transcatheter ventricular septal defect closure: a 5-year single center experience,” Eur. Heart J., vol. 45, no. Supplement_1, p. ehae666.2132, Oct. 2024, doi: 10.1093/eurheartj/ehae666.2132.
M. Kuhn, “caret: Classification and Regression Training,” CRAN: Contributed Packages. Accessed: Apr. 07, 2025. [Online]. Available: https://cran.r-project.org/package=caret
R. Kohavi, “A Study of Cross-Validation and Bootstrapfor Accuracy Estimation and Model Selection,” in International Joint Conference on Artificial Intelligence, May 1995, pp. 1137–1145.
M. Stone, “Cross-Validatory Choice and Assessment of Statistical Predictions,” Journal of the Royal Statistical Society. Series B (Methodological), vol. 36, no. 2, pp. 111–147, Jun. 1974, doi: 10.1111/j.2517-6161.1974.tb00994.x.
T. R. Hoens and N. V. Chawla, “Imbalanced Datasets: From Sampling to Classifiers,” in Imbalanced Learning: Foundations, Algorithms, and Applications, H. Haibo and Y. Ma, Eds., Wiley-IEEE Press, 2013, pp. 43–59. doi: 10.1002/9781118646106.
N. Japkowicz, “Assessment Metrics for Imbalanced Learning,” in Imbalanced Learning: Foundations, Algorithms, and Applications, H. Haibo and Y. Ma, Eds., Wiley-IEEE Press, 2013, pp. 187–206. doi: 10.1002/9781118646106.
H. Wickham and J. Bryan, “readxl: Read Excel Files,” 2025. doi: 10.32614/CRAN.package.readxl.
Kuhn and Max, “Building Predictive Models in R Using the caret Package,” J. Stat. Softw., vol. 28, no. 5, pp. 1–26, 2008, doi: 10.18637/jss.v028.i05.
H. Wickham, R. Francois, L. Henry, K. Muller, and D. Vaughan, “dplyr: A Grammar of Data Manipulation,” 2026. doi: 10.32614/CRAN.package.dplyr.
H. Wickham, D. Vaughan, and M. Girlich, “tidyr: Tidy Messy Data,” 2025. doi: 10.32614/CRAN.package.tidyr.
X. Robin et al., “pROC: an open-source package for R and S+ to analyze and compare ROC curves,” BMC Bioinformatics, vol. 12, p. 77, 2011.
H. Wickham, ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016. [Online]. Available: https://ggplot2.tidyverse.org
H. Wickham, “Reshaping Data with the reshape Package,” J. Stat. Softw., vol. 21, no. 12, pp. 1–20, 2007, [Online]. Available: https://www.jstatsoft.org/v21/i12/
J. Ooms, “writexl: Export Data Frames to Excel ‘xlsx’ Format,” 2025. doi: 10.32614/CRAN.package.writexl.







