A cancer survival prediction model construction method based on graph contrastive learning
By constructing a cancer survival prediction model based on graph contrastive learning, taking into account the patient's historical comorbidity characteristics, and using graph convolutional networks and graph neural networks to generate feature representations, the problem of existing technologies failing to effectively consider comorbidity characteristics is solved, and more accurate cancer survival prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2023-02-07
- Publication Date
- 2026-04-17
AI Technical Summary
Existing cancer survival prediction methods fail to effectively consider patients' comorbidities, resulting in limited predictive effectiveness.
A cancer survival prediction model based on graph contrastive learning is constructed. By acquiring clinical data and historical comorbidity data of cancer patients, feature representations of disease nodes are generated using graph convolutional networks and graph neural networks. A contrastive loss function is constructed, and predictions are made by combining the patient's disease relationship graph and clinical features.
It improves the accuracy of cancer survival prediction, reduces the model's sensitivity to noise, obtains a more complete representation of patient characteristics, and improves prediction performance.
Smart Images

Figure CN115985442B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and specifically to a method for constructing a cancer survival prediction model based on graph contrastive learning. Background Technology
[0002] Cancer is a leading cause of global disease burden, with high morbidity and mortality rates. Cancer survival prediction refers to forecasting the survival risk of cancer patients and obtaining their survival outcomes. This is of great significance in assisting doctors to optimize treatment measures, improving the long-term prognosis of cancer patients, and effectively avoiding overtreatment and waste of medical resources.
[0003] Cancer survival prediction research is mainly divided into two categories: risk factor identification and survival prediction. Risk factor identification primarily uses traditional statistical methods to study risk factors affecting cancer survival prognosis, such as mutated genes and clinical characteristics. This type of research is often limited by sample availability, resulting in small sample sizes. With the development of medical informatization, the accumulation of electronic medical data has laid the foundation for machine learning-based cancer survival prediction research. Existing prediction methods are mainly based on models such as Cox regression analysis, Lasso regression analysis, and neural networks, and the variables used for prediction typically include omics, clinical, and medical imaging data.
[0004] In recent years, researchers have discovered a correlation between comorbidities in cancer patients—that is, one or more other diseases a patient had before being diagnosed with cancer—and cancer prognosis. Although comorbidities may affect cancer survival prognosis, current cancer survival prediction methods often neglect the relationship between comorbidities and survival status, failing to model this important characteristic of patients, thus limiting the effectiveness of survival prediction models. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention provides a method for constructing a cancer survival prediction model based on graph contrastive learning. The purpose is to consider the impact of cancer patients' historical comorbidity records on their survival status and obtain more accurate prediction results.
[0006] The technical solution adopted in this invention is as follows:
[0007] A method for constructing a cancer survival prediction model based on graph contrastive learning includes the following steps:
[0008] S1: Acquire clinical data and historical comorbidity data of cancer patients, and preprocess the clinical data and historical comorbidity data; the acquired clinical data of cancer patients includes demographic information, treatment information and pathological information, and the clinical data is preprocessed by data classification and standardization; acquire historical comorbidity data of cancer patients, including all chronic diseases that cancer patients had before cancer diagnosis, and the diseases are preprocessed by coding according to the ICD-10 disease classification standard;
[0009] S2: Construct a patient-disease relationship graph, initialize the cancer patient feature representation with relevant clinical features, and initialize the disease feature representation with one-hot encoding;
[0010] S3: Based on S2, construct positive and negative disease sample pairs according to the ICD-10 disease classification standard;
[0011] S4: Based on S2, S3 and graph convolutional networks, generate feature representations of disease nodes, generate contrastive representations of disease nodes through projection, and construct contrastive loss;
[0012] S5: Generate feature representations of cancer patients based on the patient-disease relationship graph structure and graph neural network, and construct a classification loss;
[0013] S6: Model training, loss function optimization, and survival prediction.
[0014] Preferably, the construction of the patient-disease relationship diagram in S2 specifically involves:
[0015] Construct a patient-disease relationship graph G = (V, E), where V is a set of nodes and E is a set of edges; in the patient-disease relationship graph, V can be partitioned into two disjoint node subsets Vi. p and V d V p Each node in V represents a cancer patient. d Each node in the array represents a chronic comorbidity of a cancer group; if patient p has disease d, then the node representing patient p is connected to the node representing disease d, and finally the edge set E is formed by all patient-disease connections.
[0016] Preferably, in step S2, the cancer patient feature representation is initialized with relevant clinical features, and the disease feature representation is initialized with one-hot encoding, specifically as follows:
[0017] The clinical characteristics of cancer patients include demographic information, treatment information, and pathological information. These corresponding features are selected as the initial feature representations for the cancer patient nodes. Where p i Representing the i-th cancer patient; initializing the feature representation of the disease node using one-hot encoding, specifically, the i-th disease node d i Initial feature representation
[0018] Preferably, in step S3, constructing positive and negative disease sample pairs based on the ICD-10 disease classification standard specifically involves:
[0019] Based on the ICD-10 classification standard, for a disease A, another disease B is randomly selected from its disease group to form a positive sample pair (A,B); at the same time, k negative sample pairs are obtained through sampling. The specific sampling method for negative sample pairs is as follows: first, k1 diseases that are not in the same disease chapter as disease A are randomly selected as the first negative sample; then, k-k1 diseases that are in the same disease chapter but different disease groups as disease A are randomly selected as the second negative sample. The proportion of the second negative sample is determined by adjusting the ratio of (k-k1) to k; the k negative samples, together with the first negative sample and the second negative sample, form k negative sample pairs.
[0020] Preferably, in step S4, the feature representation of disease nodes generated based on graph convolutional networks, and the comparative representation of disease nodes generated through a projector, specifically include:
[0021] In the patient-disease relationship graph G, all first-order neighbors of disease nodes are patient nodes, and all first-order neighbors of patient nodes are disease nodes. First, based on the patient-disease relationship graph G, a graph convolutional network is used as the feature extraction encoder to obtain the feature representation of each disease node. Specifically, when the number of layers in the graph convolutional network is defined as 1, the feature representation of the disease node is an aggregated representation of the features of all cancer patients suffering from that disease, and then the feature representation of each disease is... The input is projected to obtain a contrast representation. The projector structure is a two-layer fully connected network.
[0022] Preferably, the construction of the contrast loss in S4 specifically involves:
[0023] According to the ICD-10 classification standard, diseases within the same disease group should have more similar representations, while disease representations between different disease groups or different disease chapters should have lower similarities. Based on this, after obtaining the contrastive representation of each disease node through the graph convolutional network encoder and projector defined in S4, a contrastive loss function L is constructed. marginNCE Specifically, L marginNCE The calculation method is as follows:
[0024]
[0025] Where N is the total number of disease nodes; This represents a pair of positive samples; V represents a pair of negative samples; - Indicated by di The set consisting of k negative samples; τ is a hyperparameter; sim(d i ,d j ) is a measure of disease d i and d j The function of similarity, specifically. in, and The disease node d is obtained by the graph convolutional network encoder and projector defined in S4. i and d j The contrastive characterization, and express and The modulus is m; m is the decision boundary and m < 0.
[0026] Preferably, the generation of cancer patient feature representation in S5 specifically includes:
[0027] The feature representation of cancer patient p is generated based on the structure of the patient-disease relationship graph, combined with clinical features and historical comorbidity information; specifically, it is represented by clinical features. Co-morbid neighbors aggregation Gathering with neighbors of cancer patients Composition; the final characteristics of cancer patients are represented by h p Depend on and The result after splicing is as follows:
[0028]
[0029] Here, || represents the concatenation of vectors.
[0030] Furthermore, the clinical characteristics of the cancer patients are represented It represents the patient's demographic characteristics, treatment information, and pathological information, and is constructed as follows:
[0031]
[0032] Among them, W s and b s Let represent the trainable weight matrix and bias term, respectively, and σ represent the activation function. This represents the patient's initial characteristics;
[0033] The co-disease neighbor aggregation represents The first-order neighbors of cancer patients are aggregated, and the calculation process for different nodes shares the same set of parameters. The specific calculation method is as follows:
[0034]
[0035] Where N(p) represents the set of first-order neighbors of cancer patient node p, p′ is an element in set N(p), and h p′ This is the feature representation of node p′. The AGGREGATE function aims to aggregate the embedding representations of node p’s neighbors, and the mean calculation function can be selected. This is the collaborative representation generated by the aggregation function AGGREGATE;
[0036] The cancer patient neighbor aggregation representation The results are obtained by aggregating the second-order neighbor nodes of cancer patients. For a cancer patient node p, the neighbor nodes of cancer patients associated with cancer patient node p through the same meta-path are first aggregated individually to obtain the aggregation results of cancer patient neighbor nodes under each meta-path.
[0037]
[0038] Where, Φ r Let r represent the metapath of the r-th disease chapter, where r = 1, 2, ..., M, and M is the number of metapath types. This indicates that node p is traversed via metapath Φ r The set of neighboring nodes of the associated cancer patients; j is the set of... The node in h j It is the feature representation of node j; This is a trainable weight matrix; That is, set The number of nodes;
[0039] Then, considering that the impact of diseases in different disease chapters on the cancer survival prediction task varies, the weights of each disease chapter are further calculated. This weight is then used to weight the feature representations under each disease chapter. Specifically, The calculation method is as follows:
[0040]
[0041] Among them, V p Represents the set of cancer patient nodes, |V p | indicates V p The number of nodes in the array; q is a column vector whose parameters are obtained through training; tanh is an activation function; W α and b α These are the trainable parameter matrix and the bias term, respectively. Node p is the metapath Φ r The aggregate representation of the associated neighbor nodes; M is the number of meta-path types;
[0042] Finally, the weighted sum of the feature representations for each disease chapter is calculated.
[0043]
[0044] in, This indicates the weight of each disease chapter; Node p is the metapath v r The aggregate representation of the associated cancer patient nodes; M is the number of metapath types.
[0045] Preferably, the classification loss is constructed in step S5 as follows:
[0046] Representing the final characteristics of cancer patients h p The survival prediction probability of cancer patients is obtained by using a fully connected layer and a sigmoid function.
[0047] Classification loss function L clf The cross-entropy loss function can be used, as shown in the following formula:
[0048]
[0049] in, y represents the predicted probability for cancer patient p; p This represents the actual survival status of cancer patient p; N is the total number of cancer patients.
[0050] Preferably, the model training, loss function optimization, and classification prediction of cancer patients' survival status in S6 specifically include:
[0051] Historical disease data, demographic, treatment, and pathological clinical data of cancer patients were acquired. The acquired cancer patient data was divided into training, validation, and test sets in a 7:1:2 ratio, and the historical disease and clinical data were preprocessed. Based on the patients' historical disease information, a patient-disease relationship graph containing all cancer patients was constructed, and feature representations of cancer patients and disease nodes were initialized separately. Feature representations of disease nodes were obtained using a graph convolutional network. On the one hand, The input projector yields a comparative representation of disease nodes. Based on comparative characterization Calculate the contrast loss L marginNCE On the other hand, the clinical features of cancer patient nodes, the feature representations of co-disease neighbor nodes, and the feature representations of cancer patient neighbor nodes based on meta-paths are aggregated separately, and the aggregated results are concatenated to obtain the final feature representation h of the cancer patient node. p Then h p The data is input into a survival prediction classifier to obtain the survival prediction probability. Predicted probabilities based on cancer patients in the training set and the real survival status y p Calculate the classification loss function L clf Finally, the total loss function L is as follows:
[0052] L=λL clf +(1-λ)L marginNCE
[0053] Where λ is a hyperparameter. The loss function L is optimized using the Adam algorithm until the value of L no longer decreases, at which point training stops, and a well-trained prediction model is obtained.
[0054] When predicting the 5-year survival probability of cancer patients in the test set, based on the constructed patient-disease relationship graph, the trained prediction model is used to obtain the feature representation of disease nodes, generate the clinical feature representation, comorbid neighbor aggregation representation, and meta-path-based cancer patient neighbor aggregation representation of cancer patients in the test set, and then concatenate the three feature representations of different dimensions and pass them through the survival prediction classifier to obtain the survival prediction result of cancer patients.
[0055] In summary, the present invention has the following beneficial effects:
[0056] (1) This invention takes into account the impact of the patient’s historical comorbidity on the survival status of cancer, which is conducive to obtaining more accurate prediction results;
[0057] (2) This invention can obtain more representative disease feature representations and use contrastive loss as a regularization factor to assist in cancer survival prediction tasks. Based on the inherent hierarchical information of the ICD-10 disease classification standard, the similarity between diseases is defined, and the MarginNCE contrastive loss function is constructed, which helps to reduce the model's sensitivity to noise;
[0058] (3) The feature representation of cancer patients is composed of the clinical features of the patient node, the feature representation of the disease neighbors, and the feature representation of the cancer patient neighbors based on the metapath; at the same time, the patient's own clinical features and the structural features of the patient-disease relationship graph are considered to make the patient representation more complete. Attached Figure Description
[0059] The present invention will be described by way of example and with reference to the accompanying drawings, wherein:
[0060] Figure 1 This is a flowchart illustrating the process of the present invention;
[0061] Figure 2 This is a schematic diagram of the cancer survival prediction model framework of the present invention. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of 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. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0063] The following is combined Figure 1 , Figure 2 The present invention will be described in detail below.
[0064] A method for constructing a cancer survival prediction model based on graph contrastive learning includes the following steps:
[0065] S1: Acquire clinical data and historical comorbidity data of cancer patients, and preprocess the clinical data and historical comorbidity data; the acquired clinical data of cancer patients includes demographic information, treatment information and pathological information, and the clinical data is preprocessed by data classification and standardization; the acquired historical comorbidity data of cancer patients includes all chronic diseases that cancer patients had before the cancer diagnosis, and the diseases are preprocessed by coding according to the ICD-10 disease classification standard.
[0066] S2: Construct a patient-disease relationship graph, initialize the cancer patient feature representation with relevant clinical features, and initialize the disease feature representation with one-hot encoding;
[0067] S3: Based on S2, construct positive and negative disease sample pairs according to the ICD-10 disease classification standard;
[0068] S4: Based on S2, S3 and graph convolutional networks, generate feature representations of disease nodes, generate contrastive representations of disease nodes through projection, and construct contrastive loss;
[0069] S5: Generate feature representations of cancer patients based on the patient-disease relationship graph structure and graph neural network, and construct a classification loss;
[0070] S6: Model training, loss function optimization, and classification prediction of survival status for cancer patients.
[0071] The specific steps for constructing the patient-disease relationship diagram in S2 are as follows:
[0072] Construct a patient-disease relationship graph G = (V, E), where V is a set of nodes and E is a set of edges; in the patient-disease relationship graph, V can be partitioned into two disjoint node subsets Vi. p and V d V p Each node in V represents a cancer patient. d Each node in graph G represents a chronic comorbidity in a cancer population. If patient p has disease d, the node representing patient p is connected to the node representing disease d, and finally, all patient-disease connections form the edge set E. It should be noted that the diseases are uniformly coded according to the International Classification of Diseases, 10th Edition (ICD-10). ICD-10 divides diseases into 22 disease chapters, 261 disease groups, and a total of 2045 category codes based on their characteristics. A disease node in graph G corresponds to one category code.
[0073] In S2, the cancer patient feature representation is initialized using relevant clinical features, and the disease feature representation is initialized using one-hot encoding, specifically as follows:
[0074] The clinical characteristics of cancer patients include demographic information, treatment information, and pathological information. These corresponding features are selected as the initial feature representations for the cancer patient nodes. Where p i Representing the i-th cancer patient; initializing the feature representation of the disease node using one-hot encoding, specifically, the i-th disease node d i Initial feature representation
[0075] Based on the ICD-10 disease classification standard, positive and negative disease sample pairs are constructed in S3 as follows:
[0076] Based on the ICD-10 classification standard, for a disease A, another disease B is randomly selected from its disease group to form a positive sample pair (A,B); at the same time, k negative sample pairs are obtained through sampling. The specific sampling method for negative sample pairs is as follows: first, k1 diseases that are not in the same disease chapter as disease A are randomly selected as the first negative sample; then, k-k1 diseases that are in the same disease chapter but different disease groups as disease A are randomly selected as the second negative sample. The proportion of the second negative sample is determined by adjusting the ratio of (k-k1) to k; the k negative samples, together with the first negative sample and the second negative sample, form k negative sample pairs.
[0077] In S4, the feature representation of disease nodes is generated based on graph convolutional networks, and the comparative representation of disease nodes is generated through projectors as follows:
[0078] In the patient-disease relationship graph G, all first-order neighbors of disease nodes are patient nodes, and all first-order neighbors of patient nodes are disease nodes. First, based on the patient-disease relationship graph G, a graph convolutional network is used as the feature extraction encoder to obtain the feature representation of each disease node. Specifically, when the number of layers in the graph convolutional network is defined as 1, the feature representation of the disease node is an aggregated representation of the features of all cancer patients suffering from that disease, and then the feature representation of each disease is... The input is projected to obtain a contrast representation. The projector structure is a two-layer fully connected network.
[0079] The contrastive loss in S4 is constructed as follows:
[0080] According to the ICD-10 classification standard, diseases within the same disease group should have more similar representations, while disease representations between different disease groups or different disease chapters should have lower similarities. Based on this, after obtaining the contrastive representation of each disease node through the graph convolutional network encoder and projector defined in S4, a contrastive loss function L is constructed. marginNCE Specifically, L marginNCE The calculation method is as follows:
[0081]
[0082] Where N is the total number of disease nodes; This represents a pair of positive samples; V represents a pair of negative samples; - Indicated by d i The set consisting of k negative samples; τ is a hyperparameter; sim(d i ,d j ) is a measure of disease d i and d j The function of similarity, specifically. in, and The disease node d is obtained by the graph convolutional network encoder and projector defined in S4. i and d j The contrastive characterization, and express and The modulus length; m is the decision boundary and m<0, by adding the decision boundary m, the relationship between positive and negative samples and node d is reduced. i The difference boundary of the similarity measure between them is used to better adapt to the positive and negative sample pair construction method described in S3.
[0083] The specific patient feature representation generated in S5 is as follows:
[0084] The feature representation of cancer patient p is generated based on the structure of the patient-disease relationship graph, combined with clinical features and historical comorbidity information; specifically, it is represented by clinical features. Co-morbid neighbors aggregation Gathering with neighbors of cancer patients Composition; the final characteristics of cancer patients are represented by h p Depend on and The result after splicing is as follows:
[0085]
[0086] Here, || represents the concatenation of vectors.
[0087] Clinical characteristics of cancer patients It represents the patient's demographic characteristics, treatment information, and pathological information, and is constructed as follows:
[0088]
[0089] Among them, W s and b s Let represent the trainable weight matrix and bias term, respectively, and σ represent the activation function. This represents the patient's initial characteristics;
[0090] The disease neighbor aggregation represents By aggregating the first-order neighbors of cancer patients, the calculation process of different nodes shares the same set of parameters, and the specific calculation method is as follows:
[0091]
[0092] Where N(p) represents the set of first-order neighbors of cancer patient node p, p' is an element in set N(p), and h p′ This is the feature representation of node p′. The AGGREGATE function aims to aggregate the embedding representations of node p’s neighbors, and the mean calculation function can be selected. This is the collaborative representation generated by the aggregation function AGGREGATE;
[0093] Based on the disease chapter (e.g., circulatory system, oncology, respiratory system, etc.) to which a disease node belongs, meta-paths such as "patient-disease chapter-patient" can be found in the patient-disease relationship graph, including "patient-circulatory system disease-patient," "patient-oncology-patient," and "patient-respiratory system disease-patient." Each meta-path can connect two cancer patients, and since the two cancer patients connected by the meta-path have diseases in the same disease chapter, they are more likely to have similar physical conditions or clinical manifestations. Based on this, potential relationships between patients can be further explored based on the meta-paths. Cancer patient neighbor aggregation representation. This is obtained by aggregating the feature representations of neighboring patient nodes connected by the meta-path;
[0094] The cancer patient neighbor aggregation representation The results are obtained by aggregating the second-order neighbor nodes of cancer patients. For a cancer patient node p, the neighbor nodes of cancer patients associated with cancer patient node p through the same meta-path are first aggregated individually to obtain the aggregation results of cancer patient neighbor nodes under each meta-path.
[0095]
[0096] Where, Φ r Let r represent the metapath of the r-th disease chapter, where r = 1, 2, ..., M, and M is the number of metapath types. This indicates that node p is traversed via metapath Φ r The set of neighboring patient nodes associated with the disease; j is the set of... The node in h j It is the feature representation of node j; This is a trainable weight matrix; That is, set The number of nodes;
[0097] Then, considering that the impact of diseases in different disease chapters on the cancer survival prediction task varies, the weights of each disease chapter are further calculated. This weight is then used to weight the feature representations under each disease chapter. Specifically, The calculation method is as follows:
[0098]
[0099] Among them, V p Represents the set of cancer patient nodes, |V p | indicates V p The number of nodes in the array; q is a column vector whose parameters are obtained through training; tanh is an activation function; W α and b αThese are the trainable parameter matrix and the bias term, respectively. Node p is the metapath Φ r The aggregate representation of the associated neighbor nodes; M is the number of meta-path types;
[0100] Finally, the weighted sum of the feature representations for each disease chapter is calculated.
[0101]
[0102] in, This indicates the weight of each disease chapter; Node p is the metapath Φ r The aggregated representation of the neighbor nodes of the associated cancer patients; M is the number of meta-path types.
[0103] The classification loss is constructed in S5 as follows:
[0104] Representing the final characteristics of cancer patients h p The survival prediction probability of cancer patients is obtained by using a fully connected layer and a sigmoid function.
[0105] Classification loss function L clf The cross-entropy loss function can be used, as shown in the following formula:
[0106]
[0107] in, y represents the predicted probability for cancer patient p; p This represents the actual survival status of cancer patient p; N is the total number of cancer patients.
[0108] In S6, model training, loss function optimization, and classification prediction of cancer patients' survival status are specifically performed as follows:
[0109] Historical disease data, demographic, treatment, and pathological clinical data of cancer patients were acquired. The acquired cancer patient data was divided into training, validation, and test sets in a 7:1:2 ratio, and the historical disease and clinical data were preprocessed. Based on the patients' historical disease information, a patient-disease relationship graph containing all cancer patients was constructed, and feature representations of cancer patients and disease nodes were initialized separately. Feature representations of disease nodes were obtained using a graph convolutional network. On the one hand, The input projector yields a comparative representation of disease nodes. Based on comparative characterization Calculate the contrast loss L marginNCEOn the other hand, the clinical features of cancer patient nodes, the feature representations of co-disease neighbor nodes, and the feature representations of cancer patient neighbor nodes based on meta-paths are aggregated separately, and the aggregated results are concatenated to obtain the final feature representation h of the cancer patient node. p Then h p The data is input into a survival prediction classifier to obtain the survival prediction probability. Predicted probabilities based on cancer patients in the training set and the real survival status y p Calculate the classification loss function L clf Finally, the total loss function L is as follows:
[0110] L=λL clf +(1-λ)L marfinNCE
[0111] Where λ is a hyperparameter. The loss function L is optimized using the Adam algorithm until the value of L no longer decreases, at which point training stops, and a well-trained prediction model is obtained.
[0112] When predicting the 5-year survival probability of cancer patients in the test set, based on the constructed patient-disease relationship graph, the trained prediction model is used to obtain the feature representation of disease nodes, generate the clinical feature representation, comorbid neighbor aggregation representation, and meta-path-based cancer patient neighbor aggregation representation of cancer patients in the test set, and then concatenate the three feature representations of different dimensions and pass them through the survival prediction classifier to obtain the survival prediction result of cancer patients.
[0113] The embodiments described above merely illustrate specific implementation methods of this application, and while the descriptions are detailed, they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the technical solution of this application, and these modifications and improvements all fall within the scope of protection of this application.
Claims
1. A method for constructing a cancer survival prediction model based on graph contrastive learning, characterized in that, Includes the following steps: S1: Acquire clinical data and historical comorbidity data of cancer patients, and preprocess the clinical data and historical comorbidity data; S2: Construct a patient-disease relationship graph, initialize the cancer patient feature representation with relevant clinical features, and initialize the disease feature representation with one-hot encoding; S3: Based on S2, construct positive and negative disease sample pairs according to the ICD-10 disease classification standard; S4: Generate feature representations of disease nodes based on S2, S3 and graph convolutional networks, generate contrastive representations of disease nodes through projectors, and construct contrastive loss. S5: Generate feature representations of cancer patients based on the patient-disease relationship graph structure and graph neural network, and construct a classification loss; S6: Model training, loss function optimization, and classification and prediction of survival status for cancer patients; In S3, based on the ICD-10 disease classification standard, positive and negative disease sample pairs are constructed as follows: Based on the ICD-10 classification standard, for a disease A, another disease B is randomly selected from its disease group to form a positive sample pair (A, B); at the same time, k negative sample pairs are obtained through sampling. The specific sampling method for negative sample pairs is as follows: first, k1 diseases that are not in the same disease chapter as disease A are randomly selected as the first negative sample; then, k-k1 diseases that are in the same disease chapter but different disease groups as disease A are randomly selected as the second negative sample. The proportion of the second negative sample is determined by adjusting the ratio of (k-k1) to k; the k negative samples, together with the first negative sample and the second negative sample, form k negative sample pairs. The specific representation of cancer patient characteristics generated in S5 is as follows: The feature representation of cancer patient p is generated based on the structure of the patient-disease relationship graph, combined with clinical features and historical comorbidity information; specifically, it is represented by clinical features. Co-morbid neighbors aggregation Gathering with neighbors of cancer patients Composition; final characteristics of cancer patients Depend on , and The result after splicing is calculated using the following formula: ; Where || denotes the concatenation of vectors; The clinical characteristics of the cancer patients are represented It represents the patient's demographic characteristics, treatment information, and pathological information, and is constructed as follows: ; in, and Let these represent the trainable weight matrix and the bias term, respectively. This represents the activation function. This represents the patient's initial characteristics; The co-disease neighbor aggregation represents The first-order neighbors of cancer patients are aggregated, and the calculation process for different nodes shares the same set of parameters. The specific calculation method is as follows: ; in, Nodes representing cancer patients The set of first-order neighbors, It is a set The elements in It is a node Feature representation, The function aims to aggregate nodes. The embedding representation of the neighbors can be obtained using a mean calculation function. This is determined by aggregate functions. The resulting collaborative representation; The cancer patient neighbor aggregation representation This is obtained by aggregating the second-order neighbor nodes of cancer patients; for a cancer patient node... First, the nodes connected to cancer patients via the same meta-path. The associated cancer patient neighbor nodes are aggregated separately to obtain the aggregation results of cancer patient neighbor nodes under each meta-path. : ; in, Indicates the first Metapath of disease chapter, =1,2, ..., , This represents the number of metapath types. Represents a node via metapath The set of neighboring nodes of the associated cancer patients; It is a set The nodes in It is a node Feature representation; This is a trainable weight matrix; That is, set The number of nodes; Then, considering that the impact of diseases in different disease chapters on the cancer survival prediction task varies, the weights of each disease chapter are further calculated. This weight is then used to weight the feature representations under each disease chapter. Specifically, The calculation method is as follows: ; in, Represents a set of nodes representing cancer patients. express The number of nodes in; It is a column vector whose parameters are obtained through training; It is an activation function; and These are the trainable parameter matrix and the bias term, respectively. It is a node Metapath Aggregate representation of the associated neighboring nodes; It is the number of metapath types; Finally, the weighted sum of the feature representations for each disease chapter is calculated. : ; in, This indicates the weight of each disease chapter; It is a node Metapath Aggregate representation of the associated cancer patient nodes; It is the number of metapath types.
2. The method for constructing a cancer survival prediction model based on graph contrastive learning according to claim 1, characterized in that, The construction of the patient-disease relationship diagram in S2 is specifically as follows: Constructing a patient-disease relationship graph =( , ), Let E be the set of points and E be the set of edges; in the patient-disease relationship graph, It can be divided into two disjoint subsets of nodes. and ,in Each node in the diagram represents a cancer patient. Each node in the diagram represents a chronic comorbidity within a cancer population; if the patient Suffering from illness This will indicate that the patient The nodes and representations of diseases The nodes are connected, and ultimately the edge set is composed of all patient-disease connections. .
3. The method for constructing a cancer survival prediction model based on graph contrastive learning according to claim 1, characterized in that, In S2, the cancer patient feature representation is initialized with relevant clinical features, and the disease feature representation is initialized with one-hot encoding, specifically as follows: The clinical characteristics of cancer patients include demographic information, treatment information, and pathological information. These corresponding features are selected as the initial feature representations for the cancer patient nodes. ,in Indicates the first The first cancer patient; the feature representation of the disease node is initialized using one-hot encoding, specifically, the first... Disease nodes Initial feature representation .
4. The method for constructing a cancer survival prediction model based on graph contrastive learning according to claim 1, characterized in that, In S4, the feature representation of disease nodes generated based on graph convolutional networks, and the comparative representation of disease nodes generated through projectors, are specifically as follows: In the patient-disease relationship diagram In the diagram, the first-order neighbors of disease nodes are all patient nodes, and the first-order neighbors of patient nodes are all disease nodes; firstly, based on the patient-disease relationship graph... A graph convolutional network is used as the feature extraction encoder to obtain the feature representation of each disease node. Specifically, when the number of layers in the graph convolutional network is defined as 1, the feature representation of the disease node is an aggregated representation of the features of all cancer patients suffering from that disease, and then the feature representation of each disease is... The input is projected to obtain a contrast representation. The projector structure is a two-layer fully connected network.
5. The method for constructing a cancer survival prediction model based on graph contrastive learning according to claim 1, characterized in that, The specific method for constructing the contrastive loss in S4 is as follows: According to the ICD-10 classification standard, the diseases in the same disease group should have more similar representations, and the representations of the diseases in different disease groups or different disease chapters should have lower similarity. Based on this, after obtaining the contrast representation of each disease node by the graph convolution network encoder and projector defined in S4, a contrast loss function L marginNCE is constructed marginNCE . Specifically, the calculation method of L marginNCE is as follows: ; in, Total number of disease nodes; This represents a pair of positive samples; V represents a pair of negative samples; - Indicates by A set consisting of k negative samples; For hyperparameters; It is a measure of disease and The function of similarity, specifically. ,in, and For disease nodes obtained through the graph convolutional network encoder and projector defined in S4 and The contrastive characterization, and express and The modulus is m; m is the decision boundary and m < 0.
6. The method for constructing a cancer survival prediction model based on graph contrastive learning according to claim 1, characterized in that, The classification loss is constructed in S5 as follows: Representing the final characteristics of cancer patients The survival prediction probability of cancer patients is obtained by using a fully connected layer and a sigmoid function. ; Classification loss function The cross-entropy loss function can be used, as shown in the following formula: ; in, This indicates concern for cancer patients. The predicted probability; Indicates cancer patients The true state of their existence; It represents the total number of cancer patients.
7. The method for constructing a cancer survival prediction model based on graph contrastive learning according to claim 1, characterized in that, The specific steps in S6, including model training, loss function optimization, and classification and prediction of cancer patients' survival status, are as follows: This process involves acquiring historical disease data, demographic, treatment, and pathological clinical data from cancer patients. The acquired data is divided into training, validation, and test sets, and the historical and clinical data are preprocessed. Based on the patients' historical disease information, a patient-disease relationship graph containing all cancer patients is constructed, and feature representations for cancer patients and disease nodes are initialized separately. Feature representations of disease nodes are then obtained using a graph convolutional network. On the one hand, The input projector yields a comparative representation of disease nodes. Based on comparative characterization Calculate the contrast loss L marginNCE On the other hand, the clinical features of cancer patient nodes, the feature representations of co-disease neighbor nodes, and the feature representations of cancer patient neighbor nodes based on meta-paths are aggregated separately, and the aggregated results are concatenated to obtain the final feature representation of cancer patient nodes. ; then will The data is input into a survival prediction classifier to obtain the survival prediction probability. Based on the predicted probability of cancer patients in the training set and the real survival status Calculate the classification loss function Finally, the total loss function L is as follows: ; Where λ is a hyperparameter; the loss function L is optimized using the Adam algorithm until the value of L no longer decreases, at which point training stops and a well-trained prediction model is obtained; When predicting the survival probability of cancer patients in the test set, based on the constructed patient-disease relationship graph, the trained prediction model is used to obtain the feature representation of disease nodes, generate the clinical feature representation, comorbid neighbor aggregation representation, and meta-path-based cancer patient neighbor aggregation representation of cancer patients in the test set, and then concatenate the three feature representations of different dimensions and pass them through the survival prediction classifier to obtain the survival prediction result of cancer patients.
Citation Information
Patent Citations
Non-coding RNA and disease association prediction method based on graph neural network
CN120600112A