Tunnel surrounding rock intelligent classification method and device based on double-scale interpretable deep learning

By employing a dual-scale interpretable deep learning method, combined with SMOTE oversampling, CTGAN data augmentation, and TabPFN classifier, the imbalance and small sample size problems in surrounding rock classification were resolved, achieving accuracy and transparency in surrounding rock classification and ensuring the scientific and efficient nature of the construction process.

CN122153596APending Publication Date: 2026-06-05TIANJIN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2026-03-17
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing methods for classifying surrounding rock rely on subjective judgment, resulting in a lack of objective basis for evaluation results. Furthermore, under conditions of imbalance and small sample size, it is difficult to accurately predict the surrounding rock category of tunnels. Traditional AI models also struggle to explain the correlation between input features and surrounding rock categories.

Method used

A tunnel surrounding rock intelligent classification method based on dual-scale interpretable deep learning is adopted. By using SMOTE oversampling, improved CTGAN data augmentation and RpGAN+R1+R2 loss function, combined with the TabPFN classifier with SHAP global interpretation and LIME instance-level interpretation, transparent interpretation and accurate classification of surrounding rock data are achieved.

Benefits of technology

Under unbalanced and small sample conditions, the accuracy and transparency of surrounding rock classification were achieved, enabling accurate determination of the surrounding rock type of underground cavern groups and ensuring the scientific and efficient nature of the construction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122153596A_ABST
    Figure CN122153596A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on double scale interpretable deep learning's tunnel surrounding rock intelligent classification method, based on the surrounding rock data obtained by advanced geological prediction to establish initial dataset, using oversampling method to reduce class overlap by improving minority sample grouping strategy;On the basis of CTGAN, introduce inverted bottleneck module and symmetrical structure, make generator and discriminator have the same number of hidden layers;Use the same inverted bottleneck module structure in each layer;Make each continuous feature be normalized to uniform numerical range and retain its structure characteristics in original distribution, while distinguishing the distribution difference under different labels;Based on the surrounding rock classification data after unbalanced optimization and data enhancement, adopt the double scale interpretable TabPFN classifier combined with SHAP global explanation and LIME instance-level explanation, enhance the transparency of model decision-making process and point out the main input features affecting surrounding rock classification.The application can accurately determine the surrounding rock class and the main factors affecting surrounding rock classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of surrounding rock classification technology for underground tunnels in water conservancy and hydropower projects, and particularly to an intelligent classification method and device for tunnel surrounding rock based on dual-scale interpretable deep learning. Background Technology

[0002] Rock mass classification is a crucial basis for assessing tunnel rock mass stability and determining appropriate construction methods and support parameters. To accurately reflect the quality of the surrounding rock, tunnel rock mass classification methods have evolved to a semi-quantitative or quantitative stage employing multiple indicators. Internationally accepted rock mass classification systems include the Rock Mass Rating (RMR) system, the Q system, the Geological Strength Index (GSI), the Foundation Quality (BQ) system, and the Hydraulic Classification (HC) system. However, some evaluation indicators and values ​​in these classification methods still rely on subjective judgment, and the evaluation results of different rock mass classification methods often differ, leading to a lack of objective basis for selecting actual identification results.

[0003] Artificial intelligence (AI) algorithms, with their powerful nonlinear approximation and generalization capabilities, have enabled rock mass classification to overcome the subjective limitations of traditional qualitative methods, achieving "fast, accurate, and stable" performance. Machine learning techniques such as support vector machines, neural networks, particle swarm optimization, and semi-supervised learning have achieved significant results in rock mass classification. However, these methods typically rely on iterative optimization and hyperparameter tuning, and are often difficult to understand, resembling black boxes. In contrast, the TabPFN model demonstrates superior classification performance on small datasets. This model outperforms traditional methods on datasets with fewer than 10,000 samples, while eliminating the tedious process of iterative optimization and hyperparameter tuning, significantly reducing training time.

[0004] Furthermore, most AI models operate like black boxes, making it difficult to understand the correlation between input features and surrounding rock categories. The development of interpretable methods has provided effective tools to address this challenge. Representative methods include LIME, SHAP, LRP, DarkSight, and MCR. Among these, LIME and SHAP have become the most widely used frameworks in the field of model interpretation. From a global perspective, SHAP quantifies the overall contribution of surrounding rock features to the classification results; from a local perspective, LIME reveals the decision-making basis of individual samples. Therefore, this study integrates the two into a dual-scale framework for surrounding rock classification, which can both identify key feature factors in the surrounding rock dataset and provide transparent interpretations for specific samples, thus enabling a more comprehensive understanding of the model's decision-making process.

[0005] Current research on surrounding rock classification mainly utilizes TBM tunneling parameters or advanced geological prediction data. Some studies extract rock characteristics from exposed rock masses such as tunnel faces and rock debris using image recognition technology. Among these, advanced geological prediction, as the primary method for long-distance tunnel exploration, not only boasts advantages in high resolution and reliability but also eliminates the need to occupy the tunnel face, allowing for direct acquisition of surrounding rock characteristic indicators ahead of the tunnel face. Therefore, to achieve large-scale prediction of surrounding rock categories ahead of excavation, research is conducted using surrounding rock index information obtained from advanced geological prediction. However, this technology is time-consuming, labor-intensive, and costly, and the amount of surrounding rock data obtained is limited. Furthermore, extremely hard or extremely soft rock masses often constitute only a small portion of the rock mass along the tunnel, leading to an imbalance in the distribution of surrounding rock categories in actual engineering projects. Therefore, it is necessary to conduct research on interpretable deep learning-based surrounding rock classification methods under imbalanced and small sample conditions. Summary of the Invention

[0006] This invention provides a method and device for intelligent classification of tunnel surrounding rock based on dual-scale interpretable deep learning to solve the technical problems existing in the prior art.

[0007] The technical solution adopted by this invention to solve the technical problems existing in the prior art is as follows: A method for intelligent classification of tunnel surrounding rock based on dual-scale interpretable deep learning, comprising the following steps: Step 1: Establish an initial dataset based on the surrounding rock data obtained from advanced geological forecasting, and use the SMOTE oversampling method to reduce class overlap by improving the minority sample grouping strategy; Step 2: Based on CTGAN, an inverted bottleneck module and a symmetric structure are introduced, ensuring that the generator and discriminator have the same number of hidden layers; the exact same inverted bottleneck module structure is used in each layer; this normalizes each continuous feature to a uniform numerical range while preserving its structural features in the original distribution, and simultaneously distinguishes distribution differences under different labels; RpGAN is then employed. + R1 + R2 loss function is used to improve training stability; Step 3: Based on the unbalanced optimization and data augmentation of the surrounding rock classification data, a dual-scale interpretable TabPFN classifier combining SHAP global interpretation and LIME instance-level interpretation is adopted to enhance the transparency of the model decision-making process and identify the main input features affecting the surrounding rock classification.

[0008] Furthermore, step 1 includes the following sub-steps: Step 1-1, let the original surrounding rock dataset be... Let the number of samples in class c be... , If a certain type of sample has a large number of samples, then that sample type is called the majority class. set up Indicates the sample category number belonging to the majority class; let ,the remaining All sample categories are minority classes that require oversampling; In the formula: i represents the training sample number; Indicates the sample category number; N represents the number of samples in the original surrounding rock dataset; E represents the number of sample categories; This represents the feature vector of the i-th training sample; The label represents the i-th training sample; This indicates the value of the independent variable that makes the expression within the parentheses reach its maximum value. Indicates in set Take the upper hand Category index of maximum value ; Indicates in set All The maximum value; Steps 1-2: Train a multi-class random forest classifier in the original feature space to obtain the categories. Prediction probability function ; For each minority class According to the following formula based on its predicted probability The corresponding samples are divided into marginal sample groups. and safety sample group : ; ; In the formula: This represents the training sample vector that the discriminator inputs; This indicates that the classifier operates on input training samples. Category The predicted probability; Indicates classifier prediction Category The probability value; This represents the probability estimation function given by the random forest classifier; Represents the set of marginal sample groups; Represents a set of safe sample groups; This represents the lower threshold of the low confidence interval; This represents the upper threshold of the low confidence interval; Where the threshold Used to identify low confidence intervals.

