A method for evaluating uncertainty in a dual-branch deep neural network

CN121388517BActive Publication Date: 2026-08-14BEIJING XUANYU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

尤其在任务场景具有环境复杂高、博弈对抗性强、响应要求实时性高、信息不完整、边界不确定性等情况下

Benefits of technology

[0048]本发明公开的基于异常检测和误用检测的双分支深度神经网络不确定性评测方法有效解决了上述问题。该方法采用基于异常检测和误用检测的双分支融合量化策略,评估被测推理模型的全方位漏洞和缺陷,提高了评测可信性,有效支撑航天领域中不确定性量化测试的要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121388517B_ABST
    Figure CN121388517B_ABST
Patent Text Reader

Abstract

A method for uncertainty evaluation using a two-branch deep neural network includes: constructing a two-branch quantization evaluation dataset and a two-branch feature extraction model based on a convolutional neural network, including an anomaly detection branch and a misuse detection branch; setting a first Gaussian process quantization module after the anomaly detection branch and a second Gaussian process quantization module after the misuse detection branch; inputting the training set and test dataset into the anomaly detection branch of the trained two-branch feature extraction model, and inputting training set data and test data into the misuse detection branch; using the first Gaussian process quantization module and the second Gaussian process quantization module to evaluate the output of each branch using a Gaussian process-based uncertainty quantization method, and outputting the Gaussian process uncertainty quantization evaluation results of the two branches, and then weighted and fused them as the final uncertainty quantization result, which is then classified and visualized. This invention improves the reliability of the evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for evaluating uncertainty in a dual-branch deep neural network, and particularly to a method for evaluating uncertainty in a dual-branch deep neural network based on anomaly detection and misuse detection, belonging to the field of artificial intelligence security and trustworthiness evaluation. Background Technology

[0002] With the rapid development of computer hardware and artificial intelligence technologies, intelligent software has been widely used in various security-critical equipment. However, as artificial intelligence technology is applied more deeply and extensively in security-critical industries and social life, the resulting security and trust risks have attracted widespread attention worldwide.

[0003] Various internal and external uncertainties, such as variations in the distribution of training and testing data, data noise, label noise, and malicious attacks, can lead to imperfect data. Insufficient understanding of model structure design and hyperparameter changes during training can also cause model bias. These factors can cause trained models to produce incorrect predictions for unseen input samples. Therefore, it is necessary to study the intermediate processes of intelligent software operation, explain how the predictive output of intelligent software expresses the impact of uncertainties on its functionality and performance, and ensure that this impact can be observed, understood, and trusted by users. This would make the software's decision-making process more transparent and interpretable. Furthermore, it is crucial to improve the observability, understandability, and trustworthiness of the software's decision-making process and results during the interaction and communication between software and human decision-making. For example, as early as April 2018, the UK Parliament's Select Committee on Artificial Intelligence, in its report "In the UK: Plans, Ambition and Capabilities?", recommended avoiding the use of "black box" algorithms in specific scenarios and critical areas where safety is paramount, and encouraged the development of quantifiable, trustworthy, and interpretable artificial intelligence systems.

[0004] Therefore, research on uncertainty quantification assessment methods for deep neural networks has emerged. Based on uncertainty quantification assessment, the system can understand the impact of various factors that cause uncertainty on itself, accept it, understand it, quantify it, and turn it into predictive output or an important part of rational decision-making.

[0005] Existing uncertainty quantification methods in research can be mainly divided into two categories: probability-based uncertainty quantification methods and non-probability-based uncertainty quantification methods. The mainstream method in probability-based uncertainty quantification is the Bayesian neural network-based method. Bayesian neural network-based quantification methods are further divided into parametric and non-parametric methods. Parametric methods include variational inference, Monte Carlo dropout, Markov Monte Carlo, and Bayesian active learning. These are white-box quantification methods, requiring knowledge of the neural network model's weights, hyperparameters, number of layers, and number of nodes. Non-parametric methods include approximate Laplace transform methods, which do not require knowledge of the model's specific parameters. Bayesian neural network-based quantification methods suffer from high computational complexity and require approximate calculations. Non-probability-based uncertainty quantification methods mainly include methods based on fuzzy theory, ensemble methods, test-time data augmentation methods, and conformal prediction methods. Among these methods, ensemble-based approaches require training multiple models simultaneously, which is costly. Furthermore, it's impossible to verify that the ensemble method is applicable to a given ensemble model and input samples. Therefore, if multiple models in the ensemble give the same incorrect answer, there is a risk of overconfidence. While conformal prediction methods have sufficient statistical basis and provide mathematical reliability guarantees, they rely on the crucial assumption that the data after model deployment does not have a distributional offset from the training data. When this assumption is violated, conformal prediction will fail.

