Tunnel carbon emission sample quantitative prediction method and system based on antagonism
By generating synthetic carbon emission data for tunnels using an adversarial CTGAN model and combining it with a Bayesian prediction model, the problems of small sample data and uncertainty quantification in tunnel carbon emission prediction are solved. This achieves high-precision prediction and stable uncertainty quantification, making it suitable for carbon emission management in tunnel engineering.
Patent Information
- Application Number
- CN202511858476.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies for predicting carbon emissions from tunnels suffer from problems such as small sample data, unstable data generation quality, poor model robustness, and a lack of effective uncertainty quantification methods, making it difficult to provide high-precision predictions and uncertainty quantification in the case of small samples.
A Conditional Table Generative Adversarial Network (CTGAN) model is used for adversarial training to generate high-quality synthetic data on tunnel carbon emissions. Combined with a Bayesian prediction model, uncertainty is quantified using the Monte Carlo sampling method to construct a risk assessment model that provides real-time recommendations.
It significantly expands the training dataset, improves the model's prediction accuracy and generalization ability in small sample situations, enhances the model's robustness to noise and outliers, and provides scientific uncertainty quantification and decision support.
Smart Images

Figure CN121328860A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of carbon emission prediction technology for tunnel engineering, and in particular to an adversarial method and system for quantitative prediction of tunnel carbon emissions based on sample quantification. Background Technology
[0002] Tunnel engineering, as a crucial component of modern transportation infrastructure, consumes significant amounts of energy and resources during construction, generating substantial carbon emissions. Statistics show that while tunnels only account for 15% of the total length of a certain high-speed railway, their construction generates 60% of the total carbon emissions, highlighting the significant impact of tunnel engineering on carbon emissions. With increasing global emphasis on environmental protection and sustainable development, accurately predicting tunnel carbon emissions has become a critical technical requirement in tunnel engineering design and construction.
[0003] The main technical challenge in predicting carbon emissions from tunnels is the problem of small sample data. Due to the unique nature of tunnel engineering, obtaining large amounts of high-quality carbon emission data presents numerous difficulties. Tunnel projects have long cycles, data collection requires continuous monitoring, monitoring equipment is costly and difficult to deploy on a large scale, and different tunnel projects vary greatly, limiting data universality. Furthermore, the complex construction environment makes data collection susceptible to interference, different monitoring standards and methods lead to poor data consistency, and historical data is missing or incomplete. Traditional small-sample learning methods, such as data augmentation, are simple but struggle to generate high-quality synthetic data; transfer learning methods require similarity between the source and target domains and have limited applicability; and meta-learning methods are computationally complex and time-consuming to train.
[0004] Generative Adversarial Networks (GANs) generate synthetic data through adversarial training between generators and discriminators, providing a new technical approach for few-shot learning. However, traditional GANs suffer from problems such as training instability, pattern collapse, poor performance with discrete variables, difficulty in controlling the conditional distribution of generated data, and overfitting in small-shot scenarios when handling tabular and few-shot data. Conditional Generative Adversarial Networks (CTGANs) are generative models specifically designed for tabular data. They address these problems by employing conditional generation mechanisms, using pattern-specific normalization techniques to handle mixed data types, and introducing training sampling strategies to improve training stability. However, CTGANs still have shortcomings in small-shot data scenarios, including unstable generated data quality, sensitivity to noise and outliers, and a lack of ability to quantify the uncertainty of generated data.
[0005] In carbon emission forecasting, accurately quantifying the uncertainty of forecast results is crucial for risk assessment and decision support. Existing uncertainty quantification methods mainly include Bayesian methods and ensemble learning methods. Bayesian neural networks quantify uncertainty by modeling parameter distributions, Markov chain Monte Carlo (MCMC) methods perform posterior inference, and variational inference methods improve computational efficiency. Ensemble learning methods statistically quantify uncertainty through the prediction results of multiple models, with Bootstrap methods estimating prediction variance and ensemble models such as random forests providing uncertainty estimates. However, existing methods suffer from limitations such as high computational complexity, difficulty in real-time application, sensitivity to model assumptions, insufficient robustness, and lack of organic integration with generative models.
[0006] Adversarial training improves model robustness by introducing adversarial examples, achieving significant results in fields such as image recognition. However, its application in tabular data generation remains limited. Adversarial training offers advantages such as improving model robustness to noise and perturbations, enhancing generalization ability, and improving training stability in small sample sizes. However, current techniques lack adversarial training strategies tailored to the characteristics of tabular data, and their integration with uncertainty quantification methods is not tight enough. Furthermore, there is limited research on its application in tunnel carbon emission prediction.
[0007] In summary, existing technologies suffer from several major problems: small sample size limits the ability of traditional methods to provide high-precision predictions; poor data generation quality hinders the generation of high-quality tunnel carbon emission data by existing models; insufficient uncertainty quantification leads to a lack of effective methods for quantifying prediction uncertainty; poor model robustness makes existing methods sensitive to noise and outliers; and low technology integration results in a lack of methods that organically combine data generation, prediction modeling, and uncertainty quantification. Therefore, there is an urgent need for a tunnel carbon emission prediction method and system that can improve model robustness and effectively quantify prediction uncertainty under small sample size conditions through adversarial training.
[0008] The invention disclosed in CN120146309A presents a method for carbon emission prediction and optimization, comprising: acquiring multi-source heterogeneous data including historical carbon emission data, meteorological data, economic indicators, energy consumption data, and IoT sensor data; constructing a three-dimensional feature matrix using an improved spatiotemporal feature extraction algorithm; establishing a prediction model based on a hybrid architecture of graph neural network (GNN) and long short-term memory network (LSTM) combined with an attention mechanism, and training it using an adaptive learning rate optimization algorithm; inputting the prediction results into an improved NSGAIII algorithm to simultaneously optimize three objectives: total carbon emissions, economic costs, and social benefits; and establishing a feedback loop through reinforcement learning (RL) to update the model and strategy online based on real-time monitoring data. This invention integrates multiple advanced technologies such as accurate data processing, dynamic prediction, multi-objective optimization, and cross-domain collaboration, providing a comprehensive and effective solution for carbon emission management. However, the above-mentioned solution does not consider how to provide high-precision predictions under small sample conditions and lacks sufficient quantification of prediction uncertainty. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of the existing technology by providing an adversarial tunnel carbon emission sample quantification prediction method, which solves the problems of small sample data, data generation quality, insufficient uncertainty quantification, poor model robustness and low technology integration in the existing technology.
[0010] The objective of this invention can be achieved through the following technical solutions: An adversarial-based method for quantitative prediction of tunnel carbon emissions, comprising the following steps: Step 1: Collect and preprocess tunnel carbon emission data to obtain sample training data; construct a conditional table generative adversarial network model and train the conditional table generative adversarial network model using the sample training data and a pre-designed adversarial training framework. Step 2: Generate synthetic data using the trained conditional table generative adversarial network model, and then mix the synthetic data with the sample training data to obtain an augmented dataset; Step 3: Construct a Bayesian prediction model and train it using the augmented dataset; input the tunnel engineering features to be predicted into the trained Bayesian prediction model, generate multiple prediction samples using the Monte Carlo sampling method, and obtain statistics by uncertainty quantification based on the prediction samples.
[0011] Furthermore, the adversarial training framework specifically includes a generator network and a discriminator network; conditional variables are introduced into the generator network to generate tunnel carbon emission data based on specific conditions; The model parameters are optimized through adversarial game theory using the generator network and discriminator network; an adversarial training mechanism is integrated into the discriminator network and adversarial examples are introduced; Wasserstein distance is used as the loss function, and a gradient penalty term is introduced into the loss function. A pre-trained conditional table-based generative adversarial network model was used to generate synthetic data on tunnel carbon emissions, thereby expanding the original sample dataset.
[0012] Furthermore, the adversarial training mechanism specifically includes: During the training process of the discriminator network, the original training data and the adversarial examples are mixed at a 1:1 ratio to improve the discriminator network's ability to identify noise. During generator training, adversarial examples are generated using the gradient ascent method to enhance the generator's ability to handle anomalies; an adaptive learning rate adjustment strategy is adopted to dynamically adjust the generation intensity of the adversarial examples according to the training progress.
[0013] Furthermore, the process of generating adversarial examples specifically includes: First-order adversarial examples are generated using the fast gradient sign method, which calculates the gradient of the loss function with respect to the input data and adds perturbations along the gradient direction to generate adversarial examples. Higher-order adversarial examples are generated using the projected gradient descent method, which generates enhanced adversarial examples through multiple iterations of optimization. Optimization-based adversarial examples are generated using the Carlini-Wagner attack method, which generates high-quality adversarial examples by minimizing the perturbation magnitude and maximizing the classification loss.
[0014] Furthermore, the loss function is as follows: in, Wasserstein distance loss function; : Expected value symbol; The discriminator's output of the real data; The discriminator's output on the generated data; : Synthetic data generated by the generator; Gradient penalty coefficient; The gradient of the discriminator with respect to the interpolated data; L2 norm; Linear interpolation of real data and generated data.
[0015] Furthermore, the training process of the Bayesian prediction model specifically includes: The Bayesian prediction model employs a variational autoencoder structure, which maps input features to a latent space through an encoder, and the decoder reconstructs the output from the latent space. The Gaussian distribution assumption is introduced into the latent space, and the true posterior distribution is approximated by the variational inference method. Then, the Markov chain Monte Carlo method is combined to perform further posterior inference based on the posterior distribution, and a more accurate true posterior distribution is obtained.
[0016] Furthermore, variational inference methods specifically include: The variational lower bound is used as the optimization objective, and the true posterior distribution is approximated by maximizing the variational lower bound; and the Adam optimizer is used for parameter updates. The variational lower bound is expressed as: , in, For the expectation value operator, Let be the log-likelihood function. For Kullback-Leibler divergence, For variational posterior distribution, It is the prior distribution; The Markov chain Monte Carlo method specifically includes: The Hamiltonian Monte Carlo method is used for posterior sampling, and mass samples are obtained by simulating the Hamiltonian dynamics system. A No-U-Turn sampler is used to automatically adjust the step size and number of steps to improve sampling efficiency. The approximate true posterior distribution obtained by the variational inference method is used as the initialization of the posterior inference to accelerate the convergence process of the posterior inference.
[0017] Furthermore, uncertainty quantification specifically includes: The statistics include the predicted mean, variance, and prediction intervals at different confidence levels. After generating multiple predicted samples using the Monte Carlo sampling method, the multiple predicted samples are forward-propagated multiple times to obtain the predicted distribution, and the predicted mean and variance are calculated based on the predicted distribution. The prediction intervals at different confidence levels are estimated using quantile regression. The Bootstrap resampling method is used to improve the stability of the uncertainty quantification. Step three also includes: inputting the statistics into a pre-built risk assessment model to obtain real-time suggestions and decision information; the risk assessment model uses the Monte Carlo sampling method to simulate sampling and quantify the carbon emission distribution under different risk levels.
[0018] Furthermore, step one specifically includes: The tunnel carbon emission data specifically includes multi-dimensional characteristic data including geological conditions, construction technology, equipment parameters, and environmental factors. The preprocessing process specifically includes: cleaning, normalizing, and feature selection of the raw data to construct a feature library of factors affecting tunnel carbon emissions; dividing the collected data into a training set, a validation set, and a test set, wherein the training set is used for training the conditional table generative adversarial network model, the validation set is used for model tuning, and the test set is used for model performance evaluation; the amount of generated synthetic data is multiple times the amount of sample training data; the synthetic data and sample training data are mixed in proportion to form the augmented dataset.
[0019] A system for an adversarial tunnel carbon emission sample quantification prediction method as described above, characterized in that it comprises: The data preprocessing module is used to collect and preprocess the tunnel carbon emission data; A conditional table generative adversarial network model module is used to construct and train the conditional table generative adversarial network model. The data augmentation module is used to generate synthetic data to expand the original dataset, thereby obtaining the expanded dataset; The Bayesian prediction module is used to construct the Bayesian prediction model and obtain a more accurate true posterior distribution. The uncertainty quantification module is used to calculate the statistic based on the more accurate true posterior distribution, thereby quantifying the uncertainty of the prediction result; The risk assessment module is used to receive the statistics and generate real-time suggestions and decision-making information.
[0020] Compared with the prior art, the present invention has the following advantages: (1) This invention generates an expanded dataset using an adversarial CTGAN model, inputs it into a pre-built Bayesian prediction model, approximates the true posterior distribution through variational inference, and uses it as the initialization of the Markov chain Monte Carlo method; then combines the Markov chain Monte Carlo method to perform more accurate posterior inference based on the posterior distribution, and finally obtains a more accurate true posterior distribution; combined with the Monte Carlo sampling method in the uncertainty quantification module, the uncertainty of the prediction results is quantified by sampling and calculating statistics; and outputs real-time suggestions and decision information through a pre-built risk assessment model. By quantifying the uncertainty of prediction results using Bayesian methods, a scientific basis is provided for risk assessment and decision support, improving the credibility of prediction results. Furthermore, by organically combining data generation, prediction modeling, uncertainty quantification, and decision information output, a complete tunnel carbon emission prediction technology system is formed, which is highly adaptable and has high engineering application value.
[0021] (2) The present invention generates synthetic data by using a trained conditional table generative adversarial network model, and then mixes the synthetic data with small sample training data to obtain an expanded dataset; and generates a large amount of high-quality tunnel carbon emission synthetic data by using a trained conditional table generative adversarial network model to expand the original small sample dataset.
[0022] Adversarial training improved the model's robustness, and the adversarial CTGAN model generated a large amount of high-quality synthetic data on tunneled carbon emissions, significantly expanding the training dataset, effectively solving the problem of small sample data, and improving the prediction accuracy and generalization ability of the Bayesian prediction model in the case of small samples.
[0023] (3) This invention introduces an adversarial training mechanism into the adversarial CTGAN model: during the training of the discriminator network, the original training data and adversarial samples are mixed in a 1:1 ratio to improve the discriminator network's ability to identify noise; during the training of the generator, adversarial samples are generated through the gradient ascent method to enhance the generator's ability to handle abnormal situations; the robustness of the model to noise, outliers and data perturbations is significantly enhanced, and the stability and reliability of the prediction results are improved.
[0024] (4) By collecting tunnel carbon emission data under different environmental factors, this invention can handle the problem of tunnel carbon emission prediction under different geological conditions, construction technology and environmental factors, and has good versatility, scalability and strong adaptability. Attached Figure Description
[0025] Figure 1 This is a flowchart of an adversarial tunnel carbon emission sample quantification prediction method provided in an embodiment of the present invention; Figure 2 This is a flowchart of an adversarial tunnel carbon emission sample quantification prediction method provided in an embodiment of the present invention; Figure 3 This is a Bayesian prediction model structure diagram of an adversarial tunnel carbon emission sample quantification prediction method provided in an embodiment of the present invention; Figure 4 This is a flowchart of uncertainty quantification and risk assessment for an adversarial tunnel carbon emission sample quantification prediction method provided in this embodiment of the invention. Figure 5 This is a flowchart of uncertainty quantification and risk assessment for an adversarial tunnel carbon emission sample quantification prediction method provided in this embodiment of the invention. Figure 6 This is a system architecture diagram of an adversarial tunnel carbon emission sample quantification prediction system provided in Embodiment 2 of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0027] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0028] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0029] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed during use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0030] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0031] Furthermore, terms such as "horizontal" and "vertical" do not imply that components must be absolutely horizontal or suspended, but rather that they can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0032] Example 1 like Figure 1 As shown, this embodiment provides an adversarial method for quantitative prediction of tunnel carbon emissions, which includes the following steps: S1: Collect and preprocess tunnel carbon emission data to obtain sample training data; construct a conditional table generative adversarial network model and train the model using the sample training data and a pre-designed adversarial training framework. S101: Data Preprocessing and Feature Engineering: Collect historical data on tunnel carbon emissions, including multi-dimensional feature data such as geological conditions, construction technology, equipment parameters, and environmental factors; clean, normalize, and perform feature selection on the raw data to construct a feature library of tunnel carbon emission influencing factors; divide the data into training set, validation set, and test set, where the training set is used for training the adversarial CTGAN model, the validation set is used for model tuning, and the test set is used for final performance evaluation.
[0033] Specifically, Data preprocessing includes: Continuous features are standardized using Z-scores to eliminate the influence of dimensions; categorical features are one-hot encoded to convert them into numerical features; principal component analysis is used for dimensionality reduction to retain more than 95% of variance information; and mutual information is used for feature selection, choosing features with mutual information values greater than 0.1.
[0034] S102: Constructing an adversarial CTGAN model: Design an adversarial training framework based on conditional generative adversarial networks, including a generator network G and a discriminator network D; introduce a conditional variable c into the generator to realize the generation of tunnel carbon emission data based on specific conditions; integrate an adversarial training mechanism into the discriminator to improve the robustness of the model by introducing adversarial examples; use Wasserstein distance as the loss function and combine it with a gradient penalty mechanism to ensure training stability.
[0035] Specifically, The condition variable c includes: Geological condition variables include soil and rock type, geological structure, groundwater conditions, and rock mass integrity; construction technology variables include excavation method, support method, lining type, and construction progress; environmental factor variables include ambient temperature, humidity, air pressure, and wind speed; and equipment parameter variables include equipment type, power, efficiency, and usage time.
[0036] S103: Adversarial Training and Data Augmentation: The adversarial CTGAN model is trained using small sample training data, and the model parameters are optimized through adversarial game between the generator and the discriminator; an adversarial example generation strategy is introduced during the training process to improve the robustness of the model; a large amount of high-quality tunnel carbon emission synthetic data is generated using the trained adversarial CTGAN model to expand the original small sample dataset.
[0037] Specifically, The generator network G adopts a 3-5 layer fully connected neural network structure, with 128-512 neurons per layer. The input is random noise z and condition variable c, and the output is the generated tunnel carbon emission data. The discriminator network D adopts a 2-4 layer convolutional neural network structure. The input is real data or generated data, and the output is the probability of data authenticity. The condition variable c includes key influencing factors of tunnel engineering such as geological type, construction stage, ambient temperature, and humidity.
[0038] Preferred, Adversarial training mechanisms include: During discriminator training, the original training data and adversarial examples are mixed in a 1:1 ratio to improve the discriminator's ability to identify noise. During generator training, adversarial examples are generated using the gradient ascent method to enhance the generator's ability to handle abnormal situations. An adaptive learning rate adjustment strategy is adopted, with a learning rate range of 0.0001-0.01, to dynamically adjust the generation intensity of adversarial examples according to the training progress.
[0039] Specifically, Adversarial example generation strategies include: First-order adversarial examples are generated using the Fast Gradient Sign Method (FGSM), which calculates the gradient of the loss function with respect to the input data and adds perturbations along the gradient direction to generate adversarial examples. Higher-order adversarial examples are generated using the Projected Gradient Descent (PGD) method, which generates stronger adversarial examples through multiple iterations of optimization. The Carlini-Wagner attack method is used to generate optimization-based adversarial examples, which generates high-quality adversarial examples by minimizing the perturbation magnitude and maximizing the classification loss.
[0040] Preferred, The Wasserstein distance loss function is defined as: in, Wasserstein distance loss function; : Expected value symbol; The discriminator's output of the real data; The discriminator's output on the generated data; : Synthetic data generated by the generator; Gradient penalty coefficient; The gradient of the discriminator with respect to the interpolated data; L2 norm; Linear interpolation of real data and generated data.
[0041] Preferred, Data augmentation includes: The amount of synthetic data generated is 3-5 times that of the original small sample data; the synthetic data and the original data are mixed in a 7:3 ratio to form an expanded dataset; the authenticity and diversity of the generated data are ensured through data quality assessment.
[0042] S2: Generate synthetic data using a pre-trained conditional table generative adversarial network model, and then mix the synthetic data with the sample training data to obtain an augmented dataset; S201: Constructing a Bayesian prediction model: Based on the expanded dataset, a Bayesian neural network prediction model is constructed, and the prediction uncertainty is quantified by modeling the parameter distribution; the variational inference method is used to approximate the posterior distribution, and the Markov chain Monte Carlo method is combined to perform accurate posterior inference.
[0043] S202: Uncertainty Quantification and Prediction: Input the characteristics of the tunnel project to be predicted into the Bayesian prediction model to obtain the carbon emission prediction results and their uncertainty intervals; generate multiple prediction samples through the Monte Carlo sampling method, calculate the prediction mean and confidence interval; combine the prediction uncertainty and risk assessment model to provide a scientific basis for tunnel project decision-making.
[0044] Specifically, Bayesian prediction models include: A variational autoencoder (VAE) structure is adopted, in which the encoder maps the input features to the latent space, and the decoder reconstructs the output from the latent space. The Gaussian distribution assumption is introduced into the latent space, and the posterior distribution is approximated by the variational inference method. Combined with the reparameterization technique, end-to-end gradient propagation and model training are achieved.
[0045] Specifically, Variational inference methods include: The variational lower bound (ELBO) is used as the optimization objective, and the true posterior distribution is approximated by maximizing ELBO. The reparameterization technique is used to separate randomness from the parameters, so as to achieve effective gradient propagation. The Adam optimizer is used for parameter updates, and the learning rate is set to 0.001. The learning rate scheduling strategy is combined to improve training stability.
[0046] Preferred, Uncertainty quantification methods include: The predicted distribution is obtained through multiple forward propagations, and the predicted mean and variance are calculated. The quantile regression method is used to estimate the prediction intervals at different confidence levels. The Bootstrap resampling method is combined to improve the stability and reliability of uncertainty estimation. The confidence interval is set to 95%, and the number of predicted samples is no less than 1000.
[0047] Preferred, Quantile regression methods include: Define multiple quantile levels, including key quantiles such as 5%, 25%, 50%, 75%, and 95%; train multiple quantile regression models by minimizing the quantile loss function; and combine the prediction results of all quantile models to construct a complete prediction distribution and confidence interval.
[0048] Specifically, MCMC methods include: The Hamiltonian Monte Carlo (HMC) method is used for posterior sampling, and high-quality samples are obtained by simulating the Hamiltonian dynamics system. The No-U-Turn sampler (NUTS) is used to automatically adjust the step size and number of steps to improve sampling efficiency. Variational inference is used as the initialization of MCMC to accelerate the convergence process.
[0049] Specifically, The training process includes: An alternating training strategy is employed, training the discriminator for 5 steps first, followed by the generator for 1 step. The Adam optimizer is used for parameter updates, with the generator learning rate set to 0.0002 and the discriminator learning rate set to 0.0001. An early stopping strategy is used to prevent overfitting, stopping training when the validation set loss no longer decreases for 10 consecutive epochs. A cosine annealing learning rate scheduling strategy is used to dynamically adjust the learning rate based on the training progress. The method also includes setting model training parameters. The number of training rounds should be set to 100-500; the data quality assessment FID value should be less than 50; the model performance accuracy should be no less than 85%; the prediction accuracy improvement should be no less than 20%; and the uncertainty quantification error should be controlled within 5%.
[0050] Preferred, The method also includes data quality assessment criteria: The distributional distance (MMD) between generated data and real data is less than 0.1; the diversity index (IS) of generated data is greater than 3.0; the pass rate of the authenticity assessment of generated data is not less than 90%; and the improvement of the data augmentation effect assessment index is not less than 30%.
[0051] Specifically, The method also includes performance optimization strategies: Gradient accumulation is used to improve training stability; mixed precision training is used to reduce memory usage; data parallelism is used to accelerate the training process; model pruning is used to reduce inference time; and quantization is used to reduce model storage space.
[0052] S3: Construct a Bayesian prediction model and train it using an expanded dataset; input the features of the tunnel project to be predicted into the trained Bayesian prediction model, generate multiple prediction samples using the Monte Carlo sampling method, and obtain statistics by quantifying the uncertainty based on the prediction samples.
[0053] Specifically, Risk assessment models include: A risk level classification system is constructed based on predictive uncertainty, including three levels: low risk, medium risk, and high risk; risk threshold standards are established by combining historical data and expert knowledge; carbon emission distribution under different risk levels is assessed through Monte Carlo simulation; and risk mitigation suggestions and decision support information are provided.
[0054] Preferred, The method also includes model validation and performance evaluation steps: The model performance was evaluated using a 5-fold cross-validation method, including metrics such as accuracy, precision, recall, and F1 score. The quality of the generated data was assessed using data quality evaluation metrics, including FID, IS, and MMD. The accuracy of uncertainty quantification was evaluated using uncertainty calibration evaluation metrics, including ECE and MCE. The effectiveness of each technical component was verified through ablation experiments.
[0055] Example 2 This embodiment provides a system and specific implementation process for an adversarial tunnel carbon emission sample quantification prediction method as described in any of Embodiment 1. The system includes: The data preprocessing module is used to collect and preprocess historical carbon emission data from the tunnel. The adversarial CTGAN model module is used to build and train adversarial conditional generative adversarial networks. The data augmentation module is used to generate synthetic data to augment the training set; The Bayesian prediction module is used to build Bayesian neural network prediction models. The uncertainty quantification module is used to quantify the uncertainty of prediction results; The risk assessment module is used for risk assessment and decision support based on predictive uncertainty.
[0056] The data storage module is used to store raw data, generated data, and model parameters; The model management module is used to manage the training, updates, and version control of models. The visualization module is used to display the forecast results, uncertainty range, and risk assessment results; The interface module is used for data interaction and result output with external systems.
[0057] The specific implementation process includes: Step 1: Data Collection and Preprocessing This embodiment takes a high-speed railway tunnel project as the research object. The tunnel is 15.8 kilometers long and was constructed using the TBM method, with a construction period of 36 months. During the data collection phase, historical carbon emission data of the tunnel was collected daily for 12 consecutive months, resulting in a total of 365 days of complete data. The collected data includes geological condition data (rock and soil types such as granite, limestone, sandstone, etc., geological structure, groundwater conditions, rock mass integrity, etc.), construction technology data (excavation methods such as drill and blast, TBM method, shield tunneling, etc., support methods, lining type, construction progress, etc.), equipment parameter data (equipment type, power, efficiency, usage time, etc.), environmental factor data (ambient temperature, humidity, air pressure, wind speed, etc.), and carbon emission data (CO2 emissions, CH4 emissions, N2O emissions, etc.).
[0058] In the data preprocessing stage, the collected raw data is first cleaned, removing records with more than 50% missing values, and outliers are identified and processed using... The principle is to identify outliers. Then, continuous features are standardized using Z-scores to eliminate the influence of dimensions. The standardization formula is as follows: Next, the categorical features were one-hot encoded to convert them into numerical features, resulting in a 120-dimensional feature set. Feature selection was performed using mutual information, choosing features with mutual information values greater than 0.1, ultimately selecting 85 effective features. Finally, the data was divided into a training set (700 records), a validation set (200 records), and a test set (100 records) in a 7:2:1 ratio.
[0059] Step 2: Construct an adversarial CTGAN model In the construction of the adversarial CTGAN model, we designed a generator network G and a discriminator network D. The generator network G employs a 4-layer fully connected neural network structure. The input layer receives random noise z (dimension 100) and a condition variable c (dimension 20), with weights initialized using Xavier initialization. Hidden layer 1 contains 256 neurons with the ReLU activation function, a dropout rate of 0.3, and a weight decay factor of 1e-4. Hidden layer 2 contains 512 neurons with the ReLU activation function, a dropout rate of 0.3, and a weight decay factor of 1e-4. Hidden layer 3 contains 256 neurons with the ReLU activation function, a dropout rate of 0.3, and a weight decay factor of 1e-4. The output layer outputs the generated tunneled carbon emission data (dimension 15), with the Tanh activation function and weights initialized using He initialization.
[0060] The discriminator network D employs a 3-layer convolutional neural network structure. The input layer receives either real or generated data (dimension 15), and the weights are initialized using Xavier initialization. Convolutional layer 1 contains 64 convolutional kernels, each 3×3 in size, with the LeakyReLU activation function (negative slope of 0.2) and a BatchNorm layer. Convolutional layer 2 contains 128 convolutional kernels, each 3×3 in size, with the LeakyReLU activation function (negative slope of 0.2) and a BatchNorm layer. The fully connected layer contains 64 neurons, with the LeakyReLU activation function (negative slope of 0.2) and a Dropout rate of 0.5. The output layer outputs the probability of data authenticity (dimension 1), with the Sigmoid activation function and the weights initialized using He initialization.
[0061] The condition variable c includes 20 dimensions, including geological condition variables (5 dimensions) such as soil and rock type, geological structure, groundwater conditions, rock mass integrity, and geological age; construction technology variables (5 dimensions) such as excavation method, support method, lining type, construction progress, and construction stage; environmental factor variables (5 dimensions) such as ambient temperature, humidity, air pressure, wind speed, and season; and equipment parameter variables (5 dimensions) such as equipment type, power, efficiency, usage time, and maintenance status.
[0062] Step 3: Adversarial Training and Data Augmentation In the adversarial training phase, we employ an alternating training strategy, training the discriminator for 5 steps first, then the generator for 1 step, with a batch size of 32. The Adam optimizer is used for parameter updates, with the generator learning rate set to 0.0002 and the discriminator learning rate to 0.0001, β1=0.5, and β2=0.999. An early stopping strategy is used to prevent overfitting; training stops when the validation set loss no longer decreases for 10 consecutive epochs, with a maximum training epoch count of 300. A cosine annealing learning rate scheduling strategy is used, dynamically adjusting the learning rate according to the training progress, with a minimum learning rate of 0.01 times the initial learning rate. Gradient clipping is employed, with a maximum gradient norm of 1.0 to prevent gradient explosion. The Wasserstein distance loss function is defined as... , where λ=10 is the gradient penalty coefficient. During training, the generator loss, discriminator loss, Wasserstein distance, gradient norm, and other metrics are monitored. The convergence criterion is that both the generator loss and discriminator loss change by less than 0.001 for 5 consecutive epochs.
[0063] In the adversarial example generation stage, we employ multiple strategies. The FGSM method generates adversarial examples by calculating the gradient of the loss function with respect to the input data and adding perturbations along the gradient direction, with a perturbation strength ε=0.01. The PGD method generates stronger adversarial examples through multiple iterations, with 10 iterations and a step size of 0.001. The Carlini-Wagner method generates high-quality adversarial examples by minimizing the perturbation amplitude and maximizing the classification loss, with a confidence parameter κ=0. Adversarial examples are mixed with the original data in a 1:1 ratio to improve model robustness.
[0064] In the data augmentation phase, we used a pre-trained adversarial CTGAN model to generate synthetic data, with the number of synthetic data points being four times that of the original small sample data (1000 original data points, 4000 generated). The synthetic data and the original data were mixed in a 7:3 ratio to form the augmented dataset. Data quality assessments ensured the authenticity and diversity of the generated data, with the following criteria: FID (Fréchet Inception Distance) < 50 (to assess the distributional distance between the generated and real data); IS (Inception Score) > 3.0 (to assess the diversity of the generated data); and MMD (Maximum Mean Discrepancy) < 0.1 (to assess the distributional difference between the generated and real data). The pass rate for the authenticity assessment of the generated data was ≥ 90%.
[0065] Step 4: Construct a Bayesian prediction model In the Bayesian prediction model construction phase, we employ a variational autoencoder (VAE) structure. The encoder maps input features to a latent space with a dimension of 50; the decoder reconstructs the output from the latent space with a dimension of 15. A Gaussian distribution assumption is introduced into the latent space, and the posterior distribution is approximated using variational inference methods.
[0066] In the variational inference method, we use the variational lower bound (ELBO) as the optimization objective, and approximate the true posterior distribution by maximizing the ELBO. ,in For the expectation value operator, Let be the log-likelihood function. For Kullback-Leibler divergence, For variational posterior distribution, The prior distribution is used. The reparameterization technique is employed to separate randomness from the parameters. ,in ~ N(0,1). The Adam optimizer is used for parameter updates, with a learning rate of 0.001, β1=0.9, and β2=0.999. The regularization parameters are set to KL divergence weight β=0.5 and reconstruction loss weight α=1.0. During training, the reconstruction loss, KL divergence loss, ELBO value, and latent space distribution are monitored.
[0067] In the MCMC method, a Markov chain Monte Carlo method is combined for accurate posterior inference. Hamiltonian Monte Carlo (HMC) sampling is used with a step size ε = 0.01 and a number of steps L = 10. A No-U-Turn sampler (NUTS) is used to automatically adjust the step size and number of steps, with a maximum tree depth of 10. Variational inference is used as the initialization for MCMC to accelerate the convergence process. Sampling parameters are set to 1000 warm-up steps, 2000 sampling steps, and a sampling interval of 5. Convergence is diagnosed using indicators such as Geweke diagnostics, R-hat statistic, and an effective sample size ESS > 1000.
[0068] Step 5: Uncertainty Quantification and Prediction In the uncertainty quantification stage, the predicted distribution is obtained through multiple forward propagations, with 1000 forward propagations performed to calculate the predicted mean and variance. Quantile regression is used to estimate the prediction intervals at different confidence levels, combined with a Bootstrap resampling method to improve the stability and reliability of uncertainty estimation. The confidence interval is set at 95%, and the number of predicted samples is no less than 1000.
[0069] In constructing the risk assessment model, we built a risk level classification system based on predictive uncertainty, where low risk is defined as predictive uncertainty less than 10%, medium risk as predictive uncertainty between 10% and 20%, and high risk as predictive uncertainty greater than 20%. We also established risk threshold standards by combining historical data and expert knowledge.
[0070] In the prediction phase, we input the characteristics of the tunnel engineering to be predicted into the Bayesian prediction model to obtain carbon emission prediction results. The prediction accuracy reached 88%, the uncertainty quantification error was controlled within 4%, the confidence interval was 95%, and risk mitigation suggestions and decision support information were provided.
[0071] Taking the carbon emission prediction for a tunnel project in its 13th month as an example, the input characteristics include granite geology, TBM excavation, ambient temperature of 15℃, humidity of 65%, and equipment power of 85%. The predicted CO2 emission is 1250±85 kg / day, with a confidence interval of [1165, 1335]. The risk assessment is medium risk (uncertainty 15.2%), and the decision recommendation is to optimize equipment operating parameters, which is expected to reduce carbon emissions by 8-12%.
[0072] In the model validation and performance evaluation phases, we used a 5-fold cross-validation method to evaluate model performance. The accuracy was 88.5% ± 2.3%, precision was 87.2% ± 2.8%, recall was 89.1% ± 2.1%, and the F1 score was 88.1% ± 2.2%. In the uncertainty calibration evaluation metrics, ECE (Expected Calibration Error) < 0.05 and MCE (Maximum Calibration Error) < 0.08. Ablation experiments showed that the accuracy was 72.3% using only the original data; after data augmentation, the accuracy improved to 88.5%, an improvement of 16.2%; after adding adversarial training, the accuracy improved to 88.5%, and robustness improved by 23.5%; and after adding uncertainty quantification, the prediction confidence improved by 31.2%.
[0073] In terms of computational complexity and resource requirements, the adversarial CTGAN model training took approximately 1.5 hours, and the Bayesian prediction model training took approximately 0.5 hours, for a total of 2 hours. Peak memory usage during training was 8GB, and during inference, it was 2GB. Computational resources included GPU (NVIDIA RTX 3080) for training and CPU for inference. The model size was 15MB for the adversarial CTGAN model and 8MB for the Bayesian prediction model, totaling 23MB. Inference speed was 0.8 seconds for a single prediction and 12 seconds for batch prediction (100 data points). Storage requirements were 50MB for raw data, 200MB for generated data, and 23MB for model parameters, totaling 273MB.
[0074] Example 3 This embodiment provides a specific implementation process for an adversarial tunnel carbon emission sample quantification prediction method, as described in any of Embodiment 1.
[0075] This embodiment takes a subway tunnel project in a certain city as the research object. The tunnel is 8.5 kilometers long, constructed using the shield tunneling method, and has a construction period of 24 months. The system is deployed on a cloud server cluster, adopts a microservice architecture design, and supports distributed computing and real-time prediction.
[0076] Step 1: System Architecture Design and Deployment During the system architecture design phase, we built a distributed system architecture based on microservices. The system adopts the Spring Cloud framework and contains 10 core service modules, deployed on 3 servers. The server configuration is as follows: master server (CPU: Intel Xeon E5-2680 v4, memory: 64GB, storage: 2TB SSD), compute server (CPU: IntelXeon Gold 6248, memory: 128GB, GPU: NVIDIA Tesla V100), and storage server (CPU: IntelXeon Silver 4214, memory: 32GB, storage: 10TB HDD).
[0077] The data preprocessing service is deployed on the main server and is responsible for data collection, cleaning, and feature engineering. The service is developed using the Python Flask framework and supports a RESTful API. The data collection interface supports multiple data formats such as CSV, JSON, and XML. Data cleaning is implemented using the pandas library, and feature engineering is implemented using the scikit-learn library. The service has a processing capacity of 1000 data records per second and a response time of less than 100 milliseconds.
[0078] The adversarial CTGAN model service is deployed on a computing server, responsible for model training and inference. The service is developed using the PyTorch framework and supports GPU-accelerated computation. The model building function supports custom network structures, allowing users to define parameters such as the number of network layers, neurons, and activation functions through configuration files. The training management function supports distributed training, using the Horovod framework to achieve multi-GPU parallel training. The adversarial example generation function supports multiple strategies such as FGSM, PGD, and Carlini-Wagner, with the generation method selected through parameter configuration.
[0079] The data augmentation service is deployed on a computing server and is responsible for generating and assessing the quality of synthetic data. The synthetic data generation function uses batch processing, generating 10,000 data entries at a time, with a processing time of approximately 5 minutes. The data quality assessment function monitors the quality of the generated data in real time, and assessment metrics include FID, IS, and MMD. The data blending function supports custom blending ratios, with a default ratio of 7:3.
[0080] The Bayesian prediction service is deployed on a computing server and is responsible for predictive model building and inference. The Bayesian model building function supports various structures such as VAE and BNN, and model parameters are defined through configuration files. The uncertainty quantification function supports methods such as Monte Carlo sampling and variational inference; the number of samplings is configurable, with a default of 1000. The model inference function supports real-time prediction and batch prediction; real-time prediction response time is less than 1 second, and batch prediction (1000 data points) processing time is approximately 10 seconds.
[0081] The uncertainty quantification service is deployed on the main server and is responsible for uncertainty calculation and confidence interval estimation. The Monte Carlo sampling function supports large-scale sampling calculations, with a maximum of 10,000 samples. The quantile regression function supports multi-quantile prediction, with default quantiles of 5%, 25%, 50%, 75%, and 95%. The confidence interval calculation function supports multiple confidence levels, with a default of 95%.
[0082] The risk assessment service is deployed on the main server and is responsible for risk level classification and decision support. The risk level classification function supports multi-level risk classification, with a default of low, medium, and high levels. The risk threshold management function allows for dynamic adjustment of risk thresholds, with threshold parameters set via configuration files. The decision support function provides risk mitigation suggestions, generating recommendations based on historical data and expert knowledge.
[0083] Data storage services are deployed on storage servers and are responsible for persistent data storage. Raw data storage uses a PostgreSQL database, supporting structured data storage with a maximum capacity of 10TB. Generation data storage uses a MongoDB database, supporting large-scale generation data storage with a maximum capacity of 50TB. Model parameters are stored using a Redis cache, supporting model parameter version management, with a cache capacity of 32GB.
[0084] The model management service is deployed on the main server and is responsible for model lifecycle management. The model training management function supports monitoring the training process, displaying real-time metrics such as training progress, loss function, and accuracy. The model update management function supports online model updates, employing a blue-green deployment strategy to ensure uninterrupted service. The version control management function supports model version tracking, using Git for version management.
[0085] The visualization service is deployed on the main server and is responsible for result display and interaction. The prediction result display function supports various chart types, including line charts, bar charts, and scatter plots. The uncertainty interval display function supports confidence interval visualization, using error bar charts. The risk assessment result display function supports risk level visualization, using color coding to display risk levels.
[0086] The API service is deployed on the main server and is responsible for external system integration. The data input interface supports multiple data formats, including CSV, JSON, XML, and Excel. The result output interface supports multiple result formats, including JSON, XML, PDF, and Excel. External system interfaces support protocols such as RESTful API, GraphQL, and gRPC.
[0087] Step 2: System Integration and Testing During the system integration phase, we used Docker containerization technology to deploy each service module. Each service module was packaged as an independent Docker image and orchestrated using Docker Compose. Inter-service communication used the HTTP protocol and was managed centrally through an API gateway. Data streams were processed asynchronously using message queues (Apache Kafka) to ensure high system availability.
[0088] During the system testing phase, we conducted functional testing, performance testing, stress testing, and availability testing. Functional testing covered all business scenarios, with 1000 test cases and a 99.8% pass rate. Performance testing used JMeter to simulate 1000 concurrent users, with an average system response time of 1.2 seconds and a maximum response time of 3.5 seconds. Stress testing simulated 5000 concurrent users; the system ran stably without crashes. Availability testing ran continuously for 7x24 hours, achieving a system availability of 99.7%.
[0089] Step 3: System Operation and Monitoring During system operation, we established a comprehensive monitoring system. System monitoring utilizes a Prometheus + Grafana architecture to monitor system performance metrics in real time. These metrics include CPU utilization, memory utilization, disk utilization, network traffic, service response time, and error rate. The alerting mechanism uses AlertManager, which automatically sends alert notifications when system metrics exceed thresholds.
[0090] Data monitoring employs the ELK (Elasticsearch + Logstash + Kibana) architecture to monitor data quality and processing status in real time. Data quality monitoring includes metrics such as data integrity, data accuracy, and data consistency. Processing status monitoring includes metrics such as data processing progress, processing success rate, and processing error rate.
[0091] Model monitoring utilizes the MLflow framework to monitor model performance and prediction quality in real time. Model performance monitoring includes metrics such as accuracy, precision, recall, and F1 score. Prediction quality monitoring includes metrics such as prediction bias, prediction variance, and prediction confidence.
[0092] Step 4: System Optimization and Maintenance During the system optimization phase, we performed performance tuning and resource optimization. Performance tuning included database query optimization, caching strategy optimization, and algorithm parameter optimization. Database query optimization employed techniques such as index optimization and query rewriting, resulting in a 40% improvement in query performance. Caching strategy optimization utilized a Redis cluster, increasing the cache hit rate to 95%. Algorithm parameter optimization employed grid search and Bayesian optimization, resulting in a 15% improvement in model performance.
[0093] Resource optimization includes computing resource optimization, storage resource optimization, and network resource optimization. Computing resource optimization utilizes GPU resource pooling, improving resource utilization by 30%. Storage resource optimization employs data compression and deduplication technologies, saving 50% of storage space. Network resource optimization utilizes CDN acceleration, increasing data transmission speed by 60%.
[0094] During the system maintenance phase, we established a comprehensive operation and maintenance system. Routine maintenance includes system health checks, data backups, and log cleanup. System health checks are performed daily, checking service status, database connections, disk space, etc. Data backups employ an incremental backup strategy, backing up daily and retaining data for 30 days. Log cleanup uses an automatic cleanup strategy, retaining logs for 7 days.
[0095] A comprehensive fault response mechanism has been established for fault handling. Fault response time is less than 5 minutes, and fault recovery time is less than 30 minutes. The fault handling process includes steps such as fault detection, fault diagnosis, fault repair, and fault verification. Fault prevention employs a preventative maintenance strategy, with regular system checks and updates.
[0096] Step 5: System Performance Evaluation During the system performance evaluation phase, we conducted comprehensive performance testing and evaluation. System performance metrics included prediction accuracy, uncertainty quantification error, data augmentation effect, model training time, prediction response time, and system availability.
[0097] Prediction accuracy was tested using 10-fold cross-validation, with an average accuracy of 89.2% ± 1.8%, precision of 88.7% ± 2.1%, recall of 89.8% ± 1.9%, and an F1 score of 89.2% ± 1.8%. Uncertainty quantification error was tested using 1000 Monte Carlo sampling runs, with an average error of 3.8% ± 0.5% and a maximum error of 5.2%. Data augmentation testing showed that data augmentation improved model performance by 32.5% and robustness by 28.3%.
[0098] Model training time tests showed that the adversarial CTGAN model took 1.8 hours to train, and the Bayesian prediction model took 0.6 hours, for a total of 2.4 hours. Prediction response time tests showed that the average response time for a single prediction was 0.9 seconds, and the average processing time for batch predictions (1000 predictions) was 12 seconds. System availability tests showed that the system availability was 99.6%, the mean time between failures (MTBF) was 720 hours, and the mean time to repair (MTTR) was 2.5 hours.
[0099] System resource usage data shows that the average CPU utilization is 65%, the average memory utilization is 78%, the average disk utilization is 45%, and the average network utilization is 35%. System scalability testing shows that the system supports horizontal scaling, with a maximum of 10 service instances and a processing capacity that can be expanded to 10,000 concurrent users.
[0100] Through the implementation of this system, a complete tunnel carbon emission prediction system was successfully constructed, realizing fully automated processing of data collection, model training, predictive inference, uncertainty quantification, and risk assessment. The system features high availability, high performance, and high scalability, providing reliable technical support for low-carbon design and construction of tunnel engineering.
[0101] Definitions: The Adversarial CTGAN model is a tabular data generative adversarial network that combines conditional generation and adversarial training mechanisms. It is specifically designed to address the challenges faced by traditional GANs in modeling discrete column distributions, handling imbalanced classes, and learning complex inter-column dependencies. Its core innovation lies in introducing a conditional training mechanism. By constructing conditional vectors for the generator and discriminator (e.g., specifying a particular class for a discrete column), the generator can generate synthetic data with specific attributes on demand. Simultaneously, it employs adversarial loss and information-theoretic regularization for joint optimization, ensuring the authenticity of the generated data in terms of column distribution statistics, multi-column association constraints, and data privacy protection. This model generates synthetic tables that are highly consistent with the original data distribution and retain key pattern features, making it widely applicable in data augmentation, privacy-preserving data sharing, and minority class sample generation in imbalanced classification tasks.
[0102] Wasserstein distance is a method for measuring the difference between two probability distributions, derived from optimal transport theory. Its core idea can be intuitively understood as the minimum "work" (i.e., the sum of the mass of the moved sand × the distance traveled) required to transform one probability distribution (i.e., a pile of sand) into another (the target pile of sand). Unlike traditional metrics such as KL divergence, Wasserstein distance provides smooth and meaningful gradients even between non-overlapping distributions or distributions with different support sets. This property makes it crucial in the training of Generative Adversarial Networks (WGANs), stabilizing the training process and mitigating mode collapse. This distance effectively captures the overall geometry of the distribution and is widely used in image generation, distribution alignment, and transfer learning.
[0103] Variational inference is a deterministic inference method used to approximate complex probability distributions, especially the computationally difficult posterior distribution in Bayesian models. Its core idea is to transform the posterior distribution approximation problem into an optimization problem: first, a simple approximate distribution belonging to a family of parameterized distributions (such as the Gaussian family) is chosen; then, by minimizing the KL divergence between this approximate distribution and the true posterior distribution, variational parameters (such as mean and variance) are iteratively optimized to obtain a posterior approximation that is both computationally efficient and sufficiently accurate. Compared to traditional sampling methods (such as MCMC), variational inference sacrifices some accuracy for faster computation speed, making it particularly suitable for Bayesian analysis of large-scale data. It is widely used in parameter inference for topic models, deep generative models (such as VAEs), and Bayesian neural networks.
[0104] Markov Chain Monte Carlo (MCMC) methods are a class of stochastic sampling algorithms that sample complex probability distributions by constructing a Markov chain with a stationary distribution as the target distribution. The core principle is to design an ergodic Markov chain that converges to the target posterior distribution after a sufficient number of state transitions. Then, by collecting the converged samples and performing Monte Carlo integration, complex statistics such as the posterior expectation and marginal likelihood are approximated. Unlike deterministic approximation methods such as variational inference, MCMC (e.g., the Metropolis-Hastings algorithm, Gibbs sampling) is a stochastic approximation method. Its advantage lies in its theoretical ability to asymptotically and accurately reconstruct the target distribution, but it typically requires extensive computation and has complex convergence diagnosis. It is widely used in posterior inference in Bayesian statistics, statistical physics, and machine learning.
[0105] Monte Carlo sampling is a numerical method that approximates complex mathematical problems based on random sampling and mathematical statistics. Its core idea is to generate a large number of random samples following a specific probability distribution and use sample statistics (such as mean and variance) to approximate integrals, expected values, or optimization problems that are difficult to solve analytically directly. This method is based on the law of large numbers and the central limit theorem in probability theory. When the sample size is sufficiently large, the sample mean will converge to the expected value with probability, and the estimation error follows an asymptotically normal distribution. Monte Carlo sampling is independent of the problem's dimensionality, giving it significant advantages in solving high-dimensional integrals, physical simulations, financial risk assessment, and Bayesian statistics. However, its convergence speed is closely related to sampling efficiency, often requiring optimization of the sample generation process using strategies such as importance sampling and MCMC.
[0106] Gradient ascent is an iterative optimization algorithm used to find local maxima of a function. Its core principle is to calculate the gradient of the objective function at the current parameter point (i.e., the direction in which the function value increases most rapidly), and update the parameters along this direction with a preset step size (learning rate), thereby gradually approaching the function's extreme point. Unlike gradient descent, which seeks a minimum, gradient ascent repeatedly performs the "calculate gradient - update parameters" steps, causing the objective function value to continuously increase in each iteration until the gradient approaches zero or the convergence condition is met. This method is widely used in machine learning scenarios where maximizing the objective function is required, such as maximum likelihood estimation, policy optimization in reinforcement learning, and generator training in generative adversarial networks (GANs).
[0107] Fast Gradient Sign Method (FGSM) is a white-box attack method that generates adversarial examples based on gradients. Its core idea is to utilize the model's gradient information relative to the input data by adding a small perturbation along the direction of the gradient sign to the original input, causing the model to make incorrect predictions on the perturbed input. Specifically, FGSM first calculates the gradient of the loss function relative to the input data, then takes the sign of the gradient (positive or negative), multiplies it by a preset small perturbation magnitude ε, and finally adds the generated perturbation to the original input. This attack method is computationally efficient and easy to implement, and can significantly reduce model performance, thereby exposing the model's vulnerability. It is widely used to evaluate and improve the robustness and adversarial defense capabilities of deep learning models.
[0108] Projective Gradient Descent (PGD) is an iterative algorithm for solving constrained optimization problems. Its core idea is to project the parameters into the feasible region after each step of standard gradient descent to ensure that the constraints are satisfied. Specifically, PGD first calculates the gradient of the objective function at the current parameter point, updates the parameters along the gradient direction with a certain step size, and then maps the updated parameters to the nearest legal point in the constraint set through a projection operation. This iterative process of "gradient update + projection" ensures that the solution always satisfies the constraints during iteration, while moving as far as possible in the direction of objective function optimization. PGD is widely used in constrained optimization problems in machine learning, such as adversarial training (ensuring perturbations are within a specified norm sphere through projection), matrix completion (constraining the rank or norm of the matrix), and sparse optimization (constraining the number of non-zero elements). Its advantage lies in its ability to stably handle complex constraints, but its convergence speed depends on the complexity of the projection calculation and the geometric properties of the constraint set.
[0109] The Carlini-Wagner (C&W) attack method is an optimization-based adversarial example generation technique, renowned for its high success rate and ability to effectively circumvent various adversarial detection mechanisms. This method formalizes adversarial example generation as a constrained optimization problem, aiming to minimize added perturbations (typically measured by L0, L2, or L∞ norms) while ensuring the target model produces a specified misclassification of the adversarial examples. The C&W attack cleverly transforms the constrained optimization problem into an unconstrained one through variable substitution and employs optimization algorithms such as gradient descent for solution. Compared to single-step attacks like the Fast Gradient Sign Method (FGSM), the C&W attack is a computationally expensive iterative attack that generates adversarial examples with minimal and imperceptible perturbations, and is often used as a benchmark attack method for evaluating model robustness.
[0110] Variational Autoencoders (VAEs) are deep generative models that combine variational inference with autoencoder structures. Their core objective is to learn and efficiently sample the latent probability distribution of high-dimensional data (such as images and text). A VAE consists of an encoder (inference network) and a decoder (generation network): the encoder maps input data to probability distribution parameters (such as mean and variance) in the latent space and samples latent variables from this distribution using reparameterization techniques; the decoder then reconstructs these latent variables into the original data space. Training a VAE is achieved by maximizing the lower bound of evidence (ELBO), an objective function that simultaneously optimizes reconstruction accuracy and the KL divergence between the latent distribution and the prior distribution (usually a standard normal distribution), thus ensuring good continuity and structure in the latent space, facilitating the generation of new data samples. VAEs are widely used in data generation, representation learning, anomaly detection, and semi-supervised learning.
[0111] Variational Lower Bound (ELBO): The full name is Evidence Lower Bound, a core optimization objective in variational inference used to approximate the computationally difficult-to-calculate true posterior distribution. Mathematically, it is a lower bound on the log-marginal likelihood, consisting of two terms: a reconstruction term and a KL divergence term. The reconstruction term measures the likelihood of generated data under the variational distribution, reflecting the model's data reconstruction capability; the KL divergence term constrains the similarity between the variational distribution and the prior distribution, ensuring the regularization of the latent space. By maximizing the ELBO, both generation accuracy and the structural rationality of the latent space can be improved simultaneously, achieving a balanced optimization of probabilistic generation and inference in models such as Variational Autoencoders (VAEs).
[0112] The Adam optimizer is a stochastic optimization algorithm that combines the momentum method and RMSProp. It achieves adaptive learning rate adjustment for different parameters by calculating the exponential moving average of the first moment (mean) and second moment (uncentered variance) of the gradient and correcting for bias. This optimizer combines the acceleration capability of the momentum method in the gradient direction with the adaptive scaling characteristic of RMSProp on the learning rate. It maintains stable and efficient convergence performance in sparse gradients, non-stationary objective functions, and high-dimensional parameter spaces, and is widely used in the training of deep neural networks, especially suitable for large-scale data and complex model scenarios.
[0113] Hamiltonian Monte Carlo (HMC) is an advanced Markov Chain Monte Carlo (MCMC) sampling method that efficiently explores the target probability distribution by introducing the concept of Hamiltonian dynamics from physical systems to simulate the trajectory of particles in a potential energy field. HMC transforms the target distribution to be sampled (such as a Bayesian posterior distribution) into a potential energy function and introduces auxiliary momentum variables to construct a dynamic system. It then calculates the particle trajectory in phase space through numerical simulations (such as the frog-leap method). This method of using gradient information to guide the sampling path allows HMC to effectively overcome the inefficiency of traditional random walk algorithms in high-dimensional spaces, achieving long-distance, low-autocorrelation state transitions. It is particularly suitable for accurate sampling of complex high-dimensional distributions, but its performance is highly sensitive to the selection of hyperparameters such as step size and trajectory length.
[0114] The No-U-Turn Sampler (NUTS) is an extension of Hamiltonian Monte Carlo (HMC) algorithm. It addresses the problem of manually tuning key hyperparameters (such as the number of steps and step size) in HMC by adaptively determining the length of the integral trajectory. Its core innovation lies in employing a recursive tree construction strategy, exploring forward and backward simultaneously when simulating particle dynamics trajectories. It automatically stops when a trajectory "turns back" (i.e., begins to revert), ensuring optimal selection of the sampling path length while maintaining detailed balance. This mechanism allows NUTS to efficiently adapt to different target distributions, avoiding unnecessary computational waste and reducing the burden of parameter tuning. It has become a standard sampler in Bayesian inference software (such as Stan and PyMC3), and is particularly suitable for automated sampling of complex high-dimensional posterior distributions.
[0115] Five-fold cross-validation is a commonly used model evaluation technique. Its core process involves randomly dividing the original dataset into five mutually exclusive subsets of similar size. Each time, one subset is selected as the test set, and the remaining four subsets are used as the training set. This process is repeated five times. The average of the five test results is then used as the model performance evaluation metric (e.g., accuracy, F1 score). This method maximizes data utilization, effectively reducing model evaluation fluctuations caused by biases in single data partitioning. It provides a more robust estimate of generalization ability under limited data conditions and can also be used for model hyperparameter tuning and model selection. It is widely used in model validation and comparison in the field of machine learning.
[0116] FID, IS, and MMD are three core metrics for evaluating the performance of generative models (such as GANs and VAEs). IS assesses quality by calculating the intra-class consistency and inter-class diversity (using KL divergence) of the generated image's predictions in a pre-trained classification model; higher values are better, but it cannot detect overfitting and mode collapse. FID goes a step further, comprehensively evaluating the visual quality and diversity of the generated image by calculating the Fréchet distance (a measure of the similarity between two multivariate Gaussian distributions) of the feature distributions of the real and generated images in the feature space of the pre-trained Inception network. Lower values indicate a closer similarity between the generated and real distributions, making it the most commonly used metric. MMD is a kernel-based statistical test that determines whether two distributions originate from the same distribution by calculating the distance between their mean embeddings in a high-dimensional regenerating kernel Hilbert space. It does not rely on a pre-trained model, has a solid theoretical foundation, and is applicable to a wider range of data types, but its performance is sensitive to the choice of kernel function. These three metrics provide complementary quantitative evaluations of generative model performance from different perspectives.
[0117] ECE and MCE are metrics used to evaluate the degree of calibration of classification model predictions, measuring the consistency between the "confidence" of the model predictions and its measured "accuracy".
[0118] Cosine annealing learning rate scheduling strategy is a hyperparameter scheduling method for optimization algorithms that dynamically adjusts the learning rate based on a cosine function curve. Its core idea is to set the learning rate as a cosine function that decays from its initial value to zero over the training epochs: the learning rate decreases slowly in the early stages of training to maintain optimization stability, accelerates in the middle stages to promote model convergence, and slows down again in the final stages to achieve fine-tuning. This smooth, non-linear decay process simulates the idea of simulated annealing, helping the optimizer escape local optima and approach the global optimum. It is particularly suitable for training complex models such as deep neural networks and Transformers, and can effectively improve model performance and convergence stability in tasks such as image classification and natural language processing. This strategy has a standard version and a variant with warm restarts (CosineAnnealingWarmRestarts), the latter further enhancing the model's ability to escape local optima by periodically resetting the learning rate.
[0119] Gradient accumulation is an optimization strategy for training large-scale deep learning models on memory-constrained hardware. Its core idea is to compute and accumulate gradients through multiple mini-batches of forward and backward propagation, but only perform a parameter update after a preset number of steps have been accumulated. Specifically, the model processes multiple mini-batches of data sequentially, accumulating the calculated gradients in a buffer instead of immediately updating the model parameters. After the target number of steps has been reached, an optimizer step is performed using the average or sum of the accumulated gradients, and then the gradient buffer is cleared. This method effectively simulates the training effect of large batches, overcoming the batch size limitations of a single GPU or dedicated memory, and improving training stability and final performance without increasing hardware requirements. However, it proportionally increases the training time required for each effective update.
[0120] Quantitative techniques: Quantization is a model optimization method that compresses the model and improves inference speed by reducing the numerical precision of weights and activation values in a neural network model (e.g., converting from 32-bit floating-point numbers to 8-bit integers). Its core principle is to map continuous high-precision floating-point parameters to discrete low-precision integer representations while minimizing model performance loss. This significantly reduces model storage space and memory usage, and leverages hardware that supports low-precision computation (such as GPUs, NPUs, and CPUs) to achieve faster computation speeds and lower power consumption. The quantization process typically includes two stages: calibration (determining the numerical mapping range) and fixed-point conversion (performing the transformation). It can be categorized into post-training quantization and quantization-aware training, depending on whether retraining is introduced. This technology is widely used in resource-constrained scenarios such as mobile devices, embedded devices, and edge computing for model deployment.
[0121] Bootstrap resampling method: Bootstrap sampling is a statistical technique that estimates the sampling distribution of a statistic (such as mean or variance) by repeatedly sampling the original dataset with replacement. Its core principle is: randomly select n observations (with repeated sampling allowed) from an original sample of size n to form a bootstrap sample, and repeat this process a large number of times (e.g., 1000 times); then calculate the distribution of the target statistic based on these bootstrap samples, thus directly constructing confidence intervals or estimating standard errors without relying on theoretical assumptions. This method simulates the process of multiple samplings from a population in a data-driven manner, and is particularly suitable for scenarios where the distribution of complex statistics is unknown or the sample size is insufficient. It has wide applications in model evaluation, financial risk analysis, and machine learning performance estimation, but it is quite sensitive to the representativeness of the original sample.
[0122] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A method for quantitative prediction of tunnel carbon emissions based on adversarial testing, characterized in that, Includes the following steps: Step 1: Collect and preprocess tunnel carbon emission data to obtain sample training data; A conditional table generative adversarial network model is constructed and trained using the sample training data and a pre-designed adversarial training framework. Step 2: Generate synthetic data using the trained conditional table generative adversarial network model, and then mix the synthetic data with the sample training data to obtain an augmented dataset; Step 3: Construct a Bayesian prediction model and train it using the augmented dataset; input the tunnel engineering features to be predicted into the trained Bayesian prediction model, generate multiple prediction samples using the Monte Carlo sampling method, and obtain statistics by uncertainty quantification based on the prediction samples.
2. The adversarial-based method for quantitative prediction of tunnel carbon emissions according to claim 1, characterized in that, The adversarial training framework specifically includes a generator network and a discriminator network; condition variables are introduced into the generator network to generate tunnel carbon emission data based on specific conditions; The model parameters are optimized through adversarial game theory using the generator network and discriminator network; an adversarial training mechanism is integrated into the discriminator network and adversarial examples are introduced; Wasserstein distance is used as the loss function, and a gradient penalty term is introduced into the loss function. A pre-trained conditional table-based generative adversarial network model was used to generate synthetic data on tunnel carbon emissions, thereby expanding the original sample dataset.
3. The adversarial-based method for quantitative prediction of tunnel carbon emissions according to claim 2, characterized in that, The adversarial training mechanism specifically includes: During the training process of the discriminator network, the original training data and the adversarial examples are mixed at a 1:1 ratio to improve the discriminator network's ability to identify noise. During generator training, adversarial examples are generated using the gradient ascent method to enhance the generator's ability to handle anomalies; an adaptive learning rate adjustment strategy is adopted to dynamically adjust the generation intensity of the adversarial examples according to the training progress.
4. The adversarial-based method for quantitative prediction of tunnel carbon emissions according to claim 3, characterized in that, The process of generating adversarial examples specifically includes: First-order adversarial examples are generated using the fast gradient sign method, which calculates the gradient of the loss function with respect to the input data and adds perturbations along the gradient direction to generate adversarial examples. Higher-order adversarial examples are generated using the projected gradient descent method, which generates enhanced adversarial examples through multiple iterations of optimization. Optimization-based adversarial examples are generated using the Carlini-Wagner attack method, which generates high-quality adversarial examples by minimizing the perturbation magnitude and maximizing the classification loss.
5. The adversarial-based method for quantitative prediction of tunnel carbon emissions according to claim 4, characterized in that, The loss function is specifically as follows: in, Wasserstein distance loss function; : Expected value symbol; The discriminator's output of the real data; The discriminator's output on the generated data; : Synthetic data generated by the generator; Gradient penalty coefficient; The gradient of the discriminator with respect to the interpolated data; L2 norm; Linear interpolation of real data and generated data.
6. The adversarial-based method for quantitative prediction of tunnel carbon emissions according to claim 1, characterized in that, The training process of the Bayesian prediction model specifically includes: The Bayesian prediction model employs a variational autoencoder structure, which maps input features to a latent space through an encoder, and the decoder reconstructs the output from the latent space. The Gaussian distribution assumption is introduced into the latent space, and the true posterior distribution is approximated by the variational inference method. Then, the Markov chain Monte Carlo method is combined to perform further posterior inference based on the posterior distribution, and a more accurate true posterior distribution is obtained.
7. The adversarial-based method for quantitative prediction of tunnel carbon emissions according to claim 6, characterized in that, The variational inference method specifically includes: The variational lower bound is used as the optimization objective, and the true posterior distribution is approximated by maximizing the variational lower bound; and the Adam optimizer is used for parameter updates. The variational lower bound is expressed as: in, For the expectation value operator, Let be the log-likelihood function. For Kullback-Leibler divergence, For variational posterior distribution, It is the prior distribution; The Markov chain Monte Carlo method specifically includes: The Hamiltonian Monte Carlo method is used for posterior sampling, and mass samples are obtained by simulating the Hamiltonian dynamics system. A No-U-Turn sampler is used to automatically adjust the step size and number of steps to improve sampling efficiency. The approximate true posterior distribution obtained by the variational inference method is used as the initialization of the posterior inference to accelerate the convergence process of the posterior inference.
8. The adversarial-based method for quantitative prediction of tunnel carbon emissions according to claim 1, characterized in that, The uncertainty quantification specifically includes: The statistics include the predicted mean, variance, and prediction intervals at different confidence levels. After generating multiple predicted samples using the Monte Carlo sampling method, the multiple predicted samples are forward-propagated multiple times to obtain the predicted distribution, and the predicted mean and variance are calculated based on the predicted distribution. The prediction intervals at different confidence levels are estimated using quantile regression. The Bootstrap resampling method is used to improve the stability of the uncertainty quantification. Step three also includes: inputting the statistics into a pre-built risk assessment model to obtain real-time suggestions and decision information; the risk assessment model uses the Monte Carlo sampling method to simulate sampling and quantify the carbon emission distribution under different risk levels.
9. The adversarial-based method for quantitative prediction of tunnel carbon emissions according to claim 1, characterized in that, Step one specifically includes: The tunnel carbon emission data specifically includes multi-dimensional characteristic data including geological conditions, construction technology, equipment parameters, and environmental factors. The preprocessing process specifically includes: cleaning, normalizing, and feature selection of the raw data to construct a feature library of factors affecting tunnel carbon emissions; dividing the collected data into a training set, a validation set, and a test set, wherein the training set is used for training the conditional table generative adversarial network model, the validation set is used for model tuning, and the test set is used for model performance evaluation; the amount of generated synthetic data is multiple times the amount of sample training data; the synthetic data and sample training data are mixed in proportion to form the augmented dataset.
10. A system for an adversarial tunnel carbon emission sample quantification prediction method as described in any one of claims 1-9, characterized in that, include: The data preprocessing module is used to collect and preprocess the tunnel carbon emission data; A conditional table generative adversarial network model module is used to construct and train the conditional table generative adversarial network model. The data augmentation module is used to generate synthetic data to expand the original dataset, thereby obtaining the expanded dataset; The Bayesian prediction module is used to construct the Bayesian prediction model and obtain a more accurate true posterior distribution. The uncertainty quantification module is used to calculate the statistic based on the more accurate true posterior distribution, thereby quantifying the uncertainty of the prediction result; The risk assessment module is used to receive the statistics and generate real-time suggestions and decision-making information.
Citation Information
Patent Citations
Carbon emission prediction and optimization method
CN120146309A