[0009] Furthermore, step 1 also includes the following sub-steps: Steps 1-3 are for edge sample groups. and safety sample group Each sample in the dataset is assigned a weight; then, from each sample... and Select one sample from the set, use the weights as selection probabilities to form a sample pair, and add it to the synthetic set. In this process, for each pair of samples in this set, two weights are used as the selection probabilities of the two samples in the roulette wheel selection method. Finally, the selection process is repeated until the number of selected sample pairs is equal to the difference between the number of majority class samples and the number of minority class samples. For samples that are difficult to classify Assigning higher sampling weights, dividing them into edge sample weights The formulas for calculating the weights of safe samples, marginal samples, and safe samples are as follows: ; ; In the formula: j represents the training sample number; 'a' represents the edge sample group The training sample number in the sample; b represents the safe sample group The training sample number in the sample; This represents the feature vector of the j-th training sample; Indicates marginal sample group The a-th training sample in the dataset; Indicates safe sample group The b-th training sample in the dataset; Indicates random forest pairs Category The predicted probability; Indicates random forest pairs Category The predicted probability; Indicates random forest pairs Category The predicted probability; express Edge sample weight function; express The safe sample weighting function; closest to the confidence level or Edge samples are given greater weight; Give greater weight to safe samples with maximum or minimum confidence levels; In the sample selection process, and In, respectively according to weight and Samples with replacement If sample pairs The cumulative number of occurrences during the sampling process is Its characteristic spatial distance is Then the line segment Divided into equal parts Each segment is a sub-segment, and the intermediate points of these sub-segments are used as new samples for the generated minority class. The sample pairs are the first... The next time it appears, New samples are generated using the following formula: ; In the formula: express and Spatial distance between them; Indicates sample pairs The cumulative number of occurrences during the sampling process; Indicates the sample pair of the first New samples of the minority class are generated upon the first occurrence; This indicates the sequence number of times a sample pair appears during the sampling process.

[0010] Furthermore, in step 2, the method of introducing an inverted bottleneck module based on CTGAN includes the following steps: Construct the inverted bottleneck module as follows: Let the input feature vector of the inverted bottleneck module be... , Use one according to the following formula The fully connected layer reduces the channel dimension from Expand to : ; In the formula: The index number of the presentation layer; Represents the input feature vector The number of dimensions; Indicates the expansion factor; This represents the input feature vector of the inverted bottleneck module; This represents the expanded intermediate vector; ; The weight matrix represents the expansion phase; ; Represents the bias vector during the expansion phase; ; Represents the ReLU activation function; Set t to control the ratio of the number of channels after expansion to the number of channels before expansion; For the expanded vector Perform a grouped linear transformation according to the following formula: ; In the formula: Represents the transformed vector; Represents the weight tensor of the grouped fully connected layer; Represents the bias vector of the grouped fully connected component; ; express Perform a grouped full connection operation; Then pass according to the following formula Fully connected layers compress dimensions back to their original dimensions. : ; In the formula: This represents the compressed intermediate vector; Represents the weight matrix for the compression phase; ; Represents the bias vector during the compression phase; ; Among them, the weight matrix in the compression stage , from dimension Press back ; Compressed intermediate vector , dimension ; The compressed intermediate vector is directly added to the input vector of the inverted bottleneck module according to the following formula, which is used as the final output of the inverted bottleneck module to form a skip connection to alleviate gradient vanishing: ; In the formula: This represents the final output of the inverted bottleneck module.

[0011] Furthermore, in step 2, the method of introducing a symmetric structure based on CTGAN includes the following steps: Construct a symmetric structure as follows: Let the generator and discriminator have the same number of hidden layers, and the corresponding hidden layer dimensions of the two be consistent. Both have a hidden layer dimension of [missing information]. The hidden layer uses the exact same inverted bottleneck module structure: ; in , Indicates the generator at the 1st... The hidden layer uses an inverted bottleneck module structure; The discriminator is in the first... The hidden layer uses an inverted bottleneck module structure; "Indicates that the structural forms are exactly the same, only the weight parameters are different; Let the number of channels be in the th case. As the hidden layer changes, both the generator and discriminator introduce a symmetrical transition layer according to the following formula: ; In the formula: This represents the vector output by the inverted bottleneck module in the previous stage; Indicates the first The weight matrix of the transition layer; ; Indicates the first The target dimension of the hidden layer; Indicates the first The vector dimension of the hidden layer; Represents the transition layer bias vector; ; Indicates the activation function; No. Weight matrix of the transition layer This is used to change the number of channels or fusion conditions; Finally, the discrete conditional vector is introduced into the generator and discriminator in the same way at the input layer or intermediate layer: The concatenated vector from the generator input layer is represented as follows: ; ; The concatenated vector representation of the discriminator input layer is as follows: ; ; In the formula: Represents a discrete conditional vector; Indicates the length of the discrete condition vector; This represents the sample vector that the discriminator inputs. This represents the noise vector input to the generator; ; This represents the vector concatenated from the generator's input layer; This represents the concatenated vector from the discriminator input layer; β represents the dimension of the noise vector.

[0012] Furthermore, in step 2, the method for normalizing each continuous feature to a uniform numerical range while preserving its structural characteristics in the original distribution includes the following steps: Improve data quality by refining the data normalization process as follows: To more accurately reflect the distribution characteristics of each category, before normalization, the data is first split into several subsets based on the labels; then, for each label subset, a VGM is fitted separately on each continuous feature; let the i-th... The VGM of a label contains H Gaussian components, let the label be... In the VGM model, the first The mixing weights of the Gaussian components are In the label In the VGM model, the first The mean of the Gaussian components is In the label In the VGM model, the first The covariance matrix of the Gaussian components is , All of these were learned from the training samples of the label using a variational inference algorithm. Normalization is performed using the VGM features specific to each label; this process consists of two steps: Step A, for the first A sample of labels Calculate its relationship with the first Posterior responsibility of each Gaussian component: ; In the formula: Indicates the first The sample number of each label; Indicates the first The Gaussian component index in the VGM of each label; Indicates the first The Gaussian component index in the VGM of each label; Indicates the first The first tag The nth sample pair The posterior probability of each Gaussian component; Indicates the first The first tag The sample at the th Probability density values ​​under Gaussian components; Indicates that in the label In the VGM model, the first The mixing weights of Gaussian components; Indicates that in the label In the VGM model, the first The mean of the Gaussian components; Indicates that in the label In the VGM model, the first A Gaussian component covariance matrix; Indicates the first The first tag The sample at the th Probability density values ​​under Gaussian components; in, See as the first The prior probabilities of the Gaussian components satisfy the following conditions: ; Reflecting the The center position of each Gaussian component; Step B: Determine the class to which the sample has the highest posterior probability according to the following formula: ; In the formula: Indicates the first The first tag The categories into which each sample is divided; This indicates the value of the independent variable that makes the expression within the parentheses reach its maximum value. Denotes the posterior probability of taking. Largest Gaussian component index ; Represents all Gaussian components The maximum value in; After determining the components, the cumulative distribution function value of the sample in the component distribution is used as the normalization result according to the following formula: ; In the formula: Indicates the selection of Gaussian components The cumulative distribution function value; Represents the integral variable; Indicates the first Class 1 The normalized values ​​of each sample; Indicates sample The mean vector of the Gaussian component; Indicates sample The covariance matrix of the Gaussian components; This represents the Gaussian probability density function corresponding to this component.