[0006] Existing uncertainty quantification methods are mainly applied in the model development process, focusing on the normal function and performance of the model's predicted output. However, in the evaluation of intelligent models and systems, the focus is on the potential vulnerabilities and weaknesses of the model when facing various uncertainties such as changes in the natural physical environment, non-malicious and malicious interference, and attacks. The aim is to detect and quantify how various uncertainties affect the model's predicted output and assess the severity of the resulting model vulnerabilities; ultimately, to provide an uncertainty assessment.

[0007] Anomaly detection and misuse detection, as widely used methods in the field of information security intrusion detection, are mainly used to detect various insecure and abnormal situations in information systems. In anomaly detection-based methods, anomalies are considered data patterns with obvious or hidden characteristics that do not conform to normal patterns. In misuse detection-based methods, misuse detection first learns the characteristics or rules of specific anomalous samples, classifying samples that differ from known anomalies into other new anomalous categories.

[0008] In the uncertainty quantification evaluation method of a two-branch deep neural network based on anomaly detection and misuse detection, the uncertainty factors that cause anomalies in the predicted output of the deep neural network can be categorized into four types. The first type includes noise in data collection, measurement errors, and label noise. Label noise refers to the different labels randomly assigned to the same target object by different experts due to human visual measurement errors and limitations of human cognitive abilities. This type of unavoidable uncertainty introduced by random factors is called random uncertainty. The second type is data label uncertainty caused by the inconsistent distribution of training and test data. For example, changes in the natural physical environment such as heavy rain, fog, snow, dust storms, motion blur, lighting changes, intra-class deformation, and background noise can lead to changes in image distribution characteristics. The third type is uncertain labels caused by malicious attacks, such as poisoning attacks, bias manipulation, Trojan horse attacks, and boundary attacks. The fourth type is adversarial out-of-distribution attack samples compared to the training samples, which simultaneously cause minor changes in the image and changes in distribution characteristics.

[0009] Faced with the credibility crisis caused by these four uncertainties, existing intelligent models and systems based on deep neural networks only focus on whether the model's predicted output is feasible in different scenarios, rarely paying attention to the vulnerabilities and weaknesses of these models and systems when facing various uncertainties. Uncertainty quantification and evaluation methods, however, achieve the goal of cognizing and observing the model's working process, understanding the reasons for the model's predicted output, and ultimately accurately observing and understanding the model's behavior by detecting model biases, vulnerabilities, and weaknesses across various dimensions, and by accurately understanding and interpreting what the model "can and cannot do" during human-model interaction. This is extremely important for security-critical application environments, especially in scenarios with high environmental complexity, strong adversarial competition, high real-time response requirements, incomplete information, and boundary uncertainties. Summary of the Invention

[0010] The technical problem solved by this invention is to overcome the shortcomings of the prior art and provide a dual-branch deep neural network uncertainty evaluation method based on anomaly detection and misuse detection. When the activity characteristics caused by unknown uncertainty factors have significant deviations from the characteristics of the benchmark activity, the unknown uncertainty factors can be detected, that is, the model vulnerabilities caused by the unknown uncertainty factors can be detected.

[0011] The technical solution of this invention is: a dual-branch deep neural network uncertainty evaluation method based on anomaly detection and misuse detection, comprising:

[0012] Construct a dual-branch quantization evaluation dataset, including a training dataset, a validation dataset, and a test dataset; the training dataset includes an anomaly detection training set and a misuse detection training set.

[0013] A two-branch feature extraction model based on a convolutional neural network is constructed, wherein the two branches include an anomaly detection branch and a misuse detection branch; the anomaly detection branch is trained using an anomaly detection training set, and the misuse detection branch is trained using a misuse detection training set; the two branches are validated using a validation dataset to obtain the trained two-branch feature extraction model; a first Gaussian process quantization module is set after the anomaly detection branch, and a second Gaussian process quantization module is set after the misuse detection branch, which are used to perform uncertainty quantization evaluation on the outputs of the two branches using a Gaussian process respectively;

[0014] The anomaly detection branch in the trained dual-branch feature extraction model is input into the training dataset and the test dataset to obtain the first extracted feature, which is then output to the first Gaussian process quantization module; the misuse detection branch in the trained dual-branch feature extraction model is input into the training dataset and the test dataset to obtain the second extracted feature, which is then output to the second Gaussian process quantization module.

[0015] The first Gaussian process quantization module and the second Gaussian process quantization module use Gaussian processes to evaluate the uncertainty of the features output by their respective branches, and output the uncertainty quantization evaluation results of the Gaussian process for each of the two branches; the uncertainty quantization evaluation results of the Gaussian process for the two branches are weighted and fused to obtain the final uncertainty quantization result;

[0016] Set a baseline threshold, and classify the final uncertainty quantification results based on the baseline threshold. Output the classification results and visualize them.

[0017] Preferably, the anomaly detection branch uses a lightweight ResNet neural network for feature extraction; the lightweight ResNet neural network includes: an input layer, an initial convolutional layer, and a convolutional layer for incomplete blocks, with each layer connected in series, wherein:

[0018] The initial convolutional layer uses 32 7×7 convolutional kernels with a stride of 3 to perform convolution operations on the input image and extract low-level features;

[0019] The residual block convolutional layer consists of four stages of residual blocks, which are connected in series. The number of residual blocks in each stage is 2, 3, 4 and 2 respectively. Each residual block uses depthwise separable convolution instead of standard convolution.

[0020] Preferably, the misuse detection branch uses a lightweight pyramid feature extraction method to capture uncertain features, including: an input layer, an initial convolutional layer, a residual block convolutional layer, and a lightweight spatial pyramid pooling layer, which are connected in series.

[0021] The initial convolutional layer uses 64 7×7 convolutional kernels to perform convolution operations on the input data with a stride of 2, extracting low-level features of the data and outputting them to the residual block convolutional layer;

[0022] The residual block convolutional layer adjusts the dimensions of the low-level features output by the initial convolutional layer and outputs them to the lightweight spatial pyramid pooling layer. The residual block convolutional layer consists of four stages of residual blocks, which are connected in series. The number of residual blocks in each stage is 3, 4, 6 and 3 respectively. Each residual block contains 3 convolutional layers, a dimension transformation block and an identity block.

[0023] The lightweight spatial pyramid pooling layer processes the features output by the residual block convolutional layer and outputs a fixed-dimensional feature vector; the lightweight spatial pyramid pooling layer adds a 1×1 convolutional layer before the spatial pyramid pooling layer; the 2×2 pyramid level is removed from the structure of the spatial pyramid pooling layer itself, and only the 4×4 and 1×1 pyramid levels are retained; a random projection layer is introduced after the spatial pyramid pooling layer.

[0024] Preferably, when training the misuse detection branch using the misuse detection training dataset, a staged training method is adopted:

[0025] In the first stage, the improved lightweight spatial pyramid pooling layer is frozen, and only the initial convolutional layer and residual block convolutional layer are trained. The hierarchical learning rate is used to accelerate convergence, and the loss function adopts the feature reconstruction mean squared error loss function.

[0026] In the second stage, an improved lightweight spatial pyramid pooling layer is trained based on the initial convolutional layer and residual block convolutional layer. The loss function used during training is the local anomaly contrastive loss function.

[0027] Preferably, the first Gaussian process quantization module and the second Gaussian process quantization module have the same structure; both the first feature and the second feature include dimensionality-reduced training data and dimensionality-reduced test data after feature extraction of the corresponding branches;

[0028] Each Gaussian process quantization module processes the input dimensionality-reduced training and test data and outputs a predicted output y. * Expectations and variance The results of the uncertainty quantification evaluation of the corresponding branch of Gaussian processes; specifically:

[0029] Let the input dimensionality reduction training data be denoted as (X, y), where X is the dimensionality reduction training data value and y is the corresponding data label; let the dimensionality reduction test data be denoted as X. * ,

[0030]

[0031] Where k is the kernel function, specifically:

[0032]

[0033] Among them, l, σ f To adjust the parameters, the shape of the kernel function can be adjusted; all values ​​are positive. i x j Let i and j be the i-th and j-th data points in X, respectively, and k be the total number of data points.

[0034] Preferably, when the uncertainty quantification results of the two branches are weighted and fused to obtain the final uncertainty quantification result, the weights are adjusted according to the importance of each branch.

[0035] Preferably, when setting the baseline threshold:

[0036] In conventional systems, the baseline threshold for ensuring safe operation of the system under normal conditions is that the uncertainty quantification compliance rate is not less than 90%.

[0037] In safety-critical systems, the baseline threshold for ensuring the system's safe operation under extreme conditions is an uncertainty quantification compliance rate of no less than 97.5%.

[0038] Preferably, based on a benchmark threshold, the uncertainty level and grade of the uncertainty quantification and evaluation module output of the Gaussian process are divided into five levels: vulnerable, restricted, conditional, advanced, and superior.

[0039] Preferably, when constructing the dataset for a two-branch deep neural network uncertainty quantification evaluation method based on anomaly detection and misuse detection:

[0040] The training set for anomaly detection consists of all normal data labeled with data labels, and the training set for misuse detection consists of data labeled with various types of uncertainty labeled with data labels.

[0041] The test dataset is used to validate and test the results of the two-branch deep neural network uncertainty evaluation method based on anomaly detection and misuse detection. It includes data with normal labels, data with various types of uncertainty labels, and real-world data from a physical simulation environment.

[0042] Preferably, the training dataset for the misuse detection branch includes four different types of uncertainty factors:

[0043] The first category is noise in data collection, measurement errors, and label noise, which are unavoidable uncertainties introduced by random factors;

[0044] The second category is data labels with uncertainties caused by the inconsistent distribution of training and test data;

[0045] The third category is uncertain labels caused by malicious human attacks;

[0046] The fourth category is adversarial out-of-distribution attack sample uncertainty data compared to the training samples. This type of adversarial sample causes both minor changes in the image and changes in the distribution characteristics.

