1. Introduction
Loess, as a special soil type characterized by multiple pores, under-compaction, and water sensitivity, is highly susceptible to loess disasters caused by changes in the water environment, and is widely distributed in arid and semi-arid regions of China [
1]. A certain water conveyance channel project located in Northern Xinjiang spans a large area of loess regions. With the increase in the years of operation of the channel, under the combined influence of water conveyance, water cutoff, and seasonal climate changes, the water level of this section of the channel will undergo repeated rise and fall, which is likely to cause structural damage to shallow soil and significantly reduce the soil strength [
2], eventually leading to local channel landslides and channel foundation collapse, seriously affecting the normal water conveyance function of the channel and the normal operation of water conservancy projects related to the channel [
3]. Therefore, accurately analyzing the evolution law of loess shear strength under dry–wet cycles and establishing a strength prediction model are of great significance for evaluating the long-term stability of the project.
Scholars have carried out various studies on the deterioration mechanism of loess strength caused by dry–wet cycles. During the dry–wet cycle process, loess mainly suffers from cementation structure damage due to the irreversible process of water absorption and expansion—water loss and shrinkage of internal clay minerals, resulting in significant nonlinear attenuation characteristics of loess shear strength [
4]. Liu Ye [
5], Hu Jiangyang [
6], et al. conducted triaxial shear tests on loess under different dry–wet cycle paths and found that the strength of remolded loess gradually stabilized after five dry–wet cycles and tended to be consistent with the shear strength of undisturbed soil, which was also confirmed in the research of Zhao Junyu et al. [
7]. Ma Xuening et al. [
8] carried out triaxial shear tests on remolded loess under different cycle times aiming at the irreversible impact of shallow soil water-vapor changes caused by rainfall and evaporation on soil mechanical properties, and found that dry–wet cycles transformed the stress–strain curve from strain-hardening type to softening type, and shear strength parameters gradually decreased with the increase in cycle times. Liu Yuyang [
9], Hao Yanzhou [
10], Bai [
11], et al. studied the strength deterioration degree of loess under dry–wet cycles by using triaxial shear, scanning electron microscopy (SEM), CT and other tests, and found that the shear strength parameters decreased most significantly after 0–3 dry–wet cycles, the reason for which is that dry–wet cycles weaken the cementation between soil particles. Yuan Zhihui et al. [
12] adopted conventional triaxial tests to study the effects of different confining pressures and water contents on loess structure and strength attenuation under dry–wet cycles, and found that both the loess structure and attenuation strength decrease with the increase in water content and increase with the increase in confining pressure.
These research results provide an important theoretical basis for analyzing the mechanical behavior of loess in the natural environment.
In previous studies, scholars mostly established linear regression or nonlinear regression models based on test data [
13,
14,
15,
16]. Hu Changming et al. [
17] established a dry–wet cycle strength deterioration model of compacted loess considering dry density, dry–wet cycle amplitude and lower limit water content; Liu Mengcheng et al. [
18] qualitatively analyzed and gave the nonlinear variation characteristics of the shear strength, internal friction angle and porosity ratio by studying the shear characteristics of calcareous sand. However, considering that the soil shear strength is affected by multiple parameters, such as dry density, water content, normal stress, and number of dry–wet cycles, the difficulty of regression increases, making it difficult to establish a regression model with high accuracy. At present, with the development of computer technology, artificial neural networks have been favored by more and more scholars due to their excellent fitting ability for high-dimensional data.
Many scholars have introduced neural network models into geotechnical parameter prediction. Zhou Zhong et al. [
19] introduced a genetic algorithm (GA) to improve the weights and biases of a BP neural network and established a strength prediction model of foam lightweight soil. Das et al. [
20] used an artificial neural network algorithm to establish a prediction model of the internal friction angle of clay. Shu yu Hu et al. [
21] established a shear strength prediction model of marine clay based on the combination of a particle swarm optimization algorithm, adaptive boosting algorithm and BP neural network. Gu Chunsheng et al. [
22] used principal component analysis to extract the main factors that affect the target variables from sample indicators and took them as the input layer of the BP neural network model, and thus, established a prediction model of shear strength parameters of cohesive soil. Anurag Niyogi et al. [
23] established a deep learning neural network model to predict cohesion. Liu Junlin et al. [
24] used fireworks algorithm to optimize BP neural network and established a shear strength prediction model of root-containing soil. Liu Ruilin et al. [
25] created a GA-BP model to evaluate the improvement effect of water-rich sand layer muck, which effectively improved the prediction accuracy of the internal friction angle, permeability coefficient and slump compared with the traditional BP model.
In summary, intelligent algorithms such as the genetic algorithm–backpropagation (GA-BP) neural network have shown great potential in geotechnical parameter prediction. However, traditional GA-BP models often suffer from problems such as premature loss of population diversity and falling into local extremums when solving such complex nonlinear problems, leading to poor prediction accuracy and convergence. Although a large number of studies have applied intelligent algorithms to soil strength prediction, research on systematic improvement of GA-BP models and their special application to the prediction of loess shear strength evolution under alternating dry and wet environments is still insufficient.
Based on this, this study selected loess samples from a typical channel project in Northern Xinjiang, obtained evolution data of shear strength under different cycle times, dry densities and water contents through indoor dry–wet cycle tests and direct shear tests. On this basis, the traditional genetic algorithm was improved: the parent selection strategy was optimized, the cross-genetic method was improved, and adaptive crossover and mutation operators were introduced, which effectively improved the global search ability and stability of the algorithm. Based on the improved genetic algorithm, the initial weights and thresholds of the BP neural network were optimized, and finally a prediction model of loess shear strength under dry–wet cycles with high prediction performance was constructed.
Therefore, the main innovations of this study are reflected in the following three aspects: First, at the algorithm level, adaptive crossover and mutation operators based on the Sigmoid function are proposed, which dynamically combine the fitness value with the population iteration number, effectively overcoming the defect of premature convergence in traditional genetic algorithms when optimizing neural networks. Second, the parent selection mechanism of genetic operation is optimized by adopting a hybrid strategy of 50% roulette wheel selection and 50% sequential selection, which forcibly maintains the population diversity and avoids the premature dominance of high-fitness individuals over the evolutionary direction. Finally, at the application level, this study systematically combines the Improved Adaptive Genetic Algorithm (IAGA) with the BP neural network and applies it to the prediction of loess shear strength evolution under dry–wet cycle conditions, providing a novel and efficient intelligent solution for evaluating the long-term stability of canal engineering in arid regions.
2. Materials
2.1. Project Background
This study took the Xinjiang Zangao Hydropower Station Project as the research object. This section of the project is located in the lower mountainous section of the mainstream of the Yarkant River in Shache County, Kashgar Prefecture, Xinjiang. The project is mainly composed of key structures, including the river—blocking and water—diversion pivot, water conveyance structures, forebay, penstock, and power house. The normal storage level of the reservoir is 1611 m, the regulating storage capacity is 6.11 million m3, the total installed capacity of the power station is 180 MW, and the annual average power generation is 0.5653 billion kW·h.
The open water conveyance channel within its water conveyance structures adopts a trapezoidal cross-section, with a bottom width of 5 m, a channel depth of 9 m, a longitudinal slope ratio of 1/5000, a total length of 8.045 km, and a water conveyance flow rate of 379.6 m3/s. Considering the length, flow rate and topographic conditions of the water conveyance channel, an inspection and maintenance road is arranged on the channel top to facilitate maintenance and emergency rescue in the event of sudden accidents. The width of the left side of the channel top was determined to be 4.5 m, and that of the right side was 3.0 m.
2.2. Test Materials
The soil samples used in this test were taken from the loess of the channel foundation of the water conveyance channel of a diversion-type hydropower station in Northern Xinjiang, with a yellowish-brown color. The basic physical property parameters are shown in
Table 1.
2.3. Sample Preparation
To ensure uniform physical properties of the tested loess, the retrieved undisturbed soil was dried to a constant weight at 105 °C, cooled to room temperature in a desiccator, and then sieved through a 2 mm fine sieve to remove coarse particles. Distilled water was added to prepare wet soil samples with initial water contents of 5%, 10%, and 15%. The prepared samples were sealed in airtight plastic bags and allowed to equilibrate for 24 h to ensure a uniform moisture distribution inside the soil. Ring shear specimens with a diameter of 61.8 mm and a height of 20 mm were prepared using the static compression method. The dry densities of the specimens were precisely controlled at 1.45 g/cm
3, 1.65 g/cm
3, and 1.85 g/cm
3, with a compaction error within ±0.02 g/cm
3. The detailed test scheme design is presented in
Table 2.
2.4. Dry–Wet Cycle Test
Based on climatic factors and canal operation conditions, seepage during the water-passing period brings the shallow loess into a nearly saturated state, for which the water immersion saturation treatment method is adopted. The decrease in moisture content of the shallow loess on the canal slope caused by the drop of canal water level was simulated as a dehumidification process of the samples in a constant temperature environment, where a drying oven was used for dehumidification with the temperature controlled at 40 °C. A complete wet–dry cycle is defined as a process where the samples were first immersed in water from the initial moisture content to the saturated moisture content, then dehumidified to the lower limit moisture content of 5%, and finally re-saturated by water immersion.
2.5. Direct Shear Test
All tests were carried out in strict accordance with the Standard for Soil Test Methods (GB/T 50123-2019) using the quick direct shear test. The shear rate was fixed at 0.8 mm/min and remained unchanged throughout the test. The shear box was leveled before loading, and extra disturbance was avoided during sample placement. The normal stresses were precisely controlled at 12.5 kPa, 25 kPa, 37.5 kPa, and 50 kPa. Vertical loads were applied in stages to simulate the overburden pressure acting on the shear surface during shallow landslides in channels. The test was terminated when the specimen failed completely in shear (i.e., the shear displacement reached the maximum allowable displacement of the shear box: 6 mm).
2.6. Analysis of the Effects of Different Factors on the Shear Strength of Loess
2.6.1. The Effect of Dry–Wet Cycles on Shear Strength
Figure 1 shows curves depicting the relationship between the shear strength and the dry density, initial moisture content, and number of wet–dry cycles. As can be seen from
Figure 1, under the same normal stress, regardless of variations in the dry density and initial moisture content, the shear strength of the samples generally exhibited a decreasing trend and tended to stabilize with an increase in the number of wet–dry cycles. Furthermore, the magnitude of soil strength degradation induced by the first wet–dry cycle was greater than that caused by subsequent cycles. Taking the data under a normal stress of 12.5 kPa in
Figure 1a as an example, after 1, 3, and 5 cycles, the shear strengths of the soil decreased by 18.3%, 31.5%, and 36.3%, respectively, compared with the non-cycled samples.
These results indicate that the first wet–dry cycle exerted the most intense weakening effect on the loess strength, with the attenuation amplitude exceeding half of the total attenuation. This demonstrates that the first cycle caused irreversible and the most severe damage to the internal structure of the soil. As the number of cycles increased to 3–5, the rate of strength attenuation decreased significantly and gradually approached a stable value. This phenomenon reveals the structural rearrangement process of loess subjected to multiple wet–dry actions: in the initial stage, moisture migration led to the loss of cementitious materials and the destruction of the pore structure; in the later stage, however, soil particles had rearranged themselves and reached a new state of relative equilibrium, where internal moisture movement no longer triggered significant structural changes, which was macroscopically reflected by the stabilization of shear strength.
2.6.2. Effect of Dry Density on Shear Strength Parameters
To explore the effects of different dry densities on the shear strength parameters under wetting–drying cycles, this study conducted a comparative analysis of soil samples with a water content of 10% and dry densities of 1.45 g/cm
3, 1.65 g/cm
3 and 1.85 g/cm
3. As shown in
Figure 2 and
Figure 3, both the cohesion and internal friction angle of loesses with different dry densities decrease continuously with the increase in the number of wetting–drying cycles. After the first wetting–drying cycle, the degradation amplitude of the strength parameters is the most significant, and then tends to be stable when the number of cycles reaches a certain threshold. When the compacted loess undergoes 5 wetting–drying cycles, its cohesion degrades to 11.7 kPa, 15.6 kPa and 21.9 kPa, respectively, which is 39%, 31% and 25% lower than that in the initial state. The internal friction angle also shows a similar attenuation trend, decreasing by 3.6°, 3.3° and 4.3° relative to the initial state, respectively. However, the attenuation amplitude of cohesion decreases significantly with the increase in dry density. From the perspective of microstructure analysis, it can be concluded that a higher dry density makes the arrangement of soil particles more compact, which can effectively inhibit the uneven change in matrix suction caused by the unevenness of pores during wetting–drying cycles, thereby suppressing the increase in pores and enhancing the ability of soil to resist shear failure [
26]. Therefore, improving the degree of soil compaction can effectively reduce the degradation effect of wetting–drying cycles on the soil structure.
2.6.3. Effect of Initial Water Content on Shear Strength Parameters
Based on the test results presented in
Figure 4 and
Figure 5, under the condition of a dry density of 1.85 g/cm
3, the water content exerts a significant influence on the degradation law of strength parameters of compacted loess during wetting–drying cycles. The analysis indicates that with the increase in initial water content, the cohesion of the soil samples shows a decreasing trend under the same number of cycles. In addition, in terms of the relative attenuation amplitude of strength parameters compared with the initial state, after 5 wetting–drying cycles, the cohesion decreases by 27.5%, 25.5% and 21.6%, respectively; the internal friction angle decreases by 4°, 4.3° and 1.85°, respectively. It can thus be concluded that under the same wetting–drying cycle conditions, the higher the initial water content, the smaller the attenuation amplitude of cohesion and internal friction angle.
From the perspective of internal mechanism analysis, under a constant dry density, the increase in water content will reduce the initial concentration of cementitious substances in the soil and intensify their dissolution during wetting–drying cycles, leading to the evolution of soil structure from medium and small pores to large pores, thereby causing the attenuation of cohesion. At a low water content, the concentration of cementitious substances in the soil is relatively high, the cementation effect is strong, and the inter-particle connection is tight. However, the dissolution effect of multiple wetting–drying cycles on cementitious substances and the rounding effect on particle morphology are more significant, resulting in a larger attenuation amplitude of strength parameters [
12]. In contrast, at a high water content, since the initial frictional strength and the concentration of cementitious substances are already at a low level, the further weakening effect of wetting–drying cycles on the cemented structure is relatively limited, thus showing a smaller attenuation amplitude.
3. Methods
3.1. Basic Principles of the Improved GA-BP Model
Based on the backpropagation (BP) neural network, this study constructed a prediction model for the shear strength of loess under the action of dry–wet cycles. However, when dealing with high-dimensional complex data, the gradient descent optimization process of the BP neural network has a limitation of being prone to falling into local optimal solutions. The genetic algorithm can optimize the BP neural network to achieve the global optimal solution [
27]. Nevertheless, when addressing complex nonlinear problems, traditional genetic algorithms often suffer from premature loss of population diversity and trapping in local extreme values, which results in poor prediction accuracy and convergence. To this end, this paper introduces an Improved Adaptive Genetic Algorithm (IAGA) to optimize the BP neural network. By leveraging the global search capability of the IAGA, the global optimal solutions of the initial weights and thresholds of the network are obtained, thereby improving the model performance. The algorithm flow of the proposed IAGA-BP model is shown in
Figure 6, and the specific implementation steps are as follows:
Step 1: Input the training data and establish the BP neural network structure according to the input and output parameters.
Step 2: Generate a random initial population.
Step 3: Calculate the fitness values of the current population and retain the optimal individuals.
Step 4: Select parent individuals from the current population for crossover and mutation operations to obtain offspring individuals.
Step 5: Determine whether the offspring individuals in Step 4 meet the training termination conditions. If not, form a new generation of population with the offspring individuals obtained in Step 4, and repeat Steps 3, 4, and 5. When the training termination conditions are satisfied, proceed to Step 6.
Step 6: Perform gene decoding on the globally optimal individuals in the genetic algorithm and output the optimal weights and biases.
Step 7: Input the optimal weights and biases into the BP neural network model for training and prediction.
3.2. Structure of BP Neural Network
An artificial neural network (ANN) is an intelligent bionic model composed of multiple neurons, which simulates the human brain and is applied to solve nonlinear large-scale adaptive data processing problems [
28]. Among them, the backpropagation (BP) neural network, as a multi-layer feedforward neural network based on the error backpropagation algorithm, can still achieve satisfactory fitting results when dealing with nonlinear problems or in cases of incomplete data [
29]. The structure of this neural network is shown in
Figure 7, where the number of nodes in the input layer is j, the number of nodes in the hidden layer is m, and the number of nodes in the output layer is k.
3.2.1. Number of Nodes in the Hidden Layer
An artificial neural network can adopt a single hidden layer and increase the number of neurons to improve prediction accuracy [
30]. Therefore, this study used a single hidden layer, and the number of neurons in the hidden layer is determined by an empirical formula, which is shown as follows:
where m is the number of nodes in the hidden layer, j is the number of input parameters, k is the number of determined output parameters, and a is an integer ranging from 1 to 10.
3.2.2. Evaluation Indicators
The mean absolute percentage error (MAPE), mean squared error (MSE), mean absolute error (MAE), and coefficient of determination (R
2) were adopted as the evaluation indicators for the prediction performance of the model, and their calculation formulas are as follows:
where n is the number of samples, y
i is the predicted value of the i-th sample,
is the true value of the i-th sample, and
is the mean value of the true values of all the samples.
3.3. Improved Genetic Algorithm (GA)
A genetic algorithm (GA) [
31] is a global optimization method that simulates the mechanism of biological evolution. By mimicking the processes of heredity, mutation and natural selection in biological populations, this algorithm performs iterative searches for the optimal solution in the solution space.
The core principle of optimizing the BP neural network with the genetic algorithm lies in the optimal screening of the initial weights and bias parameters of the neural network. However, traditional genetic algorithms generally suffer from drawbacks such as the premature attenuation of population diversity and a tendency to fall into local optimal solutions, which, in turn, leads to insufficient prediction accuracy and poor convergence performance of the optimized BP neural network. To enhance the global optimal solution search capability of genetic algorithms, improvements can be achieved through approaches such as optimizing the parent selection mechanism, refining the crossover genetic strategy, and introducing adaptive operators to realize the dynamic adjustment of crossover and mutation probabilities.
3.3.1. Population Initialization
The real-number coding method is characterized by a clear physical meaning and high calculation accuracy. Therefore, to better encode and decode the individuals in the population, the real-number coding method was adopted, that is, the weights and biases between the input layer and the hidden layer, as well as those between the hidden layer and the output layer, were divided in sequence. The coding length of each individual in the population is shown in Formula (6):
where l is the coding length of an individual.
3.3.2. Individual Fitness Value
Fitness is the criterion for evaluating the quality of individuals, which determines their chances of survival and reproduction in the population. Individuals with higher fitness are more likely to be selected for reproduction, thereby passing on excellent genes to the next generation. The fitness function is shown in Formula (7):
where
is the fitness value of the i-th individual;
is the mean squared error of the i-th individual.
3.3.3. Optimizing Parent Selection
In the traditional genetic algorithm, individuals with extremely high fitness will rapidly dominate the entire population within several generations, leading to a sharp decline in genetic diversity and premature convergence of the algorithm. By contrast, the optimized parent selection adopts a hybrid strategy: half of the parents are selected via the roulette wheel method, while the other half are selected in sequence, which forces each individual to serve as a parent at least once. These low-fitness individuals may carry “gene fragments” that are currently “useless” but potentially critical in the future, thereby providing sustained possibilities for exploring different regions of the solution space. The probability of an individual being selected by the roulette wheel method is shown in Formula (8):
where
is the probability that the i-th individual in the population is selected as a parent.
3.3.4. Improving Crossover and Mutation Probabilities
There is no uniform standard for the values of crossover probability and mutation probability in genetic algorithms for different types of optimization problems, and their determination often requires a large number of repeated experiments and verification processes.
In the iteration of genetic algorithms, the fitness distribution of population individuals is relatively scattered with abundant diversity [
32]. In the early stage of genetic algorithms, the crossover operation plays a major role in rapid exploration and expanding the scope of the solution space; in the late stage, the population tends to converge and high-quality solutions have been initially formed, so it is necessary to increase the mutation probability to break the stagnation and jump out of local optima. Therefore, the crossover probability p
c should gradually decrease with the number of iterations, while the mutation probability p
m should show the opposite trend so as to improve population diversity and search for the optimal solution.
So far, many scholars have introduced nonlinear functions combined with individual fitness values to control the exchange and mutation of individual gene fragments. For example, the Sigmoid function has been applied to crossover and mutation probabilities, achieving certain results [
33]. However, most studies only combine the function with individual fitness or the number of evolutions separately, and few consider the joint adjustment of crossover and mutation probabilities based on both factors. This deficiency reduces the possibility of the algorithm searching for better solutions near high-quality individuals. Therefore, the Sigmoid curve is shifted and flipped, and the ratio of the current population fitness f
i and the minimum fitness f
min to the global maximum fitness f
max, as well as the ratio of the current iteration number g to the total iteration number G, are jointly used as control variables. Thus, the values of p
c and p
m that vary with fitness values and iteration numbers are obtained, and their adjustment formulas and graphs are shown in Equations (9) and (10) and
Figure 8 and
Figure 9:
At present, traditional crossover and mutation methods mostly involve multi-point crossover and multi-point mutation, both of which involve the exchange of long continuous gene segments in each operation, resulting in a relatively weak ability to generate new individuals. Moreover, the number of crossover points in multi-point crossover will significantly fragment the parental chromosomes, which is not conducive to the preservation and inheritance of excellent individuals.
Therefore, this study adopted the methods of uniform crossover and uniform mutation. Specifically, the number of genes to be exchanged between the two parent individuals is calculated according to their fitness values. Then, distinct real numbers are generated within the range of the total number of genes of an individual. Subsequently, whether the parental gene at each position undergoes crossover or mutation is determined based on p
c and p
m. Finally, the offspring individuals are obtained as shown in
Figure 10, which can effectively inherit the excellent genes of the parents and enhance the diversity of the offspring. The specific calculation and genetic processes are as follows:
where C
i and M
i are the number of genes to be crossed and mutated for the current individual, respectively.
The improved genetic algorithm with uniform crossover and adaptive probabilities is particularly effective at maintaining population diversity and avoiding premature convergence in complex, high-dimensional optimization problems, such as the optimization of initial weights and thresholds in neural networks for loess strength prediction. Specifically, in the early evolutionary stage, when the population is diverse, the algorithm explores the solution space broadly. As the evolution progresses and individuals become similar, the adaptive mutation probability increases, promoting diversity and preventing premature convergence. This mechanism is crucial when the fitness landscape contains multiple local optima, ensuring that the algorithm does not settle prematurely and can continue to search for the global optimum. In our study, this behavior was observed across all tested scenarios, confirming the robustness of the proposed method.
3.3.5. Model Parameters
In the construction of the IAGA-BP neural network model, this study adopted Python 3.7.0 programming to implement the overall algorithm framework. The Sigmoid function was selected as the activation function of the neural network, and a three-layer topology structure of 4-6-1 was employed for the model. The number of network training epochs was set to 1 × 10
4, and the learning rate was set to 0.1. For the genetic algorithm module, the initial population size was set to 30, and the number of evolution generations was set to 100. For other key parameters, see
Table 3 for details.
3.4. Dataset and Preprocessing
This study predicted the shear strength of loess based on laboratory drying–wetting cycle tests. A total of 80 sets of shear strength data from the previous tests were selected as the dataset, among which 80% were randomly chosen as the training set and 20% as the test set. Considering the variables involved in the laboratory tests, the input parameters adopted in this study were all core physical factors that affect the shear strength of loess. The variation ranges of these parameters were determined according to the laboratory tests and engineering practice, ensuring that the dataset had clear physical and mechanical significance for the soil, which lays a foundation for the physical interpretability of the subsequent model.
The presence of different dimensions in the sample data is prone to causing systematic errors in calculations. To reduce such systematic errors and improve the model accuracy, dimensionless processing of the sample data is required. In this study, normalization was used for data preprocessing to constrain the data within the range of 0 to 1, with the specific formula presented as follows:
where X′ is the data after normalization; X is the original sample data; and X
max and X
min are the maximum and minimum values in the original sample data, respectively.
4. Results and Discussion
The observed staged attenuation and eventual stabilization of loess shear strength under increasing dry–wet cycles (
Figure 1,
Figure 2,
Figure 3,
Figure 4 and
Figure 5) present a nonlinear pattern that challenges conventional regression models. The rapid strength loss after the first cycle followed by gradual stabilization implies that the relationship between the cycle number and strength is highly nonlinear and asymptotic. Such behavior requires a model capable of capturing both the sharp initial declines and plateau phases. The IAGA-BP model, with its enhanced global search and adaptive mechanisms, effectively learns this degradation pattern from the training data. This capability is reflected in its superior performance on the test set, where it accurately predicts strength values, even in the critical early cycles. In contrast, traditional models tend to smooth out the sharp transition, leading to larger errors. Thus, incorporating this nonlinear degradation behavior into the model training is essential for achieving a high prediction accuracy under dry–wet cycles.
This study employs three prediction models for comparative analysis, namely, the BP neural network model, the GA-BP neural network model, and the IAGA-BP neural network model. Among them, the BP neural network is a multi-layer feedforward neural network based on the error backpropagation algorithm, which continuously modifies weights and biases with the goal of minimizing the mean squared error to achieve high-precision prediction [
34]. The genetic algorithm (GA) is a random search algorithm inspired by the mechanisms of natural selection and genetic inheritance in the biological world. Its basic principle is to conduct a global optimal search for weights and biases through selection, crossover, and mutation operations [
35]. The Improved Genetic Algorithm (Improved GA) optimizes the selection method, as well as the crossover and mutation probabilities, thereby further enhancing the global optimal search capability and prediction accuracy of the genetic algorithm while preventing the occurrence of local optima.
4.1. Results
The model parameters were determined through multiple experiments, and the optimal neural network topology was constructed. By combining the forward propagation of the neural network model with the improved genetic algorithm, the model evolution fitness curve shown in
Figure 11 was obtained. As can be seen from
Figure 11, under the same initial population, the initial optimal fitness values of the genetic algorithm and the improved genetic algorithm are equal. As the population begins to evolve and iterate, the Improved Adaptive Genetic Algorithm (IAGA) not only demonstrates a faster convergence speed in the early stages of evolution but also continues to enhance the solution quality in the later stages. Furthermore, even after the algorithm enters the convergence phase, the fitness value of the IAGA still exhibits fluctuations, validating the effectiveness of the adaptive mechanism in enhancing global search capabilities. Therefore, the IAGA outperforms the standard Genetic Algorithm (GA) in terms of fitness convergence performance.
After the completion of the prediction model training, the following operation results were finally obtained. The relationship between the loss function values of the model training set and the number of training iterations is shown in
Figure 12. In the initial stage of model training, it can be clearly observed that the IAGA-BP model with optimized weights and biases exhibits the lowest loss function value. As the number of training iterations increases, the loss function values of all three models show a downward trend. When the number of training iterations ranges from 0 to 1000, the loss function value of the IAGA-BP model decreases the most rapidly, while that of the GA-BP model decreases the slowest.
After the model meets the termination conditions of the training cycle, it can be seen from
Figure 12 that the loss function values of the BP, GA-BP and IAGA-BP models on the training set are 2.42 × 10
−3, 1.68 × 10
−3 and 9 × 10
−4, respectively, among which the IAGA-BP model has the minimum loss function value. During the training process, none of the three models shows an upward trend in the loss function value during the decline phase, indicating that the models do not suffer from overfitting. When the number of training iterations of the IAGA-BP model reaches 912 and 3893, its loss function values are consistent with those of the BP and GA-BP models that have completed 10,000 training iterations, respectively. This indicates that when the loss function value is used as the training termination condition, the IAGA-BP model can achieve the expected results more quickly.
Figure 13 shows the fitting effect between the calculated values and the actual values of each model in the training set. It can be seen from the figure that the calculated values of the BP model, GA-BP model and IAGA-BP model are all basically close to the actual values; however, at most sample points, the calculated values of the IAGA-BP model have a higher degree of agreement with the actual values. This indicates that the IAGA-BP model has a better fitting effect on the strength of loess after drying–wetting cycles.
After the completion of model training, the well-trained neural network model was tested using a test set that did not participate in the training process. As can be seen from
Figure 14 and
Table 4, in the test set, the maximum absolute error of the IAGA-BP model is 1.88 kPa, which is lower than the corresponding values of 4.31 kPa and 3.1 kPa for the other two models. Its mean absolute percentage error (MAPE) is 3.75%, which is lower than the 6.92% of the BP model and 5.37% of the GA-BP model. The mean squared error (MSE) of the IAGA-BP model is 9 × 10
−4, representing performance improvements of 62% and 46% compared with the BP model and the GA-BP model, respectively.
It can be observed from
Figure 15 that the data points of the predicted values and target values of the IAGA-BP model are closer to the middle straight line. Further analysis of the discrete state of the models shows that the coefficients of determination (R
2) of the BP, GA-BP and IAGA-BP models are 0.942, 0.967 and 0.975, respectively. Among them, the IAGA-BP model has the largest coefficient of determination, while the BP model has the smallest one. This indicates that the IAGA-BP model has a better prediction effect on the strength of loess after drying–wetting cycles.
In summary, the IAGA-BP model outperforms the traditional BP model and GA-BP model in terms of fitting ability for the strength prediction of loess subjected to drying–wetting cycles, both for the training set and the test set. Therefore, the trained IAGA-BP neural network model is suitable for predicting the strength of loess after drying–wetting cycles. It can well reflect the relationships between the dry density, initial moisture content, cycle number, normal stress and shear strength, thereby providing a feasible solution for the shear strength prediction of loess undergoing drying–wetting cycles.
4.2. Discussion
4.2.1. Stability Analysis of the IAGA-BP Model
To more comprehensively evaluate the stability and generalization ability of the model and avoid the randomness caused by a single data split, a 5-fold cross-validation was conducted on the proposed IAGA-BP model. The specific method was as follows: all 80 sets of data were randomly divided into five mutually exclusive subsets (16 sets each). In each iteration, four subsets were used as the training set, and the remaining subset was used as the validation set. This process was repeated five times, ensuring each subset was used as the validation set once. The average performance metrics of the model over the five validations are shown in
Table 5.
As shown in
Table 5, the IAGA-BP model exhibits stable and high performance in the 5-fold cross-validation. It achieves an average MAPE of 4.06% and an average R
2 of 0.971, with very small standard deviations for all indicators. This demonstrates that the model performance is independent of the specific training–test data partition, indicating excellent robustness and repeatability. The average performance from cross-validation is highly consistent with the results obtained using the fixed split test set in
Table 4 (MAPE = 3.75%, R
2 = 0.975), which further verifies the reliability of the model’s prediction accuracy.
4.2.2. Comparison with Previous Studies
(1) Loess shear strength attenuation law under dry–wet cycles
The conclusion of this study that “the shear strength of loess shows staged attenuation with the increase of dry-wet cycle times and tends to be stable after 5 cycles” is highly consistent with the research results of Liu et al. [
5], Hu et al. [
6] and Zhao et al. [
7]. Liu et al. [
5] found that the strength of remolded loess stabilized after five dry–wet cycles through triaxial shear tests, and Zhao et al. [
7] confirmed the stable trend of loess shear strength after 3~5 cycles, which verifies the reliability of the test results of this study. This study further quantifies the attenuation amplitude of loess strength under different dry densities and initial water contents, and finds that the cohesion attenuation amplitude of northern Xinjiang silty loess (25%~39%) is slightly higher than that of Guanzhong loess [
7], which is due to the higher silt content and more fragile cementation structure of northern Xinjiang loess, supplementing the regional characteristic data of loess in arid and semi-arid regions.
(2) Influencing factors of loess strength parameters
Yuan et al. [
12] pointed out that the attenuation amplitude of loess strength decreases with the increase in water content, which is consistent with the conclusion of this study that “the higher the initial water content, the smaller the attenuation amplitude of strength parameters”. This study further supplements the quantitative influence of dry density (a key factor) and clarifies that the increase in dry density can effectively inhibit the attenuation of loess cohesion, which improves the influence factor system of loess strength evolution under dry–wet cycles. Bai et al. [
11] found through SEM tests that the cementation structure damage of loess mainly occurs in 0~3 dry–wet cycles, which is consistent with the result of this study that the maximum strength attenuation occurs in the first cycle, and the micro-mechanism of strength attenuation is mutually verified.
(3) Geotechnical parameter prediction based on intelligent algorithms
Regarding the geotechnical strength prediction by intelligent algorithms, Gu et al. [
22] optimized the BP model by principal component analysis with R
2 = 0.95 for cohesion prediction; Liu et al. [
24] optimized the BP model by the fireworks algorithm with MAPE = 5.2% for root-containing soil shear strength prediction; Shu et al. [
21] established a PSO-BP model for marine clay shear strength prediction with MAPE = 4.8%. The IAGA-BP model established in this study has a prediction accuracy of R
2 = 0.975 and MAPE = 3.75% for the loess shear strength, which is higher than the above studies. In addition, the IAGA-BP model only needs 912 iterations to reach the stable loss value, which is faster in convergence speed than the traditional intelligent optimization models [
21,
24], and shows significant advantages in the prediction of geotechnical parameters with small samples.
4.2.3. Applicability and Advantages of the IAGA-BP Model
The IAGA-BP model demonstrates superior predictive accuracy over traditional BP and GA-BP models under specific conditions:
Multifactorial interactions: When the input space involves multiple interdependent factors (e.g., dry density, initial water content, cycle number, normal stress), the improved algorithm maintains population diversity and avoids local optima, leading to better generalization.
Limited or unevenly distributed data: In cases where training samples are scarce or unevenly distributed, the adaptive crossover and mutation probabilities prevent overfitting and enhance robustness.
Nonlinear asymptotic degradation: The model effectively captures the sharp initial decline and subsequent stabilization of strength under dry–wet cycles, which is critical for accurate long-term prediction.
These advantages stem from the algorithmic improvements—optimized parent selection, uniform crossover/mutation, and adaptive probability adjustment—which collectively enhance the global search capability and convergence stability. Therefore, the IAGA-BP model is particularly recommended for predicting loess shear strength under cyclic drying–wetting conditions when high accuracy is required.
4.2.4. Interpretability of the IAGA-BP Model
The model selects the initial water content, dry density, number of drying–wetting cycles, and normal stress as input layer parameters, all of which are core physical factors that influence the shear strength of loess. The relationships between these parameters and loess strength conform to classical soil mechanics theory: The dry density determines the compactness of loess particles; a higher compactness leads to a larger contact area between particles, stronger cementation, and better shear resistance. The initial water content affects soil cohesion by changing the thickness of water films between particles and dissolving cementing materials. The number of drying–wetting cycles reflects the cumulative degradation of loess structure; increasing cycles cause irreversible damage to the cementation structure and gradual strength degradation. The normal stress directly determines the normal pressure on the shear surface and is positively correlated with the shear strength. The selection of the above input parameters strictly follows the physical mechanism of loess strength degradation, providing the model with fundamental physical interpretability.
The optimization of the initial weights and thresholds of the BP neural network by the Improved Adaptive Genetic Algorithm (IAGA) is not indiscriminate pure mathematical iteration but matches the priority of the influences of various physical factors on loess strength. Adaptive crossover and mutation operators constructed via the Sigmoid function enable the model to assign higher weights to dominant factors, such as the number of drying–wetting cycles and dry density, and reasonably weaken the weights of secondary factors. This is consistent with the conclusion obtained from laboratory tests that “the number of drying-wetting cycles is the dominant factor for loess strength degradation, and dry density is an important influencing factor”. Meanwhile, the optimized parent selection strategy retains “gene segments” related to soil mechanics in low-fitness individuals, avoiding the neglect of special laws of loess strength evolution (such as the strong degradation effect of the first drying–wetting cycle) caused by premature convergence of the algorithm. This ensures that the optimization logic of the algorithm matches the hierarchical relationship of loess strength influencing factors, further improving the physical interpretability of the model.
The high prediction accuracy of the IAGA-BP model is based on the physical mechanism of loess strength degradation. Its prediction results can be comprehensively interpreted through the macro-mechanical characteristics of loess, showing satisfactory physical interpretability and engineering applicability.
5. Conclusions
Aiming at the problem of channel slopes in loess areas, this paper carries out indoor shear tests of loess under the action of drying–wetting cycles. Based on the indoor test data, a loess strength prediction model based on the IAGA-BP algorithm was established. The main conclusions are as follows:
In terms of the evolution law of loess shear resistance under drying–wetting cycles, the following can be stated: (1) The shear strength and strength parameters of loess show a staged attenuation with the increase in drying–wetting cycles. The deterioration is the most significant after the first cycle, and the attenuation amplitude gradually decreases with the increase in cycle times, tending to be stable after 3–5 cycles. (2) The dry density and initial moisture content have significant effects on shear resistance. Under the same cyclic conditions, the higher the dry density, the smaller the attenuation amplitude of cohesion; the higher the initial moisture content, the weaker the deterioration degree of shear strength parameters, reflecting that high compactness and appropriate water content conditions have a stabilizing effect on soil structure.
In terms of the performance of the IAGA-BP loess strength prediction model, the following can be stated: (1) By optimizing the parent selection mechanism, improving the crossover genetic method, introducing adaptive crossover and mutation probabilities, and implementing the global optimal individual retention strategy, the global search ability and convergence stability of the algorithm are significantly improved. (2) Compared with the traditional GA-BP and BP models, the IAGA-BP model reduces the mean absolute error (MAE) and mean squared error (MSE) by 30.2% and 46.4% respectively, and the comprehensive prediction performance is improved by about 46% and 62% respectively. It effectively overcomes the problem that traditional models are prone to fall into a local optimum and has a higher prediction accuracy and robustness.
6. Limitations and Future Outlook
Although the IAGA-BP model for predicting the shear strength of loess under drying–wetting cycles established in this study exhibits favorable performance, it still has certain limitations. Future research can be carried out regarding the following aspects:
Data dimension and model generalization ability:
The data used for model training in this study were all derived from laboratory tests, which have limitations in terms of the sample size and feature representativeness. The model does not consider the effects of key factors such as soil gradation and dry–wet cycle amplitude, which restricts its generalization ability to a certain extent. In future research, more parameters related to the loess structure and cyclic conditions can be systematically introduced, and sensitivity analysis can be conducted to establish a prediction model with stronger universality and interpretability.
Algorithm fusion and performance optimization:
The current model is mainly optimized based on the improved genetic algorithm. In the future, attempts can be made to combine it with other intelligent optimization methods, such as particle swarm optimization and ant colony optimization, or to explore hybrid modeling paths with machine learning models, such as support vector machines, so as to further improve the convergence speed, prediction accuracy and stability of the model.