#### Abstract

Classification of the surrounding rock is the basis of tunnel design and construction. However, conventional classification methods do not allow dynamic tunnel construction adjustments because they are time-consuming and do not consider the randomness of rock mass. This paper presents a new reliability rock mass classification method based on a least squares support vector machine (LSSVM) optimized by a bacterial foraging optimization algorithm (BFOA). The LSSVM is adopted to express the implicit relationship between classification indicators and rock mass grades, which is a response surface function for reliability evaluation. LSSVM parameters were optimized by the BFOA to form a hybrid BFOA-LSSVM algorithm. Using geological prediction and rock strength resilience results as classification indicators, samples were developed to train the LSSVM model using the hybrid algorithm. The Monte Carlo sampling method of reliability classification was implemented and applied to the Suqiao tunnel at the Puyan highway in the Fujian province of China; the influence of parameters on the performance of the algorithm is discussed. The results indicate that the new method is feasible for tunnel engineering; it can improve the classification accuracy of surrounding rock exhibiting randomness, to provide an effective means of classifying surrounding rock in the dynamic design of tunnel construction.

#### 1. Introduction

Classification of surrounding rock is the basis of tunnel design and construction; a complete classification system should include two parts: a preconstruction survey classification and a modification classification during construction [1]. Limited by environmental conditions and technical means, rock classification in the survey stage produces only a relatively rough result. Thus, it is essential to conduct a more detailed and accurate classification through statistical processing of rock mass disclosure information in the construction process [2–4].

To date, researchers have proposed a variety of rock mass classification methods, such as those of Wickham [5], Barton et al. [6], Hoek et al. [7], and Palmström [8, 9]. Among these classification methods, the most widely used method is the rock mass rating (RMR) method, which was first proposed by Bieniawski [10–12] and has been continuously improved and applied since then [13–16]. The basic quality (BQ) method was proposed and widely applied in China [17–20]. These conventional rock classification methods are mostly used in the preconstruction survey stage and are unable to meet tunnel construction requirements because the classification indicators cannot be easily and rapidly obtained in the construction process [21]. For most classification methods, the mapping relationship between the indicators and rock mass grades is not clear, and the randomness of indicator distribution is not considered.

Much research has been conducted in the last few decades to solve these problems. Geological advanced prediction information is considered to reflect the properties of rock masses, and prediction results are used as classification indicators for the evaluation of rock mass grade [22–24]. To find the optimal parameters of machine learning models, intelligent algorithms such as convolutional neural networks [25] and support vector machines [26] can be used, or other methods such as the PCA-ideal point method [27] and rough set theory [28]. These studies analyzed the advanced geological prediction characteristics and established a nonlinear mapping relationship between indicators and rock grade, partly solving the problem of acquiring indicators in the rock mass classification process.

Among the intelligent algorithms used in these studies, SVM has been widely used in geotechnical engineering in recent years, owing to its excellent small-sample-learning ability, including blasting vibration control [29], blasting risk prediction [30], new material development [31], and tunneling machine control [32]. The LSSVM [33] adopted in this study is a type of SVM using the least squares linear system as the loss function to replace the traditional quadratic programming method of the support vector machine, which has a more concise model group and higher computational efficiency. However, the regression effect of the LSSVM is significantly affected by the values of its key parameters. To obtain better calculation accuracy, we adopted a bacterial foraging optimization algorithm (BFOA) [34] with good global optimization ability to optimize the key parameters of the LSSVM, forming a BFOA-LSSVM hybrid algorithm.

However, the randomness of spatial distribution still exists in rock indicators. Thus, the deterministic classification method can lead to inaccurate calculation results. A reliability algorithm can solve the problem [35] and is a powerful method of obtaining a reliability classification result. However, reliability theory based on conventional indicators can only be evaluated after the excavation of the target location, which produces a certain hysteresis and cannot meet the needs of dynamic design for tunnel engineering.