[0047] Compared with the prior art, the present invention has the following advantages:

[0048] The uncertainty evaluation method based on a dual-branch deep neural network using anomaly detection and misuse detection disclosed in this invention effectively solves the above-mentioned problems. This method employs a dual-branch fusion quantization strategy based on anomaly detection and misuse detection to evaluate the comprehensive vulnerabilities and defects of the tested inference model, improving the reliability of the evaluation and effectively supporting the requirements of uncertainty quantification testing in the aerospace field. Attached Figure Description

[0049] Figure 1 The flowchart of a dual-branch deep neural network uncertainty evaluation method based on anomaly detection and misuse detection provided by the present invention is shown below.

[0050] Figure 2 The following is an extended flowchart of an uncertainty evaluation method based on a dual-branch deep neural network for anomaly detection and misuse detection provided by the present invention. Detailed Implementation

[0051] The following, in conjunction with the accompanying drawings, provides a more detailed description of the uncertainty evaluation method based on a dual-branch deep neural network for anomaly detection and misuse detection provided in this application. The specific implementation of this method may include the following steps (method flow as follows). Figure 1 and Figure 2 As shown):

[0052] The key steps of the uncertainty assessment method based on a two-branch deep neural network for anomaly detection and misuse detection are as follows:

[0053] (1) A dataset for uncertainty quantification evaluation based on a dual-branch deep neural network using anomaly detection and misuse detection is constructed. The dataset comes from a lunar scene dataset specifically designed for the aerospace field, including image data collected from physical simulation sites, image data augmented using data augmentation techniques, image data enhanced by adversarial examples, and image data generated by virtual reality. The dataset consists of a training dataset, a validation dataset, and a test dataset, wherein:

[0054] The training dataset is used to train the uncertainty evaluation model. Since this invention is a dual-branch fusion uncertainty evaluation model, it includes two parts: a deep neural network uncertainty evaluation branch based on anomaly detection and a deep neural network uncertainty evaluation branch based on misuse detection. Therefore, for these two branches, there are two corresponding training datasets. The training dataset based on the anomaly detection branch consists of all data labeled as normal. The training dataset based on the misuse detection branch consists of data labeled with various types of uncertainty, resulting from noise, measurement errors, labeling errors, changes in the real natural physical environment, non-malicious and malicious interference, attacks, etc.

[0055] The validation dataset is used to evaluate the model's performance on data not used for training by monitoring the model's performance on such data. This includes evaluating the model's performance under different combinations of hyperparameters, such as learning rate, number of network layers, and regularization strength, in order to optimize model performance and prevent overfitting.

[0056] The test dataset is used to test the results of the uncertainty evaluation method based on anomaly detection and misuse detection of a two-branch deep neural network. It includes data with normal labels, data with various types of uncertainty labels, and real-world data from a physical simulation environment.

[0057] (2) Training the feature extraction model: Construct and train a feature extraction model based on the uncertainty quantification evaluation method of a dual-branch deep neural network for anomaly detection and misuse detection, which includes the design of the deep convolutional neural network and the phased training of the model.

[0058] (2.1) Improved design of convolutional neural network based on ResNet50.

[0059] The two-branch deep neural network uncertainty assessment model based on anomaly detection and misuse detection comprises two branches. The anomaly detection-based branch learns the model from normal samples and then identifies samples that significantly deviate from it. Its key characteristic is that it uses normal samples as a baseline, relying primarily on normal data during model training. Anomaly samples, being a very small or unlabeled subset, are mainly used to add noise. This branch is denoted as anomaly detection-based deep neural network uncertainty modeling. The misuse detection-based branch first learns the features or rules of specific anomaly samples, classifying samples different from known anomalies into new anomaly categories. This branch is also denoted as misuse detection-based deep neural network uncertainty modeling.

[0060] In the deep neural network uncertainty evaluation modeling method based on anomaly detection and misuse detection, the feature extraction neural network is designed in two branches. Different feature extraction strategies are selected based on the different data characteristics of the two branches. Specifically:

[0061] For the normal data branch, an improved lightweight ResNet neural network is used for feature extraction. For uncertain data, an improved lightweight pyramid feature extraction method is used to capture uncertain features. Specifically, the improved lightweight ResNet neural network is used for feature extraction of normal data. The neural network design consists of an input layer, an initial convolutional layer, and a convolutional layer for incomplete blocks.

[0062] The input data for the input layer is a 3-channel RGB image of 1280×800 pixels.

[0063] The first layer is the initial convolutional layer, using 32 7×7 convolutional kernels with a stride of 3. It performs convolution operations on the input image to extract low-level features and expand the number of channels. A max pooling layer is then used to further reduce the size of the feature map and enhance the translation invariance of the features; here, the pooling stride is 3.