[0013] Furthermore, in step 2, RpGAN is used. + R1 + The method of using the R2 loss function to improve training stability includes the following steps: RpGAN trains the generator by comparing the difference between the discriminator output of generated samples and real samples, rather than judging real and fake samples individually. The formula for calculating the RpGAN loss is as follows: ; In the formula: Represents a noise vector; Represents the trainable parameters of the generator; This represents the trainable parameters of the discriminator; This represents the target loss function value of RpGAN; Indicates the generator's response to noise The samples generated by the mapping; This represents the scoring function of the discriminator for the input sample; This represents the prior distribution of the generator's input noise; Represents the distribution of real data; This represents an adversarial function that transforms the difference between scores of real and fake samples; Indicates a sample of real data Expectations; Represents the noise vector Expectations; From simple distribution Mid-sampling; From the distribution of real data Mid-sampling; Output a fake sample ; Output a real fraction; the larger the real fraction, the higher the confidence level. The formulas for calculating the regularization terms R1 and R2 are as follows: ; ; In the formula: This represents the R1 regularization term, used to constrain the gradient of the discriminator on the real data; This represents the R2 regularization term, used to constrain the gradient of the discriminator on the generated data; This indicates that the discriminator output corresponds to the input. The gradient; The hyperparameters representing the gradient regularization term; This represents the expectation of the generated samples; in, Describe the degree of local variation of the discriminator function with respect to the input.

[0014] Furthermore, in step 3, during the training process, imbalance optimization and data augmentation are performed on the surrounding rock classification data according to the following steps: Step I, given a training set containing a small number of n samples Its core assumption is that data is generated from potential trainable parameters, and the prior distribution of these parameters is difficult to handle directly; the model is pre-trained offline using large-scale synthetic data generated by structural causal models; in this process, the Transformer network learns to directly map the training context and query samples to the posterior prediction distribution; TabPFN uses the feature vector of the o-th training sample. Its corresponding tag It is embedded into a sequence and the test sample is attached. The dual-path attention mechanism captures dependencies between rows and columns; the hidden representation of the test label position is projected as logits, and class probabilities are generated using temperature-scaled Softmax. ; In the formula: Indicates the true class label of the training sample; This represents the feature vector of the sample to be predicted. This represents the maximum threshold for the number of true categories; Indicates the category number; Indicates the category number; Indicates the first Logit values ​​for each category; Indicates the first Logit values ​​for each category; Indicates temperature parameter; Indicates the number of true categories; express; If the actual number of categories Then only for the former Normalize the logarithmic probability, then One dimension was considered invalid and ignored; Let the training context sample set be denoted as . ,set up: ; In the formula: Indicates the sample index in the training context sample set; This indicates the number of samples in the training context sample set; This represents the feature vector of the p-th training sample in the training context sample set; The label represents the p-th training sample in the training context sample set; It is obtained by linearly mapping the hidden vector output from the last layer of the Transformer network; Used to adjust the smoothness of Softmax, fixed in TabPFN. ; Step II: During training, the Transformer network uses the training context sample set to predict the label probability of each query sample; the training objective is to minimize the cross-entropy loss between the predicted probability of the query sample and the true label. The label probability of each query sample is calculated using the following formula: ; The cross-entropy loss between the predicted probability of the query sample and the true label is calculated using the following formula: ; In the formula: Indicates based on synchronous training dataset The calculated cross-entropy loss; B represents the query sample number; Indicates the first Input features of each query sample; Indicates the first The actual labels corresponding to each query sample; This represents the query sample predicted by the model. The label probability vector; Indicates the query sample set; This indicates that the Transformer network is in a given context sample set. Under the condition of query sample The prediction results; This indicates taking the prediction vector corresponding to the first... Class components; The indicator function is defined if and only if it is equal to 1. The true label for each query sample is c; Indicates a set of samples in a given training context. Under these conditions, the Transformer network processes query samples A vector composed of the predicted probabilities of each category; This represents the complete set of trainable parameters for a Transformer network model. This represents the synthetic dataset currently sampled from the prior generator; Represents the Transformer network model The output, in the input context set and samples Afterwards, regarding the first The predicted probability of a class; set up: Represents the surrounding rock dataset; Representing the surrounding rock dataset The first in Features of each training sample; Representing the surrounding rock dataset The first in Each training sample label; ζ represents the test sample; ζ represents the surrounding rock dataset. The number of training samples in the dataset; Representing the surrounding rock dataset The sequence number of the training sample; This indicates that the output layer of the Transformer network is in the test sample. The logit vector corresponding to the position; This indicates that the number of true classes obtained after Softmax is The class probability vector at that time; This represents the number of true categories in the surrounding rock classification task; This indicates that the category index with the highest probability is taken as the final prediction result; This represents the output of the Transformer network model; In the surrounding rock dataset When performing multi-class classification, all training sample features are used. and its label encoding and test samples The sequences are co-serialized and fed into a pre-trained Transformer network, allowing for simultaneous utilization of contextual information and output in a single forward propagation. Take the front Performing Softmax on the dimension yields... The final predicted category is To improve the robustness of the model, TabPFN uses a randomized dataset and multiple preprocessing variants to average the prediction results.

[0015] Furthermore, in step 3, following the steps below, a dual-scale interpretable TabPFN classifier combining SHAP global interpretation and LIME instance-level interpretation is used to obtain the main input features affecting the classification of surrounding rocks: Based on the TabPFN surrounding rock advanced classification algorithm, a dual-scale interpretability analysis method combining global and local perspectives is adopted. At the global level, the SHAP method is used to quantify the average contribution of each surrounding rock feature in the entire dataset, and at the local level, the LIME method is used to provide the additive contribution of each feature. For calculating features To obtain the SHAP value, it is necessary to enumerate the marginal contribution of the feature across all possible feature subsets; for each feature subset not containing the feature... Feature subset Calculate the features Add to The changes that occur in the model output after the model is updated; then for all possible subsets Weighted average; the calculation formula is as follows: ; In the formula: Representation of features The SHAP value; Indicates the feature number; Represents the set of all features; Indicates that it does not contain features any subset of; Indicates using only a subset of features The expected value predicted by the model at input; Indicates in subset Add features to the basis The expected value of the post-model prediction results; Represents the total number of characteristics; Representing a subset Size; The factorial represents the size of the subset; Represents the factorial of the total number of features; This represents the factorial of the remaining feature count minus one. Indicates that it does not contain features any subset of; The interpretation of LIME is transformed into a weighted optimization problem, namely, finding a simple model ν that, given sample points... In its neighborhood, it can approximate the original model as closely as possible. The predictive behavior; the specific optimization objectives are as follows: ; In the formula: f This represents the original surrounding rock classification model; ν indicates proximity And compared A model with a simple structure; Represents a given sample point; This represents the neighborhood samples of a given sample point; This represents the locally weighted loss function, which measures the performance of model ν at a given number of sample points. Can the surrounding area approximate the original model? ; Representing neighborhood samples With a given sample point Distance weight function; This represents a regularization term used to limit the complexity of the explained model; This represents the set of functions that LIME allows as local proxy models.

[0016] The present invention also provides an apparatus for a tunnel surrounding rock intelligent classification method based on dual-scale interpretable deep learning, comprising a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the steps of the tunnel surrounding rock intelligent classification method based on dual-scale interpretable deep learning as described above.

[0017] The advantages and positive effects of this invention are: This invention proposes an intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning. This method addresses the limitations of existing research methods by comprehensively considering the small sample size and imbalance of surrounding rock data, while also acknowledging the black-box nature of the artificial intelligence algorithms used for classification. It enables accurate determination of the surrounding rock category in underground cavern groups. By comprehensively considering the small sample size and imbalance of surrounding rock data and combining dual-scale interpretability analysis, this invention proposes an interpretable deep learning method based on GBH-SMOTE oversampling and improved CTGAN data augmentation, providing an accurate and interpretable solution for surrounding rock classification under imbalanced and small sample conditions.

