Diffusion model and causal optimization based graph neural network missing data imputation method
By employing a diffusion model and a causal optimization graph neural network approach, the problems of insufficient utilization of cross-feature information and inconsistency in imputation results are addressed, achieving efficient and stable missing data imputation and improving imputation accuracy and interpretability.
Patent Information
- Application Number
- CN202511631172.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-10
AI Technical Summary
Existing missing data imputation methods based on diffusion models have shortcomings in utilizing cross-feature information and in interpretability and consistency of imputation results. Furthermore, they are difficult to dynamically correct the deviation between the imputation results and the causal structure, leading to error accumulation or insufficient information utilization.
A graph neural network method based on diffusion model and causal optimization is adopted. The mask-aware diffusion module is used for shallow denoising, and the causal graph guides the graph neural network for cross-feature denoising, forming an iterative closed-loop process of causal discovery and causal guidance. The mask-aware diffusion module and the graph neural network are combined for self-supervised training to optimize the matching degree between the causal graph and the filling result.
It significantly improves the accuracy, stability, and interpretability of missing data imputation, ensures the smoothness of the temporal structure within a single variable and the consistency between variables, and improves the imputation effect by iteratively optimizing the matching degree between the causal graph and the imputation results.
Smart Images

Figure CN121092870B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data filling, in particular to a missing data filling method of a graph neural network based on a diffusion model and causal optimization. BACKGROUND
[0002] The diffusion model has become one of the core methods in the field of generative artificial intelligence in recent years, and is widely used in image generation, image restoration, super-resolution, and audio generation. The basic principle is to learn the ability to recover data from noise by constructing two stages of forward diffusion and backward generation.
[0003] In recent years, this method has gradually been applied to the missing value filling task of multi-dimensional time series data and table data to improve the accuracy of prediction using this data, where the table can be an electronic medical record table of a patient, and each column of the table is physiological data such as blood pressure, blood sugar, and heartbeat. The table can also be weather data, and each column of the table is wind speed, temperature, and air pressure. The multi-dimensional time series data and table data are trained using the observed partial data as conditional information to guide the diffusion model to fill in the missing part reasonably. In the inference process, the model starts from random noise and gradually generates the values of the missing part under the constraint of known observations, so that the final output not only meets the global statistical distribution but also maintains consistency with the known data.
[0004] In specific implementation, the diffusion filling method generally needs to solve two key challenges: one is how to use the observed data as a condition in the generation process to ensure consistency between the filled values and the original observations; the other is how to maintain the continuity of the time series and the correlation between multi-dimensional variables in the process of gradual generation. For this purpose, some methods introduce conditional constraints, feature extraction modules, or consistency constraint mechanisms in the forward noise addition and backward generation process to improve the accuracy and stability of the filling results. The combination of these technologies enables the diffusion model to exhibit better performance than traditional interpolation or probability-based modeling methods in the missing data filling task.
[0005] Although the existing missing data filling method based on the diffusion model is better than the traditional interpolation method in overall performance, it still has several key deficiencies. First, most methods only perform denoising filling within a single feature dimension, which can restore the smoothness of the local time series but cannot fully capture the dependency between different feature variables, resulting in insufficient utilization of cross-feature information. Second, although some methods introduce graph neural networks and other structures to enhance feature interaction, the learned dependency structure is mostly statistical correlation rather than real causal constraint, resulting in insufficient explanation and consistency in the filling results. Third, the current methods generally use single filling or limited forward inference, so the model cannot dynamically correct the deviation between the filling results and the causal structure during the generation process, which may eventually cause error accumulation or insufficient information utilization. SUMMARY
[0006] In view of the above problems in the prior art, the method for filling in missing data of a graph neural network based on a diffusion model and causal optimization provided by the present application solves the problems of insufficient use of cross-feature information and insufficient interpretability and consistency of filling results in the prior art.
[0007] To achieve the above-mentioned purposes, the present application adopts the technical solution of:
[0008] The present application provides a method for filling in missing data of a graph neural network based on a diffusion model and causal optimization, which comprises the following steps:
[0009] S1, extracting a missing index matrix of a data table with missing data, and dividing the data table into multiple time series according to feature variables;
[0010] S2, inputting each time series into a mask perception diffusion module respectively to fill in the missing data, and obtaining an initial denoising result;
[0011] S3, inputting the initial denoising result into a dynamic causal learning machine with time lag convolution based on an attention mechanism and a convolutional neural network structure, and obtaining a causal graph between the feature variables;
[0012] S4, inputting the initial denoising result as each node of a graph neural network, and then using the causal graph to guide the graph neural network to perform cross-feature denoising, and obtaining a reconstruction value of each initial denoising result;
[0013] S5, checking the missing index matrix, and filling in the missing values in the time series in step S1 using the numerical values in the reconstruction value of the initial denoising result, and obtaining new time series;
[0014] S6, judging whether the graph neural network converges, if yes, splicing all the new time series to obtain a data table after filling in the missing data, and if not, returning the new time series as the initial denoising result to step S3.
[0015] Further, step S3 further comprises:
[0016] S31, establishing a convolutional neural network for each initial denoising result, and assigning a trainable attention score to the initial denoising result ;
[0017] S32, setting the attention score of the initial denoising result to the learnable tensor of the convolutional neural network corresponding to the initial denoising result ;
[0018] S33, inputting the initial denoising result and all the remaining initial denoising results S34, training the corresponding convolutional neural network, and obtaining the initial denoising result after the training is completed S35, when all the initial denoising results S36, inputting the historical data of the final attention score corresponding to each of the remaining initial denoising results and the updated initial denoising result S37, judging whether the following condition is met:
[0019] S38, if the condition is met, storing the final attention score of the potential causal set into the causal graph, otherwise not storing.
[0020]
[0021] wherein, is the result of the semi-binary processing of the final attention score ; is a set threshold value; is a softmax function;
[0022] S35, when all the initial denoising results corresponding convolutional neural networks have completed steps S32-S34, performing mirror perturbation or translation perturbation on all the initial denoising results to obtain updated initial denoising results;
[0023] S36, inputting the historical data of the final attention score corresponding to the initial denoising result and the updated initial denoising result S37, performing forward propagation on the trained neural network corresponding to the initial denoising result to calculate the difference in prediction loss before and after the perturbation;
[0024] S37, judging whether the following condition is met: if yes, storing the final attention score of the potential causal set into the causal graph, otherwise not storing;
[0025] wherein, is the loss reduction amplitude of the neural network corresponding to the initial denoising result a from the first round to convergence on the initial denoising result b; is the rollback amplitude obtained by evaluating the neural network corresponding to the initial denoising result a on the updated initial denoising result b; is a significance coefficient;
[0026] S38、When all the updated initial denoising results perform step S36 and step S37, the final causal diagram is obtained.
[0027] Further, the method of using the causal diagram to guide the graph neural network to perform cross-feature denoising to obtain the reconstruction value of each initial denoising result comprises:
[0028] S41、According to the final attention score recorded in the causal diagram, the edge weight normalization coefficient is calculated:
[0029]
[0030] wherein, is the final attention score of the initial denoising result b to the initial denoising result a; is the corresponding edge weight normalization weight coefficient; is the softmax function for calculating the initial denoising result b; is the learnable temperature;
[0031] S42、The hidden state of the initial denoising result b and the initial denoising result a are mapped into edge messages through a message encoder and weighted summed to obtain :
[0032]
[0033] wherein, D is the total number of feature variables; is the value of the initial denoising result a at time step t in the Ith iteration; is the hidden state of the initial denoising result b at time step in the Ith iteration; is the MLP or 1×1 convolution;
[0034] S43、The is concatenated and injected into the GRU update equation with the initial denoising result a to obtain the node state and reconstruction value of :
[0035]
[0036]
[0037] wherein, [ ⋅, ⋅ ] represents vector concatenation; is the node state of ; is the hidden state of the initial denoising result a at time step in the Ith iteration; is the reconstruction value of the GRU to ; is the bias term for the output layer; GRU is a Gated Recurrent Unit; is an output mapping matrix, used to map the hidden state of a node to the reconstructed numerical space of the corresponding time step, thereby generating the final prediction output . .
[0038] Further, the graph neural network adopts the existing observation values in the initial denoising result for training, and after the training is completed, the missing parts in the initial denoising result are predicted;
[0039] When training the graph neural network, the reconstruction error of the observation position is the main supervision, and the mask weighted mean square error minimization is used as the loss function of the graph neural network :
[0040]
[0041] wherein, is a missing index matrix; is the square of the Euclidean norm (i.e., the two-norm in the square sense).
[0042] Further, the expression for judging whether the graph neural network converges is:
[0043]
[0044] wherein, , is the data table filled in the I and I-1 iterations at time step t; is a preset threshold; is the square of the Euclidean norm (i.e., the two-norm in the square sense).
[0045] Further, the mask-aware diffusion module adopts the observation values in the time series for training during training, and after the training is completed, the missing parts in the time series are predicted;
[0046] In the mask-aware diffusion module, in the diffusion process, the forward step gradually injects Gaussian noise into the a-th time series to obtain a series of noisy representations , t = 1, 2, 3... T is the time step, and T is the total number of time steps; the backward step is trained from the noisy representation to the denoising neural network:
[0047] ,
[0048] wherein, is the output value of the denoising neural network; is the parameter Masked perceptual denoising neural network; is a noisy representation of the time series a at time step t; is a missing index matrix is a complete slice of the time series a;
[0049] The masked perceptual diffusion module training process adopts a self-supervised paradigm:
[0050] is a complete slice of the time series a Randomly discards part of the data inside, forming a reserved mask and the supplementary mask : ;
[0051] Centered on the denoising target, minimize the denoising loss and the reconstruction loss :
[0052] ,
[0053] wherein, is a set standard value; is an initial denoising result of ; is the maximum value; is element-wise multiplication (Hadamard product); is the square of the Euclidean norm (i.e., the two-norm in the square sense); is the Euclidean norm.
[0054] Further, the set threshold value is adaptively determined by the maximum gap principle:
[0055] Sort the final attention scores in descending order, and calculate the difference value of all adjacent attention scores from left to right. Take the maximum value among all difference values as the maximum gap .
[0056] Further, the missing index matrix :
[0057] =
[0058] wherein, is the value corresponding to the time step t of the a-th time series .
[0059] Further, in step S35, each initial denoising result randomly performs mirror perturbation or translation perturbation:
[0060]
[0061] wherein, is the perturbed sample of the time series a at the t-th time step; is the sample value of the time series a corresponding to the original time series at the t-th time step; is the sample value of the time series a corresponding to the original time series at the t-th time step; is the sample value of the time series a corresponding to the original time series at the t-th time step. is the sample value of the time series a corresponding to the original time series at the t-th time step. Further, the data table is an electronic medical record table of a patient or a meteorological data table of an observation point; when being the electronic medical record table of a patient, the feature variables in the table are physiological data, at least including body temperature, heart rate, blood pressure and blood sugar; when being the meteorological data table of an observation point, the feature variables in the table are meteorological factors, at least including air temperature, wind power and direction, air pressure, humidity and rainfall.
[0062] The beneficial effects of the present application are: in the present scheme, firstly, shallow denoising is performed within the feature by using a diffusion model, and preliminary filling of the missing segment of a single variable is completed; then, in each round of circulation, causal structure learning is performed based on the filling result, and a causal graph of the causal relationship between different features is obtained; on this basis, deep denoising across features is realized through the guidance of the causal relationship, so as to further correct and improve the missing values; finally, the filling result updated by the graph neural network will be subjected to causal structure learning again, forming an iterative closed loop process of causal discovery-causal guided denoising.
[0063] The data filling performed by the present scheme not only guarantees the smoothness of the internal time series structure of a single variable, but also realizes consistency across variables through causal relationship constraints, and continuously optimizes the matching degree of the causal graph and the filling result through circulation iteration, significantly improving the accuracy, stability and interpretability of the filling.
[0064] BRIEF DESCRIPTION OF DRAWINGS
[0065] Figure 1 is a flowchart of the graph neural network missing data filling method based on diffusion model and causal optimization. DETAILED DESCRIPTION
[0066] The specific embodiments of the present application are described below to facilitate understanding of the present application by those skilled in the art, but it should be clear that the present application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the present application defined and determined by the appended claims, and all applications utilizing the concept of the present application are within the scope of protection.
[0067] Reference Figure 1 , Figure 1 A flowchart of a graph neural network missing data filling method based on a diffusion model and causal optimization is shown; as shown in FIG. 1, the method S includes steps S1-S6. Figure 1
[0068] In step S1, a missing index matrix of a data table with missing data is extracted, and the data table is divided into multiple time series according to feature variables, and the missing index matrix
[0069]
[0070] wherein, is the value of the a-th time series at the time step t.
[0071] In the present scheme, the data table can be an electronic case table of a patient or a meteorological data table of an observation point; it is not limited to these two kinds of data, as long as it can form a table and include multiple feature variables, such as financial data, which can also be used. When the electronic case table of the patient is used, the feature variables in the table are physiological data, at least including body temperature, heart rate, blood pressure and blood sugar; when the meteorological data table of the observation point is used, the feature variables in the table are meteorological factors, at least including air temperature, wind power and direction, air pressure, humidity and rainfall.
[0072] For ease of understanding, the present scheme gives an example of a data table as an electronic case table of a patient, and the specific reference table 1 is as follows.
[0073] Table 1 Electronic case table of a patient
[0074]
[0075] In step S2, each time series is input into a mask-aware diffusion module for missing data filling to obtain an initial denoising result.
[0076] In implementation, the present scheme preferably uses the observed values in the time series to train the mask-aware diffusion module, and after training, the missing places in the time series
[0077] are predicted.
[0078] In the mask-aware diffusion module, in the diffusion process, the forward step gradually injects Gaussian noise into the a-th time series to obtain a series of noisy representations t=1,2,3...T is the time step, and T is the total number of time steps; the reverse step is performed on the noisy representations un-training the denoising neural network:
[0079] ,
[0080] wherein, is an output value of the denoising neural network; is a mask-aware denoising neural network characterized by parameters is a noisy representation of the time series a at time step t; is a missing index matrix is a complete slice of the time series a in the missing index matrix
[0081] The mask-aware diffusion module training process adopts a self-supervised paradigm:
[0082] Part of the data is randomly discarded inside the complete slice to form a reserved mask and a complementary mask : ;
[0083] Centered on the denoising target, the denoising loss and the reconstruction loss are minimized:
[0084] ,
[0085] wherein, is a standard value set; is an initial denoising result of ; is a maximum value; is an element-wise multiplication (Hadamard product); is the square of the Euclidean norm (i.e., the two-norm in the square sense).
[0086] In the mask-aware diffusion module step, the present scheme performs shallow denoising on each time series separately, i.e., efficiently suppresses noise and fills in missing values within a single feature dimension to obtain an initial denoising result, thereby ensuring a reliable preliminary filling result at the local feature level. Subsequent steps perform cross-feature deep denoising and information transmission through the causal graph and GNN, and the combination of the two constitutes a hierarchical denoising framework, thereby achieving more accurate and robust missing value filling.
[0087] In step S3, the initial denoising result is input into a dynamic causal learning machine based on an attention mechanism and a time-lag convolution of a convolutional neural network structure to obtain a causal graph between feature variables.
[0088] In an embodiment of the present scheme, step S3 further comprises:
[0089] S31, a convolutional neural network is established for each of all the initial denoising results, and an attention mechanism is used for the initial denoising result An attention score is assigned ;
[0090] S32, the initial denoising result is set The attention score of the initial denoising result is set to the rest of the initial denoising results The learnable tensor of the corresponding convolutional neural network is set for the initial denoising result
[0091] S33, the historical time series of the initial denoising result and all the rest of the initial denoising results are input into the initial denoising result corresponding convolutional neural network for training, and the final attention score of the initial denoising result and each of the rest of the initial denoising results is obtained after the training is completed ;
[0092] S34, the final attention score is semi-binary processed , and the final attention score corresponding to >0 is stored to the potential causal set , and the expression is:
[0093]
[0094] wherein, the final attention score is semi-binary processed; is a set threshold; is a softmax function.
[0095] In implementation, the set threshold is adaptively determined by the maximum gap principle:
[0096] The final attention score is sorted in descending order, and the difference between all adjacent attention scores is calculated from left to right, and the maximum value in all differences is taken as the maximum gap .
[0097] S35, after the steps S32-S34 are performed on all the initial denoising results corresponding convolutional neural networks, mirror perturbation or translation perturbation is performed on all the initial denoising results to obtain updated initial denoising results
[0098] In step S35, each initial denoising result randomly performs a mirror perturbation or a translation perturbation:
[0099]
[0100] wherein, is the perturbed sample of the time series at the t-th time step; is the sample value of the time series a corresponding to the mirror perturbation (the value of the original time series at the t-th time step); is the sample value of the time series a corresponding to the parallel perturbation (the value of the original time series at the t-th time step).
[0101] S36, input the historical data and the updated initial denoising result corresponding to the initial denoising result to the trained neural network corresponding to the initial denoising result to perform forward propagation, and calculate the difference in prediction loss before and after the perturbation; S37, determine whether
[0102] is true, if yes, store the final attention score of the latent causal set in the causal graph, otherwise do not store; wherein,
[0103] is the loss reduction amplitude of the neural network corresponding to the initial denoising result a on the initial denoising result b from the first round to convergence; is the rollback amplitude obtained by the neural network corresponding to the initial denoising result a on the updated initial denoising result b; is the significance coefficient;
[0104] S38, when all the updated initial denoising results have performed steps S36 and S37, the final causal graph is obtained.
[0105] When causality is established, relying solely on correlation may lead to erroneous inferences in subsequent GNN model imputation due to spurious correlations or confounding factors. This approach, however, performs controllable phase shifts and mirroring on the time axis without altering the initial denoising result's numerical distribution and autocorrelation pattern. This reverses or shifts the local time sequence, ensuring the correlation amplitude structure (e.g., the absolute value of Pearson correlation) of the perturbed signal remains largely unchanged. This preserves statistical correlation while disrupting temporal causality, avoiding the problem of traditional random scrambling destroying both statistical correlation and discriminative power. This method better captures the data generation mechanism, guiding GNN models to make more reasonable and stable inferences in missing data imputation or prediction tasks.
[0106] In step S4, the initial denoising result is used as the input to each node of the graph neural network. Then, the causal graph guides the graph neural network to perform cross-feature denoising to obtain the reconstructed value of each initial denoising result.
[0107] In a preferred embodiment of this scheme, the method for using a causal graph-guided graph neural network to perform cross-feature denoising and obtain the reconstructed value of each initial denoising result includes:
[0108] S41. Calculate the edge weight normalization coefficients based on the final attention scores recorded in the causal graph:
[0109]
[0110] in, The final attention score of the initial denoised result b on the initial denoised result a; for The corresponding edge weight normalization coefficients; The softmax function is used to calculate the initial denoising result b; As a learnable temperature, its value is customized according to the actual situation, ensuring that stronger messages are transmitted only on strong causal edges, and naturally suppressing non-causal or weakly causal channels.
[0111] S42. Map the hidden state of the initial denoised result b and the initial denoised result a into edge messages through a message encoder and then sum them with weights to obtain the result. :
[0112]
[0113] Where D is the total number of feature variables; Let be the value of the initial denoising result 'a' at time step t during the I-th iteration; The time step during the I-th iteration The hidden state of the initial denoised result b; For MLP or 1×1 convolution;
[0114] S43, will The initial denoised result 'a' is concatenated with the denoised result 'a' and injected into the GRU update equation to obtain... Node status and reconstructed values:
[0115]
[0116]
[0117] Where [ ⋅, ⋅ ] denotes vector concatenation; for The node status; The time step during the I-th iteration The hidden state of the initial denoised result a; For GRU pair The reconstructed value; For the output layer's bias term; GRU is the gated recursive unit; The output mapping matrix is used to represent the hidden states of the nodes. The reconstructed numerical space is mapped to the corresponding time step, thereby generating the final prediction output. .
[0118] The graph neural network is trained using the existing observations in the initial denoising result, and then predicts the missing parts in the initial denoising result after training is completed.
[0119] When training a graph neural network, the reconstruction error of the observation position is used as the primary supervision, and the loss function of the graph neural network is the minimization of the mask-weighted mean square error. :
[0120]
[0121] in, This is a matrix with missing exponents; It is the square of the Euclidean norm (i.e., the quadratic norm in the sense of square).
[0122] In this scheme, cause-effect graphs optimize message passing in two ways: one is structure pruning. The edges are directly shielded in the forward pass to prevent non-causal leakage (the principle of causal discovery does not allow later events to affect earlier events), and the second is intensity modulation: Follow Monotonicity increases, giving strong causal channels greater say during aggregation, thus strictly constraining message routing and weighting within causally feasible topologies and strengths, significantly reducing miscommunication and oversmoothing caused by simple correlation.
[0123] In step S5, the missing index matrix is viewed, and the missing values in the time series in step S1 are filled in with the numerical values in the reconstruction values of the initial denoising result to obtain a new time series; specifically:
[0124] For the positions where the data table is initially missing, =0, the initial filled values are covered with the reconstruction values at the corresponding positions in the reconstruction values of the initial denoising result, and for the positions where there is no initial missing, =1, the original values are selected to remain unchanged, so that the specific state of the target feature vector at this iteration step can be obtained.
[0125] In step S6, it is judged whether the graph neural network converges, if yes, the data table after data filling is obtained by splicing all the new time series, otherwise, the new time series is returned to step S3 as the initial denoising result; wherein the expression for judging whether the graph neural network converges is:
[0126]
[0127] Wherein, 、 is the data table filled in at the I and I-1th iteration and time step t; is a preset threshold; is the square of the Euclidean norm (i.e., the two-norm in the square sense).
[0128] In order to verify the effectiveness of the graph neural network missing data filling method provided by the present scheme, the present scheme tests three actual medical public data sets in the prior art, specifically:
[0129] The present scheme performs experimental tests on three actual medical public data sets MIMIC-III, PhysioNet Challenge2012 and PhysioNet Challenge2019. Among them, MIMIC-III contains desensitization clinical data of patients in the emergency department and ICU of Beth Israel Deaconess Medical Center in Boston, USA. The public MIMIC-III (version 1.4) data set from Beth Israel Deaconess Medical Center covers patient data from 2001 to 2012. In the MIMICIII data set, the in-hospital mortality rate is selected as the downstream prediction task, and the death sample contains 3,265 records, and the survival sample has 27,579 records. PhysioNet Challenge2012 and 2019 use all original data for testing.
[0130] The application designs evaluation of missing value filling results, specifically: the missing data filling method (CaDIG) of the graph neural network filling method proposed in the scheme and the existing data filling methods zero padding, median padding, mean padding, forward padding, backward padding, KNN padding and MICE padding are used to fill the missing data in the data sets MIMIC-III, PhysioNet Challenge2012 and PhysioNet Challenge2019 respectively. The evaluation of the filling results can refer to Tables 2-4.
[0131] Table 2 Evaluation of missing value filling results on MIMICIII
[0132]
[0133] Table 3 Evaluation of missing value filling results on PhysioNet Challenge2012
[0134]
[0135] Table 4 Evaluation of missing value filling results on PhysioNet Challenge2019
[0136]
[0137] In Tables 2-4, MSE is the mean square error, used to measure the average square error between the filled value and the true value. The smaller the value, the higher the accuracy of the original data recovered by the filling method. The ratio of the CaDIG method represents the multiple of the MSE of the filling method in the column relative to the MSE of the CaDIG method. The ratio = MSE 方法 / MSE CaDIG ; the ratio is greater than 1, indicating that the error of the method is greater than CaDIG, that is, the performance is worse than CaDIG. The ratio is equal to 1, indicating that the performance of the method is the same as CaDIG. The CaDIG improvement rate represents the percentage of the performance improvement of CaDIG relative to the method. The improvement rate = (1-MSE CaDIG / MSE 方法 ) x 100%, the higher the value, the more significant the improvement of CaDIG compared to the method.
[0138] From the data in Tables 2-4, it can be seen that the method of the present scheme has higher accuracy in recovering the original data on the data sets MIMIC-III, PhysioNet Challenge2012 and PhysioNet Challenge2019, that is, the filling effect is the best, thereby verifying the effectiveness and accuracy of the missing data filling of the present scheme.
[0139] In summary, this scheme realizes deep denoising by combining shallow denoising of diffusion model with cross-feature repair guided by GNN of causal graph, and the causal graph is updated in the iteration, forming a two-way feedback mechanism with the filling results. This design not only improves the numerical accuracy and stability of filling, but also ensures the consistency of filling results and potential causal structure.
Claims
1. A method for missing data imputation of graph neural networks based on diffusion model and causal optimization, characterized in that, The method comprises the steps of: S1, extracting a missing index matrix of a data table with missing data, and dividing the data table into multiple time series according to characteristic variables; S2, inputting each time series into a mask-aware diffusion module respectively to fill in the missing data, and obtaining an initial denoising result; S3, inputting the initial denoising result into a dynamic causal learning machine with time lag convolution based on an attention mechanism and a convolutional neural network structure to obtain a causal graph between the characteristic variables; S4, inputting the initial denoising result as each node of a graph neural network, and then using the causal graph to guide the graph neural network to perform cross-feature denoising to obtain a reconstruction value of each initial denoising result; S5, checking the missing index matrix, filling in the missing values in the time series in step S1 with the numerical values in the reconstruction value of the initial denoising result to obtain new time series; S6, judging whether the graph neural network converges, if yes, splicing all the new time series to obtain a data table after data filling, otherwise, returning the new time series as the initial denoising result to step S3.
2. The diffusion model and causal optimization based graph neural network missing data imputation method according to claim 1, characterized in that, Step S3 further comprises: S31, respectively establish a convolutional neural network for all initial denoising results, and the attention mechanism is for the initial denoising results assign a trainable attention score ; S32, set the initial denoising result with the rest of the initial denoising result attention score for the initial denoising result learnable tensors of the corresponding convolutional neural network; S33、the initial denoising result of the historical time series and all the remaining initial denoising results input the initial denoising result corresponding convolutional neural network, and obtain the initial denoising result after training and the final attention score of each remaining initial denoising result ; S34, final attention score S34, final attention score >0 final attention score S34, final attention score S34, final attention score ; wherein, is the final attention score is the result of the half-binarization; is the set threshold value; is the softmax function; S35、when all initial denoising results After steps S32-S34 are performed on the corresponding convolutional neural network, mirror perturbation or translation perturbation is performed on all initial denoising results to obtain updated initial denoising results. S36, final attention score corresponding initial denoising result historical data and updated initial denoising result input initial denoising result forward propagation is performed on the corresponding trained neural network, and the difference in prediction loss before and after the disturbance is calculated; S37, Judgment If it holds true, then the final attention score of the potential causal set will be calculated. Store it in the cause-effect graph; otherwise, do not store it. wherein, is a loss reduction of the neural network corresponding to the initial denoising result a from the first round to convergence on the initial denoising result b; is a rollback amplitude evaluated by the neural network corresponding to the initial denoising result a on the updated initial denoising result b; is a saliency coefficient; S38、When all the updated initial de-noising results are executed, the final causal graph is obtained.
3. The diffusion model and causal optimization based graph neural network missing data imputation method according to claim 2, characterized in that, The method for using the causal graph to guide the graph neural network to perform cross-feature denoising to obtain the reconstruction value of each initial denoising result comprises: S41, calculating an edge weight normalization coefficient according to the final attention score recorded in the causal graph: ; wherein, is the final attention score of the initial denoising result b to the initial denoising result a; is the initial denoising result b; is the corresponding edge weight normalization weight coefficient; is the softmax function for calculating the initial denoising result b; is the learnable temperature; S42, mapping the hidden state of the initial denoising result b and the initial denoising result a into edge messages by a message encoder and obtaining a weighted sum of the edge messages : ; where D is the total number of characteristic variables; is the value of the initial denoising result a at time step t for the Ith iteration; is the value of the initial denoising result b at time step t for the Ith iteration; is the hidden state of the initial denoising result b; is an MLP or 1x1 convolution; S43、will with the initial denoising result a concatenated into the GRU update equation to obtain the node state and the reconstructed value: ; ; where [⋅, ⋅] denotes vector concatenation; is the node state of is the hidden state of the initial denoising result a at the time step is the reconstruction value of the GRU for is the bias term of the output layer; GRU is a gated recurrent unit; is the output mapping matrix. 4. The diffusion model and causal optimization based graph neural network missing data imputation method according to claim 3, characterized in that, The graph neural network is trained using the existing observation values in the initial denoising result, and then the missing parts in the initial denoising result are predicted after the training is completed; During training of the graph neural network, reconstruction error of the observation position is mainly supervised, and mask weighted mean square error minimization is used as the loss function of the graph neural network : ; wherein is the identity matrix; is the square of the Euclidean norm.
5. The diffusion model and causal optimization based graph neural network missing data imputation method according to claim 1, characterized in that, The expression for judging whether the graph neural network converges is: ; wherein , is the filled-in data table at the first and first-1 iteration time step t; is a preset threshold value; is the square of the Euclidean norm.
6. The diffusion model and causal optimization based graph neural network missing data imputation method according to any one of claims 1-5, characterized in that, The mask-aware diffusion module is trained using the observation values in the time series, and then the missing parts in the time series are predicted after the training is completed; In the mask-aware diffusion module, in its diffusion process, the forward step gradually diffuses the a-th time sequence Gaussian noise is injected to obtain a series of noisy representations , t=1,2,3...T is the time step, and T is the total number of time steps; the backward step is trained by the noisy representation to train the denoising neural network: ; wherein, is an output value of the denoising neural network; is a parameter mask-aware denoising neural network characterized by is a noisy representation of the time series a at time step t; is a missing index matrix is a complete slice of the time series a in The mask-aware diffusion module training process adopts a self-supervised paradigm: In the case of a slice Internal random discard of partial data, forming a retention mask With supplemental mask : ; centered on the denoising target, minimizing the denoising loss and the reconstruction loss : , ; wherein is a set standard value; is the initial denoising result; is taking the maximum value; is element-wise multiplication; is the square of the Euclidean norm; is the Euclidean norm.
7. The diffusion model and causal optimization based graph neural network missing data imputation method according to claim 2, characterized in that, the set threshold value Adaptive determination by maximum gap principle: ranking the final attention scores in descending order, calculating the difference between all adjacent attention scores from left to right, and taking the maximum value among all the differences as the maximum gap .
8. The diffusion model and causal optimization based graph neural network missing data imputation method according to claim 1, characterized in that, The missing index matrix : = ; wherein, is the a-th time series the value at time step t.
9. The diffusion model and causal optimization based graph neural network missing data imputation method according to claim 2, characterized in that, In step S35, each initial denoising result randomly performs mirror disturbance or translation disturbance: ; wherein, is a perturbed sample of the time series at the t-th time step; is a sample value of the time series a corresponding to the execution of the mirror perturbation; is a sample value of the time series a corresponding to the execution of the parallel perturbation.
10. The diffusion model and causal optimization based graph neural network missing data imputation method according to claim 1, characterized in that, The data table is an electronic case table of a patient or a meteorological data table of an observation point; when it is an electronic case table of a patient, the characteristic variables in the table are physiological data, at least including body temperature, heart rate, blood pressure and blood sugar; when it is a meteorological data table of an observation point, the characteristic variables in the table are meteorological factors, at least including air temperature, wind power and direction, air pressure, humidity and rainfall.
Citation Information
Patent Citations
Dynamic health adaptive monitoring method and system using artificial intelligence
CN119480112A
E-commerce intelligent operation monitoring and collaborative decision-making method based on big data analysis
CN119539920A