Clear Sky Science · en
Multivariable AI-based analysis of immune–lifestyle patterns associated with recurrent pregnancy loss: an exploratory retrospective study
Why this matters for hopeful parents
For many couples, losing more than one pregnancy is an invisible heartbreak that seems to come without warning or clear answers. This study explores whether everyday factors like body weight and smoking, together with subtle signs from the immune system, can form a recognizable pattern that helps doctors estimate a woman’s risk of repeated miscarriages. By using a modern form of artificial intelligence to analyze routine blood tests from tens of thousands of women, the researchers aim to turn scattered lab numbers into practical guidance for prevention and care.
Looking for patterns behind repeated loss
Recurrent pregnancy loss (RPL) is usually defined as two or more miscarriages before 24 weeks of pregnancy and affects up to one in twenty women trying to conceive. In about half of these cases, standard medical tests fail to reveal a clear cause. Earlier work has linked many influences to pregnancy loss, including age, obesity, smoking, alcohol, thyroid problems, and immune reactions to the fetus. Instead of studying each factor one by one, this team asked whether a combined "immune–lifestyle" fingerprint exists that distinguishes women with RPL from those with healthy pregnancies, and whether such a fingerprint could be detected reliably using a deep learning model.

A huge dataset and a smart learning tool
The researchers gathered de-identified records from five fertility centers across Iran, covering more than 36,000 women seen between 2014 and 2024. This included 16,818 women with a history of recurrent loss and 19,979 women with successful pregnancies. For each woman they collected 22 pieces of information: age, body mass index (BMI), smoking and alcohol use, basic hormone and vitamin levels, counts of different immune cells in the blood, and a panel of autoantibodies that can sometimes attack the body’s own tissues. They then trained a specialized deep learning model, called TabNet, which is designed to work well with table-like medical data and can highlight which inputs matter most for its decisions. Careful checks were used to prevent overfitting and to make sure the model was not accidentally learning from hidden clues such as data order or missing-value quirks.
What the model learned from the numbers
On unseen validation data, the AI separated women with RPL-related immune–lifestyle patterns from healthy controls with very high accuracy. Its overall correctness was about 95%, with sensitivity (catching affected women) near 97% and specificity (correctly identifying healthy women) above 92%. A standard performance measure called the area under the ROC curve was 0.985, which indicates excellent separation between the two groups. Importantly, the model’s risk estimates were well calibrated: predicted probabilities closely matched the actual frequencies of RPL-like patterns in the data. Repeated cross-validation and tests with shuffled labels showed that the performance was robust and not due to chance or hidden biases in the dataset.

How lifestyle and immunity work together
By examining which features the model relied on most, the authors found that certain immune markers, especially the balance between two types of helper T cells (often summarized as the Th1/Th2 ratio) and the ratio of CD4 to other T cells, played leading roles. These signals were joined by BMI, age, B cell markers, and several autoantibodies, suggesting that both immune activity and metabolic state shape risk. The analysis supports a picture in which excess weight and smoking promote low-grade inflammation and a more aggressive immune tone, which in turn may disturb the tolerance needed for a pregnancy to thrive. Even factors that seemed less important on average, such as thyroid antibodies or vitamin D, sometimes helped the model when other data were missing, underlining that many small signals can add up.
From complex data to real-world decisions
Because the required tests are already common in fertility clinics, the team built a simple web-based interface: clinicians can upload a spreadsheet with the 22 measurements and receive a report describing the woman’s immune–lifestyle profile and estimated chance of a future live birth. The authors stress that the tool is not a crystal ball for pregnancy outcome, nor does it redefine disease types. Instead, it offers a way to spot women whose immune and lifestyle patterns suggest higher risk, so that doctors can prioritize steps like weight management, smoking cessation, and, where appropriate, immune-modulating therapies before the next pregnancy.
What this means for patients
The study shows that modern AI can weave together everyday health habits and detailed immune readings into a single, reliable risk picture for recurrent pregnancy loss. For patients, this could mean moving from vague reassurances or trial-and-error treatments toward more tailored advice: who needs lifestyle changes alone, who might benefit from closer immune evaluation, and who appears at relatively low risk. The model still needs testing in other countries and clinic settings, but it points toward a future in which a routine blood draw and a smart algorithm help give couples clearer expectations and more focused support on their path to a healthy baby.
Citation: Dashti, M., Aslanian-Kalkhoran, L., Doustfateme, S. et al. Multivariable AI-based analysis of immune–lifestyle patterns associated with recurrent pregnancy loss: an exploratory retrospective study. Sci Rep 16, 8250 (2026). https://doi.org/10.1038/s41598-026-38941-6
Keywords: recurrent pregnancy loss, immune system, lifestyle factors, deep learning, fertility care