Research on surrounding rock classification has produced significant results, but there are still some problems to be solved: (1) Conventional classification uses traditional methods to obtain the classification indicators, which is time-consuming and slows down construction progress. (2) Conventional classification methods do not consider the randomness of a rock mass; there has been little research on rock mass classification using advanced prediction indicators. (3) Machine learning algorithms have been used in surrounding rock classification. However, human limitations in the selection of the learning machine parameters affect calculation accuracy.

Difficulty in quickly obtaining a grading evaluation index and definitive grading result information makes the current grading evaluation method of surrounding rock insufficient and unpopular in the construction process. Some tunnel construction still uses the artificial experience method to determine the state of surrounding rock. In this study, a method of surrounding rock classification is established based on advanced geological prediction. The classification indicators using this method are easy to obtain, the operation difficulty is low, and it is convenient in engineering applications. Reliability theory is introduced to evaluate the classification results, and the uncertainty of surrounding rock properties is fully considered, to provide a more comprehensive data reference for project builders.

In this study, we established a reliability classification method for surrounding rock based on reliability theory, using an LSSVM optimized by the BFOA as the response surface function. Samples were produced for LSSVM machine learning, including geological prediction and rock strength resilience results as classification indicators. The Monte Carlo sampling method was used for calculation. To verify its feasibility, the new reliability classification method was applied to the Suqiao tunnel of the Puyan expressway in Fujian province, China.

#### 2. A New Reliability Classification Method of Surrounding Rock

##### 2.1. Reliability Classification Method

In the classification of rock masses in tunnel engineering, the obtained classification indicators are discrete and random due to instrument operation, data statistics, and human error. Rock masses surrounding the tunnel have certain variability, such as a local broken zone or a weak layer, which leads to a large variation in classification indicators and misjudgment of the rock mass grade. There is a reliability issue in the rock mass classification process; the probability of success or failure of the final classification result is regarded as a two-category classification problem. The probability expression of the classification result, the rock mass classification reliability [35], is expressed by reliability theory to avoid prediction error caused by the randomness of the classification indicators.

The surrounding rock is generally categorized into grades I–V. As an example to introduce the reliability classification method, rock mass grade IV is examined. To evaluate the reliability of classification results belonging to this grade, classification boundaries must be defined. The reliability function is shown as follows:where is the response surface function that expresses the mapping relationship between the evaluation value of the rock mass and the classification indicators, is the rock mass classification indicator group, , and and are the limit values of grade IV.

The reliable probability calculation method for the classification results relative to the two bounds of formula (1) is shown as follows:where is the joint probability density of the classification indicator group.

The reliability classification evaluation result of a rock mass of grade IV is expressed as

In solving formula (2), it is difficult to integrate the joint probability density . The Monte Carlo sampling method is used to solve the problem, with the number of samples set at 10^{5} [36]. Similarly, classification reliability evaluation results for other rock mass grades can be obtained.

##### 2.2. BFOA-LSSVM Hybrid Algorithm

###### 2.2.1. LSSVM Regression Model

In view of the shortcomings of traditional evaluation methods such as RMR and BQ that cannot meet the demands of dynamic construction, the geological prediction index has been used in surrounding rock grading evaluation in recent years [22–24]. The mapping relationship between the new indicators and the surrounding rock grade is complex and nonlinear. In this study, the least squares support vector machine (LSSVM) is used to express this implicit model, as shown in Figure 1, and is used as the response surface function in formula (1).

The LSSVM is another form of SVM regression [37]; it abstracts the nonlinear mapping into a process of fitting known data by hyperplane [38]. Neural network training easily falls into local optimization and the complexity of BP network modeling. Quadratic programming problems requiring training samples in SVM are avoided, which greatly improves computational efficiency.

For a given *N* training samples , is the six-dimensional sample input of the grading indicator group, and is the one-dimensional sample output of the rock mass evaluation value. The LSSVM regression model is shown as follows:where is the radial basis kernel function, , is the square bandwidth representing the influence degree of a single sample vector, is the Lagrange operator, and is the error term, solved bywhere , *L* is an n-dimensional array, , , , , is the unit vector, and is the canonical parameter that represents the fitting degree within the interval.

