A traditional chinese medicine prescription efficacy prediction method based on prescription-symptom heterogeneous graph
By using a formula-symptom heterogeneity graph-based approach, and leveraging multiple attention mechanisms and graph convolutional networks, the problem of neglecting the principle of monarch-minister-assistant-guide compatibility in traditional Chinese medicine formula recommendation is solved, achieving efficient and accurate prediction of the efficacy of traditional Chinese medicine formulas.
Patent Information
- Application Number
- CN202310333883.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-03-31
AI Technical Summary
Existing technologies fail to effectively consider the principles of monarch, minister, assistant, and guide in the recommendation of traditional Chinese medicine prescriptions, and ignore the characteristics and correlation features of Chinese medicines, resulting in redundant recommendations and insufficient prediction accuracy.
We employ a formula-symptom heterogeneity graph-based approach, which initializes TCM features through a multi-attention mechanism, constructs a formula-symptom heterogeneity network, and uses graph convolution for feature learning to improve the interpretability and accuracy of formula efficacy prediction.
By combining multiple attention mechanisms and graph convolutional networks, the accuracy and interpretability of prescription efficacy prediction are improved, prescription and symptom characteristics are reasonably represented, and the efficiency and accuracy of prediction are enhanced.
Smart Images

Figure CN116434977B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of bioinformatics, and particularly relates to a method for predicting the efficacy of traditional Chinese medicine prescriptions based on a prescription-symptom heterogeneous graph. Background Art
[0002] Traditional Chinese medicine prescriptions are generally composed according to the compatibility principle of monarch, minister, assistant, and guide, each playing its own role and being indispensable, which is a specific implementation form of traditional Chinese medicine treatment. In order to effectively improve the treatment function of prescriptions and reduce the toxic and side effects of drugs in prescriptions, according to traditional Chinese medicine theory, modern technical means are used to conduct detailed research on the principles, action mechanisms, and action pathways of prescriptions, aiming to clarify the functional mechanisms of prescriptions, define the compatibility principles of prescriptions, and can also be used to find new effects of prescriptions.
[0003] Methods, 204: 101-109 proposed a model called HPE-GCN, which combines graph convolutional networks with the characteristics of traditional Chinese medicine to predict the efficacy of prescriptions. The method for calculating the weights related to the frequency of traditional Chinese medicine and the number of traditional Chinese medicine in prescriptions is called the prescription traditional Chinese medicine dependence degree (FHDD) to evaluate the dependence degree between prescriptions and traditional Chinese medicine. The IEEE Congress on Evolutionary Computation (CEC) conference proposed that each prescription consists of multiple herbs, and there is a one-to-one mapping between prescription symptoms and herbs. Therefore, discovering the relationship between traditional Chinese medicine symptoms and traditional Chinese medicine is a key step in studying the basic principles of traditional Chinese medicine. The symptom-prescription relationship is the result of the dynamic balance of two interrelated evolutionary processes, and the combined gene genetic algorithm (CoGA1) can find the symptom-herb relationship that conforms to traditional Chinese medicine principles.
[0004] At present, many studies on recommending traditional Chinese medicine prescriptions by combining information technology simply combine drugs without necessarily meeting the compatibility principle of monarch, minister, assistant, and guide, and there may even be redundancy in the recommendations. The HPE-GCN model does not consider the importance of different characteristics of traditional Chinese medicine and the importance of different drugs in prescriptions, and the definition of the prescription dependence degree is relatively subjective. The method proposed by CEC cannot extract the deep characteristics of traditional Chinese medicine and the associated characteristics between traditional Chinese medicines, and ignores the prescription compatibility rules of monarch, minister, assistant, and guide. Summary of the Invention
[0005] To solve the above technical problems, the present invention proposes a method for predicting the efficacy of traditional Chinese medicine prescriptions based on a prescription-symptom heterogeneous graph, effectively represents the prescriptions through a multiple attention method based on the characteristics of traditional Chinese medicine, and uses graph convolution on the constructed prescription-symptom heterogeneous graph for further reinforcement learning to improve the interpretability and accuracy of prescription efficacy prediction.
[0006] The technical solution adopted by the present invention is as follows: A method for predicting the efficacy of traditional Chinese medicine prescriptions based on a prescription-symptom heterogeneous graph, and the specific steps are as follows:
[0007] S1. Statistically analyze the characteristics of traditional Chinese medicine and initialize its characteristics;
[0008] S2. Aggregate the features of traditional Chinese medicine based on the multi-attention mechanism and initialize the features of the prescription;
[0009] S3. Initialize symptom features based on the known formula-symptom correlation matrix, and perform dimensionality reduction using an encoder;
[0010] S4. Construct a heterogeneous network of prescription-symptoms;
[0011] S5. Use graph convolution for feature learning in formula-symptom heterogeneous networks;
[0012] S6. Based on step S5, use the finally learned prescription and symptom characteristics to predict efficacy.
[0013] Furthermore, step S1 is specifically as follows:
[0014] Traditional Chinese medicine (TCM) properties include their nature, flavor, meridian tropism, and toxicity, specifically categorized as "cold, hot, warm, cool, neutral; sour, bitter, sweet, pungent, salty; lung, pericardium, heart, large intestine, triple burner, small intestine, stomach, gallbladder, bladder, spleen, liver, kidney; toxicity," totaling 23 properties. All properties are quantified. For properties described with modifiers, such as "slightly cold," "cold," and "severely cold," each is represented by 2. -1 2 0 and 2 1 The attribution characteristic is represented by binary quantization, where 1 indicates the presence of the characteristic and 0 indicates its absence. Therefore, each Chinese herbal medicine is initialized as a 24-dimensional vector X containing 23 characteristic features and 1 normalized dose feature. i .
[0015] The dosage is calculated as follows:
[0016]
[0017] Among them, dosage normalization The normalized value representing the dose, dosage 平均 This indicates the average dosage of a particular Chinese herbal medicine across all prescriptions. 最小 This indicates the minimum dosage of the same Chinese herbal medicine in a prescription. 最大 This indicates the maximum dosage of the same Chinese herbal medicine in a prescription.
[0018] Furthermore, step S2 is specifically as follows:
[0019] Different characteristics of traditional Chinese medicine (TCM) have varying degrees of importance. A feature-level attention mechanism is introduced to calculate the feature attention coefficient for each TCM herb. First, the attention score S for each TCM characteristic is calculated. i fea Then normalize to obtain the feature-level attention coefficient α fea ij :
[0020] S i fea =H fea tanh(W fea X i +b fea )
[0021]
[0022] Among them, W fea and H fea The parameter matrix b that needs to be learned to represent the attention score of the characteristics of traditional Chinese medicine. fea S represents the bias vector of attention scores for the characteristics of traditional Chinese medicine. ij fea Indicates attention score S i fea The j-th value in the vector is given, where k represents the dimension of the input feature vector. The feature attention coefficient is then multiplied bit-by-bit by the original feature vector to obtain the feature-enhanced feature vector X. i ′:
[0023]
[0024] Each prescription consists of multiple Chinese herbs, each with varying importance. A drug-level attention mechanism is introduced. Before aggregating the features of the herbs into the features of the prescription, it is necessary to calculate the attention score of each herb. First, the attention score S of each herb is calculated. i Then normalize to obtain the drug-grade attention coefficient β i :
[0025] S i =Htanh(WX i ′+b)
[0026]
[0027] Where W and H represent the parameter matrices that need to be learned for the attention score of each herb, b represents the bias vector for the attention score of each herb, and num represents the number of herbs in the prescription. Therefore, the prescription feature x i pre The dimension is the same as that of traditional Chinese medicine characteristics, which is 24, and is initialized as follows:
[0028] xi pre =∑ j∈num β j X j ′
[0029] Furthermore, step S3 is specifically as follows:
[0030] First, symptom characteristics are initialized, and the known formula-symptom relationship matrix is obtained based on the data of traditional Chinese medicine formulas.
[0031] In the formula-symptom relationship matrix, each element takes the value of 0 or 1. A value of 0 indicates that there is no known treatment relationship between the symptom and the formula represented by the element, while a value of 1 indicates that there is a known treatment relationship between the symptom and the formula represented by the element. Each row of the formula-symptom relationship matrix represents the initial feature vector of a symptom, and the feature vectors of all symptoms constitute the feature matrix Y of the symptoms.
[0032] A fully connected autoencoder is used to reduce the dimensionality of the symptom feature matrix Y, obtaining a 24-dimensional low-dimensional feature representation with the same dimensions as the formula features. The fully connected autoencoder consists of encoding and decoding parts, each consisting of two neural network layers.
[0033] The encoder consists of two hidden layers, each containing a linear layer and a non-linear activation function. The symptom feature matrix Y is fed as input into the first hidden layer.
[0034]
[0035]
[0036] in, and These represent the weight matrices of the first and second layer encoders, respectively. and This represents the corresponding bias matrix. and These represent the outputs of the hidden layers of the two encoders, respectively, and σ represents the ReLU activation function.
[0037] The decoder also consists of two layers of neural networks, with As input to the decoding module:
[0038]
[0039]
[0040] in, and These represent the weight matrices of the first and second layer decoders, respectively. and This represents the corresponding bias matrix. and σ represents the output of the hidden layers of the two decoders, and σ represents the ReLU activation function.
[0041] The goal of an autoencoder is to minimize the difference between the input and output, and the corresponding loss function is:
[0042]
[0043] in, Y represents the output of the decoder. i The i-th row of the feature matrix Y representing symptoms is the feature vector of the input symptom training samples, and quan represents the number of symptom training samples.
[0044] Therefore, the final symptom feature vector obtained It is expressed as follows:
[0045]
[0046] Furthermore, step S4 is specifically as follows:
[0047] First, construct the formula similarity network F:
[0048] For two prescriptions a and b, the similarity between the prescriptions refers to the similarity of the feature vectors of a. and the eigenvectors of b The cosine similarity between them is calculated as follows:
[0049]
[0050] The similarity between the prescriptions, sim(a,b), is used as the weight between nodes a and b. A threshold θ is defined; if sim(a,b) > θ, an edge is established between the two prescription nodes, thus completing the construction of the prescription similarity network.
[0051] Reconstruct the symptom similarity network D:
[0052] Similar to the formula similarity network, a symptom similarity network is constructed by calculating the cosine similarity of the initial features of the symptoms. The edge weights are the cosine similarity of the symptom features. The symptom similarity network is represented by a matrix.
[0053] Where, N d D indicates the number of symptoms. i,j Symptom D i Symptom D j The similarity between symptoms is calculated, with symptom similarity values ranging from [0,1]. For symptom m and symptom n, their feature vectors... and The cosine similarity between them is calculated as follows:
[0054]
[0055] Where dg represents the dimension of the symptom feature vector. and Let represent the j-th value of the feature vectors of symptom m and symptom n, respectively;
[0056] Based on the formula similarity network F and the symptom similarity network D, a formula-symptom heterogeneity network P is constructed:
[0057] Construct a bipartite graph connecting the prescription and symptom nodes, and use the edges in the constructed bipartite graph to connect N f Each prescription and N d The symptoms are connected from different networks. The formula similarity network F and the symptom similarity network D are connected through the formula-symptom relationship matrix E, forming a formula-symptom heterogeneous network P, where... i and j represent the prescription node and symptom node, respectively, denoted by E. i,j This indicates the weights between them. When formula E i,: Symptom E :,j When there is a known therapeutic relationship, E i,j =1, when it is unknown, E i,j =0. The adjacency matrix A of the formula-symptom heterogeneous network P is represented as follows:
[0058]
[0059] Furthermore, step S5 is specifically as follows:
[0060] Formula characteristics x i pre Symptom characteristics The feature matrix that makes up the heterogeneous network P is then input into a GCN (Graph Convolutional Network) to obtain new prescription and symptom features:
[0061]
[0062] Where Z represents the feature matrix of the input heterogeneous network P, and A represents the adjacency matrix of the heterogeneous network P. Let X represent the degree matrix of the nodes, W represent the corresponding weight parameters of the graph convolution, σ represent the ReLU activation function, and X represent the degree matrix of the nodes. pre,dis This represents the feature matrix of prescriptions and symptoms obtained after graph convolution, where each row represents the feature vector of a prescription or symptom.
[0063] Furthermore, step S6 is specifically as follows:
[0064] Based on step S5, after obtaining the final formula and symptom feature vectors, the probability of correlation between the formula and symptoms is calculated:
[0065]
[0066] Where, x pre and x dis They represent the sources from matrix X. pre,dis The final prescription and symptom feature vector, score pre,dis This indicates the probability that a prescription is related to a symptom.
[0067] During training, binary cross-entropy is used as the loss function:
[0068]
[0069] Where μ represents the total number of training samples, y pre,dis This indicates the true correlation between prescription and symptoms.
[0070] After obtaining the formula and symptom representations through the above steps, the correlation probability of the final output is judged. The formula with a high correlation probability may be considered as a new possible therapeutic effect.
[0071] The beneficial effects of this invention are as follows: The method of this invention first statistically analyzes the characteristic features of traditional Chinese medicine (TCM) to initialize TCM features. Based on a multi-attention mechanism, the TCM features are aggregated to initialize formula features. Then, symptom features are initialized based on a known formula-symptom association matrix and dimensionality reduction is achieved through an encoder. Next, a heterogeneous formula-symptom network is constructed, and graph convolution is used for feature learning within this heterogeneous network. Finally, the learned formula and symptom features are used for efficacy prediction. This invention's method utilizes a multi-attention mechanism, resulting in a more reasonable representation of formula features. The use of an encoder to reduce the dimensionality of symptom features improves training efficiency. Constructing a heterogeneous formula-symptom network and using graph convolution for feature learning allows for more intuitive and efficient prediction of formula efficacy, thus improving the accuracy of formula efficacy prediction. Attached Figure Description
[0072] Figure 1 This is a flowchart of a method for predicting the efficacy of traditional Chinese medicine prescriptions based on prescription-symptom isomerism diagrams, according to the present invention.
[0073] Figure 2 This is a diagram of the formula feature representation learning model in an embodiment of the present invention.
[0074] Figure 3 This is a diagram of the symptom feature representation learning model in an embodiment of the present invention.
[0075] Figure 4 This is a diagram of the formula-symptom heterogeneous network representation model in an embodiment of the present invention.
[0076] Figure 5 This is a diagram of the prescription-symptom relationship prediction model in an embodiment of the present invention. Detailed Implementation
[0077] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0078] like Figure 1 The flowchart of a method for predicting the efficacy of traditional Chinese medicine prescriptions based on prescription-symptom isomerism diagrams is shown below. The specific steps are as follows:
[0079] S1. Statistically analyze the characteristics of traditional Chinese medicine and initialize its characteristics;
[0080] S2. Aggregate the features of traditional Chinese medicine based on the multi-attention mechanism and initialize the features of the prescription;
[0081] S3. Initialize symptom features based on the known formula-symptom correlation matrix, and perform dimensionality reduction using an encoder;
[0082] S4. Construct a heterogeneous network of prescription-symptoms;
[0083] S5. Use graph convolution for feature learning in formula-symptom heterogeneous networks;
[0084] S6. Based on step S5, use the finally learned prescription and symptom characteristics to predict efficacy.
[0085] In this embodiment, step S1 is specifically as follows:
[0086] Traditional Chinese medicine (TCM) properties include their nature, flavor, meridian tropism, and toxicity, specifically categorized as "cold, hot, warm, cool, neutral; sour, bitter, sweet, pungent, salty; lung, pericardium, heart, large intestine, triple burner, small intestine, stomach, gallbladder, bladder, spleen, liver, kidney; toxicity," totaling 23 properties. All properties are quantified. For properties described with modifiers, such as "slightly cold," "cold," and "severely cold," each is represented by 2. -1 2 0 and 2 1 The attribution characteristic is represented by binary quantization, where 1 indicates the presence of the characteristic and 0 indicates its absence. Therefore, each Chinese herbal medicine is initialized as a 24-dimensional vector X containing 23 characteristic features and 1 normalized dose feature. i .
[0087] The dosage is calculated as follows:
[0088]
[0089] Among them, dosage normalizationThe normalized value representing the dose, dosage 平均 This indicates the average dosage of a particular Chinese herbal medicine across all prescriptions. 最小 This indicates the minimum dosage of the same Chinese herbal medicine in a prescription. 最大 This indicates the maximum dosage of the same Chinese herbal medicine in a prescription.
[0090] For example, white peony root is bitter, sour, and slightly cold in nature, enters the liver and spleen meridians, and has weak toxicity. With a normalized dose of 0.48, the initial characteristics of white peony root are:
[0091]
[0092] X 白芍 =(0.5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0.5,0.48)
[0093] like Figure 2 As shown, in this embodiment, step S2 is specifically as follows:
[0094] Different characteristics of traditional Chinese medicine (TCM) have varying degrees of importance. A feature-level attention mechanism is introduced to calculate the feature attention coefficient for each TCM herb. First, the attention score S for each TCM characteristic is calculated. i fea Then normalize to obtain the feature-level attention coefficient α fea ij :
[0095] S i fea =H fea tanh(W fea X i +b fea )
[0096]
[0097] Among them, W fea and H fea The parameter matrix b that needs to be learned to represent the attention score of the characteristics of traditional Chinese medicine. fea S represents the bias vector of attention scores for the characteristics of traditional Chinese medicine. ij fea Indicates attention score S i fea The j-th value in the vector is given, where k represents the dimension of the input feature vector. The feature attention coefficient is then multiplied bit-by-bit by the original feature vector to obtain the feature-enhanced feature vector X. i ′:
[0098]
[0099] Each prescription consists of multiple Chinese herbs, each with varying importance. A drug-level attention mechanism is introduced. Before aggregating the features of the herbs into the features of the prescription, it is necessary to calculate the attention score of each herb. First, the attention score S of each herb is calculated. i Then normalize to obtain the drug-grade attention coefficient β i :
[0100] S i =Htanh(WX i ′+b)
[0101]
[0102] Where W and H represent the parameter matrices that need to be learned for the attention score of each herb, b represents the bias vector for the attention score of each herb, and num represents the number of herbs in the prescription. Therefore, the prescription feature x i pre The dimension is the same as that of traditional Chinese medicine characteristics, which is 24, and is initialized as follows:
[0103] x i pre =∑ j∈num β j X j ′
[0104] like Figure 3 As shown, in this embodiment, step S3 is specifically as follows:
[0105] First, symptom characteristics are initialized, and the known formula-symptom relationship matrix is obtained based on the data of traditional Chinese medicine formulas.
[0106] In the formula-symptom relationship matrix, each element takes the value of 0 or 1. A value of 0 indicates that there is no known treatment relationship between the symptom and the formula represented by the element, while a value of 1 indicates that there is a known treatment relationship between the symptom and the formula represented by the element. Each row of the formula-symptom relationship matrix represents the initial feature vector of a symptom, and the feature vectors of all symptoms constitute the feature matrix Y of the symptoms.
[0107] A fully connected autoencoder is used to reduce the dimensionality of the symptom feature matrix Y, obtaining a 24-dimensional low-dimensional feature representation with the same dimensions as the formula features. The fully connected autoencoder consists of encoding and decoding parts, each consisting of two neural network layers.
[0108] The encoder consists of two hidden layers, each containing a linear layer and a non-linear activation function. The symptom feature matrix Y is fed as input into the first hidden layer.
[0109]
[0110]
[0111] in, and These represent the weight matrices of the first and second layer encoders, respectively. and This represents the corresponding bias matrix. and These represent the outputs of the hidden layers of the two encoders, respectively, and σ represents the ReLU activation function.
[0112] The decoder also consists of two layers of neural networks, with As input to the decoding module:
[0113]
[0114]
[0115] in, and These represent the weight matrices of the first and second layer decoders, respectively. and This represents the corresponding bias matrix. and σ represents the output of the hidden layers of the two decoders, and σ represents the ReLU activation function.
[0116] The goal of an autoencoder is to minimize the difference between the input and output, and the corresponding loss function is:
[0117]
[0118] in, Y represents the output of the decoder. i The i-th row of the feature matrix Y representing symptoms is the feature vector of the input symptom training samples, and quan represents the number of symptom training samples.
[0119] Therefore, the final symptom feature vector obtained It is expressed as follows:
[0120]
[0121] In this embodiment, step S4 is specifically as follows:
[0122] First, construct the formula similarity network F:
[0123] For two prescriptions a and b, the similarity between the prescriptions refers to the similarity of the feature vectors of a. and the eigenvectors of b The cosine similarity between them is calculated as follows:
[0124]
[0125] The similarity between the prescriptions, sim(a,b), is used as the weight between nodes a and b. A threshold θ is defined; if sim(a,b) > θ, an edge is established between the two prescription nodes, thus completing the construction of the prescription similarity network.
[0126] Reconstruct the symptom similarity network D:
[0127] Similar to the formula similarity network, a symptom similarity network is constructed by calculating the cosine similarity of the initial features of the symptoms. The edge weights are the cosine similarity of the symptom features. The symptom similarity network is represented by a matrix.
[0128] Where, N d D indicates the number of symptoms. i,j Symptom D i Symptom D j The similarity between symptoms is calculated, with symptom similarity values ranging from [0,1]. For symptom m and symptom n, their feature vectors... and The cosine similarity between them is calculated as follows:
[0129]
[0130] Where dg represents the dimension of the symptom feature vector. and Let represent the j-th value of the feature vectors of symptom m and symptom n, respectively;
[0131] like Figure 4 As shown, based on the formula similarity network F and the symptom similarity network D, a formula-symptom heterogeneity network P is constructed:
[0132] Construct a bipartite graph connecting the prescription and symptom nodes, and use the edges in the constructed bipartite graph to connect N f Each prescription and N d The symptoms are connected from different networks. The formula similarity network F and the symptom similarity network D are connected through the formula-symptom relationship matrix E, forming a formula-symptom heterogeneous network P, where... i and j represent the prescription node and symptom node, respectively, denoted by E. i,j This indicates the weights between them. When formula E i,: Symptom E :,j When there is a known therapeutic relationship, E i,j =1, when it is unknown, E i,j =0. The adjacency matrix A of the formula-symptom heterogeneous network P is represented as follows:
[0133]
[0134] like Figure 5 As shown, in this embodiment, step S5 is specifically as follows:
[0135] Formula characteristics x i pre Symptom characteristics The feature matrix that makes up the heterogeneous network P is then input into a GCN (Graph Convolutional Network) to obtain new prescription and symptom features:
[0136]
[0137] Where Z represents the feature matrix of the input heterogeneous network P, and A represents the adjacency matrix of the heterogeneous network P. Let X represent the degree matrix of the nodes, W represent the corresponding weight parameters of the graph convolution, σ represent the ReLU activation function, and X represent the degree matrix of the nodes. pre,dis This represents the feature matrix of prescriptions and symptoms obtained after graph convolution, where each row represents the feature vector of a prescription or symptom.
[0138] In this embodiment, step S6 is specifically as follows:
[0139] Based on step S5, after obtaining the final formula and symptom feature vectors, the probability of correlation between the formula and symptoms is calculated:
[0140]
[0141] Where, x pre and x dis They represent the sources from matrix X. pre,dis The final prescription and symptom feature vector, score pre,dis This indicates the probability that a prescription is related to a symptom.
[0142] During training, binary cross-entropy is used as the loss function:
[0143]
[0144] Where μ represents the total number of training samples, y pre,dis This indicates the true correlation between prescription and symptoms.
[0145] After obtaining the formula and symptom representations through the above steps, the correlation probability of the final output is judged. The formula with a high correlation probability may be considered as a new possible therapeutic effect.
[0146] In summary, compared with existing technologies, the method of this invention initializes the formula features through a multi-attention mechanism, resulting in a more reasonable feature representation of the formula. It uses a feature-level attention mechanism to consider the importance of different features of traditional Chinese medicine, and a drug-level attention mechanism to consider the importance of different drugs in the formula. Then, an encoder is used to reduce the dimensionality of the symptom features to improve learning efficiency. Based on known medical knowledge, a novel formula-symptom heterogeneous network is constructed, and graph convolution is used to further learn the features of formulas and symptoms, thereby better predicting the formula-symptom relationship.
[0147] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.
Claims
1. A method for predicting the efficacy of traditional Chinese medicine prescriptions based on prescription-symptom isomerism, the specific steps of which are as follows: S1. Statistically analyze the characteristics of traditional Chinese medicine and initialize its characteristics; The specific steps of S1 are as follows: Traditional Chinese medicine (TCM) properties include their nature, flavor, meridian tropism, and toxicity, specifically categorized as "cold, hot, warm, cool, neutral; sour, bitter, sweet, pungent, salty; lung, pericardium, heart, large intestine, triple burner, small intestine, stomach, gallbladder, bladder, spleen, liver, kidney; toxicity," totaling 23 properties. All properties are quantified; for properties described with modifiers, "slightly cold," "cold," and "severely cold" are quantified using 2... -1 2 0 and 2 1 The attribution characteristics are represented using binary quantization, where 1 indicates the presence of the characteristic and 0 indicates its absence. Therefore, each Chinese herbal medicine is fixedly initialized as a 24-dimensional vector containing 23 characteristic features and 1 normalized dose feature. ; The dosage is calculated as follows: ; in, This represents the normalized value of the dose. This indicates the average dosage of a certain Chinese herbal medicine in all prescriptions. This indicates the minimum dosage of the same Chinese herbal medicine in a prescription. This indicates the maximum dosage of the same Chinese herbal medicine in a prescription. S2. Aggregate the features of traditional Chinese medicine based on the multi-attention mechanism and initialize the features of the prescription; Step S2 is as follows: Different characteristics of traditional Chinese medicine (TCM) have varying degrees of importance. Therefore, a feature-level attention mechanism is introduced to calculate the feature attention coefficient for each TCM herb. First, the attention score for each TCM characteristic is calculated. Then normalize to obtain feature-level attention coefficients. : ; ; in, and The parameter matrix that needs to be learned to represent the attention scores that indicate the characteristics of traditional Chinese medicine. The bias vector representing the attention score of the characteristics of traditional Chinese medicine. Attention score The j-th value in the vector, k represents the dimension of the input feature vector; then the feature attention coefficient is multiplied bit by bit with the original feature to obtain the feature vector enhanced at the feature level. : ; Each prescription consists of multiple Chinese herbs, each with varying importance. A drug-level attention mechanism is introduced; before aggregating the characteristics of the herbs into the characteristics of the prescription, the attention score of each herb needs to be calculated. Then normalize to obtain the drug-grade attention coefficient : ; ; in, and The parameter matrix representing the attention score that needs to be learned for each Chinese herbal medicine. Let represent the bias vector of the attention score for each Chinese herb, and num represent the number of Chinese herbs in the prescription; therefore, the prescription features The dimension is the same as that of traditional Chinese medicine characteristics, which is 24, and is initialized as follows: ; S3. Initialize symptom features based on the known formula-symptom correlation matrix, and perform dimensionality reduction using an encoder; S4. Construct a heterogeneous network of prescription-symptoms; Step S4 is as follows: First, construct the formula similarity network F: For two prescriptions a and b, the similarity between the prescriptions refers to the similarity of the feature vectors of a. and the eigenvectors of b The cosine similarity between them is calculated as follows: ; Similarity of prescriptions As the weight between nodes a and b; define a threshold θ, if... Then, an edge will be established between the two prescription nodes, completing the construction of the prescription similarity network; Reconstruct the symptom similarity network D: Similar to the formula similarity network, a symptom similarity network is constructed by calculating the cosine similarity of the initial features of the symptoms. The edge weights are the cosine similarity of the symptom features. The symptom similarity network is represented by a matrix. ; in, Indicates the number of symptoms. Indicates symptoms Symptoms The similarity between symptoms is defined as follows: the symptom similarity value is in the interval [0,1]; for symptoms m and n, their feature vectors... and The cosine similarity between them is calculated as follows: ; Where dg represents the dimension of the symptom feature vector. and Let represent the j-th value of the feature vectors of symptom m and symptom n, respectively; Based on the formula similarity network F and the symptom similarity network D, a formula-symptom heterogeneity network P is constructed: Construct a bipartite graph connecting prescription and symptom nodes, and use the edges in the constructed bipartite graph to... individual prescriptions and The symptoms are connected from different networks; the prescription similarity network F and the symptom similarity network D are connected through the prescription-symptom relationship matrix E, forming a prescription-symptom heterogeneous network P, in which... i and j represent the prescription node and symptom node, respectively. Indicate the weights between them; when the prescription Symptoms When there is a known therapeutic relationship, When it is unknown, The adjacency matrix A of the formula-symptom heterogeneous network P is represented as follows: ; S5. Use graph convolution for feature learning in formula-symptom heterogeneous networks; S6. Based on step S5, use the finally learned prescription and symptom characteristics to predict efficacy.
2. The method for predicting the efficacy of traditional Chinese medicine prescriptions based on prescription-symptom isomerism graphs according to claim 1, characterized in that, Step S3 is as follows: First, symptom features are initialized, and a known formula-symptom relationship matrix is obtained based on traditional Chinese medicine formula data. In this matrix, each element of the formula-symptom relationship takes the value 0 or 1. A value of 0 indicates that there is no known therapeutic relationship between the symptom and the formula represented by that element, while a value of 1 indicates that there is a known therapeutic relationship between the symptom and the formula represented by that element. Each row of the formula-symptom relationship matrix represents the initial feature vector of a symptom, and the feature vectors of all symptoms constitute the feature matrix of the symptoms. ; Based on a fully connected autoencoder of the symptom feature matrix Dimensionality reduction is performed to obtain a 24-dimensional low-dimensional feature representation with the same dimensions as the formula features; the fully connected autoencoder consists of encoding and decoding parts, each of which consists of two neural network layers; The encoder consists of two hidden layers, each containing a linear layer and a non-linear activation function; symptom feature matrix This is fed into the first hidden layer as input: ; ; in, and These represent the weight matrices of the first and second layer encoders, respectively. and This represents the corresponding bias matrix. and These represent the outputs of the hidden layers of the two encoders, Represents the activation function ReLU; The decoder also consists of two layers of neural networks, with As input to the decoding module: ; ; in, and These represent the weight matrices of the first and second layer decoders, respectively. and This represents the corresponding bias matrix. and These represent the outputs of the hidden layers of the two decoders, Represents the activation function ReLU; The goal of an autoencoder is to minimize the difference between the input and output; the corresponding loss function is: ; in, This represents the output of the decoder. Feature matrix representing symptoms The i-th row is the feature vector of the input symptom training samples, and quan represents the number of symptom training samples; Therefore, the final symptom feature vector obtained It is expressed as follows: 。 3. The method for predicting the efficacy of traditional Chinese medicine prescriptions based on prescription-symptom isomerism graphs according to claim 1, characterized in that, Step S5 is as follows: Formula characteristics Symptom characteristics The feature matrix that makes up the heterogeneous network P is then input into the GCN graph convolutional network to obtain new prescription and symptom features: ; Where Z represents the feature matrix of the input heterogeneous network P, and A represents the adjacency matrix of the heterogeneous network P. Let W represent the degree matrix of the nodes, and let W represent the corresponding weight parameters of the graph convolution. Represents the activation function ReLU. This represents the feature matrix of prescriptions and symptoms obtained after graph convolution, where each row represents the feature vector of a prescription or symptom.
4. The method for predicting the efficacy of traditional Chinese medicine prescriptions based on prescription-symptom isomerism graphs according to claim 1, characterized in that, Step S6 is as follows: Based on step S5, after obtaining the final formula and symptom feature vectors, the probability of correlation between the formula and symptoms is calculated: ; in, and They represent the sources from the matrix. The final prescription and symptom feature vector, This indicates the probability that the prescription is related to the symptoms; During training, binary cross-entropy is used as the loss function: ; in, This represents the total number of training samples. This indicates the true correlation between prescription and symptoms; After obtaining the formula and symptom representations through the above steps, the correlation probability of the final output is judged. The formula with a high correlation probability may be considered as a new possible therapeutic effect.
Citation Information
Patent Citations
Traditional Chinese medicine efficacy predicting method based on multitask deep neural network
CN111383740A
Traditional Chinese medicine prescription efficacy prediction method based on graph convolutional neural network
CN115050481A