A method and device for predicting disease outcome based on gating adaptive mechanism
By using a multi-layer GAT hybrid model and Gram angle field based on a gated adaptive mechanism, the problems of data sharing and feature complexity in the prediction of the outcome of chronic diseases in the elderly are solved, achieving higher accuracy in outcome prediction and diagnosis, and generating an intuitive outcome matrix.
Patent Information
- Application Number
- CN202411747695.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Existing technologies for predicting the prognosis of chronic diseases in the elderly suffer from problems such as difficulty in data collection, insufficient data sharing among different medical institutions, complex selection of features for coexisting multiple diseases, and model overfitting, resulting in poor performance on new data.
A multi-layer GAT hybrid model based on a gated adaptive mechanism is adopted, including a GATConv layer, an LSTMAggregation layer, and a gated adaptive feature fusion layer. The outcome matrix is generated by combining Gram angle field, and the outcome of the disease is predicted through feature correlation analysis and graph data augmentation.
It improves the accuracy and precision of disease outcome prediction, enables a better understanding of the intrinsic relationships between data, generates intuitive outcome matrices for diagnosis, and enhances the model's generalization and feature extraction capabilities.
Smart Images

Figure CN119694582B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and apparatus for predicting disease outcome based on a gating adaptive mechanism. Background Technology
[0002] With the accelerating aging of the global population, the proportion of the elderly is gradually increasing, leading to a rise in the incidence and mortality rates of chronic diseases among this population. Chronic diseases such as cardiovascular disease, diabetes, and chronic respiratory diseases have become major public health issues, placing enormous pressure on individual health, medical resources, and the socioeconomic system. Predicting the progression of chronic diseases allows for early intervention, improving patients' quality of life and reducing medical costs.
[0003] Predicting the disease outcome of elderly patients admitted to hospitals with chronic diseases involves analyzing patient information, including medical history, laboratory test results, lifestyle, and medical records, to conduct a risk assessment for each patient and predict their future disease progression. Based on the prediction results, personalized intervention and management plans are developed, including medication, lifestyle modifications, and regular monitoring.
[0004] With the development of technologies such as data analysis, artificial intelligence, and machine learning, researchers have proposed various prediction methods to address the problem of predicting the progression of chronic diseases. Chronic disease progression prediction can be categorized into statistical methods, AI-based methods, and deep learning-based methods. Statistical methods include logistic regression, linear regression, analysis of variance (ANOVA), and the Cox proportional hazards model. Traditional machine learning methods include support vector machines (SVM), decision trees, random forests, and the k-nearest neighbor algorithm (k-NN). Neural network-based prediction models include: feedforward neural networks (FNNs) suitable for regression and classification tasks, which can automatically extract data features; convolutional neural networks (CNNs) suitable for image data analysis, such as medical image processing, which can discover spatial features; and recurrent neural networks (RNNs) and long short-term memory (LSTMs) suitable for processing time series data, which can capture dynamic features that change over time.
[0005] However, while existing technologies for predicting the outcomes of chronic diseases in the elderly have made progress in many aspects, data collection on chronic diseases in elderly patients remains challenging, and data sharing among different medical institutions is insufficient. Furthermore, chronic diseases in the elderly often involve multiple factors (such as physiological, psychological, and social factors), with multiple chronic diseases coexisting, making feature selection and extraction complex. Traditional methods may struggle to capture the intricate interactions between variables; and complex models are prone to overfitting to training data, leading to poor performance on new data. Therefore, despite significant advancements in modern technology for medical diagnosis, many challenges remain in achieving model generalization, handling multiple coexisting diseases, and clinical application. Summary of the Invention
[0006] Therefore, it is necessary to provide a method and device for predicting disease outcome based on a gating adaptive mechanism to address the above-mentioned technical problems and improve the performance of the outcome prediction model.
[0007] Firstly, this application provides a method for predicting disease outcome based on a gating adaptive mechanism.
[0008] The method includes:
[0009] Acquire chronic disease-related data, perform feature correlation analysis based on the chronic disease-related data, generate graph data, and perform feature enhancement on the graph data;
[0010] Based on graph data, a multi-layer GAT hybrid model is used for prediction to obtain the time series of the transition state; the multi-layer GAT hybrid model includes several GATConv layers, several LTSMAggregation layers, and a gated adaptive feature fusion layer.
[0011] The time series of the transition states is output as a transition matrix using the Gram angle field.
[0012] In one embodiment, after acquiring chronic disease-related data, the method further includes: preprocessing the chronic disease-related data;
[0013] Preprocessing of chronic disease-related data includes:
[0014] Data cleaning and data filling are performed on chronic disease-related data based on expert prior knowledge.
[0015] Continuous feature data is standardized using Z-score.
[0016] One-hot encoding is performed on discrete feature data.
[0017] In one embodiment, performing feature correlation analysis based on chronic disease-related data, generating graph data, and performing feature enhancement on the graph data includes:
[0018] The KNN algorithm and Euclidean distance were used to transform chronic disease-related data into graph data;
[0019] Based on graph data, the node2vec algorithm is used for graph feature enhancement.
[0020] In one embodiment, in a multi-layer GAT hybrid model, several GATConv layers are cascaded, and each GATConv layer is connected to an LTSMAggregation layer corresponding to a GATConv layer. Each LTSMAggregation layer is connected to a gated adaptive feature fusion layer.
[0021] In one embodiment, chronic disease-related data includes historical statistics prior to admission and physiological indicators during hospitalization.
[0022] In one embodiment, the multi-layer GAT hybrid model further includes a fully connected layer connected to a gated adaptive feature fusion layer.
[0023] Secondly, this application also provides a disease outcome prediction device based on a gating adaptive mechanism. The device includes:
[0024] The data processing module is used to acquire chronic disease-related data, perform feature correlation analysis based on the chronic disease-related data, generate graph data, and perform feature enhancement on the graph data.
[0025] The model prediction module is used to predict the time series of the transition state based on graph data using a multi-layer GAT hybrid model. The multi-layer GAT hybrid model includes several GATConv layers, several LTSMAggregation layers, and a gated adaptive feature fusion layer.
[0026] The transformation matrix generation module is used to output the time series of transformation states as transformation matrices using Gram angle fields.
[0027] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the above-described method for predicting disease outcome based on a gating adaptive mechanism.
[0028] Fourthly, this application also provides a computer-readable storage medium. This computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps in the above-described method for predicting disease outcome based on a gating adaptive mechanism.
[0029] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps in the above-described method for predicting disease outcome based on a gating adaptive mechanism.
[0030] The aforementioned method and apparatus for predicting disease outcomes based on a gated adaptive mechanism acquires chronic disease-related data, performs feature correlation analysis on this data, generates graph data, and enhances the graph data's features. Based on the graph data, a multi-layer GAT hybrid model is used for prediction to obtain the time series of the outcome state. The multi-layer GAT hybrid model includes several GATConv layers, several LTSMAggregation layers, and a gated adaptive feature fusion layer. Gram angle fields are used to output the time series of the outcome state as a outcome matrix. This invention achieves graph-level global feature fusion through gating and attention mechanisms, giving the multi-layer GAT hybrid model powerful graph feature extraction capabilities and effectively improving the accuracy and precision of power prediction. Furthermore, the multi-layer GAT hybrid model is used to predict the outcome for each data point of each patient, and Gram angle fields are then used to generate the outcome matrix, facilitating further outcome analysis. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating a disease outcome prediction method based on a gating adaptive mechanism in one embodiment;
[0032] Figure 2 The figure below is a schematic diagram of the data structure in one embodiment;
[0033] Figure 3 This is a schematic diagram of the disease outcome prediction model structure of the gating adaptive mechanism in one embodiment;
[0034] Figure 4 This is a schematic diagram illustrating the calculation of attention coefficients in the GATConv layer in one embodiment;
[0035] Figure 5 This is a schematic diagram of multi-head attention calculation in the GATConv layer of one embodiment;
[0036] Figure 6 Here is a diagram of the internal structure of LSTMAggregation in one embodiment;
[0037] Figure 7 A visualization of the outcome matrix of two randomly selected patients in one embodiment;
[0038] Figure 8 This is a schematic diagram of the overall process of a disease outcome prediction method based on a gating adaptive mechanism in one embodiment. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0040] This application provides a method for predicting disease outcome based on a gating adaptive mechanism, such as... Figure 1 As shown, it includes the following steps:
[0041] Step 102: Obtain chronic disease-related data, perform feature correlation analysis based on the chronic disease-related data, generate graph data, and perform feature enhancement on the graph data.
[0042] This embodiment addresses the problem of predicting the progression of chronic diseases in the elderly. The raw data used can be provided by the hospital. The raw data includes historical statistical data upon admission and information on multiple physiological indicators during hospitalization. Some indicator information is shown in Tables 1 and 2, where Table 1 is a partial example of admission information and Table 2 is a partial example of physiological indicators during hospitalization.
[0043] Table 1 Admission Information
[0044]
[0045] Table 2 Physiological Indicators During Hospitalization
[0046] Serial Number Indicator characteristics Serial Number Indicator characteristics 1 Urea nitrogen 13 Hematocrit 2 glucose 14 platelets 3 hemoglobin 15 Antithrombin III 4 body temperature 16 breathe 5 systolic blood pressure 17 pulse 6 uric acid 18 Total cholesterol 7 Creatinine (enzymatic method) 19 Glycated hemoglobin 8 Blood oxygen partial pressure 20 Blood oxygen saturation_x 9 Actual body temperature and plasma pH value 21 C-Reactive Protein (Hypersensitive) 10 heart rate 22 neutrophil percentage 11 Albumin (bromocresol green method) 23 High-density lipoprotein cholesterol 12 Low-density lipoprotein cholesterol 24 fibrinogen
[0047] The original data also includes four discharge statuses: "improved", "not cured", "worsened" and "death". These discharge statuses are the outcome statuses.
[0048] First, data with high usability were selected from the raw data. Specifically, data with fewer missing values were selected from the physiological indicators during hospitalization, and these were combined with historical statistics at admission by patient number to select a total of several data points.
[0049] Next, correlation analysis of the indicators is performed. Specifically, each data point is treated as a graph, each indicator feature as a separate node, and the corresponding discharge status as the graph label. For edge construction, an unsupervised KNN algorithm is used to select associated nodes. Specifically, Euclidean distance is used to measure the similarity between indicator features; the Euclidean distance between each feature is calculated, and a smaller value indicates a stronger correlation between the two indicator features. Edges are established between each node and its k nearest neighbors, converting the feature sequence into a graph data representation. Graph representation learning can capture information about changes in physiological indicator conditions at different times, enhancing the representational power of the samples, helping the prediction model to understand the intrinsic relationships between data more deeply, intuitively representing the relationships between entities, and helping to discover hidden patterns in the data.
[0050] Next, feature enhancement is performed on the graph nodes. Specifically, the node2vec algorithm is used to generate node embedding vectors, which are then concatenated with the original node features. Node2vec is an efficient graph representation learning algorithm that aims to map nodes in a graph to vector representations in a low-dimensional space while preserving neighbor information within the graph structure. Using node2vec to enhance the features of graph nodes effectively reflects the connection patterns and distances between nodes in the original graph. The generated node embedding vectors capture the contextual information of the nodes, helping to improve the model's performance on downstream prediction tasks.
[0051] Step 104: Based on the graph data, a multi-layer GAT hybrid model is used to make predictions and obtain the time series of the transition state; wherein, the multi-layer GAT hybrid model includes several GATConv layers, several LTSMAggregation layers, and a feature fusion layer based on gating and adaptive.
[0052] The multi-layer GAT hybrid model is built using the Python programming language, the PyTorch framework, and the torch_geometric library. In this model, GATConv is a graph convolution operation based on a graph attention mechanism. By introducing an attention mechanism, it dynamically learns the interaction weights between nodes, adaptively determining the influence of neighboring nodes on the current node based on the relationship between the features of neighboring nodes and the features of the current node, thus more effectively capturing complex relationships in the graph structure. LSTMAggregation, as an aggregation mechanism, can be used in the message passing process in graph neural networks. It utilizes the capabilities of Long Short-Term Memory (LSTM) networks to aggregate information from neighboring nodes, thereby capturing the sequential dependencies between nodes. It can effectively handle long sequence data, selectively remembering or forgetting information at different positions in the sequence. This allows the aggregation mechanism to dynamically adjust the retention or forgetting of information based on the importance of neighboring nodes and contextual relationships, thereby improving the quality and flexibility of information aggregation. The gated adaptive feature fusion layer uses a gating mechanism to control the flow of information. Based on the importance of input features, it generates a weight vector, dynamically determining which features should be strengthened and which can be suppressed. It also calculates the similarity between features through an attention mechanism, focusing on the most relevant information. Finally, global features from different layers or models are combined to obtain richer information representations.
[0053] In one embodiment, several GATConv layers are cascaded. The output of each GATConv layer is aggregated using a separate LTSTMAggregation layer to gather global features from the entire graph. Then, the outputs of the corresponding LTSTMAggregation layers for each GATConv layer are input to a gated adaptive feature fusion layer to fuse information across multiple network layers. Finally, the fused information from multiple network layers is input to the fully connected output layer to obtain the final prediction result.
[0054] Due to the local perceptual nature of convolutional operations, they can encode the spatial relationships of input data. In a single-layer GATConv, each node can only interact directly with its first-order neighbors. However, in a multi-layer GATConv, as the number of layers increases, each node can indirectly exchange information with more distant neighbors. This means the model can consider broader neighborhood information, contributing to a better understanding of the global structure in the graph. By stacking multiple convolutional layers, the model can gradually extract higher-level feature representations, thus better understanding the input data. However, stacking network layers can lead to model degradation. To avoid model degradation and improve the model's predictive ability, a gated adaptive feature fusion layer, Fusion Block, was designed. Based on the idea of residual connections, it incorporates gated units and attention mechanisms to adaptively fuse graph-level features from different levels, enhancing the extraction of global features from the spatial graph and the graph representation learning ability.
[0055] Step 106: Use the Gram angle field to output the time series of the transition state as a transition matrix.
[0056] A multi-level GAT mixture model was used to predict the in-hospital data of each patient sequentially, resulting in a time series of outcomes for each data point of an individual patient. Then, Gramian Angular Field (GAF) was used to transform the time series of outcomes into a outcome matrix. Based on the outcome matrix, further analysis and prediction of outcomes can be performed. Gramian Angular Field (GAF) is a method for converting time series data into a matrix representation. It can pairwise combine data points in the time series, calculate the cosine of the angle between them, and represent the result as the element values of a matrix. The outcome matrix generated in this way, where the position and size of each element reflects the relationship between time series data points, can be used for image visualization and to reflect the structure, periodicity, and trends of time series data.
[0057] In one embodiment, after acquiring chronic disease-related data, the method further includes: preprocessing the chronic disease-related data; the preprocessing of the chronic disease-related data includes: cleaning and filling the chronic disease-related data based on expert prior knowledge; standardizing continuous feature data using Z-score; and one-hot encoding discrete feature data.
[0058] To improve data reliability, this embodiment preprocesses chronic disease-related data. Specifically, based on expert prior knowledge, it checks for missing or abnormal data in the chronic disease-related data, fills in missing values for each indicator with random normal values, and restores the patient's true data without affecting the severity of the condition. Simultaneously, it cleanses data that cannot be filled in. The cleaned and filled data are then standardized for both continuous and discrete data types.
[0059] For continuous features, Z-score standardization is performed, and the standardization formula is as follows:
[0060]
[0061] In the formula, X is the data to be standardized, μ is the mean of the data, σ is the standard deviation of the data, and Z is the result of normalization.
[0062] For discrete features, one-hot encoding is performed, which maps the target column to the target value 0 or 1.
[0063] In one embodiment, performing feature correlation analysis based on chronic disease-related data, generating graph data, and enhancing the graph data includes: converting chronic disease-related data into graph data using the KNN algorithm and Euclidean distance; and enhancing graph features based on the graph data using the node2vec algorithm.
[0064] This embodiment calculates feature correlation using Euclidean distance and constructs a correlation graph using KNN.
[0065] Graph feature enhancement specifically utilizes the node2vec graph representation learning model. In one feasible embodiment, this learning model specifies the embedding vector dimension as 16, meaning each node is represented as a 16-dimensional vector; specifies the step length of each random walk as 5, i.e., the number of steps moved on each node in the graph; specifies the number of random walks per node as 10, used to generate training samples; and specifies the number of worker threads used in parallel computation as 4, which can accelerate the computation process. The node2vec graph representation learning model is trained using graph data. Based on the trained node2vec graph representation learning model, node embedding vectors can be generated and concatenated with the original node features to complete graph feature enhancement. Figure 2 The diagram shows the specific structure of the graph data.
[0066] In one embodiment, the structure of the multi-layer GAT hybrid model is as follows: Figure 3 As shown, its construction and training process is as follows:
[0067] The graph data processed in step 102 is randomly divided into a training dataset and a test dataset, with 80% used as the training dataset and the remaining 20% used as the test dataset. Both the training dataset and the test dataset are derived from labeled data.
[0068] Taking a multi-layer GAT hybrid model with three GATConv layers as an example, three graph attention convolutional layers (conv1, conv2, conv3) are used to learn the attention weights of node features and enhance the model's representational power through a multi-head attention mechanism. Each GATConv layer accepts node features and edge indices as input and outputs updated node features. Figure 4 The diagram shown illustrates the calculation of attention coefficients in the GATConv layer. Figure 5 This is a schematic diagram of multi-head attention calculation for the GATConv layer.
[0069] The information flow process of the GATConv layer is as follows:
[0070]
[0071] Among them, W (1) ∈R m×l W (j) ∈R l×l (When j>1) represent the trainable weight matrices of the first to third GATConv layers respectively. These represent the outputs of the first to third GATConv layers, respectively.
[0072] By using graph attention mechanisms, the model can adaptively learn dependencies between nodes, assigning different attention weights to each node. This mechanism makes the model more effective at capturing the importance and neighborhood information of nodes in the graph, resulting in richer and more discriminative node representations. Multi-head attention mechanisms further enhance the model's ability to capture complex patterns. By learning representations of multiple relationships between nodes in parallel, features can be captured from different subspaces, increasing the model's expressive power.
[0073] By stacking multiple GATConv layers, feature representations at different scales are learned. Each layer can capture information from neighbors with different hop counts, enabling the model to integrate a wider range of contextual information and improve the expressive power of the features.
[0074] The activation function used in the GATConv layer is the non-linear activation function ReLU. The use of ReLU helps to maintain the non-linear expressive power of the network.
[0075] Corresponding to the multi-layer GAT hybrid model with three GATConv layers defined above, three LSTMAggregation layers (lstm_, lstm_2, lstm_3) are defined. Figure 6 This is a schematic diagram of the LTSMAggregation layer structure. Three LTSMAggregation layers aggregate information from the entire graph to capture global dependencies. Each LTSMAggregation layer accepts node features and a batch of data as input and outputs the global features of the graph.
[0076] The information flow process of the LSTMAggregation layer is as follows:
[0077]
[0078] in, These represent the outputs of the first to third LTMAggregation layers, respectively.
[0079] The LSTMAggregation global pooling layer can consider the order between nodes, effectively aggregating information from the entire graph. This is especially important for graph-structured data. Traditional pooling operations (such as average pooling or max pooling) typically only focus on extracting static features and cannot directly handle dynamic changes in the graph, nor can they capture the order information between nodes. Through LSTMAggregation, the model can dynamically learn the representation of global information in the graph, which is crucial for understanding the structure and feature distribution of the entire graph.
[0080] For traditional neural networks, simply increasing the number of layers often leads to problems like vanishing or exploding gradients during training, resulting in increasingly poor training performance. To address this, a gated adaptive feature fusion layer, the Fusion Block, was designed. Figure 3 As shown, it is based on the idea of residual connections and incorporates gating units and attention mechanisms to adaptively fuse graph-level features from different levels.
[0081] In the Fusion Block, three gate units are first used to adaptively weight features from different levels, followed by element-wise summation to obtain a feature vector V. Then, the feature vector V is input into a fully connected (FC) layer for linear transformation. Next, a Tanh activation function is added to map the input values to the interval [-1, 1], enhancing the non-linear representation of the features. Then, another FC layer is used to encode the attention scores of the features, followed by normalization using a Softmax function, converting the attention scores into a probability distribution matrix K. Finally, the attention probability matrix K is multiplied by each element of V to obtain a new graph-level feature matrix. This module fuses graph-level features from different levels, preserving and enhancing effective features from each level, effectively extracting global features, and enhancing the representation of key features. The feature vector V and the attention probability matrix K are obtained through the following equations:
[0082]
[0083] K = softmax(FC(tanh(FC(V))))
[0084] Where, ω j This represents three trainable parameters.
[0085] The multi-layer GAT hybrid model also defines a fully connected layer lin, which transforms the final aggregated features into a single output value for the final prediction. The output of the fully connected layer is:
[0086] pred = FC(V*K)
[0087] In one feasible embodiment, the feature dimension of the outputs from conv1 to conv3 is 3, the number of attention heads is defined as 8, and the activation function is ReLU. Furthermore, conv1 receives node input with 17 features, while conv2 and conv3 each receive node input with 24 features. The chosen non-linear activation function ReLU helps maintain the network's non-linear expressive power.
[0088] The input and output dimensions of lstm_1 to lstm_3 are both set to 24.
[0089] In the Fusion Block, the first fully connected layer has an input dimension of 24 and an output dimension of 24; the second fully connected layer has an input dimension of 24 and an output dimension of 1.
[0090] The input dimension of the fully connected layer lin is set to 24, and the output dimension is set to 1.
[0091] First, the data passes through conv1; its output is then input into conv2 and lstm_1; the output of conv2 is input into conv3 and lstm_2; and the output of conv3 is input into lstm_3. Next, lstm_1 to lstm_3 perform element-wise multiplication operations with gate units w1 to w3, and the results are input into the Fusion Block; finally, the data is input into lin for final prediction.
[0092] After constructing the multi-layer GAT hybrid model, train the model using the training set. In the forward pass of the neural network, set the loss function to CrossEntropyLoss. CrossEntropy loss assigns a higher loss value to samples with poor classification performance in the early stages of model training, thus accelerating the model's learning of difficult-to-classify samples; its calculation formula is as follows:
[0093]
[0094] Where N is the number of samples; M is the number of sample categories; y ic It is a sign function (0 or 1), taking 1 if the true class of sample i is equal to c, and 0 otherwise; p ic It is the probability that the i-th sample is predicted to belong to category c.
[0095] Neural networks use backpropagation to adjust parameters to improve performance; here, we set the optimizer to Adam. Compared to other optimizers, such as Adagrad and RMSProp, Adam has an adaptive learning rate mechanism, fewer hyperparameters, and can adaptively adjust gradients, making it simpler, more stable, and more efficient.
[0096] The model's accuracy, loss value, and the precision of the confusion matrix were evaluated using a test dataset. The target value was the patient's outcome status, and the model achieved an outcome prediction accuracy of 80%.
[0097] Classification accuracy is a crucial criterion for evaluating model performance. High accuracy indicates that the model correctly identifies most sample data, demonstrating strong classification and generalization abilities. The formula is as follows:
[0098]
[0099] Where TP represents the number of samples correctly predicted as positive, TN represents the number of samples correctly predicted as negative, FP represents the number of samples incorrectly predicted as positive, and FN represents the number of samples incorrectly predicted as negative.
[0100] Precision can be predicted as accuracy in positive samples, and its formula is:
[0101]
[0102] To illustrate the impact of the semi-supervised mode of this invention on overall performance, ablation experiments were conducted with different components. Without changing any parameters of the network model, two models were trained: one with a feature fusion layer and the other without. The accuracy and precision of the models were used as comparative indicators in the ablation experiments, and the results are shown in Table 3.
[0103] Table 3. Experimental comparison of the performance of the two models.
[0104] accuracy accuracy GAT Feature-Free Fusion 74% 70.05% GAT features fusion 82% 79.8%
[0105] As shown in Table 3, the model with the feature fusion layer has a significant improvement in both accuracy and precision.
[0106] In one embodiment, the specific process for generating the patient outcome matrix is as follows: Chronic disease-related data for each patient is extracted from the original dataset, arranged chronologically, and the patients with the largest datasets are selected for outcome matrix generation. Specifically, the data of each patient is sequentially input into a trained multilayer GAT hybrid model to obtain the time series of predicted outcome states. A Gramian Angular Field (GAF) is then used to transform the time series into an outcome matrix.
[0107] Construct an N×N Gram matrix G, where G(i,j) represents the cosine of the angle between data points xi and xj. Standardize the values of the Gram matrix G to the range [0,1]. Convert the standardized Gram matrix into a grayscale image matrix, with each pixel value corresponding to a value in the standardized Gram matrix. Use the GramianAngularField method from the pyts library to convert the transition state time series into a transition matrix, and visualize it using the matplotlib library. The final view is shown below. Figure 7 As shown.
[0108] This invention is the first to use a multi-layer GAT hybrid model in the task of predicting the outcome of chronic diseases in the elderly, and it has been tested on a dataset of inpatients with chronic diseases. Missing values of indicators are scientifically imputed based on expert experience; the KNN algorithm is used to analyze feature correlations and generate graph data representations, which helps to discover hidden patterns in the data; a node2vec graph representation learning model generates node embedding vectors, which are then concatenated with the original node features to enhance graph features. The node vectors obtained through node2vec capture the contextual information of the nodes, which helps to improve the model's performance on these tasks. The GAT hybrid model adopts a multi-layer structure, namely multiple graph attention convolutional layers, multiple LTMAggregation layers, and fully connected layers stacked together. The multi-layer structure can progressively extract higher-level feature representations, and the non-linearity and expressive power of the model are increased by stacking different layers. This invention comprehensively utilizes the advantages of graph attention networks and LTMAggregation, where GAT can effectively learn local graph features, while LTMAggregation aggregates node features to model global graph information. By combining them, the model can more comprehensively capture feature information in the outcome prediction task, improving the model's performance. Furthermore, the feature fusion strategy proposed in this invention helps the network better capture features and improves its learning ability. Through a gating unit-based attention mechanism, the model can adaptively adjust according to the importance of global features at different levels, achieving flexible feature fusion. This design enables the network to better utilize features extracted from different levels, improving model performance. Finally, the patient dynamic outcome matrix generated by Gram corner field can be used for image visualization, intuitively reflecting the structure, periodicity, and changing trends of patient outcome-related time series data.
[0109] like Figure 8 The diagram shown is an overall flowchart of the disease outcome prediction method based on gating adaptive mechanism disclosed in this invention.
[0110] This invention mainly includes three creative aspects: data processing, model building, and model application.
[0111] 1. Data processing methods combine expert prior knowledge with the KNN algorithm, distance metrics, and Node2Vec to process the data. The elderly chronic disease dataset used is the first to encompass four outcome states. This data processing method not only captures information about changes in physiological indicators at different times but also helps the predictive model to understand the intrinsic relationships between data points more deeply, improving the accuracy of data processing and the predictive ability of the model.
[0112] 2. The constructed multi-layer GAT hybrid model uses multiple GAT concatenations to extract neighbor information with different hop counts, and LTMAggregation aggregates global features from different levels, enhancing the model's feature extraction capability. A feature fusion strategy based on gated unit attention mechanism effectively alleviates the gradient vanishing problem common in deep networks, ensuring the stability and effectiveness of model training.
[0113] 3. This model is the first to be applied to predict the outcome of chronic diseases in the elderly, achieving comprehensive assessment and diagnosis of four outcome states and generating a GAF-based outcome matrix. This application fills a gap in the prediction of disease progression in diagnostic models for chronic diseases in the elderly and provides a new technical means for clinical practice.
[0114] The specific beneficial results of this invention are as follows:
[0115] The KNN algorithm analyzes correlations to generate graph data representations, improving information transmission efficiency and understanding depth. Graph feature enhancement captures the contextual information of nodes, strengthening graph structural features. A multi-layer GAT hybrid model is established, which not only captures both local and global graph features simultaneously but also avoids information loss and distortion during transmission in deep networks. A gating unit-based attention mechanism is proposed, enabling flexible global feature fusion. GAF is used to generate a outcome matrix, intuitively reflecting the changes in patient outcomes. These beneficial results enable the method to achieve high performance, assisting doctors in better understanding patients' disease conditions and designing more appropriate treatment plans.
[0116] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0117] Based on the same inventive concept, this application also provides a gating adaptive mechanism-based disease outcome prediction device for implementing the above-mentioned gating adaptive mechanism-based disease outcome prediction method. The solution provided by this device is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more gating adaptive mechanism-based disease outcome prediction device embodiments provided below can be found in the limitations of the gating adaptive mechanism-based disease outcome prediction method described above, and will not be repeated here.
[0118] In one embodiment, a disease outcome prediction device based on a gating adaptive mechanism is provided, comprising:
[0119] The data processing module is used to acquire chronic disease-related data, perform feature correlation analysis based on the chronic disease-related data, generate graph data, and perform feature enhancement on the graph data.
[0120] The model prediction module is used to predict the time series of the transition state based on graph data using a multi-layer GAT hybrid model. The multi-layer GAT hybrid model includes several GATConv layers, several LTSMAggregation layers, and a gated adaptive feature fusion layer.
[0121] The transformation matrix generation module is used to output the time series of transformation states as transformation matrices using Gram angle fields.
[0122] In one embodiment, the data processing module is further configured to preprocess chronic disease-related data; the preprocessing of chronic disease-related data includes: data cleaning and data filling of chronic disease-related data based on expert prior knowledge; Z-score standardization of continuous feature data; and one-hot encoding of discrete feature data.
[0123] In one embodiment, the data processing module is further configured to convert chronic disease-related data into graph data using the KNN algorithm and Euclidean distance; and to perform graph feature enhancement using the node2vec algorithm based on the graph data.
[0124] In one embodiment, in a multi-layer GAT hybrid model, several GATConv layers are cascaded, and each GATConv layer is connected to an LTSMAggregation layer corresponding to a GATConv layer. Each LTSMAggregation layer is connected to a gated adaptive feature fusion layer.
[0125] In one embodiment, chronic disease-related data includes historical statistics prior to admission and physiological indicators during hospitalization.
[0126] In one embodiment, the multi-layer GAT hybrid model further includes a fully connected layer connected to a gated adaptive feature fusion layer.
[0127] The modules in the aforementioned disease outcome prediction device based on gating adaptive mechanism can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0128] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in all of the above method embodiments.
[0129] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in all of the above method embodiments.
[0130] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in all of the above method embodiments.
[0131] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0132] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0133] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0134] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for predicting disease outcome based on a gating adaptive mechanism, characterized in that, The method includes: Acquire chronic disease-related data, perform feature correlation analysis based on the chronic disease-related data, transform the chronic disease-related data into graph data using the KNN algorithm and Euclidean distance, and perform graph feature enhancement based on the graph data using the node2vec algorithm; Based on the graph data, a multi-layer GAT hybrid model is used to predict and obtain the time series of the transition state. The multi-layer GAT hybrid model includes several GATConv layers, several LSTMAggregation layers, and a gated adaptive feature fusion layer. The several GATConv layers are cascaded, and each GATConv layer is connected to the LSTMAggregation layer corresponding to the GATConv layer. Each LSTMAggregation layer is connected to the gated adaptive feature fusion layer. The time series of the transition state is output as a transition matrix using the Gram angle field.
2. The method according to claim 1, characterized in that, After acquiring the chronic disease-related data, the method further includes: preprocessing the chronic disease-related data; The preprocessing of the chronic disease-related data includes: Data cleaning and data filling are performed on the chronic disease-related data based on expert prior knowledge. Continuous feature data is standardized using Z-score. One-hot encoding is performed on discrete feature data.
3. The method according to claim 1, characterized in that, The chronic disease-related data includes historical statistical data before admission and physiological indicators during hospitalization.
4. The method according to claim 1, characterized in that, The multi-layer GAT hybrid model also includes a fully connected layer connected to the gated adaptive feature fusion layer.
5. A disease outcome prediction device based on a gating adaptive mechanism, characterized in that, The device includes: The data processing module is used to acquire chronic disease-related data, perform feature correlation analysis based on the chronic disease-related data, convert the chronic disease-related data into graph data using the KNN algorithm and Euclidean distance, and perform graph feature enhancement based on the graph data using the node2vec algorithm. The model prediction module is used to predict the time series of the transition state based on the graph data using a multi-layer GAT hybrid model; wherein, the multi-layer GAT hybrid model includes several GATConv layers, several LSTMAggregation layers, and a gated adaptive feature fusion layer, the several GATConv layers are cascaded, and each GATConv layer is connected to the LSTMAggregation layer corresponding to the GATConv layer, and each LSTMAggregation layer is connected to the gated adaptive feature fusion layer; The transformation matrix generation module is used to output the time series of the transformation state as a transformation matrix using the Gram angle field.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Risk prediction method for chronic diseases and related equipment
CN115862842A
Network traffic matrix prediction method based on improved GAT and spatial-temporal characteristics
CN116668317A