Coarse-grained soil dynamic shear modulus and damping ratio prediction method based on attention mechanism
By using the GA-Net prediction model based on the attention mechanism, the problem of low prediction accuracy of dynamic shear modulus and damping ratio of coarse-grained soil is solved, achieving efficient and accurate parameter prediction. Furthermore, the interpretability of the model is improved by visualizing the attention weight distribution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN UNIV OF TECH
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-12
AI Technical Summary
Existing methods suffer from low prediction accuracy when predicting the dynamic shear modulus and damping ratio of coarse-grained soils, especially when dealing with highly nonlinear and multivariable coupled problems such as dynamic shear modulus decay and damping ratio changes, making accurate prediction difficult.
We employ the GA-Net prediction model based on the attention mechanism. By constructing a coarse-grained soil experimental dataset, we utilize multi-head self-attention and cross-attention mechanisms, combined with fully connected layers, to build an input module, an attention module, and a regression head module, thereby achieving efficient prediction of key parameters.
It improves the prediction accuracy of dynamic shear modulus and damping ratio of coarse-grained soil, reduces costs, enhances the interpretability of the model, and shows the importance ranking of each influencing factor by visualizing the attention weight distribution, thus realizing the improvement from "black box" prediction to interpretable analysis.
Smart Images

Figure CN122020022A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of geotechnical mechanics parameter prediction methods, specifically relating to a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism. Background Technology
[0002] Coarse-grained soil refers to a non-cohesive mixed soil composed of boulders, crushed stones, gravel, or stone chips, containing a large number of coarse particles. It is widely used in water conservancy, civil engineering, transportation, and other projects. As the main filling material for large geotechnical structures such as earth-rock dams, the dynamic characteristics of coarse-grained soil have a significant impact on seismic response analysis, seismic stability assessment of geotechnical structures, and seismic design.
[0003] Dynamic shear modulus ( G ) and damping ratio ( λ The dynamic shear modulus and damping ratio are key constitutive parameters of soil dynamic response, directly affecting the accuracy of seismic design, numerical simulation analysis, and seismic response assessment. In recent years, the development of artificial intelligence technology has promoted the application of machine learning techniques in soil mechanics parameter prediction. For determining the two key parameters of dynamic properties of coarse-grained soil—dynamic shear modulus and damping ratio—shallow machine learning, such as support vector machines, is mainly employed. SVM, Random Forest RF, fully connected neural networks Methods such as FCN are used to predict the maximum shear modulus or shear wave velocity under small strain conditions. However, these methods suffer from low prediction accuracy when dealing with highly nonlinear and multivariable coupled problems such as dynamic shear modulus decay and damping ratio variation.
[0004] Therefore, it is necessary to design a method that can accurately and efficiently predict the dynamic shear modulus and damping ratio of coarse-grained soil. Summary of the Invention
[0005] The purpose of this invention is to provide a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism, thereby solving the problem of low prediction accuracy in existing methods.
[0006] The technical solution adopted in this invention is a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism, and the specific steps are as follows: Step 1: Construct a coarse-grained soil test dataset; Step 2, construct the GA-Net prediction model; Step 3: Divide the dataset constructed in Step 1 into a training set and a test set. Input the training set into the GA-Net prediction model for training to obtain the trained GA-Net prediction model. Then use the test set to test the trained GA-Net prediction model to obtain the tested GA-Net prediction model. Step 4: Input the key parameters of the coarse-grained soil to be tested into the GA-Net prediction model after the test to obtain a set of dynamic shear modulus G and a set of damping ratio λ, and calculate the constitutive parameters.
[0007] The invention is further characterized by: In step 1, the coarse-grained soil test dataset includes 14 key parameters, specifically: particle shape regularity. ρ Uniaxial compressive strength of parent rock Soil particle density Initial porosity Inhomogeneity coefficient curvature coefficient C c Effective mean principal stress Dynamic shear strain sequence and characteristic particle size , , , , , ; in, Indicates the maximum particle size in the coarse-grained soil sample; This indicates the content of particles smaller than a certain size on the particle size distribution curve of a coarse-grained soil sample. i The corresponding particle size, i =80, 60, 50, 30, 10.
[0008] The dynamic shear strain sequence consists of several dynamic shear strains from smallest to largest. The composition consists of several dynamic shear strains with values ranging from 0.00001 to 0.1.
[0009] In step 2, the GA-Net prediction model consists of an input module, an attention module, and a regression head module; The input module processes the following steps: 14 key parameters of each coarse soil sample are combined into a 1×14 sequence A. Then, two zero values are appended to the end of sequence A to form a 1×16 sequence B. Each element in sequence B is mapped to a 1×16 dimensional feature vector. Then, sequence B is expanded into a batch×1×16×16 matrix. The attention module consists of an encoder and a decoder; The regression head module consists of fully connected layers and outputs the dynamic shear modulus. G Damping ratio λ .
[0010] The encoder's specific processing procedure is as follows: After the batch×1×16×16 matrix is input, it is processed by the first multi-head self-attention layer to output result A. Result A is added to the batch×1×16×16 matrix and then processed by the first normalization layer to obtain result B. Result B is input to the first feedforward network for processing to obtain result C. Result B is added to result C and then processed by the second normalization layer to obtain result D.
[0011] The specific processing procedure of the decoder is as follows: After the batch×1×16×16 matrix is input, it is processed by the second multi-head self-attention layer to output the result E. The result E is concatenated with the batch×1×16×16 matrix and then processed by the third normalization layer to obtain the result F. The result F and the result D are input to the cross-attention layer for processing to obtain the result G. The result G and the result F are added and then processed by the fourth normalization layer to obtain the result H. The result H is input to the second feedforward network for processing to obtain the result J. The result J and the result H are added and then processed by the fifth normalization layer to obtain the result K. The result K is used as the input of the regression head module.
[0012] In step 3, the ratio of the training set to the test set is 5:1.
[0013] In step 3, the loss function used during training is: (1) In equation (1), MAE A represents the mean absolute error; i P represents the actual value; i This indicates a pre-test; n represents the number of coarse-grained soil samples. (2) In equation (2), RMSE Indicates the root mean square error; (3) In equation (3), MAPE Indicates the mean absolute percentage error; (4) In equation (4), R 2 represents the determination coefficient; Ā represents the average value of the actual values.
[0014] The beneficial effects of this invention are: (1) The present invention provides a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on the attention mechanism. It establishes a large-scale test dataset of coarse-grained soil, inputs the key parameters of the material to be tested, predicts its dynamic shear modulus decay curve and damping ratio change curve, and further calculates the required engineering parameters. It is low in cost and high in efficiency. (2) The present invention provides a method for predicting the dynamic shear modulus and damping ratio of coarse soil based on the attention mechanism. It adopts the GA-Net prediction model and integrates the multi-head self-attention mechanism, which enables the GA-Net prediction model to effectively extract key features from the input data and to more accurately focus on the key information in the input data, thereby greatly improving the prediction accuracy. (3) The present invention provides a method for predicting the dynamic shear modulus and damping ratio of coarse soil based on the attention mechanism. By analyzing the distribution of attention weights within the GA-Net prediction model, the interpretability of the GA-Net prediction model is enhanced. By extracting and visualizing the weight matrix in the attention module, the focus of the GA-Net prediction model on the input data is clearly shown in the form of heat maps, etc. Compared with other deep learning methods, the average and normalization processing is further performed based on the cross-attention layer weight distribution of the samples to quantify the weight ratio of each influencing factor in the local samples and the overall samples, thereby obtaining the relative importance ranking of each influencing factor, realizing the improvement from "black box" prediction to interpretable analysis. Attached Figure Description
[0015] Figure 1 This is a diagram of the GA-Net prediction model structure in the method of this invention; Figure 2 This is a diagram illustrating the training process of the GA-Net prediction model in the method of this invention. Figure 3 This is a scatter plot comparing the actual and predicted values of the dynamic shear modulus during the training phase of the method of this invention. Figure 4 This is a scatter plot comparing the actual and predicted values of the dynamic shear modulus during the testing phase in the method of this invention. Figure 5 This is a scatter plot comparing the actual and predicted values of the damping ratio during the training phase of the method of this invention. Figure 6 This is a scatter plot comparing the actual and predicted values of the damping ratio during the testing phase in the method of this invention. Figure 7 The encoder in the method of this invention uses a single attention layer heatmap; Figure 8 The image shows a heatmap of the encoder with two attention layers in the method of this invention. Figure 9 The image shows a heatmap of the encoder with a 3-head attention layer in the method of this invention. Figure 10 The image shows a heatmap of the encoder with four attention layers in the method of this invention. Figure 11 The decoder in the method of this invention uses a heatmap of a single attention layer; Figure 12The decoder in the method of this invention uses a heatmap of a single attention layer; Figure 13 The decoder in the method of this invention uses a heatmap of a single attention layer; Figure 14 The decoder in the method of this invention uses a heatmap of a single attention layer; Figure 15 The decoder in the method of this invention uses a heatmap with a single cross-attention layer; Figure 16 The heatmap shows the decoder in the method of this invention using a two-headed cross-attention layer. Figure 17 This is a heatmap of the decoder using a 3-head cross-attention layer in the method of this invention; Figure 18 This is a heatmap of the decoder using a 4-head cross-attention layer in the method of this invention; Figure 19 The relative importance of the variables affecting the dynamic shear modulus in the method of this invention is ranked; Figure 20 This is the prediction result of the dynamic shear modulus of a certain andesite material a in Example 6 of the present invention; Figure 21 This is the predicted damping ratio of a certain andesite material a in Example 6 of the present invention; Figure 22 The results show the predicted and experimentally measured values of the dynamic shear modulus of a certain andesite material a in the comparative example of this invention. Figure 23 The present invention provides the predicted and experimentally measured values of the damping ratio of a certain andesite material a in the comparative example. Figure 24 The results show the predicted and experimentally measured values of the dynamic shear modulus of a certain andesite material b, which is a comparative example of this invention. Figure 25 The present invention provides the predicted and experimentally measured values of the damping ratio of a certain andesite material b, which is a comparative example of the present invention. Figure 26 The results show the predicted and experimentally measured values of the dynamic shear modulus of a certain andesite material c, which is a comparative example of this invention. Figure 27 The present invention provides the predicted and experimentally measured values of the damping ratio of a certain andesite material c, which is a comparative example of the present invention. Detailed Implementation
[0016] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0017] Example 1 The present invention provides a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism. The specific steps are as follows: Step 1: Construct a coarse-grained soil test dataset; Step 2, construct the GA-Net prediction model; Step 3: Divide the dataset constructed in Step 1 into a training set and a test set. Input the training set into the GA-Net prediction model for training to obtain the trained GA-Net prediction model. Then use the test set to test the trained GA-Net prediction model to obtain the tested GA-Net prediction model. Step 4: Input the key parameters of the coarse-grained soil to be tested into the GA-Net prediction model after the test to obtain a set of dynamic shear modulus G and a set of damping ratio λ.
[0018] Example 2 The present invention provides a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism. The specific steps are as follows: Step 1: Construct a coarse-grained soil test dataset; In step 1, the coarse-grained soil test dataset includes 14 key parameters, specifically: particle shape regularity. ρ Uniaxial compressive strength of parent rock Soil particle density Initial porosity Inhomogeneity coefficient curvature coefficient C c Effective mean principal stress Dynamic shear strain sequence and characteristic particle size , , , , , ; in, Indicates the maximum particle size in the coarse-grained soil sample; This indicates the content of particles smaller than a certain size on the particle size distribution curve of a coarse-grained soil sample. i The corresponding particle size, i =80, 60, 50, 30, 10; The dynamic shear strain sequence consists of several dynamic shear strains from smallest to largest. The composition consists of several dynamic shear strains ranging from 0.00001 to 0.1. The coarse-grained soil test dataset covers 2,116 sets of test results for 103 different coarse-grained soil materials, and collects 50,784 data points; Step 2, construct the GA-Net prediction model; Step 3: Divide the dataset constructed in Step 1 into a training set and a test set. Input the training set into the GA-Net prediction model for training to obtain the trained GA-Net prediction model. Then use the test set to test the trained GA-Net prediction model to obtain the tested GA-Net prediction model. Step 4: Input the key parameters of the coarse-grained soil to be tested into the GA-Net prediction model after the test to obtain a set of dynamic shear modulus G and a set of damping ratio λ.
[0019] Example 3 The present invention provides a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism. The specific steps are as follows: Step 1: Construct a coarse-grained soil test dataset; In step 1, the coarse-grained soil test dataset includes 14 key parameters, specifically: particle shape regularity. ρ Uniaxial compressive strength of parent rock Soil particle density Initial porosity Inhomogeneity coefficient curvature coefficient C c Effective mean principal stress Dynamic shear strain sequence and characteristic particle size , , , , , ; in, Indicates the maximum particle size in the coarse-grained soil sample; This indicates the content of particles smaller than a certain size on the particle size distribution curve of a coarse-grained soil sample. i The corresponding particle size, i =80, 60, 50, 30, 10; The dynamic shear strain sequence consists of several dynamic shear strains from smallest to largest. The composition consists of several dynamic shear strains ranging from 0.00001 to 0.1. Step 2, construct the GA-Net prediction model; In step 2, such as Figure 1 As shown, the GA-Net prediction model consists of an input module, an attention module, and a regression head module; The input module processes the following steps: 14 key parameters of each coarse soil sample are combined into a 1×14 sequence A. Then, two zero values are appended to the end of sequence A to form a 1×16 sequence B. Each element in sequence B is mapped to a 1×16 dimensional feature vector. Then, sequence B is expanded into a batch×1×16×16 matrix. The attention module consists of an encoder and a decoder; The encoder's specific processing procedure is as follows: After the batch×1×16×16 matrix is input, it is processed by the first multi-head self-attention layer to output result A. Result A is added to the batch×1×16×16 matrix and then processed by the first normalization layer to obtain result B. Result B is input to the first feedforward network for processing to obtain result C. Result B is added to result C and then processed by the second normalization layer to obtain result D. The specific processing steps of the decoder are as follows: After the batch×1×16×16 matrix is input, it is processed by the second multi-head self-attention layer to output the result E. The result E is concatenated with the batch×1×16×16 matrix and then processed by the third normalization layer to obtain the result F. The result F and the result D are input to the cross-attention layer for processing to obtain the result G. The result G and the result F are added and then processed by the fourth normalization layer to obtain the result H. The result H is input to the second feedforward network for processing to obtain the result J. The result J and the result H are added and then processed by the fifth normalization layer to obtain the result K. The result K is used as the input of the regression head module. The regression head module consists of fully connected layers and outputs the dynamic shear modulus. G Damping ratio λ ; Step 3: Divide the dataset constructed in Step 1 into a training set and a test set. Input the training set into the GA-Net prediction model for training to obtain the trained GA-Net prediction model. Then use the test set to test the trained GA-Net prediction model to obtain the tested GA-Net prediction model. Step 4: Input the key parameters of the coarse-grained soil to be tested into the GA-Net prediction model after the test to obtain a set of dynamic shear modulus G and a set of damping ratio λ.
[0020] Example 4 The present invention provides a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism. The specific steps are as follows: Step 1: Construct a coarse-grained soil test dataset; In step 1, the coarse-grained soil test dataset includes 14 key parameters, specifically: particle shape regularity. ρ Uniaxial compressive strength of parent rock Soil particle density Initial porosity Inhomogeneity coefficient curvature coefficient C c Effective mean principal stress Dynamic shear strain sequence and characteristic particle size , , , , , ; in, Indicates the maximum particle size in the coarse-grained soil sample; This indicates the content of particles smaller than a certain size on the particle size distribution curve of a coarse-grained soil sample. i The corresponding particle size, i =80, 60, 50, 30, 10; The dynamic shear strain sequence consists of several dynamic shear strains from smallest to largest. The composition consists of several dynamic shear strains ranging from 0.00001 to 0.1. Step 2, construct the GA-Net prediction model; In step 2, the GA-Net prediction model consists of an input module, an attention module, and a regression head module; The input module processes the following steps: 14 key parameters of each coarse soil sample are combined into a 1×14 sequence A. Then, two zero values are appended to the end of sequence A to form a 1×16 sequence B. Each element in sequence B is mapped to a 1×16 dimensional feature vector. Then, sequence B is expanded into a batch×1×16×16 matrix. The attention module consists of an encoder and a decoder; The encoder's specific processing procedure is as follows: After the batch×1×16×16 matrix is input, it is processed by the first multi-head self-attention layer to output result A. Result A is added to the batch×1×16×16 matrix and then processed by the first normalization layer to obtain result B. Result B is input to the first feedforward network for processing to obtain result C. Result B is added to result C and then processed by the second normalization layer to obtain result D. The specific processing steps of the decoder are as follows: After the batch×1×16×16 matrix is input, it is processed by the second multi-head self-attention layer to output the result E. The result E is concatenated with the batch×1×16×16 matrix and then processed by the third normalization layer to obtain the result F. The result F and the result D are input to the cross-attention layer for processing to obtain the result G. The result G and the result F are added and then processed by the fourth normalization layer to obtain the result H. The result H is input to the second feedforward network for processing to obtain the result J. The result J and the result H are added and then processed by the fifth normalization layer to obtain the result K. The result K is used as the input of the regression head module. The regression head module consists of fully connected layers and outputs the dynamic shear modulus. G Damping ratio λ ; Step 3: Divide the dataset constructed in Step 1 into a training set and a test set with a ratio of 5:1. Input the training set into the GA-Net prediction model for training to obtain the trained GA-Net prediction model. Then, use the test set to test the trained GA-Net prediction model to obtain the tested GA-Net prediction model. The loss function used during training is: (1) In equation (1), MAE A represents the mean absolute error; i P represents the actual value; i This indicates a pre-test; n represents the number of coarse-grained soil samples. (2) In equation (2), RMSE Indicates the root mean square error; (3) In equation (3), MAPE Indicates the mean absolute percentage error; (4) In equation (4), R 2 The coefficient of determination is represented by Ā; the average value of the actual values is represented by Ā. Step 4: Input the key parameters of the coarse-grained soil to be tested into the GA-Net prediction model after the test to obtain a set of dynamic shear modulus G and a set of damping ratio λ.
[0021] Example 5 The present invention provides a method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism. The specific steps are as follows: Step 1: Construct a coarse-grained soil test dataset; In step 1, the coarse-grained soil test dataset includes 14 key parameters, specifically: particle shape regularity. ρ Uniaxial compressive strength of parent rock Soil particle density Initial porosity Inhomogeneity coefficient curvature coefficient C c Effective mean principal stress Dynamic shear strain sequence and characteristic particle size , , , , , ; in, Indicates the maximum particle size in the coarse-grained soil sample; This indicates the content of particles smaller than a certain size on the particle size distribution curve of a coarse-grained soil sample. i The corresponding particle size, i =80, 60, 50, 30, 10; The dynamic shear strain sequence consists of several dynamic shear strains from smallest to largest. The composition consists of several dynamic shear strains ranging from 0.00001 to 0.1. Step 2, construct the GA-Net prediction model; In step 2, the GA-Net prediction model consists of an input module, an attention module, and a regression head module; The input module processes the following steps: 14 key parameters of each coarse soil sample are combined into a 1×14 sequence A. Then, two zero values are appended to the end of sequence A to form a 1×16 sequence B. Each element in sequence B is mapped to a 1×16 dimensional feature vector. Then, sequence B is expanded into a batch×1×16×16 matrix. The attention module consists of an encoder and a decoder; The encoder's specific processing procedure is as follows: After the batch×1×16×16 matrix is input, it is processed by the first multi-head self-attention layer to output result A. Result A is added to the batch×1×16×16 matrix and then processed by the first normalization layer to obtain result B. Result B is input to the first feedforward network for processing to obtain result C. Result B is added to result C and then processed by the second normalization layer to obtain result D. The specific processing steps of the decoder are as follows: After the batch×1×16×16 matrix is input, it is processed by the second multi-head self-attention layer to output the result E. The result E is concatenated with the batch×1×16×16 matrix and then processed by the third normalization layer to obtain the result F. The result F and the result D are input to the cross-attention layer for processing to obtain the result G. The result G and the result F are added and then processed by the fourth normalization layer to obtain the result H. The result H is input to the second feedforward network for processing to obtain the result J. The result J and the result H are added and then processed by the fifth normalization layer to obtain the result K. The result K is used as the input of the regression head module. The regression head module consists of fully connected layers and outputs the dynamic shear modulus. G Damping ratio λ ; Step 3: Divide the dataset constructed in Step 1 into a training set and a test set with a ratio of 5:1. Input the training set into the GA-Net prediction model for training to obtain the trained GA-Net prediction model. Then, use the test set to test the trained GA-Net prediction model to obtain the tested GA-Net prediction model. The loss function used during training is: (1) In equation (1), MAE A represents the mean absolute error; i P represents the actual value; i This indicates a pre-test; n represents the number of coarse-grained soil samples. (2) In equation (2), RMSE Indicates the root mean square error; (3) In equation (3), MAPE Indicates the mean absolute percentage error; (4) In equation (4), R 2 The coefficient of determination is represented by Ā; the average value of the actual values is represented by Ā. like Figure 4 As shown, the loss value gradually decreases as training progresses, indicating an improvement in model performance and a tendency to converge. The loss value decreases rapidly in the early stages of training, but then the rate of decrease slows down, and the model performance begins to stabilize and converge. like Figure 3 , Figure 4 , Figure 5 and Figure 6 As shown, most of the dataset is concentrated near the y=x reference line, indicating that the GA-Net model achieves high prediction accuracy on both the training and test sets, proving that the model can accurately capture the dynamic shear modulus. G With dynamic shear strain γ The nonlinear attenuation characteristics between them, and the damping ratio λ Follow-up shear strain γ The trend of increasing with increasing pressure is evident. The prediction results under different confining pressure conditions also conform to the general pattern, demonstrating the model's good generalization ability under different working conditions. Step 4: Input the key parameters of the coarse-grained soil to be tested into the GA-Net prediction model after the test to obtain a set of dynamic shear modulus G and a set of damping ratio λ.
[0022] Example 6 Based on Example 5, step 4 also includes calculating constitutive parameters, the specific process of which is as follows: Connecting the obtained set of dynamic shear moduli G yields the dynamic shear modulus attenuation curve, and connecting a set of damping ratios... λ The damping ratio variation curve is obtained by connecting the components, and the constitutive parameters are calculated by Hardin's equivalent linear model or Shen Zhujiang's equivalent linear model. (1) The process of calculating the constitutive parameters of the Hardin equivalent linear model (Hardin-Drnevich model) is as follows: The Hardin-Drnevich hyperbola model is as follows: (5) (6) In equations (5) and (6), G Indicates the dynamic shear modulus; Indicates the maximum dynamic shear modulus; Indicates dynamic shear strain; λ represents the reference shear strain; λ represents the damping ratio. Indicates the maximum damping ratio; And the dynamic shear stress of the soil With dynamic shear strain The relationship is described using a hyperbolic model: (7) In equation (7), a , b The two parameters were determined experimentally; dynamic shear modulus G The physical definition of is: (8) From formulas (7) and (8), the linear equation relating the reciprocal of the dynamic shear modulus to the dynamic shear strain is: (9) Where a and b are the intercept and slope of the linear equation in formula (9); Furthermore, we can obtain: (10) (11) In equation (11), This represents the final stress amplitude, equivalent to When approaching ∞ value; Then determine the maximum dynamic shear modulus. At that time, 1 / With dynamic shear strain The reciprocal of the intercept on the vertical axis is obtained, which is based on the assumption that the relationship between dynamic stress and dynamic strain conforms to the hyperbolic model; The parameters K and n are solved by fitting using formula (12): (12) In equation (12), Pa represents the effective mean principal stress, and pa represents the standard atmospheric pressure. The maximum damping ratio can be solved using formula (13). : (13); (2) The process of calculating constitutive parameters using Shen Zhujiang's equivalent linear model is as follows: The reciprocal of the dynamic shear modulus 1 / With dynamic shear strain Approximately fit with a straight line, let a and b To fit the intercept and slope of the straight line, the relationship between the dynamic shear modulus and the dynamic shear strain can be expressed as: (14) when At that time, 1 / a represents the maximum dynamic shear modulus, and the maximum dynamic shear modulus G is determined by the Hardin equivalent linear model. max Similarly, 1 / G can be used with dynamic shear strain. The reciprocal of the intercept on the vertical axis is obtained, which is based on the assumption that the relationship between dynamic stress and dynamic strain conforms to the hyperbolic model; Solve for parameters K and n according to formula (12); Introducing normalized dynamic shear strain The expression is: (15) When normalized dynamic shear strain is used, the dynamic shear modulus decay curves are generally concentrated on a single curve. Let G / The shear strain at =0.5 is Then we have: (16) The maximum damping ratio can be solved using formula (17). : (17).
[0023] Example 7 Building upon steps 5 or 6, in step 2, ablation experiments are conducted to evaluate the contribution of different components in the GA-Net prediction model to performance: the number of heads in the multi-head attention mechanism is adjusted to assess the impact of different head numbers on the performance of the GA-Net prediction model; the number of attention layers is increased or decreased to observe the impact of the number of layers on model performance. The results are shown in Table 1. Table 1
[0024] The number of attention layers and heads are both multi-head attention layers and cross-attention layers in the encoder and decoder. As can be seen from Table 1, the optimal result is 4 heads and 1 attention layer. Therefore, in this invention, 4 attention layers with 1 layer are used. This invention also enhances the interpretability of the model by visualizing the attention weights and comparing the importance of the variables in Table 1. Specifically, it uses a heatmap to visually represent the weight matrix. The dynamic characteristics of the attention mechanism are reflected in the weight matrix. The GA-Net prediction model pays different attention to features of different input samples. By obtaining the local attention weight distribution of the samples, we can analyze the attention weights of each sample at different levels and in the head. Q and K The interaction attention weights are used to identify the features that the GA-Net prediction model focuses on for samples. Furthermore, based on the samples, the attention weights for these features across the entire dataset are calculated. Q The normalized average weights are calculated, and a heatmap is plotted, as shown in the following example. Figure 7 , Figure 8 , Figure 9 , Figure 10 Heatmaps of the attention layers with different numbers of heads for the encoder. Figure 11 , Figure 12 , Figure 13 and Figure 14 Heatmaps of attention layers with different numbers of heads for the decoder. Figure 15 , Figure 16 , Figure 17 and 18 Heatmaps of cross-attention layers with different numbers of heads for the decoder. Based on the attention weight distribution of the samples, the weight distribution of the cross-attention layer of the overall samples is averaged and normalized to obtain the degree of attention the model pays to the influencing factors of all coarse-grained soil samples, such as... Figure 19 As shown, the relative importance of the characteristic variables of coarse-grained soil, in descending order of weight, is: effective mean principal stress. Dynamic shear strain Initial porosity Inhomogeneity coefficient Characteristic particle size , , curvature coefficient C c Soil particle density Regularity of particle shape ρ Characteristic particle size , parent rock strength and ; In step 3, during the training process, the initial learning rate is set to 0.001, multiplied by 0.98 every 10 cycles, the weight decay coefficient is set to 0.99, the batch size is set to 1, and the training cycle is set to 3000.
[0025] The training results of the training set and the test results of the test set are shown in Table 2. Table 2
[0026] As can be seen from Table 2, on the training set, G of MAE It is 39.32 MPa. RMSE It is 67.60 MPa. MAPE The coefficient of determination is 6.78%. R 2 It reached 0.973; for λ, on the training set MAE It is 0.007. RMSE It is 0.011. MAPE It is 9.396%. R 2 The value of 0.952 indicates that the model has a high fit to the training data. On the test set, the model's performance slightly decreases. G of MAE Increased to 58.98 MPa RMSE It is 99.90 MPa. MAPE It is 11.77%. R 2 It is 0.934; λ of MAE It is 0.011. RMSE It is 0.017. MAPE It was 14.09%. R 2 The value was 0.919. Although the prediction accuracy decreased on the test set, the model still maintained a high prediction accuracy. In step 4, the coarse-grained soil to be tested is a certain andesite material a, and the index of the material to be tested is shown in Table 3; Table 3
[0027] The dynamic shear modulus G and damping ratio of andesite material a Predicted values such as Figure 20 and Figure 21 As shown; The results using the Hardin equivalent linear model are shown in Table 4. Table 4
[0028] The equivalent linear model of Shen Zhujiang was adopted, and the results are shown in Table 5. Table 5
[0029] The prediction results of the GA-Net prediction model of this invention, the GA-Net prediction model after removing the decoder part (denoted as Encoder), and the GA-Net prediction model after removing the encoder part (denoted as Decoder) were compared with those of Convolutional Neural Network (CNN), Fully Connected Neural Network (FCN), Support Vector Machine (SVM), and Random Forest (RF). The results are shown in Table 6. Table 6
[0030] The results show that the GA-Net prediction model of this invention is effective in predicting the dynamic shear modulus of coarse-grained soil. G Damping ratio λ The GA-Net prediction model performs exceptionally well in all evaluation metrics, outperforming other models in dynamic shear modulus. G In terms of predictions, MAE It is 58.98 MPa. RMSE It is 99.90 MPa. MAPE It is 11.77%. The damping ratio is 0.934. λ In terms of predictions, MAE It is 0.011. RMSE It is 0.017. MAPE It was 14.09%. It is 0.919. In comparison, the Encoder has a dynamic shear modulus of 0.919. G On the prediction MAE , RMSE and MAPE All of these are higher than GA-Net, at 70.78 MPa, 117.88 MPa, and 14.54%, respectively. The score was 0.924; although the Decoder was slightly better than the Encoder, it still lagged behind the GA-Net prediction model in all metrics. MAE , RMSE and MAPE The values were 67.24 MPa, 110.94 MPa, and 12.72%, respectively. The value is 0.927; furthermore, the GA-Net prediction model also outperforms traditional machine learning models. For example, FCN shows better performance in dynamic shear modulus. G On the prediction MAE The value is 112.06 MPa, far higher than the 58.98 MPa of the GA-Net prediction model; SVM's... MAE It is 135.66 MPa. RMSE It is 227.90 MPa. MAPE It is 37.79%. The scores were 0.846, all lower than the performance of the GA-Net prediction model; RF's MAE The value was 82.57 MPa, which is also higher than that of GA-Net. This indicates that the encoder-decoder structure and attention mechanism adopted by the GA-Net prediction model of this invention play an important role in improving prediction performance, and verifies the potential and advantages of deep learning models in soil mechanical parameter prediction.
[0031] The predicted values of the GA-Net prediction model were compared with the measured values of the material test to further verify the prediction ability of the GA-Net prediction model for dynamic shear modulus and damping ratio. The indices of coarse-grained soil are shown in Table 7. Table 7
[0032] Figure 22 , Figure 23 , Figure 24 , Figure 25 , Figure 26 and Figure 27 The predicted and experimental values of dynamic shear modulus and damping ratio are presented. The model of this invention accurately reproduces the typical nonlinear characteristics of coarse-grained soil dynamics: that is, with the increase of dynamic shear strain, the dynamic shear modulus exhibits a nonlinear decreasing trend, while the damping ratio exhibits a nonlinear increasing trend. The high degree of overlap between the predicted and experimental values for different coarse-grained soil materials demonstrates the model's good generalization ability and wide applicability. Compared with traditional methods, this invention significantly reduces experimental costs while ensuring high accuracy and reliability in predicting the dynamic characteristics of coarse-grained soils throughout the entire process, and effectively solves the problem of poor applicability of traditional empirical formulas when dealing with complex and variable coarse-grained soil materials.
Claims
1. A method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism, characterized in that, The specific steps are as follows: Step 1: Construct a coarse-grained soil test dataset; Step 2, construct the GA-Net prediction model; Step 3: Divide the dataset constructed in Step 1 into a training set and a test set. Input the training set into the GA-Net prediction model for training to obtain the trained GA-Net prediction model. Then use the test set to test the trained GA-Net prediction model to obtain the tested GA-Net prediction model. Step 4: Input the key parameters of the coarse-grained soil to be tested into the GA-Net prediction model after the test to obtain a set of dynamic shear modulus G and a set of damping ratio λ.
2. The method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on the attention mechanism according to claim 1, characterized in that, In step 1, the coarse-grained soil test dataset includes 14 key parameters, specifically: particle shape regularity. ρ Uniaxial compressive strength of parent rock Soil particle density Initial porosity Inhomogeneity coefficient curvature coefficient C c Effective mean principal stress Dynamic shear strain sequence and characteristic particle size , , , , , ; in, Indicates the maximum particle size in the coarse-grained soil sample; This indicates the content of particles smaller than a certain size on the particle size distribution curve of a coarse-grained soil sample. i The corresponding particle size, i =80, 60, 50, 30, 10.
3. The method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism according to claim 2, characterized in that, The dynamic shear strain sequence consists of several dynamic shear strains from smallest to largest. The composition consists of several dynamic shear strains with values ranging from 0.00001 to 0.
1.
4. The method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism according to claim 2, characterized in that, In step 2, the GA-Net prediction model consists of an input module, an attention module, and a regression head module; The input module processes the following steps: 14 key parameters of each coarse soil sample are combined into a 1×14 sequence A. Then, two zero values are appended to the end of sequence A to form a 1×16 sequence B. Each element in sequence B is mapped to a 1×16 dimensional feature vector. Then, sequence B is expanded into a batch×1×16×16 matrix. The attention module consists of an encoder and a decoder; The regression head module consists of fully connected layers and outputs the dynamic shear modulus. G Damping ratio λ .
5. The method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism according to claim 4, characterized in that, The encoder's specific processing procedure is as follows: After the batch×1×16×16 matrix is input, it is processed by the first multi-head self-attention layer to output result A. Result A is added to the batch×1×16×16 matrix and then processed by the first normalization layer to obtain result B. Result B is input to the first feedforward network for processing to obtain result C. Result B is added to result C and then processed by the second normalization layer to obtain result D.
6. The method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism according to claim 4, characterized in that, The specific processing procedure of the decoder is as follows: After the batch×1×16×16 matrix is input, it is processed by the second multi-head self-attention layer to output the result E. The result E is concatenated with the batch×1×16×16 matrix and then processed by the third normalization layer to obtain the result F. The result F and the result D are input to the cross-attention layer for processing to obtain the result G. The result G and the result F are added and then processed by the fourth normalization layer to obtain the result H. The result H is input to the second feedforward network for processing to obtain the result J. The result J and the result H are added and then processed by the fifth normalization layer to obtain the result K. The result K is used as the input of the regression head module.
7. The method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on an attention mechanism according to claim 1, characterized in that, In step 3, the ratio of the training set to the test set is 5:
1.
8. The method for predicting the dynamic shear modulus and damping ratio of coarse-grained soil based on the attention mechanism according to claim 1, characterized in that, In step 3, the loss function used during training is: (1) In equation (1), MAE A represents the mean absolute error; i P represents the actual value; i This indicates a pre-test; n represents the number of coarse-grained soil samples. (2) In equation (2), RMSE Indicates the root mean square error; (3) In equation (3), MAPE Indicates the mean absolute percentage error; (4) In equation (4), R 2 represents the determination coefficient; Ā represents the average value of the actual values.