## 4 GTNet Earth Pressure Balance Formation Identification Method
### Model Training  
At the beginning of the model training, channel embedding and position embedding (position encoding enabled) are first performed on the input data. Then, the data are, respectively, encoded for channel and time step positions through two encoders. During the encoding process, the attention distribution matrix at the time step or channel level is obtained by the network model. After the feature extraction and information interaction are carried out in the multi-head attention layer and the feedforward neural network layer, the data is flattened into a two-dimensional vector. The outputs of the two encoders are weighted and fused through the gating mechanism after the flattening operation. The data eventually enters the output layer to complete the recognition and classification. During the entire recognition process, the model parameters are updated through the gradient of the loss function to optimize the predictive performance of the model. In order to verify the generalization performance of the model and study the influence of hyperparameters on model training, hyperparameter selection experiments need to be conducted before the model training begins. The hyperparameter settings include the training period epoch; batch size is the key factor determining the generalization ability of the model; the learning rate affects the learning speed of the model; model input and output dimensions _d-model_; model depth d-hidden; \(N\) represents the number of encoder  
Figure 11: GTNet structure diagram. modules created; \(h\) represents the number of attention heads; random inactivation rate dropout; and optimizer. The hyperparameters of the applied GTNet model are first set with the epoch value initially set to 100. Different learning rates and batch sizes are set. The proportion of the training set and the test set in the total data set is set to 4:1. The accuracy is shown in Table 7. Excessive network layers and training cycles can lead to longer training time and overfitting problems. When the d-model and d-hidden are set to 512 and 1024, respectively, the accuracy of the model during training first increases and then decreases, and the training time is twice that when the d-model and d-hidden are set to 256 and 512, respectively. The batch size of 64 is chosen for the accuracy, which keeps higher under different learning rates than that of others. Finally, the optimal hyperparameter setting method in Table 8 was obtained by combining the model training time and accuracy rate. In deep learning, precision, recall, and \(f_{1}\) value are common performance evaluation criteria used to measure the performance of classification models. Calculate the precision rate, recall rate, and \(f_{1}\) score of the above four network models. The precision calculation formula is Equation (10), the recall formula is Equation (11), and the \(f_{1}\) score formula is Equation (12). The result is shown in Figure 12. The \(f_{1}\) scores are relatively close to their respective accuracy and recall rates, indicating that the performance of the model can strike a balance between accuracy and recall rates, and there is a good trade-off between correctly classifying positive instances and minimizing false positives and false negatives. \[Precision=\frac{TP}{TP+FP} \tag{11}\]  
\[Recall=\frac{TP}{TP+FN} \tag{12}\]  
\[F_{1}=\frac{2 TP}{2 TP+FP+FN} \tag{13}\]  
where \(TP\) represents the number of samples that predict the positive class but are actually positive, \(FP\) represents the number of samples that predict the positive class but are actually \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Learning Rate** & **Batch Size of 8** & **Batch Size of 16** & **Batch Size of 32** & **Batch Size of 64** \\ \hline
0.0003 & 0.986 & 0.978 & 0.962 & 0.981 \\
0.00002 & 0.979 & 0.974 & 0.954 & 0.984 \\
0.0002 & 0.982 & 0.981 & 0.971 & 0.987 \\
0.00001 & 0.982 & 0.989 & 0.964 & 0.983 \\
0.0001 & 0.982 & 0.986 & 0.962 & 0.993 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Accuracy of GTNet under different parameters.