On the Use of an Improved Artificial Fish Swarm Algorithm-Backpropagation Neural Network for Predicting Dam Deformation Behavior

State Key Laboratory of Hydrology-Water Resources and Hydraulic Engineering, Hohai University, Nanjing 210098, China College of Water Conservancy and Hydropower Engineering, Hohai University, Nanjing 210098, China National Engineering Research Center of Water Resources Efficient Utilization and Engineering Safety, Hohai University, Nanjing 210098, China College of Agricultural Engineering, Hohai University, Nanjing 210098, China Technological Institute of Merida, Technological Avenue, Merida 97219, Mexico


Introduction
Dam failures are generally catastrophic if the structure is breached [1]. Dam is a complex system, which comprises many interconnected components, such as the dam body, the spillway, the power plant, etc. Dam behavior is intrinsically difficult to predict due to the interactions between their components or between the given dam system and its environment. rough dam safety monitoring, prototype observations on dam behavior can be obtained. Among the various observations, the most important indicator is deformation [2]. Over the past years, researches have dealt relatively well with the dam deformation through models, based on prototype observations [3][4][5][6]. e prediction models, in the context of dam safety monitoring, offer a solution, by first creating knowledge from previous experiences and learning the model parameters, in order to predict the dam behavior from possible input data [7]. ey have the attractiveness of being robust and effective with insufficient input information, noise, and uncertainty [7]. Notable data-based behavior models include the genetic algorithm (GA) [8,9], particle swarm optimization (PSO) [10], differential evolution (DE) [11], gravitational search algorithm (GSA) [12], harmony search algorithm [13,14], support vector machine (SVM) [15], dendritic neuron model (DNM) [16,17], boosted regression trees [18,19], extreme learning machine [20,21], and artificial neural network (ANN) [22]. e artificial neural network (ANN) [23,24] is useful for detecting nonlinear patterns and has been widely used in many different domains, including dam engineering [25][26][27].
To train the neural network in an efficient manner, tools such as backpropagation algorithm (BP) [28] are used in the data-based behavior models. e BP neural network [29] algorithm is a multi-layer feedforward network, trained according to error backpropagation algorithm, and it is one of the most widely applied neural network models. BP network can be used to learn and store a great deal of mapping relations of input-output model and requires no previous knowledge of the mathematical equation describing the mapping relationships. Its learning rule is to adopt the steepest descent method, where the weight value and threshold value of the network are regulated to achieve the minimum sum-of-squared error between the desired and computed output [30].
Despite the fact that the use of BP algorithm is justified [31] for most conditions, problems might appear in the solution of complex descent gradients due to inherent trapment of local rather than global minima [32]. In recent years, researchers have been investigating approaches to counteract this disadvantage, such as defining modified [33] or hybrid forms of BP algorithms. In particular, the hybrid form has gained fresh prominence in the dam deformation models with many arguing it leads to fasterconverging and better results, as opposed to the original BP algorithm [34].
is paper proposes the hybrid BP and artificial fish swarm algorithm (AFSA) model for understanding dam behavior. e AFSA [35] has been employed to optimize the swarm intelligence. e basic premise of the AFSA is to imitate the fish behaviors such as preying, swarming, and chasing, where the search of fish individuals leads to the global optimal solution [35]. is approach contributes to accurate results, high rate of convergence, flexibility, and tolerance to failure [36,37]. To enhance its optimization performance, a novel variant has been proposed, named improved artificial fish swarm algorithm, or IAFSA. In this crossover operator, the artificial fish acquire their parents' attributes, promoting the diversification and rising the likelihood of attaining the global optimal solution. e rest of the paper is organized as follows. In Section 2.1, the statistical relations between loads and deformation behavior are briefly introduced. Section 2.2 deals with the concepts of improved artificial fish swarm algorithm (IAFSA). Artificial neural network (ANN) and backpropagation (BP) algorithm are introduced in Section 2.3 and Section 2.4. In Section 2.5, the overall structure of hybrid-learning algorithm, IAFSA-BP, is introduced for training the ANN. A dam case study is described in Section 3. In Section 4, the prediction accuracy and potential of the proposed algorithm are verified. And discussions and conclusions are given in Sections 4 and 5, respectively.

