How Generative AI Accelerated Preterm Birth Research in Record Time

AI data

In a groundbreaking pilot, researchers from the University of California, San Francisco and Wayne State University put generative artificial intelligence to the test on a massive health‑care dataset. The goal was simple yet ambitious: predict which pregnancies would end in preterm birth, using records from over a thousand expectant mothers.

Instead of relying solely on seasoned programmers and data scientists, the team paired a master's student with a high‑school intern and handed them an AI‑powered coding assistant. Within minutes, the system drafted functional analysis scripts that would normally take experts days or weeks to write.

The experiment was set up as a head‑to‑head comparison. One group followed the traditional route—manual coding, iterative debugging, and expert review. The other let a suite of AI chatbots generate the same pipelines from concise, natural‑language prompts. Only four of the eight bots produced usable models, but those that succeeded matched or even outperformed the human‑crafted solutions.

Because the AI could spin up code instantly, the junior researchers completed their validation, wrote a manuscript, and submitted it to a peer‑reviewed journal in a matter of months—a timeline that previously stretched into years.

"These tools can dissolve one of the biggest bottlenecks in data science: building the analysis pipeline," said Dr. Marina Sirota, a pediatrician and interim director of UCSF’s computational health institute. "The acceleration is especially critical for conditions that demand rapid clinical insight."

Why Speed Matters in Preterm Birth Research

Preterm birth remains the leading cause of death among newborns and contributes to lifelong neurological and developmental challenges. In the United States alone, about 1,000 babies are born before term each day, yet the underlying triggers are still not fully understood.

To explore possible risk factors, Dr. Sirota’s team assembled a rich collection of vaginal microbiome profiles from roughly 1,200 pregnant participants across nine separate studies. The sheer volume and complexity of this data made traditional analysis labor‑intensive.

The researchers initially turned to the DREAM (Dialogue on Reverse Engineering Assessment and Methods) crowdsourcing platform, inviting more than a hundred global teams to craft machine‑learning models that could spot patterns linked to early delivery. Although many teams delivered results within the three‑month competition window, it still took nearly two years to synthesize and publish the findings.

Putting AI Directly on the Data

For the new trial, eight different AI chatbots received the exact same datasets used in the DREAM challenges—no hand‑written code, only detailed textual instructions. The prompts guided each system to analyze microbiome sequences, blood markers, and placental samples to either flag the risk of preterm birth or estimate gestational age.

When the generated scripts were run, half of the bots produced models whose predictive power matched that of the best human teams; a few even edged ahead. Remarkably, the entire workflow—from prompt design to manuscript submission—was wrapped up in six months.

Nevertheless, the scientists caution that AI output still demands rigorous oversight. Erroneous or biased code can slip through, and domain expertise remains indispensable for interpreting results and shaping the next research questions.

Looking Ahead

The study was supported by the March of Dimes Prematurity Research Center at UCSF, ImmPort, and the NICHD Pregnancy Research Branch. As AI continues to evolve, its capacity to sift through massive health datasets could free scientists to spend more time on hypothesis generation and less on routine programming chores.