# Application and Comparison of Machine Learning Algorithms for Predicting Rock Deformation in Hydraulic Tunnels

Authors: Yixin Liu; Xuhua Ren; Jixun Zhang; Yuxian Zhang
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Prediction of tunnel surrounding rock deformation is important for tunnel construction safety evaluation. In this paper, machine learning algorithms are used to carry out a comparative study of the surrounding rock deformation prediction. The applications of Gaussian process regression (GPR), support vector machine (SVM), and long short-term memory network (LSTM) in the prediction of surrounding rock deformation sequences are compared and analyzed. The actual data of a diversion tunnel in a southwest region are used as an example to evaluate and compare the single-step prediction model and multistep prediction model established by the above algorithm. The results show that the machine learning algorithm has good operation effect on the prediction of surrounding rock deformation. Overall, the SVM model has the best prediction effect and outperforms the other two algorithms in terms of tracking the trend of data changes and the degree of data fit.


---

## Body

## 1. Introduction

Rock deformation refers to the change of shape and volume of the rock around the underground cavern and the dislocation of the cavern wall. This phenomenon is generally caused when excavating underground cavities. And the amount of deformation of unreasonable surrounding rocks may trigger ground settlement and collapse, water gushing and rock explosion, and other engineering problems, eventually leading to the wreckage of underground tunnels, causing social losses, and casualties. Therefore, it is of great practical engineering significance to carry out real-time monitoring and safety evaluation of surrounding rock deformation during the construction process and operation of underground cavern projects. The traditional manual approach of building empirical models to solve problems based on measurement data suffers from significant limitations in experience and complexity, which can be remedied by machine learning's ability to capture data and learn from its trends. With the dramatic increase in computer performance, the efficiency of machine learning has also increased dramatically and is therefore widely used in various fields.Many attempts have been made in the field of machine learning for surrounding rock deformation prediction. In terms of support vector machines (SVM), Goh et al. [1] demonstrated the predictive power of support vector machines in the mechanical properties of rocks. Yao et al. [2–4] did a lot of research on the application of support vector machine to predict the surrounding rock deformation, proposed SVM-based single-step prediction model and multistep prediction model for surrounding rock deformation, and gave an evaluation of the performance of these models and carried out optimization work. Shi et al. [5] established a prediction model for tunnel displacement settlement based on SVM and demonstrated the excellent performance of SVM in predicting tunnel surrounding rock deformation in conjunction with actual engineering. In terms of Gaussian process regression, Xie et al. [6] proposed a prediction method based on optimized GPR surrounding rock deformation and verified the predictive capability of the GPR prediction model in combination with actual engineering. Liu et al. [7] introduced Gaussian process regression (GPR) into tunnel construction surrounding rock deformation prediction to overcome the problems of existing models and won the comparison with support vector machines. Zhang et al. [8] also improved and studied the application of GPR in the prediction of surrounding rock deformation and proposed a time series-based GPR prediction model for its application in predicting surrounding rock deformation during the tunnel construction period; in terms of neural networks, most of the research results for surrounding rock deformation prediction tend to favor the traditional neural network prediction model in the prediction of surrounding rock deformation in underground caverns. The ability of traditional neural network prediction models in predicting the surrounding rock deformation of underground caverns is inferior to that of SVM and GPR [9,10]. On this basis, in order to make the comparative work of this paper more meaningful, this paper introduces the long and short-term memory network (LSTM) for comparative study. In terms of research on LSTM, Yang et al. [11] proposed an LSTM-based method for concrete dam deformation prediction and verified the effectiveness of the model in concrete dam time series deformation prediction by example. Hu et al. [12] developed an LSTM-based combined prediction model for dam deformation and compared it with SVM in an example, arguing that LSTM has a more excellent prediction performance. Hu et al. [13] demonstrated the excellent performance of LSTM on time series prediction. All these studies demonstrate the potential of LSTM in predicting the deformation of surrounding rock in the underground cavern.The above study demonstrates the feasibility as well as the potential capability of machine learning for surrounding rock deformation prediction. However, little work has been done to compare the application of these computational intelligence methods in the prediction of surrounding rock deformation, and the study of comparative work is of guidance for the application of these methods in surrounding rock deformation, which can comprehensively evaluate the prediction performance and prediction accuracy of various methods. In addition, for LSTM, its prediction work in the underground cavern surrounding rock deformation has hardly been carried out, so this paper also verifies whether LSTM can predict the tunnel surrounding rock deformation. The purpose of this research is to conduct a comparative study of computational intelligence methods, including gaussian process (GPR), support vector machine (SVM), and long short-term memory network (LSTM) in surrounding rock deformation prediction. These three techniques are typical computational intelligence methods that are widely used in engineering applications. In order to conduct a comparative study, the example of the Guzeng diversion tunnel in Liangshan, Sichuan Province, China, was taken. Divided into single-step prediction and multistep prediction modeling, these three computational intelligence methods are applied to the prediction of surrounding rock deformation in the tunnel, and the results of the three methods are analyzed and compared.


## 2. Methodology

### 2.1. Long Short-Term Memory (LSTM)

