ABSTRACT
Integrating pluvial flood-risk management into the early stages of urban planning and design has become a mandatory task for urban planners due to the increasing flood risks caused by climate change. This can be done by optimizing urban layout designs using flood simulations. However, such simulation-driven optimization cannot be easily conducted due to (i) the long computational time for physically-based models to simulate and (ii) the inability to obtain design feedback information without trial and error. To overcome these limitations, this study proposes a gradient descent formulation for pluvial flood-driven urban design by combining flood surrogate models and design objective functions. The proposed method was tested on urban patch data using one-step and iterative gradient-descent processes, showing promising results. The one-step method trained on the original dataset achieved the lowest intersection over union (IoU) ratio of the high-hazard-rating areas between the original inputs and final results, with the median IoU reaching below 0.1. In contrast, the iterative method trained on the expanded dataset achieved the highest IoU value, with the median reaching approximately 0.25. The proposed model in this study is an original contribution that links the areas of flood simulation and urban design in order to create pluvial flood-safe urban layouts.
HIGHLIGHTS
Reducing urban flood vulnerability is formulated as a gradient-descent process.
A differentiable flood surrogate model replaces flood simulation models.
The flood surrogate model derives the gradient terms of the design objective analytically.
The gradient terms explicitly show how to reduce urban flood vulnerability.
INTRODUCTION
The increasing rainfall intensity associated with an increase in the frequency of large storms due to climate change is creating challenges for urban planning and urban infrastructure management (Plate 2002). As a result, integrating pluvial flood-risk management into the urban planning and design process becomes important (Van Herk et al. 2011). Performance-based strategies have received increasing attention in recent years due to the growing demand for urban designs that can cope with the new challenges created by climate changes (Pelorosso 2020). This trend emphasizes the need to develop tools that allow urban designers to quickly assess the flood risk of their urban design solutions during the early design stage. Reducing the flood risk in cities can be implemented at different scales. At the urban scale, the number of assets exposed to flooding can be reduced through improved land-use planning (e.g., Wheater & Evans 2009). At smaller scales, the spatial distribution of overland flow and flooding can be managed and optimized by improved topographic and building layout designs (e.g., Bruwier et al. 2018, 2020).
Using flood hazard as a performance indicator for urban design has been previously explored in a few studies (e.g., McClymont et al. 2020; Mustafa et al. 2020). However, some aspects were not thoroughly investigated, such as the need and advantages of integrating flood hazard assessment into the urban design workflow. The first aspect is related to the long computational time taken by physically-based flood hazard models; this challenge becomes even more relevant when a considerable number of simulations is required (Zheng et al. 2015) or when the size of the study area is large and the minimum required spatial resolution is high. Early efforts for this issue mainly focused on simplifying flow hydraulic representations (e.g., Bates et al. 2010; Bradbrook et al. 2004). Recently, non-physically-based flood models, such as cellular automata models (e.g., Guidolin et al. 2016; Jamali et al. 2019), are faster than physically-based models as they simplify partial differential equations into transition rules that can be effectively parallelized by multi-core processors. However, these are still considered not fast enough (e.g., tens of minutes to a few hours, Jamali et al. 2019) for real-time applications or for applications that involve a large number of trial-and-error applications during the urban layout optimization process. Investigating flood models exhaustively is beyond the scope of this work, and comprehensive reviews of flood models can be found in Teng et al. (2017) and Bulti & Abebe (2020).
The second aspect is the inability of flood models to provide urban designers with information about which catchment area(s) has(ve) the largest influence on the flooding patterns. The reason is that the flood simulation process depends on boundary conditions whose causal relations are not empirically clear for non-flood experts. As a result, urban designers have difficulties improving their designs based on the flood simulation results. They must either query flood experts or conduct trial-and-error until the simulation shows that the flood hazard is sufficiently reduced (e.g., Bakhshipour et al. 2019; McClymont et al. 2020; Bakhshipour et al. 2021). Although the trial-and-error strategy can be automated using optimization techniques for better efficiency, the challenge still exists as the size of the search space for optimization algorithms grows exponentially when dealing with complex design problems (Dino 2016; Dino & Üçoluk 2017).
Regarding the first aspect described above, the recent progress in surrogate modeling using machine learning techniques has shown a promising solution (e.g., Berkhahn et al. 2019; Kratzert et al. 2019a, 2019b). These progresses take advantage of the approximation ability of machine learning algorithms, such as neural networks (Hornik et al. 1989) and assume that many flood-related problems, such as flood extent mapping (e.g., Gebrehiwot et al. 2019; Moy de Vitry et al. 2019), flood susceptibility assessment (e.g., Zhao et al. 2019; Bui et al. 2020; Zhao et al. 2020; Wang et al. 2020), and pluvial flood predictions (e.g., Huang et al. 2014; Tan et al. 2018; Berkhahn et al. 2019), can be approximated as a continuous function by learning from sufficient diversified data of good quality. As machine learning algorithms are highly parallelizable and do not aim at representing each of the physical processes involved in flooding, these models show significant improvements in computational speed compared with physically based simulation models, with promising accuracy and the ability to generalize to different cases (e.g., Guo et al. 2021, 2022; Löwe et al. 2021; Chaudhary et al. 2024). A comprehensive review of data-driven flood modeling can be found in Mosavi et al. (2018).
Building upon the recent developments in the field of urban pluvial flood prediction, this study focuses on addressing the second aspect to obtain urban design support information to generate pluvial flood-safe urban designs using data-driven surrogate flood models. More specifically, this study proposes that a pluvial flood-driven urban design problem can be formulated as a gradient-descent process that, compared with the conventional trial-and-error workflow, can significantly reduce the computational complexity of flood-driven urban design. The precondition of the proposed methodology is that the model used for pluvial flood prediction is differentiable (e.g., neural networks), and the key component is the gradient terms of the flood model with respect to the input terrains. These gradient terms can inform designers how to modify their designs for certain purposes, such as minimizing the water depth and overland flow velocity in specific catchment areas.
In this study, a novel gradient descent formulation for flood-driven design of urban layouts is proposed. The types of floods considered in this study are those generated by surface runoff caused by intense rainfall events, i.e., pluvial flooding. The main idea is to make use of a differentiable surrogate model so that (i) the gradient terms of the design objective with respect to the input variables (i.e., the input terrain elevations) can be analytically obtained, and (ii) the design objective, i.e., flood-safe urban layout designs, is achieved by a gradient-descent process.
METHODOLOGY
Proposed approach; the dashed arrow represents the bottlenecks from the traditional approach that are overcome by the methodology proposed in this study.
Proposed approach; the dashed arrow represents the bottlenecks from the traditional approach that are overcome by the methodology proposed in this study.
Differentiable surrogate flood model


