Disease diagnosis prediction method and system based on graph neural network
By constructing a heterogeneous medical knowledge graph and a hierarchical graph attention network, combining incremental learning and distributed computing, multimodal data integration and computing efficiency problems are solved, and efficient and explainable disease diagnosis and prediction are achieved.
Patent Information
- Application Number
- CN202510429823.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-18
AI Technical Summary
The prior art has problems such as insufficient multimodal data integration capabilities, lack of dynamic adaptability and timeliness, poor interpretability of diagnostic results, and limited computing efficiency and scalability in disease diagnosis, especially when processing large-scale medical data, it is difficult to meet the real-time diagnostic needs.
A heterogeneous medical knowledge graph is constructed, adaptive node embedding algorithm and hierarchical graph attention network are adopted, and the graph structure and node characteristics are dynamically updated, and the association weight is allocated through the multi-head attention mechanism, and a distributed shard-aggregation architecture is used for efficient calculations.
It realizes the comprehensive integration of multi-dimensional data and timely diagnosis, improves the accuracy and interpretability of disease prediction, breaks through the computing bottleneck, supports real-time processing of the map of the scale of billions of nodes, and meets the hospital-level diagnosis needs.
Smart Images

Figure CN120340822A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence and medical diagnosis, and particularly to a disease diagnosis prediction method and system based on a graph neural network. Background Art
[0002] With the rapid development of medical informatization, traditional disease diagnosis technologies have gradually evolved from single clinical experience judgment to data-driven intelligent analysis. Existing technologies mainly rely on single types of data such as structured electronic medical records, medical images, or gene sequencing, and perform disease prediction through statistical models or deep learning algorithms. However, these methods still have significant limitations when dealing with complex clinical scenarios.
[0003] Firstly, the ability to integrate multi-modal data is insufficient. Existing technologies are difficult to effectively fuse multi-dimensional data such as patient signs, medical history, gene sequences, and environmental factors, resulting in one-sided diagnostic basis. Secondly, the lack of dynamic adaptability and timeliness. Existing models and knowledge graphs are usually trained based on static historical data and lack the ability to adapt to new cases and the dynamic evolution of the disease spectrum in real time. In addition, the interpretability of diagnostic results is poor. The black box characteristics of deep learning models lead to the lack of a traceable pathological association path for diagnostic results. It is difficult for doctors to understand the decision-making logic of AI models. Finally, the computational efficiency and scalability are limited. For the processing of large-scale medical data, existing technologies face computational resource bottlenecks. The inference efficiency of traditional graph models on graphs with hundreds of millions of node scales is low and cannot meet the real-time diagnosis requirements. The lack of a distributed computing framework further restricts its wide application in clinical practice. Summary of the Invention
[0004] The purpose of the present invention is to overcome the above problems and provide a disease diagnosis prediction method and system based on a graph neural network. To achieve the above purpose, the present invention adopts the following technical solutions:
[0005] A disease diagnosis prediction method based on a graph neural network, comprising the following steps:
[0006] Step S1, constructing a heterogeneous medical knowledge graph, integrating patient sign data, medical history records, gene sequences, medical image features, and environmental factors as multi-modal nodes, and constructing heterogeneous graph edges between nodes based on temporal relationships, pathological associations, and spatial distributions;
[0007] Step S2, using an adaptive node embedding algorithm to perform low-dimensional vector representation on the graph nodes, generating embedding vectors that fuse node attributes and topological structures;
[0008] Step S3, based on a hierarchical graph attention network, dynamically allocating association weights of different modal nodes through a multi-head attention mechanism, and aggregating high-order neighborhood information layer by layer;
[0009] Step S4: Dynamically update the topological structure and node features of the graph in combination with the incremental learning strategy, and implement the temporal evolution modeling of the graph based on timestamp marking;
[0010] Step S5: Input the multi-dimensional features of the patient into the trained graph neural network model, and output the disease risk probability and the interpretable results of the pathological association path.
[0011] Furthermore, in step S1, the multi-modal nodes are divided into patient entity nodes, symptom nodes, disease type nodes, drug nodes, and environmental factor nodes; the definition of the heterogeneous graph edges adopts a quadruple, including a source node, a target node, a relationship type, and a weight coefficient, and the relationship type includes at least three of symptom-disease causal association, drug-gene action path, and imaging feature-pathology mapping;
[0012] The calculation of the weight coefficient is realized by the mutual information entropy algorithm, and the formula is:
[0013]
[0014] where I(X i ; X j ) represents the mutual information content between node X i and X j , H(X i , X j ) is the joint entropy, N co is the co-occurrence frequency of the node pair, and N total is the total number of samples.
[0015] Furthermore, in step S2, the adaptive node embedding algorithm includes the following steps:
[0016] Step S21: Define the node walking strategy, and generate a node sequence based on the improved Node2Vec framework;
[0017] Among them, the calculation formula for the return parameter p is:
[0018]
[0019] where σ(·) is the Sigmoid function, and d med is the median of the node degrees in the current graph;
[0020] The dynamic adjustment formula for the exploration parameter q is:
[0021] q = 1 + ln(1 + βt)
[0022] where β is the time decay factor, and the value range is β ∈ [0.1, 0.5], and t is the time interval between adjacent data collection times;
[0023] Step S22: Generation of node embedding vectors. The Skip-Gram model is used to train the random walk sequence, and the embedding dimension d satisfies:
[0024]
[0025] where K is the total number of node types in the graph spectrum, denotes rounding up;
[0026] Step S23: Optimization of the embedding representation. The loss function is designed as:
[0027]
[0028] where is the reconstruction loss based on negative sampling, and the calculation formula is:
[0029]
[0030] is the set of positive node pairs, N neg is the number of negative samples, h i , h j is the embedding vector of node v i , v j ; λ is a hyperparameter that controls the strength of the orthogonal constraint, and the value range is λ ∈ [0.01, 0.1].
[0031] Furthermore, in step S3, the hierarchical graph attention network includes primary attention layer calculation, high-order information aggregation, and multi-head attention fusion;
[0032] The primary attention layer calculation dynamically allocates the association weights between nodes through the multi-head attention mechanism, and the attention coefficient is calculated as:
[0033]
[0034] where is the trainable weight matrix, is the attention vector, and ∥ represents vector concatenation;
[0035] The high-order information aggregation uses residual connections to fuse the neighborhood information layer by layer. The output of the node in the l-th layer is:
[0036]
[0037] where σ is a non-linear activation function, preferably the ReLU or GELU function, and W (l) is the trainable parameter matrix of the l-th layer;
[0038] The multi-head attention fusion sets the number of heads The attention weights are calculated independently for each head, and the output vectors of each head are concatenated and then reduced to the original dimension d′ through a linear transformation. The formula is:
[0039]
[0040] Among them, is the output transformation matrix.
[0041] Furthermore, in step S4, the incremental learning strategy includes setting a sliding time window, optimizing the embedding of new nodes, and dynamically updating the edge weights;
[0042] The setting of the sliding time window defines a dynamically updated time window T w , and the calculation formula is:
[0043] T w = max(24h, τ·t avg )
[0044] Among them, τ is the case addition rate coefficient, and the value range is τ ∈ [0.5, 2.0], and t avg is the average diagnosis period of historical cases;
[0045] The optimization of the embedding of new nodes preserves the local structure of the embedding vector h new of the new node v new . The objective function is:
[0046]
[0047] Among them, is the set of neighbor nodes of the new node v n ew, γ is the sparsification coefficient, and the value range is γ ∈ [0.01, 0.1], and ||·||1 represents the L1 norm;
[0048] The dynamic update of the edge weights adjusts the edge weights based on the double exponential smoothing model, and the update formula is:
[0049]
[0050] Among them, α is the historical weight smoothing factor, β is the current data weight factor, and the value range is α, β ∈ [0.6, 0.9], and w i j h ist is the historical weight mean of the edge (v i , v j ), is the weight calculated within the current time window.
[0051] Furthermore, a disease diagnosis and prediction system based on graph neural network includes a multi-source data acquisition module, a heterogeneous graph construction module, an adaptive embedding module, a graph network computing engine, a dynamic update module, a disease prediction module, and a feedback optimization module; the multi-source data acquisition module is connected to the electronic health record system, the medical image database, and the wearable device, and is used to collect multi-modal data of patients; the heterogeneous graph construction module is connected to the multi-source data acquisition module, parses the data semantics, and generates a medical knowledge graph with time series labels; the adaptive embedding module receives the output of the heterogeneous graph construction module and performs node low-dimensional vector mapping; the graph network computing engine is connected to the adaptive embedding module and runs a hierarchical graph attention network for graph convolution calculation; the dynamic update module interacts with the graph network computing engine and updates the graph structure and node features based on streaming data; the disease prediction module receives real-time patient data and calls the trained graph network model to output the disease risk probability and the associated path; the feedback optimization module is connected to the disease prediction module and reversely optimizes the graph weights and model parameters according to the clinical diagnosis results.
[0052] Furthermore, the multi-source data acquisition module includes a natural language processing unit, an image feature extraction unit, and a time series alignment unit; the natural language processing unit uses the BioBERT model to extract symptom, disease, and drug entities from clinical texts; the image feature extraction unit generates a deep feature vector of medical images based on the 3D ResNet network, with a dimension of 2048; the time series alignment unit takes the patient's first visit time as the benchmark and establishes a time axis mapping relationship for multi-modal data.
[0053] Furthermore, the graph network computing engine adopts a sharding-aggregation architecture, and the sharding-aggregation architecture includes a graph sharding component, a distributed computing component, and a result aggregation component;
[0054] The graph sharding component divides the graph into multiple subgraphs based on the criterion that the modularity Q > 0.3, and the modularity calculation formula is:
[0055]
[0056] where A ij is the adjacency matrix element, k i is the degree of node v i , m is the total number of edges, and δ(c i , c j ) takes 1 when nodes v i and v j belong to the same subgraph, otherwise takes 0;
[0057] The distributed computing component performs subgraph graph convolution operations in parallel on multiple GPU nodes, and each GPU node is assigned at least one subgraph, and the nodes synchronize gradients through a high-speed network.
[0058] The result aggregation component fuses the calculation results of each sub - graph through a topology - distance - weighted attention mechanism, and the attention weight ω k The calculation formula is:
[0059]
[0060] where dist(G k , v target ) represents the topological distance between the sub - graph G k and the target node v target , and K is the total number of sub - graphs.
[0061] Furthermore, the disease prediction module includes a risk probability calculation unit, a pathological explanation unit, and a warning trigger unit; the risk probability calculation
[0062] unit outputs the disease occurrence probability as:
[0063]
[0064] where W p is the weight matrix, b p is the bias term, and h p atient (L) is the final embedding vector of the patient node;
[0065] The pathological explanation unit visually displays the key nodes and associated paths that affect the prediction result;
[0066] The warning trigger unit generates a hierarchical warning signal when P > θ, and the threshold θ is dynamically adjusted according to the disease type.
[0067] Furthermore, the feedback optimization module includes a difference measurement unit, a graph spectrum correction unit, and a model fine - tuning unit;
[0068] The difference measurement unit calculates the KL divergence between the prediction result and the true diagnosis:
[0069]
[0070] where y c is the true label distribution, is the prediction distribution;
[0071] The graph spectrum correction unit adjusts the relevant edge weights according to the KL divergence, and the correction amplitude is:
[0072]
[0073] where η is the learning rate;
[0074] The model fine-tuning unit adopts a contrastive learning strategy, using correctly diagnosed cases as positive samples and misdiagnosed cases with similar symptoms as negative samples.
[0075] The advantages of the present invention are as follows:
[0076] 1. By constructing a multi-modal heterogeneous medical knowledge graph, integrating multi-dimensional data such as patient signs, gene sequences, and medical images, and dynamically updating the graph structure and edge weights in combination with an incremental learning strategy, the present invention realizes the comprehensiveness and timeliness of disease diagnosis basis. The graph models complex relationships through multiple types of edges such as temporal relationships and pathological associations, the mutual information entropy algorithm quantifies the node dependence degree, and the double exponential smoothing model continuously optimizes the edge weights, breaking through the limitations of data isolation and static modeling of traditional methods, enabling the system to capture the dynamic evolution of the disease spectrum in real time and significantly improving the prediction accuracy for newly emerging diseases and complex cases.
[0077] 2. Through a hierarchical graph attention network and a multi-head attention mechanism, the present invention realizes deep feature learning and dynamic weight allocation of multi-modal data. The network aggregates high-order neighborhood information layer by layer through residual connections, dynamically adjusts the association weights of different modal nodes, and generates pathological association paths through attention coefficient visualization technology. This technology solves the black box problem of deep learning models, enabling doctors to intuitively understand the AI decision-making logic.
[0078] 3. Through a distributed sharding-aggregation architecture and an efficient computing engine, the present invention realizes real-time reasoning and clinical application of a knowledge graph with a scale of hundreds of millions of nodes. The system divides the graph into subgraphs based on the modularity criterion, breaks through the computing bottleneck through multi-GPU parallel computing and gradient synchronization technology, and the result aggregation component fuses the subgraph outputs by weighted topological distance. It shortens the single-case diagnosis response time from the minute level of traditional methods to the second level, supporting the daily diagnosis needs of tens of thousands of cases at the hospital level. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] The drawings forming a part of this application are used to provide a further understanding of this application, making other features, objectives, and advantages of this application more obvious. The schematic embodiments of the drawings of this application and their descriptions are used to explain this application and do not constitute an improper limitation of this application.
[0080] In the drawings:
[0081] Figure 1 is a flowchart of a disease diagnosis and prediction method based on a graph neural network in Embodiment 1.
[0082] Figure 2 is a schematic diagram of the node and edge relationships of a heterogeneous medical knowledge graph in Embodiment 1.
[0083] Figure 3 is a system architecture diagram of a disease diagnosis and prediction system based on a graph neural network in Embodiment 1.
[0084] Figure 4 It is a schematic diagram of the graph sharding-aggregation architecture of a disease diagnosis and prediction system based on a graph neural network in Embodiment 1.
[0085] Figure 5 It is a closed-loop flowchart of the feedback optimization module of a disease diagnosis and prediction system based on a graph neural network in Embodiment 1. Detailed implementation manners
[0086] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Usually, the components of the embodiments of the present invention described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.
[0087] The present invention will be described in detail and specifically below through specific embodiments to better understand the present invention. However, the following embodiments do not limit the protection scope of the present invention.
[0088] Embodiment 1
[0089] As Figures 1-5 shown, a disease diagnosis and prediction method based on a graph neural network includes the following steps:
[0090] Step S1: Construct a heterogeneous medical knowledge graph, integrate patient physical sign data, medical history records, gene sequences, medical image features, and environmental factors as multi-modal nodes, and construct heterogeneous graph edges between nodes based on temporal relationships, pathological associations, and spatial distributions;
[0091] Step S2: Use an adaptive node embedding algorithm to perform low-dimensional vector representation on the graph nodes, and generate embedding vectors that fuse node attributes and topological structures;
[0092] Step S3: Based on a hierarchical graph attention network, dynamically allocate association weights of different modal nodes through a multi-head attention mechanism, and aggregate high-order neighborhood information layer by layer;
[0093] Step S4: Combine an incremental learning strategy to dynamically update the topological structure and node features of the graph, and implement temporal evolution modeling of the graph based on timestamp marking;
[0094] Step S5: Input the multi-dimensional features of the patient into the trained graph neural network model, and output the disease risk probability and the interpretable results of the pathological association path.
[0095] By integrating multi-modal data such as patient signs, gene sequences, and medical images, a heterogeneous knowledge graph is constructed, and heterogeneous graph edges are constructed based on temporal relationships, pathological associations, etc., realizing the structured association of fragmented medical information and providing a data basis for multi-modal fusion diagnosis.
[0096] Further, in step S1, the multi-modal nodes are divided into patient entity nodes, symptom nodes, disease type nodes, drug nodes, and environmental factor nodes; the definition of the heterogeneous graph edge adopts a quadruple, including a source node, a target node, a relationship type, and a weight coefficient, and the relationship type includes at least three of symptom-disease causal association, drug-gene action path, and imaging feature-pathology mapping;
[0097] The calculation of the weight coefficient is realized through the mutual information entropy algorithm, and the formula is:
[0098]
[0099] where I(X i ; X j ) represents the mutual information quantity between node X i and X j , H(X i , X j ) is the joint entropy, N co is the co-occurrence frequency of the node pair, and N total is the total number of samples.
[0100] By quantifying the dependence degree between nodes through the mutual information entropy algorithm and dynamically adjusting the edge weights, the objectivity of the graph structure is optimized and redundant associations are reduced, improving the recognition accuracy of the model for key pathological relationships.
[0101] Further, in step S2, the adaptive node embedding algorithm includes the following steps:
[0102] Step S21, define the node walking strategy, and generate a node sequence based on the improved Node2Vec framework;
[0103] where the calculation formula for the return parameter p is:
[0104]
[0105] where σ(·) is the Sigmoid function, and d med is the median of the node degrees in the current graph;
[0106] The dynamic adjustment formula for the exploration parameter q is:
[0107] q = 1 + ln(1 + βt)
[0108] Among them, β is the time decay factor, and its value range is β ∈ [0.1, 0.5], and t is the time interval between adjacent data collection times;
[0109] Step S22, generating node embedding vectors, training the random walk sequence using the Skip-Gram model, and the embedding dimension d satisfies:
[0110]
[0111] Among them, K is the total number of node types in the graph spectrum, represents rounding up;
[0112] Step S23, optimizing the embedding representation, and the loss function is designed as:
[0113]
[0114] Among them, is the reconstruction loss based on negative sampling, and the calculation formula is:
[0115]
[0116] is the set of positive node pairs, N neg is the number of negative samples, h i , h j is the node v i , v j 's embedding vector; λ is a hyperparameter that controls the strength of the orthogonal constraint, and its value range is λ ∈ [0.01, 0.1].
[0117] By combining the improved Node2Vec framework with the dynamic parameter adjustment strategy to generate node embedding vectors and introducing orthogonal constraints to optimize the low-dimensional representation, the balanced expression of the local and global structural features of the graph spectrum is realized, and the semantic discrimination of the embedding vectors is enhanced.
[0118] Furthermore, in step S3, the hierarchical graph attention network includes primary attention layer calculation, high-order information aggregation, and multi-head attention fusion;
[0119] The primary attention layer calculation dynamically allocates the association weights between nodes through the multi-head attention mechanism, and the attention coefficient is calculated as:
[0120]
[0121] Among them, is the trainable weight matrix, is the attention vector, and ∥ represents vector concatenation;
[0122] The high-order information aggregation uses residual connections to fuse the neighborhood information layer by layer, and the output of the node in the l-th layer is:
[0123]
[0124] Among them, σ is a non-linear activation function, preferably the ReLU or GELU function, and W (l) is the trainable parameter matrix of the l-th layer;
[0125] The multi-head attention fusion sets the number of heads of the multi-head attention mechanism Each head independently calculates the attention weights, and the output vectors of each head are concatenated and then reduced to the original dimension d' through a linear transformation. The formula is:
[0126]
[0127] Among them, is the output transformation matrix.
[0128] Through the multi-head attention mechanism of the hierarchical graph attention network, high-order neighborhood information is aggregated layer by layer, realizing the dynamic allocation of the association weights of different modality nodes, breaking through the shallow limitation of traditional graph convolution, and supporting deep feature learning.
[0129] Furthermore, in step S4, the incremental learning strategy includes a sliding time window setting, new node embedding optimization, and edge weight dynamic update;
[0130] The sliding time window setting defines a dynamically updated time window T w , and the calculation formula is:
[0131] T w = max(24h, τ·t avg )
[0132] Among them, τ is the case addition rate coefficient, and the value range is τ ∈ [0.5, 2.0], and t avg is the average diagnosis cycle of historical cases;
[0133] The new node embedding optimization preserves the local structure of the embedding vector h new of the new node v new . The objective function is:
[0134]
[0135] Among them, is the set of neighborhood nodes of the new node v n ew, γ is the sparsification coefficient, and the value range is γ ∈ [0.01, 0.1], and ||·||1 represents the L1 norm;
[0136] The edge weight dynamic update adjusts the edge weights based on the double exponential smoothing model, and the update formula is:
[0137]
[0138] Among them, α is the historical weight smoothing factor, β is the current data weight factor, and the value ranges of α and β are α, β ∈ [0.6, 0.9], w i j h ist is the historical weight mean of the edge (v i , v j ), and is the weight calculated within the current time window.
[0139] By continuously updating the graph structure and edge weights through a sliding time window and a double exponential smoothing model, the dynamic evolution ability of the knowledge graph is realized, adapting to the real-time changes of the disease spectrum and improving the prediction timeliness of new diseases.
[0140] Furthermore, a disease diagnosis and prediction system based on a graph neural network includes a multi-source data acquisition module, a heterogeneous graph construction module, an adaptive embedding module, a graph network computing engine, a dynamic update module, a disease prediction module, and a feedback optimization module; the multi-source data acquisition module is connected to an electronic health record system, a medical image database, and a wearable device for collecting multi-modal data of patients; the heterogeneous graph construction module is connected to the multi-source data acquisition module to parse data semantics and generate a medical knowledge graph with time series labels; the adaptive embedding module receives the output of the heterogeneous graph construction module and performs node low-dimensional vector mapping; the graph network computing engine is connected to the adaptive embedding module and runs a hierarchical graph attention network for graph convolution calculation; the dynamic update module interacts with the graph network computing engine to update the graph structure and node features based on streaming data; the disease prediction module receives real-time patient data and calls the trained graph network model to output disease risk probabilities and associated paths; the feedback optimization module is connected to the disease prediction module to reversely optimize the graph weights and model parameters according to clinical diagnosis results.
[0141] Through the system integration of modules such as multi-source data acquisition, heterogeneous graph construction, and graph network computing, the full-process automated processing from data acquisition to diagnosis and prediction is realized, reducing the cost of manual intervention and ensuring process standardization.
[0142] Furthermore, the multi-source data acquisition module includes a natural language processing unit, an image feature extraction unit, and a time series alignment unit; the natural language processing unit uses the BioBERT model to extract symptom, disease, and drug entities from clinical texts; the image feature extraction unit generates a deep feature vector of medical images based on a 3D ResNet network, with a dimension of 2048; the time series alignment unit establishes a time axis mapping relationship of multi-modal data based on the patient's first visit time.
[0143] By using the BioBERT model to extract clinical text entities, the 3D ResNet to generate image feature vectors, and establishing a temporal alignment relationship, the heterogeneity of multimodal data is resolved, providing a unified semantic basis for atlas construction.
[0144] Furthermore, the graph network computing engine adopts a sharding-aggregation architecture, and the sharding-aggregation architecture includes a graph sharding component, a distributed computing component, and a result aggregation component;
[0145] The graph sharding component divides the atlas into multiple subgraphs based on the criterion that the modularity Q > 0.3. The modularity calculation formula is:
[0146]
[0147] where A ij is the element of the adjacency matrix, k i is the degree of node v i , m is the total number of edges, and δ(c i , c j ) takes 1 when nodes v i and v j belong to the same subgraph, otherwise it takes 0;
[0148] The distributed computing component performs graph convolution operations on subgraphs in parallel on multiple GPU nodes. Each GPU node is assigned at least one subgraph, and gradients are synchronized between nodes through a high-speed network;
[0149] The result aggregation component fuses the calculation results of each subgraph through a topology distance weighted attention mechanism. The attention weight ω k calculation formula is:
[0150]
[0151] where dist(G k , v target ) represents the topological distance between subgraph G k and the target node v target , and K is the total number of subgraphs.
[0152] By dividing the atlas according to the modularity criterion and adopting a distributed parallel computing architecture, the efficient processing of an atlas with a scale of hundreds of millions of nodes is realized, breaking through the computing bottleneck and ensuring the response speed of real-time diagnosis and prediction.
[0153] Furthermore, the disease prediction module includes a risk probability calculation unit, a pathological explanation unit, and an early warning trigger unit; the risk probability calculation
[0154] unit outputs the disease occurrence probability as:
[0155]
[0156] Among them, W p is the weight matrix, and b p is the bias term, and h p atient (L) is the final embedding vector of the patient node;
[0157] The pathological interpretation unit visually displays the key nodes and associated paths that affect the prediction results;
[0158] The early warning trigger unit generates a hierarchical early warning signal when P > θ, and the threshold θ is dynamically adjusted according to the disease type.
[0159] By outputting the prediction result through the risk probability calculation unit and visualizing the pathological association path, the clinical interpretability of the AI diagnosis result is realized, the difficulty of doctor interpretation is reduced, and the decision-making transparency and accuracy are improved.
[0160] Furthermore, the feedback optimization module includes a difference measurement unit, a graph atlas correction unit, and a model fine-tuning unit;
[0161] The difference measurement unit calculates the KL divergence between the prediction result and the true diagnosis:
[0162]
[0163] Among them, y c is the true label distribution, is the prediction distribution;
[0164] The graph atlas correction unit adjusts the relevant edge weights according to the KL divergence, and the correction amplitude is:
[0165]
[0166] Among them, η is the learning rate;
[0167] The model fine-tuning unit adopts a contrastive learning strategy, using correctly diagnosed cases as positive samples and misdiagnosed cases with similar symptoms as negative samples.
[0168] By measuring the prediction deviation with KL divergence and adjusting the graph atlas weights, and combining the contrastive learning strategy to optimize the model parameters, a closed-loop optimization of the diagnosis result and the model is realized, and the prediction accuracy and adaptability of complex cases are continuously improved.
[0169] This embodiment realizes intelligent disease diagnosis and prediction through a five-stage process: First, integrate multi-modal data such as patient signs, genes, and images to construct a heterogeneous knowledge graph containing temporal relationships and pathological associations; then use an improved Node2Vec algorithm to generate low-dimensional embedding vectors that fuse node attributes and structural features; aggregate high-order neighborhood information layer by layer through a hierarchical graph attention network, and dynamically allocate multi-modal node weights; use a sliding time window and a double exponential smoothing model to update the graph structure and edge weights in real time to maintain the timeliness of the model; finally, input patient features to generate risk probabilities and visual pathological paths, and continuously improve the accuracy through a feedback optimization mechanism. This process breaks through the limitations of static modeling and isolated data of traditional methods, realizes multi-dimensional dynamic analysis, improves the diagnostic response speed and prediction accuracy, and provides efficient and interpretable intelligent support for clinical practice.
[0170] The specific embodiments of the present invention have been described in detail above, but they are only examples, and the present invention is not equivalent to the specific embodiments described above. For those skilled in the art, any equivalent modifications and substitutions made to the present invention are also within the scope of the present invention. Therefore, all equivalent transformations and modifications made without departing from the spirit and scope of the present invention should be covered within the scope of the present invention.
Claims
1. A disease diagnosis and prediction method based on graph neural network, characterized in that: It includes the following steps: Step S1: Construct a heterogeneous medical knowledge graph, integrate patient vital signs data, medical history records, gene sequences, medical image features, and environmental factors as multi-modal nodes, and construct heterogeneous graph edges between nodes based on temporal relationships, pathological associations, and spatial distributions; Step S2: Use an adaptive node embedding algorithm to perform low-dimensional vector representation on the graph nodes, and generate embedding vectors that fuse node attributes and topological structures; Step S3: Based on a hierarchical graph attention network, dynamically allocate the association weights of different modal nodes through a multi-head attention mechanism, and aggregate high-order neighborhood information layer by layer; Step S4: Combine an incremental learning strategy to dynamically update the topological structure and node features of the graph, and implement temporal evolution modeling of the graph based on timestamp marking; Step S5: Input the multi-dimensional features of the patient into the trained graph neural network model, and output the disease risk probability and the interpretable results of the pathological association path.
2. The disease diagnosis and prediction method based on graph neural network according to claim 1, wherein: In step S1, the multi-modal nodes are divided into patient entity nodes, symptom nodes, disease type nodes, drug nodes, and environmental factor nodes; the definition of the heterogeneous graph edge adopts a quadruple, including a source node, a target node, a relationship type, and a weight coefficient, and the relationship type includes at least three of symptom-disease causal association, drug-gene action path, and image feature-pathology mapping; The calculation of the weight coefficient is realized by the mutual information entropy algorithm, and the formula is: Among them, I(X i ; X j ) represents the mutual information between nodes X i and X j , H(X i , X j ) is the joint entropy, N co is the co-occurrence frequency of the node pair, and N total is the total number of samples.
3. A disease diagnosis and prediction method based on a graph neural network according to claim 1, characterized in that: In step S2, the adaptive node embedding algorithm includes the following steps: Step S21: Define a node walking strategy, and generate a node sequence based on an improved Node2Vec framework; Among them, the calculation formula for the return parameter p is: where σ(·) is the Sigmoid function, and d med is the median of the node degrees in the current graph; The dynamic adjustment formula for the exploration parameter q is: q = 1 + ln(1 + βt) Among them, β is a time decay factor, and the value range is β ∈ [0.1, 0.5], and t is the time interval between adjacent data collection times; Step S22: Generate node embedding vectors, train the walking sequence using the Skip-Gram model, and the embedding dimension d satisfies: where K is the total number of node types in the graph spectrum, denotes rounding up; Step S23: Optimize the embedding representation, and the loss function is designed as: Among them, is the reconstruction loss based on negative sampling, and the calculation formula is: is the set of positive node pairs, N neg is the number of negative samples, h i , h j is the embedding vector of node v i , v j ; λ is a hyperparameter that controls the strength of the orthogonal constraint, and its value range is λ ∈ [0.01, 0.1].
4. A disease diagnosis and prediction method based on a graph neural network according to claim 1, characterized in that: In step S3, the hierarchical graph attention network includes primary attention layer calculation, high-order information aggregation, and multi-head attention fusion; The primary attention layer calculation dynamically allocates the association weights between nodes through a multi-head attention mechanism, and the attention coefficient is calculated as: Among them, is a trainable weight matrix, is an attention vector, and || represents vector concatenation; The high-order information aggregation uses residual connections to fuse neighborhood information layer by layer, and the output of the node at the l-th layer is: Among them, σ is a non-linear activation function, preferably the ReLU or GELU function, and W (l) is the trainable parameter matrix of the l-th layer; The multi-head attention fusion sets the number of heads of the multi-head attention mechanism Each head independently calculates the attention weights, and the output vectors of each head are concatenated and then reduced to the original dimension d through a linear transformation ′ , and the formula is: Among them, is the output transformation matrix.
5. A disease diagnosis and prediction method based on a graph neural network according to claim 1, characterized in that: In step S4, the incremental learning strategy includes setting a sliding time window, optimizing the embedding of new nodes, and dynamically updating the edge weights; The sliding time window setting defines a dynamically updated time window T w , and the calculation formula is as follows: T w = max(24 h, τ · t avg ) Among them, τ is the coefficient of the new case increase rate, and its value range is τ ∈ [0.5, 2.0], and t avg is the average diagnosis period of historical cases; The above-mentioned new node embedding optimization performs local structure preservation on the embedding vector h new of the new node v new The objective function is as follows: Among them, is the set of neighborhood nodes of the newly added node v n ew, γ is the sparsification coefficient, and its value range is γ ∈ [0.01, 0.1], ||·||1 represents the L1 norm; For the dynamic update of the edge weights, the edge weights are adjusted based on a double exponential smoothing model, and the update formula is: Among them, α is the historical weight smoothing factor, β is the current data weight factor, and the value ranges of α and β are α, β ∈ [0.6, 0.9], w i j hist is the historical weight mean of the edge (v i , v j ), and is the weight calculated within the current time window.
6. A disease diagnosis and prediction system based on a graph neural network, characterized in that: It includes a multi-source data acquisition module, a heterogeneous graph construction module, an adaptive embedding module, a graph network computing engine, a dynamic update module, a disease prediction module, and a feedback optimization module; the multi-source data acquisition module is connected to the electronic health record system, the medical imaging database, and the wearable device for collecting multi-modal data of patients; the heterogeneous graph construction module is connected to the multi-source data acquisition module, parsing data semantics and generating a medical knowledge graph with time-series tags; the adaptive embedding module receives the output of the heterogeneous graph construction module and performs node low-dimensional vectorization mapping; the graph network computing engine is connected to the adaptive embedding module, running a hierarchical graph attention network for graph convolution calculation; the dynamic update module interacts with the graph network computing engine to update the graph structure and node features based on streaming data; the disease prediction module receives real-time patient data and calls the trained graph network model to output disease risk probabilities and associated paths; the feedback optimization module is connected to the disease prediction module, reversely optimizing the graph weights and model parameters according to clinical diagnosis results.
7. The disease diagnosis and prediction system based on graph neural network according to claim 6, wherein, The multi-source data acquisition module includes a natural language processing unit, an image feature extraction unit, and a time-series alignment unit; the natural language processing unit uses the BioBERT model to extract symptom, disease, and drug entities from clinical texts; the image feature extraction unit generates a deep feature vector of medical images based on the 3D ResNet network, with a dimension of 2048; the time-series alignment unit establishes a time-axis mapping relationship of multi-modal data based on the patient's first visit time.
8. The disease diagnosis and prediction system based on graph neural network according to claim 6, characterized in that, The graph network computing engine adopts a sharding-aggregation architecture, and the sharding-aggregation architecture includes a graph sharding component, a distributed computing component, and a result aggregation component; The graph sharding component divides the graph into multiple subgraphs based on the criterion that the modularity Q>0.3, and the modularity calculation formula is: Among them, A ij is an adjacency matrix element, k i is the degree of node v i , m is the total number of edges, δ(c i , c j ) takes 1 when nodes v i and v j belong to the same subgraph, otherwise it takes 0; The distributed computing component performs graph convolution operations on subgraphs in parallel on multiple GPU nodes, with at least one subgraph assigned to each GPU node, and gradients are synchronized between nodes through a high-speed network; The result aggregation component fuses the calculation results of each sub-graph through a topology-distance weighted attention mechanism, and the attention weight ω k The calculation formula is as follows: Among them, dist(G k , v target ) represents the topological distance between the subgraph G k and the target node v target , and K is the total number of subgraphs.
9. A disease diagnosis and prediction system based on a graph neural network according to claim 6, wherein, The disease prediction module includes a risk probability calculation unit, a pathological explanation unit, and a warning trigger unit; the risk probability calculation unit outputs the disease occurrence probability as: Among them, W p is the weight matrix, b p is the bias term, and h p atient(L) is the final embedding vector of the patient node; The pathological explanation unit visually displays the key nodes and associated paths affecting the prediction results; The warning trigger unit generates a hierarchical warning signal when P>θ, and the threshold θ is dynamically adjusted according to the disease type.
10. The disease diagnosis and prediction system based on graph neural network according to claim 6, characterized in that, The feedback optimization module includes a difference measurement unit, a graph correction unit, and a model fine-tuning unit; The difference measurement unit calculates the KL divergence between the prediction result and the true diagnosis: where y c is the true label distribution, and is the predicted distribution; The graph correction unit adjusts the weights of relevant edges according to the KL divergence, and the correction amplitude is: where η is the learning rate; The model fine-tuning unit adopts a contrastive learning strategy, using correctly diagnosed cases as positive samples and misdiagnosed cases with similar symptoms as negative samples.
Citation Information
Cited By
Medical intelligent decision-making method based on Deepseek and time sequence causal knowledge graph
CN120636780A
Chronic disease progress pattern mining method and system based on time sequence co-disease network
CN120824036A
Chronic disease progression pattern mining method and system based on time-series comorbidity network
CN120824036B
Neural network hospital data association analysis system
CN120853893A
Intelligent management system for intelligent medical treatment and management method thereof
CN120853952A
