A new artificial intelligence framework that combines physical hydraulic laws with deep probabilistic learning is set to improve water-level forecasting in large canal systems, potentially reducing waste and enhancing operational efficiency. The approach, detailed in a study published in Environmental Science and Ecotechnology, addresses a critical challenge: unpredictable lateral offtake discharges that often derail water-level forecasts and lead to poor operational decisions.
Inter-basin water transfers are essential for balancing resources across regions, but their hydrodynamic behavior is shaped by both natural processes and human decisions, such as gate operations. Lateral offtake discharges—flows diverted from the main canal through side offtakes—frequently deviate from planned targets due to real-time hydraulic states and unplanned gate operations. These deviations often produce multi-peaked, highly uncertain flow distributions. Traditional physics-based methods for quantifying this uncertainty are computationally expensive, while purely data-driven models struggle to capture such complex, multimodal patterns, especially when training data are scarce.
To overcome these limitations, a multi-institutional research team from Wuhan University in China, the Construction and Administration Bureau of the Middle-Route of the South-to-North Water Diversion Project, the University of Exeter in the United Kingdom, and the KWR Water Research Institute in the Netherlands developed the physics-guided mixture density network (PgMDN). Unlike standard mixture density networks (MDNs) that rely solely on data fitting, the PgMDN incorporates two physical constraints directly into its loss function. First, it promotes local mass-balance consistency by aligning predicted mean discharges with inflow-minus-outflow values derived from a simplified hydraulic model. Second, it imposes a consistency rule: when predicted mean flows change rapidly—indicating operational shifts or abrupt gate movements—the model's uncertainty is expected to increase accordingly. This prevents overconfident predictions during unstable conditions.
Tested on real-world data from two reaches of China's South-to-North Water Diversion Project, the PgMDN reduced mean absolute error (MAE) by more than 25% and root mean square error (RMSE) by over 25% compared to standard MDNs. Reliability improved from 0.45 to 0.82 at the 90% confidence level. Importantly, the model maintained stable performance when training data were intentionally reduced, demonstrating strong generalization under data-scarce conditions. Using SHapley Additive exPlanations (SHAP) analysis, the team identified water level fluctuations and boundary inflows as the dominant drivers of predictive uncertainty, adding interpretability to the model's predictions.
"We wanted a model that doesn't just give a single number but actually tells operators how much to trust that number," the authors said. "By embedding two simple physical rules into the learning process—promoting local mass-balance consistency and linking sudden flow changes to wider uncertainty—we got much more reliable forecasts, even when data were limited. It's like teaching the AI some basic hydraulics so it doesn't make physically impossible guesses. For water managers, this means they can plan more confidently, knowing when the model is sure and when it's not."
This approach enables more adaptive water allocation in real time. Operators can use the probabilistic forecasts to adjust safety margins, optimize gate operations, and respond more effectively to unexpected events such as unplanned withdrawals. The framework is scalable and can be integrated into existing hydrodynamic models to estimate plausible water-level ranges under different scenarios. By bridging physical understanding with data-driven learning, the PgMDN offers a practical pathway toward resilient management of large-scale water systems, especially in regions facing increasing hydrological variability. It also opens the door for similar hybrid models in other environmental infrastructure applications, from flood control to water distribution networks.
The study, titled "Physics-guided mixture density network for probabilistic forecasting of lateral offtake discharges in large-scale water diversion canals," is available at https://doi.org/10.1016/j.ese.2026.100703.

