An intelligent prediction method for seepage characteristic parameters of earth and rock materials
By constructing an interpretable machine learning model based on SHAP-LightGBM and BiLSTM, and combining initial dataset selection and feature parameter removal, the model black box problem in the prediction of seepage characteristic parameters of soil and rock materials is solved, achieving efficient and accurate prediction of seepage characteristic parameters, which is suitable for rapid judgment in engineering sites.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA THREE GORGES PROJECTS DEV CO LTD
- Filing Date
- 2024-11-26
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies for predicting seepage characteristic parameters in soil and rock materials suffer from problems such as redundant model datasets, high data quality requirements, poor model generalization ability, and black box issues within the model. These issues make it difficult to explain the impact of various characteristic parameters on seepage characteristics, resulting in insufficient prediction accuracy and high costs.
An interpretable machine learning model based on SHAP theory and LightGBM algorithm is adopted. By combining dataset initial selection, feature parameter removal and data dimensionality reduction, a BiLSTM model is constructed and an attention mechanism is added to establish an intelligent prediction method for soil and rock seepage characteristic parameters, quantify the influence of each feature parameter and optimize the model.
It enables rapid and accurate prediction of seepage characteristic parameters of soil and rock materials, reduces model complexity and computational cost, improves prediction accuracy and generalization ability, and facilitates engineers to quickly determine the suitability of soil and rock materials.
Smart Images