Long short-term memory (LSTM) [14] is used as a special type of recurrent neural network (RNN) in the autoregressive (AR) mode, which is deliberately designed to avoid long-term dependency problems and can be designed to remove the standard “healthy” components from the signal. Compared with RNN, LSTM can achieve long-term dependence and avoid the occurrence of gradient explosion and gradient disappearance. LSTM designs effective “gates” within the framework of each cycle to form different structures [15] that allow information to be selected for passage; that is, input gates, forgetting gates, and output gates are used to protect and control information. Since LSTM networks can learn long-term correlations in sequences, they do not require a prespecified time window and can accurately model complex multivariate sequences [16]. xt and ht−1 are the input at moment t and the hidden layer at moment t-1, respectively. The three gates at the core of typical LSTM, the forgetting gate ft, the input gate it, the output gate Ot and the information storage unit C˜t that are updated to completion at moment t can be expressed as follows [17]:(1)ft=σWfxt+Ufht−1+bf.(2)it=σWixt+Uiht−1+bi.(3)Ot=σWOxt+UOht−1+bO.(4)C˜t=tanhWCxt+UCht−1+bC.(5)Ct=ft⊙Ct−1+it⊙C˜t.(6)ht=Ot⊙tanhCt.These three gates control the forgetting of the long-term stateCt−1 at the previous moment, the preservation of the temporary state C˜t at the current moment, and the transfer of the long-term state Ct to the hidden layer ht at the current moment, respectively. The gates are the forgetting gate, the input gate, the output gate, and the parameter matrix of the new information from the input layer to the hidden layer, respectively, where Wf, Wi, WO, and WC are the forgetting gate, the input gate, the output gate, and the parameter matrix of the new information from the input layer to the hidden layer, respectively. Uf, Ui, UO, and UC are the cyclic parameter matrix, and bf, bi, bO, and bC are the deviation matrix; σ is the sigmoid function, and ⊙ is the multiplication operator of the matrix. The long-term state is processed through the tanh layer, and then the result Ot of filtering through the output gate is multiplied to output ht.LSTM can achieve long-term dependence, and it can effectively avoid gradient explosion and gradient disappearance. Facing problems and tasks that are sensitive to time series, LSTM is usually more suitable. As a nonlinear model, LSTM with special implicit units can preserve the input for a long time, which can provide powerful guarantees for time series-based prediction. These features make LSTM good for the task of predicting the surrounding rock deformation in underground caverns.


### 2.2. SVM

The SVM method is now available for multivariate classification problems and is a supervised learning model [18,19]. In addition to data classification, prediction and regression are extensions of support vector machines to mathematical problems and are known as support vector machine regression [20,21]. SVR models can generate regression functions by applying a set of high-dimensional linear and nonlinear functions using kernel functions. SVM applies the concept of ε-excitation loss function and is highly robust in prediction. Its core is to determine a separation hypersurface to make the desired risk as minimal as possible.Under the given sample,D=xi,yiin, where xi∈ℝn is the input vector, and yi is the target vector. Our final goal is to obtain the optimal fx=wϕx+b to approximate the target vector, with the deviation ε being strictly limited. Therefore, the parameters to be determined can be calculated by the following equation:(7)minw,b12ω2+C∑i=1nζi+ζi∗.(8)fxi−yi≤ε+ζi,yi−fxi≤ε+ζi∗,ζi,ζi∗≥0,i=1,…,n.The first term of the function is the canonical term, and the second term is the error risk.C is the penalty factor. To find the equations of the parameters to be determined, or the parameters ω and b to be determined in the objective function, the Lagrange function is constructed on this basis, the Lagrange multipliers are introduced, and the following constraints are added:(9)Lw,b,α,α∗,ζ,ζ∗,μ,μ∗=12w2+C∑i=1nζi+ζi∗−∑i=1nμiζi−∑i=1nμi∗ζi∗+∑i=1nαifxi−yi−ε−ζi+∑i=1nαi∗fxi−yi−ε−ζi∗.Converting to the pairwise problem of SVR, the solution of SVR is(10)fxi=ωTϕxi+b=∑i=1nαi∗−αiKxi,x+b.where ai and ai∗ are for Lagrange multipliers and b is a scalar threshold. Clearly, the support vector is the only element of the data points used to determine the decision function. The above approach can be further extended to nonlinear surfaces, and SVR uses kernel function Kxi,x to transform the nonlinear inputs into a high-dimensional feature space without the need for realistic computational mapping.SVR has been successfully applied to solve various time series prediction problems, and it performs very well in avoiding overfitting problems. For time series-based data such as surrounding rock deformation during underground cavern excavation, these characteristics of SVR are very suitable for prediction.


### 2.3. Gaussian Process Regression

Gaussian process is a stochastic process indexed by dimensions such as time and space. The essence of the Gaussian model is a regression model for uncertainty prediction of the distribution of output variables using a nonparametric probabilistic model [22,23] whose variables show the nature of a normal distribution for any linear combination; that is, the Gaussian process is a generalization of the Gaussian distribution. The form of GPR developed from GP is a variant of “inert learning” in machine learning. The Gaussian distribution reflects the distribution between random variables, while the Gaussian process represents the distribution between functions. The purpose of regression modeling is to establish a functional relationship y=fx that can describe the training data. For the output variable y, it is assumed that the output values satisfy the following equation:(11)Yi=fXi+εi.Here, X = [ X1, X2…XN] denotes the input samples, Y = [ Y1, Y2…YN] denotes the observations, f () denotes an arbitrary basis function, εi denotes Gaussian noise with zero mean, and N is the number of samples.The observed value Y and the predicted valueY∗ should satisfy(12)YY∗∼N0,k+σ2IkX∗k∗XkX∗,X∗.k=ki,j and k∗X=kX∗,X1,…,kX∗,XN，where ki,j=kXi,Xj=covYi,YjThe predictive distributionpY∗|Y for Y∗ should be a Gaussian distribution with variance and mean:(13)Y¯∗=k∗Xk−1Y.(14)σY∗2=k∗∗−k∗Xk−1KX∗.In the GPR model, the performance of the most commonly used covariance is crucial [24], and the covariance between individual dimensional features can be modeled by a Gaussian process kernel (kernel). The common types of kernels are Squared Exponential Kernel, Exponential Kernel, Matern 3/2, Matern 5/2, and Rational Quadratic Kernel.The GPR model has the advantages of easy implementation, adaptive acquisition of hyperparameters, and probabilistic significance of the predicted output. It is suitable for dealing with nonlinear complex and complicated regression problems. Based on the above characteristics, GPR has become a classic algorithm for dealing with deformation of surrounding rock in underground caverns.


### 2.4. Analysis of the Advantages and Disadvantages of the Algorithms

