# Risk assessment of drug-associated miscarriage using XGBoost and SHAP explainability: a real-world pharmacovigilance analysis based on the FAERS database

**Authors:** Sen Lin, Lanyue Ma, Ruiqi Zhao, Lisheng Peng, Xinyu Zhang, Bei Zhang, Danfei Li, Yijia Li, Li He

PMC · DOI: 10.3389/fphar.2026.1687391 · Frontiers in Pharmacology · 2026-02-23

## TL;DR

This study uses machine learning and explainable AI to identify drugs linked to miscarriage risk using real-world data from the FDA's adverse event database.

## Contribution

The novel use of XGBoost and SHAP to analyze drug-miscarriage associations in FAERS data, highlighting specific drug classes and risk timing.

## Key findings

- Immunomodulators like adalimumab and infliximab are significant predictors of miscarriage risk.
- Miscarriage events often occur within 2 years of drug exposure, with early risk observed for anti-TNF-α drugs.
- Machine learning models identified high-risk drug classes including antivirals and psychiatric medications.

## Abstract

Miscarriage is a common and serious adverse pregnancy outcome. Assessing drug-associated miscarriage risk is essential for medication safety in pregnancy. Using the FDA Adverse Event Reporting System this study systematically mined adverse drug events related to miscarriage and combined machine learning with explainable Artificial Intelligence to evaluate potential high-risk drugs.

We retrieved FAERS reports of miscarriage-associated ADEs from 2005 to 2024. Disproportionality analyses were conducted using the reporting odds ratio (ROR), proportional reporting ratio (PRR), Bayesian Confidence Propagation Neural Network (BCPNN), and Multi-Item Gamma Poisson Shrinker (MGPS), with subgroup analyses by age and body weight. An eXtreme Gradient Boosting (XGBoost) model was developed to predict miscarriage risk, and Shapley Additive exPlanations (SHAP) were used to interpret feature contributions. Finally, Weibull distribution modeling characterized the time-to-onset (TTO) from drug exposure to miscarriage.

A total of 36,389 ADEs were included. We identified several potential high-risk classes, notably immunomodulators, psychoactive/neuroactive agents, and antimicrobials. The XGBoost model showed favorable discrimination with a mean area under the curve (AUC) of 0.738. SHAP analysis reveals that immunomodulatory factors, such as adalimumab and infliximab, are significant predictors of miscarriage events in this model. The distribution of their SHAP values suggests a strong association between these drugs and miscarriage reports. time-to-onset analyses suggested that most miscarriages occurred within 2 years after drug exposure, with marked heterogeneity in risk timing across agents; anti-Tumor Necrosis Factor-alpha drugs (TNF-α) exhibited a higher early risk.

Machine learning and SHAP interpretability analysis based on the FAERS database effectively identified immunomodulators, antiviral drugs, and psychiatric/neuropsychiatric medications as potential risk signals associated with miscarriage. These findings underscore the need for individualized medication assessment that considers patient age and body weight, providing evidence-based guidance and early alerting for reference for drug risk assessment during pregnancy.

## Full-text entities

- **Genes:** ITIH1 (inter-alpha-trypsin inhibitor heavy chain 1) [NCBI Gene 3697] {aka H1P, IATIH, ITI-HC1, ITIH, SHAP}, LINC-ROR (long intergenic non-protein coding RNA, regulator of reprogramming) [NCBI Gene 100885779] {aka ROR, lincRNA-RoR, lincRNA-ST8SIA3}, TNF (tumor necrosis factor) [NCBI Gene 7124] {aka DIF, IMD127, TNF-alpha, TNFA, TNFSF2, TNLG1F}
- **Diseases:** vascular dysfunction (MESH:D002561), adverse drug reactions (MESH:D064420), Crohn's disease (MESH:D003424), preterm birth (MESH:D047928), infections (MESH:D007239), ABORTION (MESH:D000026), placental dysfunction (MESH:D010922), embryonic (MESH:D018236), polycystic ovary syndrome (MESH:D011085), viral infections (MESH:D014777), rheumatoid arthritis (MESH:D001172), epilepsy (MESH:D004827), birth defects (MESH:D000014), immune dysregulation (OMIM:614878), HIV (MESH:D015658), stillbirth (MESH:D050497), thyroid dysfunction (MESH:D013959), ABORTION SPONTANEOUS (MESH:D000022), Hepatitis B Virus (MESH:D006509), DL (MESH:C537113), psychiatric (MESH:D001523), neurotoxicity (MESH:D020258), diabetes (MESH:D003920), inflammatory (MESH:D007249), reproductive toxicity (MESH:D060737), metabolic disorders (MESH:D008659), overweight (MESH:D050177), maternal blood vessel insufficiency (MESH:D009383), autoimmune diseases (MESH:D001327), obesity (MESH:D009765)
- **Chemicals:** Vedolizumab (MESH:C543529), valproic acid (MESH:D014635), lamotrigine (MESH:D000077213), ulipristal (MESH:C094854), Fingolimod (MESH:D000068876), montelukast (MESH:C093875), Ritonavir (MESH:D019438), TTO (-), ethinylestradiol (MESH:D004997), quetiapine (MESH:D000069348), Levetiracetam (MESH:D000077287), buprenorphine (MESH:D002047), warfarin (MESH:D014859), medroxyprogesterone (MESH:D008525), etonogestrel (MESH:C044815), natalizumab (MESH:D000069442), carbamazepine (MESH:D002220), norelgestromin (MESH:C449219), certolizumab pegol (MESH:D000068582), isotretinoin (MESH:D015474), ciprofloxacin (MESH:D002939), LEVONORGESTREL (MESH:D016912), metronidazole (MESH:D008795), ADE (MESH:C060154), Aripiprazole (MESH:D000068180), escitalopram (MESH:D000089983), tenofovir disoproxil (MESH:D000068698), risankizumab (MESH:C000601773), clarithromycin (MESH:D017291), azithromycin (MESH:D017963), amoxicillin (MESH:D000658), Enoxaparin (MESH:D017984), Infliximab (MESH:D000069285), progesterone (MESH:D011374), ribavirin (MESH:D012254), dolutegravir (MESH:C562325), ADALIMUMAB (MESH:D000068879)
- **Species:** Homo sapiens (human, species) [taxon 9606], Legionella sp. H (species) [taxon 66966], Human immunodeficiency virus 1 (no rank) [taxon 11676]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12968268/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12968268/full.md

## References

64 references — full list in the complete paper: https://tomesphere.com/paper/PMC12968268/full.md

---
Source: https://tomesphere.com/paper/PMC12968268