[0064] Layers 2 through 48 are residual block convolutional layers. The residual structure addresses the vanishing gradient problem in deep networks through skip connections and consists of four residual blocks with quantities of 2, 3, 4, and 2 respectively. Each residual block uses depthwise separable convolutions instead of standard convolutions. This modified lightweight deep neural network architecture significantly reduces computational cost by reducing the number of convolutional kernels, increasing the stride of pooling layers, using separable convolutional neural networks, and reducing the number of residual blocks.

[0065] Furthermore, for the misuse detection branch based on uncertain data, an improved lightweight pyramid feature extraction method is used to extract uncertain features. The feature extraction neural network design specifically includes an input layer, an initial convolutional layer, a residual block convolutional layer, and a lightweight spatial pyramid pooling layer.

[0066] The input data for the input layer is a 3-channel RGB image of 1280×800 pixels.

[0067] The first layer is the initial convolutional layer, using 64 7×7 convolutional kernels with a stride of 2 to perform convolution operations on the input image, extracting low-level features and expanding the number of channels. A max-pooling layer is then used to further reduce the size of the feature map and enhance the translation invariance of the features.

[0068] Layers 2 through 48 are residual block convolutional layers. The residual structure addresses the vanishing gradient problem in deep networks through skip connections. It consists of four stages of residual blocks, with quantities of 3, 4, 6, and 3 respectively. Each residual block contains three convolutional layers, including a dimensionality transformation block and an identity block. The convolutions used are 1×1, 3×3, and 1×1. 1×1 convolutions reduce dimensionality, 3×3 convolutions process key features, and another 1×1 convolution restores dimensionality. The dimensionality transformation block is effective when input and output channels or sizes are inconsistent, while the identity convolution block deepens feature extraction without changing dimensionality. The first convolutional block in each stage uses a stride of 2 to halve the resolution. Batch normalization is used in each convolutional layer, and a rule activation function is used to introduce non-linearity to the network, allowing for better feature abstraction and transformation of the input data. Finally, skip connections are used to directly add the input of one block to the output of the next block, ensuring that gradients can flow during backpropagation.

[0069] Layers 49 to 51 are improved lightweight spatial pyramid pooling layers. Spatial pyramid pooling layers maintain spatial hierarchy during pooling, which is crucial for anomaly detection, as anomalies may occur in localized regions. However, maintaining this hierarchy incurs significant computational overhead. This invention optimizes this by adding a 1×1 convolutional layer before the spatial pyramid pooling layer, drastically reducing the number of input feature channels and thus lowering the input dimensionality. Secondly, removing the 2×2 layer from the spatial pyramid pooling layer itself reduces computation by 19%. Finally, a random projection layer is introduced after the spatial pyramid pooling layer, performing near-equidistant embedding of the high-dimensional space into a low-dimensional subspace. Even with a sharp dimensionality reduction, the relative distances between data points are highly preserved, ensuring that the distance-sensitive Gaussian process remains effective despite the dimensionality reduction. Therefore, through these improvements, the lightweight spatial pyramid pooling layer achieves computational efficiency comparable to the original global pooling and fully connected layers while preserving multi-scale spatial information, significantly enhancing the localization capability of misuse detection.

[0070] (2.2) Phased training of feature extraction convolutional neural network.

[0071] During the feature extraction model training phase, normal and uncertain datasets are input. Based on these two datasets, a dual-branch deep neural network uncertainty evaluation method based on anomaly detection and misuse detection is used to train the feature extraction model. Since this invention employs a hybrid architecture—a combination of convolutional neural network feature extraction and Gaussian process uncertainty modeling—a phased training strategy is adopted. The advantages are: firstly, the high-dimensional feature vectors output by the convolutional neural network trained as an independent feature extractor are stable; secondly, the computational complexity of the Gaussian process is high, and separate training avoids redundant feature calculations caused by convolutional neural network parameter updates, significantly reducing resource consumption; and finally, decoupling the training of the convolutional neural network and the Gaussian process reduces the risk of overfitting.

[0072] The two branches are trained separately:

[0073] For the anomaly detection branch based on normal data, an improved lightweight ResNet neural network is used for feature extraction and trained directly.

[0074] For the misuse detection branch based on uncertain data, a phased training method is adopted, specifically the training is divided into two phases:

[0075] Phase 1: Freeze the improved lightweight spatial pyramid pooling layers, training only the initial convolutional layers (7×7 convolutions + max pooling) and residual blocks (layers 2-48). Use hierarchical learning rates (1e-4 for shallow layers, 1e-3 for deep layers) to accelerate convergence. The loss function is the feature reconstruction mean squared error loss function, monitoring pixel-level errors between the training and validation sets. Freeze the statistical parameters for the batch normalization layers, updating only the convolutional weights.

[0076] Phase 2 involves training an improved lightweight spatial pyramid pooling layer, with joint fine-tuning of three layers to activate multi-scale spatial information capture capabilities. The lightweight spatial pyramid pooling layer combines a prefix of a 1×1 compressed convolutional layer, simplified 4×4 and 1×1 pyramid layers, and a random projection layer to avoid the loss of positional information caused by global pooling while meeting computational requirements. Furthermore, a local anomaly contrastive loss function is employed to enhance the response in anomaly regions.