The advantage of LSTM is that it can achieve long-term dependence and effectively avoid gradient explosion and gradient disappearance. LSTM has high sensitivity to time-series data set, and its built-in hidden unit can preserve the input for a long time, which is not available in GPR and SVR. The disadvantage of LSTM is that it cannot handle parallel problems efficiently and will result in higher time cost when processing the problem due to its complex model structure, which is not a problem with SVR and GPR. Moreover, LSTM requires a lot of parameter settings in terms of network topology, initial values of weights, and thresholds and has a certain degree of “black box problem,” and there is no credible predictive equation, unlike GPR and SVR, which both have explicit forms of predictive equations. The advantages of the GPR model are that it is easy to implement, the hyperparameters are adaptively acquired, and the predicted output is probabilistically meaningful, it has a higher explanatory power compared to LSTM, and it is more convenient than SVR in terms of parameter setting. The disadvantage of GPR is that the prediction model usually performs well in interpolation prediction, while it performs worse than LSTM and SVR in extrapolation prediction due to the difficulty of data coverage. The advantages of SVR are its strict mathematical logic, high prediction accuracy for nonlinearities, good generalization ability on the test set, higher processing ability for small data set than LSTM and SVR, and higher performance in dealing with overfitting problems than LSTM and SVR. The disadvantage of SVR is that it is overly sensitive to parameters and kernel functions and has inferior processing power to LSTM and SVR when large fluctuations in the predicted data set occur. Since each algorithm has its own advantages and disadvantages, it is necessary to carry out targeted research to compare the performance of different algorithms in practical scenarios, taking into account the characteristics of the tunnel project itself and the actual engineering arithmetic examples.


### 2.5. Cross-Validation Algorithm

Cross-validation is often used in cases of over- and underfitting due to model complexity and is a method of chunking data samples to form smaller subsets on which to base the analysis. Cross-validation is a model validation technique used to evaluate the generalization ability of a statistical analysis model on independent data sets. In the data-intensive case, the data set is divided into two parts, that is, the training set and the test set, and then the average of error is obtained as the final evaluation to reflect the real ability of the model. In general, the commonly used cross-validation methods are random subsampling validation, K-fold cross-validation, and leave-one-out cross-validation, depending on the form of the cutoff. Although many studies have investigated leave-one-out cross-validation, from a computational perspective, k-fold cross-validation may be more common. For k-fold cross-validation, the data is randomly divided into k approximately equal-sized packetsD1,…,DK, and for each Di, satisfying ni=Di, ∑​ni=N. One packet at a time is used as the test set, and the remaining k-1 packets are used as the training set for training. The accuracy of the training is discriminated based on the performance metric CV of the classifier.(15)CVN,K=∑i=1kniNMSEi.


### 2.6. Dropout

For the overfitting problem in deep learning, Hinton proposed the Dropout mechanism in 2012 [25], which is also a typical example of integrated models, and it is a good solution to the time-consuming problem of integrated models.The dropout mechanism works in such a way that, during the training of a neural network, some neurons are randomly selected and temporarily hidden (discarded) for a layer of the network in one iteration, and then the training and optimization are performed again. In the next iteration, some neurons continue to be hidden randomly, and so on until the end of training. Since it is randomly discarded, each minibatch is training a different network.During training, each neural unit is retained with probabilityp (dropout discard rate is 1−p); during the prediction phase (testing phase), each neural unit is present, and the weight parameter ω is multiplied by p. The output is pω. The schematic diagram is as follows.The reason for the need to multiplyP in the prediction phase is that the output of a neuron in the previous hidden layer before dropout is x, and the expected value after dropout during training is E=px−1−p0˙; in the prediction phase, the layer neurons are always activated and in order to keep the same output expectation and to get the same result in the next layer, it is necessary to adjust x⟶px, where p is the probability that the median value of the Bernoulli distribution (0-1 distribution) is 1.


## 2.1. Long Short-Term Memory (LSTM)

Long short-term memory (LSTM) [14] is used as a special type of recurrent neural network (RNN) in the autoregressive (AR) mode, which is deliberately designed to avoid long-term dependency problems and can be designed to remove the standard “healthy” components from the signal. Compared with RNN, LSTM can achieve long-term dependence and avoid the occurrence of gradient explosion and gradient disappearance. LSTM designs effective “gates” within the framework of each cycle to form different structures [15] that allow information to be selected for passage; that is, input gates, forgetting gates, and output gates are used to protect and control information. Since LSTM networks can learn long-term correlations in sequences, they do not require a prespecified time window and can accurately model complex multivariate sequences [16]. xt and ht−1 are the input at moment t and the hidden layer at moment t-1, respectively. The three gates at the core of typical LSTM, the forgetting gate ft, the input gate it, the output gate Ot and the information storage unit C˜t that are updated to completion at moment t can be expressed as follows [17]:(1)ft=σWfxt+Ufht−1+bf.(2)it=σWixt+Uiht−1+bi.(3)Ot=σWOxt+UOht−1+bO.(4)C˜t=tanhWCxt+UCht−1+bC.(5)Ct=ft⊙Ct−1+it⊙C˜t.(6)ht=Ot⊙tanhCt.These three gates control the forgetting of the long-term stateCt−1 at the previous moment, the preservation of the temporary state C˜t at the current moment, and the transfer of the long-term state Ct to the hidden layer ht at the current moment, respectively. The gates are the forgetting gate, the input gate, the output gate, and the parameter matrix of the new information from the input layer to the hidden layer, respectively, where Wf, Wi, WO, and WC are the forgetting gate, the input gate, the output gate, and the parameter matrix of the new information from the input layer to the hidden layer, respectively. Uf, Ui, UO, and UC are the cyclic parameter matrix, and bf, bi, bO, and bC are the deviation matrix; σ is the sigmoid function, and ⊙ is the multiplication operator of the matrix. The long-term state is processed through the tanh layer, and then the result Ot of filtering through the output gate is multiplied to output ht.LSTM can achieve long-term dependence, and it can effectively avoid gradient explosion and gradient disappearance. Facing problems and tasks that are sensitive to time series, LSTM is usually more suitable. As a nonlinear model, LSTM with special implicit units can preserve the input for a long time, which can provide powerful guarantees for time series-based prediction. These features make LSTM good for the task of predicting the surrounding rock deformation in underground caverns.


