Data processing method, device, equipment and storage medium
Through the moment transfer calculation method of physical perception neural network, the problem of low uncertainty assessment efficiency in existing technologies is solved, and efficient and real-time uncertainty quantification is achieved, which is suitable for high-dimensional scientific computing scenarios.
Patent Information
- Application Number
- CN202510847204.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-24
AI Technical Summary
When solving complex problems with physical constraints, existing technologies have low uncertainty assessment efficiency, high computational costs, and difficulty in meeting real-time requirements.
The moment transfer calculation method of physical-informed neural networks (PINNs) is used to calculate the expectation and variance of neuron output layer by layer in a single forward propagation, replacing Monte Carlo simulation and constructing confidence intervals to quantify uncertainty.
Without sacrificing quantitative accuracy, it achieves real-time and reliable uncertainty assessment of model predictions, improves data processing efficiency, and is suitable for the real-time requirements of high-dimensional scientific computing scenarios.
Smart Images

Figure CN120354903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing of physical perception neural networks, and in particular to a data processing method, apparatus, device and storage medium. Background Art
[0002] In recent years, deep learning technology has achieved numerous unprecedented results thanks to its powerful feature extraction and fitting capabilities. For example, in the field of image processing, deep learning is evolving from low-level pixel processing to high-level semantic understanding, becoming a core driving force in the field of computer vision. Against this backdrop, scientific machine learning has emerged as an emerging interdisciplinary discipline. This approach leverages the strengths of deep neural networks in approximating high-dimensional functions, offering new solutions to partial differential equations that are difficult to solve with traditional numerical methods. In scientific computing, the core computational cost often lies in solving the forward problem (the forward model). Therefore, using neural networks to construct an alternative solution to the forward model is a natural choice to reduce this computational cost. Existing scientific machine learning methods, such as MC-dropout (a method for quantifying uncertainty in neural networks), rely on Monte Carlo sampling strategies, requiring dozens to hundreds of forward propagations to calculate the output distribution. In high-dimensional scientific computing scenarios, a single forward propagation is significantly time-consuming, significantly increasing the total computational time of Monte Carlo methods and making them difficult to meet real-time requirements. In addition, one forward propagation requires N samplings, and a large number of repeated samplings will also cause the amount of data processing to grow linearly, further reducing the data processing efficiency and severely limiting the feasibility of the algorithm in practical applications. Summary of the Invention
[0003] The purpose of the embodiments of the present invention is to provide an efficient physical neural network uncertainty quantification algorithm, including a data processing method, device, equipment and storage medium, which can effectively improve the real-time performance and efficiency of data processing.
[0004] To achieve the above objectives, an embodiment of the present invention provides a data processing method, comprising:
[0005] Obtain the data to be predicted;
[0006] Inputting the data to be predicted into a pre-trained physics-aware neural network model, wherein the training process of the physics-aware neural network model incorporates physical laws as constraints so that the physics-aware neural network model performs moment transfer calculations and outputs predicted values and target variances;
[0007] constructing a confidence interval based on the predicted value and the target variance;
[0008] An uncertainty quantification result of the predicted value is determined based on the confidence interval; wherein the uncertainty quantification result is used to characterize the reliability of the predicted value.
[0009] As an improvement to the above scheme, the data to be predicted is data that characterizes the state of the physical system, and the data is space-time coordinates used to solve differential and partial differential equations, sparse monitoring signals, noisy monitoring signals, snapshot data of boundaries and variables, industrial simulation cloud maps, medical imaging data, meteorological observation data or industrial detection images.
[0010] As an improvement of the above scheme, the physical perception neural network model includes at least one moment transfer architecture; wherein, each layer in the moment transfer architecture transfers the expected value and variance value backward, and each of the moment transfer architectures includes a linear layer, a normalization layer, an activation function layer and a dropout layer connected in sequence.
[0011] As an improvement to the above solution, the linear layer uses a weight matrix and a bias to perform a linear transformation on the input first expectation and first variance, and outputs a second expectation and a second variance; wherein the first expectation is the distribution mean of the data to be predicted, and the first variance is the distribution variance of the data to be predicted;
[0012] The normalization layer uses a normalization parameter to perform normalization calculation on the second expectation and the second variance input, and outputs a third expectation and a third variance;
[0013] The activation function layer uses an activation function to perform a function operation on the input third expectation and the third variance, and outputs a fourth expectation and a fourth variance;
[0014] The drop layer performs random dropout according to the fourth expectation and the fourth variance using a preset dropout probability, and outputs a fifth expectation and a fifth variance.
[0015] As an improvement of the above scheme, the physical perception neural network model is provided with a target linear layer at the end of the last moment transfer architecture, and the physical perception neural network model uses the second expectation output by the target linear layer as the predicted value, and uses the second variance output by the target linear layer as the target variance.
[0016] As an improvement of the above solution, the activation function is a smooth function that can perform high-order derivatives to meet the calculation requirements of the physical law constraints, and the smooth function is a Sigmoid function, a Tanh function or a Swish function.
[0017] As an improvement to the above solution, constructing a confidence interval based on the predicted value and the target variance includes:
[0018] calculating a target standard deviation based on the target variance;
[0019] Calculate the product of the target standard deviation and the preset confidence coefficient to obtain the confidence deviation value;
[0020] Calculating the sum of the predicted value and the confidence deviation value to obtain an upper limit value, and calculating the difference between the predicted value and the confidence deviation value to obtain a lower limit value;
[0021] A confidence interval is constructed using the upper limit value and the lower limit value.
[0022] To achieve the above objectives, an embodiment of the present invention further provides a data processing device, comprising:
[0023] A data acquisition module is used to obtain data to be predicted;
[0024] a model processing module, configured to input the data to be predicted into a pre-trained physics-aware neural network model, wherein the training process of the physics-aware neural network model incorporates physical laws as constraints so that the physics-aware neural network model performs moment transfer calculations and outputs predicted values and target variances;
[0025] A confidence interval construction module, configured to construct a confidence interval based on the predicted value and the target variance;
[0026] A quantification result output module is used to determine the uncertainty quantification result of the predicted value according to the confidence interval; wherein the uncertainty quantification result is used to characterize the reliability of the predicted value.
[0027] To achieve the above-mentioned objectives, an embodiment of the present invention further provides a data processing device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the data processing method as described in any of the above-mentioned embodiments is implemented.
[0028] To achieve the above-mentioned purpose, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the data processing method described in any of the above-mentioned embodiments.
[0029] Compared to existing technologies, the data processing methods, apparatuses, devices, and storage media disclosed in embodiments of the present invention aim to address the efficiency bottleneck of uncertainty assessment in solving complex problems with physical constraints by providing an uncertainty quantification method for physics-informed neural networks (PINNs). In a pre-trained PINN model, this invention uses a moment transfer analytic algorithm to calculate the expectation and variance of neuron outputs layer by layer in a single forward propagation. This method replaces the Monte Carlo simulation that relies on massive sampling, fundamentally addressing the high computational cost that has limited its application in simulating high-dimensional, nonlinear physical systems. Ultimately, this invention achieves real-time, reliable uncertainty assessment of model predictions without sacrificing quantization accuracy, providing key technical support for the application of PINNs in fields with stringent safety and real-time requirements, such as digital twins, medical diagnostics, and aerospace.
[0030] It should be noted that the traditional MC-dropout needs to perform tens to hundreds of forward propagation statistical distributions, while the present invention uses a moment transfer calculation module to analyze the expectation and variance layer by layer in a single forward propagation. The data processing process only needs to be completed once, avoiding the linear growth problem of the number of sampling times and the amount of data in the traditional method, and is particularly suitable for real-time data flow scenarios. The present invention replaces the statistical method of Monte Carlo sampling with an analytical method of moment transfer calculation, fundamentally solving the problems of high computational time and large data processing volume caused by multiple forward propagations in the prior art, and is particularly suitable for the real-time uncertainty quantification requirements of high-dimensional scientific computing scenarios. In addition, the present invention uses moment transfer calculation to replace repeated sampling, which improves data processing efficiency while ensuring the uncertainty quantification effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a flow chart of a data processing method provided by an embodiment of the present invention;
[0032] Figure 2 Schematic diagram of the framework of the PINNs model provided by an embodiment of the present invention;
[0033] Figure 3 This is a schematic diagram of the uncertainty quantification results of the physical perception neural network using the MC method provided by the existing technology;
[0034] Figure 4 Schematic diagram of uncertainty quantification results of a physical perception neural network using the MP method provided in an embodiment of the present invention;
[0035] Figure 5 is a structural block diagram of a data processing device provided by an embodiment of the present invention;
[0036] Figure 6 This is a structural block diagram of a data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0038] It's important to note that "uncertainty quantification" is a core metric used in machine learning and data analysis to measure the reliability of model predictions. It's particularly crucial in scenarios where predictive risk assessment is required, such as medical diagnosis, autonomous driving, and scientific simulation. The uncertainty quantification result is essentially a quantitative indicator or distribution that describes the "degree of uncertainty" in a model's predictions about input data. In layman's terms, it represents the model's confidence in the prediction and reflects the potential deviation between the predicted value and the true value. In embodiments of the present invention, uncertainty quantification results are used to avoid blindly trusting unreliable predictions. For example, in medical image segmentation tasks, for pixel regions where the confidence interval exceeds a preset threshold (e.g., blurred areas around tumor boundaries), the system automatically triggers a manual review process to avoid missed or misdiagnosed cases due to model misjudgment. By deeply integrating uncertainty quantification results into the model design and application process, the present invention promotes the transition of machine learning from black-box predictions to transparent decision-making, thereby improving data processing efficiency while ensuring the effectiveness of uncertainty quantification.
[0039] See also Figure 1 , Figure 1 1 is a flow chart of a data processing method provided by an embodiment of the present invention, the method comprising:
[0040] S11, obtaining data to be predicted;
[0041] S12. Inputting the data to be predicted into a pre-trained physics-aware neural network model, wherein the training process of the physics-aware neural network model incorporates physical laws as constraints so that the physics-aware neural network model performs moment transfer calculations and outputs predicted values and target variances;
[0042] S13, constructing a confidence interval according to the predicted value and the target variance;
[0043] S14. Determine an uncertainty quantification result of the predicted value according to the confidence interval; wherein the uncertainty quantification result is used to characterize the reliability of the predicted value.
[0044] Exemplarily, the data to be predicted is data representing the state of a physical system, including but not limited to spatiotemporal coordinates used to solve differential and partial differential equations, sparse monitoring signals, noisy monitoring signals, snapshot data of boundaries and variables, industrial simulation cloud maps, medical imaging data, meteorological observation data, or industrial inspection images. First, the data to be predicted, such as medical imaging data, is acquired as the input basis for subsequent processing (this process can include preprocessing the medical imaging data, such as cropping and denoising, and then converting the medical imaging data into a two-dimensional matrix). Second, the data is input into a physical-aware neural network model, which calculates the expectation (predicted value) and variance of each layer through moment transfer and outputs the final predicted value and target variance. The predicted value and target variance are then used to construct confidence intervals representing the uncertainty of the prediction. Finally, an uncertainty quantification result is generated based on the confidence interval, intuitively representing the reliability of the predicted value and assisting in decision-making.
[0045] In an embodiment of the present invention, since the traditional MC-dropout needs to perform tens to hundreds of forward propagation statistical distributions, the present invention uses a moment transfer calculation module to analyze the expectation and variance layer by layer in a single forward propagation, and the data processing flow only needs to be completed once, avoiding the linear growth problem of the number of sampling times and the amount of data in the traditional method, and is particularly suitable for real-time data flow scenarios. The present invention replaces the statistical method of Monte Carlo sampling with the analytical method of moment transfer calculation, fundamentally solving the problems of high computational time and large data processing volume caused by multiple forward propagations in the prior art, and is particularly suitable for real-time uncertainty quantification requirements in high-dimensional scientific computing scenarios. In addition, the present invention uses moment transfer calculation to replace repeated sampling, which improves data processing efficiency while ensuring the uncertainty quantification effect.
[0046] Specifically, in step S14, constructing a confidence interval based on the predicted value and the target variance includes: calculating a target standard deviation based on the target variance; calculating the product of the target standard deviation and a preset confidence coefficient to obtain a confidence deviation value; calculating the sum of the predicted value and the confidence deviation value to obtain an upper limit value, and calculating the difference between the predicted value and the confidence deviation value to obtain a lower limit value; and constructing a confidence interval with the upper limit value and the lower limit value.
[0047] For example, the width of the confidence interval directly reflects the uncertainty of the predicted value. The wider the interval, the higher the uncertainty and the less reliable the predicted value, and vice versa. Assume that the data to be predicted is medical imaging data, in the form of a two-dimensional matrix with dimensions of 512*512 pixels and a single-channel grayscale value range of 0~255. After data processing by the physical perception neural network model, assume that the model outputs a predicted value of 0.6 (indicating that there is a 60% probability that the pixel is a lesion area), and the output target variance is 0.04, and the confidence coefficient is 2. Then, taking the square root of the target variance, the target standard deviation is 0.2. Further calculation yields a confidence deviation value of 0.4, corresponding to an upper limit of 1.0 and a lower limit of 0.2. The confidence interval is [0.2, 1.0]. This confidence interval indicates that the predicted true value is most likely 0.6, but the confidence interval is wide, indicating that the model has high uncertainty in classifying the pixel.
[0048] In this embodiment of the present invention, confidence intervals provide a quantitative basis for decision-making. Through a rigorous statistical calculation process, the target variance is converted into a confidence interval, which intuitively presents the fluctuation range of the predicted value with clear upper and lower limits, accurately quantifying the prediction uncertainty and avoiding ambiguous statements. In addition, the calculation steps based on fixed formulas do not require complex iterations or large-scale sampling, and the computational complexity is low. In scenarios with high real-time requirements, confidence intervals can be quickly output, buying time for system decision-making and ensuring efficient system operation.
[0049] Specifically, the physical perception neural network model includes at least one moment transfer architecture; wherein each layer in the moment transfer architecture transfers the expected value and variance value backward, and each of the moment transfer architectures includes a linear layer, a normalization layer, an activation function layer and a dropout layer connected in sequence.
[0050] For example, see Figure 2 , Figure 2This is a schematic diagram of the framework of a physical-aware neural network (PINN) model provided by an embodiment of the present invention. The PINN model consists of an input layer, n moment transfer architectures, and a target linear layer. A target linear layer is provided at the end of the last moment transfer architecture, serving as the output layer. Its structure and purpose are identical to the linear layer in the moment transfer architecture. Because the training process of the PINN model incorporates physical laws as constraints, the target linear layer outputs the PINN model required by the present invention. Initial and boundary conditions may also be included. Initial and boundary conditions are a core concept in the problem of determining the unique solution to partial differential equations. Specifically, they can be decomposed into initial conditions and boundary conditions. These conditions force the network input and output to conform to the initial and boundary conditions. This allows the neural network to incorporate physical laws, avoid purely data-driven bias, and improve the physical rationality of predictions. It should be noted that the initial and boundary conditions are preset during model training based on the data used to solve differential and partial differential equations. The setting process can refer to existing techniques and is not specifically limited in this invention.
[0051] The physical perception neural network model uses the second expectation output by the target linear layer as the predicted value and the second variance output by the target linear layer as the target variance, thereby outputting the predicted value and the target variance. The following detailed description is given for each layer in the moment transfer architecture:
[0052] 1) The linear layer uses a weight matrix and a bias to perform a linear transformation on the first expectation and the first variance of the input, and outputs a second expectation and a second variance; wherein the first expectation is the distribution mean of the data to be predicted, and the first variance is the distribution variance of the data to be predicted.
[0053] Exemplarily, the linear layer serves as a basic transformation layer, performing a linear combination on the input data and outputting a new feature representation, providing a processing foundation for subsequent layers. After data processing, the data to be predicted obtains its corresponding first expectation and first variance. For example, when the data to be predicted is medical imaging data, after grayscale normalization and region of interest extraction, the average grayscale value is calculated to obtain the first expectation, and the degree of dispersion of grayscale values within the neighborhood is calculated to obtain the first variance. The first variance is used to characterize the degree of dispersion of local texture in the image.
[0054] For example, assuming that the first expectation of the data to be predicted is , the first variance is , then the second expectation and the second variance The calculation process satisfies the following formula:
[0055] (1);
[0056] (2);
[0057] in, is the weight matrix, is the weight matrix The transposed matrix of For bias.
[0058] Furthermore, the first variance can be a covariance matrix. In the moment transfer calculation of the neural network, the first variance is expanded into a covariance matrix, which can capture the dependency between variables and make the uncertainty propagation more in line with physical laws. When calculating the statistics of the output of a certain layer of the neural network, the output of the layer can be regarded as multiple random variables (the output of each neuron). The covariance matrix of these variables reflects the correlation between them, and in Dropout, whether the neuron is discarded is random. Therefore, in actual calculations, if it is assumed that the neurons are independent of each other, the covariance matrix degenerates into a diagonal matrix. Then, only the diagonal elements of the covariance matrix need to be calculated. These diagonal elements are the variance of each neuron's output, which can simplify the calculation process. Finally, the covariance matrix passes through the weight matrix. After the linear transformation of , it reflects the covariation relationship between the output variables.
[0059] 2) The normalization layer uses a normalization parameter to perform normalization calculation on the second expectation and the second variance input, and outputs a third expectation and a third variance.
[0060] For example, the normalization layer normalizes the output of the linear layer and standardizes the data distribution, thereby accelerating data processing and improving stability. Difference with third party The calculation process satisfies the following formula:
[0061] (3);
[0062] (4);
[0063] in, are the first network parameter and the second network parameter, respectively, which play the role of scaling offset; are the expectation coefficient and variance coefficient, respectively, which play a normalization role; Together they constitute the normalization parameter; is a fixed constant used to prevent the denominator in the formula from being 0.
[0064] 3) The activation function layer uses an activation function to perform a function operation on the input third expectation and the third variance, and outputs a fourth expectation and a fourth variance.
[0065] Exemplarily, the activation function is a smooth function capable of high-order derivatives to meet the computational requirements of the physical law constraints. Such smooth functions include, but are not limited to, Sigmoid, Tanh, or Swish functions. The activation function layer introduces nonlinearity to the output of the normalization layer, enabling the network to learn complex patterns through a series of expectation and variance calculations. The ReLU function is currently the most common activation function in deep learning due to its ability to effectively prevent vanishing gradients. However, its application to physically aware neural networks (PINNs) has significant limitations. This is because PINNs embed partial differential equation models into the loss function, and these models often contain high-order derivatives. Using ReLU as an activation function causes the network's high-order derivatives with respect to the input variables to degenerate to zero. Therefore, the ReLU function is not suitable for network architectures trained based on physical information, such as PINNs. Taking the Sigmoid function as an example, due to its smoothness and high-order derivative properties, the Sigmoid function is more suitable for PINNs. Therefore, the present invention generalizes the moment transfer of the Sigmoid activation function to PINNs.
[0066] For example, when the output data of the normalization layer is subjected to the Sigmoid function, the following formula is satisfied:
[0067] (5);
[0068] Assume that the input , indicating input Obey the mean , the variance is The normal distribution of , = , that is, the input of the activation function layer is the data that meets the third and fourth expectations of the normalization layer output. Formula (5) shows that the Sigmoid function will input Mapped to the (0,1) interval.
[0069] Moments are statistics that describe the distribution of random variables. For example, the first-order moment is the expectation, the second-order central moment is the variance, and higher-order moments describe the shape of the distribution (skewness, kurtosis, etc.). In a neural network's moment propagation architecture, each layer processes moments of the input distribution. For example, linear layers, normalization layers, and activation function layers all update these moments. Therefore, since the input to each layer in the moment propagation architecture is the moments of the output distribution of the previous layer (such as the expectation and variance), layer operations (linear transformation, normalization, activation function) modify these moments, necessitating the derivation of these transformed moments. In neural networks, the input to the sigmoid function is typically a random variable (due to uncertainty introduced by weights and dropout). Direct integration of the activated variables can be very complex. However, introducing the logistic distribution transforms the problem into a moment derivation of probabilistic events. Therefore, utilizing the known moments of the logistic distribution (expectation and variance) avoids the complex integral of the sigmoid function and significantly reduces the mathematical complexity of moment derivation.
[0070] The present invention introduces random variables before deriving moment information , according to the logic ) The properties of the distribution are known, and the conditional expectation , conditional variance , conditional cumulative distribution function Satisfy the following formulas respectively:
[0071] (6);
[0072] (7);
[0073] (8);
[0074] Among them, the conditional expectation Indicates under conditions expectations.
[0075] Since the cumulative distribution function of the logistic distribution is formally related to the Sigmoid function, given hour, The conditional probability ≥0 is the Sigmoid function value, which satisfies:
[0076] (9);
[0077] Further we can get:
[0078] (10);
[0079] in, for expect; is the density function. In the context of moment transfer architecture, the density function Refers to the probability density function (PDF) of a random variable, which is used to describe the probability distribution of the output variables of each layer in the neural network. In the moment transfer architecture, the input and output of each layer are regarded as random variables, and their distribution is determined by the density function portrayal.
[0080] Using moment matching techniques, we can use To approximate ,therefore, , since the Gaussian distribution is its own conjugate prior, the marginal distribution can be inferred to satisfy the following formula:
[0081] (11);
[0082] Applying moment matching again, we get Approximate obedience , so that The expectation is converted into the Sigmoid function form about the mean and variance for subsequent calculation, that is, it satisfies the following formula:
[0083] (12);
[0084] in, Indicates that the input is Sigmoid function.
[0085] Next, consider the transformation of variance and use the following variance change formula for subsequent derivation. The variance change formula satisfies:
[0086] (13);
[0087] (14);
[0088] in, represents a random variable The variance, which measures Value and its expectation the degree of deviation; Represents the derivative of the Sigmoid function, that is The first derivative of the reaction The rate of change of formula (13) is based on the definition of variance. Characteristic analysis of form.
[0089] Using the moment matching technique, the expected value is 0 and the variance is The density function of the Gaussian distribution approximate The expectation satisfies the following formula:
[0090] (15);
[0091] Among them, formula (15) uses the moment matching technique to use the expected value of 0 and the variance of Gaussian distribution density function Approximation, calculation Expectations This step is to transform the complex integral operation into a processable form, and finally substitute it into the variance formula (13) to complete the Exact solution for variance.
[0092] make , easy to get function The extreme point for , To pass Taking the derivative and setting it to 0, we get the center of Taylor expansion. Taylor expansion is performed to obtain the following formula:
[0093] (16);
[0094] in, Express The derivative after the second-order derivative is the coefficient of the quadratic term in the Taylor expansion; Formula (16) means that Perform Taylor expansion and then perform approximate integral calculations, use simple distribution (Gaussian) to approximate complex distribution, and combine Taylor expansion to reduce the difficulty of dimensionality integration.
[0095] Again, using the moment matching technique, we can Converted into the form of Sigmoid function derivative to facilitate subsequent variance calculation, that is:
[0096] (17);
[0097] Among them, formula (17) is to convert Convert it into a form directly related to the derivative of the Sigmoid function so that it can be substituted into the variance formula.
[0098] Substituting it into the above variance change formula (13), we can get:
[0099] (18).
[0100] Further, This is the fourth expectation. This is the fourth variance.
[0101] 4) The drop layer performs random dropout according to the fourth expectation and the fourth variance using a preset dropout probability, and outputs a fifth expectation and a fifth variance.
[0102] For example, the dropout layer randomly discards some neuron data during data processing, and prevents overfitting by adjusting the expectation and variance, thereby enhancing generalization ability. (In line with expectations And the variance is The discard probability is , output ,in, In the Bernoulli distribution middle, is a discrete random variable that can only take two values: 0 or 1. The probability of , indicating a success event (in the dropout layer scenario, it can be understood as "retaining the input neuron information"); The probability of , represents a failure event (in the case of a dropout layer, this can be understood as “discarding input neuron information”). middle, For random control of input neurons Keep or discard: When hour, Retained and scaled ;when hour, Discarded, output This random dropout mechanism can effectively prevent the neural network from overfitting.
[0103] because and Independent, available , the fifth expectation and the fifth variance Satisfies the following formula:
[0104] (19);
[0105] (20);
[0106] in, The fourth expectation , The fourth variance , Formula (19) indicates that although the input random variable After random dropout, but through After scaling, the output Expectations and input The expectation of is equal; Formula (20) shows that according to the characteristics of Bernoulli distribution and variance operation rules, combined with the discard operation The influence of is derived, which reflects the probability of discarding Adjustment of output variance.
[0107] It should be noted that based on the above analysis, the analytical transmission form of neuronal moment information in common network architectures was obtained. On this basis, a moment transfer dropout network (characterized by MP-dropout) was constructed to replace the Monte Carlo simulation process of the MC-dropout method in the existing technology in the prediction stage, thereby achieving prediction acceleration.
[0108] In this embodiment of the present invention, the output statistics (expectation, variance / covariance) of each layer serve as the input statistical characteristics of the next layer. The expectation and variance of the linear layer output are input to the normalization layer, where new expectation and variance are calculated. These are then input to the Sigmoid activation function layer to derive the expectation and variance under nonlinear transformation. Finally, the dropout layer performs random dropout operations based on the input statistical characteristics and adjusts the output statistics. This layer-by-layer transmission of statistical characteristics ensures that within the moment transfer framework, the network can quantify and accumulate the uncertainty of each layer, ultimately outputting the predicted mean and confidence interval, and accurately characterizing the uncertainty of the entire network output.
[0109] Furthermore, during the training phase of the physical perception neural network model, it is necessary to retain the randomness of the discarded layer and the network weights, that is, to retain the discard probability. The moment transfer algorithm can analytically calculate the expectation and variance of the output in a single forward propagation without relying on multiple Monte Carlo samplings. It then calculates the neuron expectation and variance layer by layer, and finally outputs the predicted value and target variance to construct a confidence interval. That is, the expectation of the final output of the model is used as the predicted value, and the standard deviation is obtained by squaring the variance of the final output to construct the confidence interval.
[0110] Furthermore, the present invention provides an embodiment for predicting the temperature field of tumor hyperthermia in medical images (using a one-dimensional nonlinear Poisson equation):
[0111] In the planning of tumor hyperthermia treatment, it is necessary to accurately predict the temperature distribution generated by microwave radiation in biological tissues. The traditional method is based on the biological heat transfer equation (Pennes equation), but it has the following pain points: ① There are individual differences in tissue thermal physical parameters, and the measurement data is sparse and noisy; ② The dynamic changes in blood perfusion rate during treatment lead to model uncertainty; ③ The temperature field needs to be calculated in real time and the prediction reliability needs to be quantified to ensure treatment safety. The clinical value of the MP-dropout application provided by the present invention is to display the temperature distribution of the tumor core area (near x=0) in real time, and observe whether it is necessary to start adaptive temperature measurement verification based on the uncertainty area of the thermal physical parameters (confidence bandwidth). Consider the following heat transfer model:
[0112] (twenty one);
[0113] in, Represents tissue temperature distribution (i.e., data to be predicted, a physical quantity); It is the tissue thermal conductivity coefficient, which can be obtained by preoperative puncture measurement; The actual expression is , is the temperature The second-order partial derivative with respect to the spatial coordinate is used mathematically to characterize the rate of heat diffusion (the larger the second-order derivative, the faster the heat diffusion), and physically corresponds to the spatial rate of change of heat conduction; is the blood perfusion rate, which is a dynamically changing parameter; is a hyperbolic tangent function, which describes the nonlinear feedback of temperature on blood perfusion. When the temperature rises, the response of blood perfusion is nonlinear. is the microwave radiation heat source. The input data is the spatial coordinates , ∈[ 0.7,0.7] (corresponding to a tissue layer at a depth of 7 cm); boundary conditions , indicating that the skin temperature (corresponding to the boundary of 7 cm depth) satisfies: ( 0.7), (0.7).
[0114] During the experiment, the present invention obtained real-time data from 32 heat source observation points (measured by implantable fiber optic temperature sensors). To simplify the calculation, only numerical simulation was performed here, which is not required to conform to the actual situation. The physical information neural network (PINNs) was used to fuse "physical equation constraints" and "observation data" and combined with the dropout method to quantify the prediction uncertainty. The steps are as follows:
[0115] 1.1 Assume that the true temperature distribution is , then we can set the true solution to In tumor hyperthermia, the temperature distribution is affected by microwave heat generation, heat conduction, and blood perfusion, and will show multi-peak and nonlinear fluctuation characteristics. The time period can be shortened to π / 3, which can simulate rapid temperature fluctuations in local areas (such as the temperature gradient between the tumor edge and normal tissue). The cubic nonlinearity can enhance the "asymmetry" and "steep changes" of the waveform, simulating the nonlinear response of heat diffusion in biological tissues (such as the formation of a high-temperature zone in the core of a tumor). And set the remaining parameters: I don't know, ∈[ 0.7,0.7], 32 data points were obtained by intraoperative infrared temperature probe, and Gaussian noise was added. , simulating the noise characteristics of clinical measurements.
[0116] 1.2 Using these observation data, solve the tissue temperature distribution and quantify the uncertainty, adopt the idea of PINNs and use neural network to approximate ,Will Considered as a function whose input is spatial coordinates and output is temperature value, a neural network is used to approximate this unknown function, and according to formula (21) The proxy function is used to build a loss function based on the observed data to train the network. Since derivative calculation is involved, a smaller dropout probability is set, such as =0.01 to ensure training stability.
[0117] 1.3 Using 300 Monte Carlo simulations to quantify the uncertainty of the prediction results using MC-dropout and the MP-dropout provided by the present invention, the uncertainty of the prediction results is quantified, and the results are respectively Figure 3-4 result, Figure 3 This is a schematic diagram of the uncertainty quantification results of the physical perception neural network using the MC method provided by existing technology. Figure 4 This figure is a schematic diagram of the uncertainty quantification results of the physical perception neural network using the MP method provided in an embodiment of the present invention. The black solid line in the figure is the actual temperature distribution, representing the ideal prediction target; the black dashed line is the predicted mean (i.e., the average result of 300 Dropout samplings, reflecting the "best prediction" of the model); the gray area represents the ±2σ (standard deviation) range, representing the uncertainty interval (i.e., the confidence interval). The wider the width, the lower the credibility of the prediction.
[0118] For example, through Figure 3 and Figure 4It can be concluded that due to sparse and noisy data, model predictions are subject to various uncertainties, manifested as significant differences in errors across different intervals, with intervals with larger errors corresponding to wider confidence bands. This demonstrates that the proposed method has excellent error calibration capabilities and can reasonably reflect the uncertainty of model predictions. Furthermore, MP-dropout yields similar results to MC-dropout in networks using the Sigmoid activation function. This is because both MC-dropout (Monte Carlo Dropout) and MP-dropout simulate model uncertainty through random perturbations of the dropout method. The convergence of prediction results in the network is based on the theory that dropout is equivalent to ensembling multiple sub-models (the multiple sampling during inference is equivalent to training and ensembling multiple sub-models with similar structures). Therefore, the statistical laws of uncertainty (trends in mean and variance) are consistent. Furthermore, with few samples, model uncertainty primarily arises from ambiguity in parameter estimates, rather than differences in model structure. Therefore, the difference in uncertainty quantification between the two dropout methods is minimized.
[0119] Furthermore, the time overhead of MC-dropout stems from repeated computations of multiple random samplings, while MP-dropout circumvents this problem through optimization strategies. Therefore, MC-dropout, due to the multiple simulations of random sampling, has a higher time cost. This is because, with a small number of samples, MC-dropout requires more samples to "smooth" the uncertainty distribution. However, the number of samples is linearly correlated with time, leading to a sharp increase in time cost. Especially when there are relatively few sample points, the edges of the results are not smooth. That is, the uncertainty bands at the boundaries of MC-dropout appear "jagged," indicating large sampling fluctuations and poor stability. In contrast, MP-dropout maintains smooth confidence bands even with small samples and deep networks (e.g., using sigmoid activation, where gradients tend to vanish), demonstrating its greater robustness. This demonstrates that the present invention is effective in more complex network structures and has good versatility. Therefore, the MP-dropout proposed in this invention is more advantageous in complex networks and in small-sample scenarios, retaining the uncertainty quantification capabilities of dropout while addressing the data processing efficiency and stability issues of MC-dropout.
[0120] See also Figure 5 , Figure 5 1 is a structural block diagram of a data processing device 100 provided in an embodiment of the present invention, wherein the data processing device 100 includes:
[0121] A data acquisition module 11 is used to acquire data to be predicted;
[0122] a model processing module 12, configured to input the data to be predicted into a pre-trained physics-aware neural network model, wherein the training process of the physics-aware neural network model incorporates physical laws as constraints so that the physics-aware neural network model performs moment transfer calculations and outputs predicted values and target variances;
[0123] A confidence interval construction module 13, configured to construct a confidence interval based on the predicted value and the target variance;
[0124] The quantification result output module 14 is used to determine the uncertainty quantification result of the predicted value according to the confidence interval; wherein the uncertainty quantification result is used to characterize the reliability of the predicted value.
[0125] It is worth noting that the specific working process of each module in the data processing device 100 described in the embodiment of the present invention can refer to the working process of the data processing method described in the above embodiment, and will not be repeated here.
[0126] See also Figure 6 , Figure 6 2 is a block diagram of a data processing device 200 provided in an embodiment of the present invention. The data processing device 200 includes a processor 21, a memory 22, and a computer program stored in the memory 22 and executable on the processor 21. When the processor 21 executes the computer program, the steps of the above-mentioned data processing method embodiments, such as steps S11 to S14, are implemented.
[0127] Illustratively, the computer program may be divided into one or more modules / units, which are stored in the memory 22 and executed by the processor 21 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the data processing device 200.
[0128] The data processing device 200 may include, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that the schematic diagram is merely an example of the data processing device 200 and does not limit the data processing device 200. The data processing device 200 may include more or fewer components than shown, or may combine certain components or different components. For example, the data processing device 200 may also include input and output devices, network access devices, buses, and the like.
[0129] The processor 21 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. The processor 21 is the control center of the data processing device 200 and connects various parts of the entire data processing device 200 using various interfaces and lines.
[0130] The memory 22 can be used to store the computer programs and / or modules. The processor 21 implements the various functions of the data processing device 200 by running or executing the computer programs and / or modules stored in the memory 22 and accessing the data stored in the memory 22. The memory 22 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function or an image playback function); the data storage area may store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). Furthermore, the memory 22 may include high-speed random access memory (RAM) and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0131] If the modules / units integrated into the data processing device 200 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present invention can also implement all or part of the processes in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by the processor 21, the computer program can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, software distribution medium, etc.
[0132] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A data processing method, characterized in that: include: Acquiring data to be predicted; wherein the data to be predicted is medical imaging data or industrial inspection images; Inputting the data to be predicted into a pre-trained physics-aware neural network model, wherein the training process of the physics-aware neural network model incorporates physical laws as constraints so that the physics-aware neural network model performs moment transfer calculations and outputs predicted values and target variances; constructing a confidence interval based on the predicted value and the target variance; Determine an uncertainty quantification result of the predicted value according to the confidence interval; wherein the uncertainty quantification result is used to characterize the reliability of the predicted value; The physical perception neural network model includes at least one moment transfer architecture; each layer in the moment transfer architecture transfers the expected value and the variance value backward, and each moment transfer architecture includes a linear layer, a normalization layer, an activation function layer, and a dropout layer connected in sequence; The linear layer uses the weight matrix and bias to perform a linear transformation on the first expectation and the first variance of the input, and outputs the second expectation and the second variance, satisfying the following formula: (1); (2); in, is the weight matrix, is the weight matrix The transposed matrix of is bias; is the first expectation, which is the distribution mean of the data to be predicted; is the first variance, which is the distribution variance of the data to be predicted; For the second expectation; is the second variance; The normalization layer uses a normalization parameter to perform normalization calculation on the second expectation and the second variance of the input, and outputs a third expectation and a third variance, which satisfy the following formula: (3); (4); in, For the third expectation; For third party difference; are the first network parameter and the second network parameter, respectively, which play the role of scaling offset; are the expectation coefficient and variance coefficient, respectively, which play a normalization role; Together they constitute the normalization parameter; is a fixed constant used to prevent the denominator in the formula from being 0; The activation function layer uses an activation function to perform a function operation on the input third expectation and the third variance, and outputs a fourth expectation and a fourth variance; wherein the activation function is a smooth function that can perform high-order derivatives to meet the calculation requirements of the physical law constraints, and the smooth function is a Sigmoid function, a Tanh function, or a Swish function; The drop layer performs random dropout according to the fourth expectation and the fourth variance using a preset dropout probability, and outputs a fifth expectation and a fifth variance.
2. The data processing method according to claim 1, wherein: The physical-perception neural network model is provided with a target linear layer at the end of the last moment transfer architecture. The physical-perception neural network model uses the second expectation output by the target linear layer as the predicted value and the second variance output by the target linear layer as the target variance.
3. The data processing method according to claim 1, wherein: The constructing of a confidence interval according to the predicted value and the target variance includes: calculating a target standard deviation based on the target variance; Calculate the product of the target standard deviation and the preset confidence coefficient to obtain the confidence deviation value; Calculating the sum of the predicted value and the confidence deviation value to obtain an upper limit value, and calculating the difference between the predicted value and the confidence deviation value to obtain a lower limit value; A confidence interval is constructed using the upper limit value and the lower limit value.
4. A data processing device, characterized in that: include: A data acquisition module is used to acquire data to be predicted; wherein the data to be predicted is medical imaging data or industrial detection images; a model processing module, configured to input the data to be predicted into a pre-trained physics-aware neural network model, wherein the training process of the physics-aware neural network model incorporates physical laws as constraints so that the physics-aware neural network model performs moment transfer calculations and outputs predicted values and target variances; A confidence interval construction module, configured to construct a confidence interval based on the predicted value and the target variance; A quantification result output module, configured to determine an uncertainty quantification result of the predicted value according to the confidence interval; wherein the uncertainty quantification result is used to characterize the reliability of the predicted value; The physical perception neural network model includes at least one moment transfer architecture; each layer in the moment transfer architecture transfers the expected value and the variance value backward, and each moment transfer architecture includes a linear layer, a normalization layer, an activation function layer, and a dropout layer connected in sequence; The linear layer uses the weight matrix and bias to perform a linear transformation on the first expectation and the first variance of the input, and outputs the second expectation and the second variance, satisfying the following formula: (1); (2); in, is the weight matrix, is the weight matrix The transposed matrix of is bias; is the first expectation, which is the distribution mean of the data to be predicted; is the first variance, which is the distribution variance of the data to be predicted; For the second expectation; is the second variance; The normalization layer uses a normalization parameter to perform normalization calculation on the second expectation and the second variance of the input, and outputs a third expectation and a third variance, which satisfy the following formula: (3); (4); in, For the third expectation; For third party difference; are the first network parameter and the second network parameter, respectively, which play the role of scaling offset; are the expectation coefficient and variance coefficient, respectively, which play a normalization role; Together they constitute the normalization parameter; is a fixed constant used to prevent the denominator in the formula from being 0; The activation function layer uses an activation function to perform a function operation on the input third expectation and the third variance, and outputs a fourth expectation and a fourth variance; wherein the activation function is a smooth function that can perform high-order derivatives to meet the calculation requirements of the physical law constraints, and the smooth function is a Sigmoid function, a Tanh function, or a Swish function; The drop layer performs random dropout according to the fourth expectation and the fourth variance using a preset dropout probability, and outputs a fifth expectation and a fifth variance.
5. A data processing device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the data processing method according to any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 3.