AI Flood Forecasting: Why High Accuracy Alone Cannot Guarantee Safer Alerts
A research team in eastern Sri Lanka developed a prototype that combines connected sensors with artificial intelligence to forecast the day’s flood risk, emphasising catching dangerous conditions that might otherwise be missed.
For families living beside a river, a useful flood warning needs to arrive before rising water blocks roads, damages homes or cuts off an escape route. A research team in eastern Sri Lanka developed a prototype that combines connected sensors with artificial intelligence to forecast the day's flood risk, emphasising catching dangerous conditions that might otherwise be missed.
The study, "A recall-optimized LSTM–XGBoost ensemble model for river flood forecasting using multivariate time-series data—case study in Sri Lanka," was published in Frontiers in Artificial Intelligence. Its historical tests found that the combined system identified every flood-labelled day in the test set, with extra false alarms accompanying that result. Those flood days belonged to a single continuous episode, making the findings an early demonstration with considerable uncertainty about performance during future floods.
Two AI models look at the river in different ways
The research focused on the downstream Gal Oya River basin, where flooding threatens nearby communities, and existing monitoring can depend on manual measurements or fixed water-level alerts. The proposed system assembles five measurements: upstream catchment rainfall, downstream rainfall, river water level, reservoir water level and reservoir discharge.
Historical records from Sri Lanka's irrigation and meteorological departments covered March 2020 to April 2025, providing 1,873 daily entries before preprocessing. The team cleaned and scaled the data, kept the earlier 80% for training and reserved the later 20% for testing, preserving the order of observations so future records were excluded from model training. A Long Short-Term Memory (LSTM) learns patterns in the measurements and estimates the next day's river level. XGBoost uses the same types of information to predict flood risk directly.
Three-metre river level served as the study's local dividing line between flood and non-flood labels, based on official historical flood records and a review by a civil engineer. The reference was specific to this location, with no formal surveyed gauge datum available in the dataset. Only nine days across two continuous episodes received flood labels in the complete historical dataset, so synthetic examples were added to XGBoost's training data to help it learn from the rare positive cases.
Catching more danger comes with extra false alarms
The team tested different lengths of past observations, initially comparing 7-, 14- and 21-day input windows and examining shorter windows down to one day. All versions forecast one day, and the input window determined how much historical information each model received.
The combined system using one day of input data achieved the most favourable observed balance among the tested configurations, recording 98.73% overall accuracy, 100% recall for flood-labelled observations, 50% precision and a 66.67% F1 score. Recall measures how many flood-labelled observations were detected, precision shows how many positive predictions were correct, and F1 balances those measures.
Its test set contained 316 observations, including four flood-labelled days from November 25 to 28, 2024. All four were correctly identified, and four non-flood days were incorrectly flagged, meaning half the positive predictions were false alarms. Shorter windows from one to seven days all detected the four flood-labelled observations, with precision ranging from roughly 33% to 50%.
A simpler comparison rule predicted next-day danger whenever the current river level reached three metres. That approach achieved 99.37% accuracy and 75% for precision, recall and F1, producing one false alarm and missing the first flood-labelled day because the previous day's river level was 2.9 metres. The combined AI system detected that additional day at the cost of three extra false alarms.
One standalone LSTM configuration exposed the weakness of relying on overall accuracy: it scored 98.72% despite missing every flood-labelled observation. Most days were non-flood days, allowing a model to look highly accurate without detecting the conditions that mattered most for warnings.
Solar-powered sensors connect the river to a dashboard
The field prototype used a rain gauge and a waterproof ultrasonic sensor, which measures river level through reflected sound pulses. A solar panel and rechargeable battery powered the controller, with observations sent through Wi-Fi or a cellular connection to a cloud platform, supporting operation away from the electricity grid.
Public weather and irrigation sources supplied upstream information, including rainfall, reservoir level and discharge. A browser dashboard displayed current conditions, the predicted next-day river level and the flood-risk output, allowing users to view measurements and forecasts together.
River level was XGBoost's most influential predictor, followed by reservoir level, downstream rainfall and catchment rainfall. Reservoir discharge contributed little to this particular model, potentially because related information was already captured by river level; this finding does not establish that discharge is unimportant elsewhere.
LSTM's average absolute water-level error was about 23 centimetres, with a root mean square error of about 33 centimetres. Its results captured roughly 80% of the variation in observed river levels within the evaluated data.
A working prototype needs evidence from more floods
During field deployment, all 10 reported observations were correctly classified as non-flood conditions, covering differing rainfall and reservoir-release conditions. No flood occurred, so these observations demonstrated that sensing, transmission, forecasting and dashboard display could operate together without establishing flood-detection performance during an actual emergency.
The historical recall estimate carries substantial uncertainty: its reported 95% confidence interval ranged from 39.8% to 100%. Four consecutive flood-labelled days represent one episode, providing limited evidence about performance across separate floods.
Comparing input windows and identifying the preferred configuration used the same test period, leaving no untouched final test period for that choice. Synthetic training examples were used only for XGBoost, complicating direct comparisons with LSTM. The small prototype sensor network creates further questions about calibration, maintenance and equipment failures.
The researchers propose longer deployments, larger datasets containing more independent floods and testing across other rivers. Future work could include repeated testing across successive time periods, better sensor-failure detection, processing on local devices, more advanced forecasting models and clearer explanations of predictions, supported by terrain, soil and satellite information.
- FIRST PUBLISHED IN:
- Devdiscourse
ALSO READ
-
AI, Ageing and Job Shortages: OECD Warns of a Major Workforce Crisis Across Rich Economies
-
Can Artificial Intelligence Help Sweden Predict Disasters and Protect Its Critical Services?
-
Beyond the Destruction: World Bank Calls for a Global Overhaul of Disaster Damage Tracking
-
UN Expert Urges Tech Rules to Protect Victims Seeking Justice After War and Repression
-
Beyond Music Score: How AI Skills and Job Fears Relate to Student Career Confidence
Google News