## 2.2. SVM

The SVM method is now available for multivariate classification problems and is a supervised learning model [18,19]. In addition to data classification, prediction and regression are extensions of support vector machines to mathematical problems and are known as support vector machine regression [20,21]. SVR models can generate regression functions by applying a set of high-dimensional linear and nonlinear functions using kernel functions. SVM applies the concept of ε-excitation loss function and is highly robust in prediction. Its core is to determine a separation hypersurface to make the desired risk as minimal as possible.Under the given sample,D=xi,yiin, where xi∈ℝn is the input vector, and yi is the target vector. Our final goal is to obtain the optimal fx=wϕx+b to approximate the target vector, with the deviation ε being strictly limited. Therefore, the parameters to be determined can be calculated by the following equation:(7)minw,b12ω2+C∑i=1nζi+ζi∗.(8)fxi−yi≤ε+ζi,yi−fxi≤ε+ζi∗,ζi,ζi∗≥0,i=1,…,n.The first term of the function is the canonical term, and the second term is the error risk.C is the penalty factor. To find the equations of the parameters to be determined, or the parameters ω and b to be determined in the objective function, the Lagrange function is constructed on this basis, the Lagrange multipliers are introduced, and the following constraints are added:(9)Lw,b,α,α∗,ζ,ζ∗,μ,μ∗=12w2+C∑i=1nζi+ζi∗−∑i=1nμiζi−∑i=1nμi∗ζi∗+∑i=1nαifxi−yi−ε−ζi+∑i=1nαi∗fxi−yi−ε−ζi∗.Converting to the pairwise problem of SVR, the solution of SVR is(10)fxi=ωTϕxi+b=∑i=1nαi∗−αiKxi,x+b.where ai and ai∗ are for Lagrange multipliers and b is a scalar threshold. Clearly, the support vector is the only element of the data points used to determine the decision function. The above approach can be further extended to nonlinear surfaces, and SVR uses kernel function Kxi,x to transform the nonlinear inputs into a high-dimensional feature space without the need for realistic computational mapping.SVR has been successfully applied to solve various time series prediction problems, and it performs very well in avoiding overfitting problems. For time series-based data such as surrounding rock deformation during underground cavern excavation, these characteristics of SVR are very suitable for prediction.


## 2.3. Gaussian Process Regression

Gaussian process is a stochastic process indexed by dimensions such as time and space. The essence of the Gaussian model is a regression model for uncertainty prediction of the distribution of output variables using a nonparametric probabilistic model [22,23] whose variables show the nature of a normal distribution for any linear combination; that is, the Gaussian process is a generalization of the Gaussian distribution. The form of GPR developed from GP is a variant of “inert learning” in machine learning. The Gaussian distribution reflects the distribution between random variables, while the Gaussian process represents the distribution between functions. The purpose of regression modeling is to establish a functional relationship y=fx that can describe the training data. For the output variable y, it is assumed that the output values satisfy the following equation:(11)Yi=fXi+εi.Here, X = [ X1, X2…XN] denotes the input samples, Y = [ Y1, Y2…YN] denotes the observations, f () denotes an arbitrary basis function, εi denotes Gaussian noise with zero mean, and N is the number of samples.The observed value Y and the predicted valueY∗ should satisfy(12)YY∗∼N0,k+σ2IkX∗k∗XkX∗,X∗.k=ki,j and k∗X=kX∗,X1,…,kX∗,XN，where ki,j=kXi,Xj=covYi,YjThe predictive distributionpY∗|Y for Y∗ should be a Gaussian distribution with variance and mean:(13)Y¯∗=k∗Xk−1Y.(14)σY∗2=k∗∗−k∗Xk−1KX∗.In the GPR model, the performance of the most commonly used covariance is crucial [24], and the covariance between individual dimensional features can be modeled by a Gaussian process kernel (kernel). The common types of kernels are Squared Exponential Kernel, Exponential Kernel, Matern 3/2, Matern 5/2, and Rational Quadratic Kernel.The GPR model has the advantages of easy implementation, adaptive acquisition of hyperparameters, and probabilistic significance of the predicted output. It is suitable for dealing with nonlinear complex and complicated regression problems. Based on the above characteristics, GPR has become a classic algorithm for dealing with deformation of surrounding rock in underground caverns.


## 2.4. Analysis of the Advantages and Disadvantages of the Algorithms

The advantage of LSTM is that it can achieve long-term dependence and effectively avoid gradient explosion and gradient disappearance. LSTM has high sensitivity to time-series data set, and its built-in hidden unit can preserve the input for a long time, which is not available in GPR and SVR. The disadvantage of LSTM is that it cannot handle parallel problems efficiently and will result in higher time cost when processing the problem due to its complex model structure, which is not a problem with SVR and GPR. Moreover, LSTM requires a lot of parameter settings in terms of network topology, initial values of weights, and thresholds and has a certain degree of “black box problem,” and there is no credible predictive equation, unlike GPR and SVR, which both have explicit forms of predictive equations. The advantages of the GPR model are that it is easy to implement, the hyperparameters are adaptively acquired, and the predicted output is probabilistically meaningful, it has a higher explanatory power compared to LSTM, and it is more convenient than SVR in terms of parameter setting. The disadvantage of GPR is that the prediction model usually performs well in interpolation prediction, while it performs worse than LSTM and SVR in extrapolation prediction due to the difficulty of data coverage. The advantages of SVR are its strict mathematical logic, high prediction accuracy for nonlinearities, good generalization ability on the test set, higher processing ability for small data set than LSTM and SVR, and higher performance in dealing with overfitting problems than LSTM and SVR. The disadvantage of SVR is that it is overly sensitive to parameters and kernel functions and has inferior processing power to LSTM and SVR when large fluctuations in the predicted data set occur. Since each algorithm has its own advantages and disadvantages, it is necessary to carry out targeted research to compare the performance of different algorithms in practical scenarios, taking into account the characteristics of the tunnel project itself and the actual engineering arithmetic examples.