[0077] (3) Feature Extraction Based on Convolutional Neural Network Model: For the training and test datasets, feature extraction is performed using a pre-trained feature extraction model based on a dual-branch deep neural network uncertainty evaluation method using anomaly detection and misuse detection. The anomaly detection-based deep neural network uncertainty evaluation branch feature extraction model is trained on a normal dataset, which can contain a very small amount of tolerable noise and perturbations. Similarly, the misuse detection-based deep neural network uncertainty evaluation branch feature extraction model is trained on various uncertain data subsets with different labels in the uncertainty benchmark dataset. The training and test data are input into the feature extraction model for feature extraction. The anomaly detection quantification evaluation branch obtains the extracted features of the normal training data and test data, while the misuse detection quantification branch obtains the extracted features of the uncertain training data and test data. Since the real physical simulation environment introduces uncertainties, the input data from the real physical simulation site is used to extract features using the misuse detection-based deep neural network uncertainty evaluation branch feature extraction model to obtain various features with uncertainty information.

[0078] (4) A dual-branch uncertainty quantification evaluation method based on anomaly detection and misuse detection. This invention uses a Gaussian process-based method to model the quantification evaluation model. During the modeling process, both training and test datasets need to be input simultaneously, which is the core reason for the phased training in this invention. Because in the real open physical world, image input changes with time and space, and the data has temporal characteristics, a joint input and output approach is chosen. First, prepare the training and test datasets. Based on the feature extraction model trained in the first three steps, input both the training and test datasets simultaneously into the feature extraction model. Feature extraction reduces the dimensionality of the data to facilitate Gaussian process calculation. Second, use the feature extraction output as the input to the Gaussian process to train two branches of uncertainty quantification models: anomaly detection-based Gaussian process uncertainty quantification evaluation and misuse detection-based Gaussian process uncertainty quantification evaluation. Each branch outputs two different uncertainty quantification results. Finally, after uncertainty quantification of both branches, the results of the two branches can be weighted and fused.

[0079] The principle of the Gaussian process during the quantization process of each branch is as follows:

[0080] The corresponding dimensionality-reduced training dataset (X, y) and dimensionality-reduced test dataset (X) are obtained by extracting features from the dual-branch outputs. *As input, where X is the dimensionality-reduced training data value and y is the label or output result, in the bi-branch quantization model, based on the different labels of normal data and uncertain data, a bi-branch quantization evaluation model for anomaly detection and misuse detection based on Gaussian processes can be constructed. Different labels will cause the trained model to detect different data. After inputting the training and test datasets respectively, the output results of the two branches in the bi-branch quantization evaluation model are given. The modeling principle of the output result of each branch is the same. After inputting the training and test datasets, the specific predicted output y of the model is given. * Expectations and variance They are respectively

[0081]

[0082] Where K is the kernel function, expressed as follows:

[0083]

[0084] Among them, l, σ f To adjust the parameters, the shape of the kernel function can be adjusted; all values ​​are positive. i x j Let i and j be the i-th and j-th data samples in X, respectively, and k be the total number of samples.

[0085] In the output results, the mean represents the central tendency of the predicted output distribution function, while the variance reflects its uncertainty. A larger variance indicates greater uncertainty and a less reliable output; a smaller variance indicates less uncertainty and a more reliable output. Different predicted output metrics are selected as output metrics for the uncertainty quantification evaluation model depending on the task of the intelligent model. Examples include accuracy, precision, average pixel accuracy, and information entropy. It should be noted that the bi-branch uncertainty quantification result is a bi-branch uncertainty quantification model trained on the training and test datasets, and is a static evaluation. Based on this, if evaluation results using dynamic real-world scene data can be obtained, they can also be used as an auxiliary evaluation branch for expansion. The evaluation branch using real data is optional; if this option is not available, its weight is set to 0 when weighted averaging the output results. This option is not considered part of the bi-branch evaluation results of this invention and is an optional appendix.

[0086] (6) Benchmark Threshold Generation: The benchmark threshold is generated by obtaining a benchmark dataset based on past experience. Depending on the task, such as semantic segmentation or image classification, a dual-branch deep neural network uncertainty quantization evaluation method based on anomaly detection and misuse detection obtains the benchmark threshold for its predicted output through a Gaussian process quantization evaluation model under both the normal quantization branch and the uncertainty quantization branch, forming a benchmark threshold discriminator. The benchmark threshold is determined based on the principle that in a normal system, according to the criterion of "ensuring the safe operation of the system under normal conditions," the uncertainty quantization compliance rate for all tested images should be no less than 90%. In a safety-critical system, according to the standard of "ensuring the safe operation of the system under extreme conditions," the uncertainty quantization compliance rate for all tested images should be no less than 97.5%.