[0018] This invention can accurately determine the surrounding rock type of underground cavern groups, identify the main factors affecting the classification effect of surrounding rock, and ensure that the construction process proceeds scientifically, efficiently, and in an orderly manner. Attached Figure Description

[0019] Figure 1 This is a flowchart of the intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning, according to the present invention. Detailed Implementation

[0020] The present invention will now be described in detail with reference to the accompanying drawings and embodiments. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0021] The following are the Chinese definitions of English words, phrases, and abbreviations: SMOTE (Synthetic Minority Oversampling) is an oversampling method used to address imbalanced data in classification problems. It balances the dataset by generating synthetic new samples from the minority class samples, thereby improving the model's predictive performance on the minority class.

[0022] GBH-SMOTE: An improved gradient-boosting-based synthetic minority oversampling technique for multi-class classification.

[0023] CTGAN: Conditional Generative Adversarial Network.

[0024] VGM: Variational Gaussian Mixture Model.

[0025] TabPFN: Tabular Prior Foundation Network.

[0026] SHAP: Shapley Additive Explanation Model.

[0027] LIME: Locally Interpretable Model-Independent Interpreter.

[0028] logits: Unnormalized model output values Softmax: A function that transforms logits into a probability distribution. Please see Figure 1 A method for intelligent classification of tunnel surrounding rock based on dual-scale interpretable deep learning, comprising the following steps: Step 1: Establish an initial dataset based on the surrounding rock data obtained from advanced geological forecasting. In view of the imbalance characteristics of the surrounding rock itself, the SMOTE oversampling method is adopted to reduce class overlap by improving the minority sample grouping strategy, thereby alleviating the imbalance problem of surrounding rock class data.

[0029] Step 2: Based on CTGAN, an inverted bottleneck module and a symmetric structure are introduced, ensuring that the generator and discriminator have the same number of hidden layers; the exact same inverted bottleneck module structure is used in each layer; this normalizes each continuous feature to a uniform numerical range while preserving its structural features in the original distribution, and simultaneously distinguishes distribution differences under different labels; RpGAN is then employed. + R1 + The R2 loss function is used to improve training stability. To address the issue of small sample sizes of surrounding rock data caused by the time-consuming and labor-intensive nature of advanced geological prediction methods, an improved CTGAN method is adopted for data augmentation, which includes improvements in three parts: model structure, data normalization, and loss function.

[0030] Step 3: Based on the unbalanced optimization and data augmentation of the surrounding rock classification data, a dual-scale interpretable TabPFN classifier combining SHAP global interpretation and LIME instance-level interpretation is adopted to enhance the transparency of the model decision-making process and identify the main input features affecting the surrounding rock classification.

[0031] The SMOTE oversampling method can be the GBH-SMOTE oversampling method.

[0032] Quantitative values ​​for five surrounding rock indices—transverse wave velocity, longitudinal wave velocity, wave velocity ratio, Poisson's ratio, and dynamic Young's modulus—were obtained from the "Ahead Surrounding Rock Property Map" of the advanced geological prediction results of the TSP203PLUS system at the engineering site. Simultaneously, values ​​for the five groundwater levels given by infrared detection results—dry, dripping, linear, stream-like, and concentrated inflow—were taken within different intervals to achieve quantification; dry was assigned [0, 0.2], dripping was assigned (0.2, 0.4], and so on. These six indices, together with the actual surrounding rock category corresponding to each station, constitute the original dataset for surrounding rock classification.

[0033] Preferably, step 1 may include the following sub-steps: Step 1-1, the original surrounding rock dataset can be set as follows: Let the number of samples in class c be... , If a certain type of sample has a large number of samples, then that sample type is called the majority class. Can be set Indicates the sample category number belonging to the majority class; let ,the remaining All sample categories are minority classes that require oversampling; In the formula: i represents the training sample number; Indicates the sample category number; N represents the number of samples in the original surrounding rock dataset; E represents the number of sample categories; This represents the feature vector of the i-th training sample; The label represents the i-th training sample; This indicates the value of the independent variable that makes the expression within the parentheses reach its maximum value. Indicates in set Take the upper hand Category index of maximum value ; Indicates in set All The maximum value; Steps 1-2 involve training a multi-class random forest classifier on the original feature space to obtain the categories. Prediction probability function ; For each minority class The predicted probability can be calculated using the following formula. The corresponding samples are divided into marginal sample groups. and safety sample group : ; ; In the formula: This represents the training sample vector that the discriminator inputs; This indicates that the classifier operates on input training samples. Category The predicted probability; Indicates classifier prediction Category The probability value; This represents the probability estimation function given by the random forest classifier; Represents the set of marginal sample groups; Represents a set of safe sample groups; This represents the lower threshold of the low confidence interval; This represents the upper threshold of the low confidence interval; Where the threshold Used to identify low-confidence intervals, threshold All are less than or equal to 1. For example Set to 0.4, Set it to 0.6.

[0034] Preferably, step 1 may further include the following sub-steps: Steps 1-3 can be used to identify edge sample groups. and safety sample group Each sample in the dataset is assigned a weight; then, from each sample... and Select one sample from the set, use the weights as selection probabilities to form a sample pair, and add it to the synthetic set. In the middle; the greater the weight, the greater the likelihood of selection.

[0035] For each pair of samples in this set, two weights are used as the selection probabilities of the two samples in the roulette wheel selection method; finally, the selection process is repeated until the number of selected sample pairs is equal to the difference between the number of majority class samples and the number of minority class samples.

[0036] It can handle samples that are difficult to classify. Assigning higher sampling weights, dividing them into edge sample weights The formulas for calculating the weights of safe samples, marginal samples, and safe samples are as follows: ; ; In the formula: j represents the training sample number; 'a' represents the edge sample group The training sample number in the sample; b represents the safe sample group The training sample number in the sample; This represents the feature vector of the j-th training sample; Indicates marginal sample group The a-th training sample in the dataset; Indicates safe sample group The b-th training sample in the dataset; Indicates random forest pairs Category The predicted probability; Indicates random forest pairs Category The predicted probability; Indicates random forest pairs Category The predicted probability; express Edge sample weight function; express The safe sample weighting function; closest to the confidence level or Edge samples are given greater weight; Give greater weight to safe samples with maximum or minimum confidence levels.

[0037] During the sample selection process, and In, respectively according to weight and Samples with replacement If sample pairs The cumulative number of occurrences during the sampling process is Its characteristic spatial distance is Then the line segment Divided into equal parts Each segment is a sub-segment, and the intermediate points of these sub-segments are used as new samples for the generated minority class. The sample pairs are the first... The next time it appears, New samples can be generated using the following formula: ; In the formula: express and Spatial distance between them; Indicates sample pairs The cumulative number of occurrences during the sampling process; Indicates the sample pair of the first New samples of the minority class are generated upon the first occurrence; This indicates the sequence number of times a sample pair appears during the sampling process.

