A traditional chinese medicine pair compatibility contraindication prediction method and system
By employing multi-view learning and attention aggregation methods, a feature matrix of Chinese herbal medicine components is constructed, and the feature vectors of Chinese herbal medicine pairs are dynamically adjusted. This solves the problem of insufficient accuracy in predicting the compatibility of Chinese herbal medicine pairs and achieves efficient prediction of incompatibilities between Chinese herbal medicine pairs.
Patent Information
- Application Number
- CN202411086340.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2044-08-08
AI Technical Summary
In existing technologies, the prediction of compatibility of traditional Chinese medicine drugs lacks consideration of the dynamic changes of components and compatibility, resulting in insufficient prediction accuracy.
A multi-view learning approach is adopted to aggregate the features of Chinese herbal medicine components through attention, construct similarity matrices of properties and meridian tropism, efficacy attributes, and Chinese herbal medicine component features, and fuse them to obtain Chinese herbal medicine feature vectors. The probability of incompatibilities between Chinese herbal medicine pairs is predicted by dynamically adjusting the vectors.
It improves the accuracy of predicting drug pair incompatibilities in traditional Chinese medicine, enables effective analysis and modeling of complex Chinese medicine component data, enhances information representation, reduces data redundancy, and improves prediction accuracy.
Smart Images