## 2.5. Cross-Validation Algorithm

Cross-validation is often used in cases of over- and underfitting due to model complexity and is a method of chunking data samples to form smaller subsets on which to base the analysis. Cross-validation is a model validation technique used to evaluate the generalization ability of a statistical analysis model on independent data sets. In the data-intensive case, the data set is divided into two parts, that is, the training set and the test set, and then the average of error is obtained as the final evaluation to reflect the real ability of the model. In general, the commonly used cross-validation methods are random subsampling validation, K-fold cross-validation, and leave-one-out cross-validation, depending on the form of the cutoff. Although many studies have investigated leave-one-out cross-validation, from a computational perspective, k-fold cross-validation may be more common. For k-fold cross-validation, the data is randomly divided into k approximately equal-sized packetsD1,…,DK, and for each Di, satisfying ni=Di, ∑​ni=N. One packet at a time is used as the test set, and the remaining k-1 packets are used as the training set for training. The accuracy of the training is discriminated based on the performance metric CV of the classifier.(15)CVN,K=∑i=1kniNMSEi.


## 2.6. Dropout

For the overfitting problem in deep learning, Hinton proposed the Dropout mechanism in 2012 [25], which is also a typical example of integrated models, and it is a good solution to the time-consuming problem of integrated models.The dropout mechanism works in such a way that, during the training of a neural network, some neurons are randomly selected and temporarily hidden (discarded) for a layer of the network in one iteration, and then the training and optimization are performed again. In the next iteration, some neurons continue to be hidden randomly, and so on until the end of training. Since it is randomly discarded, each minibatch is training a different network.During training, each neural unit is retained with probabilityp (dropout discard rate is 1−p); during the prediction phase (testing phase), each neural unit is present, and the weight parameter ω is multiplied by p. The output is pω. The schematic diagram is as follows.The reason for the need to multiplyP in the prediction phase is that the output of a neuron in the previous hidden layer before dropout is x, and the expected value after dropout during training is E=px−1−p0˙; in the prediction phase, the layer neurons are always activated and in order to keep the same output expectation and to get the same result in the next layer, it is necessary to adjust x⟶px, where p is the probability that the median value of the Bernoulli distribution (0-1 distribution) is 1.


## 3. Engineering Application and Comparison

### 3.1. Case Study

Guzeng Hydropower Station is located on the mainstream of the Muli River in Muli County, Liangshan Prefecture, Sichuan Province. It is the fifth step of the “One Reservoir and Six Levels” hydropower plan for the mainstream of the Muli River (Shangtongba-Abudi River section). The tunnel is located on the left bank of the Muli River. Water is drawn from about 0.4 km downstream of the mouth of the Xiaogou River to the Grade I terrace on the left bank of the Muli River, about 300m downstream of the mouth of Mannianjigang, building ground-level plants to generate electricity. From the inlet to the regulator well, the diversion line is about 11.06 km long. The water diversion tunnel area crosses four large-scale faults, such as Sawa Fault and Mannianjigang Fault. Small faults, extrusion fragmentation zones, and interlayer misalignment zones are randomly developed in the rock body, and fold phenomena such as intralayer kneading and flexure are also more developed, and groundwater is more active in the ditch section, fault zone, and fissure-dense zone. Therefore, the condition of the tunnel surrounding rock is controlled by the rock strength, rock integrity, weathering, and unloading degree and also influenced by the spatial combination of rock layer, tectonic line and hole axis, groundwater, and other conditions. Rock strength and rock integrity are closely related to stratigraphic lithology; therefore, the principle of classification of surrounding rocks in tunnel area is based on lithology, combined with the development of geological formations, and the surrounding rocks in tunnel area are classified into III, IV, and V according to the geological classification standard of surrounding rocks in the Code for Geological Investigation of Small and Medium Hydropower Projects (DL/T5410-2009).The data set used in this paper for the prediction of the surrounding rock deformation consists of the deformation data of the arch bottom surrounding rock of a typical section (section 7 + 318) of the main tunnel No. 4 of the Guzeng water diversion tunnel from July 10, 2019, to December 31, 2019, which was measured at the construction site by a multipoint displacement meter, as detailed in Figure1 and Table 1. The hyperparameters of the LSTM, GPR, and SVR models are taken as shown in Table 2.Figure 1
The surrounding rock displacement of Guzeng Tunnel.Table 1
Surrounding rock deformation data.
DateDeformation/mm2019/7/100.0002019/7/1114.5002019/7/1231.3702019/7/1234.2852019/7/1346.1752019/7/1450.2602019/7/1555.8802019/7/1664.3302019/7/1771.4552019/7/1879.9852019/7/1988.3552019/7/2095.8402019/7/21102.5802019/7/22109.9102019/7/23114.0302019/7/24120.2652019/7/25124.4952019/7/26128.2052019/7/27132.622019/7/28135.8652019/7/29138.6002019/7/30141.7302019/7/31144.5402019/8/1147.8352019/8/2151.9902019/8/3155.1602019/8/4157.2402019/8/5160.9302019/8/6164.3352019/8/7165.5202019/8/8166.5302019/8/9169.5502019/8/10172.2602019/8/11174.0552019/8/12176.6552019/8/13178.4852019/8/14180.6552019/8/15182.8402019/8/17187.7452019/8/19191.6002019/8/21195.7152019/8/25202.392019/8/28207.4752019/8/30210.7052019/9/1213.0702019/9/4216.8852019/9/7222.1002019/9/8222.5752019/9/11225.0552019/9/15225.3002019/9/20235.3052019/9/22235.8052019/9/23236.0902019/9/26239.3752019/9/27239.3902019/9/30242.2452019/10/4245.1552019/10/6247.2802019/10/9251.5602019/10/11254.0902019/10/17257.4202019/10/23260.3002019/10/30262.3352019/11/8262.8052019/11/21262.8702019/11/28263.0702019/12/2263.3402019/12/12265.7912019/12/19268.0352019/12/24268.1402019/12/30268.245Table 2
Model hyperparameters.
ModelHyperparametersLSTMinput_size = 1; time_step = 6; batch_size = 1;num_layer = 2; hidden_size = 64; learn_rate = 0.002drop_out = 0.2; optimization:Adam;Activation function:tanhGPRkernel = kernel1, n_restarts_optimizer = 100, alpha = 0.0029, random_state = 42SVRkernel = “rbf”, C = 100, gamma = 0.1, epsilon = 0.0019