Statistical Relations between Loads and Deformation
Behavior of Dam. In order to provide reliable structural responses, the mechanisms of the factors influencing the dam deformation behavior need to be investigated and reproduced in a simple but yet accurate way [38]. Statistical (also hydrostatic-season-time (HST) model) methods fit this criteria.
In this sense, a multi-period harmonic can be selected as the factor of dam temperature variation, once the hydration heat has been distributed and the quasi-steady temperature field has been reached in the dam body. e statistical relations between loads and the deformation behavior of the dam (δ) can be described as the sum of three terms: the temperature variation, the hydrostatic pressure variation, and other unexpected causes, such as time effects. It is [38] where δ H is the hydrostatic pressure component; δ T is the temperature component; δ θ is the time effect component; a 0 is constant; a i , b 1i , b 2i , c 1 , and c 2 represent coefficients; H is water load; m 1 is an integer dependent on the dam type (3 for gravity dam, 4 or 5 for arch dam); i denotes the period (1 for annual cycle, 2 for half a cycle); t is the cumulative number of days from the initial value to monitoring value; θ � t/100; and m 2 is usually taken as 1 or 2. e effect of hydrostatic thrust, seasonal environment, and irreversible time-dependent conditions are regarded as inputs of the ANN.

Review of Artificial Fish Swarm Algorithm.
In nature, an area occupied with large fish number is generally nutritious. e fish can discover the most nutritious area by intelligent behaviors, such as preying behavior, swarming behavior, following behavior, etc. [35]. e artificial fish swarm algorithm (AFSA) is an artificial intelligent algorithm based on the behavior of fish swarm.
is algorithm is capable of reaching the global optimum by imitating the collective movement of artificial fish (AF) [36,39]. e AFSA has attractive features, such as good robustness, global search ability, tolerance of parameter setting, and insensitiveness to initial values [35,36]. e vision concept of the AF is illustrated in Figure 1. From the graph, the term Step is the step length and the Visual is the visual distance. e spatial coordinate of the AF is represented by X � (x 1 , x 2 , x 3 , . . . , x n ), where x i is a potential solution.
e food consistence of the AF in its current position is denoted by the objective function, e distance between adjacent AF individuals (ith and jth) is expressed as D ij � ‖X i − X j ‖ and the crowd factor is Δ.
2 Complexity e fish behavior relies on inspecting the nearby region, up to where a behavior condition is met. us, if the AF is conditioned to step forward in a direction, it arrives to X next ; otherwise, it continues inspecting within its visual range. e refreshed position can be described as where X v is a position within the vision; Rand are randomly generated numbers between zero and 1; and n is the number of variables; others are the same as above. e AF model contains four classical behaviors: preying behavior, swarming behavior, following behavior, and random behavior.
(1) Preying Behavior. Preying behavior is mainly considered as a kind of behavior of tending to more food. Within the context of optimization algorithm, it is an iterative way of moving to a more nutritious area, such as in the visual concept in the AF.
Let the current location of the AF be X i , and a random position in the visual range be X j . en, take the maximum problem as an example (because the maximum problem can be transformed into minimum problem via the reciprocal of the objective function) and the position becomes where other terms are the same as above. us, if the objective criterion, Y i < Y j , is met, the AF steps forward in this direction; otherwise, select a new random location X j , and execute the objective condition. If the condition is not satisfied, after a specified number of times, called the try_number, step randomly. In the preying behavior, a small try_number implies the AF swims randomly and thus diverges from the local extreme value field. e refreshed position is where the terms are the same as above.
(2) Swarming Behavior. e swarming behavior can be described, using two rules from Reynolds [40]: To move to the center of the nearest companions as much as possible.
To avoid overcrowding, so the swarming ability of the artificial fish can be basically realized. When travelling, the fish assemble in groups naturally to avoid danger and guarantee the existence of the colony. Let X c be the center of this gathering area where n is the total fish population.
Let n f be the number of AF's companions in the neighborhood (d ij < Visual). If (Y c /n f ) > δY i , it means the AF's companion center has more food (higher fitness function value), with a small crowd factor; hence, the AF steps to the companion center; otherwise, the AF executes the preying behavior. e updated position conditions are where the terms are the same as above.
(3) Following Behavior. e following behavior can be understood as moving towards the best neighbor companions. In the random behavior, the direction is not specified due to a lack of purpose.
Let X i be the AF current position, and the companion in the neighborhood (d ij < Visual) with the greatest food consistence X j . If (Y j /n f ) > δY i , the AF steps forward due to companion's higher food concentration (higher fitness function value) with spacious surrounding; otherwise, it follows the preying behavior. e conditions are Step Visual Figure 1: Vision concept of the artificial fish.
Complexity 3 (4) Random Behavior. e fish swim randomly in water; in fact, they are seeking food or companions in larger ranges. It is the default behavior of preying. e AF location is where the terms are the same as above.
2.2.2. Improved ASFA. AFSA's system is based on the collective behaviors of AFs. An arguable weakness of the AF is its seeking ability in large or flat areas. More precisely, as the local optimum is searched and updated to its self-organized system [37] by an individual AF, others companions behave chaotically, thus reducing the seeking efficiency of the global optima.
To improve the performance of AFSA, a crossover operator is embedded into the AFSA, using genetic algorithm for reference. e crossover operator combines the features of two individuals and creates a potential better offspring. e search of the global optima is improved as well by allowing some uncertainty.
In every iteration, a specified number of AF are put in the pool, according to the crossover probability. Initially, the crossover is operated between every AF, in order to generate a corresponding child AF. e child AF replaces the parent AF and its position is given by the arithmetic crossover of the parent AF: where the terms are the same as above.
Finally, a new fish swarm is produced from the iterative procedure.