The computation speed improvement of the LSSVM is due to the least square value function and equality constraint, which reduces the complexity of the solution process. However, the sample training result is highly dependent on the regular parameter and the square bandwidth of the kernel function. LSSVM theory does not provide effective selection methods; parameter determination is somewhat arbitrary. This study uses the BFOA to optimize the parameters.

###### 2.2.2. BFOA Optimizes LSSVM

The bacterial foraging optimization algorithm (BFOA) is a computational method that simulates human *Escherichia coli* foraging behavior and searches for the optimal parameters through iterative calculation [39–41]. It is a random search algorithm with good overall performance; the search results do not easily result in a local optimal solution. During the calculation, S bacterial individuals were randomly generated within the value range of the parameters to be optimized, and each individual contained a group of numerical combinations of the parameters:where is the individual bacteria and . represents the target parameter to be optimized.

All bacteria underwent consecutive trending operations with a trend step size of and performed self-replication optimization under the condition that the minimum fitness value of the population did not meet the expected value. After repeating the replication operation times, population migration was conducted with as the control probability, and the maximum migration was limited to . The iterative information of individual bacteria is expressed aswhere , , and represent the current executed trend, replication, and migration times, respectively. represents a random unit random vector on [−1, 1].

The adaptive value refers to the error between the predicted result and the actual result using the parameters represented by certain bacteria to calculate the test sample. Many methods can be used to evaluate this error; the root mean square error evaluation method is adopted in this study:where and represent the predicted and true values of the test sample *t*, respectively, and is the number of test samples.

The implementation process is shown in Figure 2.

For the LSSVM regression model, the BFOA is used to optimize the parameters and ; the optimization process is as follows: Step 1: In a certain optimization interval, the initial population is randomly generated. In this study, the number of optimal targets is two; the population is in a two-dimensional space, and the dimensional coordinates of each bacterial individual represent and , respectively. Step 2: The current position information of the individual is substituted into the LSSVM model, and the sample group is tested for the trial calculation to obtain the adaptive value of the current bacteria according to formula (8). Comparing the global minimum adaption value with the expected adaption value , if , then proceed to Step (7); otherwise, proceed to Step (3). In this study, . Step 3: Perform the bacterial trending operation. Within the length of the [−1, 1] interval, random vectors are generated to adjust the position of each individual bacterium, and the adaptive values before and after adjustment are compared. A smaller adaptive value is chosen to maintain the position of the bacterium. A total of tendency operations are performed. In this study, . Step 4: Perform the bacterial replication operation. The total number of bacteria was recorded as , arranged from large to small in accordance with the adaptive value; individuals with larger adaptive values were deleted, and the remaining individuals were duplicated. Return to Step (2) and record the number of replicates . Step 5: Perform the bacterial migration operation. When the number of replication operations reaches the maximum ( in this study), all bacteria in the current region are destroyed, and other regions are randomly selected to reexecute Step (1). This operation effectively avoids the local optimal solution and gives the BFOA a good global property. Step 6: When the migration operation reaches the expected limit, the iteration is stopped, and the minimum fitness of the current population is recorded. In this study, the limited value of migration operation is set as . Step 7: Output the optimal parameters represented by the bacteria dimension coordinate with the minimum fitness, and use it as the LSSVM parameter to establish the optimal regression model.

##### 2.3. Learning Samples for BFOA-LSSVM

###### 2.3.1. Classification Indicators

TSP203 is a geological prediction system for tunnel engineering that can obtain rock mass properties before excavation according to the principle of echo measurement. The propagation speed, waveform, frequency, strength, and direction of the reflected wave signal of the TSP203 geological prediction system are closely related to the corresponding properties and distribution of the weak geological body [22–24]. The resilience value of the rock mass can characterize its strength and supplement the lack of advanced geological prediction results. Considering the feasibility and accuracy of data acquisition in the process of tunnel construction, combined with BQ and RMR classification standards, six indicators were selected as evaluation factors, including rock mass integrity coefficient, reflector distribution coefficient, Poisson’s ratio, Young’s modulus, groundwater development state, and strength resilience of the rock mass. The classification indicator group established in this study is faster and easier to obtain than traditional classification indicators and more comprehensively reflects the properties of the rock mass.

