A Country Wide Evaluation of Sweden's Spatial Flood Modeling With Optimized Convolutional Neural Network Algorithms

Flooding is one of the most serious and frequent natural hazards affecting human life, property, and the environment. This study develops and tests a deep learning approach for large‐scale spatial flood modeling, using Convolutional Neural Network (CNN) and optimized versions combined with the Gray Wolf Optimizer (GWO) or the Imperialist Competitive Algorithm (ICA). With Sweden as an application case for nation‐wide flood susceptibility mapping, this modeling approach considers ten geo‐environmental input factors (slope, elevation, aspect, plan curvature, length of slope, topographic wetness index, distance from river, distance from wetland, rainfall, and land use). The GWO and ICA optimization improves model prediction by 12% and 8%, respectively, compared with the standalone CNN model performance. The results show 40% of the land area, 45% of the railroad, and 43% of the road network of Sweden to have high or very high flood susceptibility. They also show the aspect to have the highest input factor impact on flood susceptibility prediction while, for example, rainfall ranks only seven of the total 10 considered geo‐environmental input factors. In general, accurate nation‐wide flood susceptibility prediction is essential for guiding flood management and mitigation efforts. This study's approach to such prediction has emerged as well‐performing and cost‐effective for the case of Sweden, calling for further application and testing in other world regions.

Earth's Future PANAHI ET AL.