[0038] Preferably, in step 2, the method of introducing an inverted bottleneck module based on CTGAN may include the following steps: The inverted bottleneck module can be constructed as follows: The input feature vector of the inverted bottleneck module can be set as follows: , Use one according to the following formula The fully connected layer reduces the channel dimension from Expand to : ; In the formula: The index number of the presentation layer; Represents the input feature vector The number of dimensions; Indicates the expansion factor; This represents the input feature vector of the inverted bottleneck module; This represents the expanded intermediate vector; ; The weight matrix represents the expansion phase; ; Represents the bias vector during the expansion phase; ; Represents the ReLU activation function; Set t to control the ratio of the number of channels after expansion to the number of channels before expansion; Set t to control the ratio of the number of channels after expansion to the number of channels before expansion; The expanded vector can be Perform a grouped linear transformation according to the following formula: ; In the formula: Represents the transformed vector; Represents the weight tensor of the grouped fully connected layer; Represents the bias vector of the grouped fully connected component; ; express Perform a grouped full connection operation; It can be passed by following formula. Fully connected layers compress dimensions back to their original dimensions. : ; In the formula: This represents the compressed intermediate vector; Represents the weight matrix for the compression phase; ; Represents the bias vector during the compression phase; ; Among them, the weight matrix in the compression stage , from dimension Press back ; Compressed intermediate vector , dimension ; The compressed intermediate vector can be directly added to the input vector of the inverted bottleneck module as follows, and used as the final output of the inverted bottleneck module to form a skip connection to alleviate gradient vanishing: ; In the formula: This represents the final output of the inverted bottleneck module.

[0039] Preferably, in step 2, the method of introducing a symmetric structure based on CTGAN may include the following steps: Symmetric structures can be constructed as follows: The generator and discriminator can have the same number of hidden layers, and the dimensions of their hidden layers can be kept consistent. Both can be configured to have the same number of hidden layers. The hidden layer uses the exact same inverted bottleneck module structure: ; in , Indicates the generator at the 1st... The inverted bottleneck module structure used in the hidden layer; The discriminator is in the first... The hidden layer uses an inverted bottleneck module structure; "Indicates that the structural forms are exactly the same, only the weight parameters are different; The number of channels can be set at the 1st As the hidden layer changes, both the generator and discriminator introduce a symmetrical transition layer according to the following formula: ; In the formula: This represents the vector output by the inverted bottleneck module in the previous stage; Indicates the first The weight matrix of the transition layer; ; Indicates the first The target dimension of the hidden layer; Indicates the first The vector dimension of the hidden layer; Represents the transition layer bias vector; ; Indicates the activation function; No. Weight matrix of the transition layer This is used to change the number of channels or fusion conditions; Finally, discrete conditional vectors can be introduced into the generator and discriminator in the same way in the input layer or intermediate layer: The concatenated vector from the generator input layer can be represented as follows: ; ; The concatenated vector representation of the discriminator input layer is as follows: ; ; In the formula: Represents a discrete conditional vector; Indicates the length of the discrete condition vector; This represents the sample vector that the discriminator inputs. This represents the noise vector input to the generator; ; This represents the vector concatenated from the generator's input layer; This represents the concatenated vector from the discriminator input layer; β represents the dimension of the noise vector.

[0040] Preferably, in step 2, the method for normalizing each continuous feature to a uniform numerical range while preserving its structural characteristics in the original distribution may include the following steps: The data normalization process can be improved to enhance data quality as follows: To more accurately reflect the distribution characteristics of each category, before normalization, the data can first be split into several subsets based on the labels; then, for each label subset, a VGM is fitted separately on each continuous feature; let the i-th... The VGM of a label contains H Gaussian components, let the label be... In the VGM model, the first The mixing weights of the Gaussian components are In the label In the VGM model, the first The mean of the Gaussian components is In the label In the VGM model, the first The covariance matrix of the Gaussian components is , All of these were learned from the training samples of the label using a variational inference algorithm.

[0041] Normalization is performed using the VGM features specific to each label; this process can be divided into two steps: Step A, for the first A sample of labels Calculate its relationship with the first Posterior responsibility of each Gaussian component: ; In the formula: Indicates the first The sample number of each label; Indicates the first The Gaussian component index in the VGM of each label; Indicates the first The Gaussian component index in the VGM of each label; Indicates the first The first tag The nth sample pair The posterior probability of each Gaussian component; Indicates the first The first tag The sample at the th Probability density values ​​under Gaussian components; Indicates that in the label In the VGM model, the first The mixing weights of Gaussian components; Indicates that in the label In the VGM model, the first The mean of the Gaussian components; Indicates that in the label In the VGM model, the first A Gaussian component covariance matrix; Indicates the first The first tag The sample at the th Probability density values ​​under Gaussian components; in, See as the first The prior probabilities of the Gaussian components satisfy the following conditions: ; Reflecting the The center position of each Gaussian component; Step B can be used to determine the category to which the sample has the highest posterior probability, according to the following formula: ; In the formula: Indicates the first The first tag The categories into which each sample is divided; This indicates the value of the independent variable that makes the expression within the parentheses reach its maximum value. Denotes the posterior probability of taking. Largest Gaussian component index ; Represents all Gaussian components The maximum value in; After determining the components, the cumulative distribution function value of the sample in the distribution of that component can be used as the normalization result according to the following formula: ; In the formula: Indicates the selection of Gaussian components The cumulative distribution function value; Represents the integral variable; Indicates the first Class 1 The normalized values ​​of each sample; Indicates sample The mean vector of the Gaussian component; Indicates sample The covariance matrix of the Gaussian components; This represents the Gaussian probability density function corresponding to this component.

[0042] This approach ensures that each continuous feature is not only normalized to a uniform numerical range but also retains its structural characteristics within the original distribution, while simultaneously distinguishing distributional differences under different labels. Compared to global modeling, this label-based modeling method can more accurately represent the feature differences between categories, thereby improving the performance of the generative model and the realism of the generated data.

[0043] Preferably, in step 2, RpGAN is used. + R1 + Methods to improve training stability using the R2 loss function may include the following steps: RpGAN trains the generator by comparing the discriminator output of generated samples with that of real samples, rather than judging real and fake samples separately. The formula for calculating the RpGAN loss is as follows: ; In the formula: Represents a noise vector; Represents the trainable parameters of the generator; This represents the trainable parameters of the discriminator; This represents the target loss function value of RpGAN; Indicates the generator's response to noise The samples generated by the mapping; This represents the scoring function of the discriminator for the input sample; This represents the prior distribution of the generator's input noise; Represents the distribution of real data; This represents an adversarial function that transforms the difference between scores of real and fake samples; Indicates a sample of real data Expectations; Represents the noise vector Expectations; From simple distribution Mid-sampling; From the distribution of real data In the middle sampling, the distribution of the real data can be the distribution of the samples in the training set; The standard normal distribution can be used. Output a fake sample ; Output a real fraction; the larger the real fraction, the higher the confidence level.

[0044] To further stabilize training, two of the most common zero-gradient center penalties, R1 and R2, are introduced, which helps the classic generative adversarial network convergent training. The formulas for calculating the R1 and R2 regularization terms are as follows: ; ; In the formula: This represents the R1 regularization term, used to constrain the gradient of the discriminator on the real data; This represents the R2 regularization term, used to constrain the gradient of the discriminator on the generated data; This indicates that the discriminator output corresponds to the input. The gradient; The hyperparameters representing the gradient regularization term; This indicates the expectation of the generated samples; in, Describe the degree of local variation of the discriminator function with respect to the input.

[0045] Preferably, in step 3, during the training process, the surrounding rock classification data can be subjected to imbalanced optimization and data augmentation according to the following steps: Step I can be given a training set containing a small number of n samples. Its core assumption is that data is generated from potential trainable parameters, and the prior distribution of these parameters is difficult to handle directly; the model is pre-trained offline using large-scale synthetic data generated by structural causal models; in this process, the Transformer network learns to directly map the training context and query samples to the posterior prediction distribution; TabPFN can display the feature vector of the o-th training sample. Its corresponding tag It is embedded into a sequence and the test sample is attached. The dual-path attention mechanism captures dependencies between rows and columns; the hidden representation of the test label position is projected as logits, and class probabilities are generated using temperature-scaled Softmax. ; In the formula: Indicates the true class label of the training sample; This represents the feature vector of the sample to be predicted. This represents the maximum threshold for the number of true categories; Indicates the category number; Indicates the category number; Indicates the first Logit values ​​for each category; Indicates the first Logit values ​​for each category; Indicates temperature parameter; Indicates the number of true categories; express; If the actual number of categories Then only for the former Normalize the logarithmic probability, then One dimension was considered invalid and ignored; Let the training context sample set be denoted as . , can be set as follows: ; In the formula: Indicates the sample index in the training context sample set; This indicates the number of samples in the training context sample set; This represents the feature vector of the p-th training sample in the training context sample set; The label represents the p-th training sample in the training context sample set; It is obtained by linearly mapping the hidden vector output from the last layer of the Transformer network; Used to adjust the smoothness of Softmax, fixed in TabPFN. ; To improve the robustness of the model, TabPFN uses a randomized dataset and multiple preprocessing variants to average the prediction results.