[0087] (7) Comprehensive Uncertainty Quantification Assessment and Grading Based on Benchmark Threshold Distance: For a tested model and system, in the quantitative evaluation of the normal training data branch based on anomaly detection, the output result of the anomaly detection branch is compared with the normal benchmark threshold range based on the benchmark threshold of the normal branch. The uncertainty level and grade of the tested model are judged according to the distance. The grade is specifically divided into five levels: vulnerable, restricted, conditional, advanced, and superior. Similarly, in the uncertainty data quantitative evaluation branch based on misuse detection, the distance between the predicted output result and the benchmark prediction range of each known uncertainty quantitative branch is compared to calculate the uncertainty level and grade of the predicted output of each known uncertainty quantitative branch model. In addition, for unknown uncertainty factors in real physical scenarios, the degree and grade of the change in the predicted output uncertainty of the tested model under the influence of unknown uncertainty factors can be detected and quantified by a dual-branch model based on anomaly or misuse. The value is compared with the range of the predicted output threshold of the dual-branch quantitative evaluation model and the closest value is taken. The uncertainty level and grade of the predicted output are calculated based on the increase of the benchmark distance of the unknown uncertainty, and the impact of new unknown uncertainty factors on the decline of the predicted output index is indirectly inferred. Based on the different impacts of unknown uncertainty factors on the predicted output of the tested model, they are also initially divided into five levels.

[0088] Assume the normal baseline threshold or a certain uncertainty baseline threshold is an interval, denoted as S. The predicted output of the evaluation model is y. * Define y * The distance d between S and S is as follows:

[0089]

[0090] If d = 0, the evaluation model is considered to have the same uncertainty benchmark threshold, and S is the uncertainty measure of the evaluation model. Because this invention is a two-branch uncertainty quantification evaluation method based on anomaly detection and misuse detection, including uncertainty quantification evaluation based on normal data and quantification evaluation based on various uncertainty factors, there are multiple uncertainty benchmark thresholds S1, S2, ..., S... n For each uncertainty baseline threshold S j , will calculate a d j For all d j By performing a weighted average, the overall uncertainty measure is obtained.

[0091]

[0092] Where, α j These are weighting coefficients. Four different thresholds are set, based on... The interval in which it is located can be assessed for Level 5 uncertainty.

[0093] (8) Visualization of uncertainty quantification results: The uncertainty quantification test results of the tested model are visualized. For semantic segmentation tasks, the mean and variance of the pixel error rate for each image are displayed; for image classification tasks, the information entropy of the predicted output classification results is displayed.

[0094] The contents not described in detail in this specification are existing technologies known to those skilled in the art.

Claims

1. A method for evaluating uncertainty in a dual-branch deep neural network, characterized in that... include: Construct a two-branch quantization evaluation dataset, including a training dataset, a validation dataset, and a test dataset; The dataset is an image dataset; The training dataset includes an anomaly detection training set and a misuse detection training set; the anomaly detection training set consists of all normal data labeled as data, and the misuse detection training set consists of data labeled as various types of uncertain data. A two-branch feature extraction model based on a convolutional neural network is constructed, wherein the two branches include an anomaly detection branch and a misuse detection branch; The anomaly detection branch is trained using the anomaly detection training set, the misuse detection branch is trained using the misuse detection training set, and the two branches are validated using the validation dataset to obtain the trained dual-branch feature extraction model. A first Gaussian process quantization module is set after the anomaly detection branch, and a second Gaussian process quantization module is set after the misuse detection branch. This is used to perform uncertainty quantization evaluation on the outputs of the two branches using the Gaussian process. The anomaly detection branch uses a lightweight ResNet neural network for feature extraction; the misuse detection branch uses a lightweight pyramid feature extraction network to capture uncertain features, including: an input layer, an initial convolutional layer, a residual block convolutional layer, and a lightweight spatial pyramid pooling layer. When training the misuse detection branch using the misuse detection training dataset, a staged training method is adopted: In the first stage, the improved lightweight spatial pyramid pooling layer is frozen, and only the initial convolutional layer and the residual block convolutional layer are trained, using a hierarchical learning rate to accelerate convergence, and the loss function is the feature reconstruction mean squared error loss function; In the second stage, the improved lightweight spatial pyramid pooling layer is trained based on the completion of the initial convolutional layer and the residual block convolutional layer training, and the loss function during training is the local anomaly contrast loss function. The anomaly detection branch in the trained dual-branch feature extraction model is input into the training dataset and the test dataset to obtain the first extracted feature, which is then output to the first Gaussian process quantization module; the misuse detection branch in the trained dual-branch feature extraction model is input into the training dataset and the test dataset to obtain the second extracted feature, which is then output to the second Gaussian process quantization module. The first Gaussian process quantization module and the second Gaussian process quantization module use Gaussian processes to evaluate the uncertainty of the features output by their respective branches, and output the uncertainty quantization evaluation results of the Gaussian process for each of the two branches; the uncertainty quantization evaluation results of the Gaussian process for the two branches are weighted and fused to obtain the final uncertainty quantization result; Set a baseline threshold, and classify the final uncertainty quantification results based on the baseline threshold. Output the classification results and visualize them.