10.1029/2023EF003749
2 of 23 99 million people around the world were affected by floods (Opolot, 2013), and the number of significant flood events has increased in recent decades (Kourgialas & Karatzas, 2011).
Increasing flood occurrence is often the result of human activities such as land-use change (e.g., urbanization and deforestation), inappropriate land management (e.g., overgrazing), and poor watershed management leading to reduced river flow capacity due to siltation (Ferreira et al., 2016;Panahi et al., 2022).Flooding is also caused by weather and climate conditions and their variability and change in combination with other natural factors such as geology, terrain morphology, and soil type (Burn & Whitfield, 2023;Kalantari et al., 2017).Due to complex interactions between these natural and anthropogenic factors, floods cannot be predicted using simple and linear models and empirical equations are often used to estimate peak and other characteristics of discharge (Bosznay, 1989;Fill & Steiner, 2003;Fuller, 1914;Sangal, 1983).Additionally, several conceptual and physically based models have been used for flood prediction, such as the Hydrological Modeling System (HEC-HMS), Identification of unit Hydrograph and Component flows from Rainfall, Evapotranspiration and Streamflow, and Soil and Water Assessment Tool (Mudashiru et al., 2021).Models based on catchment rainfall-runoff processes can predict continuous and event-based river discharge, but are not able to perform spatial flood mapping (G.B. Sahoo et al., 2009).Hydraulic models, such as HEC-RAS, can provide flood inundation maps with reasonable accuracy (Ferreira et al., 2020), based on flow velocity, discharge, and flow depth using river channel and flood plain morphology.However, hydraulic models require a vast amount of data with high accuracy and are time-consuming to run and, as such, not sufficiently useful for large-scale (e.g., country level) studies (Yalcin et al., 2011;Zounemat-Kermani et al., 2020).
The development of remote sensing technology, especially Interferometric Synthetic Aperture Radar (InSAR), is increasingly used to determine flood inundation areas in specific flood events (Fleischmann et al., 2021;Refice et al., 2014).However, susceptible areas for future flood occurrences still cannot be identified by sole use of InSAR and other remote sensing approaches.Such identification thus still remains a challenging task.
Data-driven bivariate statistical models, such as Frequency Ratio (FR), Weights Of Evidence and Shannon Entropy, have also been widely applied to flood modeling (Lee et al., 2012;Tehrany et al., 2015), but their use of historical flood modeling including also non-flooding locations can significantly impair model performance.In addition, these models are simple and often unable to predict flood-prone areas with high accuracy.In contrast, machine learning (ML) approaches have high flexibility and often can achieve high accuracy by considering non-linear relationships between geo-environmental input factors and historical flood data for predicting probabilities of flood occurrences (Gudiyangada Nachappa & Meena, 2020).
For example, Choubin et al. (2019) performed flood susceptibility analysis using three state-of-the-art models (Multivariate Discriminant Analysis [MDA], Classification and Regression Trees, and Support Vector Machine [SVM]), finding the MDA model to have the highest predictive accuracy.F. S. Hosseini et al. (2020) developed intelligent approaches involving Boosted Generalized Linear Model, Random Forest (RF), and Bayesian Generalized Linear Model for flood spatial modeling, all with >90% accuracy performance.Khosravi et al. (2018) developed four tree and Bayes theorem-based models (Logistic Model Trees, Reduced Error Pruning Trees, Naïve Bayes Trees, and Alternating Decision Trees) for flood susceptibility mapping, finding the ADT to outperform the other models.Ramayanti et al. (2022) developed Group Method of Data Handling (GMDH) and Convolutional Neural Network (CNN) models to generate a spatial map of coastal flooding in Mozambique, finding the CNN model to outperform GMDH.
Various ML models thus emerge as most well-performing in different case applications and recent studies have found that integration of several ML models can boost the modeling performance compared to that of standalone models (e.g., Bui et al., 2018;Nguyen, 2022;Pham et al., 2020;Rezaie et al., 2022).For example, Hong, Panahi, et al. (2018) found that the standalone Adaptive Neuro-Fuzzy Inference System (ANFIS) model was outperformed by ANFIS integrated with Genetic Algorithm and Differential Evolution metaheuristic algorithms for spatial flood modeling in China.Paryani et al. (2022) optimized the Support Vector Regression model using four metaheuristic methods (Harris HAWK Optimization, Particle Swarm Optimization, Gray Wolf Optimizer [GWO], and Bat Algorithm [BA]) to generate flood susceptibility maps for Kermanshah Province, Iran.Ahmadlou et al. (2019) used an optimized ANFIS model with Biogeography-Based Optimization (BBO) and BA algorithms for spatial flood modeling in Iran, finding the BBO model to be superior to other algorithms.In addition, they used a step-wise weight assessment ratio analysis approach to determine the role of each input factor class in flood occurrence.In general, deep learning (DL) algorithms have higher prediction power than conventional ML algorithms, especially for large data sets and investigated problems that involve complex processes (Khosravi et al., 2020).The prediction capability of DL models, like that of other neuron-based approaches (e.g., generalized additive model, ANFIS, SVM, RF, boosted regression tree), also depends strongly on the choices of weights in the membership functions and more generally on identifying the optimum values of the model hyperparameters (Dodangeh et al., 2020).Overall, given the large number of various possible ML models that can be used for flood studies, selecting the optimum model for a particular case or task is challenging.Today, CNN, as a subtype of DL algorithms, is widely used to generate flood susceptibility maps due its promising capability for automatically extracting low-and high-level features in input data (Bentivoglio et al., 2022;J. Liu et al., 2021;Shen, 2018;Zhao et al., 2020).The network architecture of CNN consists of some convolutional layers which enables it to reduce the dimensionality of input data without losing information.The layers provide flexibility in learning spatial hierarchies of features (Yamashita et al., 2018).Moreover, CNN uses shared weights and biases in the convolutional layers, which reduces the number of trainable parameters in the network, aids in avoiding overfitting and leads to improved generalization of the model (Ghosh et al., 2020;Zhang et al., 2023).Y. Wang et al. (2020) compared the predictive performance of SVM and CNN for detecting flood-prone areas in Shangyou County, China.The findings showed that integration of SVM with CNN for feature extraction, enhanced the reliability of flood susceptibility map.Panahi et al. (2021b) developed CNN and recurrent neural network (RNN) models to map flood-susceptible areas in Golestan Province, Iran.The study showed slightly better predictive performance of CNN compared with RNN model.In all the cited research, it was conclusively stated that the fine-tuning of hyperparameters in the CNN poses a primary challenge with substantial implications for the accuracy and reliability of results.To overcome this limitation, the utilization of metaheuristic algorithms has been proposed as a potential solution.
The main aim of the present study is to investigate the usefulness of the DL approach and CNN integration with GWO and imperialist competitive algorithm (ICA) algorithms for flood susceptibility mapping at large national scale.To this end, the study considers Sweden as a relevant, flood prone nation-wide case application to address the following main research questions: 1. Can the investigated DL approach accurately model spatial flood susceptibility at national scale?2. Can the CNN performance be boosted by optimized approaches using metaheuristic algorithms at this large scale?3. Which geo-environmental factors and subclasses of these are most relevant for flood occurrence modeling at this scale?4. For the case study of Sweden, which built-environment and infrastructure parts (including cities, railroads and roads) emerge as having high and very high susceptibility to flood occurrences?
In the following sections, the procedures for properly implementing of CNN, CNN-GWO, and CNN-ICA to generate flood susceptibility maps were reviewed.Subsequently, the results of using statistical metrics to assess the accuracy and reliability of maps were explained and the susceptibility to flooding for Swedish roads and railroads were calculated.To the best of our knowledge, there is currently no existing flood susceptibility map available for Sweden.The development of such a map holds significant potential for facilitating proper planning and management of flood hazards in the region.

