AI Tool Predicts E. coli Contamination in Real Time to Protect Public Health

Sunset aerial view of Punta Gorda wealthy neighborhood. Expensive residential homes along canals reflect warm evening sky.

By bilanol for AdobeStock

Key points

  • Researchers have developed an AI-powered predictive modeling framework that can estimate E. coli contamination risk in recreational waters up to 24 hours in advance, with approximately 85% accuracy. 
  • The system uses real-time environmental and hydrometeorological data—including rainfall, streamflow, turbidity and temperature—to provide early warnings before contamination reaches unsafe levels. 
  • The research aims to help water managers shift from reactive beach closures to proactive, data-driven advisories. 

Every summer, beach closures disrupt families, harm local businesses and raise public health alarms. Most of the time, the warning comes after it is already too late.

Now, a new artificial intelligence framework developed at the FAMU-FSU College of Engineering aims to change that by alerting water managers to E. coli contamination risk before anyone gets sick.

smiling woman with long hair
Assistant Professor Nasrin Alamdari. (Mark Wallheiser/FAMU-FSU College of Engineering)

Led by Assistant Professor Nasrin Alamdari in the Department of Civil and Environmental Engineering and the Resilient Infrastructure and Disaster Response (RIDER) Center, a research team has developed a predictive modeling framework powered by explainable AI (XAI). The system draws on environmental and hydrometeorological data to provide early warnings of Escherichia coli (E. coli) contamination in recreational waterways, giving communities a window to act before health risks emerge.

The findings were recently published in Water Research.

Why Does Traditional Water Quality Testing Fall Short?

Traditional water quality monitoring relies on manual sampling followed by laboratory analysis, a process that takes 18 to 24 hours to yield results. By the time a beach or river is closed, swimmers may have already been exposed to dangerous levels of contamination.

“Beach closures often occur because we detect contamination after water conditions have already become unsafe,” Alamdari explained. “Our goal is to move from a reactive approach to a predictive one, leveraging continuous environmental data—including rainfall, river flow, turbidity, temperature and upstream conditions—to estimate E. coli levels in near real time and up to a day in advance. In our study, the model we developed identified unsafe conditions with approximately 85% accuracy, demonstrating its potential to offer earlier warnings before levels reach unsafe thresholds.”

How Does the AI Water Quality Model Work?

The framework uses current and historical environmental data to estimate contamination risk without waiting for lab results. Inputs include upstream hydrologic conditions, streamflow rates, rainfall totals, turbidity readings and water temperature. By combining these variables, the model can flag elevated E. coli risk in near real time and up to 24 hours ahead.

The 2023 Big Creek sewage spill illustrates exactly the kind of scenario the model is built to address. On June 29, 2023, testing in the Chattahoochee River National Recreation Area revealed E. coli levels far above safety limits after a malfunction at the Big Creek Water Reclamation Facility released inadequately treated sewage into the river. Traditional monitoring had no mechanism to catch the surge in time.

“The 2023 Big Creek sewage spill is an example of how a sudden treatment failure can rapidly contaminate downstream recreational waters,” said Ali Salou Moumouni, graduate researcher on the project. “Our predictive models use current and past environmental and hydrometeorological data to estimate contamination risk before lab results arrive. By factoring in upstream hydrologic conditions, our model provides earlier warnings and more targeted monitoring, improving preparedness during sudden contamination events.”

What Are the Economic Costs of Delayed E. Coli Warnings?

The consequences of delayed contamination alerts extend well beyond public health. When closures happen unexpectedly, hotels, outfitters and water recreation businesses lose revenue with little warning. Municipalities absorb higher costs from emergency public notifications and increased health incident response.

“Delays expose the public to greater health risks and increase medical expenses from waterborne illness,” Alamdari pointed out. “Local economies that depend on recreation and tourism suffer revenue losses when visitors cancel trips or avoid affected areas, while municipalities incur higher operational costs for water testing and emergency response. Repeated advisories can also erode public trust, leading to longer-term declines in visitation and further economic loss.”