Artificial Neural Network (ANN).
e artificial neural network (ANN) is a mathematical model vaguely inspired by the biological neural networks of animal brains [41]. e single hidden layer, feedforward neural network is the simplest unidirectional (input to output) form, consisting of three layers: input, hidden, and output. Figure 2 depicts this. Perhaps, the greatest advantage of this method (multi-layer perceptron with just one hidden layer), according to the universal approximation theorem, is its ability to approximate every (real-valued) bounded function [42]. It is therefore used for a wide range of activation functions, e.g., sigmoid function [43], and for both classification and regression problems. For regression, typically l � 1, with one output unit (δ) at the top [44].
For dam deformation prediction, a popular approach is to first transform the raw observation data on dam deformation via the statistical model (equation (1)). en, the features (hydrostatic components, temperature components, and time effect components) become the inputs of the neural network. Finally, the output becomes the observation data, δ, from the deformation behavior.

Backpropagation (BP) Algorithm. Backpropagation (BP)
algorithm is a widely used algorithm in training feedforward neural networks. e backpropagation algorithm works by computing the gradient of the loss function with respect to each weight by the chain rule. More explicitly, it computes the gradient of one layer at a time by iterating backwards (from the last layer) to avoid redundant calculations from intermediate terms in the chain rule [45].
As seen in Figure 2, given the training set (x HST 1 , is the observation data on dam deformation) in the neural network, let there be p input neurons, one output neuron, and q hidden neurons. e threshold value of the jth hidden layer neuron is θ j . In a similar way, let α j � p i�1 ω ij x i be the input of the jth hidden layer neuron, where ω ij represents the connection weight from input neuron i to hidden neuron j, and β � q j�1 v j b j , the input of the output layer neuron, where v j represents the connection weight from the hidden neuron j to the output neuron and b j denotes the output of the jth hidden layer neuron. en, the network output of the kth training data (x HST k , δ k ) may be described as where f is the activation function and c denotes the threshold value of the output layer neuron. And the fitting error of the kth training data is calculated: e iterative procedure of the BP algorithm is described in the following steps: (1) Compute the network output δ k .