2. The uncertainty evaluation method for a dual-branch deep neural network according to claim 1, characterized in that: The lightweight ResNet neural network includes: an input layer, an initial convolutional layer, and a detached block convolutional layer, with each layer connected in series. The initial convolutional layer uses 32 7×7 convolutional kernels with a stride of 3 to perform convolution operations on the input image and extract low-level features; The residual block convolutional layer consists of four stages of residual blocks, which are connected in series. The number of residual blocks in each stage is 2, 3, 4 and 2 respectively. Each residual block uses depthwise separable convolution instead of standard convolution.

3. The uncertainty evaluation method for a dual-branch deep neural network according to claim 1, characterized in that: The lightweight pyramid feature extraction network consists of an input layer, an initial convolutional layer, a residual block convolutional layer, and a lightweight spatial pyramid pooling layer connected in series, wherein: The initial convolutional layer uses 64 7×7 convolutional kernels to perform convolution operations on the input data with a stride of 2, extracting low-level features of the data and outputting them to the residual block convolutional layer; The residual block convolutional layer adjusts the dimensions of the low-level features output by the initial convolutional layer and outputs them to the lightweight spatial pyramid pooling layer. The residual block convolutional layer consists of four stages of residual blocks, which are connected in series. The number of residual blocks in each stage is 3, 4, 6 and 3 respectively. Each residual block contains 3 convolutional layers, a dimension transformation block and an identity block. The lightweight spatial pyramid pooling layer processes the features output by the residual block convolutional layer and outputs a fixed-dimensional feature vector; the lightweight spatial pyramid pooling layer adds a 1×1 convolutional layer before the spatial pyramid pooling layer; the 2×2 pyramid level is removed from the structure of the spatial pyramid pooling layer itself, and only the 4×4 and 1×1 pyramid levels are retained; a random projection layer is introduced after the spatial pyramid pooling layer.

4. The uncertainty evaluation method for a dual-branch deep neural network according to claim 1, characterized in that: The first Gaussian process quantization module and the second Gaussian process quantization module have the same structure; both the first feature and the second feature include dimensionality-reduced training data and dimensionality-reduced test data after feature extraction of the corresponding branch. Each Gaussian process quantization module processes the input dimensionality-reduced training and test data and outputs a predicted output. Expectations and variance The results of the uncertainty quantification evaluation of the corresponding branch of Gaussian processes; specifically: The input dimensionality reduction training data is denoted as ( ), These are the values ​​from the dimensionality reduction training data. These are the corresponding data labels; the dimensionality reduction test data are denoted as... , in, For the kernel function, specifically: in, , To adjust the parameters, the shape of the kernel function can be adjusted; all parameters are positive numbers. , They are respectively The first in The and the first One data point, This represents the total number of data points.

5. The uncertainty evaluation method for a dual-branch deep neural network according to claim 4, characterized in that: When the uncertainty quantification results of the two branches are weighted and fused to obtain the final uncertainty quantification result, the weights are adjusted according to the importance of each branch.

6. The uncertainty evaluation method for a dual-branch deep neural network according to claim 1, characterized in that: When setting the baseline threshold: In conventional systems, the baseline threshold for ensuring safe operation under normal conditions is an uncertainty quantification compliance rate of no less than 90%. In safety-critical systems, the baseline threshold for ensuring the system's safe operation under extreme conditions is an uncertainty quantification compliance rate of no less than 97.5%.

7. The uncertainty evaluation method for a dual-branch deep neural network according to claim 1, characterized in that: When constructing a dataset for uncertainty quantification evaluation based on a two-branch deep neural network using anomaly detection and misuse detection: The test dataset is used to validate and test the results of the two-branch deep neural network uncertainty evaluation method based on anomaly detection and misuse detection. It includes data with normal labels, data with various types of uncertainty labels, and real-world data from a physical simulation environment.

8. The uncertainty evaluation method for a dual-branch deep neural network according to claim 1, characterized in that: The training dataset for the misuse detection branch includes four different types of uncertainty factors: The first category is noise in data collection, measurement errors, and label noise, which are unavoidable uncertainties introduced by random factors; The second category is data labels with uncertainties caused by the inconsistent distribution of training and test data; The third category is uncertain labels caused by malicious human attacks; The fourth category is adversarial out-of-distribution attack sample class uncertainty data compared with training samples. Adversarial out-of-distribution attack sample class adversarial samples cause both minor changes in the image and changes in distribution characteristics.

Citation Information

Patent Citations

  • Medical image segmentation post-processing method and system based on double-branch evidence fusion and graph convolutional neural network

    CN118941786A

  • Neural network uncertainty evaluation method based on deep learning Gaussian process

    CN120124689A