Multi-label toxicity prediction method and system for traditional Chinese medicine based on multimodal and contrastive learning
Through multimodal and contrastive learning methods, we integrated traditional Chinese medicine, ingredient and target data, constructed a loss function to guide the model to learn consistent feature representation, solved the problems of data fusion and semantic alignment in multi-label toxicity prediction of traditional Chinese medicine, achieved improved accuracy and stability of traditional Chinese medicine toxicity prediction, and promoted the intelligent safety evaluation of traditional Chinese medicine.
Patent Information
- Application Number
- CN202510946930.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-07-10
AI Technical Summary
Existing technologies find it difficult to effectively integrate three types of heterogeneous data: traditional Chinese medicine, ingredients, and targets, and are unable to process the correlation between different modalities in a unified space, resulting in poor accuracy and stability in the prediction of traditional Chinese medicine toxicity, especially in multi-label tasks where feature representation differences are large.
A method based on multimodal and contrastive learning is adopted to design an information encoding module, a semantic information alignment module and a context perception mechanism. A loss function is constructed through a multi-label contrastive learning mechanism to guide the model to learn a discriminative and semantically consistent representation of traditional Chinese medicine toxicity, thereby realizing the collaborative expression of cross-modal features.
It has improved the accuracy and stability of multi-label toxicity prediction of traditional Chinese medicine, systematically integrated the characteristic information of traditional Chinese medicine, ingredients and targets, solved the problems of data fusion and semantic alignment, and promoted the intelligent process of toxicity mechanism analysis and safety evaluation of traditional Chinese medicine.
Smart Images