Hybrid IAFSA-BP-ANN Model for Predicting Dam Deformation
Behavior. e two AFSA and BP algorithms are combined into a hybrid-learning algorithm, referred to as IAFSA-BP, to overcome their standalone shortcomings. e IAFSA-BP algorithm's searching process starts with a random AF group, where the IAFSA algorithm is executed to attain the global best position. Subsequently, the BP algorithm is used to search for the global optimum, leading to an overall faster convergence and high accuracy results. e procedure of the IAFSA-BP neural network prediction model is summarized in Figure 3. e proposed model couples three stages.
In Stage 2, the ANN is trained on the training set and its performance is compared with the validation set.
Step 1. Determine the topology of the neural network. Initialize the weights and thresholds of the neural network in the range of [0, 0.1]. Notice every AF represents a set of weights and thresholds of the neural network. e number of parameters to be identified is p × q + 2q + 1, as shown in Figure 2.
Step 2. Implement the following behavior, swarming behavior and preying behavior (the default behavior).
Step 3. Use the function that calculates the validation error of basic BP neural network as the fitness function (food consistence) of IAFSA algorithm. IAFSA algorithm is used to train the weights and thresholds.
Step 4. Evaluate the behavior of AFs. Every artificial fish (AF) tries to find better food consistence position by simulating swarming behavior and following behavior, respectively. If this is successful, choose the better one to perform; otherwise, perform preying behavior.
Step 5. Operate the arithmetic crossover; then, generate the new fish swarm.
Step 6. If the maximal iteration times are arrived, go to Step 7; else, go to Step 2.
Step 7. Output the optimal weights and thresholds of the ANN.
After defining the training, validation, and testing set, with a number of examples, the ANN with the best validation set performance is chosen and demonstrated against the testing set. e solution of the maximum problem is taken as an example, and the reciprocal of validation set error is set as the food consistence of the fish swarm.
Ultimately, Stage 3 deals with the deformation simulation of the dam. δ(t + 1), δ(t + 2), . . . , δ(t + ?) is the prediction over the testing set. e schematics of the stages are presented in Figure 3.