### 3.2. Analytical Results

#### 3.2.1. Single-Step Prediction

Single-step prediction means that the input window predicts only one future value for each prediction. The strategy used in this paper for single-step prediction is to use the true value as an input to predict a future value and then input the true value in turn to obtain all future predicted values.Figure2 presents the results of SVR, GPR, and LSTM for single-step prediction of the surrounding rock displacement. As can be seen from the figure, all three methods can predict the amount of surrounding rock deformation in the latter 14 days well, and all of them can be good close to the actual data in terms of trend.Figure 2
Prediction of surrounding rock displacement based on GPR, SVM, and LSTM (single-step prediction).For the performance of single-step prediction models of SVR, LSTM, and GPR, we give data comparisons in terms of three evaluation metrics, MSE, MAE, and MAPE (Table3). Comparing the data of the three evaluation metrics, we can see that the model effect of SVR is optimal compared with LSTM and GPR, while LSTM is slightly better than GPR, but the model effect of both is not much different. Among them, the MAPE of SVR prediction model can reach 0.48%, which is much better than LSTM and GPR.Table 3
Model evaluation index table (single-step prediction).
ModelMSEMAEMAPESVR1.881.570.48LSTM4.671.890.74GPR5.091.990.77Moreover, from Figure3, the prediction results of the three prediction models, SVR, LSTM, and GPR, all performed very well in the period from November 21 to December 31, almost fitting the original data.Figure 3
Displacement prediction and percentage error for different monitoring methods (single-step prediction).


#### 3.2.2. Multistep Prediction

Multistep prediction means that each time a prediction is made, the input window predictsn future values (also called n steps). The strategy for multistep prediction in this paper is to use all true values as input when predicting the first future value, and when predicting the next n-1 values, the predicted values from the last prediction are used as input along with the true values for prediction, and one input is performed to obtain the future n values.Figure4 shows the effect of multistep prediction of surrounding rock displacement for SVR, GPR, and LSTM. From the figure, it can be seen that the three prediction models given in this paper all produce a certain degree of decline in the prediction effect of the surrounding rock deformation, but all three prediction models can still give a reference prediction effect on the surrounding rock deformation. Among them, the prediction data of SVR fits the data set more closely, while the prediction data of GPR is relatively close to the actual data in terms of trend but biased more in the prediction data from Oct. 6 to Oct. 31.Figure 4
Prediction of surrounding rock displacement based on GPR, SVM, and LSTM (multistep prediction).As for the performance of multistep prediction models of SVR, LSTM, and GPR, we still give data comparisons from three evaluation metrics, MSE, MAE, and MAPE, and the data are shown in Table4. Comparing the data of the three multistep prediction model evaluation metrics, we can see that the model effect of SVR still outperforms that of LSTM and GPR, while the two models of LSTM and GPR are still closer in the two metrics of MAE and MAPE, but in the performance of MSE, GPR produced a larger error value of 7.12. Among them, the MAPE of SVR prediction model can reach 0.61%, and the prediction effect of the model is still excellent. And from Figure 5, the prediction effect of SVR multistep prediction model still performs very well very close to the data set during the period from November 21 to December 31, while LSTM and GPR are dwarfed.Table 4
Model evaluation index table (multistep prediction).
ModelMSEMAEMAPESVR3.781.610.61LSTM5.262.090.78GPR7.122.080.81Figure 5
Displacement prediction and percentage error for different monitoring methods (multistep prediction).


## 3.1. Case Study

Guzeng Hydropower Station is located on the mainstream of the Muli River in Muli County, Liangshan Prefecture, Sichuan Province. It is the fifth step of the “One Reservoir and Six Levels” hydropower plan for the mainstream of the Muli River (Shangtongba-Abudi River section). The tunnel is located on the left bank of the Muli River. Water is drawn from about 0.4 km downstream of the mouth of the Xiaogou River to the Grade I terrace on the left bank of the Muli River, about 300m downstream of the mouth of Mannianjigang, building ground-level plants to generate electricity. From the inlet to the regulator well, the diversion line is about 11.06 km long. The water diversion tunnel area crosses four large-scale faults, such as Sawa Fault and Mannianjigang Fault. Small faults, extrusion fragmentation zones, and interlayer misalignment zones are randomly developed in the rock body, and fold phenomena such as intralayer kneading and flexure are also more developed, and groundwater is more active in the ditch section, fault zone, and fissure-dense zone. Therefore, the condition of the tunnel surrounding rock is controlled by the rock strength, rock integrity, weathering, and unloading degree and also influenced by the spatial combination of rock layer, tectonic line and hole axis, groundwater, and other conditions. Rock strength and rock integrity are closely related to stratigraphic lithology; therefore, the principle of classification of surrounding rocks in tunnel area is based on lithology, combined with the development of geological formations, and the surrounding rocks in tunnel area are classified into III, IV, and V according to the geological classification standard of surrounding rocks in the Code for Geological Investigation of Small and Medium Hydropower Projects (DL/T5410-2009).The data set used in this paper for the prediction of the surrounding rock deformation consists of the deformation data of the arch bottom surrounding rock of a typical section (section 7 + 318) of the main tunnel No. 4 of the Guzeng water diversion tunnel from July 10, 2019, to December 31, 2019, which was measured at the construction site by a multipoint displacement meter, as detailed in Figure1 and Table 1. The hyperparameters of the LSTM, GPR, and SVR models are taken as shown in Table 2.Figure 1
The surrounding rock displacement of Guzeng Tunnel.Table 1
Surrounding rock deformation data.
DateDeformation/mm2019/7/100.0002019/7/1114.5002019/7/1231.3702019/7/1234.2852019/7/1346.1752019/7/1450.2602019/7/1555.8802019/7/1664.3302019/7/1771.4552019/7/1879.9852019/7/1988.3552019/7/2095.8402019/7/21102.5802019/7/22109.9102019/7/23114.0302019/7/24120.2652019/7/25124.4952019/7/26128.2052019/7/27132.622019/7/28135.8652019/7/29138.6002019/7/30141.7302019/7/31144.5402019/8/1147.8352019/8/2151.9902019/8/3155.1602019/8/4157.2402019/8/5160.9302019/8/6164.3352019/8/7165.5202019/8/8166.5302019/8/9169.5502019/8/10172.2602019/8/11174.0552019/8/12176.6552019/8/13178.4852019/8/14180.6552019/8/15182.8402019/8/17187.7452019/8/19191.6002019/8/21195.7152019/8/25202.392019/8/28207.4752019/8/30210.7052019/9/1213.0702019/9/4216.8852019/9/7222.1002019/9/8222.5752019/9/11225.0552019/9/15225.3002019/9/20235.3052019/9/22235.8052019/9/23236.0902019/9/26239.3752019/9/27239.3902019/9/30242.2452019/10/4245.1552019/10/6247.2802019/10/9251.5602019/10/11254.0902019/10/17257.4202019/10/23260.3002019/10/30262.3352019/11/8262.8052019/11/21262.8702019/11/28263.0702019/12/2263.3402019/12/12265.7912019/12/19268.0352019/12/24268.1402019/12/30268.245Table 2
Model hyperparameters.
ModelHyperparametersLSTMinput_size = 1; time_step = 6; batch_size = 1;num_layer = 2; hidden_size = 64; learn_rate = 0.002drop_out = 0.2; optimization:Adam;Activation function:tanhGPRkernel = kernel1, n_restarts_optimizer = 100, alpha = 0.0029, random_state = 42SVRkernel = “rbf”, C = 100, gamma = 0.1, epsilon = 0.0019