These six indexes can be obtained by geological advance prediction using TSP203 and measurement of strength resilience of the rock mass. The strength resilience of the rock mass is measured by a springback instrument; the testing time of a single sample point is approximately 30 s, which is convenient. Geological prediction is a necessary link in the tunnel construction process and is completed by a professional survey team. Through analysis and processing of the predicted results data, the classification index information can be obtained.

Considering construction efficiency and the accuracy of prediction results, in the Suqiao tunnel project of the Puyan expressway in Fujian province, China, the consistency interval of the rock mass was verified through continuous rebound measurement. In this study, the unit distance of sample selection and prediction calculation was determined to be 30 m. The specific calculation method of each index is described as follows.

*S*represent the transverse and longitudinal wave intensities of geological prediction, respectively.(6)Strength resilience of rock mass The strength resilience value represents the compressive strength property of a material [1]. On the working face in tunnel engineering, the rebound strength of each section of the vault, spandrel, arch waist, arch feet, and the intersection of each position was measured to form a measurement group, and the data distribution law was statistically obtained.

###### 2.3.2. Learning Sample Establishment

In the sampling area, the mean values of the classification indicators were calculated as the sample input before tunnel excavation. After excavation at the same location, the grading value of surrounding rock is calculated by the BQ method and used as the sample output:where , , , , and represent rock hardness, rock mass integrity, groundwater development coefficient, occurrence of main weak structure surface, and initial stress state, respectively. These parameters can be obtained through experiments or field observation after tunnel excavation, and the measurement method is referred to in the literature [1, 17, 29].

This process is repeated *N* + *t* times to establish learning samples, including *N* training samples and *t*-test samples. The classification of rock mass in this study is subject to the subclassification standard [43], as shown in Table 3.

##### 2.4. Calculation Process of the Reliability Rock Mass Classification

Based on the learning samples, an implicit mapping model was established and used as a response surface function for the surrounding rock reliability grading calculation. The calculation process is shown in Figure 4; the specific steps are as follows. Step 1: Establish learning samples. Refer to Section 2.3 for sample types and acquisition methods. Step 2: Establish a nonlinear regression model between classification indicators and rock mass grade using the LSSVM, and select the optimal model parameters through the BFOA. Step 3: Based on the LSSVM regression model optimized by the BFOA, establish a classification reliability function and calculate using the Monte Carlo method. Step 4: According to the geological prediction results of the region to be classified, the classification indicators (1)-(5) are read at an interval of 0.5 m, and indicator (6) is measured continuously. Obtain the probability density function for each indicator using the distribution characteristics statistics of the results. Classify the rock mass by the reliability classification method established in this study, and make corresponding construction adjustments based on the classification result.

#### 3. Engineering Applications

##### 3.1. Description of the Study Project

The YA15 section of Puyan expressway connects the town of Zhongxian in Youxi county with the town of Xinkou town in Sanyuan county and the city of Sanming in Fujian province, China, as shown in Figure 5. The section is 9.55 km in length, including five tunnels: Jishan tunnel, Suqiao tunnel, Wugongshan tunnel, Mingxi tunnel, and Leshanting tunnel. The Suqiao tunnel is used as an example to verify the applicability of the rock mass classification method. Suqiao tunnel is a double-hole separated tunnel with a total length of 724 m. It is located in a rock mass with relatively developed joints in surrounding rock and abundant underground water. The complexity of the construction environment presents high construction difficulty, and dynamic design is necessary in the construction process.

##### 3.2. Sample Construction and LSSVM Machine Learning

Using the method in Section 2.3, 80 learning samples were established during the construction of the tunnels along the Puyan expressway; partial learning samples are shown in Table 4. Ten randomly selected samples marked with “” in the table were used as test samples; the others were used as training samples.

In the mapping relationship obtained through machine learning, the key parameters of the LSSVM obtained through the BFOA are and . An additional ten samples were used to test the predictive effect of the model. The calculation results are verified, as shown in Table 5; the adaptive value (root mean square error, calculated by formula (7)) is 3.85. It is observed that the predicted result is consistent with the real value; the maximum relative error is −3.26%, indicating that the parameter optimization is effective.