Case Study
e data used for the study correspond to a concrete arch dam, located on the Yalong River in China. It is a double curvature arch dam, completed in 2014, made up of 26 sections, with a maximum dam height of 305 m. e width of the dam's crest and bottom is 16 m and 63 m, respectively. e reservoir capacity is 7.76 billion m 3 . Figure 4 depicts the dam, as well as the location of the monitoring device. Using the available records, the study focused on the radial displacements measured by pendulum PL13-1 (along the upstream-downstream direction). Figure 5 shows the records, divided into three sets: training (first 80% sample), validation (middle 10% sample), and testing (last 10% sample); the displacements toward upstream are negative, and towards downstream, positive. e training set is used to calculate gradients and update connection weights and threshold values of ANN. In the validation range, the output error is the food consistence (fitness function) in the current position of each AF; namely, food consistence � 1/error validation , where error validation is typically the sum of the squared errors. In the model, the objective of pursuing the error's minimum is converted to the maximum value of food consistence.
e goodness of the model accuracy is computed in terms of the root mean squared error (RMSE), a measure of the differences between predicted values and observed values. e magnitude and the deviation of the target variable are determined with the average relative variance (ARV) [18,46]. ey are defined as where n is the length of the analyzed data set; δ i is the observation on deformation behavior; δ i is the predicted values; δ is the observation mean; δ MSE is the mean square error, and δ MSE � (1/n) n i�1 (δ i − δ i ) 2 ; and σ 2 is the variance of the analyzed data set. e statistical model is the most widely applied in dam engineering [5]. rough the statistical model, the wide knowledge in analyzing the behavior of concrete dams provides the prior knowledge between the loads and the deformation. It will be helpful for the data-based models' prediction accuracy, such as ANN. us, according to the statistical relations between the loads and the deformation (equation (1) in the performance of the ANN [47,48]. Because the robustness of the neural network is influenced by the hidden layer, in order to achieve better accuracy, the Hecht-Nielson method [49] is adopted to determine the neuron number of the hidden layer; thus, when the neuron number of the input layer is p, the neuron number of the hidden layer is q � 2 p + 1. e ANN of the study comprised an input layer with 10 parameters (input), a hidden layer with 21 nodes, and an output layer with one parameter (to denote the upstream-downstream radial displacement of the PL13-1 pendulum). us, the neural network structure is 10-21-1. e hidden layer's activation function was assumed as a sigmoid function (equation (15)), and the output layer's activation function was a linear function (equation (16)). e Levenberg-Marquardt algorithm was used in the training process:    Complexity y � x. (16) Considering that the AF's position represents the connection weights and thresholds of the ANN, every AF consisted of p × q + 2q + 1 � 253 parameters. e component varies from 0 to 1. Table 1 provides the values for other IAFSA parameters. Figure 6 presents the optimization process of the IAFSA, which is also the minimal validation set errors varying with the iteration times. When the iteration time reached 6, the validation error converged. IAFSA-BP-ANN predicted results versus observations for PL13-1 is shown in Figure 7. Figure 7 compares observed and computed displacements of training set, validation set, and testing set obtained by IAFSA-BP-ANN for PL13-1 pendulum. It provides an intuition on the good performance on the training set, validation set, and testing set.

