Over the last decade, many professional organizations have called for universal screening for depression in pregnant and postpartum women. The goal of screening is to identify women with depression and to initiate treatment early. While this is certainly an important aspect of caring for the mental health of pregnant and postpartum women, optimal screening of this population should include the identification of women at increased risk for perinatal mental health conditions before the onset of symptoms.

Thus far, epidemiologic studies have revealed that the most robust predictor of risk for perinatal depression is a history of mood or anxiety disorder prior to pregnancy. Other risk factors modulate risk, including history of childhood adversity, recent life stressors, intimate partner violence, and overall physical health. Although there is data to support the validity of these population-level risk factors, it is difficult to utilize these factors when it comes to calculating an individual’s risk for perinatal psychiatric illness. In addition, there are also factors that mitigate risk (for example, social supports), and it is often difficult to account for these beneficial factors in our calculations of risk.  

Clinical Prediction of Risk: Consider Ms. A

Take the example of Ms. A. She is 35 years old, married for 6 years, and employed as an architect. She struggled with anxiety and depression at the age of 14, after her father died unexpectedly (heart attack). For about four years, she was in regular psychotherapy and took sertraline 50 mg. She stopped treatment when she started college and has not had a recurrence of her symptoms and has not taken any medications for depression or anxiety. She has been in psychotherapy for the past several years to help deal with daily stressors.  

She is in good health. She reports drinking 1-2 glasses of wine on the weekend, no recreational drugs. She has been on oral contraceptives for about 10 years. She has no history of PMS or PMDD.   

Her family history is notable for generalized anxiety in her mother and older sister; for both, the disorder emerged after the death of Ms. A’s father. She is not aware of any mental health problems on her father’s side of the family.

Based on these factors, we might consider Ms. A to be at relatively low risk for perinatal depression and anxiety. She has a remote history of depression and anxiety, but that was situational and she has been symptom-free and off medication for 17 years. On the other hand, she does have a history of childhood adversity (father’s death) and a family history of anxiety (emerging after father’s death). How much weight should we give these risk factors?

Using Big Data to Estimate Risk

As clinicians, our ability to estimate risk in an individual patient is fair and is often subjective.  This is where big data can be helpful. Every time a patient visits a health care provider, a vast amount of data is collected: sociodemographic information like marital status, employment, and education level; medical history; data from standardized questionnaires; laboratory tests; vital signs; prescribed medications. Clinicians cannot possibly take in and analyze every morsel of data in order to generate a precise estimate of risk. But powerful computers can.

To harvest and effectively utilize all of the potentially valuable information included in the medical record, researchers are turning to machine learning to sift through enormous quantities of data and to determine what factors are the most relevant in predicting risk for perinatal psychiatric illness. The goal is to create an algorithm that would reliably predict risk in each individual. This approach allows us to understand what factors are the most robust predictors of risk and may also help to identify other factors that we do not yet know about.

In a recent review, Cellini and colleagues (2022) identified 11 studies focusing on the identification of postpartum depression (PPD) predictors using machine learning techniques. In these studies, researchers evaluated a wide range of possible predictors measured during pregnancy or at the time of delivery. Using machine learning, they used relevant data to generate an algorithm that could be used to predict an individual’s risk for PPD.  

These studies assessed a broad array of potential risk factors, including psychiatric history (prior to and during pregnancy), sociodemographic variables (e.g. age, marital status), obstetric variables (e.g., pregnancy complications), and pediatric variables (e.g. gestational age, birth weight). Three studies employed biological variables, in the form of blood, genetic and epigenetic predictors. None of the studies employed imaging techniques.

All studies achieved an accuracy or an area under the curve (AUC) of greater than 0.7.  An ROC value above 0.7 is considered to be reasonable performance for a model to be used in order to predict a particular outcome, such as the occurrence of pPD. (AUC ranges in value from 0 to 1. A model whose predictions are 100% wrong has an AUC of 0; a model whose predictions are 100% correct has an AUC of 1.0.)

