Pregnancy introduces a unique clinical dilemma in the management of psychiatric and neurological disorders, where ensuring maternal mental health must be carefully balanced against the potential risks to fetal development. Pharmacological treatments, while often necessary, carry varying degrees of teratogenic risk, particularly when administered during sensitive stages of gestation. In this study, we present an AI-based risk stratification framework that integrates machine learning (ML) and explainable artificial intelligence (XAI) techniques to quantify and interpret the likelihood of congenital malformations resulting from the use of psychiatric and neurological medications during pregnancy. We developed a synthetic yet clinically representative cohort of 1200 pregnant patients, incorporating a wide range of maternal, fetal, and pharmacologic features such as age, body mass index, gestational age, medication class, dosage, and trimester of exposure. Using a calibrated XGBoost classifier combined with isotonic regression and SMOTE oversampling, we achieved strong predictive performance with an area under the precision-recall curve (AUPRC) of 0.872 and an area under the receiver operating characteristic curve (AUROC) of 0.945. To ensure transparency and usability in clinical settings, we applied SHAP (SHapley Additive exPlanations) to elucidate feature contributions and developed five high-resolution visualizations, including a SHAP summary plot, risk histogram, stratified donut chart, boxplot of dosage by risk group, and a correlation heatmap. These figures provide a clear understanding of how individual risk factors contribute to outcome predictions. This study demonstrates that combining ML with XAI can produce an interpretable, scalable tool for risk stratification in perinatal psychiatry, enabling personalized decision-making and promoting safer pharmacological management during pregnancy.
Cite this paper
Filippis, R. D. and Foysal, A. A. (2025). Explainable AI for Stratifying Drug-Related Fetal Risk in Pregnancy: A Model-Based Study. Open Access Library Journal, 12, e3508. doi: http://dx.doi.org/10.4236/oalib.1113508.
Jha, S., Salve, H.R., Goswami, K., Sagar, R. and Kant, S. (2018) Burden of Com-mon Mental Disorders among Pregnant Women: A Systematic Review. Asian Journal of Psychiatry, 36, 46-53. https://doi.org/10.1016/j.ajp.2018.06.020
H. Bjørk, M., Veiby, G., A. Engelsen, B. and Gilhus, N.E. (2015) Depression and Anxiety dur-ing Pregnancy and the Postpartum Period in Women with Epilepsy: A Review of Frequency, Risks and Recommendations for Treatment. Seizure, 28, 39-45. https://doi.org/10.1016/j.seizure.2015.02.016
Bharadwaj, B., Endu-mathi, R., Parial, S. and Chandra, P.S. (2022) Management of Psychiatric Dis-orders during the Perinatal Period. Indian Journal of Psychiatry, 64, S414-S428. https://doi.org/10.4103/indianjpsychiatry.indianjpsychiatry_12_22
Tosato, S., Albert, U., Tomassi, S., Iasevoli, F., Carmassi, C., Ferrari, S., et al. (2017) A Systematized Review of Atypical Antipsychotics in Pregnant Women: Balancing between Risks of Untreated Illness and Risks of Drug-Related Adverse Effects. The Journal of Clinical Psychiatry, 78, e477-e489. https://doi.org/10.4088/jcp.15r10483
Gruszczyńska-Sińczak, I., Wachowska, K., Bliźniewska-Kowalska, K. and Gałecki, P. (2023) Psychiatric Treatment in Pregnancy: A Narrative Review. Journal of Clinical Medicine, 12, Article No. 4746. https://doi.org/10.3390/jcm12144746
Deligiannidis, K.M., Byatt, N. and Freeman, M.P. (2014) Pharmacotherapy for Mood Disorders in Pregnancy: A Review of Pharmacokinetic Changes and Clinical Recommenda-tions for Therapeutic Drug Monitoring. Journal of Clinical Psychopharmacology, 34, 244-255. https://doi.org/10.1097/jcp.0000000000000087
Costa, B. and Vale, N. (2024) Advances in Psychotropic Treatment for Pregnant Women: Efficacy, Adverse Outcomes, and Therapeutic Monitoring. Journal of Clinical Medicine, 13, Article No. 4398. https://doi.org/10.3390/jcm13154398
Creeley, C.E. and Denton, L.K. (2019) Use of Prescribed Psychotropics during Pregnancy: A Systematic Review of Pregnancy, Neonatal, and Childhood Outcomes. Brain Sciences, 9, Article No. 235. https://doi.org/10.3390/brainsci9090235
Gentile, S. (2010) Neurodevelopmental Effects of Prenatal Exposure to Psychotropic Medications. Depression and Anxiety, 27, 675-686. https://doi.org/10.1002/da.20706
Norton, M.E., Chauhan, S.P. and Dashe, J.S. (2015) Society for Maternal-Fetal Medicine (SMFM) Clinical Guide-line #7: Nonimmune Hydrops Fetalis. American Journal of Obstetrics and Gyne-cology, 212, 127-139. https://doi.org/10.1016/j.ajog.2014.12.018
Donofrio, M.T., Moon-Grady, A.J., Hornberger, L.K., Copel, J.A., Sklansky, M.S., Abuhamad, A., et al. (2014) Diagnosis and Treatment of Fetal Cardiac Disease: A Scientific Statement from the American Heart Association. Circulation, 129, 2183-2242. https://doi.org/10.1161/01.cir.0000437597.44550.5d
Charlton, R.A. and McGrogan, A. (2023) Drug Safety in Pregnancy: Data, Methods, and Chal-lenges. In: Babar, Z.-U.-D., Ed., Encyclopedia of Evidence in Pharmaceutical Public Health and Health Services Research in Pharmacy, Springer International Publishing, 215-226. https://doi.org/10.1007/978-3-030-64477-2_27
Muth, C., Blom, J.W., Smith, S.M., Johnell, K., Gonzalez‐Gonzalez, A.I., Nguyen, T.S., et al. (2018) Evi-dence Supporting the Best Clinical Management of Patients with Multimorbidity and Polypharmacy: A Systematic Guideline Review and Expert Consensus. Journal of Internal Medicine, 285, 272-288. https://doi.org/10.1111/joim.12842
Aurich, B., Apele‐Freimane, D., Banaschewski, T., Chouchana, L., Day, S., Kaguelidou, F., et al. (2021) C4c: Paediatric Pharmacovigilance: Methodological Considerations in Research and Development of Medicines for Children—A C4c Expert Group White Paper. British Journal of Clinical Pharmacology, 88, 4997-5016. https://doi.org/10.1111/bcp.15119
Boring, B.L., Walsh, K.T., Nanavaty, N., Ng, B.W. and Mathur, V.A. (2021) How and Why Pa-tient Concerns Influence Pain Reporting: A Qualitative Analysis of Personal Ac-counts and Perceptions of Others’ Use of Numerical Pain Scales. Frontiers in Psychology, 12, Article ID: 663890. https://doi.org/10.3389/fpsyg.2021.663890
Madakkatel, I., Zhou, A., McDonnell, M.D. and Hyppönen, E. (2021) Combining Machine Learning and Conventional Statistical Approaches for Risk Factor Discovery in a Large Cohort Study. Scientific Reports, 11, Article No. 22997. https://doi.org/10.1038/s41598-021-02476-9
Yoo, C., Ramirez, L. and Liuzzi, J. (2014) Big Data Analysis Using Modern Statistical and Machine Learn-ing Methods in Medicine. International Neurourology Journal, 18, Article No. 50. https://doi.org/10.5213/inj.2014.18.2.50
Dinov, I.D. (2016) Meth-odological Challenges and Analytic Opportunities for Modeling and Interpreting Big Healthcare Data. GigaScience, 5, s13742-016. https://doi.org/10.1186/s13742-016-0117-6
Adeniran, A.A., One-bunne, A.P. and William, P. (2024) Explainable AI (XAI) in Healthcare: En-hancing Trust and Transparency in Critical Decision-Making. World Journal of Advanced Research and Reviews, 23, 2447-2658. https://doi.org/10.30574/wjarr.2024.23.3.2936
Rane, N., Choudhary, S. and Rane, J. (2023) Explainable Artificial Intelligence (XAI) in Healthcare: In-terpretable Models for Clinical Decision Support. SSRN Electronic Journal. https://doi.org/10.2139/ssrn.4637897
Pierce, R.L., Van Biesen, W., Van Cauwenberge, D., Decruyenaere, J. and Sterckx, S. (2022) Explainability in Medicine in an Era of AI-Based Clinical Decision Support Systems. Frontiers in Genetics, 13, Article ID: 903600. https://doi.org/10.3389/fgene.2022.903600
Sendak, M., Elish, M.C., Gao, M., Futoma, J., Ratliff, W., Nichols, M., et al. (2020). “The Human Body Is a Black Box” Supporting Clinical Decision-Making with Deep Learning. Proceed-ings of the 2020 Conference on Fairness, Accountability, and Transparency, Barcelona, 27-30 January 2020, 99-109. https://doi.org/10.1145/3351095.3372827
Yonkers, K.A., Wisner, K.L., Stewart, D.E., Oberlander, T.F., Dell, D.L., Stotland, N., et al. (2009) The Management of Depression during Pregnancy: A Report from the American Psychiatric Association and the American College of Obstetricians and Gynecologists. General Hospital Psychiatry, 31, 403-413. https://doi.org/10.1016/j.genhosppsych.2009.04.003
Tomson, T. and Batti-no, D. (2012) Teratogenic Effects of Antiepileptic Drugs. The Lancet Neurology, 11, 803-813. https://doi.org/10.1016/s1474-4422(12)70103-5
Dathe, K. and Schaefer, C. (2019) The Use of Medication in Pregnancy. Deutsches ärzteblatt international, 116, Article No. 783. https://doi.org/10.3238/arztebl.2019.0783
Gao, S., Wu, Q., Sun, C., Zhang, T., Shen, Z., Liu, C., et al. (2018) Selective Serotonin Reuptake Inhibitor Use during Early Pregnancy and Congenital Malformations: A Systematic Re-view and Meta-Analysis of Cohort Studies of More than 9 Million Births. BMC Medicine, 16, Article No. 205. https://doi.org/10.1186/s12916-018-1193-5
Alwan, S., Friedman, J.M. and Chambers, C. (2016) Safety of Selective Serotonin Reuptake Inhibitors in Pregnancy: A Review of Current Evidence. CNS Drugs, 30, 499-515. https://doi.org/10.1007/s40263-016-0338-3
Malm, H. (2005) Use and Risks of Prescription Drugs during Pregnancy: With Special Emphasis on Selec-tive Serotonin Reuptake Inhibitors and Valproic Acid. PhD Diss., Helsingin Ylio-pisto.
Cerrizuela, S., Vega‐Lopez, G.A. and Aybar, M.J. (2020) The Role of Teratogens in Neural Crest Development. Birth Defects Research, 112, 584-632. https://doi.org/10.1002/bdr2.1644
Crisafulli, S., Khan, Z., Karatas, Y., Tuccori, M. and Trifirò, G. (2023) An Overview of Methodological Flaws of Real-World Studies Investigating Drug Safety in the Post-Marketing Setting. Expert Opinion on Drug Safety, 22, 373-380. https://doi.org/10.1080/14740338.2023.2219892
Pore, A.V., Bais, S.K. and Kamble, M.M. (2024) Pharmacovigilance in Clinical Research. International Journal of Pharmacy and Herbal Technology, 2, 759-775.
Nwokike, J. (2023) Regulatory Reliance and Post-Marketing Surveillance Systems for Safe and Accelerated Introduction of New Medical Products in Low- and Mid-dle-Income Countries.
Boyd, C.M., Vollenweider, D. and Puhan, M.A. (2012) Informing Evidence-Based Decision-Making for Patients with Comorbid-ity: Availability of Necessary Information in Clinical Trials for Chronic Diseases. PLOS ONE, 7, e41601. https://doi.org/10.1371/journal.pone.0041601
Fraccaro, P., Arguello Castelerio, M., Ainsworth, J. and Buchan, I. (2015) Adoption of Clinical Decision Support in Multimorbidity: A Systematic Review. JMIR Medical Informatics, 3, e3503. https://doi.org/10.2196/medinform.3503
Moler-Zapata, S., Hutchings, A., Grieve, R., Hinchliffe, R., Smart, N., Moonesinghe, S.R., et al. (2024) An Approach for Combining Clinical Judgment with Machine Learning to Inform Medical Decision Making: Analysis of Nonemergency Surgery Strate-gies for Acute Appendicitis in Patients with Multiple Long-Term Conditions. Medical Decision Making, 44, 944-960. https://doi.org/10.1177/0272989x241289336
Lloyd-Jones, D.M., Braun, L.T., Ndumele, C.E., Smith, S.C., Sperling, L.S., Virani, S.S., et al. (2019) Use of Risk Assessment Tools to Guide Decision-Making in the Primary Preven-tion of Atherosclerotic Cardiovascular Disease: A Special Report from the Amer-ican Heart Association and American College of Cardiology. Journal of the American College of Cardiology, 73, 3153-3167. https://doi.org/10.1016/j.jacc.2018.11.005
Nwokedi, T.V., et al. (2025) A Conceptual Framework for AI-Driven Healthcare Optimization and Predictive Analytics. Multidisciplinary Journal of Engineering, Technology and Sciences, 2, 1-22.
Delanerolle, G., Yang, X., Shetty, S., Raymont, V., Shetty, A., Phiri, P., et al. (2021) Artificial Intelligence: A Rapid Case for Advancement in the Per-sonalization of Gynaecology/Obstetric and Mental Health Care. Women’s Health, 17. https://doi.org/10.1177/17455065211018111
Bachmann, N., Tripathi, S., Brunner, M. and Jodlbauer, H. (2022) The Contribution of Data-Driven Technologies in Achieving the Sus-tainable Development Goals. Sustainability, 14, Article No. 2497. https://doi.org/10.3390/su14052497
Davidson, L., Canelón, S.P. and Boland, M.R. (2022) Medication-Wide Association Study Using Electronic Health Record Data of Prescription Medication Exposure and Multifetal Pregnancies: Retrospective Study. JMIR Medical Informatics, 10, e32229. https://doi.org/10.2196/32229
Escobar, G.J., Soltesz, L., Schuler, A., Niki, H., Malenica, I. and Lee, C. (2021) Prediction of Obstetrical and Fetal Complica-tions Using Automated Electronic Health Record Data. American Journal of Ob-stetrics and Gynecology, 224, 137-147.e7. https://doi.org/10.1016/j.ajog.2020.10.030
Casey, J.A., Schwartz, B.S., Stewart, W.F. and Adler, N.E. (2016) Using Electronic Health Records for Popu-lation Health Research: A Review of Methods and Applications. Annual Review of Public Health, 37, 61-81. https://doi.org/10.1146/annurev-publhealth-032315-021353
Parisineni, S.R.A. and Pal, M. (2023) Enhancing Trust and Interpretability of Complex Machine Learning Models Using Local Interpretable Model Agnostic SHAP Ex-planations. International Journal of Data Science and Analytics, 18, 457-466. https://doi.org/10.1007/s41060-023-00458-w
Bhattacharya, A. (2022) Applied Machine Learning Explainability Techniques: Make ML Models Ex-plainable and Trustworthy for Practical Applications Using LIME, SHAP, and More. Packt Publishing Ltd.
Kalusivalingam, A.K., Sharma, A., Patel, N. and Singh, V. (2021) Leveraging SHAP and LIME for Enhanced Explainability in AI-Driven Diagnostic Systems. International Journal of AI and ML, 2, 1-23.
Muntaha, S. and Dewanjee, S. (2024) Integrating XAI with Hybrid BiGRU-BiLSTM Model for Comprehensive Maternal-Fetal Health Risk Monitoring. 2024 International Conference on Innovations in Science, Engineering and Technology (ICISET), Chittagong, 26-27 October 2024, 1-6. https://doi.org/10.1109/iciset62123.2024.10939599
Avinash, A., Harikumar, A., Nair, A., Pai, S.K., Surendran, S. and George, L. (2024) A Com-parison of Explainable AI Models on Numeric and Graph-Structured Data. Pro-cedia Computer Science, 235, 926-936. https://doi.org/10.1016/j.procs.2024.04.088
Winkelmann, C.T. and Wise, L.D. (2009) High-Throughput Micro-Computed Tomography Imaging as a Method to Evaluate Rat and Rabbit Fetal Skeletal Abnormalities for Develop-mental Toxicity Studies. Journal of Pharmacological and Toxicological Methods, 59, 156-165. https://doi.org/10.1016/j.vascn.2009.03.004
Aspatwar, A., Nath, R., Bhowmik, R. and Jesudasan, R. (2024) Exploring the Applications of Formulation-Based Drug Development Strategies in Neurological Disorders Using Artificial Intelligence and Machine Learning Approaches.
Corponi, F., Fabbri, C. and Serretti, A. (2020) Antidepressants: Indications, Contraindi-cations, Interactions, and Side Effects. In: Riederer, P., et al., Eds., NeuroPsy-chopharmacotherapy, Springer International Publishing, 1-38. https://doi.org/10.1007/978-3-319-56015-1_29-1
Antimisiaris, D., McHolan, B., Moga, D. and Mospan, C. (2021) Medication Related Problems. The Senior Care Pharmacist, 36, 68-82. https://doi.org/10.4140/tcp.n.2021.68
Gelman, A. and Hennig, C. (2017) Beyond Subjective and Objective in Statistics. Journal of the Royal Statis-tical Society Series A: Statistics in Society, 180, 967-1033. https://doi.org/10.1111/rssa.12276
Wang, Y., Zhang, Y., Lu, Y. and Yu, X. (2020) A Comparative Assessment of Credit Risk Model Based on Machine Learning—A Case Study of Bank Loan Data. Procedia Computer Science, 174, 141-149. https://doi.org/10.1016/j.procs.2020.06.069
Nohara, Y., Matsumoto, K., Soejima, H. and Nakashima, N. (2022) Explanation of Machine Learning Models Using Shapley Additive Explanation and Application for Real Data in Hospital. Computer Methods and Programs in Biomedicine, 214, Article ID: 106584. https://doi.org/10.1016/j.cmpb.2021.106584
Longo, L., Brcic, M., Cabitza, F., Choi, J., Confalonieri, R., Ser, J.D., et al. (2024) Explainable Artificial Intelligence (XAI) 2.0: A Manifesto of Open Challenges and Interdisci-plinary Research Directions. Information Fusion, 106, Article ID: 102301. https://doi.org/10.1016/j.inffus.2024.102301
Albahri, A.S., Duhaim, A.M., Fadhel, M.A., Alnoor, A., Baqer, N.S., Alzubaidi, L., et al. (2023) A Sys-tematic Review of Trustworthy and Explainable Artificial Intelligence in Healthcare: Assessment of Quality, Bias Risk, and Data Fusion. Information Fu-sion, 96, 156-191. https://doi.org/10.1016/j.inffus.2023.03.008
Soyege, O.S., Nwokedi, C.N., Tomoh, B.O., et al. (2025) Health Informatics in Developing Countries: Challenges and Opportunities. International Journal of Applied Research in Social Sciences, 7, 186-202.