This process searches for appropriate θ so that the mean squared error between the outputs of fθ and f is minimized.
Gradient descent formulation based on the surrogate flood model

This formulation is essentially the same back propagation process for training a neural network. The difference is that this process modifies the input terrain x, rather than the model parameter θ.
The flood hazard reduction obtained using the modified terrain can be validated by comparing the simulation results f(x) and the prediction result fθ(x). Also, the gradient term
can be visualized as spatial maps that reveal the relation between each input pixel and the design objective. Such information can also be useful later when the designers need to exchange information with experts from other domains or manually modify the landscape.
Proposed objective function

It is worth noting that the remaining gradient terms, and
, depend on the architecture of the surrogate flood model fθ. These gradient terms can typically be obtained using the built-in functions of many machine learning frameworks that follow the concept of computational graphs. In this study, TensorFlow (Abadi et al. 2016) was used to implement the surrogate flood model and obtain the associated gradients. The model's architecture is presented in Section 3.1.
SURROGATE FLOOD MODEL BASED ON CONVOLUTIONAL NEURAL NETWORKS
Model design
Architecture of the surrogate flood model (left part) and the loss function that computes the HR value (right part) (the figure neglects some redundant layers for better readability).
Architecture of the surrogate flood model (left part) and the loss function that computes the HR value (right part) (the figure neglects some redundant layers for better readability).
Data source and data processing
For this study, the 2 m spatial resolution terrain surface elevation data were obtained from the GeoVITe of ETH Zurich (https://geovite.ethz.ch/) as raster maps, and the building layout data were collected from OpenStreetMap (https://www.openstreetmap.org) as geo-located polygons. The collected data cover parts of the region of Zurich (Switzerland) and were pre-processed and combined before being used in the experiments described in Section 4.
The collected data were pre-processed differently for conducting flood simulations (i.e., to generate ground truth data) and for training and validating the surrogate flood models. The input data for flood simulations were created by adding together the terrain elevation and building elevation maps of the same location. The building elevation maps were produced by rasterizing the building polygons with positive numbers, indicating the building heights (unit: m) and 0 s indicating other spaces. The rasterization process assumed that all buildings have flattened roofs. For training and evaluating the flood surrogate models, the terrain elevation data were normalized by , where c = 0.01 is a user-specified constant. The pre-processed data were concatenated as raster maps of two image channels. The two-channel raster maps were used as the input data for flood surrogate models.
The CADDIES (Ghimire et al. 2013) was the flood simulation model used in this study to generate the ground truth pluvial flood data. Despite being a cellular automata flood model, CADDIES is able to produce accurate results when compared with physically-based model results (Guidolin et al. 2016). Being a cellular automata model, CADDIES is significantly faster than physically-based flood models, which is a relevant feature given the large number of simulations required to conduct the presented study. All ground truth simulations were generated using an intense design rainfall event generated using the alternate block method (Te Chow et al. 1988). The duration of the event was one hour. This duration was chosen based on the relatively small areas of the considered catchments (average of around 7 km2) (Guo et al. 2022) and the consequent short time of concentration. The total simulated period was five hours.
Training dataset and surrogate flood model training step
The study used two datasets produced from the collected elevation data and flood simulation results. The first dataset, which contains 6,000 terrain patches, was generated by randomly sampling the collected elevation data. The sampling process discarded patches that have no buildings to make a good approximation to CADDIES for the scenario of urban design and planning. The sampled patches were randomly shuffled, in which 4,000 patches were used for training the surrogate flood model, and the remaining 2,000 patches were used as the test dataset. The second one, which was an expanded training dataset, was created by duplicating the 4,000 training patches of the first dataset multiple times with randomly generated ‘artificial bumps’ added to each of the duplications. The ‘artificial bumps’ were grayscale images generated by feeding the x–y coordinates of raster map pixels to multiple trigonometric functions. During the above expansion process, six variants were made for each of the terrain patches, producing an expanded training dataset that consists of a total of 24,000 terrain patches.
The purpose of using two datasets is to compare the effect of terrain variants on the model's prediction accuracy. The reason for the comparison is that the trained surrogate flood model showed a decrease in prediction accuracy during the gradient-descent process. Specifically, in early experiments, it was found that the model made higher prediction errors on input terrain modified by multiple iterations than on the unmodified terrain. The hypothesis for this issue is that the model lacks sufficient generalizability for input terrains, which can be improved by introducing more terrain variants to the training dataset. To validate this hypothesis, two surrogate flood models were trained using the original and expanded training datasets. Both models were used for the experiments described in Section 4. During the training process, data augmentation techniques that rotate and flip the original terrain patch to further increase the amount of training data were used for both models. The training was implemented using the Adam optimizer (Kingma & Ba 2015), with a fixed learning rate of 1 × 10−5 and a total iteration of 40 epochs.
Validation of the results
The validation process of the experiment consists of two steps. The first step evaluates the prediction accuracy of the surrogate flood model by comparing the ground truth flood simulator results with the prediction results using two commonly used performance indicators: modified index of agreement (d1) (Willmott et al. 1985) and rooted mean squared error (RMSE). The d1 value emphasizes the relative errors of the prediction, while the RMSE value focuses on the absolute errors. As the flood prediction consists of two raster maps (i.e., water depths and flow velocities), the performance indicators were computed for each of the raster maps independently. Table 1 reports the equations to calculate these indicators.
Performance indicators for model accuracy
Performance indicator . | Formula . | Range . | Optimal score . |
---|---|---|---|
Modified index of agreement (d1) | ![]() | [0,1] | 1 |
RMSE | ![]() | [0, +∞] | 0 |
Performance indicator . | Formula . | Range . | Optimal score . |
---|---|---|---|
Modified index of agreement (d1) | ![]() | [0,1] | 1 |
RMSE | ![]() | [0, +∞] | 0 |
Note that i denotes the index of samples, yi and denote the ground truth and the corresponding prediction of the ith sample, and denotes the mean raster map of all y.
The second step evaluates how the design objective is achieved by comparing (i) the mean HR value, (ii) the size of the high-HR areas, and (iii) the location of the high-HR areas before and after the gradient-descent process. The first two indicators report both the absolute and the relative difference between the original and modified terrains, and the last indicator reports the intersection over union (IoU) ratio. Table 2 shows the equations for computing the mentioned indicators, where h and h′ denote the HR values calculated from the original and modified terrains, respectively, and ɛ is a user-defined threshold that was set to 0.1 and 0.5 during the experiments. Note that during the validation process, both h and h′ are calculated from the simulation data (i.e., flood simulations using original and modified terrains), not the prediction data by the surrogate flood model.
Performance indicators for evaluating flood hazard reductions
Performance indicator . | Formula . | Range . | Optimal score . |
---|---|---|---|
Difference in mean HR | ![]() | ![]() | ![]() |
The relative difference in mean HR | ![]() | [−1, +∞] | − 1 |
Size difference for high-HR areas | ![]() | [−|A|, +∞] | − |A| |
Relative size difference for high-HR areas | ![]() | [−1, +∞] | − 1 |
IoU for high-HR areas | ![]() | [0, 1] | 0 |
Performance indicator . | Formula . | Range . | Optimal score . |
---|---|---|---|
Difference in mean HR | ![]() | ![]() | ![]() |
The relative difference in mean HR | ![]() | [−1, +∞] | − 1 |
Size difference for high-HR areas | ![]() | [−|A|, +∞] | − |A| |
Relative size difference for high-HR areas | ![]() | [−1, +∞] | − 1 |
IoU for high-HR areas | ![]() | [0, 1] | 0 |
Note that and
denote
and
, respectively, i and j are row and column indices, and ɛ is a user-defined threshold value.
EXPERIMENTS WITH THE CNN-BASED SURROGATE FLOOD MODEL
The study performed two experiments to investigate the effect of different gradient descent strategies on the outputs. The first experiment investigates one-step gradient descent for fixed AOI inputs, and the second experiment explores the iterative gradient-descent process with prediction-dependent AOI inputs. Both experiments were conducted using the two surrogate flood models: the model trained using the original dataset and the model trained using the expanded trained dataset.
Experiment 1. One-step gradient descent for specific AOI
The flood simulation (first column) and the gradients obtained by manually drawing AOIs of different sizes, shapes, and locations (the four columns on the right). For visualization purposes, the figure only shows the gradient terms with respect to terrain elevations.
The flood simulation (first column) and the gradients obtained by manually drawing AOIs of different sizes, shapes, and locations (the four columns on the right). For visualization purposes, the figure only shows the gradient terms with respect to terrain elevations.
The above one-step gradient descent operation was applied to 200 heavily flooded cases selected from the test dataset. The AOI area of all 200 cases was automatically generated by thresholding their corresponding flood simulation results. The process proved effective for reducing the flood vulnerability in most of the case studies with single-region AOIs or AOIs that consist of multiple sub-regions. However, some case studies have shown that the one-step gradient descent operation may cause opposite effects, increasing flood hazard. It can be hypothesized that the optimization step size was improperly determined, causing the modified design inputs to jump over the global minimum, which the gradient-descent process tries to achieve. The detailed results are presented in Section 5.
Experiment 2. Iterative gradient descent with dynamic AOI specification

The experiment generates a new AOI array for each iteration using a simple prediction-thresholding process. Specifically, for an input urban patch xt at iteration t, the surrogate flood model first evaluates the patch's HR value and then calculates the AOI array at by thresholding the HR value ht (which is a raster map). In our experiment, we used 0.1 for thresholding the ht. This prediction-thresholding process repeats for each iteration, and the process stops if the maximum number of iterations is reached or if the generated AOI array is empty (i.e., contains no non-zero pixels).
Although the experiment pipeline allows different step sizes to be used for each iteration, a constant step size for all iterations was chosen for simplicity. As compensation for this simplicity, a gradient clipping process was introduced to reduce the amount of elevation changes when the magnitude of the obtained gradient is large. The threshold for gradient clipping was set to 0.1 m for all cases during our experiment, meaning that the maximum elevation change between adjacent iterations was no larger than 0.1 m regardless of the magnitude of the obtained gradient terms.
This iterative gradient-descent process was applied to the same 200 heavily flooded case studies used by the one-step experiment. The process significantly reduced the flood hazard for most of the case studies and, compared to the one-step experiment, effectively addressed the issue of causing unwanted results within the AOIs. Also, the iterative process conducted using two surrogate models shows that, as expected, training data variety can increase the model's prediction accuracy. The detailed results are presented and discussed in Section 5.
RESULTS AND DISCUSSIONS
Prediction accuracy of the surrogate pluvial flood models
Flood prediction accuracies during the iterative gradient-descent process. Surrogate models trained on the original dataset (left) deviate more from the ground truth than the model trained on the expanded dataset (right).
Flood prediction accuracies during the iterative gradient-descent process. Surrogate models trained on the original dataset (left) deviate more from the ground truth than the model trained on the expanded dataset (right).
The simulation (left) and prediction (middle) of water depths on terrain modified by the gradient process (i.e., xt with t = 200, where t is the iteration index). The surrogate model trained on the expanded dataset (second row) deviates less than the one trained on the original dataset (first row) and thus makes more reliable suggestions to urban planners.
The simulation (left) and prediction (middle) of water depths on terrain modified by the gradient process (i.e., xt with t = 200, where t is the iteration index). The surrogate model trained on the expanded dataset (second row) deviates less than the one trained on the original dataset (first row) and thus makes more reliable suggestions to urban planners.
Comparing pluvial flood hazard reduction by modifying terrain elevations and building layouts
Example of modifying input urban patches by different gradient terms. Note that this is the same urban patch, as shown in Figure 4, and the building layout channel was re-binarized after the gradient-descent process (second row).
Example of modifying input urban patches by different gradient terms. Note that this is the same urban patch, as shown in Figure 4, and the building layout channel was re-binarized after the gradient-descent process (second row).
Comparing one-step and iterative gradient descent strategies
Performance indicators that compare the flood-reducing effect of the two experiments.
Performance indicators that compare the flood-reducing effect of the two experiments.
The first row of Figure 7 reports the difference and relative difference of mean HR for the multiple cases; the results show that both approaches can successfully reduce the overall pluvial flood hazard for most of the cases (between five and 20% in terms of relative difference of mean HR) and that the iterative method shows better performance than the one-step method; this can be seen by the smaller values of the two indicators in the first row of plots. Also worth noting is the fact that the one-step approach tends to increase areas with high HR (HR > 0.5), whereas the iterative method is able to decrease the overall HR (e.g., the difference in mean HR plot) while reducing the number of high HR.
The second and third rows present the size difference in the number of pixels before and after the gradient-descent process for low-HR (left side) and high-HR (right side) areas. The plots clearly indicate that the iterative method effectively eliminated most high-HR pixels, while the one-step method caused opposite effects and increased the number of high-HR pixels in many cases.
Flood surrogate models that are trained with different datasets produce different spatial patterns of terrain elevation changes. Despite the patterns being different, they all reduce the flood hazard of the case study area.
Flood surrogate models that are trained with different datasets produce different spatial patterns of terrain elevation changes. Despite the patterns being different, they all reduce the flood hazard of the case study area.
Spatial patterns by different surrogate pluvial flood models
In the experiments conducted in this study, it could be observed that different solutions were generated for the same input urban patch by surrogate pluvial flood models trained using different datasets. As can be seen, the (mean) HR within the selected AOI will, in most cases, be reduced. In this case, the AOI was automatically defined as the area with higher HR. However, the AOI can also be drawn manually by the user, representing a certain design area instead of a high-HR area (this can be seen as the moving white box in Figure 3 of the manuscript). As a result of introducing ‘artificial bumps’ to the terrain elevations, the model trained on the expanded training dataset constantly produced solutions that have ‘smaller’ elevation changes than those produced by that trained on the original dataset, regardless of the input urban patches or the gradient-descent process. In addition, all the solutions successfully reduced the flood hazards within the area of interest despite their difference in visual patterns. This indicates an interesting possibility of controlling and selecting the patterns of terrain modifications based on other criteria such as traffic- and construction-related design constraints. This feature is not covered in this study and will be explored in future research. Figure 8 shows an example of the different patterns on the same input data.
CONCLUSIONS AND POSSIBLE FUTURE RESEARCH DIRECTIONS
This study introduced a gradient descent formulation to automatically generate reduced pluvial flood hazard mapping during the early stages of urban planning and design. The proposed approach took advantage of the recent signs of progress in data-driven surrogate flood modeling and adopted a Convolutional Neural Network (CNN)-based surrogate flood model to rapidly compute the gradient of the design objective with respect to the input design parameters. The obtained gradients can be either visualized and used as spatial maps that guide the designer to modify their designs manually or used for gradient descent optimization to automatically modify the input conditions (e.g., topography and urban layout) for certain design objectives.
Two approaches were investigated: one in which a simplified one-step gradient-descent process was considered and a second one in which an iterative gradient-descent process was implemented. The one-step approach was found effective for dealing with fixed and predefined AOI regions, while the iterative approach allowed different AOIs to be specified in each iteration and found a balance between local and global flood hazard reduction. The proposed approach was trained on two training datasets in which one dataset was augmented by adding artificial terrain features to the original. The two surrogate flood models were compared using the same test dataset, and it was found that the model trained using the artificially augmented dataset was able to achieve higher prediction accuracy and could generate smaller but more effective elevation changes. In summary, the proposed approach shows the potential to be successfully used as an urban design tool to study pluvial flood-safe urban layouts.
Despite the promising results, the proposed approach has a few limitations that should be further addressed. First, it was tested on urban patches rather than entire catchment areas, and since the inlet flows from the upper stream areas may greatly alter the flooding pattern within the urban patches, it is necessary to further investigate whether the proposed approach can effectively obtain the gradient terms with respect to a much larger upstream area. Second, the proposed approach was more effective when modifying the terrain elevations rather than the building layouts. The gradient-descent process would always generate inproportionally large buildings within heavily flooded areas, which, compared with the complex terrain pattern that cannot be achieved by the designer's intuition, provided a rather small contribution to the design from the perspective of urban planning. Third, the presented study has also shown that the accuracy of the developed CNN-based flood surrogate model decreases during the iterative gradient-descent process, leading to invalid design outputs. The stability of prediction accuracy for the iterative process should be further improved. Finally, it is noteworthy to mention that the proposed method only considers changes in the urban layout (presence of buildings) and catchment (terrain) elevation; it does not consider the construction of a drainage network, which can also contribute to reducing pluvial flooding. This specific limitation can be considered as a future research direction, i.e., using the model results to determine the location of future drainage systems, as well as the impact of their implementation on reducing pluvial flood risk.
As for other possible future developments, one interesting direction could be to explore the different spatial patterns of elevation changes that have the same flood hazard reduction effects. This may be done by including additional design constraints in the design objective function so that the design can be made not only from a flood-controlling perspective but also from other aspects such as transportation systems, urban landscapes, and construction earthworks. The challenge in this research direction would be to formulate the design constraints into differentiable functions. Another interesting research topic would be to limit the area (i.e., pixels) in which the gradient descent operations are conducted. For example, avoiding elevation changes for existing buildings, roads, or other important infrastructures. This would be extremely helpful for applications that deal with the existing environment rather than new design proposals.
DATA AVAILABILITY STATEMENT
All relevant data are available from https://www.research-collection.ethz.ch/handle/20.500.11850/365484.
CONFLICT OF INTEREST
The authors declare there is no conflict.