Figure CN119008036B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drug compatibility technology, specifically to a method and system for predicting incompatibilities between traditional Chinese medicine drug pairs. Background Technology
[0002] The compatibility of traditional Chinese medicine (TCM) drugs involves multiple factors and dynamic changes. Firstly, single medicinal herbs typically contain multiple components, each potentially playing a different role in pharmacological action. Changes in the types and proportions of these components often significantly alter the therapeutic efficacy and toxicity of the herb. For example, a certain herb may contain a high concentration of a specific active ingredient in a particular growing environment, while the content of this ingredient may be lower in other environments. This means that the same herb may have different therapeutic effects and safety profiles under different conditions. In related technologies, the description of TCM mainly relies on descriptive data such as its properties and meridian tropism, lacking consideration of its components, thus affecting the accuracy of predictions.
[0003] Secondly, the specific components of a herb's effect may differ depending on the specific combination of herbs in a traditional Chinese medicine formula. For example, astragalus may primarily function as a qi-tonifying agent in some formulas, while in others it may primarily function as an anti-inflammatory or diuretic. This difference depends not only on the herb's own components but also on its interactions with other herbs in the formula. The lack of consideration for the dynamic changes in drug combinations in related technologies affects the accuracy of predictions. Summary of the Invention
[0004] To address at least one deficiency of the prior art, the present invention aims to provide a method and system for predicting the incompatibilities of traditional Chinese medicine (TCM) drug pairs, thereby improving the accuracy of predicting incompatibilities of TCM drug pairs.
[0005] To achieve the above objectives, according to some embodiments, a first aspect of the present invention provides a method for predicting incompatibilities between traditional Chinese medicine pairs, comprising: Acquire data on the properties, flavors, and meridian tropism of Chinese medicinal herbs, their efficacy data, the correlation matrix between Chinese medicinal herbs and their components, and the characteristic data of Chinese medicinal components. Based on the data of the properties and meridian tropism of Chinese medicine and the data of its efficacy, a similarity matrix of properties and meridian tropism and a similarity matrix of efficacy are constructed respectively. Based on the correlation matrix between traditional Chinese medicine and its components and the characteristic data of traditional Chinese medicine components, a characteristic matrix of traditional Chinese medicine components is obtained through attention aggregation. By integrating the similarity matrix of flavor and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature matrix of Chinese herbal medicine components, the Chinese herbal medicine feature vector of each herbal medicine is obtained. The herbal feature vectors of the herbal pair to be predicted are fused to obtain the herbal pair feature vector; Based on the obtained feature vectors of the drug pairs, predict the possibility of incompatibilities between the drug pairs of traditional Chinese medicine. The process of obtaining the TCM component feature matrix through attention aggregation includes: obtaining the component feature vector of each component based on the TCM component feature data; calculating the attention weight corresponding to the component based on the component feature vector; and aggregating the component feature vectors based on the attention weights to obtain the TCM component feature vector and the TCM component feature matrix.
[0006] A second aspect of the present invention provides a system for predicting incompatibilities between traditional Chinese medicine pairs, comprising: The data acquisition module is configured to acquire data on the properties and meridians of traditional Chinese medicine, efficacy data of traditional Chinese medicine, correlation matrix between traditional Chinese medicine and its components, and characteristic data of traditional Chinese medicine components. The similarity matrix construction module is configured to construct similarity matrices for the properties and meridian tropism of Chinese medicine and similarity matrices for the efficacy attributes of Chinese medicine, respectively, based on the properties, flavors and meridian tropism data and the efficacy data of Chinese medicine. The feature aggregation module is configured to obtain a traditional Chinese medicine (TCM) component feature matrix through attention aggregation based on the association matrix between TCM and its components and the TCM component feature data. The process of obtaining the TCM component feature matrix through attention aggregation includes: obtaining the component feature vector of each component based on the TCM component feature data; calculating the attention weight corresponding to each component based on its component feature vector; and aggregating the component feature vectors based on the attention weights to obtain the TCM component feature vector and the TCM component feature matrix. The first feature fusion module is configured to fuse the similarity matrix of flavor and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature matrix of Chinese herbal medicine components to obtain the Chinese herbal medicine feature vector of each Chinese herbal medicine. The second feature fusion module is configured to fuse the feature vectors of the Chinese herbal medicine pair to be predicted, and obtain the feature vector of the herbal medicine pair; The prediction module is configured to predict the likelihood of incompatibilities between Chinese herbal medicine pairs based on the obtained herbal medicine pair feature vectors.
[0007] Compared with the prior art, the beneficial effects of the present invention are: This invention provides a method and system for predicting the incompatibilities of traditional Chinese medicine (TCM) drug pairs. Based on attention aggregation of the characteristics of each component of TCM, it can adaptively assign different attention weights to each component according to the type and proportion of the components, thereby aggregating the TCM component feature vector for use in predicting drug pair incompatibilities. This achieves effective analysis and modeling of complex TCM component data, significantly improving the identification and understanding of components in single herbs and combined herbs, and thus improving the accuracy of predicting TCM drug pair incompatibilities.
[0008] This invention introduces the concept of multi-view learning, treating data from different sources as a single view, and designs a multi-view learning loss to enhance the information representation between data from different sources and reduce information redundancy between them.
[0009] In this invention, when fusing the feature vectors of traditional Chinese medicine (TCM), a shared layer is used to fuse the TCM feature vectors to obtain a drug pair vector. Then, the drug pair vector is used to dynamically adjust the TCM feature vector, resulting in an adaptively adjusted feature vector representation of the same TCM in different TCM drug pairs. This realizes the dynamic adjustment of the TCM drug pair information flow and improves the accuracy of subsequent TCM drug pair compatibility prediction.
[0010] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0011] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0012] Figure 1 The flowchart of a method for predicting incompatibilities of traditional Chinese medicine drug pairs provided by the present invention. Detailed Implementation
[0013] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0014] Example 1 Embodiment 1 of the present invention provides a method for predicting incompatibilities of traditional Chinese medicine drug pairs, such as... Figure 1 As shown, it includes: S1. Obtain data on the properties, flavors, and meridian tropism of Chinese medicinal herbs, efficacy data, correlation matrix between Chinese medicinal herbs and their components, and characteristic data of Chinese medicinal components. S2. Based on the data of the properties and meridian tropism of Chinese medicine and the data of the efficacy of Chinese medicine, construct similarity matrices of properties and meridian tropism and similarity matrices of efficacy, respectively. S3. Based on the association matrix between Chinese medicine and its components and the feature data of Chinese medicine components, a feature matrix of Chinese medicine components is obtained through attention aggregation; including: obtaining the component feature vector of each component based on the feature data of Chinese medicine components; calculating the attention weight corresponding to the component based on the component feature vector; aggregating the feature vectors of each component based on the attention weight to obtain the feature vector of Chinese medicine components and the feature matrix of Chinese medicine components; S4. By combining the similarity matrix of flavor and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature matrix of Chinese herbal ingredients, the Chinese herbal feature vector of each Chinese herbal material is obtained. S5. Merge the Chinese herbal feature vectors of the Chinese herbal medicine pair to be predicted to obtain the herbal medicine pair feature vector; S6. Based on the obtained drug pair feature vectors, predict the possibility of drug pair incompatibilities.
[0015] In step S1, the following steps are taken: first, data on the properties and meridians of Chinese medicine, data on the efficacy of Chinese medicine, the correlation matrix between Chinese medicine and its components, and data on the characteristics of Chinese medicine components are obtained.
[0016] The properties and flavors of Chinese herbal medicines (TCM) refer to their properties and tastes derived from TCM pharmacology. The meridian tropism data refers to the selective effects of TCM on specific parts of the body. Each TCM herb has a property / flavor / meridian tropism vector with a length of 44. When a TCM herb possesses a certain property / flavor / meridian tropism, the corresponding element in the vector is 1; otherwise, it is 0.
[0017] Traditional Chinese medicine (TCM) efficacy data refers to the properties and functions related to the therapeutic effects of TCM. Each TCM herb has an efficacy vector, the length of which is the number of efficacy values of the herb. When a TCM herb has a certain efficacy value, the corresponding element in the efficacy vector is 1; otherwise, it is 0.
[0018] The association matrix between Chinese medicine and its components refers to the matrix formed by the association between Chinese medicine and its components. The number of rows in the matrix is the number of all Chinese medicines, and the number of columns in the matrix is the number of all components. When a Chinese medicine contains a certain component, the corresponding row and column elements in the association matrix are 1, otherwise they are 0.
[0019] Component feature data refers to the Morgan fingerprint features of a component; specifically, this feature is the molecular substructure feature obtained by processing the SMILES data of the component using the RDKit toolkit, i.e., the Morgan fingerprint feature. Each component feature can be represented as a 512-dimensional component feature vector, and the elements of the vector are the number of the corresponding molecular substructure in the component.
[0020] In step S2, a similarity matrix is constructed based on the herbal properties and meridian tropism data and efficacy data obtained in step S1. For multiple herbs to be studied, a property-taste-meridian tropism matrix is obtained based on the property-taste-meridian tropism vectors of each herb. Similarly, based on the efficacy vectors of each traditional Chinese medicine, an efficacy matrix is obtained, which is then used... The similarity matrix is represented by Jaccard similarity. The properties and meridian tropism matrix and the efficacy matrix are processed separately to obtain the similarity matrix of properties and meridian tropism and the similarity matrix of efficacy.
[0021] Based on Jaccard similarity, a similarity matrix of flavor and meridian tropism attributes is constructed. : ; in, ( () indicates the calculation of Jaccard similarity. Represents the matrix of properties and meridian tropism. and Let represent the nature, flavor, and meridian tropism attribute vectors of the i-th and j-th Chinese medicinal materials, respectively.
[0022] Construct a similarity matrix of efficacy attributes : ; Where E represents the efficacy matrix, E i and E j Let represent the efficacy vectors of the i-th and j-th Chinese medicinal materials, respectively.
[0023] In step S3, for traditional Chinese medicine (TCM) herbs, a single herb is composed of multiple components, and variations in the types and proportions of these components create considerable complexity. These variations can lead to different pharmacological properties in TCM formulas. Considering the different meanings of various components in TCM and the collective interactions among these components, this embodiment of the invention uses an attention-based aggregation method to aggregate multiple component features from a single TCM herb into a single TCM component feature vector when aggregating the feature vectors of these components.
[0024] Specifically, for those with For the i-th Chinese medicinal herb with a given component, firstly, the i-th row is searched according to the association matrix between Chinese medicinal herbs and their components to obtain the index of the component corresponding to the i-th Chinese medicinal herb. Then, an attention-based aggregation method is used to... The component feature vectors are aggregated to obtain the component feature vector of the i-th Chinese herbal medicine. : ; in, Let m be the component feature vector of the m-th component of the i-th Chinese medicinal herb, and let attention weights be... The weight of the m-th component of the i-th Chinese medicinal herb is expressed as follows: ; in, The tanh activation function is used. For the sigmoid activation function, w, , This is a learnable parameter matrix. The medicinal component characteristics of each Chinese herbal medicine constitute the Chinese herbal component feature matrix. .
[0025] In step S4, based on multi-view data augmentation, the fusion of data from different sources is considered a multi-view learning task. A multi-view learning loss function is designed to reduce information redundancy between multiple view data and enhance the representation of Chinese medicinal material features from different views. For a single Chinese medicinal material, its properties, efficacy, and components are considered as data from different data sources. In the multi-view learning task, data from different sources can be regarded as a view. Different views contain different information because they capture different perspectives. This embodiment introduces the concept of multi-view learning, thereby enhancing the information representation between data from different sources and reducing information redundancy between them.
[0026] Specifically, the similarity matrix of flavor and meridian attributes obtained in step S2 Similarity matrix of efficacy attributes and the feature matrix of traditional Chinese medicine components obtained in step S3 Each row of the matrix represents a feature vector of a corresponding data source for traditional Chinese medicine. A set of independent autoencoders are used to project the data into the same latent space and reduce the dimensionality to the same dimension to complete the data alignment.
[0027] Each set of autoencoders contains one encoder. and a decoder These are used to obtain the latent feature vector of the i-th Chinese medicinal material. and the generated reconstruction vector : ; ; in, Indicates the data source. This represents the original feature vector of the s-th data source for the ith Chinese medicinal herb. For example, when s=t, it represents the feature vector of the Chinese medicinal components of the ith Chinese medicinal herb. , , , , This is a learnable weight matrix.
[0028] Loss function of autoencoder A reconstruction loss is employed to enhance the representational power of the feature vectors. The loss function is the mean squared error of the original data vector and the reconstructed vector. ; in, The mean squared error is given, and N is the total quantity of Chinese medicinal materials. Let be the original feature vector of the i-th Chinese medicinal herb from the s-th data source. Let be the reconstructed vector of the s-th data source for the i-th Chinese medicinal herb.
[0029] This paper enhances the latent feature vectors of Chinese medicinal materials obtained by the encoder based on multi-view learning. The loss function for dual views is described. Designed as follows: ; Where N represents the total number of Chinese medicinal materials, This represents the i-th Chinese medicinal material. The latent feature vector of the j-th data source and the j-th Chinese medicinal material The joint distribution of latent feature vectors from 1 data source, This represents the i-th Chinese medicinal material. The latent feature vector of the j-th data source and the j-th Chinese medicinal material Do the potential feature vectors from multiple data sources originate from the same Chinese medicinal material? ; ; Where exp is an exponential function with the natural constant as its base. , These represent the first and second parts of the Chinese medicinal material from the i-th herb. The latent feature vector of the j-th data source and the j-th Chinese medicinal material The latent feature vectors from several data sources. Since the number of data sources is greater than two, i.e., the total number of views is greater than two, the multi-view learning loss function is... This is represented as the sum of the two-view learning losses between pairwise combinations of views: ; Where |S| represents the number of data sources.
[0030] The enhanced latent feature vectors from the three data sources are merged into a single traditional Chinese medicine feature vector by concatenation. ; Where, d i Let represent the feature vector of the i-th Chinese medicinal material. Let be the latent feature vector of the efficacy attributes of the i-th Chinese medicinal material. Let be the latent feature vector of the properties, flavors, and meridian tropism of the i-th Chinese medicinal material. Let be the potential feature vector of the components of the i-th Chinese medicinal material.
[0031] In step S5, given that the effective components of the same traditional Chinese medicine (TCM) may differ in different TCM pairs, it is necessary to dynamically adjust the TCM feature vectors of various TCM combinations. This embodiment employs a dynamic representation layer, which includes a gated attention unit (GAU) to regulate the information flow of each TCM feature vector in a TCM pair.
[0032] Specifically, suppose the Chinese herbal medicine pair a and b to be predicted includes Chinese herbal medicine a and Chinese herbal medicine b, and the Chinese herbal medicine feature vectors of Chinese herbal medicine a and Chinese herbal medicine b are respectively... and First, a shared layer (Sharedlayer) is used for merging. and The preliminary fusion vector of the drug pair was obtained. : ; in, and Let be the learnable weight matrix of the shared layer, and || be the vector concatenation operation.
[0033] Subsequently, the herbal feature vectors of herbal pairs a and b are dynamically optimized using the initial fusion vectors of the herbal pairs. Adjustments were made. A gated attention unit (GAU) was used to initially fuse the drug pair vectors. The feature vector of Chinese medicinal herb 'a' is input into the first gated attention unit GAU1 to initially fuse the vectors of the herb pair. The herbal feature vector of herb b is input into the second gating attention unit GAU2, and the vector is initially fused using the herb pair. Feature vectors of traditional Chinese medicine and By performing dynamic adjustments, we obtain the adaptively adjusted feature vector representations of the same Chinese herbal medicine in different herbal medicine pairs: ; ; in, , and It is a learnable weight matrix. , These are the first gating attention units. Second Gated Attention Unit The attention weight vector, z a Let z be the adaptively adjusted feature vector of Chinese medicinal material a. b is the adaptively adjusted feature vector of Chinese medicinal material b.
[0034] Attention weight vectors of the first gated attention unit and the second gated attention unit , They are represented as follows: ; ; ; ; Where q is the summation index of the vector components. . yes The dimension, that is The total number of components, , and , These are the learning weight matrices for the attention matrices of Chinese medicinal materials a and b, respectively.
[0035] Finally, the adaptively adjusted TCM feature vectors are fused to obtain the herb pair feature vectors. The two sets of adaptively adjusted TCM feature vectors z are then used to obtain the two sets of TCM feature vectors. a z b A new shared layer is used for splicing and fusion, and the resulting drug pair feature vector is represented as follows: ; Among them, z p Let be the feature vector of drug pair a and b. , for and Shared, learnable weight matrix.
[0036] In step S6, the compatibility of the Chinese herbal medicine pairs is assessed. Step S5 obtained the feature vectors of herbal medicine pairs a and b through adaptive adjustment. To identify compatibility incompatibilities, a two-layer multilayer perceptron is used to predict the probability of compatibility incompatibilities between the Chinese herbal medicine pairs.
[0037] in, This represents the probability that the drug pair predicted by the model is incompatible, and its value ranges from (0,1). The closer a drug pair is to 1, the more likely it is to be a contraindication; conversely, the less likely it is to be a contraindication. ReLU is the activation function of a multilayer perceptron. , These are the learnable weight matrices for the first and second layers of the multilayer perceptron, respectively. , These are the learnable bias vectors for the first and second layers of the multilayer perceptron, respectively.
[0038] Finally, a loss function for binary classification tasks is introduced to address the imbalance between positive and negative samples. This function constrains the prediction results from deviating from the true labels and balances the problem of excessively high sample difficulty in binary classification tasks. This achieves efficient and accurate evaluation and optimization of incompatibilities in traditional Chinese medicine drug pairings. The binary classification task loss function... It is expressed as follows:
[0039] in, and is a hyperparameter used to balance the classification difficulty of positive and negative samples and easy and difficult samples, respectively, and y represents the true label of drug pair incompatibility.
[0040] Overall loss function for:
[0041] in , This is a balancing factor among the three loss functions, used to adjust the weights of the three loss functions.
[0042] Example 2 This embodiment provides a system for predicting the incompatibilities of traditional Chinese medicine drug pairs, including: The data acquisition module is configured to acquire data on the properties and meridians of traditional Chinese medicine, efficacy data of traditional Chinese medicine, correlation matrix between traditional Chinese medicine and its components, and characteristic data of traditional Chinese medicine components. The similarity matrix construction module is configured to construct similarity matrices for the properties and meridian tropism of Chinese medicine and similarity matrices for the efficacy attributes of Chinese medicine, respectively, based on the properties, flavors and meridian tropism data and the efficacy data of Chinese medicine. The feature aggregation module is configured to obtain the feature vector of Chinese medicine components through attention aggregation based on the association matrix between Chinese medicine and its components and the feature data of Chinese medicine components. The process of obtaining the feature vector of Chinese medicine components through attention aggregation includes: obtaining the component feature vector of each component based on the feature data of Chinese medicine components; calculating the attention weight corresponding to the component based on the component feature vector; and aggregating the feature vectors of each component based on the attention weight to obtain the feature vector of Chinese medicine components. The first feature fusion module is configured to fuse the similarity matrix of flavor and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature vector of Chinese medicine components to obtain the feature vector of Chinese medicine. The second feature fusion module is configured to fuse the feature vectors of the Chinese herbal medicine pair to be predicted, and obtain the feature vector of the herbal medicine pair; The prediction module is configured to predict the likelihood of incompatibilities between Chinese herbal medicine pairs based on the obtained herbal medicine pair feature vectors.
[0043] It should be noted that each module in this embodiment corresponds one-to-one with the steps of the method in Embodiment 1, and their specific implementation processes are the same, so they will not be repeated here.
[0044] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting incompatibilities in traditional Chinese medicine pair combinations, characterized in that, include: Acquire data on the properties, flavors, and meridian tropism of Chinese medicinal herbs, their efficacy data, the correlation matrix between Chinese medicinal herbs and their components, and the characteristic data of Chinese medicinal components. Based on the data of the properties and meridian tropism of Chinese medicine and the data of its efficacy, a similarity matrix of properties and meridian tropism and a similarity matrix of efficacy are constructed respectively. Based on the correlation matrix between traditional Chinese medicine and its components and the characteristic data of traditional Chinese medicine components, a characteristic matrix of traditional Chinese medicine components is obtained through attention aggregation. By integrating the similarity matrix of flavor and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature matrix of Chinese herbal medicine components, the Chinese herbal medicine feature vector of each herbal medicine is obtained. The herbal feature vectors of the herbal pair to be predicted are fused to obtain the herbal pair feature vector; Based on the obtained feature vectors of the drug pairs, predict the possibility of incompatibilities between the drug pairs of traditional Chinese medicine. The process of obtaining a TCM component feature matrix through attention aggregation includes: obtaining component feature vectors for each component based on TCM component feature data; calculating the attention weight corresponding to each component based on the component feature vectors; and aggregating the component feature vectors based on the attention weights to obtain TCM component feature vectors and a TCM component feature matrix. Specifically, the step of aggregating the component feature vectors based on the attention weights to obtain the TCM component feature vectors and the TCM component feature matrix includes: for cases where... For the i-th Chinese medicinal herb with a given component, firstly, the i-th row is searched according to the association matrix between Chinese medicinal herbs and their components to obtain the index of the component corresponding to the i-th Chinese medicinal herb. Then, an attention-based aggregation method is used to... The component feature vectors are aggregated to obtain the component feature vector of the i-th Chinese herbal medicine. : ; in, Let m be the component feature vector of the m-th component of the i-th Chinese medicinal herb, and let attention weights be... The weights of the m-th component in the i-th Chinese medicinal herb are given, and the characteristics of the components of each Chinese medicinal herb constitute the Chinese medicinal component feature matrix. ; The fusion of the similarity matrix of flavor and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature vector of Chinese herbal medicine components yields a feature vector of Chinese herbal medicine, including: In the similarity matrix of the properties, flavors and meridians, the similarity matrix of the efficacy attributes and the feature matrix of Chinese herbal medicine components, the original feature vectors of each data source for each Chinese herbal medicine are obtained, and the corresponding latent feature vectors are calculated. Enhanced latent feature vectors based on multi-view learning; By fusing and enhancing the latent feature vectors from each data source, we obtain the feature vector of traditional Chinese medicine. The process of fusing the feature vectors of the Chinese herbal medicine pairs to be predicted to obtain the feature vectors of the herbal medicine pairs includes: By fusing the herbal feature vectors of each herb in the herbal pair to be predicted, a preliminary fusion vector for the herbal pair is obtained. Specifically, let the herbal pair to be predicted, a and b, contain herbal material a and herbal material b, and the herbal feature vectors of herbal material a and herbal material b are respectively... and First, a shared layer (Sharedlayer) is used for merging. and The preliminary fusion vector of the drug pair was obtained. : ; in, and Here is the learnable weight matrix of the shared layer, and || is the vector concatenation operation; This is the initial fusion vector for the drug pair; Using the initial fusion vector of the drug pair, the Chinese herbal feature vectors of each Chinese herbal medicine in the drug pair are dynamically optimized and adjusted to obtain the adaptively adjusted Chinese herbal feature vectors of each Chinese herbal medicine. By fusing the adaptively adjusted feature vectors of traditional Chinese medicine, we obtain the feature vectors of the herb pairs; The process of fusing and adaptively adjusting the TCM feature vectors to obtain the herb pair feature vectors includes: combining the obtained adaptively adjusted two sets of TCM feature vectors z... a z b A new shared layer is used for splicing and fusion, and the resulting drug pair feature vector is represented as follows: ; Among them, z p Let be the feature vector of drug pair a and b. , for and Shared, learnable weight matrix; The step of predicting the probability of incompatibility between Chinese herbal medicine pairs based on the obtained herbal medicine pair feature vectors includes: The feature vectors of drug pairs a and b were obtained through adaptive adjustment. In order to identify drug pair incompatibilities, a two-layer multilayer perceptron was used to predict the probability of drug pair incompatibilities. in, This represents the probability that the drug pair predicted by the model is incompatible, and its value ranges from (0,1). The closer a drug pair is to 1, the more likely it is to be a contraindication; conversely, the less likely it is to be a contraindication. ReLU is the activation function of a multilayer perceptron. , These are the learnable weight matrices for the first and second layers of the multilayer perceptron, respectively. , These are the learnable bias vectors for the first and second layers of the multilayer perceptron, respectively.
2. The method for predicting incompatibilities of traditional Chinese medicine pairs as described in claim 1, characterized in that, The formula for calculating the attention weight is: ; in, This represents the attention weight of the m-th component of the i-th Chinese medicinal herb. The tanh activation function is used. For the sigmoid activation function, w, , For a learnable parameter matrix, Let m be the component feature vector of the m-th component of the i-th Chinese medicinal material.
3. The method for predicting incompatibilities of traditional Chinese medicine pairs as described in claim 1, characterized in that, Loss function for multi-view learning for: ; in, The loss function for the two views. , This represents the i-th Chinese medicinal material. The latent feature vector of the j-th data source and the j-th Chinese medicinal material The joint distribution of latent feature vectors from 1 data source, This represents the i-th Chinese medicinal material. The latent feature vector of the j-th data source and the j-th Chinese medicinal material Whether the potential feature vectors of the data sources come from the same Chinese medicinal material.
4. The method for predicting incompatibilities of traditional Chinese medicine pairs as described in claim 1, characterized in that, The calculation formula for dynamically optimizing and adjusting the feature vectors of each Chinese medicinal material in a drug pair is as follows: ; ; in, , and It is a learnable weight matrix. , These are the first gating attention units. Second Gated Attention Unit The attention weight vector, z a Let z be the adaptively adjusted feature vector of Chinese medicinal material a. b This is the adaptively adjusted feature vector of the Chinese medicinal herb b. This is the initial fusion vector for the drug pair. , Let a and b represent the feature vectors of Chinese medicinal materials a and b, respectively.
5. The method for predicting incompatibilities of traditional Chinese medicine pairs as described in claim 4, characterized in that, Attention weight vector of the first gating attention unit Attention weight vector of the second gated attention unit They are represented as follows: ; ; ; ; Where q is the summation index of the vector components. ; yes The dimension, that is The total number of components, , Let be the learning weight matrix of the attention matrix for Chinese medicinal material a; , It is the learning weight matrix of the attention matrix of Chinese medicinal material b.
6. The method for predicting incompatibilities of traditional Chinese medicine pairs as described in claim 1, characterized in that, Based on Jaccard similarity, similarity matrices for the properties of flavor and meridian tropism and similarity matrices for efficacy attributes were constructed respectively.
7. A system for predicting incompatibilities between traditional Chinese medicine pairs, characterized in that, The method for predicting incompatibilities of traditional Chinese medicine pairs as described in claims 1-6 includes: The data acquisition module is configured to acquire data on the properties and meridians of traditional Chinese medicine, efficacy data of traditional Chinese medicine, correlation matrix between traditional Chinese medicine and its components, and characteristic data of traditional Chinese medicine components. The similarity matrix construction module is configured to construct similarity matrices for the properties and meridian tropism of Chinese medicine and similarity matrices for the efficacy attributes of Chinese medicine, respectively, based on the properties, flavors and meridian tropism data and the efficacy data of Chinese medicine. The feature aggregation module is configured to obtain a traditional Chinese medicine (TCM) component feature matrix through attention aggregation based on the association matrix between TCM and its components and TCM component feature data. The process of obtaining the TCM component feature matrix through attention aggregation includes: obtaining component feature vectors for each component based on the TCM component feature data; calculating the attention weight corresponding to each component based on its feature vector; and aggregating the component feature vectors based on the attention weights to obtain TCM component feature vectors and a TCM component feature matrix. Specifically, the step of aggregating the component feature vectors based on the attention weights to obtain the TCM component feature vectors and the TCM component feature matrix includes: for... For the i-th Chinese medicinal herb with a given component, firstly, the i-th row is searched according to the association matrix between Chinese medicinal herbs and their components to obtain the index of the component corresponding to the i-th Chinese medicinal herb. Then, an attention-based aggregation method is used to... The component feature vectors are aggregated to obtain the component feature vector of the i-th Chinese herbal medicine. : ; in, Let m be the component feature vector of the m-th component of the i-th Chinese medicinal herb, and let attention weights be... The weights of the m-th component in the i-th Chinese medicinal herb are given, and the characteristics of the components of each Chinese medicinal herb constitute the Chinese medicinal component feature matrix. ; The first feature fusion module is configured to fuse the similarity matrix of taste and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature matrix of Chinese herbal medicine components to obtain the Chinese herbal medicine feature vector for each herbal medicine. The process of fusing the similarity matrix of taste and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature vector of Chinese herbal medicine components to obtain the Chinese herbal medicine feature vector includes: obtaining the original feature vectors of each data source for each Chinese herbal medicine in the similarity matrix of taste and meridian tropism attributes, the similarity matrix of efficacy attributes, and the feature matrix of Chinese herbal medicine components; calculating the corresponding latent feature vectors; enhancing the latent feature vectors based on multi-view learning; and fusing the enhanced latent feature vectors from each data source to obtain the Chinese herbal medicine feature vector. The second feature fusion module is configured to fuse the feature vectors of the Chinese herbal medicine (TCM) pairs to be predicted, thereby obtaining a pair feature vector. This fusing of the TCM feature vectors to obtain the pair feature vector includes fusing the TCM feature vectors of each herbal material in the TCM pair to obtain a preliminary fusion vector. Specifically, suppose the TCM pairs to be predicted, a and b, contain herbal materials a and b, and the TCM feature vectors of herbal materials a and b are respectively... and First, a shared layer (Sharedlayer) is used for merging. and The preliminary fusion vector of the drug pair was obtained. : ; in, and Here is the learnable weight matrix of the shared layer, and || is the vector concatenation operation; This is the initial fusion vector for the drug pair; Using the initial fusion vector of the herb pair, the herb feature vectors of each herb in the herb pair are dynamically optimized and adjusted to obtain the adaptively adjusted herb feature vectors of each herb; the adaptively adjusted herb feature vectors are then fused to obtain the herb pair feature vector; the fusion of the adaptively adjusted herb feature vectors to obtain the herb pair feature vector includes: combining the two sets of adaptively adjusted herb feature vectors z a z b A new shared layer is used for splicing and fusion, and the resulting drug pair feature vector is represented as follows: ; Among them, z p Let be the feature vector of drug pair a and b. , for and Shared, learnable weight matrix; The prediction module is configured to predict the probability of incompatibility between Chinese herbal medicine pairs based on the obtained herbal medicine pair feature vectors. Specifically, predicting the probability of incompatibility based on the obtained herbal medicine pair feature vectors includes: adaptively adjusting the herbal medicine pair feature vectors of herbal medicine pairs a and b; and employing a two-layer multilayer perceptron to predict the probability of incompatibility in order to identify herbal medicine pair incompatibilities. in, This represents the probability that the drug pair predicted by the model is incompatible, and its value ranges from (0,1). The closer a drug pair is to 1, the more likely it is to be a contraindication; conversely, the less likely it is to be a contraindication. ReLU is the activation function of a multilayer perceptron. , These are the learnable weight matrices for the first and second layers of the multilayer perceptron, respectively. , These are the learnable bias vectors for the first and second layers of the multilayer perceptron, respectively.
Citation Information
Patent Citations
Prediction method and device for drug interaction, equipment and storage medium
CN114694791A
Drug-drug interaction prediction method and system based on multiple views
CN117079835A