##### 3.3. Reliability Classification Result Analysis

According to the method in Section 2.4, parameters are measured for several typical sections; partial statistical results are shown in Figure 6. The bar chart shows the statistical measurement results of the parameters. According to its characteristics, Poisson’s ratio conforms to the exponential distribution law, and the strength resilience conforms to the normal distribution law. The probability density function curve of parameter distribution is obtained through data fitting.

**(a)**

**(b)**

Combined with the LSSVM training results in Section 3.2, the reliability classification of surrounding rock was calculated according to the method in Section 2.1. The reliability distribution of the evaluation results in each section is shown in Figure 7.

**(a)**

**(b)**

**(c)**

**(d)**

The reliability classification results provide more complete information than traditional methods. Figure 7(a) shows that the surrounding rocks in the K94 + 653 ∼ 683 tunnel area belong to grade V_{1}, and the subordinate probability of this level is far greater than that of other levels. Therefore, it is believed that the probability results of the other levels are caused by measurement errors or geological variations in small regions, and the engineering construction can be conducted according to grade V_{1}. In Figure 7(c), the surrounding rocks in the K94 + 743 ∼ 773 tunnel area are of similar probability in grade III_{2} and grade IV_{1}, indicating that some of the rock masses in this area have poor properties or weak zones. Therefore, when the tunnel is constructed according to grade III_{2}, the construction plan should be conservative.

It is observed from the data statistics and comparison in Table 6 that there is a difference between geological survey results before construction and evaluation results after excavation. The reliability classification method proposed in this study can obtain a grade of rock mass around tunnels that is closer to actual conditions, achieve the dependent probability of each grade, and meet the requirements of rock mass quality evaluation during the construction process, providing a basis for the dynamic adjustment of the construction scheme.

The probability density in the calculation results in Table 6 is generally near 50%, which is not high from a statistical perspective. The reliability evaluation of the surrounding rock is calculated according to the distribution statistics of a series of indicators, such as rock mass strength, joints and cracks, and groundwater. In this study, the distribution characteristics of these parameters generally exhibit exponential or normal distribution, and the parameter values tend to be scattered. Therefore, multiple probabilities that are subordinate to different levels of the surrounding rocks often appear in the calculation results, which is the main reason for the generally low probability density, as shown in Figure 7. Another reason for this phenomenon is that the subclass classification standard is adopted in this paper, and the surrounding rock is divided into 9 classes, so the probability of reaching a certain class is not very high. In some areas, the probability densities of two grades of the surrounding rock are close to each other, as shown in Figures 7(c) and 7(d), indicating that the overall nature of the surrounding rock in this area falls between two grades. This result demonstrates that the proposed method can fully reflect the actual state of surrounding rock and provide more abundant data reference for tunnel construction.

#### 4. Discussion

To further clarify the influence law of the relevant parameters in the classification method established in this study, the parameters of the LSSVM model, calculation conditions of the BFOA, and Monte Carlo sampling times are discussed.

##### 4.1. Influence of LSSVM Parameters on Regression Accuracy

The LSSVM is trained based on the data in Table 4. Adjusting the values of the square root bandwidth and the regularization parameter , the relative error between the predicted results and the real results under different parameter combinations was calculated, as shown in Figure 8.

It is observed in Figure 8 that the accuracy of the regression results is affected by the parameters, and the error distribution is an irregular surface, indicating that it is difficult to determine the values of LSSVM parameters in the training process. Thus, the BFOA is necessary to find the optimal parameters.

##### 4.2. Influence of BFOA Parameters on Convergence Speed

The learning process of samples in Table 4 is repeated, adjusting the value of BFOA parameters to explore the influence of the approach length and the probability of migration on the convergence result. According to the sample characteristics, the population spatial dimension of the BFOA is six, represented by the six classification parameters in Table 4. The population size is 200, and the upper limit of trend, copy, and migration are all set to 10.

Based on experience, is fixed as 0.3; the convergence curves under different are calculated as shown in Figure 9. The value of is the percentage of the total length of the interval. It is observed that the convergence of the algorithm is best when .

**(a)**

**(b)**