[0046] Step II: During training, the Transformer network uses the training context sample set to predict the label probability of each query sample; the training objective is to minimize the cross-entropy loss between the predicted probability of the query sample and the true label. The label probability of each query sample can be calculated using the following formula: ; The cross-entropy loss between the predicted probability of the query sample and the true label is calculated using the following formula: ; In the formula: Indicates based on synchronous training dataset The calculated cross-entropy loss; B represents the query sample number; Indicates the first Input features of each query sample; Indicates the first The actual labels corresponding to each query sample; This represents the query sample predicted by the model. The label probability vector; Indicates the query sample set; This indicates that the Transformer network is in a given context sample set. Under the condition of query sample The prediction results; This indicates taking the prediction vector corresponding to the first... Class components; The indicator function is defined if and only if it is equal to 1. The true label for each query sample is c; Indicates a set of samples in a given training context. Under these conditions, the Transformer network processes query samples A vector composed of the predicted probabilities of each category; This represents the complete set of trainable parameters for a Transformer network model. This represents the synthetic dataset currently sampled from the prior generator; Represents the Transformer network model The output, in the input context set and samples Afterwards, regarding the first The predicted probability of a class; Can be set as follows: Represents the surrounding rock dataset; Representing the surrounding rock dataset The first in Features of each training sample; Representing the surrounding rock dataset The first in Each training sample label; ζ represents the test sample; ζ represents the surrounding rock dataset. The number of training samples in the dataset; Representing the surrounding rock dataset The sequence number of the training sample; This indicates that the output layer of the Transformer network is in the test sample. The logit vector corresponding to the position; This indicates that the number of true classes obtained after Softmax is The class probability vector at that time; This represents the number of true categories in the surrounding rock classification task; This indicates that the category index with the highest probability is taken as the final prediction result; This represents the output of the Transformer network model; In the surrounding rock dataset When performing multi-class classification, all training sample features are used. and its label encoding and test samples The sequences are co-serialized and fed into a pre-trained Transformer network, allowing for simultaneous utilization of contextual information and output in a single forward propagation. Take the front Performing Softmax on the dimension yields... The final predicted category is To improve the robustness of the model, TabPFN uses a randomized dataset and multiple preprocessing variants to average the prediction results.

[0047] Preferably, in step 3, the following steps are followed: a dual-scale interpretable TabPFN classifier combining SHAP global interpretation and LIME instance-level interpretation is used to obtain the main input features affecting the classification of surrounding rocks: Based on the TabPFN surrounding rock advanced classification algorithm, a dual-scale interpretability analysis method combining global and local perspectives is adopted. At the global level, the SHAP method is used to quantify the average contribution of each surrounding rock feature in the entire dataset, and at the local level, the LIME method is used to provide the additive contribution of each feature. For calculating features To obtain the SHAP value, it is necessary to enumerate the marginal contribution of the feature across all possible feature subsets; for each feature subset not containing the feature... Feature subset Calculate the features Add to The changes that occur in the model output after the model is updated; then for all possible subsets Weighted average; the calculation formula is as follows: ; In the formula: Representation of features The SHAP value; Indicates the feature number; Represents the set of all features; Indicates that it does not contain features any subset of; Indicates using only a subset of features The expected value predicted by the model at input; Indicates in subset Add features to the basis The expected value of the post-model prediction results; Represents the total number of characteristics; Representing a subset Size; The factorial represents the size of the subset; Represents the factorial of the total number of features; This represents the factorial of the remaining feature count minus one. Indicates that it does not contain features any subset of; The interpretation of LIME can be transformed into a weighted optimization problem, namely, finding a simple model ν that, given sample points... In its neighborhood, it can approximate the original model as closely as possible. The predictive behavior; the specific optimization objectives are as follows: ; In the formula: f This represents the original surrounding rock classification model; ν indicates proximity And compared A model with a simple structure; Represents a given sample point; This represents the neighborhood samples of a given sample point; This represents the locally weighted loss function, which measures the performance of model ν at a given number of sample points. Can the surrounding area approximate the original model? ; Representing neighborhood samples With a given sample point Distance weight function; This represents a regularization term used to limit the complexity of the explained model; This represents the set of functions that LIME allows as local proxy models.

[0048] The present invention also provides an apparatus for a tunnel surrounding rock intelligent classification method based on dual-scale interpretable deep learning, comprising a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the steps of the tunnel surrounding rock intelligent classification method based on dual-scale interpretable deep learning as described above.

[0049] The aforementioned memory, processor, inverted bottleneck module, symmetric structure, generator, discriminator, TabPFN classifier, CTGAN, VGM model, multi-class random forest classifier, structural causal model, and Transformer network model... The devices, functional modules, and algorithms of SHAP method, LIME method, etc. can all adopt applicable devices, functional modules, and algorithms in the prior art, or be constructed using devices, functional modules, and algorithms in the prior art and conventional technical means.

[0050] The embodiments described above are only used to illustrate the technical ideas and features of the present invention. Their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The patent scope of the present invention should not be limited by these embodiments. That is, any equivalent changes or modifications made in accordance with the spirit disclosed in the present invention still fall within the patent scope of the present invention.

Claims

1. A method for intelligent classification of tunnel surrounding rock based on dual-scale interpretable deep learning, characterized in that, This method includes the following steps: Step 1: Establish an initial dataset based on the surrounding rock data obtained from advanced geological forecasting, and use the SMOTE oversampling method to reduce class overlap by improving the minority sample grouping strategy; Step 2: Based on CTGAN, an inverted bottleneck module and a symmetric structure are introduced, ensuring that the generator and discriminator have the same number of hidden layers; the exact same inverted bottleneck module structure is used in each layer; this normalizes each continuous feature to a uniform numerical range while preserving its structural features in the original distribution, and simultaneously distinguishes distribution differences under different labels; RpGAN is then employed. + R1 + R2 loss function is used to improve training stability; Step 3: Based on the unbalanced optimization and data augmentation of the surrounding rock classification data, a dual-scale interpretable TabPFN classifier combining SHAP global interpretation and LIME instance-level interpretation is adopted to enhance the transparency of the model decision-making process and identify the main input features affecting the surrounding rock classification.

2. The intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning according to claim 1, characterized in that, Step 1 includes the following sub-steps: Step 1-1, let the original surrounding rock dataset be... Let the number of samples in class c be... , If a certain type of sample has a large number of samples, then that sample type is called the majority class. set up Indicates the sample category number belonging to the majority class; let ,the remaining All sample categories are minority classes that require oversampling; In the formula: i represents the training sample number; Indicates the sample category number; N represents the number of samples in the original surrounding rock dataset; E represents the number of sample categories; This represents the feature vector of the i-th training sample; The label represents the i-th training sample; This indicates the value of the independent variable that makes the expression within the parentheses reach its maximum value. Indicates in set Take the upper hand Category index of maximum value ; Indicates in set All The maximum value; Steps 1-2: Train a multi-class random forest classifier in the original feature space to obtain the categories. Prediction probability function ; For each minority class According to the following formula based on its predicted probability The corresponding samples are divided into marginal sample groups. and safety sample group : ; ; In the formula: This represents the training sample vector that the discriminator inputs; This indicates that the classifier operates on input training samples. Category The predicted probability; Indicates classifier prediction Category The probability value; This represents the probability estimation function given by the random forest classifier; Represents the set of marginal sample groups; Represents a set of safe sample groups; This represents the lower threshold of the low confidence interval; This represents the upper threshold of the low confidence interval; Where the threshold Used to identify low confidence intervals.

