1. Introduction
One of the major consequences of ongoing climate change is the increasing frequency and intensity of extreme rainfall events, which pose a significant challenge to modern drainage systems. This problem is further intensified by rapid urbanization. The increasing imperviousness of catchment surfaces leads to substantial modifications of the hydrological cycle. These changes include a reduction in concentration time and an increase in surface runoff volume. As a consequence, drainage systems become overloaded, leading to an elevated flood risk [
1]. At the same time, deficiencies in water infrastructure management further exacerbate urban water-related challenges in many Central European countries [
2]. Considering that conventional centralized drainage systems are characterized by limited adaptive flexibility under climate uncertainty and critical threats [
3], while their expansion requires substantial financial investments [
4], their integration with more sustainable solutions appears to be justified. Therefore, it is not surprising that such solutions are currently playing an increasingly important role [
5].
The need for improving urban water management is additionally reinforced by the growing pressure on water resources resulting from climate change [
6,
7]. Recent studies indicate that climate-related hydrological extremes increasingly threaten water security and may increase the risk of situations described as “water bankruptcy”, where water demand exceeds the available supply within a given system [
8]. In parallel, climate change affects not only urban drainage performance but also broader economic sectors that depend on water resources, including energy production and hydropower generation, highlighting the necessity of strengthening the resilience of water infrastructure [
9]. Furthermore, water management challenges should be considered within the broader food–energy–water nexus, as disturbances in one sector may trigger cascading effects in others [
10]. This interconnected perspective has become particularly important in Europe, including Poland, where climate change is expected to intensify competition for water resources and increase the vulnerability of both urban and regional systems. Consequently, the implementation of sustainable and adaptive stormwater management measures can contribute not only to flood mitigation but also to enhancing long-term water security and climate resilience.
Sustainable stormwater management methods include the implementation of best management practices and low-impact development (BMP-LID) facilities, which aim to reproduce the natural water cycle in urbanized catchments as closely as possible [
11]. The implementation of processes such as retention, infiltration, evaporation, runoff delay, and filtration of pollutants contained in stormwater provides measurable environmental benefits [
12,
13], including improvement of the local microclimate. This approach helps reduce the negative effects of climate change, including the overloading of drainage systems and deterioration of water quality [
14], as well as changes in rainfall patterns and the frequency of extreme events [
15]. Studies indicate that properly designed systems of this type can significantly reduce the load on sewer systems [
16]. It should also be noted that such facilities combine positive environmental effects with high aesthetic value, making it possible to create spaces that are both functional and visually attractive [
17].
Basic BMP-LID solutions include, among others, rain gardens, permeable pavements, rainwater harvesting systems, and green roofs, which have recently gained increasing importance in the context of urban adaptation to climate change. A green roof (GR) is a solution that enables vegetation to grow on its surface. Its operation is based on the ability to retain rainwater by storing it in the vegetation layer, substrate, and drainage layer. As a result, stormwater runoff to the drainage system is delayed, and its quality is improved. Part of the retained rainwater is also lost through evaporation. Consequently, this solution reduces peak flows in the drainage system and limits flood risk [
18]. A review of the literature indicates that, depending on roof structure, vegetation type, rainfall characteristics, and climate conditions, GRs can retain from several to several dozen percent of annual rainfall [
19]. Due to the influence of green roofs on the thermal balance of buildings and heat exchange processes occurring within roof layers, these systems can also be analyzed in the context of improving energy efficiency and developing innovative heat exchange solutions in buildings. However, this paper focuses on the hydrological aspects of green roofs, understood here as their ability to retain rainfall, delay runoff generation, reduce peak discharge, and modify cumulative runoff volume over time. The review conducted by Piasecki and Pilarska [
20] showed that analyses of stormwater retention potential in urbanized areas, particularly those involving green roofs, should be further expanded. In addition, Leite and Antunes [
21] demonstrated that most studies do not compare the properties of green roofs with those of conventional roofs, which represents an important research gap. Suszanowicz and Kolasa Więcek [
22], in turn, noted that further research is needed on the environmental impact of green roofs in Central and Eastern Europe.
The effectiveness of LID facilities at the building or catchment scale is most often assessed using hydrodynamic modeling. A commonly used hydrological modeling tool for this purpose is the Storm Water Management Model (SWMM). This software enables detailed analysis of runoff, retention, and flow processes in drainage systems, taking into account both catchment and system parameters [
23]. It is used to simulate stormwater runoff in catchments, including flash flood forecasting [
24]. Numerous studies have also focused on analyzing the influence of model parameters on the shape of runoff hydrographs [
25]. In addition, SWMM is applied to assess the effectiveness of green infrastructure and LID solutions, including green roofs.
Alongside the development of sustainable stormwater management methods [
26] and hydrodynamic modeling tools [
27], a dynamic evolution of machine learning-based approaches can also be observed [
28]. These models demonstrate high performance in runoff prediction, flood risk assessment [
29], and support for intelligent drainage system control, particularly when combined with real-time control technologies [
30,
31]. The application of optimization models and machine learning methods makes it possible to overcome some limitations of classical deterministic models. However, this is often achieved at the expense of reduced interpretability of the results. For this reason, methods enabling a quantitative assessment of the influence of individual input variables on prediction outputs have gained increasing importance in recent years. These include SHapley Additive exPlanations (SHAP) analysis, which facilitates both global interpretation of model behavior and local analysis referring to specific scenarios. Despite the growing number of applications of machine learning methods and SHAP analysis in stormwater management studies, their use in the analysis of LID facilities, particularly green roofs, remains limited and requires further investigation. The interpretability of hydrodynamic models of low-impact development facilities also remains insufficiently explored. In the context of green roof design, the lack of knowledge regarding the relative importance of design parameters limits the possibilities for optimization and practical engineering implementation. In addition, the increasing pressure to improve the resilience of drainage systems while reducing investment and operational costs requires tools capable of providing rapid and reliable predictions of the performance of blue-green infrastructure solutions [
32]. Although SWMM simulations, machine-learning surrogate models, and SHAP-based explainability have already been applied in urban hydrology studies, their application to the interpretation of green roof hydrological performance remains limited. The novelty of this work does not lie in the individual methods themselves, but in their integrated use to quantify and compare the relative importance of green roof design parameters, antecedent moisture conditions, and rainfall characteristics with respect to two complementary hydrological performance metrics: peak flow reduction and cumulative runoff volume.
Considering the above, the aim of this study was to identify the key parameters controlling the hydrological performance of an extensive green roof and to determine how their relative importance changes with respect to peak flow reduction and cumulative runoff volume analyzed over different time intervals after the end of a rainfall event. To achieve this aim, an integrated approach was applied, combining hydrological simulations performed in the SWMM environment, XGBoost regression models, and the SHAP interpretability method. This enabled a quantitative assessment of the influence of the analyzed parameters on the hydrological response of the green roof.
Based on the identified research gap and the aim of the study, the following research questions were formulated:
- (1)
Which design-related, initial moisture, and rainfall-related parameters most strongly control the hydrological performance of the analyzed extensive green roof?
- (2)
How does the relative importance of these parameters differ between peak runoff reduction and cumulative runoff volume analyzed over different time intervals after rainfall?
- (3)
Can the integration of SWMM simulations, XGBoost models, and SHAP analysis provide an interpretable framework for identifying the dominant mechanisms controlling green roof performance?
The results of this study provide practical support for the design and optimization of green roof systems by identifying the parameters that most strongly influence their performance under different hydrological conditions.
Previous studies have shown that the hydrological performance of green roofs is controlled by both design-related parameters and rainfall characteristics. Substrate depth, surface storage capacity, vegetation-related retention, and drainage properties have been identified as important factors affecting rainfall retention, runoff delay, and peak flow attenuation [
33,
34,
35]. In addition, antecedent substrate moisture strongly affects the available retention capacity and the runoff response during rainfall events [
36,
37]. Rainfall duration, intensity, depth, and temporal distribution have also been reported to significantly influence green roof hydrological performance [
38,
39]. Therefore, the parameters analyzed in this study were shortlisted to represent three main groups of controlling factors: green roof structural characteristics, initial moisture conditions, and rainfall event properties.
2. Materials and Methods
The overall methodological workflow adopted in this study is presented in
Figure 1. The workflow consists of six main stages: conceptual model setup, input variable and scenario design, generation of simulation outputs, XGBoost surrogate modeling, model evaluation, and SHAP-based explainability and interpretation.
2.1. Study Area and Model Setup
The study was based on a conceptual model of a flat roof representing a typical single-family residential building located in the Podkarpackie region, south-eastern Poland. The reference roof was assumed to be flat and impermeable, representing a conventional roofing system. The same roof geometry was used in both the reference and green roof scenarios to ensure comparability of the results.
Subsequently, a model was developed in the SWMM environment, in which the green roof system was implemented as a low-impact development (LID) element. The roof was modeled as a catchment with uniform properties and conventional runoff characteristics. Runoff from the reference roof was compared with runoff from the green roof to assess hydrological performance.
2.2. SWMM Description
The simulation of the hydrological response of the analyzed roof was performed using the Storm Water Management Model (SWMM 5.2.3). Two roof configurations were considered: a conventional flat roof used as the reference scenario and a green roof implemented using the low-impact development (LID) module.
The reference roof was modeled in SWMM as a single flat, impervious subcatchment without retention or infiltration capacity. The subcatchment area was estimated at 232 m2, the slope was set to 1%, and the characteristic overland flow width was defined as 16 m. The hydraulic properties of the roof surface included a Manning’s roughness coefficient of 0.012 and a depression storage depth of 0.8 mm. The imperviousness of the reference roof was assumed to be 100%. Under these assumptions, rainfall was transformed into direct runoff after exceeding the initial surface storage capacity, and the generated runoff was discharged directly to the model outlet under free-flow conditions. This configuration represents a typical conventional roofing system and was adopted as the baseline scenario for further analysis. The adopted roof dimensions were selected to represent a typical single-family residential building and served as a common reference geometry for all model scenarios. Although the findings are therefore representative of roof-scale applications and should not be directly extrapolated to larger urban catchments, this approach provides a consistent basis for comparative assessment under identical boundary conditions.
The green roof was implemented in SWMM using the “Green Roof” LID Control option. The model structure consisted of a surface layer, a soil layer, and a drainage layer. The surface layer was responsible for temporary stormwater storage and interception, the soil layer acted as the substrate controlling infiltration and retention processes, and the drainage layer enabled excess stormwater to be discharged after the retention capacity of the upper layers had been exceeded.
The runoff generation and LID water-balance processes were calculated internally by SWMM using the standard equations implemented in the conventional subcatchment and Green Roof LID modules. These equations describe surface storage, runoff generation, infiltration and percolation through the soil/substrate layer, changes in soil moisture, and drainage-layer outflow.
A schematic cross-section of the modeled green roof system implemented in SWMM is presented in
Figure 2. The diagram shows the vegetation placed directly on the soil/substrate layer, the drainage/storage layer, the roof slab, and the main flow paths considered in the model, including rainfall input, surface runoff or overflow, vertical percolation, and drain outflow. Vegetation was represented in the SWMM by the vegetation depression storage parameter (
Vds), which accounts for the interception and temporary storage effects of plant cover. Different
Vds values were included in the parametric analysis to represent varying vegetation-related storage capacities. Detailed vegetation characteristics, including plant species, height, root structure, seasonal development, and water demand, were not explicitly modeled because the study focused on the short-term runoff response during and up to 24 h after rainfall events.
In both scenarios, the same roof geometry and boundary conditions were applied to ensure direct comparability of the results.
The constant model parameters used in the simulations are presented in
Table 1, while the variable parameters considered in the parametric analysis are summarized in
Table 2. The constant parameters of the green roof model were adopted based on literature data [
40] and the SWMM reference documentation [
41]. The selected variable parameters were defined to represent the main groups of factors controlling green roof hydrological performance, namely substrate properties, initial moisture conditions, vegetation-related storage, and rainfall characteristics. Their ranges were intentionally assumed to be broad in order to cover different, yet realistic, green roof configurations and rainfall scenarios, as well as to enable a comprehensive assessment of the relative importance of individual factors using the subsequent machine-learning and SHAP-based analysis. The adopted ranges were selected as a scenario-based parameter space and are consistent with values reported in previous green roof modeling and experimental studies [
42,
43,
44]. Selected substrate and drainage parameters were kept constant in order to define a representative baseline green roof configuration and to limit the dimensionality of the scenario matrix.
The initial volumetric soil water content was determined based on the assumed percentage initial saturation, defined with respect to the range between the wilting point and field capacity, according to the following Equation (1):
where
Iss is the initial volumetric water content of the soil layer;
Sfc is the field capacity;
Swp is the wilting point, and
PIss is the percentage initial saturation [%].
All simulations were performed under consistent modeling assumptions, and differences in surface runoff response were attributed solely to the applied green roof configuration and the analyzed parameter ranges. The analysis included variations in substrate properties, initial moisture conditions, vegetation-related storage, and rainfall characteristics, enabling a comprehensive assessment of the factors influencing green roof performance. The total number of simulation cases was 24,576, resulting from all possible combinations of the analyzed variable parameters.
2.3. Rainfall Modeling
The design rainfall data were obtained from the PMAXTP database developed by the Institute of Meteorology and Water Management—National Research Institute (IMGW-PIB) for the Kolbuszowa location [
45]. The available data included selected rainfall durations and exceedance probabilities. Since the analysis also considered a 5% exceedance probability, rainfall depths for this probability were estimated based on the rainfall depth-duration relationships for the available probabilities. In addition, for each probability, an approximation function describing the relationship between total rainfall depth (
Htotal) and rainfall duration (
Rt) was determined. The following equations were applied for the analyzed probabilities:
where
Htotal,p is the total rainfall depth for exceedance probability
p, [mm]; and
Rt is the total rainfall duration [min].
The temporal distribution of rainfall was described using the half-duration rainfall ratio (
Rhd), defined as the fraction of the total rainfall depth accumulated during the first half of the rainfall duration, according to Equation (6):
where
Rhd is the half-duration rainfall ratio; and
H(
t = 0.5
Rt) is the cumulative rainfall depth at half of the storm duration, [mm].
The graphical representation of the applied rainfall distributions is shown in
Figure 3.
The adopted dimensionless rainfall curves were used to construct hyetographs for each simulation scenario. A single constant rainfall intensity was not assumed in the simulations. Instead, rainfall intensity was time-varying and scenario-dependent. For each rainfall scenario, the total rainfall depth was first calculated from Equations (2)–(5) for a given rainfall duration and exceedance probability. Then, the dimensionless cumulative rainfall curve defined by the assumed value of (
Rhd) was used to distribute the total rainfall depth over time. The rainfall intensity in each time interval was calculated as the increment of cumulative rainfall depth divided by the adopted time step:
where
ik is the rainfall intensity in the
k-th time interval, [mm/min]; %
H(
tk) and %
H(
tk−1) are the relative cumulative rainfall depths at the current and previous time steps, respectively, [%]; ∆
t is the rainfall time step (5 min), [min]; and ∆
Hk is the rainfall depth in the
k-th time interval, [mm].
An example of the generated hyetographs for a 45 min rainfall event with an exceedance probability of 50% is shown in
Figure 4.
This approach enabled a consistent and systematic representation of rainfall events with different temporal structures while maintaining the same total rainfall depth.
2.4. Simulation Outputs
Two output indicators were used to evaluate the hydrological response of the green roof system: (1) the percentage peak runoff reduction (
RQ) and (2) the percentage cumulative runoff volume ratio (
RV). The percentage peak runoff reduction was calculated according to Equation (9):
where
RQ is the percentage peak runoff reduction, [%];
PQGR is the peak runoff from the green roof, [dm
3/s], and
PQTR is the peak runoff from the traditional roof, [dm
3/s].
The percentage cumulative runoff volume ratio was calculated according to Equation (10):
where
RV(
t) is the percentage cumulative runoff volume ratio at time
t, [%];
VGR(
t) is the cumulative runoff volume from the green roof at time
t, [m
3], and
VTR(
t) is the cumulative runoff volume from the traditional roof at time
t, [m
3].
The percentage cumulative runoff volume ratio RV(t) was determined at the end of the rainfall event and after 15 min, 30 min, 1 h, 2 h, 3 h, 6 h, 12 h, and 24 h in order to capture both the immediate and delayed runoff response of the green roof system.
2.5. Data Preprocessing and Model Development
The dataset used for machine learning was generated based on the complete set of SWMM simulation results and included 24,576 samples corresponding to all possible combinations of the analyzed input parameters. Each sample was described by seven numerical input variables related to green roof properties and rainfall characteristics, while the target variables were represented by the adopted runoff response indicators.
Since the simulation dataset did not contain missing values, duplicated records, or evident outliers, no additional data cleaning procedures were required prior to model development. The eXtreme Gradient Boosting (XGBoost 1.7.6) algorithm was selected due to its ability to effectively represent complex and nonlinear relationships in large datasets. This model is widely used in predictive analyses across various scientific fields, including environmental engineering [
46], hydrology [
47], and energy systems [
48]. In this study, it was applied to reproduce the relationships between green roof design parameters, rainfall characteristics, and indicators describing the hydrological response of the system.
In XGBoost, the predicted value is obtained as an additive ensemble of regression trees (Equation (11)) [
49]:
where ŷ
i is the predicted value for the
i-th sample,
xi is the vector of input variables,
K is the number of regression trees, and
fk denotes the
k-th tree from the functional space F.
The model is trained by minimizing a regularized objective function (Equation (12)) [
49]:
where L is the objective function;
n is the number of training samples;
yi is the simulated value obtained from SWMM for the
i-th sample;
l(
yi, ŷ
i) is the loss function measuring the difference between simulated and predicted values; and
Ω(
fk) is the regularization term controlling model complexity.
Separate XGBoost regression models were developed for each output variable. The dataset was divided into three subsets: training, validation, and testing, containing 70%, 15%, and 15% of the samples, respectively [
50]. Before model training, the input variables were standardized using the StandardScaler method. The scaler was fitted using the training subset and subsequently applied to the validation and test subsets. The hyperparameters of the XGBoost models were optimized using Bayesian optimization. The following hyperparameters were considered during the optimization procedure: maximum tree depth, learning rate, number of estimators, minimum child weight, subsample ratio, regularization parameters (α and λ), and γ. The optimization process was carried out using the validation subset, while model training included early stopping to reduce the risk of overfitting. The general XGBoost model configuration and training procedure are summarized in
Appendix A,
Table A1, while the hyperparameter search space used in Bayesian optimization is presented in
Appendix A,
Table A2.
The predictive performance of the models was evaluated using the coefficient of determination (
R2), mean absolute error (
MAE), and root mean square error (
RMSE) [
51], determined separately for the training, validation, and test subsets.
In this study, XGBoost was used as a surrogate model for the deterministic SWMM-generated hydrological responses. The training, validation, and test subsets were separated before model development; however, all samples originated from the same predefined SWMM scenario space. Therefore, model performance should be interpreted as an assessment of the ability of XGBoost to reproduce the SWMM response surface, rather than as an external field validation. The subsequent SHAP analysis was used to interpret the XGBoost approximation of the SWMM-generated hydrological response.
2.6. SHAP Analysis
To interpret the influence of input variables on the model predictions, the SHapley Additive exPlanations (SHAP 0.45.0) method was applied. SHAP is a game theory-based approach that enables the quantification of the contribution of each input variable to the model output. In this study, SHAP values were calculated using the TreeExplainer algorithm, which is specifically designed for tree-based models such as XGBoost. This approach allows for efficient and exact computation of feature contributions. It should be noted that SHAP is currently widely used in many scientific fields, including environmental engineering [
52], hydrology [
53], energy engineering [
54], and civil engineering [
55].
The SHAP analysis was performed separately for each trained model corresponding to individual output variables. The method was used to assess both the global importance of input features and their local effects on individual predictions.
Global feature importance was evaluated based on the mean absolute SHAP values, which quantify the overall influence of each variable on the model output across the entire dataset. Additionally, SHAP summary plots were used to visualize the distribution of feature effects and to identify the direction of influence, positive or negative, of individual variables.
The SHAP framework also enabled the identification of nonlinear relationships and interactions between input variables, providing detailed insight into the factors controlling the hydrological performance of the green roof system.
In the SHAP framework, the prediction of a model for a given sample can be expressed as an additive explanation model (Equation (13)) [
56]:
where
g(
z′) is the explanation model;
val(∅) is the base value representing the average model prediction;
ϕj is the SHAP value of the
j-th input variable;
z′
j indicates the presence of the
j-th feature in the simplified input representation; and
M is the number of input variables.
Global feature importance was calculated as the mean absolute SHAP value (Equation (14)) [
56]:
where
Ij is the global importance of the
j-th variable;
ϕij is the SHAP value of the
j-th variable for the
i-th sample; and
n is the number of samples.
The methodological contribution of this study is primarily application-oriented rather than theoretical. The proposed workflow does not introduce a new hydrological model or machine-learning algorithm but integrates SWMM-based scenario simulations, XGBoost surrogate modeling, and SHAP-based explainability into a single framework for analyzing green roof hydrological mechanisms. This integration is novel in the context of the present study because it enables the relative importance of structural, initial moisture, and rainfall-related variables to be quantified separately for peak runoff reduction and cumulative runoff volume over different post-rainfall time horizons. As a result, the approach provides interpretable and practically useful information for green roof design and optimization.
3. Results
3.1. Hydrological Performance of the Green Roof
The hydrological performance of the green roof was evaluated based on peak runoff reduction (
RQ) and cumulative runoff volume ratio (
RV). The distributions of these indicators were analyzed using histograms, box plots, and descriptive statistics based on the complete set of 24,576 simulation scenarios. In the histograms, the vertical axis represents the percentage share of simulation scenarios within consecutive value intervals of the analyzed output variable.
Figure 5 presents the histogram and box plot of
RQ, while
Figure 6 shows the corresponding distributions of
RV for different times
t after the end of rainfall. The main descriptive statistics of all analyzed output variables are summarized in
Table 3.
The analysis of 24,576 simulation cases revealed substantial differences in the hydrological response of the green roof, depending on the adopted substrate properties, initial moisture conditions, and rainfall characteristics. The obtained results showed that the peak runoff reduction (RQ) was generally very high. Its values ranged from 10.97% to 100%, with a median equal to 99.91% and an upper quartile equal to 100%. This indicates that, in most analyzed scenarios, the green roof almost completely reduced peak runoff relative to the reference roof. At the same time, the first quartile of 85.91% shows that even in less favorable cases, the reduction effect remained substantial. The negative skewness of the distribution (–1.734) confirms that most results were concentrated near the upper bound, whereas clearly lower peak runoff reduction values occurred only in a relatively small subset of cases.
A different but complementary pattern was observed for the cumulative runoff volume ratio (RV). Immediately after the end of the rainfall event, its values were very low, with a median of 0.05% and an upper quartile of 12.14%. This indicates that in most cases, almost no runoff had left the green roof by the end of the rainfall. As time progressed, the runoff volume ratio gradually increased. After 1 h, the median reached 0.52%; after 6 h, it increased to 3.19%; and after 24 h, it reached 7.91%. A similar upward trend was observed for the upper quartile, which increased from 12.14% at the end of rainfall to 28.88% after 24 h. However, even after 24 h, the runoff volume released from the green roof remained much lower than that from the traditional roof in a large proportion of the analyzed cases.
The observed temporal evolution of the runoff volume ratio (RV) indicates that the green roof acted primarily as a retention and detention system. In addition to providing very high peak runoff reduction, it also delayed runoff generation and gradually released the retained water over time. This confirms that the hydrological benefit of the analyzed roof configuration was associated both with strong attenuation of peak flow and with a substantial reduction and delay of cumulative runoff.
The distributions of cumulative runoff volume ratios were positively skewed for all analyzed time horizons, with skewness decreasing from 1.792 at the end of rainfall to 1.014 after 24 h. This means that low runoff values dominated, while higher runoff volumes occurred only for selected combinations of input parameters. At the same time, kurtosis also decreased with time, from 2.417 to –0.097, indicating that the distributions became less peaked and more dispersed as the drainage process continued. These results indicate that the immediate hydrological response of the green roof was characterized by a very strong reduction in runoff, while longer observation periods revealed greater variation in drainage behavior.
The strong variability of runoff indicators and the asymmetric character of their distributions indicate that green roof performance was controlled by complex and likely nonlinear interactions among the analyzed input variables. This provided a rationale for the application of machine learning methods and SHAP-based explainability analysis in the following stages of the study, aimed at identifying the variables most responsible for the observed variation in runoff response.
3.2. Machine Learning Model Performance
The predictive performance of the developed XGBoost models was evaluated using the coefficient of determination (
R2), root mean square error (
RMSE), and mean absolute error (
MAE). The obtained results for all analyzed output variables are summarized in
Table 4. The final optimized XGBoost hyperparameters obtained for individual output variables are provided in
Appendix A,
Table A3.
The models achieved high predictive accuracy, with R2 values equal to 0.999 for all output variables across the training, validation, and test datasets. This indicates very good agreement between the predicted and simulated values. The error metrics remained low and consistent across the training, validation, and test subsets, confirming the stability and robustness of the developed models. The similarity of the results obtained for all three datasets indicates that the models generalized well and did not exhibit overfitting. The obtained results confirm that the XGBoost models accurately reproduced the relationships between the input variables and the hydrological response indicators. Therefore, the developed models were considered suitable for further interpretation using SHAP analysis.
3.3. SHAP-Based Feature Importance Analysis
3.3.1. SHAP Analysis—Peak Runoff Reduction
To identify the key variables controlling peak runoff reduction (RQ), an explainability analysis of the developed XGBoost model was performed using the SHAP method. In this approach, the predicted value is expressed as the sum of the model base value and the contributions of individual input variables.
The results of the SHAP analysis are presented in
Figure 7, which includes both the beeswarm plot and the global feature importance ranking based on mean absolute SHAP values.
The base value of the model, representing the average predicted peak runoff reduction, was equal to 88.922%. This indicates that, under average conditions, the green roof provided a high level of peak flow attenuation. Individual input variables shifted this value either upwards or downwards, depending on their magnitude and interaction with other parameters.
The global SHAP analysis showed that the most influential variable determining peak runoff reduction was berm height (Bh), with a mean absolute SHAP value of 12.23%. Since the target variable was expressed as peak runoff reduction in percent, the SHAP values are also reported in percentage units of the model output. This value was significantly higher than those of all other variables, indicating its dominant role in shaping the model response. This result confirms that surface storage capacity was the primary mechanism controlling peak flow attenuation.
Rainfall characteristics, including rainfall probability (Rp) and rainfall duration (Rt), were identified as the second most important group of variables, with mean absolute SHAP values of 4.88% and 4.04%, respectively. Their influence reflects the direct relationship between rainfall input and the hydraulic capacity of the system. Higher rainfall intensity and longer duration increase the likelihood of exceeding the storage capacity, thereby reducing the effectiveness of peak flow reduction.
Initial saturation (PIss) also played an important role, with a mean absolute SHAP value of 3.21%, indicating that antecedent moisture conditions influenced the system response even at the peak flow stage.
In contrast, variables related to the substrate, such as soil thickness (St) and vegetation-related storage (Vds), exhibited a noticeably lower impact on peak runoff reduction, with mean absolute SHAP values of 1.30% and 1.11%, respectively. The rainfall distribution parameter (Rhd) also showed a relatively limited influence, with a mean absolute SHAP value of 1.71%, suggesting that temporal rainfall structure played a secondary role compared to total rainfall input and surface storage capacity.
Overall, the results indicate a clear hierarchy of variables, where berm height dominates the model response, followed by rainfall characteristics and initial conditions, while the influence of substrate and vegetation parameters remains comparatively limited within the analyzed range.
Besides the mean absolute SHAP values, the ranges of local SHAP effects also confirmed the dominant influence of the most important variables. For berm height (Bh), which had the highest global importance, local SHAP values ranged from –37.24% to 28.45%. The second most important variable, rainfall probability (Rp), with a mean absolute SHAP value of 4.88%, showed a substantially narrower local range, from –15.12% to 17.34%. By contrast, vegetation-related storage (Vds), which had one of the lowest global importance values, 1.11%, exhibited a much smaller range of local SHAP effects, from –4.24% to 4.48%. This comparison confirms that the variables identified as globally important also had the strongest influence on individual model predictions.
3.3.2. SHAP Analysis—Cumulative Runoff Volume Ratio
To further investigate the factors controlling runoff retention and release processes, SHAP analysis was performed for the cumulative runoff volume ratio
RV(
t) at different times after the end of rainfall. The results of the SHAP analysis are presented in
Figure 8, which illustrates both the distribution of SHAP values and the global feature importance ranking for each analyzed time step.
Immediately after the end of rainfall, the system response was primarily controlled by rainfall characteristics and surface-related parameters. At t = 0 h, the highest global importance was observed for berm height (Bh), rainfall duration (Rt), and rainfall probability (Rp), indicating that surface storage and rainfall input dominated the initial runoff response. This is further supported by the ranges of local SHAP values, which were the widest for Bh (−17.97% to 27.85%), Rt (−16.55% to 14.38%), and Rp (−13.14% to 10.87%), confirming their strong influence on individual predictions at the early stage of runoff formation.
As time increased, the relative importance of input variables changed significantly, indicating a shift in the governing hydrological mechanisms. The influence of rainfall characteristics gradually decreased, while the importance of substrate-related variables increased. In particular, initial saturation (PIss) became increasingly important, reflecting the growing role of available storage capacity within the substrate. This transition was also evident in the local SHAP ranges, where the spread of PIss values increased over time, indicating a progressively stronger impact on model predictions. The transition became particularly apparent at intermediate time steps, e.g., 3–6 h, when the influence of rainfall and substrate-related variables became more balanced.
At longer time horizons, especially at 24 h, the system behavior was primarily controlled by initial moisture conditions and substrate properties. At this stage, PIss exhibited the highest global importance, with a mean absolute SHAP value of 9.52%, followed by rainfall probability (Rp, 5.81%), berm height (Bh, 5.62%), soil thickness (St, 4.94%), and rainfall duration (Rt, 4.77%). In contrast, the influence of rainfall distribution (Rhd) remained relatively low throughout the entire simulation period.
The analysis of local SHAP values further confirmed these observations. At 24 h, PIss showed the widest range of influence (−18.22% to 23.69%), indicating that antecedent moisture conditions could substantially increase or decrease cumulative runoff depending on the scenario. Relatively wide ranges were also observed for Rp (−15.24% to 12.70%), St (−12.29% to 16.99%), and Bh (−10.37% to 20.58%), whereas variables such as vegetation-related storage (Vds) and rainfall distribution (Rhd) exhibited much narrower ranges, indicating a limited impact on individual predictions.
The direction of influence of the analyzed variables remained consistent across time. Higher values of PIss, Rp, and Rt generally increased RV(t), indicating greater runoff generation. In contrast, higher values of Bh, St, Vds, and Rhd were associated with lower RV(t), reflecting improved retention and delayed drainage.
Overall, the results demonstrate a clear transition from rainfall-controlled processes immediately after the event to storage-controlled dynamics at later times. This behavior indicates a dual-regime hydrological response of the green roof system, where early-stage runoff is governed by rainfall input and surface storage, while the later-stage response is controlled primarily by substrate moisture conditions and storage capacity. This finding highlights the need to consider both short-term and long-term indicators when evaluating the hydrological performance of green roof systems.
4. Discussion
4.1. Runoff Response and Key Factors Controlling Green Roof Performance
The contribution of this study is primarily application-oriented. The study demonstrates how SWMM simulations can be combined with XGBoost models and SHAP explainability to identify the dominant mechanisms controlling green roof hydrological performance. The novelty lies not in the development of a new theoretical model, but in the integrated use of process-based modeling, machine-learning prediction, and explainable artificial intelligence to distinguish between the factors controlling short-term peak runoff attenuation and delayed cumulative runoff release. This approach provides practical support for green roof design and optimization by indicating which parameters are most relevant for different hydrological objectives.
The results confirmed that the application of XGBoost models combined with SHAP analysis provides an effective approach for identifying the key variables controlling the hydrological performance of green roof systems. By quantifying the contribution of individual input parameters to runoff reduction, this approach enables a more detailed interpretation of the modeled hydrological response. This is consistent with findings from other studies on various hydrological processes, where the integration of XGBoost models with explainability methods enabled the identification of the most important factors influencing urban flood susceptibility [
57] and daily pan evaporation [
58]. This indicates the high usefulness of the applied approach in the analysis of complex nonlinear hydrological and environmental processes.
SHAP analysis showed that different mechanisms control the hydrological response depending on the analyzed indicator. In the case of peak runoff reduction, system performance was determined mainly by surface-related parameters, particularly berm height (Bh), which directly determines the available temporary storage capacity on the roof surface. This confirms that peak flow attenuation is controlled primarily by the system’s ability to intercept and delay runoff at the surface level.
In contrast, the analysis of cumulative runoff showed that the controlling mechanisms evolve over time. Immediately after the rainfall event, the system response was dominated by rainfall characteristics, including rainfall exceedance probability (
Rp) and rainfall duration (
Rt), as well as surface retention. However, over time, the importance of substrate-related variables increased significantly. In particular, initial saturation (
PIss) became the dominant factor over longer time horizons, indicating that antecedent moisture conditions and the available retention capacity of the substrate play a key role in determining long-term stormwater retention and runoff release. This is consistent with the findings reported by Jabeen et al. [
59], according to which green roof performance varies depending on total rainfall depth, maximum rainfall intensity, and the antecedent dry weather period.
This temporal shift highlights the fundamental difference between peak flow attenuation and cumulative runoff processes. During and immediately after rainfall, the response of the green roof is mainly rainfall-driven because rainfall depth, duration, and temporal distribution determine how rapidly the available surface and near-surface storage is filled and whether overflow or rapid drainage is initiated. Therefore, peak runoff reduction is controlled primarily by the ability of the system to intercept, temporarily store, and delay runoff at the surface level. After rainfall ceases, the direct influence of rainfall forcing gradually decreases, while internal storage and release processes within the green roof become dominant. At this stage, cumulative runoff is governed mainly by substrate moisture conditions, available retention capacity, and delayed drainage through the substrate and drainage layer. A dry substrate can retain a larger proportion of rainfall and delay runoff release, whereas a highly saturated substrate has limited additional storage capacity and produces a faster response. This explains why the importance of initial saturation increases over longer post-rainfall time horizons and why the runoff response shifts from rainfall-controlled behavior to storage-controlled behavior.
4.2. Interpretation of XGBoost Model Performance
The very high predictive accuracy of the XGBoost models, with R2 values equal to 0.999 for the training, validation, and test datasets, should be interpreted in the context of the simulation-based nature of the dataset. The input data were not obtained from field measurements affected by random errors, sensor uncertainty, uncontrolled boundary conditions, or missing observations. Instead, the dataset was generated from deterministic SWMM simulations performed for systematically defined combinations of input parameters. Therefore, the relationships between the input variables and the output indicators were highly structured and reproducible.
Such high predictive performance is consistent with the intended role of XGBoost in this study. The machine-learning models were not used as independent, field-calibrated hydrological models, but as surrogate models trained to approximate the SWMM simulation outputs and to enable SHAP-based interpretation. Therefore, the high model accuracy was necessary to ensure that the subsequent SHAP analysis reflected the behavior of the original SWMM simulation dataset.
4.3. Practical Implications for Green Roof Design
From a practical perspective, the results suggest that maximizing hydrological effectiveness requires different design strategies depending on the intended objective. Increasing berm height is particularly effective in reducing peak runoff, indicating its importance for short-term flow attenuation. The dominance of berm height in the SHAP ranking should be interpreted within the adopted parameter ranges. In the analyzed scenario space, berm height directly controlled the available surface storage before overflow, which explains its strong influence on peak runoff reduction. However, feature importance rankings obtained from SHAP analysis are range-dependent. If other substrate or drainage parameters, such as hydraulic conductivity, drainage properties, or soil retention characteristics, were varied over wider ranges, their relative importance could increase and the ranking of controlling factors could change. Therefore, the identified dominance of berm height should be regarded as robust for the adopted model configuration and parameter space, but not necessarily universal for all green roof designs.
In contrast, long-term retention was more strongly associated with substrate characteristics and antecedent moisture conditions. Previous studies have shown that deeper substrates can substantially increase rainfall retention, although their effectiveness depends on rainfall depth and the antecedent dry weather period [
44]. Moreover, green roof performance has been shown to be strongly affected by initial substrate saturation and precipitation characteristics, with greater effectiveness during moderate rainfall events than during severe storms [
60]. These findings indicate that green roof optimization should balance structural measures, such as berm height, with substrate-related parameters to achieve both peak flow reduction and enhanced water retention. The potential financial consequences of adopting a specific green roof configuration should also be considered. Previous studies [
61] have shown that an increase in the hydrological effectiveness of a green roof was associated with reduced investment profitability.
It should also be noted that the influence of some variables, such as rainfall distribution (Rhd) and vegetation-related storage (Vds), remained relatively limited within the analyzed parameter ranges. This suggests that, under typical design conditions, their contribution to overall hydrological performance may be secondary compared with key parameters such as Bh, PIss, and rainfall characteristics. However, their importance may increase under different climatic conditions or for alternative system configurations.
4.4. Limitations and Future Research
The limitations of the adopted methodology should also be considered when interpreting the results. The dataset used in this study was fully synthetic and based on numerical simulations performed in SWMM. Although this approach enables a systematic analysis over a wide range of conditions, real systems may exhibit greater variability due to construction imperfections, vegetation dynamics, and climatic variability. Therefore, the results should be interpreted as indicating general relationships rather than providing precise predictions for specific installations. In addition, the SWMM was not calibrated or validated using field or laboratory measurements from a real green roof. For this reason, the SHAP-based feature importance rankings should be interpreted as model-based rankings valid for the adopted SWMM configuration, parameter ranges, rainfall assumptions, and roof-scale setup, rather than as universal rankings for all real green roof systems.
Another limitation is that the analysis was conducted for a specific green roof configuration and a defined range of input parameters. The relative importance of variables identified using SHAP analysis is inherently dependent on the adopted parameter ranges. Consequently, changes in these ranges may lead to different feature importance rankings. In addition, including other environmental parameters in the analysis, such as evaporation or evapotranspiration intensity [
62], could affect the relationships between input variables and alter the interpretation of their influence on the hydrological performance of green roofs. This should be taken into account when generalizing the results to other types of green roof systems or climatic conditions.
A limitation of this study is that vegetation was represented only by vegetation-related depression storage, while detailed plant characteristics, such as species composition, vegetation height, root structure, seasonal development, evapotranspiration, and water demand, were not explicitly considered. This assumption is justified for the adopted event-based analysis focused on short-term runoff response, but future studies should include more detailed vegetation modeling, particularly for long-term, seasonal, or water-balance-oriented assessments of green roof performance.
Despite these limitations, the results provide valuable insights into the mechanisms governing green roof performance and demonstrate the potential of combining process-based modeling with machine learning and explainability techniques. Such an approach can support the design and optimization of green infrastructure by identifying the most influential parameters and explaining their role in different hydrological processes.
Future research should focus on extending the analysis to different types of green roofs, including intensive and semi-intensive systems [
63], as well as incorporating real measurement data for model validation. It would also be beneficial to analyze the interaction of green roofs with other stormwater management solutions, such as retention tanks and permeable surfaces, in order to assess their combined impact on urban drainage systems. The integration of such systems within broader urban water management strategies may play a key role in increasing climate resilience and reducing the impacts of extreme rainfall events. Contemporary studies indicate that artificial intelligence-based solutions can significantly support sustainable water management by improving system efficiency, reducing urban flood risk, and supporting decision-making processes in water infrastructure management [
64]. In particular, SHAP-based models enable the identification of key spatial factors influencing the effectiveness of green spaces in reducing urban waterlogging and support the optimization of sponge city solutions [
65]. In this context, interpretable machine learning models may constitute a useful tool supporting the design of multifunctional and resilient green roof systems.
An interesting direction for future research also appears to be the extension of the proposed XGBoost-SHAP approach to the analysis of the energy-related effects of green roofs. Previous studies have shown that such structures not only enable stormwater retention but also significantly influence roof surface temperature and heating and cooling energy demands [
66]. It should be noted that the growing importance of artificial intelligence-based methods is also evident in energy research [
67,
68], including studies of complex multidimensional environmental–energy systems. Therefore, extending the proposed framework to include parameters related to building thermal balance, roof surface temperature, or cooling energy demand could enable the investigation of synergies between the retention and energy functions of green roofs. Through the application of SHAP analysis, it would also be possible to interpret interactions between hydrological and energy-related variables under variable urban microclimate conditions.
5. Conclusions
The analysis showed that the application of an extensive green roof can significantly improve the hydrological performance of a building by reducing peak runoff and delaying stormwater discharge. For the considered range of input parameter variability, peak runoff reduction ranged from 10.97% to 100.00%, with a median value of 99.91%. At the same time, the cumulative runoff volume ratio remained low immediately after the rainfall event and gradually increased over time, reaching a median value of 7.91% after 24 h. This confirms the high retention and storage capacity of the analyzed system.
The main contribution of this study is the integration of SWMM-based scenario simulations with XGBoost surrogate modeling and SHAP-based explainability into a single interpretative framework for green roof hydrological analysis. This framework made it possible not only to predict SWMM-derived runoff response indicators with high accuracy, but also to identify and compare the dominant factors controlling peak runoff reduction and cumulative runoff release over different post-rainfall time horizons. The main findings can be summarized as follows:
- 1.
Berm height (Bh) was identified as the most influential parameter controlling peak runoff reduction, confirming the dominant role of surface retention in peak flow attenuation.
- 2.
Rainfall characteristics, particularly rainfall exceedance probability (Rp) and rainfall duration (Rt), significantly influenced both peak runoff and cumulative runoff, especially during the early stages after the rainfall event.
- 3.
Initial saturation (PIss) was the key factor controlling cumulative runoff volume over longer time horizons, indicating the importance of antecedent moisture conditions and substrate retention capacity.
- 4.
Substrate-related parameters, such as soil thickness (St), contributed to long-term retention processes, whereas vegetation-related storage (Vds) and rainfall distribution (Rhd) had a relatively lower influence within the analyzed ranges.
- 5.
The direction of the influence of input variables was consistent across all analyzed scenarios: higher values of PIss, Rp, and Rt increased runoff, whereas higher values of Bh, St, Vds, and Rhd increased retention and reduced runoff.
The results indicate that the hydrological behavior of the green roof is governed by different mechanisms depending on the time scale. Peak runoff reduction is primarily controlled by surface storage and rainfall input, whereas cumulative runoff is determined by substrate storage and drainage processes. This confirms the existence of a dual-regime response, highlighting the need to consider both short-term and long-term indicators when evaluating green roof performance.
It should be noted that the results are subject to certain limitations related to the adopted modeling approach. The analysis was based on a synthetic dataset generated using SWMM simulations and a predefined range of input parameters. Under real-world conditions, additional factors such as vegetation dynamics, material aging, and variability in climatic conditions may influence system performance. Moreover, the identified importance of variables depends on the adopted parameter ranges, which may affect their ranking under different scenarios.
Future research should focus on extending the analysis to other types of green roofs and climatic conditions, as well as incorporating experimental data for model validation. It would also be beneficial to analyze the interactions between green roofs and other stormwater management solutions in order to assess their combined impact on urban drainage systems. The integration of process-based modeling with machine learning and explainability methods offers significant potential for supporting the design and optimization of sustainable urban water management systems.