## 3.2. Analytical Results

### 3.2.1. Single-Step Prediction

Single-step prediction means that the input window predicts only one future value for each prediction. The strategy used in this paper for single-step prediction is to use the true value as an input to predict a future value and then input the true value in turn to obtain all future predicted values.Figure2 presents the results of SVR, GPR, and LSTM for single-step prediction of the surrounding rock displacement. As can be seen from the figure, all three methods can predict the amount of surrounding rock deformation in the latter 14 days well, and all of them can be good close to the actual data in terms of trend.Figure 2
Prediction of surrounding rock displacement based on GPR, SVM, and LSTM (single-step prediction).For the performance of single-step prediction models of SVR, LSTM, and GPR, we give data comparisons in terms of three evaluation metrics, MSE, MAE, and MAPE (Table3). Comparing the data of the three evaluation metrics, we can see that the model effect of SVR is optimal compared with LSTM and GPR, while LSTM is slightly better than GPR, but the model effect of both is not much different. Among them, the MAPE of SVR prediction model can reach 0.48%, which is much better than LSTM and GPR.Table 3
Model evaluation index table (single-step prediction).
ModelMSEMAEMAPESVR1.881.570.48LSTM4.671.890.74GPR5.091.990.77Moreover, from Figure3, the prediction results of the three prediction models, SVR, LSTM, and GPR, all performed very well in the period from November 21 to December 31, almost fitting the original data.Figure 3
Displacement prediction and percentage error for different monitoring methods (single-step prediction).


### 3.2.2. Multistep Prediction

Multistep prediction means that each time a prediction is made, the input window predictsn future values (also called n steps). The strategy for multistep prediction in this paper is to use all true values as input when predicting the first future value, and when predicting the next n-1 values, the predicted values from the last prediction are used as input along with the true values for prediction, and one input is performed to obtain the future n values.Figure4 shows the effect of multistep prediction of surrounding rock displacement for SVR, GPR, and LSTM. From the figure, it can be seen that the three prediction models given in this paper all produce a certain degree of decline in the prediction effect of the surrounding rock deformation, but all three prediction models can still give a reference prediction effect on the surrounding rock deformation. Among them, the prediction data of SVR fits the data set more closely, while the prediction data of GPR is relatively close to the actual data in terms of trend but biased more in the prediction data from Oct. 6 to Oct. 31.Figure 4
Prediction of surrounding rock displacement based on GPR, SVM, and LSTM (multistep prediction).As for the performance of multistep prediction models of SVR, LSTM, and GPR, we still give data comparisons from three evaluation metrics, MSE, MAE, and MAPE, and the data are shown in Table4. Comparing the data of the three multistep prediction model evaluation metrics, we can see that the model effect of SVR still outperforms that of LSTM and GPR, while the two models of LSTM and GPR are still closer in the two metrics of MAE and MAPE, but in the performance of MSE, GPR produced a larger error value of 7.12. Among them, the MAPE of SVR prediction model can reach 0.61%, and the prediction effect of the model is still excellent. And from Figure 5, the prediction effect of SVR multistep prediction model still performs very well very close to the data set during the period from November 21 to December 31, while LSTM and GPR are dwarfed.Table 4
Model evaluation index table (multistep prediction).
ModelMSEMAEMAPESVR3.781.610.61LSTM5.262.090.78GPR7.122.080.81Figure 5
Displacement prediction and percentage error for different monitoring methods (multistep prediction).


## 3.2.1. Single-Step Prediction