3. The intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning according to claim 2, characterized in that, Step 1 also includes the following sub-steps: Steps 1-3 are edge sample groups respectively. and safety sample group Each sample in the dataset is assigned a weight; then, from each sample... and Select one sample from the set, use the weights as selection probabilities to form a sample pair, and add it to the synthetic set. In this process, for each pair of samples in this set, two weights are used as the selection probabilities of the two samples in the roulette wheel selection method. Finally, the selection process is repeated until the number of selected sample pairs is equal to the difference between the number of majority class samples and the number of minority class samples. For samples that are difficult to classify Assigning higher sampling weights, dividing them into edge sample weights The formulas for calculating the weights of safe samples, marginal samples, and safe samples are as follows: ; ; In the formula: j represents the training sample number; 'a' represents the edge sample group The training sample number in the sample; b represents the safe sample group The training sample number in the sample; This represents the feature vector of the j-th training sample; Indicates marginal sample group The a-th training sample in the dataset; Indicates safe sample group The b-th training sample in the dataset; Indicates random forest pairs Category The predicted probability; Indicates random forest pairs Category The predicted probability; Indicates random forest pairs Category The predicted probability; express Edge sample weight function; express The safe sample weighting function; closest to the confidence level or Edge samples are given greater weight; Give greater weight to safe samples with maximum or minimum confidence levels; In the sample selection process, and In, respectively according to weight and Samples with replacement If sample pairs The cumulative number of occurrences during the sampling process is Its characteristic spatial distance is Then the line segment Divided into equal parts Each segment is a sub-segment, and the intermediate points of these sub-segments are used as new samples for the generated minority class. The sample pairs are the first... The next time it appears, New samples are generated using the following formula: ; In the formula: express and Spatial distance between them; Indicates sample pairs The cumulative number of occurrences during the sampling process; Indicates the sample pair of the first New samples of the minority class are generated upon the first occurrence; This indicates the sequence number of times a sample pair appears during the sampling process.

4. The intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning according to claim 1, characterized in that, Step 2, the method of introducing an inverted bottleneck module based on CTGAN includes the following steps: Construct the inverted bottleneck module as follows: Let the input feature vector of the inverted bottleneck module be... , Use one according to the following formula The fully connected layer reduces the channel dimension from Extended to : ; In the formula: The index number of the presentation layer; Represents the input feature vector The number of dimensions; Indicates the expansion factor; This represents the input feature vector of the inverted bottleneck module; This represents the expanded intermediate vector; ; The weight matrix represents the expansion phase; ; Represents the bias vector during the expansion phase; ; Represents the ReLU activation function; Set t to control the ratio of the number of channels after expansion to the number of channels before expansion; For the expanded vector Perform a grouped linear transformation according to the following formula: ; In the formula: Represents the transformed vector; Represents the weight tensor of the grouped fully connected layer; Represents the bias vector of the grouped fully connected component; ; express Perform a grouped full connection operation; Then pass according to the following formula Fully connected layers compress dimensions back to their original dimensions. : ; In the formula: This represents the compressed intermediate vector; Represents the weight matrix for the compression phase; ; Represents the bias vector during the compression phase; ; Among them, the weight matrix in the compression stage , from dimension Press back ; Compressed intermediate vector , dimension ; The compressed intermediate vector is directly added to the input vector of the inverted bottleneck module according to the following formula, which is used as the final output of the inverted bottleneck module to form a skip connection to alleviate gradient vanishing: ; In the formula: This represents the final output of the inverted bottleneck module.

5. The intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning according to claim 1, characterized in that, Step 2, the method of introducing a symmetric structure based on CTGAN includes the following steps: Construct a symmetric structure as follows: Let the generator and discriminator have the same number of hidden layers, and the corresponding hidden layer dimensions of the two be consistent. Both have a hidden layer dimension of [missing information]. The hidden layer uses the exact same inverted bottleneck module structure: ; in , Indicates the generator at the 1st... The hidden layer uses an inverted bottleneck module structure; Indicates the discriminator at the 1st The hidden layer uses an inverted bottleneck module structure; "Indicates that the structural forms are exactly the same, only the weight parameters are different; Let the number of channels be in the th case. As the hidden layer changes, both the generator and discriminator introduce a symmetrical transition layer according to the following formula: ; In the formula: This represents the vector output by the inverted bottleneck module in the previous stage; Indicates the first The weight matrix of the transition layer; ; Indicates the first The target dimension of the hidden layer; Indicates the first The vector dimension of the hidden layer; Represents the transition layer bias vector; ; Indicates the activation function; No. Weight matrix of the transition layer This is used to change the number of channels or fusion conditions; Finally, the discrete conditional vector is introduced into the generator and discriminator in the same way at the input layer or intermediate layer: The concatenated vector from the generator input layer is represented as follows: ; ; The concatenated vector representation of the discriminator input layer is as follows: ; ; In the formula: Represents a discrete conditional vector; Indicates the length of the discrete condition vector; This represents the sample vector that the discriminator inputs. This represents the noise vector input to the generator; ; This represents the vector concatenated from the generator's input layer; This represents the concatenated vector from the discriminator input layer; β represents the dimension of the noise vector.

6. The intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning according to claim 1, characterized in that, Step 2, the method for normalizing each continuous feature to a uniform numerical range while preserving its structural characteristics in the original distribution, includes the following steps: Improve data quality by refining the data normalization process as follows: To more accurately reflect the distribution characteristics of each category, before normalization, the data is first split into several subsets based on the labels; then, for each label subset, a VGM is fitted separately on each continuous feature; let the i-th... The VGM of a label contains H Gaussian components, let the label be... In the VGM model, the first The mixing weights of the Gaussian components are In the label In the VGM model, the first The mean of the Gaussian components is In the label In the VGM model, the first The covariance matrix of the Gaussian components is , All of these were learned from the training samples of the label using a variational inference algorithm. Normalization is performed using the VGM features specific to each label; The process consists of two steps: Step A, for the first A sample of labels Calculate its relationship with the first Posterior responsibility of each Gaussian component: ; In the formula: Indicates the first The sample number of each label; Indicates the first The Gaussian component index in the VGM of each label; Indicates the first The Gaussian component index in the VGM of each label; Indicates the first The first tag The nth sample pair The posterior probability of each Gaussian component; Indicates the first The first tag The sample at the th Probability density values ​​under Gaussian components; Indicates that in the label In the VGM model, the first The mixing weights of Gaussian components; Indicates that in the label In the VGM model, the first The mean of the Gaussian components; Indicates that in the label In the VGM model, the first A Gaussian component covariance matrix; Indicates the first The first tag The sample at the th Probability density values ​​under Gaussian components; in, See as the first The prior probabilities of the Gaussian components satisfy the following conditions: ; Reflecting the The center position of each Gaussian component; Step B: Determine the class to which the sample has the highest posterior probability according to the following formula: ; In the formula: Indicates the first The first tag The categories into which each sample is divided; This indicates the value of the independent variable that makes the expression within the parentheses reach its maximum value. Denotes the posterior probability of taking. Largest Gaussian component index ; Represents all Gaussian components The maximum value in; After determining the components, the cumulative distribution function value of the sample in the component distribution is used as the normalization result according to the following formula: ; In the formula: Indicates the selection of Gaussian components The cumulative distribution function value; Represents the integral variable; Indicates the first Class 1 The normalized values ​​of each sample; Indicates sample The mean vector of the Gaussian component; Indicates sample The covariance matrix of the Gaussian components; This represents the Gaussian probability density function corresponding to this component.

