A flash flood can devastate a community for years in a matter of minutes. These disasters account for roughly 85% of floods and cause thousands of deaths annually worldwide, with water levels capable of shooting up 30 feet and receding back to normal levels in the span of a single, unpredictable day, according to the National Weather Service. These catastrophic events are extremely hard to predict, but a solution to this serious problem could come from a silly place: the same artificial intelligence (AI) techniques used to generate images of weightlifting cats or cartoon versions of family photos.
Recently, a team of scientists, including researchers at Penn State, applied the same fundamental techniques behind AI models' image generation to better predict hourly flash flood risk. Training their model with rainfall and streamflow data collected from over 500 river basins across the continental U.S. between 1990 and 2003, the team demonstrated that not only can their model parse through notoriously unreliable weather data to form accurate predictions, but it can also be easily updated with new data collected from water monitoring gauges around the country. They detailed their approach in a paper published in Water Resources Research.
For years, Chaopeng Shen, professor of civil and environmental engineering and corresponding author on the paper, and his team have leveraged machine learning and AI to build flood forecasting models. Although these national-scale models make accurate predictions using historical rainfall and streamflow - the rate at which water flows in a river - they have trouble capturing the severity of rapid weather swings that can lead to flash flood events. Many of the most devastating floods in recent memory, including the flooding that swept across Central Texas in the summer of 2025, swell and recede in a matter of hours.
"We've previously delivered a daily flood forecasting model, but it's widely understood that the peaks of flash floods occur at an hourly scale," explained Shen, who holds an additional affiliation at Penn State's Institute of Energy and the Environment. "Water levels can rapidly rise and recede in just a matter of hours, meaning on a daily scale, they might still seem high, but not disaster-inducing. By calibrating the model for an hourly scale, we can more reliably capture the extraordinary peaks that can wreak havoc."
To produce predictions, generative AI models must be primed with existing information called training data, making predictions based on patterns observed in previous data sets. The process is like giving a model an image or a sentence with a portion missing and asking it to predict content in that unknown region, Shen said.
"Before the age of AI, scientists had to manually assimilate data, using a lot of assumptions and mathematical gymnastics to make predictions," Shen said, explaining that the explosion of AI science in the last decade has fundamentally changed how hydrologists, or scientist who study how water moves around the environment, make predictions. "With AI, you can do that much faster and easier by using generative AI trained on existing data."
This work introduces a forecasting model that has fundamental differences from the large language models that power chatbots like ChatGPT, Shen explained. Their model incorporates diffusion, a training method most used in image generation, where a model receives a complete dataset or picture for training. After that clear data is processed, noise - randomized, unpredictable information - is introduced into the dataset. The AI model is then asked to remove the excess noise and reproduce an interpretable dataset or photo.
Shen said that this training approach is particularly effective for flood prediction, as weather data like rainfall can be incredibly unpredictable on an hourly basis. The model can quantify uncertainty in predictions, reducing doubts by assimilating recent gauge observations into the data set. The approach allows these recent observations to be assimilated into the model without the need for retraining - a process known as inpainting.
"Your basic training inputs include the hourly rainfall, your projected streamflow, all this data that is collected from previous patterns," Shen said. "We can inject new, almost real-time information into our model, though, asking the model, 'If the daily streamflow yesterday was a certain amount, and the hourly rainfall today is a certain amount, can you predict what the hourly peak for water level might be today?'"