Single-step prediction means that the input window predicts only one future value for each prediction. The strategy used in this paper for single-step prediction is to use the true value as an input to predict a future value and then input the true value in turn to obtain all future predicted values.Figure2 presents the results of SVR, GPR, and LSTM for single-step prediction of the surrounding rock displacement. As can be seen from the figure, all three methods can predict the amount of surrounding rock deformation in the latter 14 days well, and all of them can be good close to the actual data in terms of trend.Figure 2
Prediction of surrounding rock displacement based on GPR, SVM, and LSTM (single-step prediction).For the performance of single-step prediction models of SVR, LSTM, and GPR, we give data comparisons in terms of three evaluation metrics, MSE, MAE, and MAPE (Table3). Comparing the data of the three evaluation metrics, we can see that the model effect of SVR is optimal compared with LSTM and GPR, while LSTM is slightly better than GPR, but the model effect of both is not much different. Among them, the MAPE of SVR prediction model can reach 0.48%, which is much better than LSTM and GPR.Table 3
Model evaluation index table (single-step prediction).
ModelMSEMAEMAPESVR1.881.570.48LSTM4.671.890.74GPR5.091.990.77Moreover, from Figure3, the prediction results of the three prediction models, SVR, LSTM, and GPR, all performed very well in the period from November 21 to December 31, almost fitting the original data.Figure 3
Displacement prediction and percentage error for different monitoring methods (single-step prediction).


## 3.2.2. Multistep Prediction

Multistep prediction means that each time a prediction is made, the input window predictsn future values (also called n steps). The strategy for multistep prediction in this paper is to use all true values as input when predicting the first future value, and when predicting the next n-1 values, the predicted values from the last prediction are used as input along with the true values for prediction, and one input is performed to obtain the future n values.Figure4 shows the effect of multistep prediction of surrounding rock displacement for SVR, GPR, and LSTM. From the figure, it can be seen that the three prediction models given in this paper all produce a certain degree of decline in the prediction effect of the surrounding rock deformation, but all three prediction models can still give a reference prediction effect on the surrounding rock deformation. Among them, the prediction data of SVR fits the data set more closely, while the prediction data of GPR is relatively close to the actual data in terms of trend but biased more in the prediction data from Oct. 6 to Oct. 31.Figure 4
Prediction of surrounding rock displacement based on GPR, SVM, and LSTM (multistep prediction).As for the performance of multistep prediction models of SVR, LSTM, and GPR, we still give data comparisons from three evaluation metrics, MSE, MAE, and MAPE, and the data are shown in Table4. Comparing the data of the three multistep prediction model evaluation metrics, we can see that the model effect of SVR still outperforms that of LSTM and GPR, while the two models of LSTM and GPR are still closer in the two metrics of MAE and MAPE, but in the performance of MSE, GPR produced a larger error value of 7.12. Among them, the MAPE of SVR prediction model can reach 0.61%, and the prediction effect of the model is still excellent. And from Figure 5, the prediction effect of SVR multistep prediction model still performs very well very close to the data set during the period from November 21 to December 31, while LSTM and GPR are dwarfed.Table 4
Model evaluation index table (multistep prediction).
ModelMSEMAEMAPESVR3.781.610.61LSTM5.262.090.78GPR7.122.080.81Figure 5
Displacement prediction and percentage error for different monitoring methods (multistep prediction).


## 4. Discussion

Figure6 and 7 show the performance of different surrounding rock deformation prediction methods in single-step prediction and multistep prediction. In recent years, scholars have been using LSTM to conduct research in various fields with a high degree of enthusiasm. Although LSTM has better processing performance for time-series tasks, its own model structure is relatively complex, and the time cost for training is much higher than that of SVR and GPR. Even though it alleviates the long-term dependency problem of RNNs and the “gradient disappearance” problem caused by the backpropagation of RNNs during training to a certain extent, it still cannot completely solve these problems. In addition, neural networks require a large number of parameter settings in terms of network topology, initial values of weights and thresholds, and all have a certain degree of “black box problem,” and we cannot control the details of the processing of hidden nodes very well, and there is no credible prediction equation for neural networks. But GPR and SVR are different, and both of them have prediction equations of explicit form.Figure 6
Performance of different methods for prediction of surrounding rock deformation (single-step prediction).Figure 7
Performance of different methods for prediction of surrounding rock deformation (multistep prediction).GPR is a nonparametric and kernel-based probabilistic model. The prediction model of GPR usually performs well in interpolation prediction, while for extrapolation prediction, GPR is not very good in extrapolation prediction due to the difficulty of data coverage. Compared with GPR, SVR requires more tuning parameters, but the processing of small sample data is the strength of SVM, so after using the appropriate method to optimize the parameters, SVR performs better in both single-step and multi-step prediction results.However, all prediction results depend on the quality of the data set and the ability to respond to the problem, and the setting of parameters can directly affect the performance of the prediction model. Therefore, the optimization and adjustment of various model parameters, as well as the analysis of the degree of influence of each parameter on the accuracy of the model, are the next tasks that can be attempted. In addition, if the confidence level and noise of the dataset used for model training is too high, the use of the trained model needs to be carefully considered in the context of the actual situation.


## 5. Conclusions

With the development of technology, the risk assessment and detection of underground cavern construction are getting more and more attention, and the prediction of surrounding rock deformation can provide a potential way to predict the large-scale deformation and collapse time of surrounding rock in the underground cavern, and in the future, the prediction of surrounding rock deformation is bound to be one of the important parts for the security of underground cavern construction and monitoring. The purpose of this paper is to compare the prediction effect of various algorithms for underground cavern surrounding rock deformation and provide some basis for the selection of algorithms for the prediction of surrounding rock deformation, and taking Guzeng diversion tunnel as an example, the single-step prediction model and multistep prediction model for surrounding rock deformation prediction are established by introducing LSTM, SVM, and GPR algorithms, and the prediction model performances of various algorithms are compared and analyzed. Firstly, from the prediction results of each model, it is feasible to use LSTM, SVM, and GPR algorithms to predict the deformation of the underground cavern surrounding rock. In terms of performance, SVR outperforms LSTM and GPR in both single-step prediction and multistep prediction and is better than the other two in terms of predicting the direction of the surrounding rock deformation and the degree of data fit. In general, all these methods have better predictions for areas with stable deformation of the surrounding rock than for areas with large deformation of the surrounding rock. Therefore, the optimization of the performance of the intelligent algorithm model for the area with large fluctuations in the surrounding rock deformation is still a problem to be focused on for future research.



---

*Source: 6832437-2022-06-08.xml*