Study Area
Sweden is part of the Scandinavian peninsula (Figure 1a), occupying an area of 450.295 km 2 and hosting a population of 10.5 million.It is the area-wise third largest country in the European Union and the fifth largest country in Europe.Its land surface is mainly covered by forests (including ancient forests and broadleaved woodlands), mountains and wetlands, which provide rich habitats for many endangered animals and birds.
Due to its large latitudinal extent, the Swedish climate is diverse, with a subarctic climate in the north, a humid continental climate extending over central parts, and a temperate climate in the south.Mean annual precipitation in Sweden ranges between 500 and 800 mm, with the south-west receiving the highest amount (1,000-1,200 mm), although some mountain areas in the north receive up to 2,000 mm annually (Climate, 2023).Spatial changes in precipitation are partially driven by elevation differences in the Swedish terrain (ranging between −57 and 2,077 m above sea level) (Figure 1b).Intense rainfall is an important factor for flooding.For example, on 18 August 2021, 162 mm of precipitation fell in one 24-hr event in the city of Gävle, with nearly 101 mm being recorded in the first 2 hr and causing major flooding (Davies, 2021;Murray, 2023).

Data Collection
As the first step in the modeling framework, historical flood inventory map (Figure 1c) showing flood locations in the period 2008-2021 were obtained from NASA (https://www.earthdata.nasa.gov/learn/find-data/near-realtime/modis-nrt-global-flood-product).The data set of these historical flood locations was used to examine the spatial relationships between flooded locations and flood-related geo-environmental factors, in order to understand the physics and dynamics behind flood occurrences in Sweden.In addition, this data set was used as the basis for the flood modeling with the investigated ML/DL approach.

Flood-Related Factors
Inclusion of relevant geo-environmental-related factors is a fundamental step in spatial flood modeling.The selection of factors in this study was based on a literature review and data availability (Janizadeh et al., 2021;Satarzadeh et al., 2021;Tien Bui et al., 2019).Slope, elevation, aspect, plan curvature, length of slope (LS), and topographic wetness index (TWI) were obtained directly from a digital elevation model of Sweden (with 50 m spatial resolution, downloaded from the Swedish Agricultural University: https://zeus.slu.se/get/?drop=get),using the tools available in the ArcGIS 10.8.2 software (www.esri.com).Distance from rivers and distance from lakes and wetlands were generated from river, stream and wetland area information for Sweden, by applying a buffer command to land use data from Copernicus Land Monitoring Service (https://land.copernicus.eu)for 2018.Long-term mean annual rainfall data  were obtained from the Swedish Meteorological and Hydrological Institute (SMHI) (https://www.smhi.se).Detailed information on the input data set for each factor is provided in Table 1.

Methods
The conceptual modeling framework used in the present study comprised data collection, data pre-processing, data preparation, modeling, flood map preparation, and model performance evaluation (Figure 2).These steps are described below.

Input Variable Selection
Two approaches to feature selection, Information Gain Ratio (IGR) and Multi-Collinearity Statistics (MCS), were applied in the data pre-processing to identify the best input combination among different geo-environmental factors and their inter-correlation recognition.

MCS
The MCS diagnosis approach was applied to identify the inter-dependence of considered geo-environmental factors (Figure 3).A high MCS value indicates that two variables are interdependent and thus modeling will not have generalization power and reliability of results.Two indices were used in the MCS analysis: tolerance and variance inflation factor (VIF).Overall, tolerance <0.1 and VIF >10 indicates multi-collinearity issues, implying that the considered factor should be removed from the modeling process (Hong, Tsangaratos, et al., 2018;Pal & Singha, 2021).

IGR
Feature selection by IGR was applied to assess data accuracy and remove noisy data (i.e., with small impact on the main hydrological response), by exploring the effectiveness of each input geo-environmental factor.A higher IGR value indicates which geo-environmental factor is more informative and provides larger contribution to modeling (Chapi et al., 2017;Fang et al., 2021;Panahi et al., 2021a).The IGR method, proposed by Quinlan (1986), is based on the decision tree approach and is defined as the ratio of information gain to the intrinsic information.IGR is able to reduce the bias associated with multi-value attributes, since irrelevant input data with low/null effectiveness reduce the modeling prediction power.IGR makes it possible to compute reduction in entropy or surprise from transforming a data set in some way.It evaluates the gain in each input parameter/ variable in the context of the target variable, so the calculation is referred to as mutual information between the two random parameter/variables: where T is the training data set, P represents the input geo-environmental parameters, and Split Entropy (T, P) is the information acquired by separating the flood potential factors in the training data set.IGR calculations were performed in the Waikato Environment for Knowledge Analysis (WEKA 3.9) software.

FR
The FR model was used to determine the importance of each class of each geo-environmental factor for flood occurrence.FR was calculated as: where FR values >1 indicate an effective contribution of the factor in flood occurrence, while values <1 indicate a less effective or unimportant factor.In addition, FR value for each class of each geo-environmental factor was used as input to the DL models to generate flood spatial maps.

Data Splitting
A 70:30 ratio in hold-out cross validation method was implemented for data splitting.This means that 70% of the historical flood locations (i.e., 98,962 pixels) were randomly selected and used for model training, while the remaining 30% (31,788 pixels) were used for model testing.Although there is no rule of thumb for separating training and testing data sets, 70:30 is the most widely used ratio in ML modeling.Kisi et al. (2019) also found that increasing the size of the training data set from 50% to 75% boosted model performance.
Regression-based and binary classification scheme are the two basic concepts in ML modeling, with binary classification scheme being the most frequently used approach for spatial natural hazard modeling, especially flood mapping.In this approach, historical flooded locations and non-flooded areas that are never inundated (e.g., hilly and mountainous areas) are both included (Ali et al., 2020;Tehrany et al., 2014;Zhao et al., 2020).Google-Earth software was used to delineate non-flooded pixels in hilly areas in Sweden.Similar to flooded locations, non-flooded locations were split 70:30 into two groups, for training and testing data sets.Then 70% of data from both flooded and non-flooded locations, each including 98,962 pixels, were combined to comprise

DL Algorithms
FR was used to explore the spatial relationship between classes of each geo-environmental factor and historical flood data.In addition, the well-known GWO and ICA algorithms were applied to optimize the CNN model through the ensemble technique in MATLAB 2022b, by determining accurate and optimum weights for CNN hyperparameters, which has a significant effect on model prediction power.

CNN
The CNN model is a regularized version of the multilayer perceptron algorithm based on the shared-weight architecture of convolution kernels or filters that can capture the spatial and temporal dependencies in the input data without human intervention (Albawi et al., 2017).In this algorithm, although each neuron in one layer is connected to all neurons in the next layer, there is automatic and adaptive learning of the hierarchical pattern in data from low to high level, and patterns of increasing complexity are assembled using smaller and simpler patterns embossed in their filters to prevent overfitting and achieve regularization (Asad et al., 2021;Li et al., 2015).A CNN model consists of an input layer, hidden layers, and an output layer.The hidden part comprises three main components, namely convolutional, pooling, and fully connected layers (Shajun Nisha & Nagoor Meeral, 2021).
Using multiple linear and nonlinear operations, convolutional layers are able to extract the main features through which their corresponding spatial information can be preserved (Zhu et al., 2018).In pooling layers, combining the outputs of neurons in the previous layer into a single neuron in the next layer leads to dimensionality reduction, controlling overfitting and reducing computational intensity (Mohseni-Dargah et al., 2022).The fully connected layers are used to integrate the features obtained from multiple previous layers to map the final output, identify the probabilities for each class, and learn the weights (Yamashita et al., 2018).The main advantage of the CNN model is its ability to capture the complexity of the input data and perform difficult compilations using a relatively small number of parameters (Roy & Desai, 2022;Sellat et al., 2022).However, hyperparameter selection strongly affects the predictive performance of CNN, and metaheuristic algorithms are increasingly being used to select optimum values for CNN hyperparameters (e.g., weights, learning rate, stride, filter size, number of layers), due to their capacity for exploitation and exploration, local optima avoidance, flexibility, and simplicity.

GWO
The social hierarchy and hunting mechanism of gray wolves was imitated to develop the GWO algorithm.The leadership hierarchy is simulated using four types of wolves (alpha [α], beta [β], delta [δ], and omega [ω]), and hunting behavior is modeled through searching for and tracking prey, encircling, and attacking the prey (X.Wang et al., 2022).The processes are mathematically modeled by considering the fittest solution as α, and the second and third candidate solutions are called β and δ, respectively.The remaining solutions are represented by ω, following the other wolves during hunting (optimization) (A.Sahoo et al., 2022).Encircling behavior is then started and modeled as (Mirjalili et al., 2014): where During hunting, three best solutions (α, β, and δ) estimate the position of the prey and its location is saved, and the other wolves are obliged to update their position randomly around the prey (Mirjalili et al., 2020): Hunting finishes by attacking the prey, which means decreasing the value of  ⃖ ⃗  .When  | ⃖⃖ ⃗ | < 1 , the wolves converge to attack the prey, whereas  | ⃖⃖ ⃗ | > 1 allows wolves to diverge from the prey and find new potential prey (Mirjalili et al., 2014).Finally, GWO is terminated on reaching a pre-defined number of iterations.Figure 4 illustrates the process of the GWO algorithm.

ICA
ICA is a swarm intelligence-based metaheuristic algorithm introduced to solve discrete and continuous complex combinatorial optimization problems (Atashpaz-Gargari & Lucas, 2007).First, ICA generates a random initial population (N pop ) called country.Some best countries having the lowest cost function values are named imperialist (N imp ) and the remainder are considered colonies (N col ) based on imperialist power.The normalized cost of the nth imperialist is given as: Larger cost (c i ) (smaller normalized cost) indicates a weaker imperialist country.The power of each imperialist is calculated as: The number of initial colonies possessed by the nth imperialist is indicated as: Colonies transfer between imperialists within the cultural state space.However, some colonies resist being absorbed by imperialists and revolution occurs, leading to an increase in exploration and prevention of early convergence to local minima (Barkhoda & Sheikhi, 2020).After assimilation and revolution operations are performed, if  _col < _imp then imperialist is swapped with colony.The power of an empire is indicated based on a fraction of the power of its colonies and the power of its imperialist: where ξ takes a value between 0 and 1.
Weaker empires gradually collapse during competition and their colonies are conquered by stronger empires.The process continues until stopping criteria are met (e.g., certain number of iterations, pre-defined running time).
The perfect stopping criterion is when only one (grand empire) remains and all other empires have collapsed (S.Hosseini & Al Khaled, 2014).Figure 5 illustrates the process of the ICA algorithm.

Flood Mapping
After executing of all three DL models (i.e., CNN, CNN-ICA, and CNN-GWO), the quantile classification technique was used to classified the flood susceptibility map into five classes namely very low, low, moderate, high, and very high.Quantile classification was selected as appropriate and practical since the distribution of flood probability in a histogram showed skewness (Akgun, 2012).Moreover, the quantile method involves grouping an equal number of pixels (or area) into each class.This approach is preferable to the commonly used natural breaks method, where certain classes might have excessive or limited number of values (Gudiyangada Nachappa et al., 2020;Gudiyangada Nachappa & Meena, 2020;Tang et al., 2018;Tehrany et al., 2019).After generating the flood susceptibility map, flooding was analyzed for each Swedish province and the percentage of road and railroad networks in different flood susceptibility classes was calculated in ArcGIS software.
Evaluation of model performance is a crucial step for model generalization power and its quality and accuracy (Chung & Fabbri, 2003).In this study, the error indicators mean square error (MSE) and square root MSE (RMSE) were used for model performance evaluation and comparison.They are calculated as: where Q obs and Q pre are actual/observed and predicted floods, respectively, and N is the number of data (i.e., flood locations).MSE is a commonly used metric for assessing regression model quality, averaging squared differences between predicted and actual values.Since MSE involves squaring the errors, it magnifies larger errors, making it effective for evaluating predictive ability of models used data set with significant outliers.Conversely, RMSE is derived from the square root of MSE, offering an understandable measure of average error magnitude in the dependent variable's units.Utilizing both metrics provides comprehensive assessment: MSE can provide a detailed understanding of how well DL model is performing in terms of minimizing errors and RMSE gives a more straightforward and easily interpretable measure of the average error magnitude.Therefore, employing MSE and RMSE is a widespread approach for assessing the accuracy and reliability of flood susceptibility map generated through DL algorithms (Hong, Panahi, et al., 2018;Pham et al., 2021aPham et al., , 2021b;;Razavi Termeh et al., 2018;Shahabi et al., 2021).Since both indicators are based on error assessment, they cannot be used alone and should be considered along with other error metrics.Therefore, in this study the widely used receiver operating characteristic (ROC) was applied for model evaluation, due to its generality and comprehensibility in the training and testing phases.The ROC curve is a graphically-based plot where the Y-axis shows true positives (correctly predicted flood points), while the X-axis shows false positives (flood points incorrectly identified as non-flood).
True positive rate = TP TP + FN (14) where TP, FN, FP, and TN represent true positive, false negative, false positive, and true negative, respectively.
Since each model was developed from the training data set, the MSE, RMSE, and area under the ROC curve (AUC) values for the training phase showed goodness of model fit to the data used.In turn, results obtained during the testing phase showed good accuracy of model prediction of flood probability occurrence.The AUC value varies between 0.5 and 1, was used for quantitative model evaluation (AUC = 1 in a perfect model).
Collinearity between factors, especially those that are highly correlated, was further investigated through MCS diagnosis.Based on the results (Table 2), there is not any multicollinearity among involved parameters/variables.
The spatial relationship between each class of each flood-related factor and the historical flood data was analyzed using the FR method (Figure 6).Elevation classes do not exhibit any distinct importance or pattern, indicating that elevation is not a highly effective factor for flood occurrence in Sweden, as also indicated by the IGR results.
In terms of slope, the class with values lower than 0.9° has the highest impact (FR = 2.77) on flood probability occurrences, with increasing values being associated with decreasing importance for flood occurrence.High flood susceptibility areas are located in flat areas (FR = 2.94), while north aspect has the lowest effect on flood occurrence.Flat curvature has a significant effect on flooding (FR = 1.05), followed by convex (FR = 0.62) and concave (FR = 0.49) shapes.TWI has a positive impact on flood probability occurrence, with values higher than 14.5 having a considerable impact on flooding in Sweden (FR = 2.17).Distance of less than 978 m from a river and distance less than 100 m from a lake or wetland area have strong impacts on flood occurrence.Rainfall less than 600 mm per year is associated with higher probability of flood occurrence.Regarding land use, wetlands have a significant effect on flooding (FR = 5.65), followed by bare soil (FR = 1.72), urban (FR = 1.38), moss and lichen (FR = 0.67), snow and ice (FR = 0.56), shrubs (FR = 0.54), forest (FR = 0.47), herbaceous vegetation (FR = 0.45), and arable agriculture (FR = 0.15).

Flood Susceptibility Maps
Most of Sweden, especially in the north and some parts of the center and southeast, emerges as having high susceptibility to flood occurrence (Figure 7).The results indicate flood susceptibility to be greater in lowland areas, with flat ground slope, and downslope of highland areas with high rainfall.
Figure 10 provides detailed information regarding flood susceptibility in the three major cities of Sweden: the capital Stockholm and the cities of Gothenburg and Malmo.Malmo emerges as the city most susceptible to flooding, with 68% of the area having high or very high susceptibility and only 18% low or very low susceptibility (Figures 10e and 10f).Half of the city of Stockholm (50%) has high or very high susceptibility to flooding, while only 27% has low or very low susceptibility (Figures 10a and 10b).Most of Gothenburg has low or very low susceptibility to flooding (53%), and the lowest percentage (31%) of area with high or very high susceptibility to flooding (Figures 10c and 10d).
Flood susceptibility is shown to affect a considerable part of the Swedish road and rail networks, with 43% and 45% having high/very high susceptibility, and only 37% and 36% having low/very low flood vulnerability, respectively (Figure 11).2021) classification, the optimized versions of CNN show very good performance (0.8 < AUC < 0.9), while the standalone model shows good performance (0.7 < AUC < 0.8).

Discussion
Flood occurrence is increasing due to climate change and human activities (Malekinezhad et al., 2021).Flood prevention is possible, but relies on implementation of mitigation measures in the susceptible areas, to enhance   their resilience and adaptation, and thus minimize the loss of human life and the socio-economic and environmental impacts.A vital step in flood mitigation is to delineate the flood-prone areas.

Input Variables for Modeling Flood Susceptibility
Topography plays an important role for flood susceptibility, with slope and LS identified as the strongest determining factors in the study case of Sweden.Flooding is more likely in areas with low slope (<0.9°) and LS (<0.1) (Figure 6).Similarly, Khosravi et al. (2016) found that slope degree has the highest impact on flood occurrence in Haraz Watershed in northern Iran.
Land use is identified as another important factor in flood occurrence across Sweden, in consistency with findings for other countries, such as Iran (Khosravi et al., 2020).Wetlands are depressional areas with low infiltration and stored water (Mahato et al., 2021) and, as such, they emerge as areas most susceptible to flooding (Figure 6).Overall, our results show that mismanagement of land uses within watersheds can drive flooding,  Wetlands in Sweden occupy 4.3 million hectares (10% of total land area) (https://www.gbif.se/ipt/resource?r=nvvmi).Distance from wetlands emerges as a relevant factor for flooding in Sweden, with areas less than 100 m from wetlands being most prone to flooding.Bare land surfaces are also highly prone to flooding, as they are typically associated with low infiltration rates (e.g., Narimani et al., 2021;Paul et al., 2019).Urban land is the third largest land use in Sweden and emerges as susceptible to flooding (Figure 6).Urban areas include different proportions and arrangements of sealed surfaces (e.g., roads, parking lots), with several hydrologic impacts, including decreasing infiltration and increasing surface runoff, and thereby enhancing flood susceptibility (e.g., Pal & Singha, 2021;Stamellou et al., 2021).Figure 15 shows some examples of flooding in urban settlements on river banks and at the centerline of rivers due to lack of proper spatial planning.In fact, distance from river is also a relevant factor for flood susceptibility (Figure 6), but Sweden does not plan for managing water flows-and therefore floods-at river basin level (Johannessen, 2017).
Although rainfall is generally considered the key source of flooding, it ranked only 7 of the 10 geo-environmental factors investigated in this study (Figure 6).This is consistent with previous findings of increased frequency of high-runoff events, driven by human land-use developments, even under decreasing precipitation in parts of Sweden (Destouni & Verrot, 2014).It is also consistent with relatively weak correlations found between precipitation and runoff in studies over Europe (Ghajarnia et al., 2020) and the world (Ghajarnia et al., 2021).In part, the relatively small effect of rainfall on floods may also depend on the spatial rainfall distribution, with more rainfall being concentrated in highlands and mountainous areas while lowland areas are generally more flood-prone (Khosravi et al., 2020).Several studies have also shown the intensity of rainfall to be more important than rainfall amount for flood occurrence (Georganta et al., 2022).For example, according to SMHI, the Swedish city of Gävle recorded 161.6 mm of rain within 24 hr on 18 August 2021, of which 101 mm fell in just 2 hr.Such high rainfall intensities have high probability of causing flash floods, which indeed also happened in this case.
It should be mentioned that although rainfall is a significant driver of flooding, it is influenced by other factors such as topography, land use, and soil properties.Indeed, the main reason of lowing IGR for rainfall is resulting from this fact that most part of Sweden especially in borders (west and north) is mountainous, and by increasing the elevation, rainfall is increase while flood occurrences is reducing.
Among the 10 geo-environmental factors identified as relevant for flood occurrence in Sweden, elevation is the least important.This may be due to the special topography of Sweden, which is characterized by gentle ground slope even in moderate elevation areas.Other studies have identified elevation as an extremely relevant factor for flooding, for example, Cao et al. (2020), Chakrabortty et al. (2021), Malik et al. (2020), andWaqas et al. (2021).

DL for Flood Susceptibility Mapping
In previous studies using a DL approach, Khosravi et al. (2020) applied the CNN model for spatial flood modeling at national scale in Iran and found 15% of the country to be highly or very highly susceptible to future flood events.Lei et al. (2021) applied CNN and RNN models for flood hazard mapping in Seoul city, South Korea, considering 295 flooded locations in the city during heavy rainfall and several geo-environmental Overall, these studies are consistent with our findings of DL models as accurate for flood modeling at local and national scale.According to the literature review, all developed DL models in flood delineating areas have a high performance and can be considered as a cost-effective and reliable tool in flood modeling and mapping, especially for large scale areas, like the current study.In most of the cases, inputs are approximately similar and developed models are the same, but the discrepancies in modeling performance are mostly resulting from flood historical data quality and its distribution.

Limitations and Future Research
The geo-environmental factors considered in this study were selected based on data availability, but other factors such as rainfall intensity and early spring snowmelt have been identified in previous studies as relevant for flooding.Future studies should therefore also consider rainfall intensity, for example, with values derived from radar data, as additional input for the ML modeling and investigate the impact of this factor in spatial flood modeling.Snowfall and snowmelt effects on flood susceptibility, especially in early spring, should also be considered in further ML modeling, for example, quantified via remote sensing techniques, in particular for Sweden and similar regions where much precipitation is in the form of snow.In previous works, Voigt et al. (2003) studied the role of snowmelt forecasting in operational flood warning for the Rhein-Felsberg basin in Switzerland, while D. Liu et al. (2016) assessed integration of snow-covered area, snow-depth retrieval, snowmelt runoff, hydrology and assessment of disaster risk in developing a new risk assessment framework for snowmelt flooding in Xinjiang, China.
The present study has assessed flood susceptibility considering only inland factors, but coastal flooding is also an important problem, including in Sweden with its long coastline (https://thinkhazard.org/en/report/236-sweden/ CF).In future work, ML modeling, which can be applied to large areas, can be combined with physically based models, which can determine flood depth and flood velocity, for also investigating this type of flooding.

Conclusions
The use of a DL algorithm (CNN) and two optimized versions (CNN-GWO and CNN-ICA) for this study's flood susceptibility mapping at national scale shows Sweden to be a flood-prone country, in consistency with its experience of numerous flood occurrences in recent years.Delineating its most flood-prone areas, as done by the DL modeling in this study, is a vital step for establishing appropriate national flood management plans.
The data required for this spatial flood modeling includes historical flood locations and 10 geo-environmental flood-related factors, evaluated for 130,750 pixels over Sweden.
The main study findings can further be summarized as follows: 1. Optimization techniques improved the performance of the standalone CNN model, with GWO and ICA improving the prediction power by around 12% and 8%, respectively.2. The CNN-ICA model performed best in mapping the flood-susceptible areas around Sweden, followed by CNN-GWO and standalone CNN. 3. Slope emerged as the most effective factor for the flood occurrence modeling, while elevation had the lowest impact.
10.1029/2023EF003749 20 of 23 4. Around 18% and 20% of the land area of Sweden is identified as highly and very highly susceptible to flood occurrence, respectively.The most affected areas were in the north, some central parts, and the southeast of the country.5. Of the three most populous Swedish provinces, Gotland has the highest area part with high/very high flood susceptibility, while Jönköping has the lowest.Of the three major Swedish cities, Malmo has the highest flood susceptibility (in 68% of its area).6. Around 43% of the entire Swedish road network has high to very high flood susceptibility, and 20% has moderate susceptibility.For the railroad network, the corresponding values are 45% and 19%.
Overall, the optimized DL approaches were cost-effective and practical to use for delineating and quantifying the nation-wide flood susceptibility over Sweden.As such, they emerge as worthy of further application and testing for spatial flood modeling also in other world regions.In general, the flood susceptibility maps resulting from DL models can accurately pinpoint highly and very highly flood-prone areas and thereby help watershed managers and decision-makers to improve flood mitigation and adaptation and prevent flood damage.The DL models developed in this study can be tested and applied in other countries and regions.

Figure 1 .
Figure 1.(a) Sweden, the case study area, (b) variation in elevation, and (c) location of past floods used for modeling.

Figure 3 .
Figure 3. Input geo-environmental flood-influencing factors included in the modeling framework.

Figure 4 .
Figure 4. Process of the gray wolf optimizer.

Figure 5 .
Figure 5. Process of the imperialist competitive algorithm.

Figure 6 .
Figure 6.Importance of geo-environmental factors for flooding, based on the Frequency Ratio method.

Figure 8 .
Figure 8. Percentage of Sweden's terrain within different flood susceptibility classes according to the convolutional neural network (CNN), CNN-GWO, and CNN-ICA models.

Figure 9 .
Figure 9. Percentage of flood-susceptible areas in each province of Sweden.
Based on MSE and RMSE values, CNN-GWO outperformed the other models in both the training and testing phases, followed by CNN-ICA and then the standalone CNN model (Figures12 and 13).The optimized versions of the CNN model (CNN-GWO and CNN-ICA) also show the lowest range of error distribution for the training and evaluation phases.Similarly, in terms of AUC value, the CNN-GWO model (AUC = 0.85 [training] and 0.83 [testing]) outperforms CNN-ICA (AUC = 0.82, 0.80), and CNN (AUC = 0.77 and 0.74) in both the training and testing phases (Figure 14).According to the Arora et al. (

Figure 10 .
Figure 10.Estimated flood susceptibility in the three major Swedish cities: Stockholm (a, b), Gothenburg (c, d) and Malmo (e, f).

Figure 11 .
Figure 11.Susceptibility to flooding of (a) Swedish provinces, (b) Swedish roads, and (c) Swedish railways, according to the convolutional neural network (CNN)-GWO model.

Figure 14 .
Figure 14.Model performance in the (a) training and (b) testing phase, evaluated based on AUC.

Table 2
Results of Multi-Collinearity Statistics Test for the 10 Geo-Environmental Factors