The most powerful predictors of risk included a history of depression or anxiety prior to pregnancy, and depressive symptoms or anxiety during pregnancy.  Several studies indicated that antidepressant prescription at any point in a woman’s life is one of the strongest predictors of risk. Other important predictor variables included smoking, age (younger or older), pregnancy complications, increased use of healthcare services during pregnancy, greater number of emergency room visits during pregnancy, pre-gestational BMI, lower infant birth weight, shorter length of gestation, gender of the child, and recent stressful life events. 

All of these variables have been identified as risk factors in earlier epidemiological studies. What the machine learning studies add is a more nuanced estimation of the weight to give to each of these variables. For example, a higher BMI may increase risk of PPD, but appears not to be as potent a predictor of postpartum risk as having a history of depression. Because all of these calculations are being carried out by a computer, we can use multiple variables simultaneously to estimate risk. 

Looking Forward

Let’s go back to Ms. A.  Although her mood was relatively stable during pregnancy, the pregnancy itself was difficult. She had fairly severe nausea during most of her pregnancy, which made it difficult for her to gain weight. Her activity was limited, and she was not able to exercise regularly. Although she felt much better physically after the birth of her daughter, her anxiety–especially related to the baby’s well-being–was very high. Breastfeeding was difficult, and her anxiety about feeding made it difficult to sleep at night. At her 6 week postpartum visit, she scored 24 on the EPDS, a score that is consistent with severe PPD.

Is this something we could have predicted?

Maybe, but probably not. Based on what we have learned from the machine learning studies described above, it appears that use of an antidepressant medication at any point in a woman’s lifetime, even if it was used many years ago, may be a more potent predictor of risk for PPD than other factors. But estimation of risk is subjective, and given the situational and remote nature of her previous episode of depression, her consistent high level of functioning and the fact that she has been well and off medication for the last 17 years, Ms A’s providers did not consider her to be at significant risk for PPD.

As mental health providers, we see many patients who are at high risk for recurrent psychiatric illness and follow them more closely. But in the general population, there are many women who are at increased risk for PPD, although they may not currently be receiving treatment for psychiatric illness. Although screening at 6 weeks identified Ms A as having postpartum depression, perhaps we could have made the diagnosis earlier or maybe we could have put in additional support to minimize her risk for depression.  

Imagine if we could use machine learning to enhance the care we deliver and to make more reliable estimations of risk. Maybe when Ms. A goes to her obstetrician during her next pregnancy, she will answer a few questions, a magic risk prediction algorithm will do its thing, and we will receive some sort of number or score that quantifies Ms. A’s risk for perinatal depression or anxiety. She and her obstetrician will then discuss what options are available to decrease her risk: for example, maybe a course of mindfulness-based cognitive therapy or the introduction of an antidepressant after delivery. (OK, maybe this sounds far-fetched, but this sort of precision medicine approach is already being used to make treatment decisions for patients with breast cancer.)  

These studies are preliminary but very exciting. Moving forward, we will need to test these predictive models in a variety of settings. A model designed to predict risk in Iowa City may not work as well in Beijing. Similarly a model trained with publicly insured individuals giving birth in an urban hospital setting may not perform the same way in a suburban mostly privately insured obstetric practice. Factors including race, ethnicity, socioeconomic status, community support, and access to health care are likely to vary from site to site. There may also be cultural differences to consider in generating these models, such as preference for a child of a particular gender. Nonetheless, it will be exciting to see how precision medicine unfolds within the field of perinatal psychiatry.

Ruta Nonacs, MD, PhD


Cellini P, Pigoni A, Delvecchio G, Moltrasio C, Brambilla P. Machine learning in the prediction of postpartum depression: A review. J Affect Disord. 2022 Jul 15; 309:350-357. 

Hochman E, Feldman B, Weizman A, Krivoy A, Gur S, Barzilay E, Gabay H, Levy J, Levinkron O, Lawrence G.  Development and validation of a machine learning-based postpartum depression prediction model: A nationwide cohort study. Depress Anxiety. 2021 Apr;38(4):400-411. doi: 10.1002/da.23123. Epub 2020 Dec 7.

Yang ST, Yang SQ, Duan KM, Tang YZ, Ping AQ, Bai ZH, Gao K, Shen Y, Chen MH, Yu RL, Wang SY. The development and application of a prediction model for postpartum depression: optimizing risk assessment and prevention in the clinic. J Affect Disord. 2022 Jan 1;296:434-442.

Related Posts