Figure CN119514801B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of experimental research and application technology of physical and mechanical properties of hydraulic geotechnical materials, and specifically relates to an intelligent prediction method for seepage characteristic parameters of soil and rock materials. Background Technology
[0002] The seepage characteristic parameters (permeability coefficient and critical permeability gradient) of soil and rock materials are among the key parameters for judging their engineering applicability. They are closely related to the seepage safety design, analysis, and evaluation of engineering projects and are also a key aspect of the safe operation of engineering projects. Obtaining the seepage characteristic parameters of soil and rock materials usually requires conducting indoor seepage tests or seepage deformation tests to obtain the corresponding permeability coefficient and permeability gradient. Traditional indoor seepage tests are easily affected by limitations in testing equipment and factors such as sampling and transportation, which may lead to errors in the test results. Furthermore, indoor tests are time-consuming and costly, making it difficult to quickly obtain seepage characteristic parameters on-site, which is not conducive to timely and effective analysis and judgment by engineering technicians. In response, researchers have proposed empirical formula methods based on statistical analysis of large amounts of experimental data; however, these methods suffer from weak applicability, limited predictive scope, and insufficient predictive accuracy, thus limiting their application in practical engineering.
[0003] With the development of artificial intelligence technology, intelligent algorithms have been gradually applied in the fields of water conservancy and geotechnical engineering. Based on known input parameters and corresponding output data, predictive models can be established to predict the values of unknown parameters. This is of great significance for the evaluation and prediction of parameters such as the mechanical properties and permeability characteristics of soil and rock masses. Currently, the prediction of soil and rock material parameters based on intelligent algorithms faces problems such as redundant model datasets, high data quality requirements, poor model generalization ability, and internal black boxes within the model. Therefore, it is necessary to explore the advantages of multi-dimensional data analysis using novel intelligent combined algorithms. For basic characteristic parameters such as soil and rock gradation characteristics, pore structure parameters, and hydraulic condition parameters, a method for predicting the seepage characteristics of soil and rock masses should be developed to achieve rapid, accurate, and intelligent prediction of these parameters.
[0004] Based on the above analysis, the shortcomings of existing technologies are as follows: although existing machine learning methods can improve prediction accuracy, they are usually regarded as "black box" models, which are difficult to explain the influence of various characteristic parameters on seepage characteristics and are not conducive to a deeper understanding of the physical properties of materials. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide an intelligent prediction method for the seepage characteristic parameters of soil and rock materials, which can quickly and accurately predict their seepage characteristic parameters (including permeability coefficient and critical permeability gradient) based on the basic characteristic parameters of soil and rock materials, so as to facilitate engineering technicians to quickly judge the suitability of soil and rock materials.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0007] A method for intelligent prediction of seepage characteristic parameters of soil and rock materials, comprising the following steps:
[0008] S1. Collect and organize the data from indoor seepage tests on soil and rock materials to obtain the original dataset;
[0009] S2. Draw box plots of data points for each feature parameter, identify and remove outlier data, and complete the initial selection of the original dataset;
[0010] S3. Construct an interpretable machine learning model based on SHAP theory and LightGBM algorithm, and train and compute the interpretable machine learning model using the original dataset after initial selection.
[0011] S4. Calculate the Shapley values of each feature parameter using an interpretable machine learning model to quantify the influence of each feature parameter on the seepage characteristics.
[0012] S5. Based on the degree of impact, perform data dimensionality reduction, remove relevant feature parameters, and complete the lightweighting of the dataset;
[0013] S6. Establish an intelligent prediction model for the seepage characteristic parameters of soil and rock materials, and determine the input parameters and target parameters of the intelligent prediction model for the lightweight dataset.
[0014] S7. Determine the ratio of the training set and test set of the intelligent prediction model, train the intelligent prediction model, calculate the performance index of the test set model, and complete the training of the intelligent prediction model.
[0015] S8. Input the characteristic parameters required for the prediction of a soil and rock sample into the intelligent prediction model, and use the established intelligent prediction model to predict and output the seepage characteristic parameters.
[0016] Preferably, in step S2, based on the box plot distribution of each feature parameter point, data points outside the 5th percentile and 95th percentile intervals are set as abnormal interval data, i.e. abnormal data. Abnormal data are outside the stable distribution interval. If there is abnormal data under a certain feature parameter distribution, the data group corresponding to that feature parameter is removed.
[0017] Preferably, in step S3, the LightGBM model is called using the Python language compiler to train and test the interpretable machine learning model. The test set is 15% of the sample data, and the remaining sample data is used as the training set to complete the training of the interpretable machine learning model and build an interpretable machine learning model based on the SHAP-LightGBM algorithm.
[0018] Preferably, in step S4, the Shapley value is calculated as follows:
[0019] ;
[0020] in, Represents the feature variables in the dataset; subscript i Representing the i One characteristic;
[0021] M This represents the total number of feature variables;
[0022] S It is a set A subset of , has 2 M-1 One possibility, indicating S The total number of elements in the middle;
[0023] Indicates that there are samples S The model output value for each feature. Representation of features i exist S Marginal contribution under a set.
[0024] Preferably, in step S4, the Shapley values of each characteristic parameter are sorted, and this sorting result is used to reflect the degree of influence of different characteristic parameters on the permeability coefficient of gravelly soil; the characteristic parameters include particle size. d 10 Porosity e and sample dry density ρ d Particle size d 10 Porosity e and sample dry density ρ d The influence of permeability coefficient on gravelly soil samples is relatively high compared to other characteristic parameters.
[0025] Preferably, the processing procedure in step S5 is as follows: using the absolute average of the Shapley values of each feature variable as the basis for classification data, and using the absolute average of the largest Shapley value as the benchmark, denoted as... SP max Calculate the absolute average of the remaining feature variables using the SHAP method. sp Absolute average of the maximum Shapley value SP max ratio sp r and define sp r The range [0, 0.05) indicates a minor effect, [0.05, 0.5) indicates a moderate effect, and [0.5, 1] indicates a significant effect.
[0026] Preferably, in step S6, the intelligent prediction model mainly includes a network training layer, a parameter optimization layer and an attention mechanism layer. The network training layer uses a BiLSTM model to construct a nonlinear mapping relationship between the relevant feature parameters of gravel soil and its permeability coefficient. The BiLSTM model uses the Adam gradient descent algorithm for parameter tuning and training.
[0027] The parameter optimization layer mainly optimizes the three main parameters in the BiLSTM model: learning rate, batch size, and regularization coefficient.
[0028] The parameter optimization algorithm uses the sparrow search algorithm, which searches for the optimal solution by updating the sparrow's position. The update mechanism is as follows:
[0029] Discoverer's location updated:
[0030] ;
[0031] In the formula: x i,j Indicates the first i The sparrow in the first j Location features in dimensional space i =1~ n , j =1~ d ; t This represents the current iteration number. t max This is the preset maximum number of iterations; α A uniformly random number in (0,1] Q Represents a standard normally distributed random number; R 2 and ST These represent the warning value and the safety value, respectively.
[0032] When a new discoverer appears, a corresponding sparrow will inevitably become a new participant; the method for updating the position of new participants is as follows:
[0033] ;
[0034] In the formula: x b The sparrow with the best fitness in the current population. x w The sparrow with the worst fitness in the current population; when i > n When / 2, it indicates that the fitness value is low. i The follower has not received any food and is in a very dangerous situation. At this point, it is necessary to continue searching other areas.
[0035] The population positions are randomly initialized. The fitness value of each sparrow in the validation set is calculated according to the fitness function. The optimal solution is then searched by updating the sparrow positions. The optimal position obtained after the maximum number of iterations is the desired optimal hyperparameter. The fitness function is as follows:
[0036] ;
[0037] In the formula: m To determine the number of samples in the validation set, y i To verify the true experimental value of the permeability coefficient output by the verification set, y i ′ represents the predicted value from the intelligent prediction model.
[0038] Preferably, the attention mechanism layer adopts a multi-head attention mechanism for the hidden layer update stage under multiple input features of the BiLSTM model. The output of the hidden layer of the BiLSTM model is used as the input vector of the attention mechanism layer. The attention weight matrix is calculated based on the softmax activation function. Then, the multi-head attention is merged and added to the weight matrix for linear transformation to obtain the final model output.
[0039] Preferably, in step S7, the model training set and test set are divided with 85% of the data samples as the training set and the remaining 15% of the data samples as the validation set, and the training set and test set are randomly divided according to the total data samples.
[0040] An intelligent prediction system for seepage characteristic parameters of soil and rock materials employs the aforementioned intelligent prediction method for seepage characteristic parameters of soil and rock materials.
[0041] The present invention can achieve the following beneficial effects:
[0042] (1) The interpretable model constructed by the present invention when predicting the seepage characteristic parameters of soil and rock can quantify the influence of each characteristic parameter on the permeability coefficient and critical permeability gradient of soil and rock. From the perspective of data analysis, it explains the relationship between the basic physical characteristic parameters such as the soil and rock gradation curve characterization parameter, void ratio, and dry density and their seepage characteristic parameters, thus making up for the black box model defects of traditional machine learning algorithms.
[0043] (2) The interpretable model method provided by the present invention can optimize the soil and rock model dataset, reduce the data dimension, reduce the model complexity, and thus improve the model calculation efficiency.
[0044] (3) The intelligent prediction method for seepage characteristic parameters of soil and rock provided by the present invention has the advantages of high prediction accuracy, strong generalization ability and high calculation efficiency. It makes up for the shortcomings of traditional empirical formulas in predicting seepage characteristic parameters of gravel soil samples, such as narrow applicability and insufficient accuracy. It is convenient for engineering technicians to quickly predict the seepage characteristic parameters of soil and rock based on the basic physical characteristics parameters such as gradation parameters, void ratio and dry density of soil and rock on site, and also reduces the test cost. Attached Figure Description
[0045] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0046] Figure 1 This is a flowchart illustrating the implementation of an intelligent prediction method for seepage characteristic parameters of soil and rock materials according to an embodiment of the present invention.
[0047] Figure 2 This is the layer structure of the prediction model in an intelligent prediction method for seepage characteristic parameters of soil and rock provided in an embodiment of the present invention;
[0048] Figure 3 This is a ranking result of the influence of different characteristic parameters on the permeability coefficient in an intelligent prediction method for seepage characteristic parameters of soil and rock provided in an embodiment of the present invention;
[0049] Figure 4 This is a training result diagram of the permeability coefficient prediction model of an intelligent prediction method for seepage characteristic parameters of soil and rock provided in an embodiment of the present invention.
[0050] Figure 5 This is a comparison chart of the permeability coefficient prediction results of an intelligent prediction method for seepage characteristic parameters of soil and rock provided in an embodiment of the present invention. Detailed Implementation
[0051] Preferred solutions include Figures 1 to 5 As shown, an intelligent prediction method for seepage characteristic parameters of soil and rock materials is presented, taking the prediction of the permeability coefficient of gravelly soil as an example. The embodiments of the invention are described in conjunction with the accompanying drawings. Figure 1 As shown, it includes the following steps:
[0052] Step 1: Collect and organize the basic physical property parameters of gravel soil and indoor seepage test datasets in relevant projects. In this embodiment, a total of 509 sets of gravel soil test data were collected. There are 20 characteristic parameters in this dataset, and the target parameter is the permeability coefficient, as shown in Table 1.
[0053] Table 1 shows the feature parameters contained in the dataset.
[0054]
[0055] The gradation parameters in the table above can be obtained from the gradation curves obtained by particle sieving tests. The dry density and void ratio are determined by the corresponding indoor tests.
[0056] Step 2: For the collected original dataset, draw box plots for each feature parameter and calculate its mean, median, 5th percentile, and 95th percentile.
[0057] Furthermore, based on the box plot distribution of each characteristic parameter point, data points outside the 5th and 95th quantile intervals are designated as outlier intervals. These data points are outside the stable distribution interval. If outlier data exists under a certain characteristic parameter distribution, the data group corresponding to that characteristic parameter is removed. Source-based data collection ensures both the comprehensiveness and applicability of the collected data, while also avoiding the influence of a few ultra-large particle size gradation sample data points on subsequent model prediction results.
[0058] In this embodiment, after initial data selection, 460 stable data sets remain in the original dataset for subsequent analysis.
[0059] Step 3: Using the 460 sets of sample data selected in the initial stage as the dataset, with 20 feature parameters as input and the penetration coefficient as output, we can form the basic interpretable machine learning model data.
[0060] Furthermore, the LightGBM model was trained and tested using the Python compiler. The test set consisted of 15% of the sample data, totaling 69 sets, while the remaining sample data served as the training set. This completed the model training and constructed an interpretable machine learning model based on the SHAP-LightGBM algorithm.
[0061] Step 4: Calculate the Shapley value of each input feature parameter in the LightGBM model on the permeability coefficient using SHAP theory, i.e., quantify the degree of influence. The Shapley value calculation method is as follows:
[0062]
[0063] in, Represents the index of the feature variable in the dataset. i Representing the i One characteristic, M This represents the total number of feature variables. S It is a set A subset of , has 2 M-1 One possibility, indicating S The total number of elements in the text. Indicates that there are samples S The model output value for each feature. Representation of features i existS Marginal contribution within a set. The preceding weights are derived from permutations and combinations, representing the probability of an element being in the set.
[0064] Furthermore, the results are sorted based on the Shapley values of each feature parameter, such as... Figure 2 As shown, this ranking result can significantly reflect the influence of different characteristic parameters on the permeability coefficient of gravelly soil. It can be seen that the characteristic particle size... d 10 Porosity e and sample dry density ρ d The influence of the permeability coefficient on gravelly soil samples is significantly higher than that on other characteristic parameters.
[0065] Step 5: To facilitate the subsequent establishment of a prediction model for the seepage characteristics of gravelly soil based on relevant feature parameters, the influence degree of each feature parameter is classified. The classification criteria are as follows:
[0066] Using the Shapley absolute mean of each feature variable as the basis for categorical data, and taking the absolute mean of the largest Shapley value as the benchmark, denoted as... SP max Calculate the absolute average of the remaining feature variables using the SHAP method. sp Absolute average of the maximum Shapley value SP max ratio sp r and define sp r The range [0, 0.05) indicates a minor effect, [0.05, 0.5) indicates a moderate effect, and [0.5, 1] indicates a significant effect.
[0067] Based on the above classification criteria, the grading results of the influence of each characteristic parameter on the permeability coefficient of gravelly soil in this embodiment are shown in Table 2 below:
[0068] Table 2 shows the feature parameters contained in the dataset.
[0069]
[0070] Furthermore, based on the classification results in the table above, the feature granularity that subtly influences the category is further refined. d 9. Characteristic particle size content P d<0.075 After removing two types of feature parameters, the dataset contains 18 feature parameters after dimensionality reduction.
[0071] Step 6: Figure 3The present invention provides an intelligent prediction model structure for soil and rock material seepage characteristic parameters. This intelligent prediction model mainly includes a network training layer, a parameter optimization layer, and an attention mechanism layer.
[0072] The network training layer uses a BiLSTM model to construct a nonlinear mapping relationship between the relevant feature parameters of gravel soil and its permeability coefficient. In this embodiment, the BiLSTM model uses the Adam gradient descent algorithm for parameter tuning and training. The maximum number of training iterations is set to 100, the learning rate descent factor is 0.02, the initial learning rate is 0.1, the number of samples selected before each parameter adjustment, and the initial batch size is 16.
[0073] The parameter optimization layer mainly optimizes the three main parameters in the BiLSTM model: learning rate, batch size, and regularization coefficient. In this embodiment, the optimization ranges for each parameter are set as follows: learning rate: [0.001, 0.1], batch size: [16, 64], and regularization coefficient: [0.001, 0.1].
[0074] The parameter optimization algorithm uses the sparrow search algorithm, which searches for the optimal solution by updating the sparrow's position. The update mechanism is as follows:
[0075] Discoverer's location updated:
[0076]
[0077] In the formula: x i,j Indicates the first i The sparrow in the first j Location features in dimensional space i =1~ n , j =1~ d ; t This represents the current iteration number. t max This is the preset maximum number of iterations; α A uniformly random number in (0,1] Q This represents a standard normally distributed random number. R 2 and ST These represent the warning value and the safety value, respectively.
[0078] When a new discoverer appears, a corresponding sparrow will inevitably become a new participant. The method for updating the position of new participants is as follows:
[0079]
[0080] In the formula: x b The sparrow with the best fitness in the current population. xw This is the sparrow with the worst fitness in the current population. When... i > n When / 2, it indicates that the fitness value is low. i One of the followers has not received any food and is in a very dangerous situation. At this point, it is necessary to continue searching other areas.
[0081] The population positions are randomly initialized. The fitness value of each sparrow in the validation set is calculated based on the fitness function. The optimal solution is then searched using a sparrow position update method. The optimal position obtained after the maximum number of iterations is the desired optimal hyperparameter. In this embodiment, the sparrow population size is set to 30, and the maximum number of iterations is 10. The ratios of discoverers, followers, and watchdogs are 0.3, 0.5, and 0.2, respectively, and the safety threshold is 0.7. The fitness function is as follows:
[0082]
[0083] In the formula: m To determine the number of samples in the validation set, y i To verify the true experimental value of the permeability coefficient output by the verification set, y i ′ represents the predicted value from the intelligent prediction model.
[0084] The attention mechanism used in this embodiment is a multi-head attention mechanism, which is mainly used in the hidden layer update stage of the BiLSTM model with multiple input features. The output of the hidden layer of the BiLSTM model is used as the input vector of the attention mechanism layer. The attention weight matrix is calculated based on the softmax activation function. Then, the multi-head attention is merged, added to the weight matrix, and linearly transformed to obtain the final model output.
[0085] Step 7: Use the 460 sets of data collected in this embodiment as the model training dataset. This dataset is reliable data after the feature parameters have been optimized by the interpretable machine learning model in Step 5, that is, the data dimensionality has been reduced.
[0086] Furthermore, regarding the division of the model training set and test set, 85% of the data samples are used as the training set, and the remaining 15% of the data samples are used as the validation set. The training set and test set are randomly divided based on the total data samples.
[0087] The optimized model parameters obtained in this embodiment are: learning rate: 0.058, batch size: 24, regularization coefficient: 0.001;
[0088] The comparison results of the test set data in this embodiment are as follows: Figure 4As shown, the predicted values of the penetration coefficient in the test set data exhibit a linear regression relationship of approximately 45° with the actual experimental values. The regression error band is evenly distributed and narrow, with the predicted values of the data points basically falling within 95% of the model prediction band, indicating that the model training effect in this embodiment is good and can be used for further prediction applications.
[0089] Step 8: In this embodiment, 15 sets of new data from gravelly soil test samples that did not participate in model training were selected for prediction application. The 18 feature parameters after dimensionality reduction in Step 5 were used as inputs in the 15 sets of data, and the output target parameter was the permeability coefficient.
[0090] Furthermore, the intelligent prediction model network that has been trained in Step 6 is invoked to output the permeability coefficients of 15 sets of gravelly soil test samples;
[0091] In this embodiment, the permeability coefficient output result obtained by the intelligent prediction model for soil and rock seepage characteristic parameters provided by the present invention is as follows: Figure 5 As shown, the predicted values of the permeability coefficients in the selected 15 engineering samples have a good linear regression relationship with the experimental values, and the prediction results of the vast majority of samples are within the error band, indicating that the intelligent prediction model provided by this invention has good generalization ability and high stability.
[0092] In summary, this invention mainly includes three technical aspects: a preliminary selection scheme for the basic dataset of soil and rock seepage tests, a method for quantifying the influence of multiple feature variables on the seepage characteristic parameters of soil and rock, and an intelligent prediction model for the seepage characteristic parameters of soil and rock. These three technical solutions constitute the important components of this invention. Among them:
[0093] This invention provides a preliminary selection scheme for the basic dataset of soil and rock seepage tests, including:
[0094] Collect and organize indoor seepage test data of soil and rock materials in the project, and establish a basic dataset for predicting seepage characteristic parameters of soil and rock materials. The basic dataset is characterized by containing 20 characteristic parameters, including gradation curve characterization parameters, void ratio and dry density, as well as two target parameters, permeability coefficient and critical permeability gradient.
[0095] By using box plots to statistically analyze the distribution characteristics of the collected data, key information on the location and dispersion of relevant data can be obtained.
[0096] Using data outside the 5th percentile to 95th percentile as the outlier range, we removed outlier sample data that were outside the stable distribution range to complete the initial selection of the basic dataset for soil and rock seepage tests.
[0097] A second aspect of the present invention provides a method for quantifying the influence of multiple characteristic parameters on the seepage characteristic parameters of soil and rock materials, comprising:
[0098] We construct an interpretable machine learning model based on SHAP theory and LightGBM (Lightweight Gradient Boosting Algorithm), and train the interpretable model on the initially selected dataset.
[0099] Based on the interpretable model trained above, the Shapley values of each feature parameter under the interpretable model are calculated and sorted. The size of the Shapley value represents the degree of influence of different feature parameters on the seepage characteristics of soil and rock. The larger the Shapley value of a feature parameter, the higher the degree of influence of that feature parameter on the seepage characteristics.
[0100] The Shapley value is calculated as follows:
[0101]
[0102] in, Represents the index of the feature variable in the dataset. i Representing the i One characteristic, M This represents the total number of feature variables. S It is a set A subset of , has 2 M-1 One possibility, indicating S The total number of elements in the text. Indicates that there are samples S The model output value for each feature. Representation of features i exist S Marginal contribution within a set. The preceding weights are derived from permutations and combinations, representing the probability of an element being in the set.
[0103] Furthermore, the influence of each feature parameter is categorized according to the following criteria:
[0104] Using the Shapley absolute mean of each feature variable as the basis for categorical data, and taking the absolute mean of the largest Shapley value as the benchmark, denoted as... SP max Calculate the absolute average of the remaining feature variables using the SHAP method. sp Absolute average of the maximum Shapley value SP max ratio sp r and define sp rThe range [0, 0.05) indicates a minor effect, [0.05, 0.5) indicates a moderate effect, and [0.5, 1] indicates a significant effect.
[0105] Based on the above classification criteria, feature parameters are selected to achieve dimensionality reduction of the model dataset, thereby reducing model complexity and computational cost.
[0106] A third aspect of the present invention provides an intelligent prediction model for seepage characteristic parameters of soil and rock materials, comprising:
[0107] Select the dimensionality-reduced model dataset and determine the number of corresponding input feature parameters under different prediction targets. In this invention, the prediction targets are the permeability coefficient and the critical permeability gradient.
[0108] Determine the proportion of training and test set data used in the training of the prediction model;
[0109] An intelligent prediction model is established, which mainly consists of a network training layer, a parameter optimization layer, and an attention mechanism layer.
[0110] In this invention, the intelligent prediction model employs a Bidirectional Long Short-Term Memory (BiLSTM) neural network as its core component, which constructs a nonlinear mapping relationship between soil and rock material-related characteristic parameters and their seepage characteristics. This neural network is characterized by its ability to fully utilize all information in the data, capturing its intrinsic features more comprehensively. During data training, both past and future data influence the current data. By integrating the state parameters of the forward and backward BiLSTM neural networks and superimposing them in a single output layer, the network can simultaneously analyze the data from both forward and backward dimensions, thereby improving data utilization and prediction accuracy.
[0111] In this invention, the parameter optimization layer of the intelligent prediction model employs the Sparrow Search algorithm. This algorithm primarily optimizes three main parameters in the bidirectional long short-term memory neural network used in this invention: learning rate, batch size, and regularization coefficient. The optimization method is as follows:
[0112] The population positions are randomly initialized. The fitness value of each sparrow in the test set is calculated according to the fitness function. Then, the optimal solution is searched by updating the sparrow positions. The update mechanism is represented as follows:
[0113] Discoverer's location updated:
[0114]
[0115] In the formula: x i,j Indicates the first i The sparrow in the firstj Location features in dimensional space i =1~ n , j =1~ d ; t This represents the current iteration number. t max This is the preset maximum number of iterations; α A uniformly random number in (0,1] Q This represents a standard normally distributed random number. R 2 and ST These represent the warning value and the safety value, respectively.
[0116] When a new discoverer appears, a corresponding sparrow will inevitably become a new participant. The method for updating the position of new participants is as follows:
[0117]
[0118] In the formula: x b The sparrow with the best fitness in the current population. x w This is the sparrow with the worst fitness in the current population. When... i > n When / 2, it indicates that the fitness value is low. i One of the followers has not received any food and is in a very dangerous situation. At this point, it is necessary to continue searching other areas.
[0119] The optimal position obtained after reaching the maximum number of iterations is the optimal parameter we are looking for;
[0120] The fitness function in this invention is as follows:
[0121]
[0122] In the formula: m The number of test set data samples. yi To output the true values of the variables for the test set, yi ′ represents the model's predicted value.
[0123] In addition to the above technical solutions, this invention adds an attention mechanism layer to the intelligent prediction model. Its features are: it is mainly used in the hidden layer update stage of the bidirectional long short-term memory neural network under multiple input features, and the output of the hidden layer of the bidirectional long short-term memory neural network is used as the input vector of the attention mechanism layer, and the attention weight matrix is calculated based on the softmax activation function.
[0124] The calculation method for the above attention mechanism is as follows:
[0125] By introducing task-related query vectors (Query) Q ), calculate its relationship with the key vector Key ( K The attention distribution between ) and accordingly the value vector Value ( V The attention values are obtained by weighting the data.
[0126] Information input: Q , K , V Input model, X For the input weight vector
[0127]
[0128] Calculate attention distribution α : Through calculation Q and K The correlation is calculated using a dot product, and the score is calculated using softmax. Additionally... Q = K = V=X Attention weights are calculated using the softmax activation function.
[0129]
[0130] In the formula: α i For attention probability distribution, s ( x i , q For attention scoring mechanisms, the calculation method used in this paper is as follows:
[0131]
[0132] In the formula: Add The scaling factor prevents the dot product from becoming too large, which would result in a very small gradient after the softmax activation function, hindering backpropagation.
[0133] Information-weighted average: attention distribution α i To explain in context query, the first i The degree of attention this information receives.
[0134] .
[0135] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for intelligent prediction of seepage characteristic parameters of soil and rock materials, characterized in that... Includes the following steps: S1. Collect and organize the data from indoor seepage tests on soil and rock materials to obtain the original dataset; S2. Draw box plots of data points for each feature parameter, identify and remove outlier data, and complete the initial selection of the original dataset; S3. Construct an interpretable machine learning model based on SHAP theory and LightGBM algorithm, and train and compute the interpretable machine learning model using the original dataset after initial selection. S4. Calculate the Shapley values of each feature parameter using an interpretable machine learning model to quantify the influence of each feature parameter on the seepage characteristics. S5. Based on the degree of impact, perform data dimensionality reduction, remove relevant feature parameters, and complete the lightweighting of the dataset; S6. Establish an intelligent prediction model for the seepage characteristic parameters of soil and rock materials, and determine the input parameters and target parameters of the intelligent prediction model for the lightweight dataset. S7. Determine the ratio of the training set and test set of the intelligent prediction model, train the intelligent prediction model, calculate the performance index of the test set model, and complete the training of the intelligent prediction model. S8. Input the characteristic parameters required for the prediction of a soil and rock sample into the intelligent prediction model, and use the established intelligent prediction model to predict and output the seepage characteristic parameters.
2. The intelligent prediction method for seepage characteristic parameters of soil and rock materials according to claim 1, characterized in that: In step S2, based on the box plot distribution of each feature parameter point, data points outside the 5th percentile and 95th percentile intervals are set as abnormal interval data, i.e. abnormal data. Abnormal data are outside the stable distribution interval. If there is abnormal data under a certain feature parameter distribution, the data group corresponding to that feature parameter is removed.
3. The intelligent prediction method for seepage characteristic parameters of soil and rock materials according to claim 1, characterized in that: In step S3, the Python language compiler is used to call the LightGBM model to train and test the interpretable machine learning model. The test set is 15% of the sample data, and the remaining sample data is used as the training set to complete the training of the interpretable machine learning model and build an interpretable machine learning model based on the SHAP-LightGBM algorithm.
4. The intelligent prediction method for seepage characteristic parameters of soil and rock materials according to claim 1, characterized in that: In step S4, the Shapley value is calculated as follows: ; in, Represents the feature variables in the dataset; subscript i Representing the i One characteristic; M This represents the total number of feature variables; S It is a set A subset of , has 2 M-1 One possibility, indicating S The total number of elements in the middle; Indicates that there are samples S The model output value for each feature. Representation of features i exist S Marginal contribution under a set.
5. The intelligent prediction method for seepage characteristic parameters of soil and rock materials according to claim 4, characterized in that: In step S4, the Shapley values of each characteristic parameter are calculated and sorted. This sorting result reflects the degree of influence of different characteristic parameters on the permeability coefficient of gravelly soil. The characteristic parameters include particle size. d 10 Porosity e and sample dry density ρ d Particle size d 10 Porosity e and sample dry density ρ d The influence of permeability coefficient on gravelly soil samples is relatively high compared to other characteristic parameters.
6. The intelligent prediction method for seepage characteristic parameters of soil and rock materials according to claim 1, characterized in that: Step S5 involves the following process: using the Shapley absolute mean of each feature variable as the basis for the classification data, and taking the absolute mean of the largest Shapley value as the benchmark, denoted as... SP max Calculate the absolute average of the remaining feature variables using the SHAP method. sp Absolute average of the maximum Shapley value SP max ratio sp r and define sp r The range [0, 0.05) indicates a minor effect, [0.05, 0.5) indicates a moderate effect, and [0.5, 1] indicates a significant effect.
7. The intelligent prediction method for seepage characteristic parameters of soil and rock materials according to claim 1, characterized in that: In step S6, the intelligent prediction model mainly includes a network training layer, a parameter optimization layer, and an attention mechanism layer. The network training layer uses a BiLSTM model to construct a nonlinear mapping relationship between the relevant feature parameters of gravel soil and its permeability coefficient. The BiLSTM model uses the Adam gradient descent algorithm for parameter tuning and training. The parameter optimization layer mainly optimizes the three main parameters in the BiLSTM model: learning rate, batch size, and regularization coefficient. The parameter optimization algorithm uses the sparrow search algorithm, which searches for the optimal solution by updating the sparrow's position. The update mechanism is as follows: Discoverer's location updated: ; In the formula: x i,j Indicates the first i The sparrow in the first j Location features in dimensional space i =1~ n , j =1~ d ; t This represents the current iteration number. t max This is the preset maximum number of iterations; α A uniformly random number in (0,1] Q Represents a standard normally distributed random number; R 2 and ST These represent the warning value and the safety value, respectively. When a new discoverer appears, a corresponding sparrow will inevitably become a new participant; the method for updating the position of new participants is as follows: ; In the formula: x b The sparrow with the best fitness in the current population. x w This is the sparrow with the worst fitness in the current population; when i > n When / 2, it indicates that the fitness value is low. i The follower has not received any food and is in a very dangerous situation. At this point, it is necessary to continue searching other areas. The population positions are randomly initialized. The fitness value of each sparrow in the validation set is calculated according to the fitness function. The optimal solution is then searched by updating the sparrow positions. The optimal position obtained after the maximum number of iterations is the desired optimal hyperparameter. The fitness function is as follows: ; In the formula: m To determine the number of samples in the validation set, y i To verify the true experimental value of the permeability coefficient output by the verification set, y i ′ represents the predicted value from the intelligent prediction model.
8. The intelligent prediction method for seepage characteristic parameters of soil and rock materials according to claim 7, characterized in that: The attention mechanism layer adopts a multi-head attention mechanism for the hidden layer update stage under multiple input features of the BiLSTM model. The output of the hidden layer of the BiLSTM model is used as the input vector of the attention mechanism layer. The attention weight matrix is calculated based on the softmax activation function. Then, the multi-head attention is merged, added to the weight matrix, and linearly transformed to obtain the final model output.
9. The intelligent prediction method for seepage characteristic parameters of soil and rock materials according to claim 1, characterized in that: In step S7, the model training set and test set are divided as follows: 85% of the data samples are used as the training set and the remaining 15% of the data samples are used as the validation set. The training set and test set are randomly divided based on the total data samples.
10. An intelligent prediction system for seepage characteristic parameters of soil and rock materials, characterized in that: An intelligent prediction method for seepage characteristic parameters of soil and rock materials according to any one of claims 1-9 was adopted.