A method and device for predicting the risk of esophageal and gastric variceal bleeding.
By constructing a graph structure based on vascular structure and training a graph neural network model, the problems of high accuracy and cost in predicting the risk of esophageal variceal bleeding in existing technologies are solved, providing a low-cost and accurate prediction method that reduces patient suffering and medical expenses.
Patent Information
- Application Number
- CN202410014957.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2044-01-04
AI Technical Summary
Existing methods for determining the risk of esophageal variceal bleeding suffer from problems such as patient discomfort, poor accuracy, and high cost. Gastroscopy and HVPG testing are invasive and costly, while other non-invasive methods lack sufficient accuracy.
By constructing a graph structure based on human vascular structure and using a graph neural network model, the graph neural network model is trained based on medical data from multiple patients to predict the risk of varicose vein bleeding in the patients to be tested. This includes collecting patient information, vascular structure data, and tissue feature data, setting node features and labels, and training the graph neural network model for prediction.
It enables low-cost and accurate prediction of varicose vein bleeding risk, reduces the frequency of endoscopic examinations, lowers patient suffering and medical costs, and improves prediction accuracy.
Smart Images

Figure CN117831752B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of neural network technology, specifically to a method and device for predicting the risk of bleeding from esophageal and gastric varices. Background Technology
[0002] Esophageal varices are mainly caused by obstruction of venous return in local areas. Clinically, the most common type is lower esophageal varices, primarily caused by portal hypertension; the lesion spreading upwards is called ascending esophageal varices. Descending esophageal varices are caused by mediastinal and cervical diseases compressing the superior vena cava and upper esophageal veins, obstructing return, and the lesion gradually spreading downwards. It is important to note that esophageal varices are prone to bleeding, which can be very dangerous. If venous pressure increases further, coupled with friction from food during eating, the vein wall can rupture and bleed. Mild cases may cause dizziness, while more severe cases can lead to hematemesis, shock, or even death.
[0003] In existing technologies, the methods for determining the risk of esophageal variceal bleeding generally involve assessing and analyzing the patient's clinical data, mainly including the following approaches:
[0004] The first method involves gastroscopy, where a doctor identifies and assesses the risk of bleeding from varicose veins based on the examination results. However, gastroscopy is an invasive procedure, which is not only poorly tolerated by patients but also carries the risk of complications such as esophageal perforation, gastric perforation, and bleeding. The invasive nature of the procedure itself increases patient discomfort and increases the risk of varicose vein rupture and bleeding. In most cases, patients undergoing repeated gastroscopy monitoring do not progress to a high-risk stage of severe varicose veins, and they do not benefit from it, yet they endure the pain of repeated gastroscopy monitoring and bear additional examination risks and medical expenses.
[0005] The second approach is an alternative to gastroscopy, where physicians use the results to determine if further endoscopic examination is necessary. For example, hepatic venous pressure gradient (HVPG) measurement can be used to predict the risk of esophageal and gastric variceal rupture and bleeding. However, HVPG is an invasive procedure, expensive, and requires specialized personnel and equipment. Furthermore, the stability of its results is susceptible to interference from various factors such as body position, respiration, anesthetic drugs, and intrahepatic shunts. In addition, many scholars have proposed non-invasive methods to construct predictive models for esophageal and gastric variceal rupture and bleeding based on serum biomarkers, such as FIB-4 (Fibrosis Index Based on Four Factors), Lok score, APRI (Aspartate aminotransferase to platelet count ratio index), AAR (Aspartate aminotransferase to alanine aminotransferase ratio), VITRO score (Von Willebrand factor antigen / platelet ratio), etc.
[0006] Although there are alternative examination methods to gastroscopy in the existing technologies mentioned above, some of which are invasive and some are non-invasive, their examination costs are not lower than those of gastroscopy, and the examination results of existing alternative examination methods cannot provide physicians with intuitive and effective reference indicators, thus failing to meet clinical needs. Summary of the Invention
[0007] This application aims to address the problems of existing methods for determining the risk of esophageal variceal bleeding, such as patient discomfort, poor accuracy, and high cost, and proposes a method and device for predicting the risk of esophageal and gastric variceal bleeding.
[0008] The technical solution adopted by this application to solve the above-mentioned technical problems is:
[0009] In a first aspect, this application provides a method for predicting the risk of esophageal and gastric variceal bleeding, the method comprising:
[0010] Collect medical data related to the risk of esophageal variceal bleeding, including patient information, vascular structure data, tissue characteristic data, and corresponding esophageal and gastric variceal bleeding status of multiple patients;
[0011] Based on the vascular structure data, a graph structure is constructed for each patient. In the graph structure, the esophagus, stomach, liver, spleen, various veins and varicose vein locations, and patient information are each a node. The connection relationships between the esophagus, stomach, liver, spleen, various veins and varicose vein locations are the edges of the nodes. The node corresponding to the patient information is connected to other nodes respectively.
[0012] For each patient's corresponding graph structure, based on tissue feature data, corresponding node features are set on nodes other than those corresponding to patient information, and feature labels are set on corresponding nodes based on the esophageal and gastric variceal bleeding status. The feature labels are either high-risk labels or low-risk labels.
[0013] A graph neural network model is trained based on the established graph structure, and the risk of esophageal and gastric variceal bleeding in the tested patient is predicted based on the graph neural network model.
[0014] Furthermore, the veins include the superior esophageal vein, middle esophageal vein, inferior esophageal vein, left gastric vein, right gastric vein, short gastric veins, lesser curvature gastric vein, greater curvature gastric vein, portal vein, central vein, hepatic venules, splenic sinus veins, small splenic veins, main splenic vein, splenic portal vein, internal jugular vein, external jugular vein, subclavian vein, jugular vein, and cardiac veins.
[0015] Furthermore, the training method for the graph neural network model includes:
[0016] The graph structures corresponding to each patient are divided into training and testing sets, and the order of the graph structures in the training set is shuffled.
[0017] Repeatedly sample a predetermined number of graph structures from the shuffled training set, and train the graph neural network model based on the graph structures obtained from each sampling until the cross-entropy loss value converges.
[0018] Use the graph structure in the test set to verify whether the prediction accuracy of the trained graph neural network model meets the requirements. If it does, the training ends; otherwise, retrain or adjust the graph neural network model and retrain.
[0019] Furthermore, a graph neural network model is trained based on the graph structure obtained from each sampling, specifically including:
[0020] In each sampled graph structure, the graph neural network model randomly selects a certain number of neighboring nodes as target neighboring nodes for each central node;
[0021] For each central node, the node features of its corresponding target neighbor nodes are aggregated, and the aggregated features are concatenated with the node features of the central node to obtain the final node features of each central node and update the corresponding node representation.
[0022] Determine the cross-entropy loss function, calculate the cross-entropy loss value based on the cross-entropy loss function, and update the learnable parameters of the graph neural network model through backpropagation;
[0023] If the cross-entropy loss value does not converge, repeat the above steps to perform feature aggregation and splicing of multi-layer neighbor nodes for a preset number of times. If the cross-entropy loss value converges, the training ends.
[0024] Furthermore, the aggregation process of the node features of the target neighbor nodes and the concatenation process of the aggregated features with the node features of the center node are represented as follows:
[0025]
[0026] in, Let σ represent the node features of node v in layer (l+1), and let W represent the activation function. l This represents the weight matrix, and CONCAT represents the concatenation function. AGG represents the node features of node v at layer l. Let N(v) represent the node characteristics of the target neighbor node u, and let N(v) represent the set of target neighbor nodes of node v.
[0027] Furthermore, the expression for the cross-entropy loss function is as follows:
[0028] H(y,p)=-(ylog(p)+(1-y)log(1-p));
[0029] Where y represents the true feature label, p represents the probability output by the graph neural network model, and H(y, p) represents the cross-entropy loss value.
[0030] Furthermore, the prediction accuracy of the trained graph neural network model is verified using graph structures in the test set, specifically including:
[0031] Based on the trained graph neural network model, the probability of the feature label of the node corresponding to the location of the varicose vein in the patient is predicted for all graph structures in the test set. Based on the probability, it is determined whether varicose vein bleeding has occurred. If it has, it is determined as a positive example; otherwise, it is determined as a negative example.
[0032] Determine whether the corresponding patient actually experienced varicose vein bleeding; if so, it is considered a positive case; otherwise, it is considered a negative case.
[0033] The false positive rate and true positive rate of the graph neural network model are calculated based on the predicted varicose vein bleeding situation and the actual varicose vein bleeding situation. If the false positive rate is less than a first preset value and the true positive rate is greater than a second preset value, then the prediction accuracy of the graph neural network model is determined to meet the requirements.
[0034] Furthermore, the formula for calculating the false positive rate is as follows:
[0035]
[0036] Wherein, FPR represents the false positive rate, FP represents the number of false positive samples, a false positive means that the predicted result is positive and the actual result is negative, TN represents the number of true negative samples, and a true negative means that both the predicted result and the actual result are negative.
[0037] The formula for calculating the true positive rate is as follows:
[0038]
[0039] Wherein, TPR represents the true positive rate, TP represents the number of true positive samples (true positive means both the predicted result and the actual result are positive), and FN represents the number of false negative samples (false negative means the predicted result is negative and the actual result is positive).
[0040] Furthermore, based on the graph neural network model, the risk of varicose vein bleeding in the tested patient is predicted, specifically including:
[0041] Based on the medical data of the patient to be tested, a test graph structure is constructed. The test graph structure is then input into the classifier of the last layer of the graph neural network model to obtain the probability of the feature labels of the nodes corresponding to the varicose vein locations in the esophagus and gastric fundus of the patient to be tested.
[0042] Secondly, this application provides a device for predicting the risk of esophageal and gastric variceal bleeding, the device comprising:
[0043] The collection unit is used to collect medical data related to the risk of esophageal variceal bleeding. The medical data includes patient information, vascular structure data, tissue characteristic data and corresponding esophageal and gastric variceal bleeding status of multiple patients.
[0044] The construction unit is used to construct a graph structure for each patient based on the vascular structure data. In the graph structure, the esophagus, stomach, liver, spleen, various veins and varicose vein locations, and patient information are each a node. The connection relationships between the esophagus, stomach, liver, spleen, various veins and varicose vein locations are the edges of the nodes. The node corresponding to the patient information is connected to other nodes respectively.
[0045] The setting unit is used to set corresponding node features on nodes other than those corresponding to patient information based on tissue feature data for the graph structure corresponding to each patient, and to set feature labels on the corresponding nodes based on the esophageal and gastric variceal bleeding status. The feature labels are high-risk labels or low-risk labels.
[0046] The prediction unit is used to train a graph neural network model based on the set graph structure, and to predict the risk of esophageal and gastric variceal bleeding in the patient under test based on the graph neural network model.
[0047] The beneficial effects of this application are as follows: The method and device for predicting the risk of esophageal and gastric variceal bleeding provided in this application construct a graph structure based on human vascular structure data, and train a graph neural network model based on the graph structure of multiple historical cases. When it is necessary to predict the risk of variceal bleeding, it is only necessary to obtain the patient information, vascular structure data, and tissue feature data of the patient to be tested. The risk of esophageal and gastric variceal bleeding in the patient to be tested can be predicted based on the pre-trained graph neural network. The operation is simple and the cost is low. The prediction results can be directly used by physicians for reference. For example, physicians can give suggestions for further endoscopic examinations or regular follow-up examinations based on the prediction results and the patient's medical history. This improves the accuracy of predicting the risk of esophageal and gastric variceal bleeding, avoids excessive endoscopic examinations, reduces patient suffering and medical expenses, and avoids the additional risks brought by endoscopic examinations. Attached Figure Description
[0048] Figure 1 A flowchart illustrating a method for predicting the risk of esophageal and gastric variceal bleeding provided in an embodiment of this application;
[0049] Figure 2 This is a schematic diagram of a graph structure provided in an embodiment of this application;
[0050] Figure 3 This is a schematic diagram of another graphical structure provided in an embodiment of this application;
[0051] Figure 4 This is a schematic diagram of a device for predicting the risk of bleeding from esophageal and gastric varices, provided in an embodiment of this application. Detailed Implementation
[0052] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0053] In some of the processes described in the specification and the above figures of this application, there are multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order in which they appear herein or may be executed in parallel. The sequence numbers of the operations, such as 101, 102, etc., are only used to distinguish the different operations and do not represent any execution order.
[0054] The technical solution of this application embodiment is applicable to application scenarios that require prediction of the risk of esophageal and gastric variceal bleeding in patients to be tested.
[0055] Currently, there are two main methods for determining the risk of esophageal and gastric variceal bleeding: one is gastroscopy, which is an invasive procedure that not only causes patient discomfort but also carries the risk of variceal rupture and bleeding, making it a high-risk and costly procedure. The other method assesses the risk of esophageal and gastric variceal bleeding using hepatic venous pressure gradients or serum markers, but this method still suffers from being complex, costly, and lacking in accuracy.
[0056] Based on this, the technical solution of this application is proposed. In the embodiments of this application, medical data related to the risk of esophageal and gastric variceal bleeding are collected. A graph structure is constructed for each patient based on vascular structure data. Corresponding node features are set on nodes other than those corresponding to patient information based on tissue feature data. Feature labels are set on corresponding nodes based on the esophageal and gastric variceal bleeding status. The feature labels are high-risk labels or low-risk labels. A graph neural network model is trained based on the constructed graph structure, and the risk of esophageal and gastric variceal bleeding in the patient is predicted based on the graph neural network model. That is, by taking various sites and veins as key nodes and setting node features or node labels for each node, a graph structure of the patient is established. Then, based on the graph neural network model, the association between different nodes in the graph structure is learned, thereby realizing the prediction of node labels. Physicians can give suggestions for further endoscopic examinations or regular follow-up examinations based on the prediction results and the patient's medical history. Compared with the prior art, the embodiments of this application can directly predict the risk of bleeding from esophageal and gastric varices, improve the accuracy of determining the risk of bleeding from varices, help confirm whether further endoscopic examination is needed, reduce the frequency of endoscopic examination, and thus reduce the painful examination costs for patients.
[0057] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0058] Please see Figure 1The method for predicting the risk of esophageal and gastric variceal bleeding provided in this application includes the following steps:
[0059] Step 101: Collect medical data related to the risk of esophageal variceal bleeding. The medical data includes patient information, vascular structure data, tissue characteristic data and corresponding esophageal and gastric variceal bleeding status of multiple patients.
[0060] In practical applications, patient information can include patient gender, age, medical history, lifestyle habits, etc. Vascular structure data can include the connections between blood vessels, such as branching and flow direction, and the location of variceal veins. Tissue characteristic data can include the medical radiomics characteristics and biomarkers of each node (tissue), such as blood flow velocity and vascular pressure. Based on the patient's case data or gastroscopy results, it can be determined whether subsequent bleeding from variceal veins will occur, thus identifying the extent of esophageal and gastric variceal bleeding.
[0061] Step 102: Construct a graph structure for each patient based on the vascular structure data. In the graph structure, the esophagus, stomach, liver, spleen, various veins and varicose vein locations, and patient information are each a node. The connection relationships between the esophagus, stomach, liver, spleen, various veins and varicose vein locations are the edges of the nodes. The node corresponding to the patient information is connected to other nodes respectively.
[0062] In this embodiment of the application, based on the patient's vascular structure data, the nodes in the graph structure are first determined, then the connection relationships between each node are determined, and finally the label features of each node are determined, thereby completing the construction of the graph structure.
[0063] The nodes in the graph structure specifically include:
[0064] 1. Esophagus: The esophagus is a tubular structure connecting the mouth and stomach, mainly divided into three parts: superior, middle and inferior. The veins in the esophagus mainly include the superior esophageal veins, the middle esophageal veins, and the inferior esophageal veins. In this embodiment, the esophagus itself, the superior esophageal veins, the middle esophageal veins, and the inferior esophageal veins are each taken as a node. If there are varices in the esophagus, each varices in the esophagus is taken as a node.
[0065] 2. Stomach: The veins in the stomach mainly include five parts: the left gastric vein, the right gastric vein, the short gastric veins, the lesser curvature veins, and the greater curvature veins. In this embodiment, the stomach itself, the gastric veins, the right gastric vein, the short gastric veins, the lesser curvature veins, and the greater curvature veins are each treated as a node. If there are varices in the stomach, each location of a varices in the stomach is treated as a node.
[0066] 3. Liver: The veins on the liver mainly consist of three parts: the portal vein, the central vein, and the hepatic veins. In this embodiment, the liver itself, the portal vein, the central vein, and the hepatic veins are each treated as a node.
[0067] 4. Spleen: The veins on the spleen mainly include four parts: splenic sinusoids, small splenic veins, main splenic vein, and splenic portal vein. In the embodiments of this application, the spleen itself, splenic sinusoids, small splenic veins, main splenic vein, and splenic portal vein are each treated as a node.
[0068] 5. Superior Vena Cava: The superior vena cava (SVC) is a major vein responsible for transporting blood from the upper body back to the heart. The SVC mainly comprises six parts: the internal jugular vein, the external jugular vein, the subclavian vein, the brachiocephalic vein, the veins of the upper limbs, and the veins of the heart. In this embodiment, the superior vena cava itself, the internal jugular vein, the external jugular vein, the subclavian vein, the brachiocephalic vein, and the veins of the heart are each considered as a node.
[0069] 6. Patient information: such as patient gender, age, medical history, lifestyle habits, etc., which is treated as a node in this embodiment of the application.
[0070] After determining the nodes of the graph structure, it is necessary to determine the connection relationships between the nodes, specifically including:
[0071] 1. Esophagus: The esophagus and its veins are interconnected; the connections between blood vessels are the edges of these nodes. A series of venous connections exist between the esophagus and the stomach, the most important being the connection between the inferior esophageal vein and the gastric vein. At the junction of the stomach and esophagus, the inferior esophageal vein and the gastric vein connect, forming a vascular network that allows for the interconnection of blood circulation in both the esophagus and stomach. The connection between the esophagus and stomach is the edge of these two nodes. The connection between the esophagus and the superior vena cava is achieved through the esophageal veins. The esophageal veins are a crucial pathway for collecting blood from the area surrounding the esophagus and ultimately draining it into the superior vena cava. The connection between the esophagus and the superior vena cava is the edge of these two nodes.
[0072] 2. Stomach: The stomach and its veins are interconnected; these connections are like the edges of these nodes. The connection between the stomach and esophagus has already been described in the esophageal section. There are vascular connections between the stomach and spleen. For example, the gastrosplenic artery originates from the abdominal aorta and supplies blood to the spleen via the gastrosplenic ligament, while the splenic vein drains blood from the spleen. Some branches may intersect with the stomach's vascular system. The connection between the stomach and spleen is like the edges between these two nodes. The connection between the stomach and liver is mainly achieved through the vascular system. The venous system within the stomach collects blood draining from the stomach wall, eventually forming gastric veins. These gastric veins converge into a large vessel, the portal vein. The portal vein does not directly connect to the heart but instead guides blood from various parts of the abdominal cavity to the liver. Inside the liver, the portal vein branches into many smaller vessels called intrahepatic branches. These branches traverse the liver tissue, distributing blood to different areas of the liver. The intrahepatic branches eventually converge into the hepatic veins. These hepatic veins transport processed blood out of the liver to the inferior vena cava and superior vena cava. These two are the main large veins that carry blood back to the heart.
[0073] 3. Liver: The liver and its veins are interconnected; the connections between blood vessels are represented by the edges of these nodes. The edges connecting the liver to the stomach and the superior vena cava nodes have already been described in the stomach section.
[0074] 4. Spleen: The spleen and its veins are interconnected; the connections between blood vessels are represented by the edges of these nodes. The edges connecting the spleen and stomach nodes have already been described in the stomach section.
[0075] 5. Superior vena cava: The veins of the superior vena cava are interconnected, and the connections between the vessels are the edges of these nodes. The edges connecting the superior vena cava to the esophagus and liver nodes have been described in the esophageal and gastric sections, respectively.
[0076] 6. Patient Information: In this embodiment, the node corresponding to the patient information is connected to other nodes, that is, there is an edge between the node corresponding to the patient information and other nodes.
[0077] Construct a graph structure based on the nodes and edges identified above. Figure 2 A schematic diagram of a graph structure is shown. Figure 2 In the diagram, node 1 represents patient information, node 2 represents the esophagus, node 7 represents esophageal varices, nodes 8, 9, and 10 represent the superior esophageal vein, middle esophageal vein, and inferior esophageal vein, respectively, node 3 represents the stomach, node 11 represents gastric varices, nodes 12, 13, 14, 15, and 16 represent the left gastric vein, right gastric vein, short gastric vein, lesser curvature gastric vein, and greater curvature gastric vein, respectively, node 4 represents the spleen, nodes 17, 18, 19, and 20 represent the splenic sinus vein, lesser splenic vein, main splenic vein, and portal splenic vein, respectively, node 5 represents the liver, nodes 21, 22, and 23 represent the portal vein, central vein, and hepatic venules, respectively, node 6 represents the superior vena cava, and nodes 24, 25, 26, 27, and 28 represent the internal jugular vein, external jugular vein, subclavian vein, jugular vein, and cardiac vein, respectively.
[0078] Step 103: For the graph structure corresponding to each patient, set corresponding node features on other nodes except those corresponding to patient information based on tissue feature data, and set feature labels on the corresponding nodes based on the esophageal and gastric variceal bleeding status. The feature labels are high-risk labels or low-risk labels.
[0079] In this embodiment, the tissue feature data includes CT data, blood flow velocity, blood flow pressure, and other data for the corresponding nodes. After constructing the graph structure, except for the nodes corresponding to patient information, node features are set for each node based on the tissue feature data of the corresponding nodes. Furthermore, feature labels are set for nodes corresponding to variceal bleeding locations based on the esophageal and gastric fundus variceal bleeding status. If the patient subsequently experiences variceal bleeding, the feature label of the corresponding node is set to high risk; if the patient does not subsequently experience variceal bleeding, the feature label of the corresponding node is set to low risk. Please refer to [link to relevant documentation]. Figure 3 , Figure 3 In the diagram, node 1, which corresponds to the patient information, is connected to all other nodes (not shown in the figure). Nodes 2 to 28 are 512-dimensional datasets containing CT data, blood flow velocity, blood flow pressure, etc. Node 7, which corresponds to esophageal varices, and node 11, which corresponds to gastric varices, are labeled with feature tags: high risk and low risk.
[0080] Step 104: Train a graph neural network model based on the completed graph structure, and predict the risk of esophageal and gastric variceal bleeding in the patient under test based on the graph neural network model.
[0081] In this embodiment of the application, the training method for the graph neural network model includes:
[0082] Step 1041: Divide the graph structure corresponding to each patient into a training set and a test set, and shuffle the order of the graph structures in the training set;
[0083] In practical applications, the constructed graph structure can be divided into a training set and a test set in an 8:2 ratio, and the training set can be randomly sampled in a batch size of 100. Since graph structure data is usually very large, training directly on all graph structures in the training set is very time-consuming. This embodiment of the application accelerates training by using a Mini-Batch sampling method, that is, randomly selecting a small portion of the graph structure from the training set as training samples each time. This reduces the amount of computation and improves the efficiency of model training.
[0084] Step 1042: Repeatedly sample a preset number of graph structures from the shuffled training set multiple times, and train the graph neural network model based on the graph structures obtained from each sampling until the cross-entropy loss value converges.
[0085] In this embodiment, the graph neural network model chosen is the GraphSAGE (Graph Sample and Aggregation) model. The GraphSAGE model is a graph neural network model for learning node representations. It consists of multiple network layers, each composed of an aggregation function and an update function. The aggregation function learns the representation of each node by sampling neighboring nodes and aggregating their information, while the update function updates the node representation. The final layer of the model is a Softmax classifier used for node classification or prediction.
[0086] This application embodiment is based on the GraphSAGE model, and the method for training the model based on the graph structure obtained from each sampling specifically includes the following steps:
[0087] Step 10421: In each sampled graph structure, the graph neural network model randomly selects a certain number of neighboring nodes as target neighboring nodes for each central node;
[0088] Specifically, the GraphSAGE model first performs node sampling, randomly selecting a certain number of nodes from the neighboring nodes of each central node. This step helps to capture the local structural information of the nodes.
[0089] Step 10422: For each central node, aggregate the node features of its corresponding target neighbor nodes, and concatenate the aggregated features with the node features of the central node to obtain the final node features of each central node and update the corresponding node representation.
[0090] Specifically, for each central node, the features of its sampled neighboring nodes are first aggregated. GraphSAGE uses an aggregation function, such as mean pooling or LSTM (Long Short-Term Memory), to fuse the information from the neighboring nodes. This step produces a new representation of the central node.
[0091] Then, the original features of the central node are concatenated or added to the aggregated features of its neighboring nodes to form the final representation of the central node. This process can be represented as:
[0092]
[0093] in, Let σ represent the node features of node v in layer (l+1), and let W represent the activation function. l This represents the weight matrix, and CONCAT represents the concatenation function. AGG represents the node features of node v at layer l. Let N(c) represent the node characteristics of the target neighbor node u, and let N(c) represent the set of target neighbor nodes of node v.
[0094] Step 10423: Determine the cross-entropy loss function, calculate the cross-entropy loss value based on the cross-entropy loss function, and update the learnable parameters of the graph neural network model through backpropagation;
[0095] Cross-entropy loss is a widely used loss function in classification problems, especially in deep learning. It measures the difference between the model's output probability distribution and the actual probability distribution. For binary classification tasks, the formula for binary cross-entropy loss is:
[0096] H(y,p)=-(ylog(p)+(1-y)log(1-p));
[0097] Where y represents the true feature label, p represents the probability output by the graph neural network model, H(y, p) represents the cross-entropy loss value, and log represents the natural logarithm.
[0098] In this embodiment, the model parameters are updated based on the gradient of the cross-entropy loss value using the backpropagation algorithm. Specifically, the gradient of each parameter with respect to the cross-entropy loss function is calculated using the chain method, and then the model parameters are updated using an optimization algorithm such as stochastic gradient descent.
[0099] Step 10424: If the cross-entropy loss value does not converge, repeat the above steps to perform feature aggregation and splicing of multi-layer neighbor nodes according to the preset number of times. If the cross-entropy loss value converges, the training ends.
[0100] Specifically, when the cross-entropy loss value has not converged, multiple layers of neighbor aggregation and splicing are repeated, with each layer including two steps: node sampling and neighbor node representation aggregation. In this way, the model can learn more layers and more abstract representations of nodes.
[0101] Step 1043: Use the graph structure in the test set to verify whether the prediction accuracy of the trained graph neural network model meets the requirements. If yes, the training ends; otherwise, retrain or adjust the graph neural network model and retrain.
[0102] In this embodiment, test set data is used to evaluate the model's performance. To assess the model's realism, medical data can also be collected from real clinical environments and compared with the model's predictions. Furthermore, a professional medical team can be invited to analyze and judge the results to confirm the model's authenticity. The predicted results are compared with the endoscopic report results, and indices including accuracy, precision, recall, ROC, and AUC are calculated. Higher indices indicate better model training performance.
[0103] In this embodiment, the ROC curve is mainly used to determine the model training effect. The horizontal axis of the ROC curve represents the false positive rate (FPR), and the vertical axis represents the true positive rate (TPR). In practical applications, firstly, based on the trained graph neural network model, the probability of feature labels of nodes corresponding to the location of varicose veins in patients corresponding to all graph structures in the test set is predicted. Based on the probability, it is determined whether varicose vein bleeding has occurred; if so, it is judged as a positive example, otherwise, it is judged as a negative example. Then, it is determined whether the corresponding patient has actually experienced varicose vein bleeding; if so, it is judged as a positive example, otherwise, it is judged as a negative example. Finally, the false positive rate and true positive rate of the graph neural network model are calculated based on the predicted varicose vein bleeding situation and the actual varicose vein bleeding situation. If the false positive rate is less than a first preset value and the true positive rate is greater than a second preset value, then the prediction accuracy of the graph neural network model is determined to meet the requirements.
[0104] In this embodiment of the application, the formulas for calculating the false positive rate (FPR) and the true positive rate (TPR) are as follows:
[0105]
[0106] Wherein, FP represents the number of false positive samples, where a false positive (FP) indicates a positive prediction but a negative actual result; TN represents the number of true negative samples, where a true negative (TN) indicates that both the prediction and the actual result are negative; TP represents the number of true positive samples, where a true positive (TP) indicates that both the prediction and the actual result are positive; and FN represents the number of false negative samples, where a false negative (FN) indicates a negative prediction but a positive actual result.
[0107] The ROC curve is composed of points (TPR, FPR), and AUC is the area under the ROC curve; a larger AUC is better. If the TPR is higher and the FPR is lower (i.e., the ROC curve is steeper), then the model performance is better; if the ROC curve is smooth, then it can be generally determined that there is not much overfitting. The first and second preset values can be adjusted and set according to actual conditions, and this application embodiment does not impose any limitations on this.
[0108] In practical applications, if the prediction results are significantly abnormal, several medical experts can be invited to re-evaluate the case data and its endoscopy report to determine whether the problem lies in the error of the model's prediction or the error of the endoscopy report's diagnosis. If the error lies in the model's prediction, the model should be retrained or the model should be adjusted and retrained.
[0109] After validating the trained graph neural network model and ensuring it passes validation, the model can be used to predict esophageal and gastric variceal bleeding in the test patient. Specific methods include:
[0110] Based on the medical data of the patient to be tested, a test graph structure is constructed. The test graph structure is then input into the classifier of the last layer of the graph neural network model to obtain the probability of the feature labels of the nodes corresponding to the varicose vein locations in the esophagus and gastric fundus of the patient to be tested.
[0111] In practical applications, for the patient to be tested, the same method as in steps 101-103 can be used to construct the test graph structure of the patient to be tested. Then, the test graph structure is input into the classifier of the last layer of the graph neural network model to obtain the high-risk probability or low-risk probability of the node corresponding to the variceal location of the patient's esophagus and gastric fundus, thereby realizing the prediction of variceal bleeding in the patient's esophagus and gastric fundus.
[0112] In summary, the method for predicting the risk of esophageal variceal bleeding based on graph neural networks provided in this application constructs a graph structure based on human vascular structure data and trains a graph neural network model based on the graph structure of multiple historical cases. When it is necessary to predict the risk of esophageal and gastric variceal bleeding, it is only necessary to obtain the patient information, vascular structure data, and tissue feature data of the patient to be tested. The pre-trained graph neural network can then predict the risk of esophageal and gastric variceal bleeding in the patient to be tested. The operation is simple and the cost is low. The prediction results can be directly used by physicians for reference. For example, physicians can give suggestions for further endoscopic examinations or regular follow-up examinations based on the prediction results and the patient's medical history. This improves the accuracy of predicting the risk of esophageal and gastric variceal bleeding, avoids excessive endoscopic examinations, reduces patient suffering and medical expenses, and avoids the additional risks brought by endoscopic examinations.
[0113] Based on the above technical solution, this embodiment also proposes a device for predicting the risk of esophageal and gastric variceal bleeding. Please refer to [link to relevant documentation]. Figure 4 The device includes:
[0114] The collection unit is used to collect medical data related to the risk of esophageal variceal bleeding. The medical data includes patient information, vascular structure data, tissue characteristic data and corresponding esophageal and gastric variceal bleeding status of multiple patients.
[0115] The construction unit is used to construct a graph structure for each patient based on the vascular structure data. In the graph structure, the esophagus, stomach, liver, spleen, various veins and varicose vein locations, and patient information are each a node. The connection relationships between the esophagus, stomach, liver, spleen, various veins and varicose vein locations are the edges of the nodes. The node corresponding to the patient information is connected to other nodes respectively.
[0116] The setting unit is used to set corresponding node features on nodes other than those corresponding to patient information based on tissue feature data for the graph structure corresponding to each patient, and to set feature labels on corresponding nodes based on the esophageal and gastric variceal bleeding status. The feature labels are high-risk labels or low-risk labels.
[0117] The prediction unit is used to train a graph neural network model based on the set graph structure, and to predict the risk of esophageal and gastric variceal bleeding in the patient under test based on the graph neural network model.
[0118] It is understood that since the device for predicting the risk of esophageal and gastric variceal bleeding described in this application embodiment is a device for implementing the method for predicting the risk of esophageal and gastric variceal bleeding described in the embodiment, the device disclosed in the embodiment is described in a simpler way because it corresponds to the method disclosed in the embodiment. For relevant parts, please refer to the description of the method, and it will not be repeated here.
[0119] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
Claims
1. A method for predicting the risk of esophageal and gastric variceal bleeding, characterized in that, The method includes: Collect medical data related to the risk of esophageal variceal bleeding, including patient information, vascular structure data, tissue characteristic data, and corresponding esophageal and gastric variceal bleeding status of multiple patients; Based on the vascular structure data, a graph structure is constructed for each patient. In the graph structure, the esophagus, stomach, liver, spleen, various veins and varicose vein locations, and patient information are each a node. The connection relationships between the esophagus, stomach, liver, spleen, various veins and varicose vein locations are the edges of the nodes. The node corresponding to the patient information is connected to other nodes respectively. For each patient's corresponding graph structure, based on tissue feature data, corresponding node features are set on nodes other than those corresponding to patient information, and feature labels are set on corresponding nodes based on the esophageal and gastric variceal bleeding status. The feature labels are either high-risk labels or low-risk labels. A graph neural network model is trained based on the completed graph structure, and the risk of esophageal and gastric variceal bleeding in the patient under test is predicted based on the graph neural network model. The training method for the graph neural network model includes: The graph structures corresponding to each patient are divided into training and testing sets, and the order of the graph structures in the training set is shuffled. Repeatedly sample a predetermined number of graph structures from the shuffled training set, and train the graph neural network model based on the graph structures obtained from each sampling until the cross-entropy loss value converges. Use the graph structure in the test set to verify whether the prediction accuracy of the trained graph neural network model meets the requirements. If it does, the training ends; otherwise, retrain or adjust the graph neural network model and retrain. The graph neural network model is trained based on the graph structure obtained from each sampling, specifically including: In each sampled graph structure, the graph neural network model randomly selects a certain number of neighboring nodes as target neighboring nodes for each central node; For each central node, the node features of its corresponding target neighbor nodes are aggregated, and the aggregated features are concatenated with the node features of the central node to obtain the final node features of each central node and update the corresponding node representation. Determine the cross-entropy loss function, calculate the cross-entropy loss value based on the cross-entropy loss function, and update the learnable parameters of the graph neural network model through backpropagation; If the cross-entropy loss value does not converge, repeat the above steps to perform feature aggregation and splicing of multi-layer neighbor nodes for a preset number of times. If the cross-entropy loss value converges, the training ends. The prediction accuracy of the trained graph neural network model is verified using graph structures in the test set, specifically including: Based on the trained graph neural network model, the probability of the feature label of the node corresponding to the location of the varicose vein in the patient is predicted for all graph structures in the test set. Based on the probability, it is determined whether varicose vein bleeding has occurred. If it has, it is determined as a positive example; otherwise, it is determined as a negative example. Determine whether the corresponding patient actually experienced varicose vein bleeding; if so, it is considered a positive case; otherwise, it is considered a negative case. The false positive rate and true positive rate of the graph neural network model are calculated based on the predicted varicose vein bleeding situation and the actual varicose vein bleeding situation. If the false positive rate is less than a first preset value and the true positive rate is greater than a second preset value, then the prediction accuracy of the graph neural network model is determined to meet the requirements.
2. The method for predicting the risk of esophageal and gastric variceal bleeding according to claim 1, characterized in that, The veins include the superior esophageal vein, middle esophageal vein, inferior esophageal vein, left gastric vein, right gastric vein, short gastric veins, lesser curvature gastric vein, greater curvature gastric vein, portal vein, central vein, hepatic venules, splenic sinus veins, small splenic veins, main splenic vein, splenic portal vein, internal jugular vein, external jugular vein, subclavian vein, jugular vein, and cardiac veins.
3. The method for predicting the risk of esophageal and gastric variceal bleeding according to claim 1, characterized in that, The aggregation process of node features of the target neighbor nodes and the concatenation process of the aggregated features with the node features of the center node are represented as follows: ; in, Represents a node In the Layer node characteristics, This represents the activation function. Represents the weight matrix. This represents the concatenation function. Represents a node In the Layer node characteristics, Represents aggregate functions, Indicates the target neighbor node Node characteristics, Represents a node The target set of neighboring nodes.
4. The method for predicting the risk of esophageal and gastric variceal bleeding according to claim 1, characterized in that, The expression for the cross-entropy loss function is as follows: ; in, Indicates true feature labels, This represents the probability output by the graph neural network model. This represents the cross-entropy loss value.
5. The method for predicting the risk of esophageal and gastric variceal bleeding according to claim 1, characterized in that, The formula for calculating the false positive rate is as follows: ; in, Indicates the false positive rate. This indicates the number of false positives. A false positive means that the predicted result is positive, but the actual result is negative. This represents the number of true negative samples, where both the predicted result and the actual result are negative. The formula for calculating the true positive rate is as follows: ; in, Indicates the true positive rate. This represents the number of true positive samples. A true positive means that both the predicted result and the actual situation are positive. This indicates the number of false negative samples. A false negative means that the predicted result is negative, but the actual result is positive.
6. The method for predicting the risk of esophageal and gastric variceal bleeding according to claim 1, characterized in that, Based on the graph neural network model, the risk of varicose bleeding in the tested patient is predicted, specifically including: Based on the medical data of the patient to be tested, a test graph structure is constructed. The test graph structure is then input into the classifier of the last layer of the graph neural network model to obtain the probability of the feature labels of the nodes corresponding to the varicose vein locations in the esophagus and gastric fundus of the patient to be tested.
7. A device for predicting the risk of esophageal and gastric variceal bleeding, characterized in that, For implementing the method for predicting the risk of esophageal and gastric variceal bleeding as described in claim 1, the device comprises: The collection unit is used to collect medical data related to the risk of esophageal variceal bleeding. The medical data includes patient information, vascular structure data, tissue characteristic data and corresponding esophageal and gastric variceal bleeding status of multiple patients. The construction unit is used to construct a graph structure for each patient based on the vascular structure data. In the graph structure, the esophagus, stomach, liver, spleen, various veins and varicose vein locations, and patient information are each a node. The connection relationships between the esophagus, stomach, liver, spleen, various veins and varicose vein locations are the edges of the nodes. The node corresponding to the patient information is connected to other nodes respectively. The setting unit is used to set corresponding node features on nodes other than those corresponding to patient information based on tissue feature data for the graph structure corresponding to each patient, and to set feature labels on corresponding nodes based on the esophageal and gastric variceal bleeding status. The feature labels are high-risk labels or low-risk labels. The prediction unit is used to train a graph neural network model based on the set graph structure, and to predict the risk of esophageal and gastric variceal bleeding in the patient under test based on the graph neural network model.
Citation Information
Patent Citations
Automatic eye fundus disease diagnosis device based on eye fundus image retinal blood vessels
CN113724857A
Device for quantifying esophageal and gastric fundus varicose veins based on CT image
CN115564741A
