Search for a command to run...
Leakage in water distribution systems worldwide has an estimated annual cost of $7 billion and threatens water security amid growing climate pressures. Traditional leakage management approaches are reactive in their approach, wasting time and resources. This study introduces FLOWAID ( f low and l eakage f o recasting using w eather- a daptive neural network for i ntelligent d ecision-making), a deep learning framework that unifies water flow forecasting and proactive leak detection to enable continuous, time-agnostic monitoring of distribution networks. FLOWAID advances existing approaches through three key innovations: (1) a hybrid architecture combining convolutional residual networks for spatial weather-flow dependency extraction, bidirectional long short-term memory cells for temporal modelling, and multi-task multi-layer perceptrons for simultaneous predictions; (2) a class-specific attention mechanism that amplifies critical leakage-related features in underrepresented leakage class, improving the model’s sensitivity and leak detection performance; and (3) adaptive novel loss functions (adaptive Huber loss and weighted binary cross-entropy) paired with Shapley additive explanations to ensure robustness and transparency. The model processes five days of historical water flow and weather data from over 2000 district metered areas to predict water demand (i.e., flow rate) and leakage probability for the subsequent 12 hours. Six weather variables of ten analysed, are identified as key predictors - temperature, specific and relative humidity, solar radiation, evaporation, and precipitation - which collectively account for over 90% of environmental influence on flow behavior. FLOWAID achieves a good predictive performance with average index of agreement ~0.7 for flow forecasting and true positive rate of 88.2% and true negative rate of 99.2% in leak detection across imbalanced datasets. The model maintains consistent accuracy across diverse weather conditions, seasonal variations, and times of day, enabling leak detection at any hour rather than only during nighttime periods. By integrating interpretable machine learning with weather-adaptive forecasting, FLOWAID provides water utilities with actionable tools to reduce annual water losses, prioritize repairs in high-risk zones, and adapt infrastructure management strategies to climate-driven weather extremes. • FLOWAID is a unified deep learning model that simultaneously forecasts 12-hour water demand and predicts future leakage probability using five days of flow and weather data. • A class-specific attention mechanism improves sensitivity to rare leakage events by emphasizing critical features in underrepresented classes. • A novel adaptive Huber loss and weighted binary cross-entropy functions improve regression and classification performance under imbalanced and zero-padded conditions. • The model achieves high flow forecasting accuracy with index of agreement values averaging ~0.75 for both leakage and non-leakage cases in training and testing. • FLOWAID achieves a true positive rate of 96.7% and a true negative rate of 95.9% in leakage prediction on unseen test data. The framework maintains over 90% accuracy even under extreme class imbalance scenarios. • SHAP-based explainability reveals that previous-day water flow, temperature, and specific humidity are the most influential features driving both flow and leakage predictions.