7. The intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning according to claim 1, characterized in that, In step 2, RpGAN is used. + R1 + The method of using the R2 loss function to improve training stability includes the following steps: RpGAN trains the generator by comparing the difference between the discriminator output of generated samples and real samples, rather than judging real and fake samples individually. The formula for calculating the RpGAN loss is as follows: ; In the formula: Represents the noise vector; Represents the trainable parameters of the generator; This represents the trainable parameters of the discriminator; This represents the target loss function value of RpGAN; Indicates the generator's response to noise The samples generated by the mapping; This represents the scoring function of the discriminator for the input sample; This represents the prior distribution of the generator's input noise; Represents the distribution of real data; This represents an adversarial function that transforms the difference between scores of real and fake samples; Indicates a sample of real data Expectations; Represents the noise vector Expectations; From simple distribution Mid-sampling; From the distribution of real data Mid-sampling; Output a fake sample ; Output a real fraction; the larger the real fraction, the higher the confidence level. The formulas for calculating the regularization terms R1 and R2 are as follows: ; ; In the formula: This represents the R1 regularization term, used to constrain the gradient of the discriminator on the real data; This represents the R2 regularization term, used to constrain the gradient of the discriminator on the generated data; This indicates that the discriminator output corresponds to the input. The gradient; The hyperparameters representing the gradient regularization term; This represents the expectation of the generated samples; in, Describe the degree of local variation of the discriminator function with respect to the input.

8. The intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning according to claim 1, characterized in that, In step 3, during the training process, imbalance optimization and data augmentation are performed on the surrounding rock classification data according to the following steps: Step I, given a training set containing a small number of n samples Its core assumption is that data is generated from potential trainable parameters, and the prior distribution of these parameters is difficult to handle directly; the model is pre-trained offline using large-scale synthetic data generated by structural causal models; in this process, the Transformer network learns to directly map the training context and query samples to the posterior prediction distribution; TabPFN uses the feature vector of the o-th training sample. Its corresponding tag It is embedded into a sequence and the test sample is attached. The dual-path attention mechanism captures dependencies between rows and columns; the hidden representation of the test label position is projected as logits, and class probabilities are generated using temperature-scaled Softmax. ; In the formula: Indicates the true class label of the training sample; This represents the feature vector of the sample to be predicted. This represents the maximum threshold for the number of true categories; Indicates the category number; Indicates the category number; Indicates the first Logit values ​​for each category; Indicates the first Logit values ​​for each category; Indicates temperature parameter; Indicates the number of true categories; express; If the actual number of categories Then only for the former Normalize the logarithmic probability, then One dimension was considered invalid and ignored; Let the training context sample set be denoted as . ,set up: ; In the formula: Indicates the sample index in the training context sample set; This indicates the number of samples in the training context sample set; This represents the feature vector of the p-th training sample in the training context sample set; The label represents the p-th training sample in the training context sample set; It is obtained by linearly mapping the hidden vector output from the last layer of the Transformer network; Used to adjust the smoothness of Softmax, fixed in TabPFN. ; Step II: During training, the Transformer network uses the training context sample set to predict the label probability of each query sample; the training objective is to minimize the cross-entropy loss between the predicted probability of the query sample and the true label. The label probability of each query sample is calculated using the following formula: ; The cross-entropy loss between the predicted probability of the query sample and the true label is calculated using the following formula: ; In the formula: Indicates based on synchronous training dataset The calculated cross-entropy loss; B represents the query sample number; Indicates the first Input features of each query sample; Indicates the first The actual labels corresponding to each query sample; This represents the query sample predicted by the model. The label probability vector; Indicates the query sample set; This indicates that the Transformer network is in a given context sample set. Under the condition, for the query sample The prediction results; This indicates taking the prediction vector corresponding to the first... Class components; The indicator function is defined if and only if it is equal to 1. The true label for each query sample is c; Indicates a set of samples in a given training context. Under these conditions, the Transformer network processes query samples A vector composed of the predicted probabilities of each category; This represents the complete set of trainable parameters for a Transformer network model. This represents the synthetic dataset currently sampled from the prior generator; Represents the Transformer network model The output, in the input context set and samples Afterwards, regarding the first The predicted probability of a class; set up: Represents the surrounding rock dataset; Representing the surrounding rock dataset The first in Features of each training sample; Representing the surrounding rock dataset The first in Each training sample label; ζ represents the test sample; ζ represents the surrounding rock dataset. The number of training samples in the dataset; Representing the surrounding rock dataset The sequence number of the training sample; This indicates that the output layer of the Transformer network is in the test sample. The logit vector corresponding to the position; This indicates that the number of true classes obtained after Softmax is The class probability vector at that time; This represents the number of true categories in the surrounding rock classification task; This indicates that the category index with the highest probability is taken as the final prediction result; This represents the output of the Transformer network model; In the surrounding rock dataset When performing multi-class classification, all training sample features are used. and its label encoding and test samples The sequences are co-serialized and fed into a pre-trained Transformer network, allowing for simultaneous utilization of contextual information and output in a single forward propagation. Take the front Performing Softmax on the dimension yields... The final predicted category is To improve the robustness of the model, TabPFN uses a randomized dataset and multiple preprocessing variants to average the prediction results.

9. The intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning according to claim 1, characterized in that, In step 3, following the steps below, a dual-scale interpretable TabPFN classifier combining SHAP global interpretation and LIME instance-level interpretation is used to obtain the main input features affecting surrounding rock classification: Based on the TabPFN surrounding rock advanced classification algorithm, a dual-scale interpretability analysis method combining global and local perspectives is adopted. At the global level, the SHAP method is used to quantify the average contribution of each surrounding rock feature in the entire dataset, and at the local level, the LIME method is used to provide the additive contribution of each feature. For calculating features To obtain the SHAP value, it is necessary to enumerate the marginal contribution of the feature across all possible feature subsets; for each feature subset not containing the feature... Feature subset Calculate the features Add to The changes that occur in the model output after the model is updated; then for all possible subsets Weighted average; the calculation formula is as follows: ; In the formula: Representation of features The SHAP value; Indicates the feature number; Represents the set of all features; Indicates that it does not contain features any subset of; Indicates using only a subset of features The expected value predicted by the model at input; Indicates in subset Add features to the basis The expected value of the post-model prediction results; Represents the total number of characteristics; Representing a subset Size; The factorial represents the size of the subset; Represents the factorial of the total number of features; This represents the factorial of the remaining feature count minus one. Indicates that it does not contain features any subset of; The interpretation of LIME is transformed into a weighted optimization problem, namely, finding a simple model ν that, given sample points... In its neighborhood, it can approximate the original model as closely as possible. The predictive behavior; the specific optimization objectives are as follows: ; In the formula: f This represents the original surrounding rock classification model; ν indicates proximity And compared A model with a simple structure; Represents a given sample point; This represents the neighborhood samples of a given sample point; This represents the locally weighted loss function, which measures the performance of model ν at a given number of sample points. Can the surrounding area approximate the original model? ; Representing neighborhood samples With a given sample point Distance weight function; This represents a regularization term used to limit the complexity of the explained model; This represents the set of functions that LIME allows as local proxy models.

10. A device for intelligent classification of tunnel surrounding rock based on dual-scale interpretable deep learning, comprising a memory and a processor, characterized in that, The memory is used to store a computer program; the processor is used to execute the computer program and, when executing the computer program, implement the steps of the intelligent classification method for tunnel surrounding rock based on dual-scale interpretable deep learning as described in any one of claims 1 to 9.