Model Comparison.
e prediction accuracy and potential of the proposed model are verified against four popular methods: the statistical model, the backpropagation neural network optimized by GA (GA-BP-ANN), the backpropagation neural network optimized by PSO (PSO-BP-ANN), and the backpropagation neural network optimized by AFSA (AFSA-BP-ANN).
Due to the lack of validation in the statistical model, its training is set to 90% of the sample, compared with the remaining models' 80%. It is crucial to bear in mind the conceivable bias in the comparisons, since increasing the amount of training leads to a better performance. e structure 10-21-1 was adopted for the GA-BP-ANN, PSO-BP-ANN, AFSA-BP-ANN, and IAFSA-BP-ANN models. Ceteris paribus, the higher the accuracy, the better the model. Figure 8 depicts the optimization processes of the models, except for the statistical model. e IAFSA has a convergence after 6 iterations (Error � 0.6), the fastest of all, with a trend being similar to but slightly less accurate (higher error) than the AFSA. e converged error of the PSO is relatively high, about 2.5, although its convergence speed is modest (19 iterations). e GA performs the worst, by attaining a convergence after 45 iterations, with a mean squared error (δ MSE ) of 17.
For reasons of comparison clarity, only the predicted outputs of the testing set and their residuals are displayed in Figures 9 and 10, respectively. IAFSA-BP-ANN's predictions can be seen from the testing period of Figure 7. All the models capture the overall trend of the testing set, although the accuracy varies to a large extent, according to the model and the range of the testing set. For example, the PSO predicts poorly the curve at first-half stage but then improves dramatically, having minimal, if any at some points, residuals ( Figure 10(c)). On the contrary, the modest predictions of the statistical model deteriorate slightly over time (Figure 10(a)). e GA predicts accurately the last portion of the observations but underpredicts beforehand. e AFSA captures the beginning and end relatively well but fails to capture the intermediate process and initiation of the plateau. e IAFSA yields good results and contains the least error deviations (low overall residuals, see Figure 10(e)).
To analyze the results in a quantitative way, two performance indices (equations (13) and (14)) are adopted in this study. In Table 2, a comparison of the set fitting is made between the four methods, in terms of their root mean squared error (δ RMSE ) and average relative variance (δ ARV ).
e lowest values are in bold fonts. It is apparent from this table that a good fitting to the training set does not consequently result in accurate predictions of validation, or a good validation into reliable simulations of testing. For example, the GA-BP-ANN showed the best performance for the training set but was the worst for validation (overfitting). e validation errors of the AFSA-BP-ANN were the smallest but similar to the PSO-BP-ANN's, AFSA-BP-ANN's, and IAFSA-BP-ANN's. e IAFSA-BP-ANN, the proposed model, achieved the best testing results, even if its training yielded the worst but moderate results. Iterative process of IAFSA    e variance (σ ε ) of the residuals (ε i ) for the five models is given in Table 3. As observed, the two statistical estimators, σ ε and n i�1 ε i 2 , of the IAFSA-BP-ANN are the lowest, thus implying the narrowest confidence interval under the same level of significance. In light of the good prediction accuracy, the IAFSA-BP-ANN can be adopted for a health evaluation of the dam's deformation behavior, in order to obtain good performance and less false alarms.
It is sometimes commented that the proposed model is not based on the principles of mechanics but only the knowledge of statistical nature. Although this may be true, nevertheless, the physical behavior is intrinsic to the observed values (i.e., the observations are statistical data but are still governed by the actual behavior of the structure [22]), and thus, the statistical-based model predictions are reasonable and practical.
To more precisely assess the performance of each optimization algorithm, they are tested for 30 independent runs and their performance indices (δ RMSE and δ ARV ) are calculated. BP-ANN is taken to highlight the effect of IAFSA.
en, solution distribution of 30 independent runs by using BP-ANN, GA-BP-ANN, PSO-BP-ANN, AFSA-BP-ANN, and IAFSA-BP-ANN is depicted in Figure 11. Tables 4 and 5 show the mean values of the performance indices and the p values of IAFSA in comparison with other algorithms.
e best values of performance indices are highlighted in boldface in Tables 4 and 5. ere is not a great difference between performance indices for all the algorithms on the training set. e validation results are similar except GA-BP, which is overfitting. From them, we can see that testing accuracy of IAFSA-BP-ANN outperforms other algorithms.
One-way analysis of variance is adopted to detect the differences between the behaviors of IAFSA and the compared algorithm (Tables 4 and 5). A p value smaller than 0.05 signifies significant difference between IAFSA and the compared algorithm. According to Figure 11 and Tables 4 and 5, IAFSA shows better generalization ability than the other algorithms. e results are consistent with the former analysis.

Conclusions
In this paper, an IAFSA-BP-ANN model was proposed to forecast the dam deformation behavior, specifically the crest radial displacements. e input of the model was generated from the statistical relations between loads and deformation behavior of dams. e IAFSA was chosen for its global search ability, and the BP, for its local search ability. e combined algorithm overcame their standalone shortcomings. A case dam study was used to verify the model, along with other four methods: statistical model, GA-BP-ANN, PSO-BP-ANN, and AFSA-BP-ANN. e superiority of the proposed model was demonstrated in a quantitative manner (error graph, root mean squared error δ RMSE , average relative variance δ ARV , etc.). e main advantage of the IAFSA-BP-ANN was its high prediction accuracy, fast convergence speed, and low residuals performance indices, thus, implying a narrow confidence interval and less dam's false warnings. Additionally, the proposed model is linked with engineering experience, namely, the most popular data-driven model, the statistical model.
As for dam safety monitoring, the data-based behavior models should never be the only source of information to make assessment. Law-based behavior models, such as finite element analysis, should be taken into account. In future works, the model effectiveness can be tested with more available dam information to provide greater insights into dam deformation behavior.

Data Availability
e monitoring data of the ultrahigh arc dam used to support the findings of this study are available from the corresponding author upon request.