Figure CN120452527B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of traditional Chinese medicine toxicity prediction, and in particular to a method and system for predicting the toxicity of traditional Chinese medicine using multi-labels based on multimodal and contrastive learning. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] In the field of Traditional Chinese Medicine (TCM) toxicity research, the identification and analysis of toxicity mechanisms pose significant challenges due to the complex composition and diverse mechanisms of action of TCM, particularly its multi-target effects. Traditional TCM toxicity assessment methods rely primarily on animal experiments and clinical observations, which are not only time-consuming and costly, but also difficult to reveal the underlying laws and mechanisms of TCM toxicity on a large scale and systematically.
[0004] In recent years, the continuous accumulation of basic data on traditional Chinese medicines (TCMs), such as their properties, the structural characteristics of their ingredients, and their targets, has provided a rich data foundation for predicting their toxicity. However, TCM toxicity information can be derived from multiple aspects, including their own properties, chemical composition, target effects, and toxicity labels. This information is diverse in form and granularity, representing a typical multi-source heterogeneous data type. Due to the strong heterogeneity of these data sources and the wide variation in their structural forms, existing methods are unable to effectively integrate the three types of heterogeneous data—TCM, ingredient, and target—and mine their potential associations. They also struggle to process the associations between different modalities in a unified space, resulting in feature loss or semantic misalignment, making it impossible to construct an expressive joint feature representation. Furthermore, TCM toxicity often exhibits multi-label, multi-dimensional complex characteristics. For example, hepatotoxicity, nephrotoxicity, and cardiotoxicity may coexist in the same TCM. In such multi-label tasks, labels often exhibit strong correlation and overlap. However, existing methods often ignore the semantic relationship between labels during the modeling process, which makes it difficult for the model to learn semantically consistent feature expressions. In particular, when faced with traditional Chinese medicine samples with similar toxicity labels, their feature representations vary greatly, thereby reducing the accuracy and stability of the prediction. Summary of the Invention
[0005] In order to solve the above problems, the present disclosure proposes a method and system for predicting the multi-label toxicity of traditional Chinese medicine based on multimodal and contrastive learning. Based on the multimodal feature fusion method of the unified embedding space, the information encoding module, the semantic information alignment module and the context perception mechanism are designed to effectively extract the potential semantic associations between traditional Chinese medicine, ingredients and targets, and realize the collaborative expression of cross-modal features; introduce a multi-label contrastive learning mechanism, construct positive and negative sample pairs based on label similarity, and guide the model to learn a more discriminative and semantically consistent representation of traditional Chinese medicine toxicity through a contrast loss function based on a dynamic coefficient, so as to realize the prediction of multi-label toxicity of traditional Chinese medicine.
[0006] According to some embodiments, the present disclosure adopts the following technical solutions:
[0007] A multi-label toxicity prediction method for traditional Chinese medicine based on multimodal and contrastive learning, including:
[0008] Obtaining the attribute data, component data, target sequence data and related association data of traditional Chinese medicine;
[0009] The attribute data, component data, target sequence data and related associated data of traditional Chinese medicine are input into the multimodal feature extraction network. First, the attribute features, component features and target features of traditional Chinese medicine are extracted respectively through the information encoding module. The component features, target features and related associated data are used for data fusion processing to obtain component fusion features and target fusion features. Then, the semantic alignment module is used to align and fuse the attribute features, component fusion features and target fusion features of the unified embedded coding to obtain aligned fusion features. The context perception mechanism is introduced to extract the deep interactive relationship of the aligned fusion features and obtain the multimodal vector of the fusion context.
[0010] A contrastive learning mechanism is introduced, and a loss function is constructed by constructing positive and negative label pairs to guide the model to learn toxicity feature representations that are discriminative and semantically consistent. The multimodal vector of the fused context is input into the multi-layer perceptron DNN, and the toxicity prediction result is output.
[0011] According to some embodiments, the present disclosure adopts the following technical solutions:
[0012] A multi-label toxicity prediction system for traditional Chinese medicine based on multimodal and contrastive learning, including:
[0013] Data acquisition module, used to obtain the attribute data, component data, target sequence data and related association data of traditional Chinese medicine;
[0014] The feature extraction and fusion module is used to input the attribute data, component data, target sequence data and related associated data of traditional Chinese medicine into the multimodal feature extraction network. First, the information encoding module is used to extract the attribute features, component features and target features of traditional Chinese medicine respectively. The component features, target features and related associated data are used for data fusion processing to obtain component fusion features and target fusion features. Then, the semantic alignment module is used to align and fuse the attribute features, component fusion features and target fusion features of the unified embedded coding to obtain aligned fusion features. The context perception mechanism is introduced to extract the deep interactive relationship of the aligned fusion features and obtain the multimodal vector of the fusion context.
[0015] The contrast output module is used to introduce the contrastive learning mechanism. By constructing a loss function by constructing positive and negative label pairs, it guides the model to learn toxicity feature representations that are discriminative and semantically consistent. The multimodal vector of the fused context is input into the multi-layer perceptron DNN to output the toxicity prediction results.
[0016] According to some embodiments, the present disclosure adopts the following technical solutions:
[0017] A computer program product includes a computer program, which, when executed by a processor, implements the multi-label toxicity prediction method for traditional Chinese medicine based on multimodal and contrastive learning.
[0018] According to some embodiments, the present disclosure adopts the following technical solutions:
[0019] A non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the multi-label toxicity prediction method of traditional Chinese medicine based on multimodal and contrastive learning is implemented.
[0020] According to some embodiments, the present disclosure adopts the following technical solutions:
[0021] An electronic device comprises: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device implements the multi-label toxicity prediction method of traditional Chinese medicine based on multimodal and contrastive learning.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] The disclosed method for predicting the multi-label toxicity of traditional Chinese medicine based on multimodal and contrastive learning proposes a multimodal feature extraction network, designs an information encoding module, a semantic information alignment module and a contextual perception mechanism, effectively extracts the potential semantic associations between traditional Chinese medicine, ingredients and targets, and realizes the collaborative expression of cross-modal features; introduces a multi-label contrastive learning mechanism, constructs positive and negative sample pairs based on label similarity, and guides the model to learn a more discriminative and semantically consistent representation of the toxicity of traditional Chinese medicine through a contrast loss function based on a dynamic coefficient. Ultimately, the prediction of the multi-label toxicity of traditional Chinese medicine is achieved by combining DNN, achieving a systematic breakthrough in the core problems of data fusion difficulty, semantic alignment difficulty and prediction accuracy difficulty in the task of multi-label toxicity prediction of traditional Chinese medicine, improving the model's modeling ability for the complex toxic manifestations of traditional Chinese medicine from the source, providing effective support for the analysis of the toxicity mechanism and risk assessment of traditional Chinese medicine, and having good application prospects and promotion value.
[0024] The disclosed method for predicting the multi-label toxicity of traditional Chinese medicine based on multimodal and contrastive learning constructs an efficient data fusion and modeling mechanism that can systematically integrate three types of feature information: traditional Chinese medicine, ingredients, and targets, and extract deep semantic associations, thereby achieving accurate modeling and prediction of the multi-label toxicity characteristics of traditional Chinese medicine. It also designs a contrastive learning strategy for multi-label toxicity prediction tasks, combining the semantic similarity between traditional Chinese medicine toxicity labels to guide the model to learn more consistent and discriminative feature representations in the representation space. By integrating cross-modal feature expression and contrastive learning optimization strategies, a systematic and intelligent multi-label toxicity prediction method for traditional Chinese medicine is established, which promotes the intelligent process of traditional Chinese medicine safety evaluation and helps analyze the toxicological mechanisms of traditional Chinese medicine.
[0025] The disclosed method for predicting the multi-label toxicity of traditional Chinese medicine based on multimodal and contrastive learning integrates multi-source heterogeneous data such as the attribute information, component information, and target effects of traditional Chinese medicine to achieve feature alignment and semantic fusion in a unified space, solving the problems of inconsistent data granularity and semantic mismatch in traditional methods. By introducing structured coding, context perception, and semantic alignment mechanisms, the model can effectively capture the potential dependencies between the complex attributes of traditional Chinese medicine, maintain the integrity of modal information, and at the same time, improve the expressiveness and discriminative power of the prediction representation. This method significantly improves the systematicness and accuracy of traditional Chinese medicine toxicity modeling, provides a new technical path for the analysis and intelligent evaluation of the toxic mechanism of traditional Chinese medicine, and plays an important role in promoting the safety research and modern application of traditional Chinese medicine.
[0026] The disclosed method for predicting the multi-label toxicity of traditional Chinese medicine based on multimodal and contrastive learning is based on the fact that traditional Chinese medicine often involves the co-occurrence of multiple toxicities in clinical manifestations, and there is a complex semantic structure between its toxicity labels. Direct multi-label classification can easily lead to label conflicts, incomplete expressions, and the like. To this end, the disclosed method introduces a contrastive learning mechanism, which guides the model to learn toxicity feature representations that are discriminative and semantically consistent by constructing positive and negative label pairs, thereby improving the robustness and generalization ability of multi-label classification. This method not only improves the accuracy and stability of traditional Chinese medicine toxicity prediction, but also promotes a deeper understanding of the essential laws of traditional Chinese medicine toxicity. The toxicity prediction system constructed by this method can be widely used in scenarios such as traditional Chinese medicine screening, safety assessment, and clinical drug warning, providing strong support and theoretical basis for the intelligent development of traditional Chinese medicine and precision medicine, and solving the problems of the inability to effectively model the semantic dependencies between toxicity labels and inconsistent prediction results in traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings, which constitute a part of the present disclosure, are used to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation to the present disclosure.
[0028] Figure 1Flowchart of a method for predicting multi-label toxicity of traditional Chinese medicine based on multimodal and contrastive learning according to an embodiment of the present disclosure;
[0029] Figure 2 This is an architecture diagram of a multi-label toxicity prediction system for traditional Chinese medicine based on multimodal and contrastive learning according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.
[0031] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present disclosure belongs.
[0032] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.
[0033] Example 1
[0034] In one embodiment of the present disclosure, a method for predicting the multi-label toxicity of traditional Chinese medicine based on multimodal and contrastive learning is provided, comprising the following steps:
[0035] Step 1: Obtain the attribute data, component data, target sequence data and related association data of traditional Chinese medicine;
[0036] Step 2: Input the attribute data, component data, target sequence data and related associated data of traditional Chinese medicine into the multimodal feature extraction network. First, the information encoding module is used to extract the attribute features, component features and target features of traditional Chinese medicine respectively. The component features, target features and related associated data are used for data fusion processing to obtain component fusion features and target fusion features. Then, the semantic alignment module is used to align and fuse the attribute features, component fusion features and target fusion features of the unified embedded coding to obtain aligned fusion features. The context perception mechanism is introduced to extract the deep interactive relationship of the aligned fusion features and obtain the multimodal vector of the fusion context.
[0037] Step 3: Introduce a contrastive learning mechanism. By constructing a loss function by constructing positive and negative label pairs, guide the model to learn toxicity feature representations that are discriminative and semantically consistent. Input the multimodal vector of the fused context into the multi-layer perceptron DNN to output the toxicity prediction results.
[0038] As an embodiment, the disclosed method for predicting the multi-label toxicity of traditional Chinese medicine based on multimodal and contrastive learning improves the discrimination ability and label semantic consistency of multi-label toxicity prediction by deeply integrating and effectively modeling multimodal data related to traditional Chinese medicine and using a contrastive learning mechanism. This achieves a systematic breakthrough in core issues such as the difficulty of data fusion, semantic alignment, and prediction accuracy in the task of multi-label toxicity prediction of traditional Chinese medicine. An intelligent prediction method combining multimodal deep representation and contrastive learning mechanism is proposed to improve the model's modeling ability for the complex toxic manifestations of traditional Chinese medicine from the source. The specific implementation process is as follows:
[0039] Step 1: Obtain the attribute data, component data, target sequence data and related association data of traditional Chinese medicine and pre-process them;
[0040] Specifically, step 11: obtaining attribute data of the traditional Chinese medicine, wherein the attribute data includes property and flavor data, meridian data, and efficacy data;
[0041] The nature and flavor data refer to the properties and smell of Chinese medicine, including cold, cool, neutral, warm, hot, sour, sweet, bitter, pungent, salty, light, and astringent. Each Chinese medicine has an expression vector, the length of the vector is the number of Chinese medicines, and the first The meaning of the element is expressed as The properties and flavor data of Chinese medicine.
[0042] Meridian data refers to the location of the effects of Chinese medicine, which closely links the effects of Chinese medicine with the organs and meridians of the human body. Each Chinese medicine has an expression vector, the length of the vector is the number of Chinese medicines, and the first The meaning of the element is expressed as Meridian data of Chinese medicine.
[0043] Efficacy data refers to the efficacy of Chinese medicine. Each Chinese medicine has an efficacy vector. The length of the vector is the number of all Chinese medicines. When there are two efficacy vectors, the first The element is 1, otherwise, it is 0.
[0044] The acquired nature and flavor data, meridian data, and efficacy-related One-Hot vectors of the traditional Chinese medicine are spliced to obtain the attribute vector of the traditional Chinese medicine. The feature dimension is the sum of the dimensions of nature and flavor, meridian data, and efficacy.
[0045] Step 12: Obtain the TCM ingredient data. The ingredient data is the molecular structure of the TCM ingredient described using SMILES notation. For example, the SMILES representation of eugenol is COC1=C(C=CC(=C1)CC=C)O. Next, use the RDKit library in Python to convert the SMILES of the ingredient molecules into Morgan fingerprints, which are then used as TCM ingredient vectors.
[0046] Step 13: Obtain target sequence data, where the target sequence data refers to the amino acid sequence of the protein target. Then, use the Prot2Vec library in Python to convert it into a target feature vector.
[0047] Step 14: Obtain relevant associated data, including Chinese medicine component associated data, Chinese medicine target associated data, and component target associated data.
[0048] Among them, Chinese medicine ingredient association data refers to the ingredients contained in currently known Chinese medicines; Chinese medicine target association data refers to the association between currently known Chinese medicines and protein targets in the human body.
[0049] As an embodiment, the preprocessing of the above process is the encoding of the original vector, and the multimodal data involved in the prediction of traditional Chinese medicine toxicity is preprocessed to achieve unified encoding and feature representation. In the specific implementation process, different types of vectorization strategies or embedding technologies can be used as replacements. For example, for traditional Chinese medicine attribute data, pre-trained language models such as BioBERT and PubMedBERT can be used as replacements to obtain a more semantically rich representation; for ingredients, graph neural network representation can be used instead of traditional molecular feature extraction.
[0050] Step 2: Input the attribute data, component data, target sequence data and related associated data of traditional Chinese medicine into the multimodal feature extraction network. First, the information encoding module is used to extract the attribute features, component features and target features of traditional Chinese medicine respectively. The component features, target features and related associated data are used for data fusion processing to obtain component fusion features and target fusion features respectively. Then, the semantic alignment module is used to align and fuse the attribute features, component fusion features and target fusion features of the unified embedded coding to obtain aligned fusion features. The context perception mechanism is introduced to extract the deep interactive relationship of the aligned fusion features and obtain the multimodal vector of the fusion context.
[0051] Specifically, the multimodal feature extraction network includes an information encoding module, a semantic information alignment module, and a context perception mechanism. The information encoding module is used to map the multimodal raw vector encoding into a unified feature representation to obtain the features of each modality. The semantic alignment module is used to align and fuse the multimodal features in the unified embedding space. The context perception mechanism extracts the deep interactive relationship of features and obtains the multimodal vector of the fused context. The specific implementation process is as follows:
[0052] Step 21: The information encoding module extracts multimodal features;
[0053] Specifically, step 211: obtaining the attribute characteristics of traditional Chinese medicine, including: inputting the original vectors of attribute data, component data, target sequence data and related associated data into the multimodal feature extraction network, first entering the information encoding module, for the attribute data, set the first The original attribute vector of a Chinese medicine is , which includes multi-dimensional attributes such as nature, flavor, meridians, and efficacy. The dimension of the feature vector after the S1011 neutral taste, meridian, and efficacy data are concatenated; it is mapped to the same Dimensional space, get the property representation of traditional Chinese medicine ,in , are the bias matrix and vector in linear transformation respectively.
[0054] Step 212: Obtaining component characteristics, including: components, let the original vector of its SMILES data conversion be , is the characteristic dimension of the original vector; the original characteristic vector of the component is converted into a unified Dimensional component features ,in , are the bias matrix and vector in linear transformation respectively.
[0055] Step 213: Obtain target features, including: targets, let the original vector of its sequence data be , is the characteristic dimension of the original vector; the original characteristic vector of the target is converted into a unified Dimensional target features ,in , are the bias matrix and vector in linear transformation respectively.
[0056] Step 214: Obtaining component fusion features, including: Based on the Chinese medicine component association data, The collection that is successfully associated is , For traditional Chinese medicine The number of components; for each component feature Calculating attention scores , is the bias parameter; the attention score is then softmax normalized:
[0057]
[0058] Then, we get the Chinese medicine by weighted sum The fusion characteristics of the ingredients .
[0059] Step 215: Obtain target fusion features, including: based on the TCM target association data, The collection that is successfully associated is , For traditional Chinese medicine The number of targets; for each target feature Calculating attention scores , is the bias parameter; the attention score is then softmax normalized:
[0060]
[0061] Then, we get the Chinese medicine by weighted sum Target fusion characteristics .
[0062] Step 22: Unify projection coding;
[0063] Specifically, the feature vectors of different modalities are mapped to a unified embedding space to eliminate the representation differences between modalities. Let the attribute features, component fusion features, and target fusion features of traditional Chinese medicine be: , the unified projection changes to ,in is a learnable projection matrix, which enables different modal features to be unified into dimensional feature representation.
[0064] Step 23: Using the semantic alignment module, the attribute features, component fusion features, and target fusion features of the unified embedding code are aligned and fused to obtain aligned fusion features.
[0065] Specifically, due to the potential semantic shift in multimodal data, this paper designs a semantic alignment module based on the self-attention mechanism to calculate the importance weight of each modality in the fusion process, and defines the fusion weight as:
[0066]
[0067] Similarly, we get and ,in is a learnable parameter. Finally, the aligned fusion representation is obtained, that is, the aligned fusion feature .
[0068] Step 24: Introduce a context-aware mechanism to extract the deep interaction relationship of the aligned fusion features and obtain a multimodal vector of the fusion context;
[0069] Specifically, to further explore the deep interactive relationships between traditional Chinese medicines, ingredients, and targets, this paper introduces a context-aware mechanism to guide the flow of information between different modalities. Let traditional Chinese medicine be the query, ingredients and targets be the key / value pairs, and calculate the cross-modal interaction vector:
[0070]
[0071] Then, the multimodal vector of the fusion context obtained is ,in Represents vector concatenation operation, .
[0072] As an example, a multimodal fusion strategy using a unified embedding space is used to integrate various types of traditional Chinese medicine-related information. Alternatively, methods such as gating mechanisms and collaborative representation learning can be used to achieve efficient fusion and semantic alignment between multimodal data.
[0073] Step 3: Based on the contrastive learning feature optimization method of dynamic coefficients, a contrastive loss function is constructed to guide the model to learn a more discriminative and semantically consistent representation of traditional Chinese medicine toxicity.
[0074] Specifically, step 31: similarity calculation of Chinese medicine samples. To effectively capture the complex associations between multi-label toxic Chinese medicines, this disclosure designs a dynamic coefficient based on the similarity of Chinese medicine toxicity labels. This dynamic coefficient provides a flexible weighting mechanism that can quantify the similarity of toxicity characteristics between Chinese medicine pairs. First, cosine similarity is used to measure the similarity between two Chinese medicine samples:
[0075]
[0076] in, represents the cosine similarity, They are the first and The characteristic vector of Chinese medicine, express norm.
[0077] Step 32: Calculate toxicity label similarity. To further integrate the relationship between toxicity labels, the present disclosure uses dynamic toxicity label similarity:
[0078]
[0079] Among them, dynamic toxicity label similarity Indicates the and The proportion of toxicity labels shared among Chinese medicines. and It is and Multi-label toxicity labels for traditional Chinese medicines, is the number of multi-labels. Indicates the number of toxicity labels shared between two Chinese medicines, the denominator Indicates the The total number of toxicity labels for Chinese medicines.
[0080] Step 33: Contrastive learning loss function based on dynamic coefficients. For each sample pair, based on the dynamic coefficients , the standard NT-Xent loss is weighted to compute the label contrastive learning loss:
[0081]
[0082] in, is the temperature hyperparameter used to scale the similarity scores, is the total number of TCM samples. This formula allows the model to emphasize similar TCM pairs during training and effectively learn the representation of multi-label toxic TCMs through contrastive learning.
[0083] Step 34: DNN-based TCM multi-label prediction output, including: the final model objective is to jointly minimize the contrast loss With multi-label classification loss ;
[0084] Among them, the multi-label classification loss for:
[0085]
[0086] in, and are the number of TCM samples and labels, and Respectively The first Chinese medicine The predicted and true values of the toxicity labels.
[0087] The overall loss function is:
[0088]
[0089] in, is the balance factor between the two loss functions.
[0090] Finally, a deep neural network (multi-layer perceptron DNN) is used to take the fused TCM representation as input and output the predicted probability of each toxicity label. ,in It is a sigmoid activation function that makes independent predictions for each label.
[0091] As an example, a multi-label contrastive learning mechanism is used to enhance the model's ability to model relationships between toxicity labels. Alternatively, strategies such as convolutional networks, attention networks, and interactive embedding mechanisms can be used to model inter-label structures and jointly trained with the backbone network to improve multi-label prediction.
[0092] Example 2
[0093] In one embodiment of the present disclosure, a multi-label toxicity prediction system for traditional Chinese medicine based on multimodal and contrastive learning is provided, comprising:
[0094] Data acquisition module, used to obtain the attribute data, component data, target sequence data and related association data of traditional Chinese medicine;
[0095] The feature extraction and fusion module is used to input the attribute data, component data, target sequence data and related associated data of traditional Chinese medicine into the multimodal feature extraction network. First, the information encoding module is used to extract the attribute features, component features and target features of traditional Chinese medicine respectively. The component features, target features and related associated data are used for data fusion processing to obtain component fusion features and target fusion features. Then, the semantic alignment module is used to align and fuse the attribute features, component fusion features and target fusion features of the unified embedded coding to obtain aligned fusion features. The context perception mechanism is introduced to extract the deep interactive relationship of the aligned fusion features and obtain the multimodal vector of the fusion context.
[0096] The contrast output module is used to introduce the contrastive learning mechanism. By constructing a loss function by constructing positive and negative label pairs, it guides the model to learn toxicity feature representations that are discriminative and semantically consistent. The multimodal vector of the fused context is input into the multi-layer perceptron DNN to output the toxicity prediction results.
[0097] Example 3
[0098] In one embodiment of the present disclosure, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the computer program implements the multi-label toxicity prediction method for traditional Chinese medicine based on multimodal and contrastive learning.
[0099] Example 4
[0100] In one embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, which is used to store computer instructions. When the computer instructions are executed by a processor, the multi-label toxicity prediction method for traditional Chinese medicine based on multimodal and contrastive learning is implemented.
[0101] Example 5
[0102] In one embodiment of the present disclosure, an electronic device is provided, comprising: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device implements the multi-label toxicity prediction method for traditional Chinese medicine based on multimodal and contrastive learning.
[0103] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0104] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0105] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Those skilled in the art should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A multi-label toxicity prediction method for traditional Chinese medicine based on multimodal and contrastive learning, characterized by: include: Obtaining the attribute data, component data, target sequence data and related association data of traditional Chinese medicine; The attribute data, component data, target sequence data and related association data of traditional Chinese medicine are input into the multimodal feature extraction network. First, the attribute features, component features and target features of traditional Chinese medicine are extracted respectively through the information encoding module. The component features, target features and related association data are used for data fusion processing to obtain component fusion features and target fusion features. Then, the semantic alignment module is used to align and fuse the attribute features, component fusion features, and target fusion features of the unified embedding code to obtain the aligned fusion features. The context-aware mechanism is introduced to extract the deep interaction relationship of the aligned fusion features and obtain the multimodal vector of the fusion context. A contrastive learning mechanism is introduced. By constructing a loss function through constructing positive and negative label pairs, the model is guided to learn toxicity feature representations that are discriminative and semantically consistent. The multimodal vector of the fused context is input into the multi-layer perceptron DNN, and the toxicity prediction results are output. Specifically, the dynamic coefficient of label similarity is designed to quantify the similarity of toxicity features between pairs of traditional Chinese medicines. First, cosine similarity is used to measure the similarity between two traditional Chinese medicine samples, and dynamic toxicity label similarity is used to incorporate the relationship between toxicity labels. For each sample pair, the standard NT-Xent loss is weighted based on the dynamic coefficient to calculate the label contrastive learning loss. The final function is to jointly minimize the contrast loss and the multi-label classification loss. The multi-layer perceptron DNN takes the multimodal vector of the fused context as input and outputs the predicted probability of each toxicity label.
2. The method for predicting the toxicity of traditional Chinese medicine based on multimodal and contrastive learning according to claim 1, wherein: The attribute data includes nature and flavor data, meridian data and efficacy data; the ingredient data is the molecular structure of the traditional Chinese medicine ingredients described using the SMILES representation; the target sequence data refers to the amino acid sequence of the protein target; and the related association data includes traditional Chinese medicine ingredient association data, traditional Chinese medicine target association data, ingredient target association data, traditional Chinese medicine interaction and similarity data, target interaction and similarity data and ingredient interaction and similarity data.
3. The method for predicting the toxicity of traditional Chinese medicine based on multimodal and contrastive learning according to claim 1, wherein: The multimodal feature extraction network includes an information encoding module, a semantic information alignment module and a context perception mechanism. The information encoding module maps the feature vector dimension after splicing the attribute data to a unified dimensional space through linear transformation plus ReLU nonlinear mapping to obtain the attribute characteristics of traditional Chinese medicine; similarly, the component data and target sequence data are subjected to nonlinear changes to convert the original feature vector into a unified feature representation to obtain component characteristics and target characteristics respectively.
4. The method for predicting the toxicity of traditional Chinese medicine based on multimodal and contrastive learning according to claim 1, wherein: Data fusion processing is performed using component features, target features and related associated data to obtain component fusion features and target fusion features, including: constructing a set of successful Chinese medicine associations in Chinese medicine component associated data, calculating an attention score for each component feature, and then performing softmax normalization on the attention scores, and weighted summing them to obtain the component fusion features of Chinese medicine; constructing a set of successful Chinese medicine associations in Chinese medicine target associated data, calculating an attention score for each target feature, and then performing softmax normalization on the attention scores, and weighted summing them to obtain the target fusion features of Chinese medicine.
5. The method for predicting the toxicity of traditional Chinese medicine based on multimodal and contrastive learning according to claim 1, wherein: The attribute features, component fusion features, and target fusion features of different modalities are mapped to a unified embedding space, so that the features of different modalities are unified into a multi-dimensional feature representation; a semantic alignment module based on the self-attention mechanism is used to calculate the importance weight of each modality in the fusion process to obtain the aligned fusion features, and a context-aware mechanism is introduced to guide the information flow between different modalities. Traditional Chinese medicine is used as the query, and components and targets are used as key-value pairs. The cross-modal interaction vector is calculated, and finally, the multimodal vector after the context is fused to obtain the multimodal vector of the fused context.
6. A multi-label toxicity prediction system for traditional Chinese medicine based on multimodal and contrastive learning, characterized by: include: Data acquisition module, used to obtain the attribute data, component data, target sequence data and related association data of traditional Chinese medicine; The feature extraction and fusion module is used to input the attribute data, component data, target sequence data and related association data of traditional Chinese medicine into the multimodal feature extraction network. First, the information encoding module extracts the attribute features, component features and target features of traditional Chinese medicine respectively, and then uses the component features, target features and related association data to perform data fusion processing to obtain component fusion features and target fusion features; Then, the semantic alignment module is used to align and fuse the attribute features, component fusion features, and target fusion features of the unified embedding code to obtain the aligned fusion features. The context-aware mechanism is introduced to extract the deep interaction relationship of the aligned fusion features and obtain the multimodal vector of the fusion context. The contrast output module is used to introduce a contrastive learning mechanism. By constructing a loss function by constructing positive and negative label pairs, the model is guided to learn a toxicity feature representation that is discriminative and semantically consistent. The multimodal vector of the fused context is input into the multi-layer perceptron DNN to output the toxicity prediction results. Specifically, it includes: A dynamic coefficient of label similarity is designed to quantify the similarity of toxicity characteristics between pairs of traditional Chinese medicines. First, cosine similarity is used to measure the similarity between two traditional Chinese medicine samples, and dynamic toxicity label similarity is used to incorporate the relationship between toxicity labels. For each sample pair, the standard NT-Xent loss is weighted based on the dynamic coefficient to calculate the label contrastive learning loss. The final function is to jointly minimize the contrast loss and the multi-label classification loss. The multi-layer perceptron DNN takes the multimodal vector of the fused context as input and outputs the predicted probability of each toxicity label.
7. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the traditional Chinese medicine multi-label toxicity prediction method based on multimodal and contrastive learning according to any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the multi-label toxicity prediction method of traditional Chinese medicine based on multimodal and contrastive learning is implemented as described in any one of claims 1 to 5.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to enable the electronic device to implement the multi-label toxicity prediction method for traditional Chinese medicine based on multimodal and contrastive learning as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method for evaluating and predicating toxicity and efficacy of medicament by using metabonomic technology
CN102339356A
Traditional Chinese medicine-target association prediction method and system based on multi-source heterogeneous data fusion
CN119007801A