Target point information processing method and device based on cross-modal model, equipment and medium
By using a cross-modal generation method based on the Transformer model, the limitations of data type and length in existing technologies are solved, enabling efficient and accurate target information processing to generate molecular structures with drug activity.
Patent Information
- Application Number
- CN202310797444.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-06-30
AI Technical Summary
Existing target molecule generation methods have limitations in data type and length, have a limited scope of application, low learning efficiency, and cannot assess the authenticity and quality of the generated molecules.
A cross-modal generation method based on the Transformer model is adopted. The target sequence is encoded by an encoder, and molecular structures are generated using a decoder, generator, and discriminator. The realism and quality of the generated molecules are evaluated through multi-task learning and adversarial generative networks.
It effectively handles data of different lengths and types, captures long-distance dependencies, improves the accuracy and quality assessment of generated molecules, and enhances the model's generation and generalization capabilities.
Smart Images

Figure CN116959591B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and digital medical technology, and in particular to a method, apparatus, device and medium for processing target information based on a cross-modal model. Background Technology
[0002] Target-based molecular generation refers to the task of generating drug-active molecular structures from given target sequences or structures using deep learning models. Similar to cross-modal generation (text-to-image or image-to-text) or translation tasks, it requires the effective encoding and decoding of different types of data to achieve information conversion and preservation.
[0003] Currently, there are several target-based molecular generation methods in the industry, such as: The first method, based on the Mol2vec molecular vector similarity algorithm, transforms the molecular structure into a continuous vector representation, then uses an attention-based sequence-to-sequence model to generate molecular vectors from the target sequence, and finally uses a molecular fingerprint search algorithm to find the most similar molecules from a pre-built molecular library as candidate outputs; the second method, based on the Graph2Graph (Graph-to-Graph) model, represents both the molecular and target structures as graph structures, then uses a model based on Graph Convolutional Neural Networks (GCN) and Variational Autoencoders (VAE) to generate molecular graphs from the target graph, and finally uses a graph edit distance algorithm to optimize and filter the generated molecular graphs; the third method, based on Graph-based Machine Translation (GraphMT) models, represents both the molecular structure and target sequence as graph structures, then uses a model based on multi-head self-attention and Gate Recurrent Units (GRU) to generate molecular graphs from the target graph, and finally uses a reinforcement learning algorithm to score and rank the generated molecular graphs.
[0004] Existing molecular generation methods all have certain advantages, but they also have some drawbacks, shortcomings, or problems. For example: First, the Mol2vec-based molecular generation method requires the pre-construction of a large-scale molecular library and relies on the efficiency and accuracy of molecular fingerprint search algorithms. Moreover, converting molecular structures into continuous vector representations may result in the loss of some important topological information and chemical properties. Second, the Graph2Graph-based molecular generation method requires complex preprocessing and post-processing of molecular and target structures and relies on the efficiency and accuracy of graph editing distance algorithms. Furthermore, using VAEs for encoding and decoding may result in some unreasonable or infeasible structures in the generated molecular graph. Third, the GraphMT-based molecular generation method requires the complex conversion of target sequences into graph structures and relies on the stability and convergence of reinforcement learning algorithms. Moreover, using GRUs for decoding may result in some duplicate or redundant nodes or edges in the generated molecular graph.
[0005] In summary, there is an urgent need for a target information processing method that is not limited by data type or length, has a wide range of applications, high learning efficiency, and can assess authenticity and quality. Summary of the Invention
[0006] This invention provides a method, apparatus, computer equipment, and medium for processing target information based on a cross-modal model, in order to solve the technical problems of limitations in the types and lengths of data processed by the model, small application scope, low learning efficiency, and inability to evaluate the authenticity and quality.
[0007] Firstly, a target information processing method based on a cross-modal model is provided, the method comprising:
[0008] Acquire training data, which is a correspondence between target sequences and molecular structures;
[0009] The target sequence is encoded using an encoder of a Transformer model to obtain the hidden representation matrix of the target. The Transformer model also includes a decoder, a generator, a discriminator, and an output layer.
[0010] The molecular structure is decoded using the decoder to obtain the predicted representation matrix of the molecular structure. Based on the hidden representation matrix, the predicted representation matrix, the node feature matrix of the molecular structure, and the adjacency matrix of the molecular structure, the objective function of the decoder is obtained. The objective function of the decoder is to maximize the log-likelihood of the molecular structure.
[0011] Using the node feature matrix of the molecular structure as input, the generator obtains the generated molecular structure and outputs the adjacency matrix of the molecular structure. The objective function of the generator is to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure.
[0012] Using the node feature matrix and adjacency matrix of the molecular structure as input, the discriminator obtains the true / false probability and quality score of the generated molecular structure. The objective function of the discriminator is to maximize the log-likelihood and quality score of the molecular structure and minimize the log-likelihood and quality score of the generated molecular structure.
[0013] The generated molecular structure is output by the output layer and predicted by binary classification or regression methods to obtain predicted attribute values. The predicted attribute values include predicted values of drug activity, toxicity and solubility. The objective function of the output layer is to minimize the total loss between the attribute values of all the molecular structures and the predicted attribute values of the generated molecular structure.
[0014] Secondly, a target information processing device based on a cross-modal model is provided, the device comprising:
[0015] The acquisition module is used to acquire training data, which is a correspondence between target sequences and molecular structures.
[0016] The encoding module is used to encode the target sequence with the encoder of the Transformer model to obtain the hidden representation matrix of the target. The Transformer model also includes a decoder, a generator, a discriminator and an output layer.
[0017] The decoding module is used to decode the molecular structure using the decoder to obtain the predicted representation matrix of the molecular structure. Based on the hidden representation matrix, the predicted representation matrix, the node feature matrix of the molecular structure, and the adjacency matrix of the molecular structure, the objective function of the decoder is to maximize the log-likelihood of the molecular structure.
[0018] The generation module is used to take the node feature matrix of the molecular structure as input, obtain the generated molecular structure through the generator, and output the adjacency matrix of the molecular structure. The objective function of the generator is to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure.
[0019] The discrimination module is used to obtain the true and false probability and quality score of the generated molecular structure by taking the node feature matrix and adjacency matrix of the molecular structure as input and the discriminator. The objective function of the discriminator is to maximize the log likelihood and quality score of the molecular structure and minimize the log likelihood and quality score of the generated molecular structure.
[0020] An evaluation module is used to output the generated molecular structure through the output layer and predict it using a binary classification or regression method to obtain predicted attribute values. The predicted attribute values include predicted values for drug activity, toxicity, and solubility. The objective function of the output layer is to minimize the total loss between the attribute values of all the molecular structures and the predicted attribute values of the generated molecular structure.
[0021] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described target information processing method based on a cross-modal model.
[0022] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the target information processing method based on the cross-modal model described above.
[0023] In the aforementioned scheme implemented by the target information processing method, device, computer equipment, and storage medium based on a cross-modal model, training data is acquired; the target sequence is encoded using an encoder of a Transformer model to obtain the hidden representation matrix of the target; the molecular structure is decoded using a decoder; the node feature matrix of the molecular structure is used as input to generate the generated molecular structure through a generator, and the adjacency matrix of the molecular structure is output; the node feature matrix and adjacency matrix of the molecular structure are used as input to obtain the true / false probability and quality score of the generated molecular structure through a discriminator; the generated molecular structure is output from the output layer, and prediction is performed using a binary classification or regression method to obtain the predicted genus. The predicted attribute values include the predicted values of drug activity, toxicity, and solubility. In this invention, the Transformer model can effectively handle data of different lengths and types and can capture long-distance dependencies. Using a multi-task learning approach, while generating molecular structures from target sequences, the model predicts the drug activity, toxicity, solubility, and other attributes of the generated molecules, improving the model's generalization ability and providing more feedback signals. Using an adversarial generative network approach, after the generator outputs the generated molecular structures, a discriminator is used to judge whether they are true or false and to evaluate the quality, enhancing the model's generation ability and realizing the cross-modal generation task from target sequences to molecular structures. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a schematic diagram of an application environment for a target information processing method based on a cross-modal model according to an embodiment of the present invention;
[0026] Figure 2 This is a flowchart illustrating a target information processing method based on a cross-modal model in one embodiment of the present invention;
[0027] Figure 3 yes Figure 1 A schematic diagram of a specific implementation method for step S80;
[0028] Figure 4 This is a schematic diagram of a target information processing device based on a cross-modal model in one embodiment of the present invention;
[0029] Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;
[0030] Figure 6 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] The target information processing method based on cross-modal models provided in this invention can be applied to a server or computer terminal. The server or computer terminal acquires training data; the encoder of the Transformer model encodes the target sequence to obtain the hidden representation matrix of the target; the decoder decodes the molecular structure; the node feature matrix of the molecular structure is used as input, and the generator obtains the generated molecular structure and outputs the adjacency matrix of the molecular structure; the node feature matrix and adjacency matrix of the molecular structure are used as input, and the discriminator obtains the true / false probability and quality score of the generated molecular structure; the output layer outputs the generated molecular structure, and the prediction is performed by binary classification or regression methods to obtain predicted attribute values, including predicted values of drug activity, toxicity, and solubility. In this invention, the Transformer model can effectively handle data of different lengths and types and can capture long-distance dependencies; the multi-task learning approach is used to predict the drug activity, toxicity, solubility, and other attributes of the generated molecule while generating the molecular structure from the target sequence, which improves the generalization ability of the model and provides more feedback signals; the adversarial generative network approach is used to judge the true / false and evaluate the quality after the generator outputs the generated molecular structure, which enhances the generation ability of the model and realizes the cross-modal generation task from the target sequence to the molecular structure. The computer terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will now be described in detail through specific embodiments.
[0033] Please see Figure 1 As shown, Figure 1 A flowchart illustrating a target information processing method based on a cross-modal model provided in an embodiment of the present invention includes the following steps:
[0034] It should be noted that the ultimate goal of this method is to generate molecular structures with drug activity, that is, molecular structures that can interact with target sequences.
[0035] S10: Acquire training data, which is a correspondence between target sequences and molecular structures.
[0036] The training data consists of a correspondence between target sequences and molecular structures. It is particularly important to note that the molecular structures mentioned in this application are all real molecular structures from the training data, while the generated molecular structures are predicted molecular structures generated based on target information using a cross-modal generation model. The target sequence is a string of amino acid symbols representing the structure and function of a biomolecule. The molecular structure is a graph structure composed of atomic types and chemical bonds, representing the structure and properties of a compound. These training data can be obtained from publicly available databases or literature. For example, the ChEMBL database, developed by the European Bioinformatics Institute (EBI), is a database of targets and bioactive drugs containing over 2 million compounds and over 14,000 targets, providing information on the interactions between compounds and targets. The BindingDB database, released by the Michael K. Gilson laboratory at the University of California, San Diego, is a publicly accessible database that collects the affinity between drug targets, proteins, and drug-like small molecules, containing over 1.6 million compounds and over 7,000 targets, providing information on the binding constants between compounds and targets. The PDBbind database contains over 20,000 compounds and over 4,000 targets, providing three-dimensional structural information between compounds and targets. Target sequences and molecular structures are different types or formats of data, which need to be processed by multimodal or cross-modal generation models. Multimodal or cross-modal generation models refer to models that can process different types or formats of data and can generate or transform between different types or formats of data. For example, text-to-image or image-to-text models can generate images from text or text from images.
[0037] S20: The target sequence is encoded using the encoder of the Transformer model to obtain the hidden representation matrix of the target. The Transformer model also includes a decoder, a generator, a discriminator, and an output layer.
[0038] The Transformer model is a deep neural network model based on a self-attention mechanism. It consists of an encoder, decoder, generator, discriminator, and output layer. The encoder performs a specified feature extraction process on the input, also known as encoding. The encoder comprises multiple self-attention layers and feedforward layers. The self-attention layers calculate the correlation between each element in the input sequence and other elements, and then sum these correlations using weighted methods to obtain the output sequence. The feedforward layers perform non-linear transformations on the output sequence, increasing the model's expressive power.
[0039] This embodiment uses the Transformer model as the basic framework. Specifically, the target sequence X = {x1, x2, ..., x} n}, where x i It is a vector representing the vector representation of the i-th amino acid symbol, where n is the maximum number of target sites, and the molecular structure is Y = {y1, y2, ..., y}. m}, where y i is an atomic symbol, m is the maximum number of molecular structures, and the target sequence is encoded using a Transformer encoder to obtain the hidden representation matrix H = {h1, h2, ..., h} of the target. n}, where h i It is a vector.
[0040] S30: The molecular structure is decoded by the decoder to obtain the predicted representation matrix of the molecular structure. Based on the hidden representation matrix, the predicted representation matrix, the node feature matrix of the molecular structure, and the adjacency matrix of the molecular structure, the objective function of the decoder is obtained. The objective function of the decoder is to maximize the log-likelihood of the molecular structure.
[0041] It's important to note that the Transformer model's decoder consists of multiple layers of self-attention, encoder-decoder attention, and feedforward layers. The self-attention layers calculate the correlation between each element in the output sequence and every other element, and then sum these correlations using weighted methods to obtain the output sequence. The encoder-decoder attention layers calculate the correlation between each element in the output sequence and every element in the input sequence, and then sum these correlations using weighted methods to obtain the output sequence. The feedforward layers perform non-linear transformations on the output sequence, increasing the model's expressive power.
[0042] After encoding, the molecular structure is decoded using the Transformer model's decoder to obtain the molecular prediction representation matrix P = {p ij}, where p ij It is a scalar representing the probability that a chemical bond exists between the i-th atom and the j-th atom. The input to the decoder is the node feature matrix F = {f1, f2, ..., fj} of the molecular structure. m}, where f i It is a vector representing the type and attribute of the i-th atom. The decoder output is the adjacency matrix A = {a_i} of the molecular structure. ij}, where a ij is a scalar representing whether a chemical bond exists between the i-th and j-th atoms. Based on the hidden representation matrix, the predicted representation matrix, the node feature matrix of the molecular structure, and the adjacency matrix of the molecular structure, the objective function of the decoder is obtained. The objective function of the decoder is L.dec To maximize the log-likelihood of the molecular structure:
[0043]
[0044] The target function L of the decoder dec The objective function of the decoder represents the probability of generating molecular structures. Maximizing the objective function of the decoder enables the Transformer model to better fit the distribution of molecular structures, thereby improving the accuracy of generating molecular structures.
[0045] A chemical bond is an attractive force between particles, which can be atoms or molecules. Through chemical bonds, particles can form polyatomic chemical substances. Bonds are caused by the electromagnetic force between two opposite charges, which may originate from electrons and the atomic nucleus, or be caused by dipoles. There are many types of chemical bonds, varying in energy and bond length. In an atom, negatively charged electrons orbiting the nucleus attract the positively charged protons within the nucleus, while electrons located between the two nuclei are attracted by both. Therefore, the most stable configuration between the nucleus and electrons is when electrons are positioned between the two nuclei. These electrons enable the nuclei to attract each other, forming what is called a chemical bond. Chemical bonds do not reduce the volume of individual particles. Because electrons have relatively small mass and wave-like properties, they occupy a large portion of the volume relative to the nucleus, making the distance between nuclei greater.
[0046] S40: Using the node feature matrix of the molecular structure as input, the generator obtains the generated molecular structure and outputs the adjacency matrix of the molecular structure. The objective function of the generator is to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure.
[0047] In this embodiment, a decoder is used as a generator to generate molecular structures from target sequences. The input to the generator is the node feature matrix F = {f1, f2, ..., f...} of the molecular structure. m}, where fi is a vector representing the type and attribute of the i-th atom. The generator output is the adjacency matrix A = {a_i} of the molecular structure. ij}, where a ij `L` is a scalar representing whether a chemical bond exists between the i-th and j-th atoms in the molecular structure. The objective function of the generator is `L`. gen To minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure:
[0048]
[0049] Where D represents the probability of generating a true or false molecular structure. The generator's objective function represents the model's assessment of the authenticity of the generated molecular structure. Minimizing the generator's objective function allows the model to better deceive the discriminator, thus improving the authenticity of the generated molecular structure.
[0050] It's important to note that the generator uses an autoregressive approach to generate molecular structures. Starting from a specific start symbol, it progressively generates the type and properties of each atom, determining whether to generate the next atom or end the process based on the already generated atoms. Simultaneously, it progressively generates information about the existence of chemical bonds between each pair of atoms, again determining whether to generate the next chemical bond or end the process based on the already formed chemical bonds. This allows the generator to dynamically adjust the length and shape of the generated molecular structure while ensuring its integrity and rationality.
[0051] S50: Using the node feature matrix and adjacency matrix of the molecular structure as input, the discriminator obtains the true / false probability and quality score of the generated molecular structure. The objective function of the discriminator is to maximize the log-likelihood and quality score of the molecular structure and minimize the log-likelihood and quality score of the generated molecular structure.
[0052] In this implementation, a Transformer encoder is used as a discriminator to determine the authenticity and quality of the molecular structure. The discriminator's input is the node feature matrix and adjacency matrix (F, A) of the molecular structure. The discriminator's output is the probability of generating a true / false molecular structure and its quality score (D, Q). The objective function of the discriminator is L. dis To maximize the log-likelihood and mass score of the true molecular structure, and minimize the log-likelihood and mass score of the generated molecular structure:
[0053]
[0054] in, It is the node feature matrix that generates the molecular structure. It is the adjacency matrix for generating molecular structures. in is a scalar representing whether a chemical bond exists between the i-th and j-th atoms in the generated molecular structure. The objective function L of the discriminator... disThis indicates the Transformer model's ability to judge and evaluate molecular structures. Maximizing the discriminator's objective function allows the model to better distinguish between real and generated molecular structures, assigning high-quality scores to real molecular structures and low-quality scores to generated molecular structures, thus improving the quality of generated molecular structures. Combining the above two steps, a Generative Adversarial Network (GAN) is used. After the generator outputs the generated molecular structure, the discriminator judges its authenticity and evaluates its quality. GAN can enhance the model's generation ability and provide more gradient information.
[0055] It should be noted that the discriminator uses self-attention layers and feedforward layers to encode the input data, and fully connected layers and activation functions to predict the output data. The discriminator can distinguish between real and generated molecular structures, assigning high-quality scores to real molecular structures and low-quality scores to generated molecular structures.
[0056] S60: The generated molecular structure is output by the output layer and predicted by binary classification or regression methods to obtain predicted attribute values. The predicted attribute values include predicted values of drug activity, toxicity and solubility. The objective function of the output layer is to minimize the total loss between the attribute values of all the molecular structures and the predicted attribute values of the generated molecular structure.
[0057] In this implementation, an additional output layer is added to the decoder and generator. This output layer is used to predict properties such as drug activity, toxicity, and solubility of the generated molecular structure. These properties can be predicted using binary classification or regression. The objective function of the output layer is L. mtl To minimize the total loss between the attribute values of all the said molecular structures and the predicted attribute values of the generated molecular structure:
[0058]
[0059] Where k is the index of the attribute task, L k Y is the loss between the attribute value of the molecular structure corresponding to index k and the predicted attribute value of the generated molecular structure. k These are the actual attribute values. It predicts attribute values; the objective function L of the output layer is... mtlThis indicates the model's ability to predict the properties of molecular structures. When the objective function of the output layer is minimized, the predicted drug activity, toxicity, and solubility properties of the generated molecular structure are optimal and close to the true property values, thus improving the performance of the generated molecular structure. Multi-task learning is used to improve the model's generalization ability and feedback signal. Multi-task learning is a learning method that simultaneously learns multiple related tasks. This allows the model to share and transfer useful information when learning different tasks, and it allows for evaluation of the performance of the generated data from different perspectives, thereby improving the model's generalization ability and feedback signal.
[0060] In some embodiments, after outputting the generated molecular structure through the output layer and predicting it using a binary classification or regression method to obtain predicted attribute values, the method further includes:
[0061] The predicted attribute values are optimized using cross-entropy or mean squared error.
[0062] In the embodiments of the invention, please refer to Figure 2 As shown, Figure 2 Another flowchart illustrating the target information processing method based on a cross-modal model provided in this embodiment of the invention includes the following steps in addition to steps S10-S60:
[0063] S70: The objective functions of the decoder, generator, discriminator, and output layer are weighted and summed to obtain the total objective function.
[0064] Specifically, the overall objective function L includes:
[0065] L = L dec +λ1L gen +λ2L dis +λ3L mtl
[0066] Where λ1, λ2, and λ3 are hyperparameters used to control the relative importance of different objective functions, L dec L is the objective function of the decoder, used to maximize the log-likelihood of the molecular structure; gen L is the objective function of the generator, used to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure; dis L is the objective function of the discriminator, used to maximize the log-likelihood and mass score of the real molecular structure, and minimize the log-likelihood and mass score of the generated molecular structure; mtl It is the objective function of the output layer, used to minimize the total loss of all attribute prediction tasks.
[0067] S80: Update the model parameters of the Transformer model according to the overall objective function, and save the updated Transformer model as an evaluation model.
[0068] The meaning and function of the overall objective function L is to comprehensively consider all objective functions in order to achieve a high-quality generation task from the target sequence to the generated molecular structure.
[0069] In some embodiments, such as Figure 3 As shown, step 80 includes:
[0070] S801: Randomly select a set number of samples from the training data as a mini-batch sample;
[0071] S802: Based on the mini-batch samples, calculate the value and gradient of the overall objective function, update the model parameters of the Transformer model according to the gradient, randomly select a set number of samples from the training data again, and repeat S801 and S802 until the model parameters converge or reach the preset number of cycles.
[0072] Preferably, the quantity is set to 32. The preset number of cycles is 100.
[0073] As can be seen, in the above scheme, the model parameters are trained using stochastic gradient descent (SGD) or other optimization algorithms, and the model parameters are updated according to the overall objective function. This process is repeated multiple times until the model parameters converge or a preset stopping condition is met.
[0074] In some embodiments, after step 80, the method further includes:
[0075] The evaluation model is input with test data or newly acquired data to obtain evaluation metrics, which include generation accuracy, generation diversity, and generation realism.
[0076] Different metrics can be used to evaluate model performance, such as: generation accuracy, which represents the proportion of molecular structures generated by the model that are completely identical to real molecular structures; generation diversity, which represents the proportion of different or novel molecular structures generated by the model; and generation realism, which represents the proportion of molecular structures generated by the model that conform to chemical rules and logic. Specifically, this includes whether the generated molecular structures are unreasonable or infeasible, whether the number of chemical bonds between atoms exceeds the limit, and whether the distance between atoms is too close or too far. We can use some chemical tools or software to detect the realism of the molecular structures generated by the model and calculate the proportion of realism.
[0077] This invention provides a target information processing method based on a cross-modal model. Using the Transformer model, it can effectively process data of different lengths and types and capture long-distance dependencies. Employing multi-task learning, it predicts the drug activity, toxicity, solubility, and other properties of the generated molecules while simultaneously generating molecular structures from target sequences, improving the model's generalization ability and providing more feedback signals. Using an adversarial generative network approach, after the generator outputs the generated molecular structures, a discriminator performs true / false judgment and quality assessment, enhancing the model's generation capability and realizing the cross-modal generation task from target sequences to molecular structures.
[0078] To facilitate understanding, the calculation process will be illustrated below with a specific example, focusing on the overall objective function:
[0079] Suppose the input target sequence is X = {A, R, G}, where A, R, and G are amino acid symbols.
[0080] Assume the output molecular structure is Y = {C, C, O, H, H, H, H}, where C, O, and H are atomic symbols. The node feature matrix of the molecular structure is F = {f1, f2, ..., f7}, where f i It is a vector representing the type and attribute of the i-th atom. ij}, where a ij It is a scalar representing whether a chemical bond exists between the i-th atom and the j-th atom. For example, a 12 =1 indicates that there is a chemical bond between the first and second atoms, a 13 =0 indicates that there is no chemical bond between the first and third atoms.
[0081] Assume the drug activity, toxicity, and solubility of the output molecular structure are Y, respectively. k ={0.8, 0.2, 0.6}, where k = 1, 2, 3 represent drug activity, toxicity, and solubility, respectively.
[0082] Suppose that the hidden representation obtained by the encoder after encoding the target sequence is H = {h1, h2, h3}, where h i It is a vector.
[0083] Suppose that the predicted representation obtained by the decoder after decoding the molecular structure is P = {p ij}, where p ij It is a scalar representing the probability that a chemical bond exists between the i-th atom and the j-th atom. For example, p 12 =0.9 indicates a high probability that there is a chemical bond between the first and second atoms, p 13=0.1 indicates that the probability of a chemical bond between the first and third atoms is very low.
[0084] Assuming the generator produces the generated representation of the molecular structure, the generated representation is... in It is a scalar representing whether a chemical bond exists between the i-th and j-th atoms generated. For example, This indicates that there is a chemical bond between the first and second atoms formed. This indicates that there is no chemical bond between the first and third atoms formed.
[0085] Assume that the true / false probability and quality score obtained by the discriminator after judging and evaluating the molecular structure are (D, Q) = {(d ij q ij )}, where d ij q is a scalar representing the probability that the discriminator considers a chemical bond to exist between the i-th and j-th atoms. ij It is a scalar representing the mass score that the discriminator assigns to the existence of a chemical bond between the i-th atom and the j-th atom. For example, (d 12 q 12 The value (0.95, 0.9) indicates that the discriminator considers the probability of a chemical bond between the first and second atoms to be high, and assigns a high quality score to this chemical bond. 13 q 13 The value of (0.05, 0.1) indicates that the discriminator considers the probability of a chemical bond between the first and third atoms to be very low, and assigns a very low quality score to this chemical bond.
[0086] Assuming that the predicted attribute value obtained after multi-task learning predicts the generated molecular structure is Where k = 1, 2, 3 represent drug activity, toxicity, and solubility, respectively.
[0087] Suppose that the values of hyperparameters λ1, λ2, and λ3 are 0.1, 0.1, and 0.1, respectively.
[0088] The calculation process for each part of the overall objective function is as follows:
[0089] The target function L of the decoder dec It is to maximize the log-likelihood of the molecular structure, that is:
[0090]
[0091] Based on the above example, L dec The value can be calculated as:
[0092] L dec =logP(a12 |F,H)+logP(a 13 |F,H)+...+logP(a 67 |F,H)
[0093] L dec = log0.9 + log0.1 + ... + log0.8
[0094] L dec = -7.82
[0095] The objective function L of the generator gen It minimizes the negative log-likelihood of the discriminator with respect to the generated molecular structure, that is:
[0096]
[0097] Based on the above example, L gen The value can be calculated as:
[0098]
[0099] L gen =-log0.05-log0.95-...-log0.1
[0100] L gen =16.32
[0101] The objective function L of the discriminator dis It is about maximizing the log-likelihood and mass score of the true molecular structure, and minimizing the log-likelihood and mass score of the generated molecular structure, i.e.:
[0102]
[0103] Based on the above example, L dis The value can be calculated as:
[0104]
[0105] L dis =(log0.95+0.9)+(log0.05+0.1)+...+(log0.9+0.8)-(log0.05+0.1)-(log0.95+0.9)-...-(log0.1+0.2)
[0106] L dis =7.82 - 16.32 = -8.5
[0107] The objective function L of the output layer mtl This minimizes the total loss of the all-attribute prediction task. Assuming we use the mean squared error as the loss function, that is:
[0108]
[0109] Based on the above example, L mtl The value can be calculated as:
[0110]
[0111] L mtl =(0.8-0.7) 2 +(0.2-0.3) 2 +(0.6-0.5) 2
[0112] L mtl =0.02 + 0.01 + 0.01 = 0.04
[0113] The overall objective function L is the weighted sum of the objective functions of all parts, i.e.:
[0114] L = L dec +λ1L gen +λ2L dis +λ3L mtl
[0115] Based on the example above, the value of L can be calculated as follows:
[0116] L = L dec +λ1L gen +λ2L dis +λ3L mtl
[0117] L=-7.82+0.1×16.32+0.1×(-8.5)+0.1×0.04
[0118] L = -0.54
[0119] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0120] In one embodiment, a target information processing device based on a cross-modal model is provided, which corresponds one-to-one with the target information processing method based on a cross-modal model in the above embodiments. For example... Figure 4 As shown, the target information processing device based on a cross-modal model includes an acquisition module 41, an encoding module 42, a decoding module 43, a generation module 44, a discrimination module 45, and an evaluation module 46. Detailed descriptions of each functional module are as follows:
[0121] The acquisition module 41 is used to acquire training data, which is a correspondence between target sequences and molecular structures;
[0122] Encoding module 42 is used to encode the target sequence with an encoder of a Transformer model to obtain the hidden representation matrix of the target. The Transformer model also includes a decoder, a generator, a discriminator and an output layer.
[0123] Decoding module 43 is used to decode the molecular structure with the decoder to obtain the prediction representation matrix of the molecular structure, and to obtain the objective function of the decoder based on the hidden representation matrix, the prediction representation matrix, the node feature matrix of the molecular structure and the adjacency matrix of the molecular structure. The objective function of the decoder is to maximize the log-likelihood of the molecular structure.
[0124] The generation module 44 is used to take the node feature matrix of the molecular structure as input, obtain the generated molecular structure through the generator, and output the adjacency matrix of the molecular structure. The objective function of the generator is to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure.
[0125] The discrimination module 45 is used to obtain the true and false probability and quality score of the generated molecular structure by taking the node feature matrix and adjacency matrix of the molecular structure as input and the discriminator. The objective function of the discriminator is to maximize the log likelihood and quality score of the molecular structure and minimize the log likelihood and quality score of the generated molecular structure.
[0126] Evaluation module 46 is used to output the generated molecular structure through the output layer and predict its properties using binary classification or regression methods to obtain predicted attribute values. These predicted attribute values include predicted values for drug activity, toxicity, and solubility. The objective function of the output layer is to minimize the total loss between the attribute values of all molecular structures and the predicted attribute values of the generated molecular structure.
[0127] In one embodiment, the device further includes:
[0128] The optimization module 47 is used to optimize the predicted attribute value using cross-entropy or mean square error.
[0129] In one embodiment, the device further includes:
[0130] Function acquisition module 48 is used to perform a weighted summation of the target function of the decoder, the target function of the generator, the target function of the discriminator, and the target function of the output layer to obtain the total target function;
[0131] The parameter update module 49 is used to update the model parameters of the Transformer model according to the overall objective function, and save the updated Transformer model as an evaluation model.
[0132] In one embodiment, the overall objective function specifically includes:
[0133] L = L dec +λ1L gen +λ2L dis +λ3L mtl
[0134] Among them, L dec Let L be the target function of the decoder. gen Let L be the objective function of the generator. dis Let L be the objective function of the discriminator. mtl λ1, λ2, and λ3 are the objective functions of the output layer, and λ1, λ2, and λ3 are hyperparameters used to control the relative importance of different objective functions.
[0135] In one embodiment, the parameter update module 49 is specifically used for:
[0136] A predetermined number of samples are randomly selected from the training data to form a mini-batch.
[0137] Based on the mini-batch samples, calculate the value and gradient of the overall objective function, and update the model parameters of the Transformer model according to the gradient. Then, randomly select a set number of samples from the training data again as a mini-batch sample. Based on the mini-batch sample, calculate the value and gradient of the overall objective function, and update the model parameters of the Transformer model according to the gradient until the model parameters converge or reach a preset number of cycles.
[0138] In one embodiment, the optimal prediction of the drug activity, toxicity, and solubility properties of the generated molecular structure is achieved when the objective function of the output layer is minimized.
[0139] In one embodiment, the device further includes:
[0140] The verification module 50 is used to input test data or newly acquired data into the evaluation model to obtain evaluation indicators, including generation accuracy, generation diversity, and generation realism.
[0141] This invention provides a target information processing device based on a cross-modal model. Using the Transformer model, it can effectively process data of different lengths and types and capture long-distance dependencies. Employing a multi-task learning approach, it predicts the drug activity, toxicity, solubility, and other properties of the generated molecules while simultaneously generating molecular structures from target sequences, improving the model's generalization ability and providing more feedback signals. Using an adversarial generative network approach, after the generator outputs the generated molecular structure, a discriminator performs true / false judgment and quality assessment, enhancing the model's generation capability and realizing the cross-modal generation task from target sequences to molecular structures.
[0142] Specific limitations regarding the target information processing device based on cross-modal models can be found in the limitations of the target information processing method based on cross-modal models described above, and will not be repeated here. Each module in the aforementioned target information processing device based on cross-modal models can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0143] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a target information processing method based on a cross-modal model on the server side.
[0144] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements client-side functions or steps of a target information processing method based on a cross-modal model.
[0145] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0146] Acquire training data, which is a correspondence between target sequences and molecular structures;
[0147] The target sequence is encoded using an encoder of a Transformer model to obtain the hidden representation matrix of the target. The Transformer model also includes a decoder, a generator, a discriminator, and an output layer.
[0148] The molecular structure is decoded using the decoder to obtain the predicted representation matrix of the molecular structure. Based on the hidden representation matrix, the predicted representation matrix, the node feature matrix of the molecular structure, and the adjacency matrix of the molecular structure, the objective function of the decoder is obtained. The objective function of the decoder is to maximize the log-likelihood of the molecular structure.
[0149] Using the node feature matrix of the molecular structure as input, the generator obtains the generated molecular structure and outputs the adjacency matrix of the molecular structure. The objective function of the generator is to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure.
[0150] Using the node feature matrix and adjacency matrix of the molecular structure as input, the discriminator obtains the true / false probability and quality score of the generated molecular structure. The objective function of the discriminator is to maximize the log-likelihood and quality score of the molecular structure and minimize the log-likelihood and quality score of the generated molecular structure.
[0151] The generated molecular structure is output by the output layer and predicted by binary classification or regression methods to obtain predicted attribute values. The predicted attribute values include predicted values of drug activity, toxicity and solubility. The objective function of the output layer is to minimize the total loss between the attribute values of all the molecular structures and the predicted attribute values of the generated molecular structure.
[0152] This invention provides a computer device that can effectively process data of different lengths and types by using a Transformer model and can capture long-distance dependencies. Using a multi-task learning approach, it predicts the drug activity, toxicity, solubility, and other properties of the generated molecules while generating molecular structures from target sequences, improving the model's generalization ability and providing more feedback signals. Furthermore, by employing an adversarial generative network approach, after the generator outputs the generated molecular structures, a discriminator is used to determine whether they are true or false and to evaluate their quality, enhancing the model's generation capability and enabling cross-modal generation tasks from target sequences to molecular structures.
[0153] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0154] Acquire training data, which is a correspondence between target sequences and molecular structures;
[0155] The target sequence is encoded using an encoder of a Transformer model to obtain the hidden representation matrix of the target. The Transformer model also includes a decoder, a generator, a discriminator, and an output layer.
[0156] The molecular structure is decoded using the decoder to obtain the predicted representation matrix of the molecular structure. Based on the hidden representation matrix, the predicted representation matrix, the node feature matrix of the molecular structure, and the adjacency matrix of the molecular structure, the objective function of the decoder is obtained. The objective function of the decoder is to maximize the log-likelihood of the molecular structure.
[0157] Using the node feature matrix of the molecular structure as input, the generator obtains the generated molecular structure and outputs the adjacency matrix of the molecular structure. The objective function of the generator is to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure.
[0158] Using the node feature matrix and adjacency matrix of the molecular structure as input, the discriminator obtains the true / false probability and quality score of the generated molecular structure. The objective function of the discriminator is to maximize the log-likelihood and quality score of the molecular structure and minimize the log-likelihood and quality score of the generated molecular structure.
[0159] The generated molecular structure is output by the output layer and predicted by binary classification or regression methods to obtain predicted attribute values. The predicted attribute values include predicted values of drug activity, toxicity and solubility. The objective function of the output layer is to minimize the total loss between the attribute values of all the molecular structures and the predicted attribute values of the generated molecular structure.
[0160] This invention provides a computer-readable storage medium that can effectively process data of different lengths and types by using a Transformer model and can capture long-distance dependencies. Using a multi-task learning approach, it predicts the drug activity, toxicity, solubility, and other properties of the generated molecules while generating molecular structures from target sequences, improving the model's generalization ability and providing more feedback signals. Furthermore, by employing an adversarial generative network approach, after the generator outputs the generated molecular structures, a discriminator is used to determine whether they are true or false and to evaluate their quality, enhancing the model's generation capability and enabling cross-modal generation tasks from target sequences to molecular structures.
[0161] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0162] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0163] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0164] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A target information processing method based on a cross-modal model, characterized in that, The method includes: Acquire training data, which is a correspondence between target sequences and molecular structures; The target sequence is encoded using an encoder of a Transformer model to obtain the hidden representation matrix of the target. The Transformer model also includes a decoder, a generator, a discriminator, and an output layer. The molecular structure is decoded using the decoder to obtain the predicted representation matrix of the molecular structure. Based on the hidden representation matrix, the predicted representation matrix, the node feature matrix of the molecular structure, and the adjacency matrix of the molecular structure, the objective function of the decoder is obtained. The objective function of the decoder is to maximize the log-likelihood of the molecular structure. Using the node feature matrix of the molecular structure as input, the generator obtains the generated molecular structure and outputs the adjacency matrix of the molecular structure. The objective function of the generator is to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure. Using the node feature matrix and adjacency matrix of the molecular structure as input, the discriminator obtains the true / false probability and quality score of the generated molecular structure. The objective function of the discriminator is to maximize the log-likelihood and quality score of the molecular structure and minimize the log-likelihood and quality score of the generated molecular structure. The generated molecular structure is output by the output layer and predicted by binary classification or regression methods to obtain predicted attribute values. The predicted attribute values include predicted values of drug activity, toxicity and solubility. The objective function of the output layer is to minimize the total loss between the attribute values of all the molecular structures and the predicted attribute values of the generated molecular structure.
2. The target information processing method based on a cross-modal model as described in claim 1, characterized in that, After outputting the generated molecular structure using the output layer and predicting it using a binary classification or regression method to obtain predicted attribute values, the method further includes: The predicted attribute values are optimized using cross-entropy or mean squared error.
3. The target information processing method based on a cross-modal model as described in claim 1 or 2, characterized in that, After outputting the generated molecular structure using the output layer and predicting it using a binary classification or regression method to obtain predicted attribute values, the method further includes: The objective function of the decoder, the objective function of the generator, the objective function of the discriminator, and the objective function of the output layer are weighted and summed to obtain the overall objective function. The model parameters of the Transformer model are updated according to the overall objective function, and the updated Transformer model is saved as the evaluation model.
4. The target information processing method based on a cross-modal model as described in claim 3, characterized in that, The overall objective function specifically includes: L=L dec +λ1L gen +λ2L dis +λ3L mtl Among them, L dec Let L be the target function of the decoder. gen Let L be the objective function of the generator. dis Let L be the objective function of the discriminator. mtl λ1, λ2, and λ3 are the objective functions of the output layer, and λ1, λ2, and λ3 are hyperparameters used to control the relative importance of different objective functions.
5. The target information processing method based on a cross-modal model as described in claim 3, characterized in that, The step of updating the model parameters of the Transformer model according to the overall objective function specifically includes: A predetermined number of samples are randomly selected from the training data to form a mini-batch. Based on the mini-batch samples, calculate the value and gradient of the overall objective function, and update the model parameters of the Transformer model according to the gradient. Then, randomly select a set number of samples from the training data again as a mini-batch sample. Based on the mini-batch sample, calculate the value and gradient of the overall objective function, and update the model parameters of the Transformer model according to the gradient until the model parameters converge or reach a preset number of cycles.
6. The target information processing method based on a cross-modal model as described in claim 4 or 5, characterized in that, The optimal value for predicting the drug activity, toxicity, and solubility attributes of the generated molecular structure is achieved when the objective function of the output layer is minimized.
7. The target information processing method based on a cross-modal model as described in claim 3, characterized in that, After saving the updated Transformer model as the evaluation model, the method further includes: The evaluation model is input with test data or newly acquired data to obtain evaluation metrics, which include generation accuracy, generation diversity, and generation realism.
8. A target information processing device based on a cross-modal model, characterized in that, The device includes: The acquisition module is used to acquire training data, which is a correspondence between target sequences and molecular structures. The encoding module is used to encode the target sequence with the encoder of the Transformer model to obtain the hidden representation matrix of the target. The Transformer model also includes a decoder, a generator, a discriminator and an output layer. The decoding module is used to decode the molecular structure using the decoder to obtain the prediction representation matrix of the molecular structure, and to obtain the objective function of the decoder based on the hidden representation matrix, the prediction representation matrix, the node feature matrix of the molecular structure and the adjacency matrix of the molecular structure. The objective function of the decoder is to maximize the log-likelihood of the molecular structure. The generation module is used to take the node feature matrix of the molecular structure as input, obtain the generated molecular structure through the generator, and output the adjacency matrix of the molecular structure. The objective function of the generator is to minimize the negative log-likelihood of the discriminator with respect to the generated molecular structure. The discrimination module is used to obtain the true and false probability and quality score of the generated molecular structure by taking the node feature matrix and adjacency matrix of the molecular structure as input and the discriminator. The objective function of the discriminator is to maximize the log likelihood and quality score of the molecular structure and minimize the log likelihood and quality score of the generated molecular structure. An evaluation module is used to output the generated molecular structure through the output layer and predict it using a binary classification or regression method to obtain predicted attribute values. The predicted attribute values include predicted values for drug activity, toxicity, and solubility. The objective function of the output layer is to minimize the total loss between the attribute values of all the molecular structures and the predicted attribute values of the generated molecular structure.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the target information processing method based on a cross-modal model as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the target information processing method based on the cross-modal model as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Drug molecule generation method and device, terminal equipment and storage medium
CN112309510A
Drug prediction method and device based on deep learning
CN112635080A