Highlights
What are the main findings?
- A multi-source-driven GWO–RF–XGBoost model predicts soil salinity at multi-depth profiles.
- Distinct drivers control salinity at different soil layers, including NDVI, moisture, TDS, and pH.
What are the implications of the main finding?
- The framework enables fine-scale salinity risk mapping and mechanistic understanding in coastal agroecosystems.
- This transferable, interpretable approach supports targeted mitigation and sustainable land management in salinity-prone regions worldwide.
Abstract
Soil salinization is an escalating global concern threatening agricultural productivity and ecological sustainability, particularly in coastal regions where complex interactions among hydrological, climatic, and anthropogenic factors govern salt accumulation. The vertical differentiation and spatial heterogeneity of salinity drivers remain poorly resolved. We present an integrated modeling framework combining ensemble machine learning and spatial statistics to investigate the depth-specific dynamics of soil salinity in the Yellow River Delta, a vulnerable coastal agroecosystem. Using multi-source environmental predictors and 220 field samples harmonized to 30 m resolution, the hybrid Gray Wolf Optimizer–Random Forest–XGBoost model achieved high predictive accuracy for surface salinity (R2 = 0.91, RMSE = 0.03 g/kg, MAE = 0.02 g/kg). Spatial autocorrelation analysis (Global Moran’s I = 0.25, p < 0.01) revealed pronounced clustering of high-salinity hotspots associated with seawater intrusion pathways and capillary rise. The results reveal distinct vertical control mechanisms: vegetation indices and soil water content dominate surface salinity, while total dissolved solids (TDS), pH, and groundwater depth increasingly influence middle and deep layers. By applying SHAP (SHapley Additive Explanations), we quantified nonlinear feature contributions and ranked key predictors across layers, offering mechanistic insights beyond conventional correlation. Our findings highlight the importance of depth-specific monitoring and intervention strategies and demonstrate how explainable machine learning can bridge the gap between black-box prediction and process understanding. This framework offers a generalizable framework that can be adapted to other coastal agroecosystems with similar hydro-environmental conditions.
1. Introduction
Soil salinization, a major environmental challenge affecting arid and coastal regions worldwide, results from the excessive accumulation of soluble salts in the soil profile [1]. This process significantly reduces soil fertility, limits agricultural productivity, and disrupts ecosystem stability, posing severe threats to food security, land sustainability, and water resource management [2]. Coastal regions, in particular, are highly vulnerable due to their unique hydrological and geological conditions, which facilitate seawater intrusion, capillary rise, and groundwater salinity accumulation [3]. The interplay between natural processes (e.g., evaporation, groundwater movement, and tidal influences) and anthropogenic activities (e.g., intensive irrigation, land use modifications, and groundwater overextraction) has exacerbated salinization, making it increasingly difficult to reclaim affected lands [4]. Despite ongoing mitigation efforts, the ability to accurately predict soil salinity distribution and identify key environmental drivers remains limited due to the complex, heterogeneous, and dynamic nature of coastal soil salinization processes [5].
Traditional assessment approaches, including field surveys, conventional remote sensing indices, and classical geostatistical interpolation, provide valuable large-scale information but often have limited capability to characterize fine-scale spatial variability or nonlinear interactions among soil, groundwater, and climatic factors [6,7]. Many existing studies rely on statistical correlation analyses or empirical models, which lack predictive robustness when applied to large-scale or highly variable landscapes [8]. Recent advancements in machine learning (ML) and ensemble modeling techniques have provided new opportunities for high-resolution spatial prediction of soil salinity, offering enhanced accuracy and adaptability to diverse environmental settings [9,10,11]. Although machine learning has been increasingly applied to soil salinity prediction, several methodological limitations persist in existing studies [12]. First, many ML-based models treat soil observations as independent samples and overlook spatial autocorrelation and local clustering [13], which can lead to biased feature importance and inflated prediction accuracy [6,14]. Second, feature selection and hyperparameter tuning are often conducted through heuristic or manual procedures, resulting in suboptimal model generalization [15]. Third, most studies rely on global feature importance metrics and rarely incorporate hierarchical SHAP interpretation or spatial statistics to reveal nonlinear, depth-dependent, and spatially non-stationary relationships between environmental drivers. These limitations suggest that the integration of optimized feature selection, spatial autocorrelation diagnostics, and deep interpretable learning remains underdeveloped in current salinity modeling studies. Evolutionary and other biologically inspired algorithms offer effective tools for addressing high-dimensional, nonlinear optimization problems that commonly arise in environmental modeling. These algorithms iteratively refine candidate solutions by simulating collective behaviors observed in natural systems, which enables flexible search capabilities beyond traditional heuristic tuning. Such optimization strategies have been increasingly used to enhance feature selection and hyperparameter configuration in machine learning applications where multi-source environmental variables interact in complex ways [16].
The Yellow River Delta (YRD), China, serves as an ideal case study due to its high susceptibility to soil salinization, complex hydrological processes, and intensive agricultural land use [17]. As one of the youngest and most dynamic coastal deltas globally, the YRD is characterized by low-lying topography, saline groundwater, and extensive seawater intrusion, making it a representative site for investigating the mechanisms driving coastal soil salinization [12]. In the YRD, previous studies have mainly focused on remote sensing inversion, geostatistical interpolation, or single-algorithm ML prediction, but have seldom examined depth-resolved salinity mechanisms or groundwater–soil interactions [18,19]. Furthermore, almost no studies combine spatial autocorrelation analysis with multi-layer SHAP interpretation to quantify how dominant drivers shift across soil profiles or to explain the emergence of salinity hotspots under coupled hydrological processes. Thus, a unified framework that integrates ensemble machine learning, feature optimization, spatial statistics, and hierarchical explainability is still lacking for the YRD [20,21].
This study introduces a unified ensemble learning framework to predict soil salinity patterns and identify their primary environmental controls across stratified soil layers in coastal landscapes. Focused on the Yellow River Delta, one of the most vulnerable salt-affected regions globally, the framework integrates the Gray Wolf Optimizer (GWO), Random Forest (RF), and Extreme Gradient Boosting (XGBoost) to couple predictive precision with interpretability [16,22,23]. GWO is used to refine feature selection and model hyperparameters, RF captures nonlinear interactions among environmental variables, and XGBoost enhances model generalization and stability. Beyond standard modeling, the framework incorporates spatial statistical diagnostics—including Moran’s I and Getis-Ord Gi*—to capture spatial clustering and reveal how salinization propagates under interacting ecological and hydrological processes. By fusing multi-source inputs, including remote sensing indices, groundwater attributes, and soil physicochemical parameters, the model delivers high-resolution insights into the spatial heterogeneity and depth-dependent dynamics of salinity accumulation. The objectives of this work are threefold: (1) to characterize the spatial variability of soil salinity across surface, middle, and deep horizons; (2) to quantify the key drivers influencing salinization at different depths; and (3) to develop an interpretable, high-fidelity modeling tool that informs salinity risk mapping and soil resource management. This integrated approach advances current methodologies by linking data-driven predictions with process-based insights, and provides a transferable solution for salinization monitoring and mitigation in coastal and arid regions under intensifying land and climate pressures.
2. Materials and Methods
2.1. Study Area
The Yellow River Delta is located in the northeastern part of Shandong Province, along the southern coast of the Bohai Bay, spanning from 37°35′ to 38°12′N and 118°33′ to 119°20′E. The delta radiates in a fan-shaped pattern with Ninghai in Kenli County at its apex, extending northward to the mouth of the Tiao’er River and southward to the Zimai River estuary, covering a total area of approximately 5450 square kilometers.
Formed by the deposition of massive sediment loads carried by the Yellow River into the Bohai Bay, the delta is characterized by a flat alluvial plain with an elevation generally below 15 m. The dominant soil types are coastal saline soils and tidal soils, with widespread soil salinization posing significant challenges. Land use is primarily composed of agricultural and unused land, and agricultural productivity is constrained by salinity-related soil degradation. The region experiences a warm temperate, semi-humid continental monsoon climate with four distinct seasons. The annual mean temperature is approximately 12.1 °C, and the average annual precipitation is around 551.6 mm, with rainfall predominantly occurring in the summer. Spring is dry and windy, summer is hot and rainy, autumn is crisp and clear, while winter is cold and dry. The Yellow River is the principal river in the region, transporting vast amounts of sediment that contribute to ongoing land accretion at a rate of approximately 20 to 30 square kilometers per year. Groundwater resources are limited, with shallow aquifers exhibiting high salinity, leading to freshwater scarcity. The delta supports a unique wetland ecosystem, recognized as one of the most extensive, youngest, and ecologically intact warm temperate wetlands in China. It serves as a critical stopover, wintering ground, and breeding habitat for migratory birds along the East Asia–Australasian Flyway, making it a hotspot of biodiversity in Northeast Asia and the Western Pacific region.
2.2. Sampling and Analysis
A total of 220 soil monitoring sites were established across the study area (Figure 1), covering 19 counties (or county-level cities and districts) within Dongying, Binzhou, Weifang (Hanting District, Shouguang City, Changyi City), Dezhou (Leling City, Qingyun County), Zibo (Gaoqing County), and Yantai (Laizhou City). The monitoring network was designed using a grid-based layout, with the entire area overlaid by 3 km × 3 km grids. Sampling sites were positioned at the center of each grid cell, excluding water bodies and built-up areas, and were slightly adjusted on-site based on terrain conditions and accessibility.
Figure 1.
Study area location and sampling design. (a) Overview map of China; (b) Regional location of Shandong Province; (c) Spatial distribution of soil monitoring points within the study area.
Soil sampling was conducted during the dry season from May to June 2024, a period selected to minimize the influence of short-term rainfall fluctuations on soil moisture. All sampling activities were carried out after at least three consecutive rain-free days to ensure that soil moisture conditions reflected stable field conditions rather than transient wetting from precipitation. Sampling across all 220 sites was completed within a two-week window, and each site was sampled on a single date rather than at multiple time points. These procedures ensured that the measured soil moisture content represented spatial differences among locations rather than inconsistencies arising from sampling timing or meteorological variability. At each monitoring site, soil samples were collected at three depths (0–20 cm, 20–40 cm, and 40–60 cm) using a soil auger. Samples were sealed in labeled Ziplock bags and transported to the laboratory for pretreatment, which included air-drying, crushing, and sieving through a 1 mm mesh. Approximately 1 kg of soil was collected per depth, and the samples were split into two subsamples: one for determining soil moisture content and the other for laboratory analyses of soil properties.
Soil moisture content was determined using the gravimetric method in accordance with ISO 11465. Electrical conductivity (EC) and pH were measured using a 1:5 soil-to-water suspension following ISO 11265 and ISO 10390, respectively. For EC determination, 20 g of soil was mixed with 100 mL of deionized water, stirred for 5 min, allowed to settle for 30 min, and measured using a conductivity meter (DDS-307A, Shanghai LeiCi, Shanghai, China). Soil pH was determined using a pH meter (PHS-3E, Shanghai LeiCi). Soil organic matter content was quantified using the potassium dichromate oxidation method following ISO 14235. Particle-size distribution (sand, silt, and clay fractions) was analyzed using a Malvern MS3000 laser diffraction particle size analyzer, following procedures consistent with ISO 11277, which specifies the determination of particle-size distribution in mineral soils.
2.3. Data Sources
The study used multiple environmental datasets representing vegetation conditions, land surface characteristics, climatic factors, groundwater attributes, and soil salinity observations. All datasets are open-access or freely available through public repositories and were processed to a unified spatial resolution of 30 m under a consistent projection.
(1) Remote sensing data
Vegetation and soil surface reflectance indicators were derived from GF-1 WFV and Landsat 8 OLI imagery. NDVI was calculated from GF-1 WFV data (16 m resolution) provided by the China Centre for Resources Satellite Data and Application (https://data.cresda.cn/ accessed on 15 May 2025) after atmospheric correction using the FLAASH module and resampling to 30 m.
To complement the GF-1-derived NDVI and enhance the representation of salinity-related surface conditions, three additional multispectral indices (SAVI, GDVI, and CRSI) were extracted from Landsat 8 Collection 2 Level-2 surface reflectance imagery. Cloud and shadow pixels were masked using the QA_PIXEL bitmask, and a median composite for the growing season was generated. Together with NDVI, these four spectral indices were used to capture vegetation response and salinity-induced spectral variability. The corresponding formulas are as follows:
NDVI represents vegetation greenness and overall canopy vigor. SAVI reduces the influence of soil background in sparsely vegetated saline areas. GDVI enhances vegetation stress signals caused by salinity and moisture deficits. CRSI emphasizes the brightness of salt-affected bare soils and salt crusts. All indices were extracted at the sampling locations and used as additional predictors in the ensemble model.
(2) Land use and land cover data
Land use and land cover (LULC) data were acquired from the Geospatial Data Cloud of China (http://www.gscloud.cn, accessed on 15 May 2025). The dataset includes major land use classes such as cropland, unused land, built-up land and water bodies. LULC data were resampled to 30 m and used to provide contextual information on land management patterns and human–environment interactions influencing soil salinity distribution.
(3) Digital elevation data
Elevation, slope, and topographic indices were extracted from a 30 m Digital Elevation Model (DEM) obtained from the Geospatial Data Cloud of China (http://www.gscloud.cn, accessed on 15 May 2025). All terrain-based factors were derived using standard GIS tools and resampled to match the spatial resolution of the other datasets.
(4) Climatic variables
Long-term mean annual precipitation (2000–2025) and evapotranspiration were obtained from the China Meteorological Data Service Center (http://data.cma.cn, accessed on 15 May 2025). Precipitation was provided at 0.1° resolution and resampled to 30 m. These variables characterize atmospheric moisture inputs and climatic gradients relevant to salinity accumulation.
(5) Groundwater data
Groundwater table depth and total dissolved solids (TDS) were collected from monitoring wells operated by the Shandong Provincial Groundwater Monitoring Network. Measurements spanned 2015–2024 with a monthly time step. All point data were interpolated to 30 m resolution using inverse distance weighting (IDW).
(6) Soil measurements
Soil salinity for shallow (0–20 cm), middle (20–40 cm), and deep (40–60 cm) layers was measured from 220 field sampling sites. Samples were analyzed for EC1:5 conductivity in the laboratory following standard protocols (NY/T 1121.13–2006).
(7) Dataset harmonization
All raster datasets were projected to CGCS2000 and resampled to a common spatial resolution of 30 m using bilinear interpolation for continuous variables and nearest-neighbor resampling for categorical variables.
2.4. Spatial Autocorrelation Analysis
Spatial autocorrelation analysis is grounded in Tobler’s First Law of Geography, which posits that “everything is related to everything else, but near things are more related than distant things.” The core objective is to quantify the spatial distribution characteristics of a given variable to determine whether a geographical phenomenon exhibits spatial clustering or dispersion [24]. First, the presence of overall spatial clustering of soil salinity across the study area was assessed using the Global Moran’s I index. Subsequently, Local Moran’s I statistics were employed to identify spatial clusters and outliers, such as hotspots, coldspots, and spatially discrete areas, thereby delineating high-risk and low-risk zones of soil salinization. To enhance the accuracy of the spatial autocorrelation analysis, a spatial weight matrix incorporating distance-decay weighting was optimized [25]. Global spatial autocorrelation evaluates the overall spatial pattern of a variable across the entire study area. The most commonly used indicator is Global Moran’s I, calculated as follows:
where is the number of observations; and are the values of the variable in regions and , respectively; is the mean of the variable; is the spatial weight between regions and ; and is the sum of all spatial weights.
Local spatial autocorrelation is used to detect local clusters or anomalies in spatial data, and is typically evaluated using Local Moran’s I (LISA), defined as [26]:
where represents the global variance of the variable, and other terms are as previously defined.
2.5. Methodology
The GWO-RF-XGBoost model is an advanced ensemble learning approach that integrates Gray Wolf Optimizer (GWO), Random Forest (RF), and Extreme Gradient Boosting (XGBoost) with an adaptive weighted fusion mechanism. This hybrid methodology aims to enhance predictive accuracy, reduce model bias, and optimize feature selection for complex environmental datasets such as multi-depth soil salinity prediction. The model operates in three key phases: (1) feature selection and hyperparameter optimization using the GWO; (2) predictive modeling based on RF and XGBoost; and (3) convex-weighted ensemble fusion of the RF and XGBoost predictions. By combining metaheuristic optimization, ensemble learning, and adaptive fusion, the GWO-RF-XGBoost model captures nonlinear interactions between soil properties, hydrological factors, and climatic influences with superior generalization capabilities. The overall methodological workflow is summarized in Figure 2.
Figure 2.
Methodological workflow integrating GWO-based feature selection, hyperparameter optimization, and ensemble learning for depth-specific soil salinity prediction.
In order to ensure a rigorous and unbiased optimization process, the full dataset was divided into a training set and an independent testing set using an eighty percent to twenty percent split. Only the training set was used within the optimization loop of the Gray Wolf Optimizer. The GWO procedure simultaneously executed two tasks. The first task was the search for an optimal subset of predictive features, and the second task was the optimization of the hyperparameters of both Random Forest and Extreme Gradient Boosting. During each iteration, candidate solutions generated by GWO were evaluated using fivefold cross validation on the training set, and the mean validation error served as the fitness metric. After convergence, the optimal feature subset and hyperparameter configuration were used to train the final RF and XGBoost models. Model performance was evaluated exclusively on the testing set to prevent overfitting and avoid information leakage.
2.5.1. Gray Wolf Optimizer (GWO) for Feature Selection and Hyperparameter Tuning
The Gray Wolf Optimizer (GWO) is a nature-inspired metaheuristic optimization algorithm that mimics the leadership hierarchy and cooperative hunting mechanism of gray wolves [27]. It is employed to select the most important features and optimize hyperparameters of RF and XGBoost to enhance predictive performance.
In the GWO framework, each search agent is encoded as a position vector that contains a binary feature selection part and a continuous hyperparameter part. The feature selection component is a binary vector where 0 indicates exclusion and 1 indicates inclusion of a predictor. Continuous values generated by GWO are converted to binary values using a threshold of 0.5.
The hyperparameters optimized for Random Forest include the number of trees (100–500), maximum tree depth (2–20), and minimum samples required for node splitting (2–20). For Extreme Gradient Boosting, the optimized hyperparameters include the learning rate (0.01–0.08), maximum depth (2–20), and subsampling ratio (0.5–1.0). These parameters were selected because they influence model complexity and generalization the most, while non-optimized parameters remained at their standard default values. Any value generated outside the allowable range was projected back to the nearest boundary to ensure valid candidate solutions. The following configuration was adopted for the GWO procedure: a population size of 30 wolves, a maximum of 100 iterations, and a search dimension equal to the combined number of selected features and hyperparameters. The control parameter decreases linearly from 2 to 0 during optimization, and the random coefficient vectors and are drawn from a uniform distribution between 0 and 1. Convergence is achieved when the maximum iteration number is reached or improvements in the fitness value fall below for 5 consecutive iterations.
GWO ranks input features based on their contribution to model performance using a fitness function defined as the minimization of prediction error:
where is the actual surface soil salt content, is the predicted value from RF/XGBoost.
The movement of wolves (solutions) in the search space is defined as follows:
where represents the best solution (alpha wolf), is the current solution at iteration The adaptive coefficient vectors and regulate the balance between exploration and exploitation. The decreases linearly from 2 to 0 over the optimization process, and and are random vectors drawn from a uniform distribution in . All vector operations are performed element-wise.
The movement of wolves in the search space follows the standard GWO position updating equations, and the fitness of each candidate solution is evaluated using the root mean square error between observed and predicted soil salinity. The optimization goal is to minimize RMSE:
where is the number of observations.
2.5.2. Random Forest (RF) and Extreme Gradient Boosting (XGBoost) for Prediction
Random Forest (RF) is an ensemble learning method that constructs multiple decision trees and aggregates their outputs [28]. For a given input feature set , the RF model constructs trees, where each tree produces an output . RF reduces variance by aggregating predictions from multiple trees trained on bootstrapped datasets [29]. The final RF prediction is the average of all trees:
XGBoost builds trees sequentially, where each tree corrects the residual errors from the previous iteration [30]. For an initial prediction , XGBoost updates the prediction iteratively. The objective function for XGBoost is as follows:
where is the new tree fitted to residuals, is the learning rate; represents the complexity penalty for tree regularization.
2.5.3. Convex-Weighted Ensemble Fusion
To obtain a single robust prediction while preserving the complementary strengths of the two optimized base learners, we adopted a convex-weighted fusion strategy. Unlike an unconstrained linear regression, which may yield negative coefficients or extrapolative combinations, the convex formulation ensures physical interpretability and restricts the ensemble to a meaningful weighted average of the two model outputs. Specifically, the final ensemble prediction is defined as:
where and denote the predictions of the GWO-optimized RF and XGBoost models, respectively. The weight is constrained to lie within , ensuring that both ensemble coefficients are non-negative and sum to unity:
The optimal weight was determined by minimizing the mean squared error (MSE) between the ensemble predictions and the observed soil salinity in the training set:
A fine-grid search over the unit interval () was used to obtain the optimal solution. This simple but robust convex combination avoids instability caused by negative or unbounded regression coefficients and produces globally interpretable fusion weights.
2.5.4. Model Evaluation and Performance Metrics
To ensure the reliability and robustness of the GWO-RF-XGBoost model, a comprehensive evaluation framework was employed. Model performance was assessed through a combination of statistical error metrics, cross-validation techniques, and spatial analysis of residuals. Key evaluation indicators included root mean square error (RMSE), mean absolute error (MAE), and the coefficient of determination (R2), which collectively quantify the model’s predictive accuracy, bias, and explanatory power. First, fivefold cross-validation was performed within the training set. RMSE, MAE, and R2 were computed independently for each fold, and their fold-averaged values were used to monitor convergence and prevent overfitting during hyperparameter optimization. Second, the final models were retrained on the full training set with the optimal hyperparameters and evaluated on the held out test set, which was not used at any stage of model tuning. In addition, spatial visualization tools such as error distribution maps and residual analysis were utilized to evaluate the spatial heterogeneity of prediction errors. RMSE reflects the standard deviation of the residuals (prediction errors), offering an overall measure of the discrepancy between predicted and observed values, with greater penalties for larger errors [31]. R2 indicates the proportion of variance in the response variable explained by the model, serving as a measure of its explanatory strength. The error metrics were computed using the observed soil salinity (), the model-predicted values (), the total number of samples (), and the mean of observations ().
The relevant evaluation metrics are defined as follows:
2.5.5. SHAP-Based Feature Interpretation
Although Random Forest and Extreme Gradient Boosting provide built in measures of feature importance, these measures represent global averages and do not capture sample specific interactions or depth specific responses. In addition, tree based importance metrics may be biased toward features with more split opportunities or greater variability. SHAP was therefore adopted to obtain consistent and locally accurate explanations of how each predictor contributes to the salinity predictions at different soil depths. SHAP enables the decomposition of individual predictions into additive contributions, which provides a more transparent interpretation of driver importance and supports the analysis of spatially and vertically heterogeneous salinization processes [32]. SHAP is a game-theoretic approach that assigns each feature an importance value for a particular prediction, offering both global and local explanations of model behavior [3]. In this study, SHAP values were computed for the trained XGBoost models using the TreeExplainer module, which is specifically optimized for decision tree ensembles. To formally define the contribution of individual features to the model prediction, the SHAP value for feature is computed based on the concept of Shapley values from cooperative game theory [33]. Given a model , and a feature subset not containing , the SHAP value of feature for instance is calculated as:
where denotes the full set of features; is a subset of features not including feature ; is the model prediction when only features in are known (others are marginalized); represents the average marginal contribution of feature across all possible subsets .
This formulation ensures additivity and consistency: the sum of all SHAP values equals the difference between the prediction and the average model output:
where is the expected model output across all samples, and is the total number of features.
By applying SHAP to the XGBoost models trained in this study, the feature attribution for each sample was obtained, enabling both global importance ranking and sample-specific interpretation of salinity drivers across soil layers. For each soil layer (surface, middle, and deep), SHAP heatmaps were generated to visualize the variation in feature influence across all samples. The heatmaps allowed identification of depth-specific dominant factors and the directionality of their influence (positive or negative SHAP values). The use of SHAP enables not only the ranking of variables by their contribution magnitude but also the detection of complex, nonlinear interactions that are otherwise difficult to interpret from model coefficients alone.
All spatial and statistical analyses were conducted using Python 3.9 and ArcGIS 10.8. Spatial autocorrelation, including global Moran I and local LISA clustering, was computed with the PySAL 2.7 library in Python. The Random Forest and XGBoost models were implemented using the scikit learn 1.2 package and the XGBoost 1.7 package. The Gray Wolf Optimizer was implemented with the “mealpy” optimization framework and was applied to calibrate the hyperparameters of the ensemble model. Groundwater depth and total dissolved solids were interpolated from monitoring wells using the inverse distance weighting method in ArcGIS 10.8. The interpolation was performed with a power parameter of 2 and a grid cell size of 30 m to maintain consistency with the spatial resolution of the environmental predictors. The final model parameters obtained after optimization are as follows. For the Random Forest model, the number of trees was 500, the maximum tree depth was 20, the minimum number of samples per leaf was 2, and the maximum number of features was set to the square root of the total predictor count. For the XGBoost model, the optimal settings were a learning rate of 0.05, 800 boosting rounds, a maximum tree depth of 8, a subsampling ratio of 0.8, and a column subsampling ratio of 0.8. The Gray Wolf Optimizer used a population size of 30 and 80 iterations during hyperparameter tuning.
3. Results
3.1. Statistical Characteristics of Soil Salinization
To characterize the overall level and vertical variability of soil salinity, descriptive statistics of salt content in shallow, middle, and deep soil layers were calculated for all sampling sites (Table 1). Mean salinity values differed markedly among the three layers, ranging from 1.72 to 2.46 g/kg. The shallow layer exhibited the highest mean salinity (2.46 g/kg), whereas the middle layer showed the lowest mean value (1.72 g/kg), with the deep layer presenting an intermediate level (1.76 g/kg). The wide ranges between minimum and maximum values in all layers, particularly in the shallow soil where salinity reached up to 33.568 g kg−1, indicate the coexistence of low-salinity backgrounds and localized high-salinity hotspots, reflecting pronounced spatial heterogeneity across the study area.
Table 1.
Descriptive statistics of soil salinity across the three soil layers (g/kg).
Variability metrics further highlight strong contrasts among soil layers. The shallow layer displayed the largest standard deviation (5.31 g/kg) and the highest coefficient of variation (CV = 2.16), indicating extremely heterogeneous salinity conditions near the surface. Similarly, the middle layer also showed substantial variability (CV = 1.75), though lower than that of the shallow layer. In contrast, the deep soil layer exhibited a relatively smaller standard deviation and the lowest CV (1.56), suggesting comparatively more stable salinity conditions at depth. Notably, the median values in all layers were substantially lower than their corresponding means, particularly in the shallow layer, indicating strongly right-skewed distributions driven by a limited number of high-salinity observations.
From a vertical perspective, salt content did not show a monotonic increase or decrease with depth. Instead, the shallow layer was characterized by the highest average salinity and the strongest variability, while salinity decreased markedly in the middle layer and remained relatively stable in the deep layer. This pattern suggests that near-surface soils are strongly influenced by episodic salinization processes, such as evaporation concentration, capillary rise, and anthropogenic disturbances [34]. The reduced variability and lower mean salinity observed in deeper soils imply a stronger control by relatively stable groundwater conditions and long-term subsurface transport processes. Overall, the vertical distribution of soil salinity reflects the combined effects of surface-driven salt accumulation and subsurface hydrological regulation, leading to pronounced heterogeneity in shallow soils and comparatively buffered conditions at depth [35].
In addition to soil salinity, several physicochemical soil properties were analyzed to provide a comprehensive understanding of the environmental conditions influencing salinization across the study area. Table 2 summarizes the descriptive statistics of soil moisture, pH, organic matter, and particle-size composition for all sampling sites. Soil moisture exhibits a wide range from 4.56 percent to 32.46 percent with a mean value of 15.64 percent, reflecting substantial variations in water retention across locations. Soil pH varies between 4.70 and 9.12 and shows an overall alkaline tendency with a mean of 8.13. Organic matter content ranges from 1.66 to 39.03 g/kg and displays considerable spatial heterogeneity. The particle-size fractions also demonstrate marked variability, with sand content ranging from 0.02 to 471.11 g/kg, silt content from 79.00 to 980.71 g/kg, and clay content from 10.00 to 472.19 g/kg. Such heterogeneity suggests diverse soil structures and water holding capacities across the region.
Table 2.
Descriptive statistics of soil physicochemical properties across the three sampled soil layers.
To further examine the relationships among soil properties and their potential influence on salinity accumulation, a Pearson correlation matrix was constructed (Figure 3). Soil water content shows a moderate positive correlation with pH (r = 0.31), indicating that wetter soils tend to be more alkaline. Organic matter is weakly negatively correlated with pH (r = −0.22), while its correlations with soil moisture and textural fractions are negligible (|r| < 0.11), suggesting a largely independent spatial variability. Soil texture exhibits strong internal associations, with sand content showing pronounced negative correlations with both silt (r = −0.93) and clay (r = −0.89), whereas silt and clay are positively correlated (r = 0.66). Overall, these relationships highlight soil texture and moisture conditions as the primary controls on the physicochemical background of soils in the study area.
Figure 3.
Pearson correlation matrix of soil physicochemical properties across all sampling sites.
3.2. Spatial Patterns of Soil Salinity and Environmental Factors
3.2.1. Spatial Distribution of Soil Salinity
To assess the spatial characteristics of soil salinity at different depths, soil samples from shallow, middle, and deep layers were analyzed across the study area. The results revealed significant spatial and vertical heterogeneity in salinity distribution (Figure 4). In the shallow soil layer, salinity ranged from 5 g/kg to 30 g/kg, with localized high-salinity zones reaching up to 30 g/kg. These high-salinity areas were primarily concentrated in the northern part of the study area, exhibiting pronounced spatial clustering, whereas the southern and eastern regions had relatively lower salinity levels. The accumulation of salts in the shallow layer is likely driven by surface evaporation, shallow groundwater salinity, and anthropogenic activities such as agricultural irrigation, which can exacerbate salinization. The middle soil layer exhibited salinity values ranging from 2.5 g/kg to 20 g/kg, with slightly lower overall levels compared to the shallow layer. High-salinity zones in the middle layer partially overlapped with those in the shallow layer and were mainly distributed in the northern and central regions. The southeastern part of the study area showed relatively low and spatially uniform salinity. Salt distribution in the middle layer is likely influenced by upward movement of groundwater and localized salt migration, while areas with reduced salinity may reflect the diluting effect of freshwater infiltration. In the deep soil layer, salinity ranged from 2.5 g/kg to 17.5 g/kg, with a narrower distribution range and generally lower levels than the upper layers. High-salinity zones in the deep layer were more spatially limited, primarily appearing in small areas in the north, whereas most other regions, especially in the south and southeast, exhibited low salinity levels. Salinity in deep soils appears to be predominantly controlled by subsurface hydrodynamics, with reduced influence from evaporation and increased freshwater recharge contributing to lower salt concentrations.
Figure 4.
Spatial distribution results of different layers of soil in the study area. (a) Spatial pattern of shallow soil salinity (0–20 cm); (b) Spatial pattern of middle soil salinity (20–40 cm); (c) Spatial pattern of deep soil salinity (40–60 cm).
Overall, soil salinity in the study area displayed a clear vertical gradient, with levels following the pattern: shallow > middle > deep. This distribution indicates that salt accumulation is most pronounced in the shallow layer, driven by surface evaporation, shallow groundwater salinity, and agricultural practices. In contrast, salinity in the middle and deep layers is mitigated by freshwater dilution and lower levels of human disturbance. High-salinity zones in shallow and middle layers were concentrated in the northern and central regions, while the deep layer’s high-salinity areas were more spatially constrained, suggesting a degree of vertical connectivity between the upper layers. The generally low salinity observed in the southern and southeastern parts of the study area may be due to favorable drainage conditions and relatively higher elevations. Furthermore, the spatial distribution of salinity in the deep layer was more homogeneous, reflecting the stabilizing influence of subsurface hydrological conditions.
The calculated Global Moran’s I index for shallow soil salinity was 0.2467, with a significance level of p = 0.001, indicating a statistically significant positive spatial autocorrelation. This suggests that areas with high salinity tend to be surrounded by other high-salinity areas, and similarly, low-salinity regions are adjacent to areas of low salinity. Such spatial clustering implies that the distribution of soil salinity in the study area is not random but is instead shaped by underlying environmental processes. However, the relatively low absolute value of Moran’s I indicates weak global spatial autocorrelation, possibly due to pronounced local heterogeneity in soil salinity levels.
The Local Moran’s I analysis further revealed distinct spatial clustering patterns of shallow soil salinity (Figure 5). Based on spatial association types, the study area was categorized into four types: High-High (H-H) clusters, where both the focal point and its neighbors exhibit high salinity, were mainly located in the northern region, likely influenced by shallow groundwater salinity accumulation, low elevation, and strong evaporation. Low-Low (L-L) clusters, where both focal points and neighbors had low salinity, were concentrated in the southern periphery, likely associated with higher elevation, more effective leaching, and favorable drainage conditions. High-Low (H-L) clusters represented high-salinity points surrounded by low-salinity areas, possibly resulting from localized sources such as saline water bodies or anthropogenic inputs. Low-High (L-H) clusters had low salinity at the focal point but were surrounded by high-salinity neighbors, potentially indicating transitional zones affected by lateral salt migration.
Figure 5.
Local Moran’s I cluster map of shallow soil salinity.
The spatial autocorrelation patterns observed in the study area highlight the combined influence of natural and human-induced factors on soil salinity distribution. Terrain, groundwater salinity, and climatic conditions likely play dominant roles in determining salinity levels, with H-H clusters potentially indicating high-risk zones of salinization and L-L clusters representing low-risk areas more favorable for agricultural use. Anthropogenic activities such as irrigation, drainage practices, and land use changes may enhance local heterogeneity, leading to the emergence of H-L and L-H patterns.
3.2.2. Multi-Factor Spatial Distribution Characteristics
Each subfigure illustrates the spatial distribution of a specific environmental variable relevant to soil salinization. Variables measured at the 220 field sampling sites, including soil salinity, soil moisture, pH, organic matter, and particle-size fractions, were visualized using inverse distance weighting interpolation to generate continuous spatial surfaces. In contrast, NDVI, elevation, and slope were obtained directly from satellite imagery and DEM raster datasets without interpolation. The resulting spatial patterns exhibit clear geographic heterogeneity across the study area and provide important context for interpreting the distribution of soil salinity (Figure 6).
Figure 6.
Spatial distribution characteristics of different factors. (a) Surface soil salt content; (b) Middle soil salt content; (c) Deep soil salt content; (d) Soil pH; (e) Organic matter content; (f) Soil water content; (g) Sand content; (h) Silt content; (i) Clay content; (j) Elevation; (k) Slope; (l) Total dissolved solids (TDS); (m) Normalized Difference Vegetation Index (NDVI); (n) Groundwater depth; (o) Distance from shore; (p) Rainfall; (q) Soil Adjusted Vegetation Index (SAVI); (r) Green Difference Vegetation Index (GDVI); (s) Canopy Response Salinity Index (CRSI); (t) Land use type.
Surface, middle, and deep soil salinity levels were generally higher in the northern and parts of the central region, indicating potential soil salinization in these zones. Deep soil salinity showed relatively stable patterns, while surface and middle layers exhibited greater variability, likely due to stronger influence from external factors such as rainfall and evaporation. Organic matter content was higher in localized areas, possibly reflecting the effects of vegetation cover and soil type. Water content and particle size distribution (sand, silt, and clay fractions) showed pronounced spatial variability. Notably, sand and silt contents displayed opposing spatial patterns, suggesting different depositional environments across the region.
Topographic variation, represented by elevation and slope, was relatively minor, with the terrain being generally flat. However, areas with steeper slopes were identified and may influence surface runoff and erosion processes. Total dissolved solids (TDS) and groundwater depth exhibited spatial gradients, potentially driven by groundwater recharge dynamics, evaporation, and anthropogenic factors such as groundwater extraction. Climatic input, represented by long-term rainfall, shows a gradual spatial transition, which may regulate leaching and dilution of salts during the wet season. Land use type exhibits strong spatial fragmentation, with cropland concentrated in the central agricultural belt and unused land more common in low-lying or highly saline zones. These patterns highlight the contribution of human activities and land management to soil salinity development. Remote sensing–derived indices provide additional surface information linked to vegetation condition and soil reflectance. NDVI and SAVI show higher values over well-vegetated cropland and lower values in saline–bare areas, indicating the suppressive effect of salinity on vegetation growth. GDVI captures more subtle differences in vegetation vigor, while CRSI highlights the brightness of salt crusts and bare saline soils. Together, these spectral indices enhance the identification of areas experiencing vegetation stress or surface salt accumulation.
3.3. Correlation and Interactions Between Soil Salinity and Environmental Factors
The correlation heatmap provides a comprehensive overview of the interrelationships among environmental, hydrochemical, climatic and remote sensing variables influencing soil salinization, groundwater dynamics and coastal geochemical processes (Figure 7). Strong positive correlations were observed among surface, middle, and deep soil salinity (r > 0.9), indicating vertical continuity in salinization and suggesting that similar driving forces—such as capillary rise, evaporation, or seawater intrusion—operate across soil depths. Total dissolved solids (TDS) in groundwater showed moderate positive correlations with soil salinity (r ≈ 0.3), supporting the hypothesis that groundwater salinity contributes to soil salinization through water–soil interactions.
Figure 7.
Pearson correlation between soil salinization and influencing environmental factors.
Organic matter content was significantly negatively correlated with soil salinity (R < −0.4), implying that regions with higher organic content tend to exhibit lower salinity levels. This relationship may be attributed to the enhanced water-holding capacity of organic-rich soils, which reduces evaporative salt accumulation. Soil pH showed weak positive correlations with salinity (r ≈ 0.16–0.23), indicating that salinity and alkalinity tend to co-occur in the coastal plain. This pattern reflects the accumulation of alkaline salts under strong evaporation and limited leaching. Groundwater depth was only weakly correlated with soil salinity (r ≈ −0.1 to −0.2), indicating that while shallow water tables may contribute to salt accumulation, other factors such as soil texture and evaporation rates may play a more dominant role [36].
Soil texture parameters—including sand, silt, and clay content—exhibited complex relationships with both salinization and groundwater dynamics. Sand content was strongly negatively correlated with silt (−0.93) and clay (−0.89), reflecting expected particle-size trade-offs, where finer materials replace coarser sand grains. Silt and clay contents were moderately positively correlated (r ≈ 0.66), potentially influencing soil permeability and water retention, and thereby affecting salt and moisture availability. Elevation was negatively correlated with pH (r ≈ −0.69) and weakly correlated with other soil properties, suggesting that low-lying areas are more prone to alkaline conditions, possibly due to prolonged waterlogging and mineral dissolution.
The normalized difference vegetation index (NDVI) was moderately negatively correlated with soil salinity (r ≈ −0.5), indicating that vegetation growth is inhibited in areas with elevated salinity. This is consistent with previous findings that excessive salt concentrations hinder root water uptake, leading to reduced vegetative cover. TDS was also negatively correlated with NDVI (r ≈ −0.36) and weakly correlated with groundwater depth (r ≈ −0.2), suggesting that saline groundwater may impact vegetation health even in the absence of direct relationships with groundwater table depth. Distance from the coastline showed positive correlations with clay and silt content (r ≈ 0.53 and 0.32, respectively), indicating that finer sediments tend to be deposited farther inland due to coastal hydrodynamic processes. Moreover, distance from the coast was negatively correlated with TDS (r ≈ −0.5), supporting the notion that groundwater salinity decreases with increasing inland distance, consistent with the attenuation of seawater intrusion.
Climatic variables also contributed to salinity patterns. Rainfall showed weak to moderate negative correlations with soil salinity (r ≈ −0.20 to −0.26), indicating that areas receiving higher precipitation tend to exhibit reduced salt accumulation, likely due to enhanced leaching during the wet season. Remote sensing variables provided additional insights into surface vegetation responses. NDVI, SAVI and GDVI were moderately negatively correlated with soil salinity (r ≈ −0.48 to −0.53), reflecting vegetation stress in salt-affected zones. CRSI exhibited the strongest negative correlations with salinity among all spectral indicators (r ≈ −0.55 to −0.57), highlighting its sensitivity to bright bare soils and salt crusts. These consistent negative relationships confirm that vegetation indices are reliable indicators of salinity-induced ecological degradation. Land use type showed moderate positive correlations with soil salinity (r ≈ 0.40–0.47), suggesting that severely saline zones are more likely to be associated with unused or degraded land, whereas croplands are distributed in areas with relatively lower salinity levels. This reinforces the importance of human land management in shaping spatial salinization patterns.
3.4. Model Performance, Spatial Prediction, and Feature Contributions
3.4.1. Model Accuracy Evaluation
Figure 8a compares the predictive performance of the five evaluated models, including Standard RF, Standard XGBoost, GWO RF, GWO XGBoost, and the convex weighted GWO-RF-XGBoost ensemble, using RMSE, MAE, and R squared as evaluation metrics. Both Standard RF and Standard XGBoost exhibit relatively high RMSE and MAE, indicating that the absence of parameter optimization limits their predictive capability. The introduction of the Gray Wolf Optimizer improves both algorithms because it enhances the search for optimal hyperparameters and strengthens the representation of nonlinear relationships, particularly for XGBoost. The ensemble model yields the lowest RMSE and MAE and achieves the highest R squared value of 0.91, demonstrating a clear improvement over the individual learners. This improvement results from the use of a convex weighted fusion strategy, in which a single pair of non-negative global weights is optimized by minimizing the training set mean squared error. These global weights are applied uniformly across all samples, ensuring that the ensemble operates as an interpretable and stable weighted average rather than relying on sample specific adaptive weighting. Through this strategy, the ensemble benefits simultaneously from the noise tolerant characteristics of RF and the strong nonlinear approximation capability of XGBoost, producing a predictor that is more reliable and more generalizable.
Figure 8.
Comparison of machine-learning model performance for surface soil salinity estimation. (a) Statistical accuracy metrics (RMSE, MAE and R2) for the five tested models. (b–f) Predicted–observed relationship plots for all models, with the ideal 1:1 prediction line shown in red.
Figure 8b–f provide faceted scatterplots comparing predicted and observed soil salinity for each model separately. This faceted design improves interpretability by avoiding point overlap that occurred when all models were plotted together. The convex-weighted ensemble (Figure 8f) adheres most closely to the 1:1 reference line, reflecting reduced systematic bias and improved predictive precision across the full salinity range. The individual models (Figure 8b–e), particularly Standard RF and Standard XGBoost, show greater dispersion and a tendency to underperform at higher salinity levels, where prediction uncertainty typically increases. The tighter clustering of ensemble predictions at both low and moderate salinity levels indicates that the combined model more effectively integrates the influences of soil texture, groundwater dynamics, and surface environmental conditions. Minor deviations observed above 25 g/kg likely stem from the limited number of highly saline samples in the dataset and the inherent heterogeneity of hydrogeochemical processes in extremely saline environments [37]. Overall, Figure 8a–f demonstrate that the convex-weighted GWO-RF-XGBoost ensemble markedly improves predictive accuracy, reduces residual variance, and provides enhanced stability relative to the other approaches evaluated in this study.
3.4.2. Model Result Prediction
Figure 9a presents the spatial distribution of predicted surface soil salinity (g/kg) generated by the optimized GWO-RF-XGBoost ensemble model. The spatial pattern reveals distinct clusters of high salinity, particularly in the north-central and southeastern regions of the study area. These zones are likely influenced by seawater intrusion, groundwater salinization, and soil evaporation processes—key drivers of salt accumulation in coastal and semi-arid environments. The high-salinity areas, although relatively sparse, are sharply defined, suggesting that localized factors such as upward groundwater movement, capillary rise in saline water, or irrigation with brackish water may be contributing to salt accumulation. In contrast, much of the study area exhibits low salinity levels, implying more favorable drainage conditions, fresh groundwater recharge, or efficient leaching processes.
Figure 9.
Prediction results of the model: (a) predicted surface soil salt content; (b) spatial distribution characteristics of prediction errors.
Low-salinity zones (≤5 g/kg, indicated in dark blue) dominate the southwestern, western, and portions of the southeastern regions, suggesting good soil permeability, effective salt leaching, or locations of active groundwater recharge. These areas may also reflect zones of high hydrological connectivity, enabling the removal of salts via surface runoff or lateral groundwater flow. Conversely, localized hotspots (≥25 g/kg, shown in red) identify zones with high potential for severe salinization. These high-salinity zones—mainly in the northern, central, and southeastern parts—are likely associated with upward saline groundwater movement, where capillary action draws water to the surface, followed by evaporation and salt deposition. The clustering of high-salinity patches implies the presence of shallow saline groundwater tables, a common feature in coastal and semi-arid settings. Clay-rich soils, with their low permeability, may also contribute to salinity buildup due to limited infiltration and enhanced retention in the root zone. These regions often correspond to low-lying topography, which may function as evaporation basins, exacerbating moisture loss and salt accumulation. In contrast, sandy or loamy soils exhibit better drainage capacity, reducing the risk of salt buildup, and may account for the lower salinity observed in the southwest and west.
Extensive low-salinity areas (dark blue zones) dominate much of the landscape, particularly in the southwest, west, and parts of the southeast. These soils are typically more permeable, allowing salt to be effectively flushed into deeper layers. Vegetation also plays a role: plant roots can improve soil structure and permeability while transpiration reduces water content, thus limiting surface salt accumulation. The spatial heterogeneity observed in Figure 9a underscores the necessity of high-resolution modeling techniques, such as the GWO-RF-XGBoost ensemble, which captures complex nonlinear interactions among hydrological, soil, and climatic variables influencing salinity distribution.
Figure 9b displays the spatial distribution of prediction errors. Most residuals are centered around zero, confirming the model’s high predictive accuracy. However, some localized zones exhibit marked overestimation or underestimation, revealing potential limits in the model’s generalizability. A combined interpretation of the predicted soil salinity map (Figure 9a) and the spatial pattern of residuals (Figure 9b) provides key insights into the spatial variability of salinity and the robustness of the machine learning model. The high accuracy and spatially constrained nature of the residuals indicate that the GWO-RF-XGBoost model effectively captures the underlying salinity distribution. Nonetheless, the presence of localized errors suggests that incorporating additional spatial predictors—such as remote sensing indices (e.g., NDVI, soil moisture) or groundwater geochemical parameters—could further refine model performance.
3.4.3. SHAP-Based Interpretation of Depth-Dependent Salinity Drivers
The SHAP-based heatmaps (Figure 10) reveal a clear vertical stratification in the controlling factors of soil salinization, consistent with previous findings that salinity drivers differ markedly across soil horizons [37,38]. In surface soils, variables related to vegetation activity and moisture regulation—such as organic matter, NDVI, and water content—dominate the predictive model, highlighting the influence of biotic processes and surface hydrology. This aligns with field-based observations in coastal croplands of the Yellow River Delta, where shallow salt accumulation is largely modulated by evapotranspiration and biomass productivity [39].
Figure 10.
SHAP-based heatmaps of the top 12 predictors for soil salt content across three soil depths: surface (a), middle (b), and deep (c) layers. The curve labeled f(x) above each heatmap represents the model output (predicted soil salt content) for each sample, i.e., the SHAP expectation function (). SHAP values quantify the marginal contribution of each predictor to the deviation of from the baseline prediction. Warmer colors indicate positive contributions (increasing predicted salinity), whereas cooler colors indicate negative contributions.
In contrast, TDS, pH, and groundwater depth emerge as key predictors in middle and deep layers, suggesting that geochemical leaching and groundwater intrusion play a greater role with depth. Similar vertical transitions have been reported in estuarine alluvial plains, where deeper salinization is often attributed to long-term seawater intrusion and solute migration through capillary rise [40]. The relative consistency of SHAP values in deeper layers further supports this mechanistic decoupling between surface-driven and subsurface-driven processes. NDVI maintains a significant role across all depths, indicating its value as an integrative proxy for salinity stress, especially in regions lacking dense monitoring networks. This echoes conclusions from recent remote sensing studies that NDVI, though indirect, effectively captures cumulative salinity effects due to its sensitivity to chlorophyll degradation and canopy reduction [41,42]. Overall, our results underscore the necessity for depth-specific salinity management, where interventions targeting vegetation and irrigation may suffice for surface recovery, but hydrogeological solutions such as groundwater control or barrier design are essential for deep soil reclamation. This nuanced perspective provides new evidence supporting multi-layered remediation strategies in salinity-prone coastal environments.
4. Discussion
4.1. Depth Dependent Mechanisms of Soil Salinity in the Yellow River Delta
The vertical differentiation of soil salinity across the study area indicates that different mechanisms govern salt accumulation at different depths. Surface soil salinity shows strong sensitivity to vegetation conditions and soil moisture, reflecting the rapid response of the shallow root zone to evapotranspiration and salt concentration processes. In addition, the SHAP analysis indicates that organic matter is the dominant driver of surface-layer salinity. Higher organic matter improves soil structure and water-holding capacity, which suppresses evaporative salt accumulation in the topsoil. Although NDVI primarily reflects shallow vegetation dynamics, its influence extends to deeper soil layers because vegetation-mediated transpiration and root-induced preferential flow can modify deep soil moisture and vertical salt redistribution. Similar patterns have been reported in coastal agricultural systems, where vegetation indices serve as reliable indicators of near surface salinity because of their direct physiological reaction to salt stress [15].
In the middle and deeper soil layers, salinity is more strongly related to groundwater depth, total dissolved solids, and pH. These subsurface horizons are less influenced by short term surface processes and respond more strongly to longer term groundwater–soil interactions, capillary upward movement, and saline groundwater intrusion. Studies from other coastal deltas have similarly emphasized the dominant role of groundwater conditions in shaping subsurface salinity profiles, particularly where shallow aquifers and strong evaporative demand prevail [20].
The spatial clustering patterns identified in the high salinity zones provide additional evidence of hydrological control. Areas with shallow groundwater levels and elevated dissolved solids consistently coincide with salinity hotspots, suggesting a spatially organized salinization process rather than random dispersion. Comparable clustering has been observed in deltaic regions affected by seawater intrusion [6], reinforcing the importance of groundwater regulated mechanisms in the Yellow River Delta.
4.2. Methodological Insights and Implications for Salinity Assessment
The integrated modeling framework applied in this study demonstrates several methodological advantages for understanding salt dynamics in complex coastal landscapes. The optimized ensemble learning approach captures nonlinear relations between environmental predictors and soil salinity, while maintaining high predictive accuracy across soil layers. The use of spatially explicit predictors at consistent resolution ensures that fine scale heterogeneity is preserved, which is critical in regions where salinity formation is influenced by both natural and anthropogenic processes.
Interpretation based on SHAP provides transparent insight into the contribution of individual variables and reveals how controlling factors change with soil depth. This depth specific interpretability extends beyond the global importance metrics commonly used in previous studies [14] and offers a more nuanced understanding of the mechanisms behind salinity development. In addition, incorporating spatial autocorrelation analysis allows the identification of structured residual patterns and potential salinity clusters that conventional machine learning approaches may overlook. Comparable evaluations of spatial structure have been shown to enhance the reliability of salinity prediction in recent studies focusing on coastal zones [21].
The methodological advances presented here have practical implications for regional salinity monitoring. High resolution predictions for multiple soil layers enable precise identification of risk areas and provide valuable support for managing both surface and subsurface processes. The ability to distinguish dominant drivers at each depth also informs the design of targeted management interventions, such as vegetation restoration in surface layers or groundwater regulation measures in deeper profiles. The framework thus offers a transferable approach for salinity assessment in other coastal or deltaic regions influenced by similar hydrological and environmental dynamics.
4.3. Limitations and Prospects
Although the convex weighted GWO-RF-XGBoost model demonstrates strong overall predictive skill, several limitations remain. The validation analysis shows that the model achieves an R squared value of 0.91 on the independent test set, with consistently low RMSE and MAE. These results confirm that the ensemble approach improves generalization and reduces overfitting compared with the individual base learners. However, model performance is not uniform across the full salinity range. In the extreme salinity zone, defined as salinity exceeding 25 g/kg, the ensemble yields noticeably larger prediction errors and a lower R squared value than in the moderate salinity range. This pattern reflects the limited representation of highly saline samples in the training dataset and the strong spatial heterogeneity of hydrogeochemical conditions in severely degraded soils. The high-salinity subset is positively skewed and sparsely represented in the dataset, which inherently constrains the model’s ability to fully learn extreme salinity behavior. Methodologically, such imbalance could be alleviated through cost-sensitive learning, weighted regression, or synthetic oversampling (e.g., SMOTE) to enhance the representation of high-salinity conditions. The difference between training and test performance remains small, which indicates that the reduced accuracy in extreme conditions arises from data scarcity and environmental variability rather than overfitting.
Extreme salinity is influenced by processes such as intensified evaporation driven by shallow groundwater, localized crystallization and salt crust formation, and long term salt accumulation in poorly drained microtopographic depressions. These processes are highly nonlinear in space and time and may not be fully captured by the current predictor set, even with the integration of soil properties, groundwater depth, surface conditions, and multispectral remote sensing indicators. Increasing the density of sampling in severely saline areas would directly enhance the representation of extreme conditions and reduce prediction uncertainty. In addition, incorporating a broader set of remote sensing variables and temporal indicators derived from multi date satellite imagery may help capture seasonal and interannual variations that drive salt redistribution.
Future improvements may also be achieved by adopting advanced modeling strategies such as stratified modeling across different salinity intervals, quantile focused learning, or hybrid approaches that combine machine learning with physically based descriptions of groundwater flow and evaporation driven salt transport. These developments would further enhance the capability of predictive models to represent extreme salinity behavior and would provide deeper insight into the mechanisms responsible for severe soil degradation in coastal agricultural landscapes.
5. Conclusions
This study introduces an interpretable and scalable machine learning framework for predicting soil salinization patterns and uncovering key environmental drivers across vertically stratified soil layers in coastal ecosystems. Focusing on the Yellow River Delta, a climate-sensitive agroecosystem strongly influenced by groundwater dynamics, we integrate the Gray Wolf Optimizer, Random Forest, and Extreme Gradient Boosting to develop a depth-resolved predictive model. By harnessing multi-source environmental data, including remote sensing indices (NDVI, SAVI, GDVI and CRSI), hydrogeological variables (groundwater TDS, depth), and soil properties (pH, texture, organic matter) from 220 field sites, the framework enables a fine-scale, layer-specific evaluation of salinity dynamics. The main findings are summarized as follows:
(1) Surface soils displayed the highest salinity levels, primarily due to evaporation-enhanced capillary rise and seawater intrusion. In contrast, middle and deep layers exhibited more stable but persistent salinity, shaped by long-term hydrogeological processes such as saline groundwater upwelling. Spatial clustering analysis using Global and Local Moran’s I revealed significant heterogeneity, with high-salinity zones concentrated in the northern and central parts of the study area, suggesting strong landscape and hydrological control on salt accumulation.
(2) Total dissolved solids in groundwater and groundwater depth emerged as key drivers across all depths, particularly in deeper layers. Organic matter played the strongest role in controlling topsoil salinity, consistent with its high negative SHAP contribution and its ability to enhance water retention and suppress evaporative salt concentration in the surface horizon. Vegetation cover (NDVI) and soil moisture were also influential in shallow soils, reflecting biotic modulation of salinity stress. NDVI retained predictive importance even in the deepest layer, suggesting that vegetation biomass signals integrate both surface and subsurface salinity conditions through deep-rooted crop varieties or long-term vegetation–groundwater interactions. Elevation, distance from the coast, and pH also showed strong layer-specific effects, confirming the necessity for stratified modeling and management.
(3) Through global optimization of features (GWO), nonlinear learning (RF, XGBoost), and adaptive weighting, the ensemble achieved the highest predictive accuracy (R2 = 0.91) and lowest RMSE (0.03 g/kg), outperforming single-model baselines. Furthermore, SHAP explainability enhanced transparency by linking predictions to process-level understanding. However, prediction uncertainty increased in extremely saline areas due to the limited number of high-salinity samples and the strongly positively skewed distribution, reflecting a data-driven constraint rather than a methodological limitation.
Future research should focus on incorporating long-term monitoring data to capture seasonal variability, integrating high-resolution remote sensing indices to enhance model precision, and developing hybrid approaches that combine deep learning with physically based process models to improve generalizability under varying environmental conditions. Moreover, investigating the impacts of climate change, sea level rise, and land use transformation on soil salinity dynamics is crucial for informing adaptive management strategies in fragile coastal ecosystems. This study provides a transferable, science-based framework for predicting and mitigating soil salinization in coastal and arid regions worldwide, contributing to sustainable land and water resource management.
Author Contributions
Conceptualization, Y.W., C.J. and X.Y.; methodology, Y.W. and X.Y.; software, Y.W., X.Y. and H.L.; validation, X.L., W.H. and M.S.; formal analysis, C.J.; investigation, X.L., W.H. and M.S.; resources, Y.W. and H.L.; data curation, X.L., W.H. and M.S.; writing—original draft preparation, Y.W., X.Y. and H.L.; writing—review and editing, Y.W., C.J., X.L., W.H., M.S. and X.Y.; visualization, C.J. and X.L.; supervision, Y.W.; project administration, X.Y.; funding acquisition, X.Y. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Special Foundation of Shandong Engineering Research Center for Groundwater Environmental Protection and Remediation (No.801KF2022-7).
Data Availability Statement
The original contributions presented in the study are included in the article, and further inquiries can be directed to the corresponding author.
Acknowledgments
The authors thank the Yellow River Delta Land Use Safety Field Scientific Observation and Research Station of the Ministry of Natural Resources and those who provided help in this study.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Dang, L.T.T.; Ishidaira, H.; Nguyen, K.P.; Souma, K. Short-term salinity prediction for coastal areas of the Vietnamese Mekong Delta using various machine learning algorithms. Appl. Water Sci. 2025, 15, 79. [Google Scholar] [CrossRef] [Scilit]
- Kaplan, G.; Gasparovic, M.; Alqasemi, A.S.; Aldhaheri, A.; Abuelgasim, A.; Ibrahim, M. Soil salinity prediction using Machine Learning and Sentinel—2 Remote Sensing Data in Hyper—Arid areas. Phys. Chem. Earth 2023, 130, 103400. [Google Scholar] [CrossRef] [Scilit]
- Jia, P.; Zhang, J.; Liang, Y.; Zhang, S.; Jia, K.; Zhao, X. The inversion of arid-coastal cultivated soil salinity using explainable machine learning and Sentinel-2. Ecol. Indic. 2024, 166, 112364. [Google Scholar] [CrossRef] [Scilit]
- Kumar, P.; Tiwari, P.; Biswas, A.; Srivastava, P.K. Spatio-temporal assessment of soil salinization utilizing remote sensing derivatives, and prediction modeling: Implications for sustainable development. Geosci. Front. 2024, 15, 101881. [Google Scholar] [CrossRef] [Scilit]
- Tong, C.; Wang, H.; Magagi, R.; Goita, K.; Wang, K. Spatial Gap-Filling of SMAP Soil Moisture Pixels Over Tibetan Plateau via Machine Learning Versus Geostatistics. IEEE J. Sel. Top. Appl. Earth Observ. Remote Sens. 2021, 14, 9899–9912. [Google Scholar] [CrossRef] [Scilit]
- Ge, X.; Ding, J.; Teng, D.; Wang, J.; Huo, T.; Jin, X.; Wang, J.; He, B.; Han, L. Updated soil salinity with fine spatial resolution and high accuracy: The synergy of Sentinel-2 MSI, environmental covariates and hybrid machine learning approaches. Catena 2022, 212, 106054. [Google Scholar] [CrossRef] [Scilit]
- Chi, Y.; Fan, M.; Zhang, Z.; Qu, Y. Zoning the soil salinization levels in the northern China’s coastal areas based on high-resolution soil mapping. Ecol. Indic. 2025, 172, 113303. [Google Scholar] [CrossRef] [Scilit]
- Budak, M.; Günal, E.; Kılıç, M.; Çelik, İ.; Sırrı, M.; Acir, N. Improvement of spatial estimation for soil organic carbon stocks in Yuksekova plain using Sentinel 2 imagery and gradient descent–boosted regression tree. Environ. Sci. Pollut. Res. 2023, 30, 53253–53274. [Google Scholar] [CrossRef] [Scilit]
- Benaafi, M.; Abba, S.I.; Opeyemi Oyedeji, M.; Mubarak, A.S.; Usman, J.; Aljundi, I.H. Experimental-based groundwater salinization from the carbonate aquifer of eastern Saudi Arabia: Insight into machine learning coupled with meta-heuristic algorithms. Chemom. Intell. Lab. Syst. 2024, 249, 105135. [Google Scholar] [CrossRef] [Scilit]
- Xu, X.; Xie, C.; Ma, L.; Yang, L.; Zhang, T. Multi-objective evolutionary algorithm with two balancing mechanisms for heterogeneous UAV swarm path planning. Appl. Soft Comput. 2025, 173, 112927. [Google Scholar] [CrossRef] [Scilit]
- Wang, F.; Wei, Y.; Yang, S. Spatio-temporal changes in subsurface soil salinity based on electromagnetic induction and environmental covariates at the Tarim River Basin, southern Xinjiang, China. Comput. Electron. Agric. 2025, 232, 110108. [Google Scholar] [CrossRef] [Scilit]
- Nourani, V.; Ghaffari, A.; Behfar, N.; Foroumandi, E. Spatiotemporal assessment of groundwater quality and quantity using geostatistical and ensemble artificial intelligence tools. J. Environ. Manag. 2024, 355, 120495. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhou, J.; Huang, T.; Wang, H.; Du, W.; Zhan, Y.; Duan, A.; Fu, G. Using physical method, machine learning and hybrid method to model soil water movement. J. Hydrol. 2025, 652, 132639. [Google Scholar] [CrossRef] [Scilit]
- Wu, W.; Zucca, C.; Muhaimeed, A.S.; Al-Shafie, W.M.; Fadhil Al-Quraishi, A.M.; Nangia, V.; Zhu, M.; Liu, G. Soil salinity prediction and mapping by machine learning regression in Central Mesopotamia, Iraq. Land Degrad. Dev. 2018, 29, 4005–4014. [Google Scholar] [CrossRef] [Scilit]
- Wang, N.; Xue, J.; Peng, J.; Biswas, A.; He, Y.; Shi, Z. Integrating Remote Sensing and Landscape Characteristics to Estimate Soil Salinity Using Machine Learning Methods: A Case Study from Southern Xinjiang, China. Remote Sens. 2020, 12, 4118. [Google Scholar] [CrossRef] [Scilit]
- Liu, Z.; Zhang, Z.; Zhang, Q.; Zhao, L. Prediction of landfill gases concentration based on Grey Wolf Optimization—Support Vector Regression during landfill excavation process. Waste Manag. 2025, 198, 128–136. [Google Scholar] [CrossRef] [Scilit]
- Ni, X.; Zhao, G.; White, J.R.; Yao, P.; Xu, K.; Sapkota, Y.; Liu, J.; Zheng, H.; Su, D.; He, L.; et al. Source and degradation of soil organic matter in different vegetations along a salinity gradient in the Yellow River Delta wetland. Catena 2025, 248, 108603. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Wang, W.; Li, X.; Liu, S.; Xu, X.; Yinglan, A.; Ren, S. Heavy metals in the continuous river -estuary-sea system of the Yellow River Delta, China: Spatial patterns, potential sources, and influencing factors. Mar. Pollut. Bull. 2024, 209, 117247. [Google Scholar] [CrossRef] [Scilit]
- Yang, C.; Chen, Y.; Sun, W.; Zhang, Q.; Diao, M.; Sun, J. Extreme soil salinity reduces N and P metabolism and related microbial network complexity and community immigration rate. Environ. Res. 2025, 264, 120361. [Google Scholar] [CrossRef] [Scilit]
- Sui, H.; Chen, D.; Yan, J.; Li, B.; Li, W.; Cui, B. Soil Salinity Estimation Over Coastal Wetlands Based on Random Forest Algorithm and Hydrological Connectivity Metric. Front. Mar. Sci. 2022, 9, 895172. [Google Scholar] [CrossRef] [Scilit]
- Song, Y.; Pan, Y.; Xiang, M.; Yang, W.; Zhan, D.; Wang, X.; Lu, M. A WebGIS-Based System for Supporting Saline-Alkali Soil Ecological Monitoring: A Case Study in Yellow River Delta, China. Remote Sens. 2024, 16, 1948. [Google Scholar] [CrossRef] [Scilit]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
- Shiwomeh, D.N.; Kantoush, S.A.; Saber, M.; Sumi, T.; Fantong, W.Y.; Quang Nguyen, B.; Abdrabo, K.I.; Mabrouk, E. Using XGBoost and memetic programming to identify hotspots of sediment plastic pollution. Environ. Pollut. 2025, 387, 127329. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Huang, G.; Wang, X.; Chen, D.; Wang, Y.; Zhu, S.; Zhang, T.; Liao, L.; Tian, Z.; Wei, N. A hybrid data-driven framework for diagnosing contributing factors for soil heavy metal contaminations using machine learning and spatial clustering analysis. J. Hazard. Mater. 2022, 437, 129324. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhou, R.; Chen, J.; Cui, S.; Li, L.; Qian, J.; Zhao, H.; Huang, G. A data-driven framework to identify influencing factors for soil heavy metal contaminations using random forest and bivariate local Moran’s I: A case study. J. Environ. Manag. 2025, 375, 124172. [Google Scholar] [CrossRef] [Scilit]
- Wang, X.; Liu, E.; Yan, M.; Zheng, S.; Fan, Y.; Sun, Y.; Li, Z.; Xu, J. Contamination and source apportionment of metals in urban road dust (Jinan, China) integrating the enrichment factor, receptor models (FA-NNC and PMF), local Moran’s index, Pb isotopes and source-oriented health risk. Sci. Total Environ. 2023, 878, 163211. [Google Scholar] [CrossRef] [Scilit]
- Hakim, W.L.; Fadhillah, M.F.; Won, J.; Park, Y.; Lee, C. Advanced time-series InSAR analysis to estimate surface deformation and utilization of hybrid deep learning for susceptibility mapping in the Jakarta metropolitan region. Gisci. Remote Sens. 2025, 62, 2465349. [Google Scholar] [CrossRef] [Scilit]
- Barkhordari, M.S.; Qi, C. Prediction of zinc, cadmium, and arsenic in european soils using multi-end machine learning models. J. Hazard. Mater. 2025, 490, 137800. [Google Scholar] [CrossRef] [Scilit]
- Fan, R.; Fang, N.; Zeng, Y.; Zong, R.; Wang, Q.; Zhang, Y.; Shi, Z. Machine learning-assisted check dam planning on the Chinese Loess Plateau. J. Hydrol. 2025, 656, 133015. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Li, K.; Qian, Y.; Dou, X.; Han, Q.; Zeng, J.; Zhao, H.; Lan, Q.; Xu, Z.; Bai, J.; et al. An urban land surface temperature and emissivity separation algorithm from ASTER TIR data and its application. Int. J. Digit. Earth 2025, 18, 2459346. [Google Scholar] [CrossRef] [Scilit]
- Amini, H.; Ashrafzadeh, A.; Khaledian, M. Enhancing groundwater salinity estimation through integrated GMDH and geostatistical techniques. Earth Sci. Inform. 2024, 17, 283–297. [Google Scholar] [CrossRef] [Scilit]
- Liu, X.; Hu, Y.; Li, X.; Du, R.; Xiang, Y.; Zhang, F. An Interpretable Model for Salinity Inversion Assessment of the South Bank of the Yellow River Based on Optuna Hyperparameter Optimization and XGBoost. Agronomy 2025, 15, 18. [Google Scholar] [CrossRef] [Scilit]
- Grbcic, L.; Druzeta, S.; Mausa, G.; Lipic, T.; Lusic, D.V.; Alvir, M.; Lucin, I.; Sikirica, A.; Davidovic, D.; Travas, V.; et al. Coastal water quality prediction based on machine learning with feature interpretation and spatio-temporal analysis. Environ. Modell. Softw. 2022, 155, 105458. [Google Scholar] [CrossRef] [Scilit]
- Lu, X.; Hu, Y.; Yang, Z.; Raouf, A.; Song, M.; Wang, L. Experiment and Simulation of Groundwater Salt Transport Based on Different Contact Relations in Heterogeneous Soil Layers. Water 2024, 16, 47. [Google Scholar] [CrossRef] [Scilit]
- Wang, X.; Shen, J.; Fan, L.; Cai, J. Analysis of the Relationship Between Groundwater Dynamics and Changes in Water and Salt in Soil Under Subsurface Pipe Salt Drainage Technology. Water 2024, 16, 3597. [Google Scholar] [CrossRef] [Scilit]
- Liu, W.; Xu, X.; Lu, F.; Cao, J.; Li, P.; Fu, T.; Chen, G.; Su, Q. Three-dimensional mapping of soil salinity in the southern coastal area of Laizhou Bay, China. Land Degrad. Dev. 2018, 29, 3772–3782. [Google Scholar] [CrossRef] [Scilit]
- Zhang, H.; Fu, X.; Zhang, Y.; Qi, Z.; Zhang, H.; Xu, Z. Mapping Multi-Depth Soil Salinity Using Remote Sensing-Enabled Machine Learning in the Yellow River Delta, China. Remote Sens. 2023, 15, 5640. [Google Scholar] [CrossRef] [Scilit]
- Song, Y.; Gao, M.; Wang, J. Inversion of salinization in multilayer soils and prediction of water demand for salt regulation in coastal region. Agric. Water Manag. 2024, 301, 108970. [Google Scholar] [CrossRef] [Scilit]
- Fu, Y.; Wang, P.; Cao, W.; Fu, S.; Zhang, J.; Li, X.; Guo, J.; Huang, Z.; Chen, X. Long-Term Assessment of Soil Salinization Patterns in the Yellow River Delta Using Landsat Imagery from 2003 to 2021. Land 2025, 14, 24. [Google Scholar] [CrossRef] [Scilit]
- Guo, B.; Xu, M.; Zhang, R. Evolution Patterns and Dominant Factors of Soil Salinization in the Yellow River Delta Based on Long-Time-Series and Similar Phenological-Fusion Images. Remote Sens. 2024, 16, 3332. [Google Scholar] [CrossRef] [Scilit]
- Liu, J.; Feng, Q.; Gong, J.; Zhou, J.; Li, Y. Land-cover classification of the Yellow River Delta wetland based on multiple end-member spectral mixture analysis and a Random Forest classifier. Int. J. Remote Sens. 2016, 37, 1845–1867. [Google Scholar] [CrossRef] [Scilit]
- Wang, Q.; Cui, G.; Liu, H.; Huang, X.; Xiao, X.; Wang, M.; Jia, M.; Mao, D.; Li, X.; Xiao, Y.; et al. Spatiotemporal Dynamics and Potential Distribution Prediction of Spartina alterniflora Invasion in Bohai Bay Based on Sentinel Time-Series Data and MaxEnt Modeling. Remote Sens. 2025, 17, 975. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).









