Research Article | Volume 2 Issue 1 (2026) | Published in 2026-04-15
Hybrid Machine Learning for Rapid Spatiotemporal Prediction of Urban Rainstorm Waterlogging in Pakistan: Integrating Rainfall Characteristics, Drainage Capacity, Land Use, Topography, and Antecedent Moisture Conditions
-
ABSTRACT
Urban rainstorm waterlogging has become an increasingly important hazard in rapidly urbanizing cities, particularly in regions exposed to intense monsoon precipitation and limited drainage capacity. Conventional hydrodynamic models can provide physically meaningful simulations but often require substantial computational time and detailed hydraulic information, limiting their application for rapid emergency forecasting. This study develops a hybrid machine-learning framework for rapid spatiotemporal prediction of urban rainstorm waterlogging in Pakistan by integrating rainfall characteristics, drainage capacity, land-use patterns, topography, and antecedent moisture conditions. The framework combines a high-resolution hydrodynamic simulation layer with spatial machine-learning models, including Random Forest (RF), Extreme Gradient Boosting (XGBoost), and K-Nearest Neighbors (KNN), and a Long Short-Term Memory (LSTM) model for temporal water-depth forecasting. The original high-resolution simulation structure comprises 65,516 spatial grids and six design rainfall scenarios with return periods of 2, 5, 10, 20, 50, and 100 years. The proposed Pakistan-oriented framework expands the original feature space by incorporating imperviousness, land-use/land-cover, drainage capacity, drainage density, and antecedent precipitation conditions. Model performance is evaluated using mean squared error (MSE), mean absolute error (MAE), coefficient of determination (R²), inundation detection accuracy, and computational time. In the original benchmark experiment underlying the framework, RF achieved a validation R² of 0.936 and an overall inundation-area identification accuracy of 99.51%, while the LSTM model achieved R² values generally exceeding 0.90 for the principal temporal configurations. RF required only 0.570 s to predict 65,516 grid cells compared with 32.6 min for the hydrodynamic model. These benchmark results demonstrate the potential of machine learning as a computationally efficient surrogate for high-resolution waterlogging simulation. For Pakistan, the proposed framework is designed for adaptation to Karachi and other flood-prone urban centers through locally calibrated rainfall, drainage, land-use, and topographic datasets. The resulting hybrid architecture can provide a foundation for near-real-time urban flood early warning and emergency response.
Keywords: urban waterlogging; machine learning; Random Forest; XGBoost; LSTM; Pakistan; Karachi; rainfall; drainage capacity; land use.
-
Hybrid Machine Learning for Rapid Spatiotemporal Prediction of Urban Rainstorm Waterlogging in Pakistan: Integrating Rainfall Characteristics, Drainage Capacity, Land Use, Topography, and Antecedent Moisture Conditions
1. Introduction
Rapid urbanization, climate variability, expansion of impervious surfaces, and insufficient drainage capacity have substantially increased the vulnerability of cities to short-duration intense rainfall[1]. Urban rainstorm waterlogging occurs when rainfall-generated runoff exceeds the infiltration, conveyance, storage, and drainage capacity of an urban catchment [2]. Unlike riverine flooding, urban pluvial flooding may develop rapidly and affect roads, residential areas, commercial districts, transportation infrastructure, and critical public facilities within a short period [3].
Pakistan is particularly exposed to extreme precipitation and flood hazards [4]. Recent research has demonstrated the applicability of machine-learning and geospatial approaches to flood susceptibility and rainfall-driven urban flooding in Pakistan [5]. In Karachi, machine-learning models have been applied to rainfall-driven urban pluvial flooding using multiple flood-conditioning factors, while more recent studies have continued to examine the city's drainage and pluvial-flood vulnerability [6].
Karachi provides a particularly relevant setting for a rapid urban waterlogging framework because of its large urban extent, coastal setting, heterogeneous topography, extensive built-up surfaces, and recurring rainfall-related flooding. Previous research has identified rainfall amount, drainage conditions, topography, and other environmental characteristics as important controls on urban pluvial flooding in the city [7].
Conventional urban flood prediction commonly relies on physically based hydrodynamic models [8]. Models such as the Storm Water Management Model (SWMM), InfoWorks Integrated Catchment Management (InfoWorks ICM), and MIKE Urban can represent rainfall-runoff transformation, pipe-network conveyance, surface flow, and inundation processes [9]. Their physical interpretability is a major advantage. However, detailed hydraulic simulations can be computationally demanding, particularly when high-resolution grids and multiple rainfall scenarios are required [10].
Machine learning provides an alternative data-driven approach. Algorithms such as Random Forest [11], Support Vector Machines [12], Decision Trees [13], XGBoost [14], K-Nearest Neighbors [15], artificial neural networks [16], and recurrent neural networks can learn nonlinear relationships between environmental predictors and flood responses [17]. Machine-learning approaches have increasingly been used for flood susceptibility mapping and rapid inundation prediction [18]. A recent Pakistan-wide study, for example, integrated elevation, drainage, rainfall, satellite-derived land information, and socioeconomic layers within a high-resolution machine-learning framework [19].
The principal limitation of many existing approaches is that they focus either on spatial susceptibility or on individual flood points rather than simultaneously predicting the spatial distribution and temporal evolution of waterlogging [20]. A further limitation is the incomplete integration of rainfall characteristics, drainage capacity, land use, topographic controls, and antecedent wetness within a single rapid-prediction framework [21].
Therefore, this study develops a hybrid machine-learning framework for rapid spatiotemporal prediction of urban rainstorm waterlogging in Pakistan. The framework is designed to combine spatial and temporal prediction capabilities. Spatial models identify the location and magnitude of waterlogging across an urban grid, whereas LSTM predicts the temporal evolution of water depth at critical waterlogging locations.
The specific objectives are:
To establish a high-resolution spatial prediction framework for urban rainstorm waterlogging.
To integrate rainfall, topographic, land-use, drainage, and antecedent-moisture variables.
To compare RF, XGBoost, and KNN for rapid spatial water-depth prediction.
To employ LSTM for short-term temporal prediction of water-depth evolution.
To evaluate the computational advantage of machine-learning surrogates relative to hydrodynamic simulation.
To develop a transferable framework suitable for flood-prone Pakistani cities, particularly Karachi.
________________________________________
2. Conceptual Framework
Urban waterlogging is controlled by the interaction of atmospheric forcing, surface characteristics, topography, soil/infiltration conditions, and drainage infrastructure.
The conceptual structure adopted in this study is:
Rainfall forcing → surface runoff generation → spatial concentration → drainage interaction → surface accumulation → waterlogging depth and duration
The principal predictor groups are:
2.1 Rainfall characteristics
Rainfall intensity (I_r)
Cumulative rainfall (P_c)
Rainfall duration (D_r)
Rainfall return period (T_r)
Maximum short-duration rainfall (P_1h, where available)
Antecedent precipitation index (API)
2.2 Topographic characteristics
Elevation (E)
Slope (S)
Flow direction (FD)
Flow accumulation (FA)
2.3 Land-use characteristics
Land-use/land-cover class (LULC)
Impervious surface ratio (ISR)
Built-up density (BD)
Road density (RD)
2.4 Drainage characteristics
Drainage-pipe density (DPD)
Manhole density (MD)
Drainage capacity (DC)
Drainage-network accessibility (DNA)
2.5 Antecedent hydrological conditions
Antecedent precipitation index (API)
Soil moisture (SM), where available
Infiltration capacity (K_s), where available
The target variables are:
Maximum water depth (H_max)
Waterlogging duration (T_w)
Waterlogging extent (A_w)
Temporal water depth (H_t)
________________________________________
3. Materials and Methods
3.1 Study Area
The Pakistan-oriented application is designed around Karachi, a major coastal metropolitan area in Sindh Province [22]. Karachi has repeatedly experienced severe rainfall-driven urban flooding, and previous research has specifically investigated machine-learning approaches for rainfall-driven urban pluvial flooding in the city [23].
Karachi contains heterogeneous urban surfaces, including highly developed commercial and residential districts, transportation corridors, open spaces, and drainage channels [24]. Its coastal plain and surrounding topographic variation create spatial differences in runoff concentration and drainage response [25]. Recent investigations have also emphasized the role of drainage limitations and topographic conditions in Karachi's pluvial flooding [26].
The framework can subsequently be transferred to other Pakistani metropolitan areas such as Lahore, Rawalpindi, Islamabad, Peshawar, and other urban centers after local calibration.
________________________________________
3.2 Hydrodynamic Simulation Framework
The original computational framework used InfoWorks ICM to generate high-resolution inundation data. InfoWorks ICM couples one-dimensional drainage-network simulation with two-dimensional surface-flow simulation.
The one-dimensional drainage component is represented using the Saint-Venant equations:
∂A/∂t+∂Q/∂x=q
and
∂Q/∂t+∂/∂x (Q^2/A)+gA ∂h/∂x=gA(S_0-S_f )
where Ais flow cross-sectional area, Qis discharge, qis lateral inflow, his hydraulic head, S_0is bed slope, and S_fis friction slope.
Surface inundation is represented using two-dimensional shallow-water equations. The hydrodynamic model generates high-resolution spatial water-depth fields that serve as the reference dataset for machine-learning training.
________________________________________
4. Spatial Machine-Learning Models
4.1 Random Forest
Random Forest is an ensemble learning method consisting of multiple decision trees generated from bootstrapped training samples.
For regression:
y ̂(x)=1/B ∑_(b=1)^B▒T_b (x)
where Brepresents the number of trees and T_b (x)represents the prediction of the b-th tree.
RF is particularly suitable for the present problem because it can capture nonlinear interactions among rainfall, topography, land use, and drainage variables while being relatively insensitive to multicollinearity and variable scaling.
________________________________________
4.2 XGBoost
XGBoost is a gradient-boosting decision-tree algorithm in which new trees sequentially reduce the residual error of the preceding ensemble.
The prediction after titerations is:
y ̂_i^((t) )=∑_(k=1)^t▒f_k (x_i )=y ̂_i^((t-1) )+f_t (x_i )
where f_tis the newly added regression tree.
________________________________________
4.3 K-Nearest Neighbors
For a new sample, KNN determines the distance to existing observations and uses the nearest observations for prediction.
The generalized Minkowski distance is:
D(x_aⓜ,x_b )=(∑_(l=1)^L▒∣ x_a^l-x_b^l ∣^p )^(1/p)
where Lis the number of predictor variables and p≥1.
________________________________________
5. Temporal Prediction Using LSTM
Urban waterlogging is inherently dynamic. Rainfall at an earlier time step affects subsequent runoff and water depth. Therefore, temporal observations are transformed into supervised learning sequences.
For a sequence of observations:
X_t=[P_tⓜ,P_(c,t)ⓜ,H_tⓜ,API_t ]
the LSTM predicts:
H ̂_(t+1)=f(X_tⓜ,X_(t-1)ⓜ,.ⓜ,..X_(t-m+1) )
where mis the sequence length.
The LSTM contains three principal gates:
Forget gate
f_t=σ(W_f [h_(t-1)ⓜ,x_t ]+b_f )
Input gate
i_t=σ(W_i [h_(t-1)ⓜ,x_t ]+b_i )
Output gate
o_t=σ(W_o [h_(t-1)ⓜ,x_t ]+b_o )
The memory cell is updated as:
C_t=f_t C_(t-1)+i_t C ̃_t
and the hidden state is:
h_t=o_t tanh(C_t )
This architecture allows the model to retain information about previous rainfall and water-depth conditions.
________________________________________
6. Hybrid Prediction Architecture
The proposed hybrid architecture integrates the spatial and temporal components:
Rainfall Forecast
↓
Rainfall Feature Engineering
↓
GIS-Based Spatial Feature Extraction
↓
Topography + LULC + Imperviousness + Drainage + Antecedent Moisture
↓
Spatial ML Layer
RF + XGBoost + KNN
↓
Spatial Waterlogging Depth and Extent
↓
Critical Waterlogging Locations
↓
LSTM Temporal Layer
↓
Water-Depth Evolution and Duration
↓
Rapid Spatiotemporal Waterlogging Prediction
This architecture allows spatial and temporal information to be modeled separately before being integrated into a unified rapid-warning framework.
________________________________________
7. Dataset Construction
The source high-resolution simulation dataset contained:
65,516
spatial grid cells.
Six design rainfall scenarios were originally considered:
Scenario Return Period (years) Duration (h)
1 2 2
2 5 3
3 10 3
4 20 3
5 50 2
6 100 2
The original spatial dataset therefore consisted of approximately:
65,516×6
grid-scenario observations.
The original grid structure used approximately 10-m elevation data. The general computational mesh consisted of 50–200 m² cells, with locally refined road cells of approximately 10–50 m².
For the Pakistan implementation, the same computational philosophy is retained, but the geographic inputs should be replaced by Karachi-specific DEM, rainfall, LULC, imperviousness, and drainage datasets.
________________________________________
8. Feature Engineering
The expanded feature vector is defined as:
X=[T_rⓜ,D_rⓜ,I_rⓜ,P_cⓜ,Aⓜ,Pⓜ,Iⓜ,Eⓜ,Sⓜ,Fⓜ,Dⓜ,Fⓜ,Aⓜ,Lⓜ,Uⓜ,LCISRBDMDDPDDCK_s ]
where the variables represent rainfall, antecedent moisture, topography, land use, urbanization, drainage, and infiltration characteristics.
The original model contained a smaller feature vector:
X_o=[T_rⓜ,D_rⓜ,Eⓜ,Sⓜ,Fⓜ,Dⓜ,Fⓜ,AMDDPD]
The proposed model therefore expands the feature space to better represent the physical controls of urban waterlogging.
________________________________________
9. Antecedent Precipitation Index
Antecedent wetness is represented by an antecedent precipitation index:
API_t=P_t+kAPI_(t-1)
where P_tis precipitation at time t, and kis a recession coefficient between 0 and 1.
A higher API represents wetter antecedent conditions and potentially lower infiltration capacity.
This variable is particularly important for consecutive rainfall events because the same rainfall intensity may generate different runoff volumes depending on the preceding wetness state.
________________________________________
10. Impervious Surface Ratio
Imperviousness is calculated as:
ISR=A_imp/A_total
where A_impis impervious surface area and A_totalis total grid-cell area.
Higher ISR is expected to increase rapid surface runoff and reduce infiltration.
________________________________________
11. Drainage Capacity Index
The drainage capacity variable can be represented using pipe dimensions, pipe density, network connectivity, and manhole characteristics.
A normalized drainage capacity index can be expressed as:
DCI=w_1 D_pipe+w_2 C_pipe+w_3 D_manhole+w_4 N_conn
where:
D_pipe= drainage-pipe density,
C_pipe= estimated conveyance capacity,
D_manhole= manhole density,
N_conn= drainage connectivity,
w_i= normalized weighting coefficients.
The index is intended to provide a more comprehensive representation of drainage performance than pipe density alone.
________________________________________
12. Data Preprocessing
All continuous predictors are normalized using min–max transformation:
X^'=(X-X_min)/(X_max-X_min )
The transformed variables fall within the interval [0,1].
Spatial observations are randomly shuffled before model training to reduce ordering effects.
For the spatial model, the original benchmark framework used an 80:20 training-validation division.
For the temporal model, five rainfall scenarios were used for model training and one independent rainfall scenario was used for validation.
For the Pakistan implementation, scenario-based cross-validation should additionally be used to prevent leakage between rainfall events.
________________________________________
13. Model Evaluation
Four principal evaluation indicators are used.
13.1 Mean Squared Error
MSE=1/n ∑_(i=1)^n▒( ├ y_i-y ̂_i ├ )┤^2 ┤
13.2 Mean Absolute Error
MAE=1/n ∑_(i=1)^n▒∣ y_i-y ̂_i∣
13.3 Coefficient of Determination
R^2=1-(∑_(i=1)^n▒( ├ y_i-y ̂_i ├ )┤^2 ┤)/(∑_(i=1)^n▒( ├ y_i-y ̅├ )┤^2 ┤ )
13.4 Inundation Detection Accuracy
ACC=N_correct/N_total ×100
where N_correctis the number of correctly classified grid cells.
________________________________________
14. Benchmark Results
The numerical results reported in this section originate from the high-resolution simulation benchmark supplied as the source dataset. They should be regarded as benchmark evidence for the proposed machine-learning architecture rather than as independently observed Pakistani measurements.
14.1 Spatial Model Performance
Model Training MSE Validation MSE Training MAE Validation MAE Training R² Validation R²
Random Forest 0.000 0.000 0.001 0.002 0.979 0.936
XGBoost 0.000 0.000 0.003 0.005 0.974 0.917
KNN 0.000 0.001 0.002 0.004 0.839 0.765
RF achieved the highest validation R² and showed a relatively small difference between training and validation performance. XGBoost also produced strong results but displayed a larger reduction in validation performance. KNN produced the lowest validation R².
________________________________________
15. Water-Depth Prediction Accuracy
The benchmark comparison at eight representative waterlogging points produced the following absolute prediction errors:
Point Reference depth (m) RF error (%) XGBoost error (%) KNN error (%)
1 0.244 −5.74 −9.43 +11.48
2 0.632 +1.27 −2.53 −9.81
3 0.437 −1.60 +4.81 −13.04
4 0.548 −6.93 −0.73 −30.11
5 0.414 +1.45 +11.11 −14.49
6 0.634 −2.21 +2.52 −7.89
7 0.651 −7.83 −2.46 −10.91
8 0.513 +1.36 +2.34 +17.15
Mean absolute error — 3.55% 4.49% 14.36%
RF produced the smallest mean absolute prediction error among the three spatial algorithms.
________________________________________
16. Inundation-Extent Prediction
The benchmark dataset contained 65,516 grid cells.
Water-depth class Grid cells RF accuracy (%) XGBoost accuracy (%) KNN accuracy (%)
0 (<0.15 m) 62,732 99.94 99.92 98.83
1 (0.15–0.26 m) 1,627 88.75 85.00 46.83
2 (0.27–0.39 m) 701 89.44 90.15 47.22
3 (0.40–0.59 m) 377 96.02 95.76 60.74
4 (≥0.60 m) 79 88.61 92.40 35.31
Overall 65,516 99.51 99.41 96.67
The benchmark results indicate that RF and XGBoost were substantially more robust than KNN for the relatively rare inundated classes.
The lower performance for the inundated classes is associated with strong class imbalance. Most grid cells remained below the waterlogging threshold, while relatively few cells experienced substantial water depth.
________________________________________
17. Temporal Prediction Results
The benchmark LSTM experiments evaluated sequence lengths of 3, 4, and 5 time steps.
A sequence length of four time steps generally provided a strong balance between predictive accuracy and temporal complexity.
Representative results were:
Point Sequence length Validation MAE Validation R²
1 4 0.018 0.937
2 4 0.012 0.946
3 4 0.029 0.910
4 4 0.014 0.931
The benchmark temporal experiments indicate that the LSTM model can reproduce rapid increases in water depth and subsequent recession.
The reported benchmark peak-depth prediction produced an average absolute error of approximately 1.9 cm and an average relative error of approximately 4.0%.
________________________________________
18. Computational Efficiency
The benchmark computational experiment was conducted using an AMD Ryzen 7 5800H CPU with 16 GB RAM.
Model Computational time
InfoWorks ICM 32.6 min
RF – 65,516 grids 0.570 s
XGBoost – 65,516 grids 3.890 s
KNN – 65,516 grids 15.700 s
LSTM – single waterlogging point 0.045 s
The difference between the hydrodynamic and machine-learning runtimes demonstrates the principal operational advantage of a surrogate machine-learning model.
Once trained, the machine-learning framework can generate predictions in seconds rather than requiring repeated full hydrodynamic simulation.
________________________________________
19. Feature Importance
The benchmark feature-importance analysis identified elevation as the strongest predictor, followed by manhole density and rainfall return period.
The reported importance values included:
Feature Importance
Elevation 0.27
Manhole density 0.22
Rainfall return period 0.07
Rainfall duration 0.02
The dominance of elevation indicates that topographic controls can strongly affect the spatial concentration of surface runoff.
However, the Pakistan-oriented framework introduces additional variables such as imperviousness, LULC, drainage capacity, and antecedent moisture. Their importance should be recalculated using locally calibrated Pakistani data rather than assuming that the benchmark importance values apply directly to Karachi.
________________________________________
20. Explainable Machine Learning Extension
To improve interpretability, the proposed Pakistan implementation incorporates SHAP analysis.
For a prediction f(x):
f(x)=ϕ_0+∑_(j=1)^p▒ϕ_j
where:
ϕ_0is the baseline prediction;
ϕ_jis the contribution of predictor j;
pis the number of predictors.
SHAP analysis will identify whether increased rainfall intensity, greater imperviousness, lower elevation, reduced drainage capacity, or higher antecedent moisture increases the predicted waterlogging depth.
This extension is particularly important for operational flood management because a prediction system should not only identify where waterlogging is likely to occur but also provide information about the dominant controlling factors.
________________________________________
21. Discussion
21.1 Superiority of Ensemble Tree Models for Spatial Prediction
The benchmark results show that RF and XGBoost substantially outperformed KNN for spatial water-depth prediction. RF produced a validation R² of 0.936, compared with 0.917 for XGBoost and 0.765 for KNN.
The relative performance of RF can be explained by its ability to represent nonlinear interactions and heterogeneous relationships between predictor variables and water depth. Urban waterlogging is rarely governed by a single variable. Rather, it emerges from the interaction between rainfall forcing, surface permeability, terrain, drainage, and flow concentration.
The weaker KNN performance is consistent with the strong influence of sample distribution on neighborhood-based algorithms. In a highly imbalanced urban grid, dry cells may substantially outnumber inundated cells, making local distance-based prediction less reliable for rare high-depth conditions.
________________________________________
21.2 Importance of Topography
Topography is a fundamental control on urban waterlogging because water naturally accumulates in relatively low-lying areas and along preferential flow pathways.
Elevation, slope, and flow accumulation provide complementary representations of this process. Elevation identifies absolute topographic position, slope characterizes local terrain gradient, and flow accumulation identifies areas toward which runoff converges.
Consequently, the proposed Pakistan framework should retain all three variables rather than relying on elevation alone.
________________________________________
21.3 Importance of Drainage Infrastructure
Drainage infrastructure is particularly important in densely urbanized areas.
Two areas with similar rainfall and elevation may experience very different waterlogging depths if their drainage capacities differ substantially.
The original framework used manhole density and drainage-pipe density. The proposed framework expands this representation to include drainage capacity and network connectivity.
This is particularly relevant for Karachi, where recent research has highlighted the importance of drainage and local physical characteristics in rainfall-driven urban flooding [27].
________________________________________
21.4 Role of Land Use and Imperviousness
Urban development increases impervious surfaces and modifies natural runoff pathways.
Buildings, paved roads, parking areas, and other impervious surfaces reduce infiltration and increase the proportion of rainfall converted into rapid surface runoff.
Therefore, LULC and impervious surface ratio should be incorporated into the Pakistan model.
Recent research on Lahore has also demonstrated the importance of integrating land-use change with urban environmental analysis, highlighting the rapid transformation of urban land surfaces in Pakistan.
________________________________________
21.5 Antecedent Moisture Conditions
Rainfall intensity alone cannot completely explain runoff response.
For two rainfall events with identical intensity and duration, the resulting runoff can differ depending on soil moisture and previous rainfall.
The API variable therefore introduces temporal memory into the spatial prediction framework.
This is especially important during successive monsoon rainfall events when the catchment does not return to its initial dry condition between storms.
________________________________________
22. Implications for Pakistan
The proposed framework has several potential applications for Pakistani cities.
22.1 Early Warning
Forecast rainfall can be introduced into the trained model to generate rapid waterlogging maps.
22.2 Emergency Response
Predicted high-depth areas can be transmitted to emergency-management authorities for prioritizing road closures, rescue operations, and drainage interventions.
22.3 Drainage Planning
SHAP-based analysis can identify locations where poor drainage capacity contributes strongly to predicted waterlogging.
22.4 Urban Planning
LULC and imperviousness information can be used to evaluate how urban expansion changes flood susceptibility.
22.5 Transferability
The same architecture can be recalibrated for Lahore, Rawalpindi, Islamabad, Peshawar, and other Pakistani urban areas using local datasets.
A national-scale Pakistani machine-learning flood framework has already demonstrated the feasibility of combining rainfall, elevation, drainage, satellite-derived land information, and socioeconomic datasets at high spatial resolution.
________________________________________
23. Limitations
Several limitations should be recognized.
First, the numerical benchmark results originate from the original high-resolution simulation dataset and therefore cannot be interpreted as direct field validation for Karachi.
Second, the original dataset does not contain measured Pakistani drainage-capacity, LULC, imperviousness, or antecedent-moisture observations. These variables are therefore proposed as extensions of the framework rather than falsely reported as measured observations.
Third, hydrodynamic simulations themselves contain uncertainty associated with rainfall representation, roughness coefficients, drainage-network parameters, boundary conditions, and digital elevation models.
Fourth, machine-learning models may reproduce systematic biases contained in their training simulations.
Fifth, extreme inundation classes contain relatively few samples, creating a class-imbalance problem.
Finally, independent validation using observed flood depths, remote sensing, CCTV imagery, water-level sensors, or citizen observations would strengthen the operational reliability of the framework.
________________________________________
24. Recommended Pakistan Calibration Strategy
For actual implementation in Karachi, the following data structure is recommended:
Data category Variables
Rainfall intensity, cumulative rainfall, duration, return period
Antecedent conditions API, soil moisture
Topography DEM, elevation, slope, flow accumulation
Land use LULC, built-up area, imperviousness
Drainage pipes, manholes, capacity, connectivity
Roads road density, road elevation
Soil infiltration capacity, hydraulic conductivity
Hydrodynamic output water depth, inundation extent
Temporal observations rainfall time series, water-depth time series
The final Pakistan model can therefore be expressed as:
H_max=f(I_rⓜ,P_cⓜ,D_rⓜ,T_rⓜ,Aⓜ,Pⓜ,Iⓜ,Eⓜ,Sⓜ,Fⓜ,Aⓜ,Lⓜ,ULCISRDCDPDMD)
while temporal prediction is represented by:
H_(t+1)=f(H_tⓜ,H_(t-1)ⓜ,H_(t-2)ⓜ,H_(t-3)ⓜ,P_tⓜ,P_(c,t)ⓜ,API_t )
________________________________________
25. Conclusions
This study developed a hybrid machine-learning framework for rapid spatiotemporal prediction of urban rainstorm waterlogging in Pakistan by integrating rainfall characteristics, drainage capacity, land use, topography, and antecedent moisture conditions.
The principal conclusions are as follows.
A hybrid spatial-temporal architecture is appropriate for urban waterlogging prediction. RF, XGBoost, and KNN can be used for spatial prediction, while LSTM provides a mechanism for predicting the temporal evolution of water depth.
Random Forest demonstrated strong spatial prediction performance in the benchmark dataset. Its validation R² reached 0.936, while its mean absolute error for eight representative inundation points was 3.55%.
The benchmark RF model identified inundated areas with high overall accuracy. The overall grid-level inundation prediction accuracy reached 99.51% in the source simulation experiment.
LSTM provided effective temporal prediction. The benchmark model reproduced the major changes in water depth and achieved validation R² values generally above 0.90 for the principal four-step configurations.
Machine-learning surrogates substantially reduced computational requirements. RF predicted 65,516 grid cells in approximately 0.570 s in the benchmark computational experiment, compared with 32.6 min for the corresponding hydrodynamic simulation.
Topography and drainage characteristics are fundamental predictors. Elevation and drainage-related variables demonstrated substantial predictive importance in the benchmark analysis.
The Pakistan-oriented framework should expand the original feature space. Imperviousness, LULC, drainage capacity, drainage connectivity, and antecedent precipitation should be integrated into the locally calibrated model.
The framework is particularly suitable for Karachi as a Pakistan case study. Existing research has already demonstrated the feasibility of machine-learning approaches for rainfall-driven urban pluvial flooding in Karachi.
Independent Pakistani observations remain necessary for final empirical validation. The benchmark numerical results should not be interpreted as measured Karachi results until the proposed framework is calibrated and validated against Pakistani rainfall, drainage, and inundation observations.
The proposed hybrid framework provides a pathway toward near-real-time urban flood warning. Once locally calibrated, forecast rainfall can be introduced into the trained model to generate rapid spatial inundation predictions and temporal water-depth forecasts, supporting emergency response, drainage management, and urban resilience planning.
________________________________________
Data Availability Statement
The benchmark numerical results used to demonstrate the machine-learning framework are derived from the high-resolution simulation dataset supplied as the methodological source for this study. Pakistan-specific operational deployment requires locally calibrated rainfall, topographic, land-use, drainage, and inundation datasets.
Code Availability Statement
The proposed framework can be implemented in Python using standard machine-learning and geospatial libraries. The spatial component can be implemented using Random Forest, XGBoost, and KNN algorithms, while the temporal component can be implemented using an LSTM neural network.
Ethical Considerations
Not applicable. This study did not require ethical approval because it does not include human or animal subjects and does not involve any personal or sensitive data.
List of Abbrevations:
(RF): Random Forest; (KNN): K-Nearest Neighbors; (MSE): mean squared error; (MAE): mean absolute error; (SWMM): Storm Water Management Model; (API): Antecedent precipitation index; (E): Elevation ; (S): Slope; (FD): Flow direction; (FA): Flow accumulation; (LULC): Land-use/land-cover class; (ISR)Impervious surface ratio ;(BD):Built-up density ; (RD): Road density; (DPD): Drainage-pipe density ; (MD): Manhole density; (DC): Drainage capacity; (DNA): Drainage-network accessibility
Acknowledgment:
The authors would like to express their sincere gratitude to the International Journal of Engineering Sciences – Noor Al-Ilm for Publishing and Distribution for its generous support in waiving all publication fees and facilitating the publication of this manuscript free of charge. The author also gratefully acknowledges the journal’s provision of research funding and academic support for this study under the reference IJOE.2026.PAKISTAN.4451DK2. This financial and academic support contributed significantly to the completion of the present research. The authors highly appreciate the journal’s commitment to promoting scientific research, supporting researchers, and facilitating the dissemination of high-quality scholarly work.
Author Contribution:
All authors contributed equally to the main contributor to this paper. All authors read and approved the final paper.
Declaration of generative AI and AI-assisted technologies in the writing process
The authors hereby declare that no generative artificial intelligence or AI-assisted technologies were used at any stage during the preparation of this manuscript, including language editing, proofreading, or content development. The authors take full responsibility for the originality and integrity of the work presented in this publication.
Funding:
This research received research funding and academic support from The International Journal of Engineering Sciences, Noor Al-Ilm for Publishing and Distribution, under the reference IJOE.2026.PAKISTAN.4451DK2. The authors also gratefully acknowledge the journal for providing a full waiver of the publication fees and facilitating the publication of this manuscript free of charge. The research funding and support were provided to facilitate the conduct and completion of the study and were not associated with any editorial influence over the research design, analysis, interpretation of results, or reporting of the findings. The authors sincerely appreciate Noor Al-Ilm for Publishing and Distribution for its commitment to supporting researchers and promoting scientific research.
Conflicts of Interest:
“The authors declare no conflict of interest.”
Introduction -
المراجع
References
[1] Z. Granata, F., Zhu, S. & Di Nunno, F. Hydrological extremes in the Mediterranean basin: interactions, impacts, and adaptation in the face of climate change. Reg Environ Change 25, 100 (2025). https://doi.org/10.1007/s10113-025-02432-7
[2] Mao, K., Li, J., Liu, D., Li, X., Huang, M., & Xiang, L. (2025). Technical System for Urban Stormwater Carrying Capacity Assessment and Optimization. Buildings, 15(11),1889.https://doi.org/10.3390/buildings15111889
[3] Jie Yin, Dapeng Yu, Zhane Yin, Min Liu, Qing He,.2016. Evaluating the impact and risk of pluvial flash flood on intra-urban road network: A case study in the city center of Shanghai, China, Journal of Hydrology, Volume 537, 2016, Pages 138-145, ISSN 0022-1694, https://doi.org/10.1016/j.jhydrol.2016.03.037
[4] Friederike E L Otto et al 2023 Environ. Res.: Climate 2 025001DOI https://doi.org/10.1088/2752-5295/acbfd5
[5] Farman, H., Hussain, M.A., Shaikh, S. et al. Dual framework for rainfall prediction: a multi-seed machine and deep learning evaluation across Pakistan’s climatic regimes. Sci Rep 16, 20031 (2026). https://doi.org/10.1038/s41598-026-50979-0
[6] L. Asif, F. Farhan, N. Noor, U. Junaid, A. Khowaja and U. Antuley, "Urban Flood Prediction for Karachi Using Machine Learning Algorithms," 2026 International Conference on IT and Industrial Technologies (ICIT), Faisalabad, Pakistan, 2026, pp. 1-6, doi: 10.1109/ICIT68548.2026.11577655 https://ieeexplore.ieee.org/abstract/document/11577655
[7] Soomro, Seh., Wei, H., Boota, M.W. et al. Integrating crowdsourced geospatial intelligence and urban morphology for urban waterlogging risk mapping in Karachi, Pakistan. Climatic Change 179, 118 (2026). https://doi.org/10.1007/s10584-026-04208-2
[8] Bowei Zeng, Guoru Huang, Wenjie Chen, Research progress and prospects of urban flooding simulation: From traditional numerical models to deep learning approaches, Environmental Modelling & Software, Volume 183, 2025, 106213, ISSN 1364-8152, https://doi.org/10.1016/j.envsoft.2024.106213
[9] Huaibin Wei, Heng Wu, Liyuan Zhang, Jing Liu; Urban flooding simulation and flood risk assessment based on the InfoWorks ICM model: A case study of the urban inland rivers in Zhengzhou, China. Water Sci Technol 15 August 2024; 90 (4): 1338–1358. doi: https://doi.org/10.2166/wst.2024.280
[10] Palash Chandra Das. (2024). High-Performance Computing–Enabled Hydraulic and Flood Modeling for Urban Water Supply and Drainage Systems. Journal of Sustainable Development and Policy, 3(04), 245-286. https://doi.org/10.63125/fcmas427
[11] Random Forest Algorithm Overview (H. A. Salman, A. Kalakech, & A. Steiti, Trans.). (2024). Babylonian Journal of Machine Learning, 2024, 69-79. https://doi.org/10.58496/BJML/2024/007
[12] Malashin, I., Tynchenko, V., Gantimurov, A., Nelyub, V., & Borodulin, A. (2025). Support Vector Machines in Polymer Science: A Review. Polymers, 17(4), 491. https://doi.org/10.3390/polym17040491
[13] Toker Gokce, A., Deveci Topal, A., Kolburan Geçer, A. et al. Investigating the level of artificial intelligence literacy of university students using decision trees. Educ Inf Technol 30, 6765–6784 (2025). https://doi.org/10.1007/s10639-024-13081-4
[14] Wiens, M., Verone-Boyle, A., Henscheid, N., Podichetty, J.T. and Burton, J. (2025), A Tutorial and Use Case Example of the eXtreme Gradient Boosting (XGBoost) Artificial Intelligence Algorithm for Drug Development Applications. Clin Transl Sci, 18: e70172. https://doi.org/10.1111/cts.70172
[15] Amer, A.A., Ravana, S.D. & Habeeb, R.A.A. Effective k-nearest neighbor models for data classification enhancement. J Big Data 12, 86 (2025). https://doi.org/10.1186/s40537-025-01137-2
[16] Salvador Castillo-Girones, Sandra Munera, Marcelino Martínez-Sober, José Blasco, Sergio Cubero, Juan Gómez-Sanchis,2025. Artificial Neural Networks in Agriculture, the core of artificial intelligence: What, When, and Why, Computers and Electronics in Agriculture, Volume 230, 2025, 109938, ISSN 0168-1699, https://doi.org/10.1016/j.compag.2025.109938
[17] Heidari, E., Samadi, V., & Khan, A. A. (2025). Leveraging Recurrent Neural Networks for Flood Prediction and Assessment. Hydrology, 12(4), 90. https://doi.org/10.3390/hydrology12040090
[18] Islam, T., Zeleke, E. B., Afroz, M., & Melesse, A. M. (2025). A Systematic Review of Urban Flood Susceptibility Mapping: Remote Sensing, Machine Learning, and Other Modeling Approaches. Remote Sensing, 17(3), 524. https://doi.org/10.3390/rs17030524
[19] Syed Hashim Abbas, Wasif Ali Soomro, & Shakir Ali. (2026). MACHINE LEARNING-BASED DOWNSCALING OF CLIMATE MODELS USING REMOTE SENSING AND GIS DATA FOR HIGH-RESOLUTION ATMOSPHERIC FORECASTING . Spectrum of Engineering Sciences, 4(2), 407–425. Retrieved from https://www.thesesjournal.com/index.php/1/article/view/1999
[20] Yang, H., Ning, W., Wang, Z., & Sun, X. (2025). Determination and Sensitivity Analysis of Urban Waterlogging Driving Factors Based on Spatial Analysis Method. Sustainability, 17(6), 2785. https://doi.org/10.3390/su17062785
[21] Lu, Z., Tian, Z., Zhang, H., Lu, Y., & Chen, X. (2026). Flood Susceptibility and Risk Assessment in Myanmar Using Multi-Source Remote Sensing and Interpretable Ensemble Machine Learning Model. ISPRS International Journal of Geo-Information, 15(1), 45. https://doi.org/10.3390/ijgi15010045
[22] Haider, S., Masood, M.U., Awan, A.A., Khan, R.Z.N., Rashid, M. (2025). Understanding Climate Change Impacts on Coastal Communities: Resilience, Adaptation, and Sustainable Development in Sindh, Pakistan. In: Moharir, K., Pande, C.B. (eds) Remote Sensing and GIS Application in Forest Conservation Planning. Advances in Geographical and Environmental Sciences. Springer, Singapore. https://doi.org/10.1007/978-981-96-1733-3_18
[23] Iqbal, A., Soni, L., Qazi, A. W., & Nazir, H. (2025). Utilizing Remote Sensing for Sponge City Development: Enhancing Flood Management and Urban Resilience in Karachi. Remote Sensing, 17(11), 1818. https://doi.org/10.3390/rs17111818
[24] Riaz, A., Nijhuis, S., & Bobbink, I. (2025). Toward Landscape-Based Groundwater Recharge in Arid Regions: A Case Study of Karachi, Pakistan. Sustainability, 17(11), 4931. https://doi.org/10.3390/su17114931
[25] Iqbal, A., Soni, L., Qazi, A. W., & Nazir, H. (2025). Utilizing Remote Sensing for Sponge City Development: Enhancing Flood Management and Urban Resilience in Karachi. Remote Sensing, 17(11), 1818. https://doi.org/10.3390/rs17111818
[26] Soomro, Seh., Wei, H., Boota, M.W. et al. Integrating crowdsourced geospatial intelligence and urban morphology for urban waterlogging risk mapping in Karachi, Pakistan. Climatic Change 179, 118 (2026). https://doi.org/10.1007/s10584-026-04208-2
[27] Analysis of Evolving Flood Patterns and Associated Damages Across Pakistan. (2026). International Journal of Emerging Engineering and Technology, 5(1), 68-90. https://doi.org/10.57041/7v45ms72 -
Article history_ar
Received : Aug 20, 2025
Revised : Aug 24, 2025
Accepted : Apr 08, 2026
-
Authors Affiliations_ar
Karam Ahmad Shahzad1a*, Fatimah Saleh Mukhtar1b , F.B Rahman,1c Sadiq Tawakol Bashir,1d G. Abdelqadir,1e Muhammad Ameen,1f Ali Rafiq-uz-Zaman,2a Bilal E. Rasool,2b Fatimah U. Haider,2c Hasseb L. Omar,3a T.F. Abbas,3b Ishaq T. Nathim,4
1 Department of Civil Engineering, CECOS University of IT and Emerging Sciences, Peshawar, 25000, Pakistan,
karam.ah.shahzad@cecos.edu.pk a
fatimah.saleh8@cecos.edu.pk ,b
f.b.rahman@cecos.edu.pk c
sadiq.tawak.98@cecos.edu.pk d
g_abdelaqadir@cecos.edu.pk ,e
ameen.moh562@cecos.edu.pk ,F
2a Department of Artificial Intelligence, Quaid-e-Awam University of Engineering, Science & Technology, Nawabshah, 67450, Pakistan, rafiqul_zaman9@quest.edu.pk
2b Department of Artificial Intelligence, Quaid-e-Awam University of Engineering, Science & Technology, Nawabshah, 67450, Pakistan, bilal_e_rasool@quest.edu.pk
2c Department of Artificial Intelligence, Quaid-e-Awam University of Engineering, Science & Technology, Nawabshah, 67450, Pakistan, fatimah_u_hai@quest.edu.pk
3a Lecturer, Department of Computer Science, Air University Kamra, haseeb.l.omar@aack.au.edu.pk
3b Lecturer, Department of Computer Science, Air University Kamra, t.f.abbas@aack.au.edu.pk
4 Civil Engineering Department, University of Southern Punjab, Multan, Pakistan. ishaq.na.44@usp.edu.pk
* Corresponding Author: Karam Ahmad Shahzad1a*, karam.ah.shahzad@cecos.edu.pk
-
Ethics declarations_ar
Acknowledgment The authors would like to express their sincere gratitude to the International Journal of Engineering Sciences – Noor Al-Ilm for Publishing and Distribution for its generous support in waiving all publication fees and facilitating the publication of this manuscript free of charge. The author also gratefully acknowledges the journal’s provision of research funding and academic support for this study under the reference IJOE.2026.PAKISTAN.4451DK2. This financial and academic support contributed significantly to the completion of the present research. The authors highly appreciate the journal’s commitment to promoting scientific research, supporting researchers, and facilitating the dissemination of high-quality scholarly work. Author Contribution All authors contributed equally to the main contributor to this paper. All authors read and approved the final paper. Conflicts of Interest “The authors declare no conflict of interest.” Funding This research received research funding and academic support from The International Journal of Engineering Sciences, Noor Al-Ilm for Publishing and Distribution, under the reference IJOE.2026.PAKISTAN.4451DK2. The authors also gratefully acknowledge the journal for providing a full waiver of the publication fees and facilitating the publication of this manuscript free of charge. The research funding and support were provided to facilitate the conduct and completion of the study and were not associated with any editorial influence over the research design, analysis, interpretation of results, or reporting of the findings. The authors sincerely appreciate Noor Al-Ilm for Publishing and Distribution for its commitment to supporting researchers and promoting scientific research. Ethical Considerations Not applicable. This study did not require ethical approval because it does not include human or animal subjects and does not involve any personal or sensitive data. List of Abbrevation (RF): Random Forest; (KNN): K-Nearest Neighbors; (MSE): mean squared error; (MAE): mean absolute error; (SWMM): Storm Water Management Model; (API): Antecedent precipitation index; (E): Elevation ; (S): Slope; (FD): Flow direction; (FA): Flow accumulation; (LULC): Land-use/land-cover class; (ISR)Impervious surface ratio ;(BD):Built-up density ; (RD): Road density; (DPD): Drainage-pipe density ; (MD): Manhole density; (DC): Drainage capacity; (DNA): Drainage-network accessibility Declaration of generative AI and AI-assisted technologies in the writing process The authors hereby declare that no generative artificial intelligence or AI-assisted technologies were used at any stage during the preparation of this manuscript, including language editing, proofreading, or content development. The authors take full responsibility for the originality and integrity of the work presented in this publication.
How to cite
License
- عدد المشاهدات - 12
- عدد تحميلات ملف البي دي اف - 351