is fixed as 0.1%, and the convergence curve under different is calculated, as shown in Figure 9. The results show that, in this study, the best value of is 0.25; the convergence effect is weakened if is too large or too small.

##### 4.3. Influence of Monte Carlo Sampling Times on the Stability of Evaluation Results

On the basis of BFOA parameters, the probability evaluation of rock mass grade is conducted for Group 4 in Table 6 under different Monte Carlo sample numbers. Calculations are repeated 20 times for each sampling number; the root mean square error (RMSE) of the calculated results is shown in Figure 10. It is observed that, with increasing sample number, the calculated results gradually become stable. To obtain effective evaluation results, the sample number should not be set less than 10^{5}.

##### 4.4. Computing Ability Evaluation of BFOA-LSSVM

The samples in Table 5 were calculated by SVM, LSSVM, and BFOA-LSSVM. The error was calculated using formula (11); error analysis of the results is shown in Figure 11.where is the relative error, is the predicted value, and is the measured value.

It is observed that SVM and LSSVM essentially have the same computing power in terms of classification; the computing accuracy of the LSSVM optimized by the BFOA is effectively improved, demonstrating that the hybrid algorithm established in this study can be effectively applied to the grading evaluation of surrounding rock.

##### 4.5. Application Scope of This Study

The reliability classification method of tunnel surrounding rock established in this study adopted the BQ standard as an example; the BQ value after tunnel excavation is considered to evaluate the rock mass state. In the process of reliability evaluation in Section 2.1, reliability formula (1) uses the BQ value as the classification boundary and the rock grade as the output of LSSVM samples. Similarly, the method is also applicable to other evaluation criteria (such as RMR). It would be necessary to change Table 3 to the RMR criteria and modify the boundary value of formula (1) accordingly. The reliability classification indicators established in Section 2.3 are limited to the research results with current technological means. With the development of geological prediction technology, when more information can be obtained before tunnel excavation, this indicator group can be reasonably improved.

#### 5. Conclusions

We proposed a new reliability classification method based on a hybrid algorithm BFOA-LSSVM, and it is applied to the construction process of the Suqiao tunnel. The following conclusions are drawn from the study.(1)The new reliability classification method established in this study uses the BFOA-LSSVM as the response surface function, considers geological prediction and rock strength resilience as classification indicators in machine learning samples, and uses the Monte Carlo sampling method to implement the calculation. The results show that this reliability classification method has easy access to parameters and calculation accuracy and can accurately determine the rock mass grade in situ.(2)The calculation results of the classification method are affected by the setting of relevant parameters. The key parameters of the LSSVM have significant influence on the accuracy of the regression model; and the optimal values obtained from the BFOA are and . In the optimization process, the parameters of the BFOA are recommended as and . To ensure the accuracy of the reliability evaluation results, it is suggested that the number of Monte Carlo samples should not be less than 10^{5}.(3)As a small-sample learning machine, the LSSVM algorithm was introduced to establish the implicit mapping relationship between classification indicators and rock mass grade. Further, the BFOA was used to automatically search for the best LSSVM model parameters during the sample training process, thereby effectively improving the generalization performance of the LSSVM algorithm.(4)For the randomness of the classification indicators, the probability evaluation of rock mass classification results was conducted based on reliability theory. This evaluation method effectively avoids the impact of randomness of the classification indicators on the classification results and provides more comprehensive reference for the project.

The classification indicators and related methods of this study are implemented in accordance with the specific engineering background. It should be further optimized and improved according to specific characteristics when applied to different engineering projects. If conditions permit, the number of learning samples should be further expanded, and as many distribution statistical samples of grading indicators as possible should be obtained.

#### Data Availability

Due to the space limitation, only parts of the learning samples are given in Table 4. The complete sample data can be obtained by sending e-mail to 534821326@qq.com.

#### Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

#### Acknowledgments

The authors sincerely appreciate the support from the National Natural Science Foundation of China (grant number: 51678101), the R & D Project of China Railway Construction Co., Ltd. (grant number: DQJ-2018-B07), and the Doctoral innovation Program of Dalian Maritime University (grant number: BSCXXM016).