Proactive alerts, by contrast, give businesses and government agencies advance notice, reduce unnecessary closures and help communities protect both public health and economic stability. By shifting from reactive to predictive monitoring, communities can better protect public health while reducing unnecessary closures and improving economic resilience, Alamdari said.

How Does Urban Development Drive Water Contamination Risk?

The study also documents how land use changes intensify the contamination problem. Between 2007 and 2023, urbanization in the study area increased impervious cover from 24% to 28%, altering runoff pathways and amplifying contamination dynamics.

“This change led to more polluted runoff and higher and more variable E. coli levels in streams,” said Imtiaz Syed Usama, graduate researcher on the team. “Our findings show that every development decision influences water quality and public health, highlighting the need for green infrastructure.”

Storms compound the problem. E. coli levels can spike within hours of heavy rainfall, but traditional lab testing is too slow to catch those surges before people enter the water.

Usama explained that high E. coli levels warn of danger before anyone gets sick, but traditional monitoring often misses short-lived spikes after storms. This new model bridges the gap, using real-time data on rainfall and river conditions to predict risk so managers can act before people are exposed.

How Does Climate Change Affect Recreational Water Safety?

Nasr Azadani Mitra, a graduate researcher at RIDER on the project, sees further implications for natural disaster events. 

“When storms hit, water contamination can spike in hours, yet traditional testing is too slow to catch these surges,” Mitra said. “Our model flips the script: by combining rainfall, streamflow, turbidity and other hydrometeorological data, it helps predict E. coli risk in near real time and up to a day ahead, including during extreme weather. By integrating hydrometeorology, our model lets communities issue earlier warnings and protect public health, whether or not they have routine lab testing.”

As precipitation patterns grow less predictable, even moderate rainfall events carry elevated contamination risk in urbanized watersheds. The model accounts for rainfall history, streamflow and watershed wetness indicators to improve prediction during those in-between conditions that traditional models often miss.

“As climate change brings more frequent storms, contamination can quietly build up, making even light rain risky,” Mitra continued. “Our model uses rainfall history, streamflow and watershed wetness indicators to better predict when contamination risk may rise, helping communities issue earlier warnings and respond more effectively to changing conditions. This approach turns guesswork into foresight, equipping communities to act early, adapt as weather patterns shift and keep water safe for the long haul.”

What Comes Next For AI-Driven Water Safety Research?

The research represents a practical step toward data-driven public health management for water systems. By integrating explainable AI— a design approach that makes the model’s reasoning transparent to water managers, not just to data scientists—the framework is built for real-world adoption. Water utility staff can see which variables drove a given prediction, making it easier to act on alerts with confidence.

This research was supported by grants from Florida State University.


Editor’s Note: This article was edited with a custom prompt for Claude Sonnet 4.6, an AI assistant created by Anthropic. The AI optimized the article for SEO/GEO discoverability and improved clarity, structure and readability while preserving the original reporting and factual content. All information and viewpoints remain those of the author and publication. This article was edited and fact-checked by college staff before being published. This disclosure is part of our commitment to transparency in our editorial process. Last edited: 04/20/2026.


Frequently Asked Questions

What is explainable AI (XAI) and why does it matter for water management?

Explainable AI (XAI) refers to artificial intelligence systems designed to make their reasoning process visible and understandable to human users, not just to data scientists. In the context of water quality management, this means a utility staff member can see which environmental variables—such as a spike in turbidity or an upstream runoff event—drove a particular contamination prediction. This transparency makes it easier for managers to trust and act on the model’s alerts, rather than treating the output as a black box.

What is the RIDER Center at Florida State University?

The Resilient Infrastructure and Disaster Response (RIDER) Center is a research center housed within the FAMU-FSU College of Engineering at Florida State University in Tallahassee, Florida. The center focuses on engineering solutions related to infrastructure resilience, environmental risk and community preparedness. The water quality AI project described in this article is among the research efforts conducted under the RIDER Center umbrella.


RELATED ARTICLES

Engineering researcher combines climate change and land use data to predict watershed impact

Mapping Vulnerable Critical Infrastructure in Western Florida for Better Disaster Response

Researchers Examine How Drought, Water Volume Affect Nutrients in Apalachicola River