Method, device, equipment and computer program for training molecular generation models

By training molecular generative models with incomplete labeled data and predicted attribute values, the method addresses the limitation of small attribute variety, improving the diversity and accuracy of generated molecules.

JP2025530744APending Publication Date: 2025-09-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2025512165
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-12-15
Filing Date
2023-05-31
Publication Date
2025-09-17

AI Technical Summary

Technical Problem

Existing molecular generation models are limited by the small variety of molecular attributes in fully labeled data, restricting the diversity of generated molecules.

Method used

A method and apparatus for training molecular generative models using incomplete labeled data, incorporating molecular attribute prediction data to enrich training samples and improve model diversity.

Benefits of technology

Enriches the variety of generated molecules by compensating for incomplete data, enhancing training accuracy and diversity without being limited to the attributes specified in fully labeled data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025530744000001_ABST
    Figure 2025530744000001_ABST
Patent Text Reader

Abstract

A method, apparatus, device, and storage medium for training a molecular generation model, relating to the field of quantum chemistry, includes the steps of: acquiring training data for the molecular generation model (610); if a labeled attribute value for at least one attribute among M attributes is missing in molecular attribute-labeled data of a sample molecule in the training data, predicting an attribute value for at least one attribute of the sample molecule to obtain molecular attribute predicted data for the sample molecule (620); acquiring molecular attribute tag data for the sample molecule based on the molecular attribute-labeled data and the molecular attribute predicted data for the sample molecule (630); and training the molecular generation model based on the molecular attribute tag data of the sample molecule to obtain a trained molecular generation model (640).
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] (CROSS-REFERENCE TO RELATED APPLICATIONS) This application claims priority to a Chinese patent application filed with the China Patent Office on December 15, 2022, bearing application number 202211612755.8 and entitled "Method, apparatus, device and storage medium for training molecular generation models," the entire contents of which are incorporated herein by reference.

[0002] The present application relates to the field of quantum chemistry, and in particular to a method, apparatus, device and storage medium for training molecular generative models. [Background technology]

[0003] In the field of quantum chemistry, the cost of generating new molecules can be significantly reduced by generating new molecules using molecular generation models.

[0004] In related art, complete labeled data is typically employed to train a molecular generation model, enabling the trained molecular generation model to generate new molecules, which are related to the attributes of molecules in the complete labeled data, where for any molecule, any attribute corresponding to it has a labeled attribute value in the complete labeled data.

[0005] However, the variety of molecular attributes in the completely labeled data is relatively small, and even for a molecular generation model trained based on this completely labeled data, there are few attribute options for generating new molecules, and as a result, the variety of new molecules that can be generated by the molecular generation model is also limited. Summary of the Invention [Means for solving the problem]

[0006] The embodiments of the present application provide a method, device, apparatus and storage medium for training a molecular generative model.

[0007] According to one aspect of an embodiment of the present application, there is provided a method for training a molecular generative model, executed by a computing device, the method comprising: acquiring training data for a molecular generation model, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer; determining that the molecular attribute labeled data of one sample molecule in the training data is incomplete when a labeled attribute value for at least one attribute among the M attributes is missing in the molecular attribute labeled data of the sample molecule, and predicting an attribute value for the at least one attribute of the sample molecule to obtain molecular attribute predicted data of the sample molecule; obtaining molecular attribute tag data of the sample molecule based on the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data; training the molecular generation model based on the molecular attribute tag data of the sample molecules to obtain a trained molecular generation model.

[0008] According to one aspect of an embodiment of the present application, there is provided an apparatus for training a molecular generative model, the apparatus comprising: a data acquisition module; a data prediction module; a tag acquisition module; and a model training module; the data acquisition module is configured to acquire training data for a molecular generation model, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer; the data prediction module is configured to determine that the molecular attribute-labeled data of one sample molecule in the training data is incomplete when a labeled attribute value for at least one attribute among the M attributes is missing in the molecular attribute-labeled data of the sample molecule, and predict an attribute value for the at least one attribute of the sample molecule to obtain molecular attribute prediction data of the sample molecule; the tag acquisition module is configured to obtain molecular attribute tag data of the sample molecule based on the molecular attribute labeled data and molecular attribute prediction data of the sample molecule; The model training module is configured to train the molecular generation model based on molecular attribute tag data of the sample molecules to obtain a trained molecular generation model.

[0009] According to one aspect of an embodiment of the present application, there is provided a computer device comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to realize the above-mentioned method for training a molecular generation model.

[0010] According to one aspect of an embodiment of the present application, a computer storage medium is provided, the computer-readable storage medium storing a computer program, and the computer program is loaded and executed by a processor to realize the above-mentioned method for training a molecular generative model.

[0011] According to one aspect of the present invention, there is provided a computer program product, the computer program product including a computer program stored in a computer-readable storage medium, wherein a processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program to cause the computer device to perform the method for training a molecular generative model described above.

[0012] The technical solutions provided by the embodiments of the present application may include the following beneficial effects:

[0013] By training a molecular generation model using training data lacking labeled attribute values, the molecular attributes that newly generated molecular data may have can be enriched without being limited to the few molecular attributes specified in the fully labeled data, thereby improving the diversity of molecular data generation. Furthermore, since the training data can include multiple fully labeled data, the training data can enrich the variety of molecular attributes of sample molecules, further improving the diversity of the output results of the molecular generation model.

[0014] In addition, since the training data lacks labeled attribute values ​​for M attributes, the lack of data in the incomplete labeled data can be compensated for by obtaining molecular attribute prediction data corresponding to the sample molecules. This improves the completeness of the training samples, making the subsequent training process smoother and improving the training accuracy of the molecular generation model.

[0015] In addition, unlike the training method in the related art that only adopts fully labeled data to train a molecular generation model, the technical solution provided in the embodiments of the present application allows training data lacking labeled attribute values ​​to be used to train a molecular generation model, thereby enriching the training method of the molecular generation model. [Brief explanation of the drawings]

[0016] [Figure 1] 1 is a schematic diagram of an implementation environment of the solution according to an embodiment of the present application; [Figure 2] FIG. 1 is a schematic diagram of a method for training a molecular generative model according to an embodiment of the present application. [Figure 3]FIG. 1 is a schematic diagram of a method for training a semi-supervised sequential variational autoencoder (SSVAE) model in the related art. [Figure 4] FIG. 1 is a schematic diagram of another SSVAE model training method in the related art. [Figure 5] FIG. 1 is a schematic diagram of a data merging method in the related art. [Figure 6] 1 is a flowchart of a method for training a molecular generative model according to an embodiment of the present application; [Figure 7] 1 is a flowchart of a method for training a molecular generative model according to another embodiment of the present application; [Figure 8] FIG. 2 is a schematic diagram of a mask matrix according to an embodiment of the present application; [Figure 9] FIG. 1 is a schematic diagram of a method for training a ConGen model (molecular generative model) according to one embodiment of the present application. [Figure 10] 1 is a flowchart of a method for training a molecular generative model according to another embodiment of the present application; [Figure 11] 1 is a flowchart of a method for training a molecular generative model according to another embodiment of the present application; [Figure 12] 1 is a schematic diagram of a method for training a molecular generative model and a molecular attribute prediction model according to an embodiment of the present application; [Figure 13] FIG. 1 is a schematic diagram of a performance comparison of models after switching from TensorFlow 1.0 to the PyTorch platform, according to one embodiment of the present application. [Figure 14] 1 is a schematic diagram of a molecule production method according to one embodiment of the present application; [Figure 15] FIG. 1 is a block diagram of an apparatus for training a molecular generative model according to an embodiment of the present application. [Figure 16] FIG. 1 is a block diagram of an apparatus for training a molecular generative model according to another embodiment of the present application. [Figure 17] FIG. 2 is a structural block diagram of a computer device according to another embodiment of the present application. DETAILED DESCRIPTION OF THE INVENTION

[0017] In order to more clearly describe the objectives, technical solutions and advantages of the present application, the following describes the embodiments of the present application in more detail with reference to the drawings.

[0018] Before describing the technical solution of the present application, some background technical knowledge related to the present application will be explained first. The following related arts can be arbitrarily combined with the technical solution of the embodiments of the present application as optional solutions, and all of them fall within the protection scope of the embodiments of the present application. The embodiments of the present application include at least part of the following contents:

[0019] Artificial intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results. In other words, AI is a comprehensive technology in computer science that seeks to understand the essence of intelligence and create new intelligent machines that can respond in a manner similar to human intelligence. AI is the study of design principles and implementation methods for various intelligent machines so that they can perceive, reason, and make decisions.

[0020] Artificial intelligence technology is a comprehensive field that encompasses a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, motion / interaction systems, and mechatronics. Artificial intelligence software technologies primarily include natural language processing and machine learning / deep learning.

[0021] Machine learning (ML) is a multidisciplinary field that encompasses various fields, including probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. ML focuses on the study of how computers can simulate or realize human learning behavior, acquire new knowledge and skills, and reorganize related knowledge structures to continuously improve their performance. ML is the core of artificial intelligence and a fundamental means of endowing computers with intelligence, and is applied to various fields of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning from demonstration.

[0022] Deep learning (DL) is a new research direction in the field of machine learning (ML) that was introduced to bring machine learning closer to its original goal of artificial intelligence. Deep learning learns the inherent rules and representation levels of sample data, and the information gained during learning is highly useful for interpreting data such as text, images, and audio. The ultimate goal of deep learning is to equip machines with human-like analytical and learning capabilities to recognize data such as text, images, and audio. Deep learning is a complex machine learning algorithm that has achieved results far surpassing previous related technologies in speech recognition and image recognition. Deep learning has achieved significant results in related fields such as search technology, data mining, machine learning, machine translation, natural language processing, multimedia learning, speech, recommendation, and personalization technology. Deep learning allows machines to mimic human activities such as listening and thinking, solving many complex pattern recognition problems and achieving significant advances in artificial intelligence-related technologies.

[0023] With the research and advancement of artificial intelligence technology, it has been researched and applied in multiple fields, such as general smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, virtual reality (VR), augmented reality (AR), games, virtual humans, and digital humans. With the development of technology, artificial intelligence technology is expected to be applied in more fields and play increasingly important value.

[0024] The solutions provided in the embodiments of the present application relate to techniques such as machine learning in artificial intelligence, and will be explained in detail by the following embodiments.

[0025] Before describing the technical solution of the present application, some terms related to the present application will be explained first. The following related descriptions can be arbitrarily combined with the technical solutions of the embodiments of the present application as alternative solutions, and all fall within the protection scope of the embodiments of the present application. The embodiments of the present application include at least part of the following contents:

[0026] Recurrent Neural Network (RNN): A special neural network structure proposed based on the idea that human cognition is based on past experience and memory. RNNs not only consider input from past moments, but also give the network the ability to "memorize" past content. RNNs are called recurrent neural networks because the current output is related to previous outputs in a sequence. Specifically, the network remembers previous information and applies it to calculating the current output. In other words, the nodes between hidden layers are connected rather than disconnected, and the input to the hidden layer includes not only the output of the input layer but also the output of the previous hidden layer.

[0027] Variational Autoencoder (VAE): A set of real samples is transformed into an ideal data distribution by an encoder network, and then this data distribution is passed to a decoder network to obtain a set of generated samples. If the generated samples are close enough to the real samples, the autoencoder model has been trained successfully.

[0028] SSVAE: This is the baseline model to which the ConGen model in this application is compared. The SSVAE model relies on a variational autoencoding algorithm and conditional inputs to achieve conditional molecular structure generation capabilities. However, this baseline SSVAE model has significant practical limitations (which ConGen overcomes).

[0029] ConGen: A conditional molecule generation model described in the examples of this application. ConGen is a new machine learning model based on autoencoders, which is capable of multi-conditional molecule generation even when the training data used is completely missing or has incomplete attribute tags (i.e., labeled attribute values).

[0030] PyTorch: A machine learning library for Python, typically used for neural networks and other gradient-related algorithms.

[0031] TensorFlow: Another Python machine learning library with almost the same functionality as PyTorch. However, TensorFlow and PyTorch have significant differences in their design philosophies. TensorFlow generally defines models using static graphs, which must be precompiled before execution to maximize runtime efficiency. PyTorch is based on dynamic graphs, which sacrifices some computational efficiency at runtime but offers greater flexibility.

[0032] (SMILES) Simplified Molecular-Inputline-Entry system: A specification for describing chemical structures using short ASCII strings. The design of SMILES strings allows them to directly represent the geometry of molecular chemical structures, and they are used to represent the encoder input and decoder output of generative models.

[0033] Positive semi-definite (PSD) matrix: A matrix M that satisfies special conditions and has the following properties: for any real column vector z, the real number z T Mz is positive or zero, and z T is the transpose of z. All feature values ​​in the PSD matrix M are non-negative.

[0034] Predictor: A sub-model in the ConGen model that is responsible for predicting molecular attributes. The input of the predictor is a molecular structure (which can be represented by a SMILES string or other molecular structure representation method). Optionally, the attribute in the present embodiment refers to the attribute of a molecule and may also be called a molecular attribute.

[0035] Encoder: A submodel of the ConGen model that encodes the input high-dimensional structure into a low-dimensional hidden space representation.

[0036] Decoder: A sub-model of the ConGen model that decodes the low-dimensional hidden space representation (from the encoder) and molecular attributes (from the predictor or training tags) into the original molecular structure representation (i.e., the input to the encoder).

[0037] Unconditional Generation: When generating molecules using ConGen's decoder, there is no need to specify any required attributes for the generated molecule.

[0038] Conditional Generation: When generating a molecule using ConGen's decoder, one or more required attributes are simultaneously specified for the generated molecule.

[0039] Covariance matrix: The correlation matrix between molecular attributes in the training data. s ×n p The tag matrix of the training data of size (n s is the number of sample molecules in the training data, and n p is the number of molecular attributes for training / generation), the size of the covariance matrix is ​​n p ×n p is.

[0040] In the methods provided in the embodiments of the present application, the entity performing each step may be a computer device, which refers to an electronic device having data calculation, processing, and storage capabilities. The computer device may be a terminal such as a personal computer (PC), a tablet computer, a smartphone, a wearable device, or an intelligent robot, or may be a server. Here, the server may be an independent physical server, a server cluster or a distributed system consisting of multiple physical servers, or even a cloud server providing cloud computing services.

[0041] Please refer to Figure 1, which is a schematic diagram of an implementation environment of a solution according to one embodiment of the present application. The implementation environment of the solution may include a model training device 10 and a model using device 20.

[0042] The model training device 10 may be an electronic device such as a PC, a computer, a tablet computer, or an intelligent robot, or other electronic device with more powerful computing capabilities. The model training device 10 may also be a server. The model training device 10 is configured to train a molecular generation model 30.

[0043] In an embodiment of the present application, the molecular generation model 30 is a machine learning model for generating molecules. Exemplarily, the molecular generation model 30 is a machine learning model for generating drug molecules. For example, the molecular generation model 30 can output generated molecules that match a target attribute based on a set attribute value or attribute interval of the target attribute. Optionally, the model training device 10 may employ machine learning to train the molecular generation model 30 to achieve better performance. Here, the target attribute may refer to any one or more molecular attributes corresponding to training data (e.g., incompletely labeled data), and the embodiment of the present application is not limited thereto.

[0044] The trained molecular generation model 30 may be deployed and used in a model-using device 20 to provide molecular generation services. The model-using device 20 may be a terminal device such as a mobile phone, a computer, a smart TV, a multimedia playback device, a wearable device, or a medical device, or may be a server, but the embodiments of the present application are not limited thereto.

[0045] In some embodiments, as shown in FIG. 1, the molecular generative model 30 may include a first generative network 31, a second generative network 32, and a molecular attribute prediction network 33.

[0046] The molecular attribute prediction network 33 may or may not be included in the molecule generation model 30, and may be an independent molecular attribute prediction model. The molecular attribute prediction network 33 may be realized as the above-mentioned predictor.

[0047] The first generating network 31 and the second generating network 32 are machine learning networks, and optionally, the first generating network 31 is an encoding network realized as the above-mentioned encoder, and the second generating network 32 is a decoding network realized as the above-mentioned decoder.

[0048] Optionally, molecular attribute prediction data of molecules is obtained by the molecular attribute prediction network 33 to fill in labeled attribute values ​​missing from the training data, and the filled training data is combined with the sample molecules to train the first generative network 31 and the second generative network 32. The training process of the molecular generative model is an iterative process, in which parameters of the first generative network 31, the second generative network 32, and the molecular attribute prediction network 33 can be continuously adjusted, so that the first generative network 31 and the second generative network 32 can be used again to train the same sample molecules lacking labeled attribute values ​​in combination with molecular attribute prediction data obtained by the adjusted molecular attribute prediction network 33. Optionally, the termination condition of the above iteration may be that the loss function value of the molecular generation model is less than or equal to a threshold, that the loss function value of the molecular generation model is approximately stable, that the number of iterations of the molecular generation model is greater than or equal to a threshold, etc., and the embodiments of the present application are not limited thereto.

[0049] Optionally, a trained molecular generation model (i.e., a molecular generation model that has completed training) may output generated molecules having set attribute values ​​for target attributes.

[0050] Please refer to FIG. 2, which is a schematic diagram of a method for training a molecular generative model according to one embodiment of the present application.

[0051] As shown in FIG. 2 , the incomplete labeled data 200 (i.e., training data) includes six molecules and labeled attribute values ​​for three attributes of the six molecules, where the labeled attribute values ​​refer to values ​​corresponding to molecular attributes, such as numerical values, grades, thresholds, etc. In the incomplete labeled data 200, if some labeled attribute values ​​are present, the portion is considered to be labeled data, and if some labeled attribute values ​​are absent, the portion is considered to be missing data. For example, if the incomplete labeled data includes N pieces of molecular attribute-labeled data, each of which includes labeled attribute values ​​for M attributes of one molecule, then the N pieces of molecular attribute-labeled data include at least one incomplete molecular attribute-labeled data, and the labeled attribute values ​​of at least one attribute are missing from the labeled attribute values ​​of the M attributes included in the incomplete molecular attribute-labeled data, where N and M are both positive integers. For example, in the incomplete labeled data 200, taking molecule 1 as an example, among the labeled attribute values ​​for the three attributes of molecule 1, only the value of attribute 1 is not missing, and values ​​for attributes 2 and 3 are missing. Optionally, such incomplete labeled data may also be called dirty data, which is very disadvantageous for training a model, and furthermore, many models do not support training using dirty data, such as the above-mentioned SSVAE model.

[0052] Considering that data deficiency in the incomplete labeled data will affect subsequent model training, the technical solution provided in this application can convert the incomplete labeled data 200 into a relatively complete training sample set 210 by using molecular attribute prediction data to compensate for (such as all or part of) the data deficiency in the incomplete labeled data. Obviously, in the training sample set 210, the values ​​for the three attributes of different molecules are molecular attribute prediction data if they are not molecular attribute labeled data, and there is no data deficiency.

[0053] Therefore, by training a molecular generation model using a relatively complete training sample set 210, the deficiencies caused by dirty data can be largely compensated for, and the incomplete labeled data can be converted into relatively complete training data. Because the incomplete labeled data itself has diverse data, the converted training sample set has richer data types (such as molecular attributes) than other similar training sample sets of complete labeled data, thereby further improving the diversity of the generation results of the molecular generation model.

[0054] In some embodiments, a molecular generation model trained by the technical solutions provided in the embodiments of the present application can rapidly generate a large number of semantically correct SMILES molecular structures (i.e., molecular data for representing molecules) in combination with given constraints (e.g., specifying some attributes required to generate molecules).

[0055] Fig. 3 is a schematic diagram of a training method for an SSVAE model according to the related art. 300 in Fig. 3 shows the training architecture of a molecular generative model (i.e., SSVAE model). The SSVAE model is a conditional molecular generative model based on a semi-supervised sequential variational autoencoder. The main idea of ​​the SSVAE model is as follows: An encoder sub-model is used to encode an input molecular structure x from a training dataset (also called training data) into a hidden space representation z; a predictor sub-model is used to predict the predicted attribute y of the input molecular structure x. P The actual molecular attribute tag y is obtained from the input molecular structure x. L If y exists, P is discarded, and the model is based on the actual molecular attribute tag y=y L Otherwise, the predicted attribute y=y of the input molecular structure x is used. P as the molecular attribute tag of the input molecular structure x. The internal molecular attribute tag y (i.e., the specified target attribute above) and the hidden space representation z are used as inputs to the decoder sub-model to generate the output molecular structure x. D Generate.

[0056] For different types of training data (labeled and unlabeled), the SSVAE model processes different types of data in different ways. For example, each sub-batch of training data set is split into two different sub-batches, e.g., a sub-batch with fully labeled data and a sub-batch without labeled data. The SSVAE model is then run twice, with the running method slightly different depending on whether the sub-batch is fully labeled or fully unlabeled. For clarity, see Figure 4.

[0057] 4 is a schematic diagram of a method for processing labeled and unlabeled data by an SSVAE model according to the related art, where 400 shows a method for training an SSVAE model employing fully labeled data, and 410 shows a method for training an SSVAE model employing fully unlabeled data. All molecules in the fully unlabeled data have no labeled attribute values, only predicted attribute values.

[0058] The loss function for the variational autoencoder (VAE) is calculated for the fully unlabeled data and the fully labeled data, respectively, while the loss function for the regression task is calculated only for the fully labeled data. These three loss functions are then added together to calculate the total training loss function for the small batch. Finally, once the SSVAE model is trained, the decoder submodel of the SSVAE model can be run independently by specifying the attributes y and the randomly sampled latent space input z to conditionally generate the required molecular data.

[0059] A major drawback of related techniques is that training datasets are either completely or incompletely labeled. The SSVAE model divides the problem as shown in Figure 4 to significantly simplify the model's data flow, mathematical background, and operation. In practice, the training dataset may contain molecules with incomplete tags, such as the completely labeled or incomplete molecules in Figure 4. This situation is even more likely when the database for training molecules is obtained from a publicly available database (e.g., PubChem) or a combination of several different databases. Figure 5 illustrates this more likely scenario.

[0060] Optionally, there are two cases where incomplete labeled data may appear. One is that publicly available databases themselves are actually incomplete. As shown in FIG. 5(a), the databases themselves may contain tagged data (labeled data) and untagged data (missing data), making the databases incomplete and defective ("dirty"). Most databases contain molecule entries with incomplete attribute tags (i.e., missing data). The other is when different databases are merged and the merged dataset is incomplete. As shown in FIG. 5(b), Database 1 contains only labeled attribute values ​​for Attribute 1 of Molecules 1 to 3, and Database 2 contains labeled attribute values ​​for Attributes 2 and 3 of Molecules 3 to 6. Combining Database 1 and Database 2 will result in attribute tags for Attributes 1 to 3 of Molecules 1 to 6, but the combined attribute tags are incomplete and some labeled attribute values ​​are missing. For example, molecules 1 to 2 lack labeled attribute values ​​for attributes 2 and 3, and molecules 4 to 6 lack labeled attribute values ​​for attribute 1.

[0061] That is, even for an ideal fully labeled molecular attribute dataset (e.g., molecular attribute tags obtained by computational methods), once molecular attribute datasets from different database sources are merged for model training, the problem of incomplete labeled data may occur to some extent. None of these "dirty" (incomplete) datasets in real-world situations can be used to train SSVAE models in related technologies, which significantly limits the use scenarios of SSVAE models, especially when it is necessary to generate molecules under multi-attribute conditions, such as in virtual screening of battery electrolytes or drugs.

[0062] On the other hand, in the technical solution provided in the embodiments of the present application, the SSVAE model in the related art is modified to obtain the ConGen model. This model is specifically designed for processing "dirty" (incomplete) training data, so that the ConGen model can be trained using a large amount of training data, such as data sources merged from different public and private sources. Therefore, the ConGen model can perform conditional molecule generation tasks that the SSVAE model cannot perform. For example, a fully labeled molecular attribute-labeled dataset from ZINC (e.g., including molecular weight MolWt, hydrophobicity LogP, and drug-likeness QED) and another similar fully labeled molecular attribute-labeled dataset from the Materials Project Electrolyte Genome (e.g., including molecular weight MolWt, electron affinity EA, and ionization potential IP) are given, and a molecular generation model (e.g., the ConGen model) is jointly trained. This molecular generation model can generate molecules (in the examples of this application, the molecules generated by the model are not necessarily true molecules, but may be, for example, molecular data for describing molecules, which are collectively referred to as molecules in the examples of this application) with the required MolWt, LogP, and EA values ​​(used to screen for known useful properties of lithium battery electrolytes). For these different molecular attribute-labeled datasets, the SSVAE model must process each tag attribute MolWt, LogP, and EA individually. On the other hand, a molecular generation model trained using the technical solution provided in the examples of this application does not have such limitations, and users can merge non-ideal actual data from multiple sources as needed.

[0063] According to the technical solutions provided in the embodiments of the present application, multi-attribute conditional molecule generation can be learned from dirty datasets, and a molecule generation model can also be trained by combining multiple datasets from different sources, which can seamlessly ignore the incomplete parts of the molecule attribute dataset and fill in the missing labeled attribute values ​​throughout the training process, so that the learned molecule generation model can satisfy multi-condition molecule generation without being limited to the molecular attribute conditions of the same database, thereby improving the diversity of molecule generation.

[0064] Referring to FIG. 6, FIG. 6 is a flowchart of a method for training a molecular generative model according to an embodiment of the present application. Each step of the method for training a molecular generative model may be performed by the model training device described above. In the following method embodiment, for ease of explanation, only the case where each step is performed by a "computer device" will be described. The method may include at least one of the following steps (610 to 640).

[0065] In step 610, training data for a molecular generation model is obtained, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer.

[0066] The training data refers to data for training a molecular generation model, and the molecular generation model is a machine learning model for generating molecules (or molecular data). The embodiments of the present application do not limit the specific type of the molecular generation model. Optionally, the molecular generation model may be the molecular generation model described in the above embodiments, or the molecular generation model may be the above-mentioned ConGen model. The molecular generation model may be an adjusted ConGen model (e.g., a ConGen model in which the encoder is replaced), or the molecular generation model may be another model for generating molecules.

[0067] In some embodiments, there is a one-to-one correspondence between molecules and molecular representations. The molecular representations include at least one of a SMILE string, a molecular diagram, a three-dimensional structure of the molecule, and a chemical fingerprint of the molecule. Optionally, the training data may include labeled attribute values ​​of the molecular representations of different sample molecules for the M attributes. Optionally, the training data may include labeled attribute values ​​of the SMILE strings of different sample molecules for the M attributes.

[0068] The sample molecule refers to a molecule as a sample for training the molecular generation model, and in this application, the number of sample molecules fed into the molecular generation model for training each time is not limited and can be set and adjusted according to actual usage needs. The molecular attribute labeled data of the sample molecule is used to indicate the attribute possessed by the sample molecule and the labeled attribute value of the attribute.

[0069] For example, referring to FIG. 2 , training data 200 includes molecular attribute-labeled data corresponding to six sample molecules, where the first molecular attribute-labeled data includes labeled attribute values ​​for Attribute 1, Attribute 2, and Attribute 3 of Molecule 1, but is missing labeled attribute values ​​for Attributes 2 and 3 of Molecule 1. Therefore, if at least one labeled attribute value is missing from the labeled attribute values ​​for M attributes of a molecule, the molecular attribute-labeled data of the molecule can be considered incomplete. If one molecular attribute-labeled data is incomplete among N molecular attribute-labeled data, the entire data is considered to be incomplete labeled data; that is, training data 200 can also be referred to as incomplete labeled data. Simply put, if one labeled attribute value is missing from a molecular attribute-labeled dataset of size N×M, the molecular attribute-labeled dataset is considered to be incomplete labeled data. Correspondingly, in a molecular attribute-labeled dataset of size N × M, if any labeled attribute value exists, the dataset is considered to be complete labeled data, where N is the number of molecules corresponding to the training data, i.e., the total number of sample molecules.

[0070] Optionally, any attributes mentioned in the embodiments herein refer to molecular attributes, i.e., properties possessed by molecules. In some embodiments, the molecular attributes include at least one of molecular weight (MolWt), hydrophobicity (LogP), drug-likeness (QED), electron affinity (EA), and ionization potential (IP). In some embodiments, the number of types of molecular attributes in the complete labeled data is smaller than the number of types of molecular attributes in the incomplete labeled data. As shown in FIG. 5, database 1 has only one molecular attribute, and database 2 has only molecular attribute 2 and molecular attribute 3, while the incomplete labeled data 200 (i.e., training data) of FIG. 2 has three types of molecular attributes.

[0071] Optionally, in embodiments of the present application, training data is constructed based on incomplete labeled data. For example, all or part of the incomplete labeled data may be directly determined as training data. For example, the sample molecules included in the training data may be all or part of the N molecules corresponding to the incomplete labeled data. In some embodiments, the incomplete labeled data is generated by merging complete labeled data, so the number of types of molecular attributes in the incomplete labeled data is greater than the number of types of molecular attributes in the complete labeled data, i.e., the scale of the incomplete labeled data is large. In other embodiments, the incomplete labeled data itself is a large database, and simply because the number of types of molecular attributes and the number of molecules are large, the data in the database is incomplete and relatively dirty. Of course, even though the incomplete labeled data is incomplete, the data scale of the incomplete labeled data may be larger, the number of types of molecular attributes, and the number of molecules may be greater than those of the complete labeled data.

[0072] The labeled attribute values ​​are used to label molecular attributes. These labeled attribute values ​​may refer to true attribute values, attribute values ​​labeled by experts, or attribute values ​​determined by a maturation model. Examples of the present application are not limited to these. For example, the labeled attribute values ​​in the molecular attribute-labeled data may be data related to attribute values ​​of the sample molecule listed in an authoritative database. These data may be measured by experts or scholars or predicted by a highly accurate molecular property prediction model. The present application is not limited to the method for acquiring the molecular attribute-labeled data. For example, the large-scale molecular attribute-labeled dataset ZINC includes labeled attribute values ​​for three molecular attributes: molecular weight (MolWt), hydrophobicity (LogP), and drug-likeness (QED). Another similar large-scale molecular attribute-labeled dataset, Materials Project Electrolyte Genome, includes labeled attribute values ​​for three molecular attributes: molecular weight (MolWt), electron affinity (EA), and ionization potential (IP). Optionally, molecular attribute labeled data simultaneously related to molecular weight MolWt, hydrophobicity LogP, drug-likeness QED, electron affinity EA, and ionization potential IP can be constructed based on molecular attribute labeled data in ZINC and Materials Project Electrolyte Genome, but the obtained molecular attribute labeled data is incomplete, i.e., some labeled attribute values ​​are missing. The process of obtaining incomplete labeled data (i.e., training data) will be described in detail below and will not be repeated here.

[0073] In step 620, if the molecular attribute labeled data of one sample molecule in the training data lacks a labeled attribute value for at least one attribute among the M attributes, determine that the molecular attribute labeled data of the sample molecule is incomplete, and predict an attribute value for at least one attribute of the sample molecule to obtain molecular attribute predicted data of the sample molecule.

[0074] In the embodiment of the present application, first, the completeness of the labeling of the training data is determined. If the labeling of the training data is complete, the molecular generation model can be trained directly based on the training data. If the labeling of the training data is incomplete, the molecular generation model can be trained by combining the molecular attribute labeled data and the molecular attribute predicted data.

[0075] Here, molecular attribute prediction data refers to data obtained by predicting the attributes of a molecule. The molecular attribute prediction data may include at least one predicted attribute value, where the predicted attribute value is a value obtained by prediction, for example, an attribute value obtained by predicting an attribute, while the labeled attribute value is the true value of the attribute value. The embodiments of the present application do not limit the scale of molecular attribute prediction data. Optionally, the molecular attribute prediction data of a molecule may include predicted attribute values ​​for M attributes of the molecule. Optionally, the molecular attribute prediction data of a molecule may include predicted attribute values ​​for at least one of the above attributes of the molecule. Taking FIG. 2 as an example, the molecular attribute prediction data of molecule 1 may include predicted attribute values ​​for attribute 2 and attribute 3. By predicting only missing data, training costs can be significantly reduced. The method for obtaining molecular attribute prediction data will be described in detail below and will not be repeated here.

[0076] Optionally, the above sample molecule may refer to any sample molecule of the training data, and the at least one attribute may refer to one or more attributes of the M attributes.

[0077] In step 630, molecular attribute tag data of the sample molecule is obtained based on the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data.

[0078] Molecular attribute tag data: Used as tag data for guiding the training of a molecular generation model, it may include attribute values ​​(labeled attribute values ​​+ predicted attribute values) for M attributes of a sample molecule. Here, for one sample molecule, molecular attribute tag data of this molecule can be obtained based on the molecular attribute labeled data of this sample molecule and by filling in missing data in the molecular attribute labeled data with molecular attribute predicted data. The size of the molecular attribute tag data of any sample molecule is M.

[0079] For example, if the molecular attribute labeled data corresponding to a sample molecule is incomplete, it indicates that the labeled attribute values ​​corresponding to the sample molecule are missing, and the non-missing labeled attribute values ​​can be retained and the missing labeled attribute values ​​can be filled in with predicted attribute values ​​to obtain the molecular attribute tag data corresponding to the sample molecule. If the molecular attribute labeled data corresponding to a sample molecule is complete, the molecular attribute labeled data corresponding to the sample molecule can be directly used as the molecular attribute tag data corresponding to the sample molecule.

[0080] In step 640, a molecular generation model is trained based on the molecular attribute tag data of the sample molecules to obtain a trained molecular generation model.

[0081] Optionally, the trained molecular generation model may be a molecular generation model capable of performing training to generate molecular data having at least one attribute among the M attributes. For example, the molecular generation model performing training may be used to generate molecular data having a target attribute, which may refer to any one or more of the M attributes. The target attribute may be set and adjusted according to actual usage needs, and examples of the present application are not limited thereto. The molecular data refers to data for describing a generated molecule, such as the above-mentioned SMILES string, and the generated molecule is the output of the molecular generation model. A molecule corresponding to the molecular data has the target attribute. The molecular generation model for which training has been completed may also refer to a molecular generation model for which model parameter adjustment has been completed, such as a ConGen model for which model parameter adjustment has been completed.

[0082] In some embodiments, sample molecules in the training data with complete molecular attribute label data are defined as sample molecules of a first type, and sample molecules in the training data with incomplete molecular attribute label data are defined as sample molecules of a second type. In this manner, a molecular generation model can be trained using only sample molecules of the second type and molecular attribute tag data (including predicted attribute values) corresponding to the sample molecules of the second type. For example, the molecular generation model is iteratively trained using one sample molecule of the second type as an input for each iteration. In another example, the molecular generation model is iteratively trained using multiple sample molecules of the second type as input for each iteration. However, the embodiments of the present application are not limited thereto.

[0083] For example, a training sample set can be constructed using sample molecules (i.e., sample molecules of the second type) and molecular attribute tag data corresponding to the sample molecules as training samples, and the training sample set can be used to iteratively train the molecular generation model to obtain a trained molecular generation model.

[0084] For example, a molecular generation model is trained using a molecular expression corresponding to a sample molecule and a tag attribute value in the molecular attribute tag data of the sample molecule to obtain a trained molecular generation model. In some embodiments, the molecular generation model obtains a generated molecule corresponding to the sample molecule based on the molecular attribute tag data, then determines a loss function value based on the difference between the sample molecule and the generated molecule, and finally uses the loss function value to adjust parameters of the molecular generation model to obtain a trained molecular generation model. The embodiments of the present application are not limited to the specific model architecture of the molecular generation model and the specific model training process.

[0085] In some embodiments, the molecular attribute tag data of the second type of sample molecules can be further used to impute training data to obtain imputed training data, and then the molecular generation model can be trained using the imputed training data to obtain a trained molecular generation model.

[0086] Optionally, the training data may be supplemented in units of molecular attribute-labeled data, or in units of attribute values.

[0087] In one example, the training data can be filled using molecular attribute tag data corresponding to all second-type sample molecules corresponding to the training data to obtain fully filled training data, and the molecular generation model can be trained using the fully filled training data. For example, multiple small batches of data can be constructed based on the fully filled training data, and the molecular generation model can be iteratively trained using the multiple small batches of data to obtain the trained molecular generation model. In another example, the fully filled training data is the input for one iteration, and after constructing multiple fully filled training data, the molecular generation model can be iteratively trained using the multiple fully filled training data.

[0088] In one example, the training data can be supplemented with molecular attribute tag data corresponding to a portion (including one) of the second-type sample molecules corresponding to the training data to obtain supplemented training data, and the molecular generation model can be trained using the supplemented training data. For example, after obtaining the supplemented training data, sample molecules with incomplete molecular attribute labeled data can be removed from the supplemented training data to obtain final training data. Then, multiple small batches of data can be constructed based on the final training data, and the molecular generation model can be iteratively trained using the multiple small batches of data. Alternatively, the final training data can be used as input for one iteration to construct multiple final training data, and the molecular generation model can be iteratively trained using the multiple final training data. By only partially supplementing the training data, the cost of constructing the training data can be effectively reduced, and the cost of training the molecular generation model can also be reduced.

[0089] Optionally, the termination condition for the above iteration may be that the loss function value of the molecular generation model is equal to or less than a threshold, that the loss function value of the molecular generation model is almost stable, that the number of iterations of the molecular generation model is equal to or greater than a threshold, etc., and examples of the present application are not limited thereto.

[0090] In addition, training sample sets for models other than molecular generative models can also be constructed by adopting the technical solutions provided in the embodiments of the present application. That is, by filling in missing data positions in incomplete labeled data with predicted data, training samples containing both labeled data and predicted data can be constructed, which improves the diversity of prediction results. In addition, multiple complete labeled data can be mixed to train models collectively, rather than training them one by one, thereby improving the efficiency of model training.

[0091] According to the technical solutions provided in the embodiments of the present application, by training a molecular generation model using training data lacking labeled attribute values, the molecular attributes that the newly generated molecular data may have can be enriched and are not limited to a few molecular attributes specified in the fully labeled data, thereby improving the diversity of molecular data generation. In addition, since the training data can include multiple fully labeled data, the training data can enrich the variety of molecular attributes of sample molecules, thereby further improving the diversity of the output results of the molecular generation model.

[0092] In addition, since labeled attribute values ​​for M attributes are missing in the training data, the lack of data in the incomplete labeled data can be compensated for by obtaining molecular attribute prediction data corresponding to the sample molecules. This improves the completeness of the training samples, making the subsequent training process smoother and improving the training accuracy of the molecular generation model.

[0093] In addition, unlike the training method in the related art that only adopts fully labeled data to train a molecular generation model, the technical solution provided in the embodiments of the present application allows training data lacking labeled attribute values ​​to be used to train a molecular generation model, thereby enriching the training method of the molecular generation model.

[0094] Referring to FIG. 7, FIG. 7 is a flowchart of a method for training a molecular generative model according to another embodiment of the present application. The execution entity of each step of the method for training a molecular generative model may be the model training device described above. In the following method embodiment, for ease of explanation, only the execution entity of each step will be described as a "computer device." The method may include at least one of the following steps (610 to 640):

[0095] In step 610, training data for a molecular generation model is obtained, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer.

[0096] In some embodiments, step 610 may include at least one of steps 611 to 612 (not shown).

[0097] In step 611, at least two sets of complete labeled data are obtained, each set of complete labeled data including labeled attribute values ​​for at least one attribute of at least one molecule, the attributes included in the different sets of complete labeled data are different, and the molecules included in the different sets of complete labeled data are different.

[0098] Here, the complete labeled data corresponds to the above complete labeled data, i.e., there are no missing labeled attribute values ​​for any of the attributes of the molecules in the complete labeled data. As shown in Fig. 5b, the data in Database 1 and the data in Database 2 both belong to the complete labeled data. Here, Database 1 contains only labeled attribute values ​​for attribute 1 of molecules 1 to 3, while Database 2 contains labeled attribute values ​​for attributes 2 and 3 of molecules 3 to 6. The attributes contained in Database 1 and Database 2 are different, and the molecules contained therein are also different.

[0099] In some embodiments, a portion of the complete labeled data may be selected from one complete labeled data, or a portion of the complete labeled data may be selected from another complete labeled data. This is to consider molecular attributes of interest. If it is not desired to learn all molecular attributes of a vast database, necessary molecular attributes or molecular attributes of interest may be selected from the vast database, and a portion of the data may be selected as the complete labeled data. In other words, it is not necessary to merge two complete databases, but it is also possible to merge portions of the data from two complete databases. This allows for more targeted training of the molecular generation model and also reduces the training cost of the molecular generation model.

[0100] In some embodiments, for at least two sets of complete labeled data that need to be integrated, the attributes contained in the different sets of complete labeled data are different, and the molecules contained in the different sets of complete labeled data are different. This further improves the diversity of the integrated incomplete labeled data, which is beneficial for the subsequent generation of conditional molecules. Because molecule generation itself requires a large degree of uncertainty, completely fixed training is likely to result in an inability to find a suitable generated molecule or in the generated molecules all being the same, thereby defeating the purpose of the molecular generation model. On the other hand, according to the technical solution provided in the embodiments of the present application, incomplete labeled data is obtained by integrating at least two sets of complete labeled data. The attribute types of the incomplete labeled data have a relatively high degree of randomness, and the molecules also have a relatively high degree of randomness, which is beneficial for the training of such a random molecular generation class model, thereby improving the generation ability of the molecular generation model.

[0101] In step 612, at least two sets of complete labeled data are combined at the granularity of each molecule to obtain training data.

[0102] The molecules are first ordered, and then the molecules are merged (e.g., reordered after removing duplicates), and then the labeled attribute values ​​corresponding to the molecules are merged (e.g., all labeled attribute values ​​corresponding to the molecules are combined). For example, as shown in FIG. 5B, at least two sets of complete labeled data are merged with each molecule as the granularity. For example, molecule 3 in the third row of database 1 and molecule 3 in the first row of database 2 are merged, and other molecules are merged accordingly. For each molecule, the merger retains labeled attribute values ​​in attribute positions corresponding to the labeled attribute values, and sets attribute positions without labeled attribute values ​​as missing, thereby obtaining training data (i.e., incomplete labeled data).

[0103] According to the technical solution provided in the embodiments of the present application, by using molecules as the granularity to integrate complete labeled data, the accuracy of the training data obtained by integration can be guaranteed, and data confusion caused by integrating multiple sets of complete labeled data can be avoided.

[0104] In some embodiments, after step 610, a further step 615 (not shown) is included.

[0105] In step 615, a mask matrix corresponding to the training data is generated, where the mask matrix includes N×M elements, each element being used to indicate whether a labeled attribute value for one attribute of one sample molecule is missing or not, where N is a positive integer.

[0106] The mask matrix corresponds to the training data and can be used to instruct the molecule generation model to extract labeled attribute values ​​in the training data. For example, a value corresponding to the i-th row and j-th column of the mask matrix can be used to indicate whether a labeled attribute value for the j-th attribute exists in the i-th molecule of the training data. If this value is 1, a labeled attribute value for the j-th attribute exists in the i-th molecule, and if this value is 0, a labeled attribute value for the j-th attribute does not exist in the i-th molecule.

[0107] In some embodiments, a mask matrix is ​​generated based on training data. Optionally, the size of the mask matrix is ​​related to the number of molecules and the number of attributes in the training data. Optionally, if the training data includes N molecules and M attributes, the size of the mask matrix is ​​N×M.

[0108] In some embodiments, the mask matrix generation method includes the following two methods.

[0109] First, in the mask matrix, the numerical values ​​of all positions in the training data that correspond to the at least two sets of complete labeled data are set to a first numerical value, and the numerical values ​​of all positions in the training data that do not correspond to the at least two sets of complete labeled data are set to a second numerical value, that is, the first numerical value is used to represent that the attribute value corresponding to the position is a labeled attribute value, and the second numerical value is used to represent that the attribute value corresponding to the position is missing and is to be filled using a predicted attribute value.

[0110] Second, for each element of the mask matrix, determine whether a corresponding labeled attribute value exists in the training data at that position. If a labeled attribute value exists, set the value of that position to a first numerical value. If a labeled attribute value does not exist at that position, i.e., if data is missing at that position, set the value of that position to a second numerical value.

[0111] 8 is a schematic diagram of a mask matrix according to one embodiment of the present application, where 800 denotes the determination architecture of the mask matrix, which is the same as the architecture of the tag matrix (i.e., training data), and the values ​​of positions in the tag matrix that have labeled attribute values ​​are set to 1, and the values ​​of positions in the tag matrix that do not have labeled attribute values ​​are set to 0, thereby obtaining the mask matrix corresponding to the training data.

[0112] In some embodiments, when the model training machine 10 obtains training data through a training data loader, the training data loader can be modified to include database merging and dirty data handling capabilities.

[0113] Illustratively, since the training data loader needs to operate using the actual training dataset, it needs to be capable of merging databases (i.e., even if the merged molecular database contains different molecular attributes) and of handling dirty datasets containing invalid molecular attribute labeled data. Optionally, these two requirements can be met by the following methods: 1. Normalizing molecular SMILES strings using a Python cheminformatics library such as RDKit (to ensure that the same molecular structures share the same SMILES strings). 2. Calculating a new tag matrix y L where all molecule SMILES strings across different databases are rows and all attributes across different databases are columns. Then, we extract the corresponding labeled attribute values ​​from the source databases as y L Copy as a valid attribute item of the matrix. 3, y L Construct a mask matrix M of the same size as {overscore (M)}, where 1's are used to represent valid attribute items and 0's are used to represent invalid attribute items.

[0114] Based on the mask matrix corresponding to the training data, the molecular generation model can understand which attribute data in the training data need to be supplemented and which attribute data are valid, and can distinguish between labeled attribute values ​​and predicted attribute values ​​in the molecular attribute tag data, thereby enabling the molecular generation model to process dirty datasets and further reducing the training cost of the molecular generation model.

[0115] In step 620, if the molecular attribute labeled data of one sample molecule in the training data lacks a labeled attribute value for at least one attribute among the M attributes, determine that the molecular attribute labeled data of the sample molecule is incomplete, and predict an attribute value for at least one attribute of the sample molecule to obtain molecular attribute predicted data of the sample molecule.

[0116] Steps 610, 602, and 640 are the same as those described in the above embodiments, and the contents not described in the embodiments of the present application can be referred to the above embodiments and will not be described again here.

[0117] In step 621, for each attribute among the M attributes, if the labeled attribute value of the attribute included in the molecular attribute labeled data of the sample molecule is missing, the predicted attribute value of the attribute is obtained from the molecular attribute predicted data of the sample molecule and is used as the tag attribute value of the attribute.

[0118] The predicted attribute values ​​can compensate for the data gaps in incomplete labeled data, and by improving the completeness of the training samples, the subsequent training process can be made smoother and the training accuracy of the molecular generation model can be improved.

[0119] In step 622, if the labeled attribute value of the attribute contained in the molecular attribute labeled data of the sample molecule is absent, the labeled attribute value of the attribute is taken as the tag attribute value of the attribute.

[0120] In step 623, obtain molecule attribute tag data for the sample molecule based on the tag attribute values ​​of the M attributes.

[0121] In step 640, a molecular generation model is trained based on the molecular attribute tag data of the sample molecules to obtain a trained molecular generation model.

[0122] Here, the trained molecular generation model is used to generate molecular data having a target attribute, where the target attribute can refer to at least one attribute among the M attributes, and the molecular data can refer to a molecular representation for describing the molecular structure of the generated molecule, such as a SMILE string, a molecular diagram, a three-dimensional structure of the molecule, and a chemical fingerprint of the molecule.

[0123] Optionally, the molecular generation model can process dirty data (i.e., incompletely labeled data) through the mask matrix and the molecular attribute tag data, and further, the molecular attribute tag data of the sample molecules can be used to directly train the molecular generation model, eliminating the need to separate data into completely labeled data and completely unlabeled data and process the completely labeled data and the completely unlabeled data separately to realize training of the molecular generation model.

[0124] For example, as shown in FIG. 3, in the related art, when processing fully labeled data with an SSVAE model, the tag matrix y L is used as the input of the encoder and decoder, and when the SSVAE model processes fully unlabeled data, the predictor calculates the predicted attribute value y P is output as the input to the encoder and decoder. This operation can be expressed by the following equation:

[0125]

number

[0126] According to the technical solution provided in the embodiments of the present application, the mask matrix allows the molecule generation model and the SSVAE model in the embodiments of the present application to have the same input-output relationship, that is, the molecule generation model can automatically identify labeled attribute values ​​and predicted attribute values ​​based on the mask matrix, and can automatically identify generated molecules corresponding to the labeled attribute values ​​and predicted attribute values. In some embodiments, the molecule generation model in the embodiments of the present application is a ConGen model. Optionally, the implementation principle of the ConGen model is as shown in 900 of FIG. 9 , in which after using the mask matrix to process dirty data (incomplete labeled data) and obtain molecular attribute tag data of sample molecules, the ConGen model uses the mask matrix to select tag attribute values ​​y (e.g., 1 corresponds to the labeled attribute value, and 0 corresponds to the predicted attribute value) of molecular representation x corresponding to the sample molecule from the molecular attribute tag data to obtain a hidden space representation z corresponding to the sample molecule; then, the ConGen model uses the hidden space representation z and the tag attribute value y to generate a generated molecule x having tag attribute value y corresponding to the sample molecule. D (e.g., SMILES string)

[0127] According to the technical solution provided in the embodiments of the present application, the introduction of a mask matrix enables the molecular generation model to process labeled data and unlabeled data simultaneously. That is, it is possible to process incompletely labeled data without having to separate completely labeled data and completely unlabeled data for separate processing. Therefore, according to the technical solution provided in the embodiments of the present application, the processing efficiency of the molecular generation model is improved and the training cost of the molecular generation model is reduced because the processing of incompletely labeled data is easier.

[0128] Referring to FIG. 10, FIG. 10 is a flowchart of a method for training a molecular generative model according to another embodiment of the present application. The execution entity of each step of the method for training a molecular generative model may be the model training device described above. In the following method embodiment, for ease of explanation, only the execution entity of each step will be described as a "computer device." The method may include at least one of the following steps (610 to 633):

[0129] In step 610, training data for a molecular generation model is obtained, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer.

[0130] In step 620, if the molecular attribute labeled data of one sample molecule in the training data lacks a labeled attribute value for at least one attribute among the M attributes, determine that the molecular attribute labeled data of the sample molecule is incomplete, and predict an attribute value for at least one attribute of the sample molecule to obtain molecular attribute predicted data of the sample molecule.

[0131] In step 630, molecular attribute tag data of the sample molecule is obtained based on the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data.

[0132] Steps 610, 620, and 630 are the same as those described in the above embodiments, and the contents not described in the embodiments of the present application can be referred to the above embodiments and will not be described again here.

[0133] In step 631, a molecular generation model obtains a generated molecule corresponding to the sample molecule based on the sample molecule and the molecular attribute tag data of the sample molecule.

[0134] The generated molecule refers to the output obtained by processing the sample molecule by the molecular generation model, and may be a simulation of the sample molecule under conditional attributes. In some embodiments, if the input of the molecular generation model is a molecular representation of the sample molecule, the output of the molecular generation model is also a molecular representation of the generated molecule. Illustratively, if the input is a SMILE string of the sample molecule, the output is also a SMILE string of the generated molecule.

[0135] In step 632, a loss function value of the molecular generation model is determined based on the sample molecule and the product molecule, and the loss function value is used to represent the degree of difference between the sample molecule and the product molecule.

[0136] Before explaining the loss function value of the molecular generation model provided in the examples of the present application, the loss function value of the SSVAE in the related art will be explained.

[0137] During the execution of the SSVAE model, there is no interaction between the small batches of sample molecules (e.g., when sample molecule A and sample molecule B are processed simultaneously, the model output x of the two sample molecules is D do not affect each other). This allows us to calculate the internal model variables (y L , y P , z, x D (e.g., ) is completely determined by the sample molecule x. Therefore, the implementation of the loss function value of the molecular generation model in the embodiment of the present application is relatively simple. That is, there is no interaction between the sample molecules of the small batch during the execution of the molecular generation model.

[0138] In the initial realization of the loss function value of the SSVAE model, the loss function value of one sample molecule needs to be divided into three parts, which are as follows:

[0139] a. VAE loss function value for fully labeled data in a small batch:

number

[0140] b. VAE loss function value for fully unlabeled data in a small batch:

number

[0141] c. Regression loss function value for fully labeled data in small batches:

number

[0142] where:

number

number

number

[0143] As can be seen from the loss function above, the terms L and U actually overlap significantly. Therefore, in the present embodiment, a mask matrix M can be used to combine and simplify L and U based on incompletely labeled data to determine the loss function value G of the molecular generation model in the present embodiment. For example, if the molecular attribute labeled data is fully labeled, all of the items in M ​​are 1, and G should be converted to L, except for a few constant terms. If all of the molecular attribute labeled data is incompletely labeled, all of the items in M ​​are 0, and G should be converted to U, except for a few constant terms. Similarly, the corresponding loss function R in the present embodiment also needs to sum only the labeled items in the small batch. By ensuring this operation, when fully labeled data / completely incomplete data is provided, the difference in the loss function value G and the parameter optimization of the molecular generation model will be exactly the same as the results of the fully labeled version / completely incomplete version.

[0144] In some embodiments, the loss function values ​​in the embodiments of the present application include a regression loss and a variational coding loss, and the variational coding loss includes a first loss, a second loss, a third loss, and a fourth loss, where the regression loss corresponds to R above and the variational coding loss corresponds to L+U above.

[0145] In some embodiments, step 632 includes at least one of steps 632-1 through 632-6 (not shown).

[0146] In step 632-1, a regression loss is determined based on labeled attribute values ​​of labeled attributes in the molecular attribute labeled data and predicted attribute values ​​of labeled attributes in the molecular attribute predicted data, where the regression loss is used to represent the prediction accuracy of the molecular attribute predicted data, and the labeled attributes are attributes that correspond to non-missing labeled attribute values ​​in the molecular attribute labeled data.

[0147] In step 632-2, a first loss is determined based on the product molecule and the sample molecule, where the first loss is used to represent a degree of direct difference between the product molecule and the sample molecule, e.g., the first loss is determined based on the difference between a molecular representation corresponding to the product molecule and a molecular representation corresponding to the sample molecule.

[0148] In step 632-3, a second loss and a third loss are determined based on the molecular attribute tag data, the covariance matrix of the molecular attribute tag data, the average value of the molecular attribute tag data, and the average value of the molecular attribute prediction data, where the second loss is used to represent the degree of difference between the tag attribute values ​​of labeled attributes in the molecular attribute tag data and the molecular attribute tag data, and the third loss is used to represent the degree of difference between the tag attribute values ​​of attributes other than the labeled attributes among the M attributes included in the molecular attribute tag data and the molecular attribute tag data.

[0149] In step 632-4, a fourth loss is determined based on the hidden space representation and the location parameter and mean value of the probability distribution to which the hidden space representation follows, where the fourth loss is used to represent the degree of dispersion of the hidden space representation relative to the probability distribution, and the hidden space representation is a hidden layer feature of the sample molecule obtained by the intermediate layer of the molecular generation model.

[0150] In step 632-5, a variational coding loss is determined based on the first loss, the second loss, the third loss, and the fourth loss, and the variational coding loss is used to represent the degree of difference between the generated molecule generated based on the molecular attribute tag data and the sample molecule.

[0151] In step 632-6, a loss function value is determined based on the regression loss and the variational coding loss.

[0152] Here, we define a new loss function for batch data, especially dirty data, during training of molecular generative models (such as the ConGen model). The variational coding loss and regression loss can be expressed as follows:

[0153] a. VAE loss function for small batches of dirty data:

number

[0154] b. Regression loss function for small batches of dirty data:

number

[0155] where n s is the number of sample molecules in the small batch input model, M is the mask matrix, and M i,j is x in M i,j This is the numerical value corresponding to the VAE loss function compared to related technologies.

number

number

number

[0156] In some embodiments, when the molecular attribute prediction data of the sample molecules is continuously changing due to training of the molecular generative model, the covariance matrix and mean value of the molecular attribute tag data are also continuously updated.

[0157] In some embodiments, a covariance matrix interpolation method can avoid the problem of non-PSD covariance matrices caused by dirty data. Taking the molecular generation model in this application as an example, step 632 may further include the following content:

[0158] The covariance matrix and mean value of the molecular attribute tag data are first calculated as part of the loss function values ​​of the SSVAE model and the ConGen model.

number

number

[0159] However, such a policy cannot be applied to the ConGen model because the training data is dirty. L For y, calculate the average value E of the tag based only on the available attributes. L It is useful to ignore missing data in the matrix. L It is more meaningful to calculate the covariance matrix C terms based on the available attributes of the matrix and ignore the missing data. Thus, there are several cases for calculating E and C:

number

[0160] For fully labeled data used in the SSVAE model, it can be mathematically proven that all entries corresponding to the mask matrix M are 1, and the covariance matrix C is always a positive semi-definite (PSD) matrix. Correspondingly, in practice, the logarithm determinant term of the loss function value

number

number

[0161] In the present embodiment, the real physical problem is due to the quality of the covariance matrix itself. If the availability of tags (i.e., molecular attribute tag data) in the training data is low (there are many zero entries in the mask matrix M), a major problem occurs. This is because the matrices E and C cannot represent the true molecular sample group, and correspondingly, very poor results may occur during subsequent model training and conditional generation. If the corresponding M entries in the mask matrix are zero, an interpolation technique can be used to reconstruct the tag matrix y using the predicted data from the molecular attribute prediction model after each training cycle. L This problem can be alleviated by updating the contents of the tag matrix y. Then, the E and C matrices are calculated anew for the next training cycle, which is LWe assume that it is valid to update all items in (previously unlabeled items) in E. In other words, we update E and C during each training period, starting from the end of the first training cycle.

number

[0162] Here, the molecular attribute tag data corresponding to each true sample group (all sample groups) is y, and y is continuously updated based on the continuous update of the molecular attribute prediction data corresponding to the sample, and n a represents the quantity of all sample molecules in the true sample group. Initially, the quality of the E and C matrices is not very good and cannot well represent the true sample group. However, with subsequent iterative training, the prediction submodel (i.e., the molecular attribute prediction network) becomes more accurate, and E and C can better represent the true sample group, correspondingly achieving better molecular property prediction and conditional generation accuracy.

[0163] In step 633, the parameters of the molecular generation model are adjusted based on the loss function value to obtain a trained molecular generation model.

[0164] In some embodiments, the molecular generative model includes a first generative network and a second generative network, wherein the first generative network is configured to generate a hidden space representation based on a sample molecule and molecular attribute tag data of the sample molecule, and a mean value and a location parameter of a probability distribution followed by the hidden space representation are determined by the parameters of the first generative network, the sample molecule, and the molecular attribute tag data of the sample molecule, and the second generative network is configured to obtain a generated molecule based on the hidden space representation and the molecular attribute tag data of the sample molecule, and a mean value and a location parameter of the probability distribution followed by the generated molecule are determined by the parameters of the second generative network, the hidden space representation, and the molecular attribute tag data of the sample molecule.

[0165] In some embodiments, the first generating network is a machine learning network and the second generating network is also a machine learning network. Optionally, the first generating network is an encoding network (encoder) and the second generating network is a decoding network (decoder).

[0166] In some embodiments, after training of the molecular generative model is complete, a desired molecular output can be conditionally generated by setting attribute values ​​for the target attribute and jointly inputting randomly sampled latent spatial representations (i.e., hidden spatial representations) into the molecular generative model. In some embodiments, a second generative network is independently run given the conditional attribute input y and the randomly sampled latent spatial input z to conditionally generate the desired molecular output.

[0167] In some embodiments, in some drug research, new molecules need to be synthesized to meet the requirements of drug development. Therefore, an attribute value or attribute interval of a target attribute of the required product molecule is usually provided. Here, the target attribute is artificially determined, and the attribute value of the target attribute is also artificially determined based on experience or measurement results. Of course, the molecular generation model can generate a large number of product molecules after multiple iterations based on the attribute value or attribute interval of the set target attribute, and the distribution of these product molecules should be a probability distribution that satisfies the conditions of the attribute value or attribute interval of the target attribute. Furthermore, researchers can determine one or more molecules that satisfy the target attribute conditions from the large number of product molecules.

[0168] Of course, in addition to drug research, virtual screening of some other materials, virtual screening of electrolyte solutions, virtual screening of catalysts, etc. can also be realized by adopting the molecular generation model trained by the technical solutions provided in the examples of the present application.

[0169] According to the technical solution provided in the embodiments of the present application, by introducing a variational coding loss based on a mask matrix, the calculation of losses for fully labeled data and fully unlabeled data can be combined, and the loss can be calculated for all data in the training sample through a single training run without using the molecular generative model twice, thereby improving the training efficiency of the model without distinguishing between labeled and unlabeled data.

[0170] In addition, by updating the covariance matrix and mean value of the molecular tag data, the accuracy of the loss function can be improved, making the loss calculation of the molecular generation model more accurate, and adjusting the parameters of the molecular generation model based on the accurate loss, thereby improving the generation accuracy of the molecular generation model.

[0171] Furthermore, since a loss function is introduced to train the molecular generation model, the parameters of the molecular generation model can be easily adjusted, and the loss function value determined based on the sample molecule and the generated molecule can relatively better reflect the actual loss of the molecular generation model, which is advantageous for training the molecular generation model.

[0172] In addition, the first generating network obtains the probability distribution of the latent spatial representation corresponding to the training sample, and the second generating network obtains the probability distribution of the generated molecule based on the sampled latent spatial representation and molecular attribute tag data, thereby subdividing the specific training process of the molecular generation model and enriching the model training method. Furthermore, the latent spatial representation output by the intermediate layer can be used to further express the loss function, which is advantageous for adjusting the parameters of the molecular generation model and further improving the generation accuracy of the molecular generation model.

[0173] Referring to FIG. 11, FIG. 11 is a flowchart of a method for training a molecular generative model according to another embodiment of the present application. The execution entity of each step of the method for training a molecular generative model may be the model training device described above. In the following method embodiment, for ease of explanation, only the execution entity of each step will be described as a "computer device." The method may include at least one of the following steps (610 to 660).

[0174] In step 610, training data for a molecular generation model is obtained, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer.

[0175] In step 620, if the molecular attribute labeled data of one sample molecule in the training data lacks a labeled attribute value for at least one attribute among the M attributes, determine that the molecular attribute labeled data of the sample molecule is incomplete, and predict an attribute value for at least one attribute of the sample molecule to obtain molecular attribute predicted data of the sample molecule.

[0176] In step 630, molecular attribute tag data of the sample molecule is obtained based on the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data.

[0177] In step 640, a molecular generation model is trained based on the molecular attribute tag data of the sample molecules to obtain a trained molecular generation model.

[0178] Optionally, the trained molecular generative model is used to generate molecular data having target attributes.

[0179] Steps 610 to 640 are the same as those described in the above embodiment, and the contents not described in the embodiment of the present application can be referred to the above embodiment and will not be described again here.

[0180] In some embodiments, step 650 or step 660 is performed after step 640 .

[0181] In step 650, the molecular attribute prediction data of the sample molecules is obtained by the molecular attribute prediction model, and if the quantity of molecules corresponding to the training data is greater than a threshold, the molecular attribute prediction model adopts a first neural network model that is not pre-trained, and during the training of the molecular generation model, uses the difference between the molecular attribute labeled data of the sample molecules and the molecular attribute prediction data of the sample molecules to adjust the parameters of the first neural network model.

[0182] In some embodiments, the molecular attribute prediction model is a machine learning model. In some embodiments, the molecular generation model may include the molecular attribute prediction model or may exist separately from the molecular attribute prediction model. The above thresholds can be set and adjusted according to actual usage needs, and the embodiments of the present application are not limited thereto. The number of molecules corresponding to the training data refers to the total number of sample molecules in the training data.

[0183] In some embodiments, the first neural network model may be a predictive network and configured to predict attributes of sample molecules. Optionally, the predictive network is a predictor as described above.

[0184] In step 660, molecular attribute prediction data of the sample molecules is obtained by the molecular attribute prediction model. If the quantity of molecules corresponding to the training data is not greater than a threshold, the molecular attribute prediction model adopts a pre-trained second neural network model, which is a model with molecular attribute prediction ability obtained by pre-training using a complete dataset, where the complete dataset includes multiple substances and corresponding attribute values.

[0185] In some embodiments, the second neural network model may be a predictive network and configured to predict attributes of sample molecules, optionally, the predictive network being the predictor described above.

[0186] In an embodiment of the present application, if the quantity of molecules corresponding to the training data is greater than a threshold, a first neural network model that is not pre-trained is adopted to predict the molecular attribute prediction data of the molecule. This is because the amount of training data is large, which can provide strong sample support for the molecular attribute prediction model and support subsequent attribute prediction operations. The molecular attribute prediction model can be untrained, which eliminates the need to spend money on pre-training the molecular attribute prediction model and reduces the cost required for training.

[0187] Furthermore, if the number of molecules corresponding to the training data is not greater than a threshold, a pre-trained second neural network model is employed to predict the molecular attribute prediction data of the molecule. This is because an insufficient amount of training data cannot provide strong sample support for the molecular attribute prediction model and cannot support subsequent attribute prediction operations. If the molecular attribute prediction model is not trained, even if the training data is used to train the molecular attribute prediction model, the molecular attribute prediction accuracy of this molecular attribute prediction model is likely to still be low, making it useless for the subsequent molecular generation model. This will cause the training sample accuracy of the subsequent molecular generation model to be low, and further cause the accuracy of the generated molecules to be low, which may not meet the needs of users. Therefore, if the number of molecules corresponding to the training data is not greater than a threshold, a pre-trained second neural network model is employed to predict the molecular attribute prediction data of the molecule, thereby improving the accuracy of the molecular attribute tag data of the sample molecules and further improving the training accuracy of the molecular generation model. This ultimately results in molecules generated using this molecular generation model with high accuracy and better meeting the needs of developers.

[0188] In some embodiments, the second neural network model includes a backbone network and a fully connected network.

[0189] Backbone network: a network primarily for predicting molecular attributes. Optionally, the backbone network is a ChemBERTa model (prediction network).

[0190] Fully-connected network: a network for influencing the molecular prediction attribute data output by the second neural network model by changing parameters. Optionally, the fully-connected network is a linear layer for linearly adjusting the output of the second neural network model.

[0191] In some embodiments, during training of a molecular generative model, the difference between the molecular attribute labeled data of a sample molecule and the molecular attribute predicted data of the sample molecule can be used to adjust the parameters of the fully connected network, while keeping the parameters of the backbone network unchanged.

[0192] The technical solutions provided in the embodiments of the present application allow for flexible selection of molecular attribute prediction models based on the amount of data in the training sample set (i.e., training data), which allows for more flexible changes to the architecture of the molecular attribute prediction model and is beneficial for enriching the architecture of the entire molecular generation model and the training method of the molecular generation model.In addition, the fully connected network can be used to achieve the goal of adjusting the output of the entire molecular attribute prediction model without changing the parameters of the backbone network, so that the accuracy of the entire molecular attribute prediction model will not be significantly changed by the introduction of training samples in the present application, thereby shortening the training time of the molecular generation model and improving the accuracy of the output results of the molecular generation model.

[0193] In some embodiments, flexible submodels (encoders, predictors, etc.) can be substituted to improve the training effectiveness of molecular generative models by utilizing transfer learning when labeled data is very scarce. For example, in many practical situations, the number of tag attribute values ​​available for experiments or calculations is very limited. In such cases, a predictor obtained by simply training an RNN with attributes from scratch may not be effective. When needed, the RNN can be replaced with other models, particularly in combination with highly accurate models already pre-trained using a large number of readily available other material properties. One potential submodel alternative is the ChemBERTa model, a large-scale pre-trained model based on a self-supervised transformer that takes the SMILES string of a molecule as input. A new encoder can be obtained by adding a fully connected linear layer (a fully connected network) to the destination ChemBERTa model (the backbone network). Such a transfer model (second neural network model) is hereinafter referred to as BERT. When BERT is used instead of an RNN-based encoder, the entire ChemBERTa layer is frozen (i.e., the ChemBERTa parameters are fixed and do not change as training progresses). However, if BERT is used instead of the RNN-based predictor, the last layer (a fully connected network) of the ChemBERTa layer can be fine-tuned by the PyTorch optimizer. While we have not replaced the RNN-based decoder with another type of decoder submodel, this is easy in principle. 1200 in FIG. 12 is a schematic diagram of a method for training a molecular generative model and a molecular attribute prediction model according to one embodiment of the present application. Here, the molecular attribute prediction model is deployed independently from the molecular generative model. The molecular attribute prediction model may be built based on an RNN or BERT as needed, and the encoder of the molecular generative model may be built based on an RNN or BERT as needed, but the present application is not limited thereto.

[0194] In some embodiments, the settings for training the molecular generative model may be optimized. For example, to improve the performance of the molecular generative model, optimization of several processes may be further performed. For a pre-trained transformer-based BERT model, the PyTorch Adam optimizer predictor can be forced to set the BERT-based predictor submodel to a significantly lower learning rate, such as LR = 3 × 10^(-5), and the Adam optimizer can then maintain LR = 10^(-3) to optimize the parameters of other submodels (e.g., decoders). This allows the BERT-based predictor submodel to perform molecular attribute regression slowly and accurately without destroying the pre-training parameters of the laboriously pre-trained ChemBERTa model. Compared to SSVAE models, RNN-based ConGen models are more unstable during training when using multi-condition dirty data workflows. This issue can be alleviated by cutting the norm of the model gradient by up to 10^(-3) during the training cycle to ensure smooth RNN training, thereby producing stable model training, accurate regression, and conditional generative results.

[0195] In some embodiments, the code platform for the molecular generative model can be switched from the TensorFlow platform to the PyTorch platform. Illustratively, this process requires significant modifications to utilize the functionality of the ConGen model, which requires a more flexible Python-based machine learning platform. The initial SSVAE model was created in the TensorFlow 1.0 platform, which is a relatively old and significantly less flexible platform than PyTorch. Therefore, the SSVAE model is first completely rewritten into a PyTorch version, and its functional completeness and correctness are verified. Further modifications are then made to ensure that the model's training and conditional generative capabilities remain roughly the same after switching from TensorFlow to the PyTorch platform.

[0196] Figure 13 shows a comparison of the performance of the SSVAE model after switching from TensorFlow 1.0 to the PyTorch platform, with the results before and after the switch being comparable. Here, curves 1301 and 1302 in subfigure a show the relationship between the loss and iteration count in the training process of the molecular generative model on the TensorFlow platform 1301 and the PyTorch platform 1302, respectively. Curves 1303 and 1304 in subfigure b show the relationship between the loss and iteration count in the validation process of the molecular generative model on the TensorFlow platform and the PyTorch platform, respectively. Obviously, the overall loss on the PyTorch platform is relatively small, and the loss peak corresponding to the TensorFlow platform can be ignored, as it is merely the result of an unfortunate gradient explosion later on. In another example, Table 1 shows attribute values ​​of attributes of test molecules on different platforms, Table 2 shows attribute values ​​of attributes of generated molecules after unconditional sampling of test molecules on different platforms, and Table 3 shows attribute values ​​of attributes of generated molecules after conditional sampling of test molecules on different platforms.

[0197] [Table 1]

[0198] [Table 2]

[0199] [Table 3]

[0200] The main idea of ​​the molecular generation model provided in the embodiments of this application is as follows: It uses an architecture similar to that of the SSVAE model, but supports the use of dirty (incomplete) training data by modifying all its components as needed. In practice, this means that the molecular generation model can train and use molecular property datasets from different sources. In practice, if the molecular generation model is the ConGen model as an example, a large amount of engineering and algorithm development and innovation is required for the ConGen model to achieve its goal.

[0201] 1. Switching models from the TensorFlow platform to the PyTorch platform.

[0202] a) Engineering work: While not essential, it greatly increases the flexibility of model development.

[0203] 2. Modify the training data loader to merge databases and handle dirty data.

[0204] a) Validating partial data by labeling valid / invalid items with an additional mask matrix containing attribute tags.

[0205] b) Engineering work, which is crucial to making the ConGen model work.

[0206] 3. Modify the model to use dirty (incomplete) data work flows without separating fully labeled data from fully incompletely labeled data as in the SSVAE model.

[0207] a) Use a new loss function that can automatically distinguish between labeled and unlabeled data without splitting the data into labeled and unlabeled.

[0208] b) Engineering and algorithmic work, which is crucial to making the ConGen model work.

[0209] 4. Use transfer learning when labeled data is very scarce, through flexible submodel replacement.

[0210] a) Engineering work, not critically needed, but which increases the flexibility of the model.

[0211] 5. By covariance matrix interpolation method, we avoid the problem of non-PSD covariance matrix caused by dirty data.

[0212] a) Algorithmic work, which is crucial to realizing the functionality of the ConGen model.

[0213] 6. Optimizing the training settings of the model.

[0214] a) Selective learning rate optimization for submodels, gradient clipping.

[0215] b) Engineering work that is not critically necessary but significantly improves the performance and consistency of the model.

[0216] In summary, the ConGen model is corrected to a greater extent than the SSVAE model.

[0217] In some embodiments, training data (incompletely labeled data) is mixed from two different databases. Illustratively, the first database contains attributes such as molecular weight (MolWt), hydrophobicity (LogP), and drug-likeness (QED), while the second database contains attributes such as ionization energy (IE) and electron affinity (EA). The ConGen model trains on all five attributes.

[0218] In some examples, as an example of multi-attribute conditional generation, this molecule generation model simultaneously generates a generative molecule with three attributes: MolWt=250, LogP=2.5, and EA=4. The regression prediction and conditional generation results corresponding to this process are shown in Tables 4, 5, and 6 below. Here, Table 4 shows the test molecule and molecule attribute values, Table 5 shows the unconditional sampling and molecule attribute values, and Table 6 shows the conditional sampling and molecule attribute values. Obviously, when there are many available training tags for attributes (MolWt, LogP, and QED, which can be easily obtained using the RDKit), the performance of the BERT-based ConGen model is lower than that of the RNN-based ConGen model. However, when there are limited training tags for attributes (e.g., EA and IE, which need to be calculated using quantum chemistry software), the BERT-based ConGen model performs better. For multi-attribute conditional sampling, we find that the molecules generated by the ConGen model have the required attribute ranges (MolWt=250, LogP=2.5), and the attribute values ​​of these attributes can be easily calculated and verified using the RDKit.

[0219] [Table 4]

[0220] [Table 5]

[0221] [Table 6]

[0222] In some embodiments, as shown in FIG. 14, a schematic diagram of conditional molecule generation is exemplarily illustrated. A default database-trained molecule generation model is used to supplement the training data (incompletely labeled data) provided by the user. After training is complete, the Congen model is configured to generate molecule data 1400 having multiple conditional attributes of interest (i.e., attribute values ​​of the set target attributes), and the molecule data 1400 may be used to represent the molecular structure of the resulting molecule. In some embodiments, diluent molecules for automatically generating battery electrolytes are used as an example. These molecules are typically weakly polar chlorofluorocarbon-based molecules. Because these molecules are added to the actual electrolyte solution, they must not be too large or sticky. Furthermore, the molecules must be electrochemically stable. Based on these requirements, the following target attributes can be specified for the resulting molecule:

[0223] 1. Number of fluorine atoms > 3, 2. Number of heavy atoms < 15, 3. Ionization energy > 6.5 eV, 4.Electron affinity>3.0eV.

[0224] The model is first trained on data with at least the four target attributes listed above. Then, the ConGen model is run multiple times (1000 times in the example above) jointly, conditioned on these target attributes, to randomly generate 1000 relevant molecules. While the example shown here describes a query for battery electrolyte molecules, it can be extended to query molecules in other fields, such as virtual screening of drugs or virtual screening of cationic additives in ammonia electrocatalytic electrolytes.

[0225] The technical solution provided in the examples of this application presents a new conditional molecule generation algorithm, the ConGen model, based on semi-supervised sequential variational autoencoder technology. Unlike related technology models, such as the SSVAE model, the ConGen model is carefully designed and can handle dirty training data with incomplete tags. Due to various internal and external factors and cost considerations, molecules obtained from publicly available databases or through internal simulations or experimental measurements may have incomplete and different usable attribute sets. Therefore, the SSVAE model must remove molecules with incomplete labels or assign virtual tags to molecules, resulting in low accuracy of the trained model. On the other hand, the ConGen model can easily mix dirty training datasets from multiple sources to train a conditional generative model as needed. Furthermore, the ConGen model can flexibly replace its submodels with other types of models, thereby enabling the use of pre-trained models, which is particularly useful when training data availability is limited. As described above, the technical solution provided in the examples of this application has the following technical advantages:

[0226] 1. Conditional generative models can be trained using dirty training data, which have incomplete attribute tags.

[0227] 2. By mixing the same or different types of molecular attributes from different sources, incomplete training data can be easily obtained to train the ConGen model.

[0228] 3. In the ConGen model, molecules with multiple attribute conditions can be easily generated.

[0229] 4. Submodels of the ConGen model, especially the predictor and encoder, can be easily replaced with pre-trained models, such as the Transformer-based BERT model (transfer learning), which is particularly useful when the availability of training data tags for certain attributes is low.

[0230] The following are apparatus embodiments of the present application, which may be used in the method embodiments of the present application: For details not disclosed in the apparatus embodiments of the present application, reference may be made to the method embodiments of the present application.

[0231] 15, which is a block diagram of an apparatus for training a molecular generative model according to one embodiment of the present application. The apparatus 1500 may include a data acquisition module 1510, a data prediction module 1520, a tag acquisition module 1530, and a model training module 1540.

[0232] The data acquisition module 1510 is configured to acquire training data for a molecular generation model, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer.

[0233] The data prediction module 1520 is configured to determine that the molecular attribute labeled data of a sample molecule in the training data is incomplete when a labeled attribute value for at least one attribute among the M attributes is missing in the molecular attribute labeled data of the sample molecule, and predict an attribute value for the at least one attribute of the sample molecule to obtain molecular attribute predicted data of the sample molecule.

[0234] The tag obtaining module 1530 is configured to obtain molecular attribute tag data of the sample molecule based on the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data.

[0235] The model training module 1540 is configured to train the molecular generation model based on molecular attribute tag data of the sample molecules to obtain a trained molecular generation model.

[0236] In some embodiments, for each attribute among the M attributes, if a labeled attribute value for the attribute is missing from the molecular attribute labeled data of the sample molecule, the tag retrieval module 1530 is configured to retrieve a predicted attribute value for the attribute from the molecular attribute predicted data of the sample molecule as a tag attribute value for the attribute.

[0237] The tag obtaining module 1530 is further configured to, if a labeled attribute value of the attribute included in the molecular attribute labeled data of the sample molecule is not absent, set the labeled attribute value of the attribute as a tag attribute value of the attribute.

[0238] The tag obtaining module 1530 is further configured to obtain molecule attribute tag data for the sample molecule based on the tag attribute values ​​of the M attributes.

[0239] In some embodiments, the tag acquisition module 1530 is further configured to generate a mask matrix corresponding to the training data, the mask matrix including N×M elements, each element being used to indicate whether a labeled attribute value for one attribute of one sample molecule is absent, where N is a positive integer.

[0240] In some embodiments, the data acquisition module 1510 is configured to acquire at least two sets of complete labeled data, each set of complete labeled data including labeled attribute values ​​for at least one attribute of at least one molecule, the attributes included in the different sets of complete labeled data being different, and the molecules included in the different sets of complete labeled data being different.

[0241] The data acquisition module 1510 is further configured to combine the at least two sets of complete labeled data at the granularity of each molecule to obtain the training data.

[0242] In some embodiments, as shown in FIG. 16, the model training module 1540 comprises a numerator generation unit 1541, a loss determination unit 1542, and a model training unit 1543.

[0243] The molecule generation unit 1541 is configured to obtain a generated molecule corresponding to the sample molecule based on the sample molecule and molecular attribute tag data of the sample molecule through the molecule generation model.

[0244] The loss determination unit 1542 is configured to determine a loss function value of the molecular generation model based on the sample molecule and the product molecule, and the loss function value is used to represent the degree of difference between the sample molecule and the product molecule.

[0245] The model training unit 1543 is configured to adjust parameters of the molecular generative model based on the loss function value to obtain the trained molecular generative model.

[0246] In some embodiments, the loss function values ​​include a regression loss and a variational coding loss, and the variational coding loss includes a first loss, a second loss, a third loss, and a fourth loss.

[0247] The loss determining unit 1542 is configured to determine the regression loss based on labeled attribute values ​​of labeled attributes in the molecular attribute labeled data and predicted attribute values ​​of the labeled attributes in the molecular attribute predicted data, where the regression loss is used to represent the prediction accuracy of the molecular attribute predicted data, and the labeled attributes are attributes corresponding to non-missing labeled attribute values ​​in the molecular attribute labeled data.

[0248] The loss determination unit 1542 is further configured to determine the first loss based on the product molecule and the sample molecule, and the first loss is used to represent a direct degree of difference between the product molecule and the sample molecule.

[0249] The loss determination unit 1542 is further configured to determine the second loss and the third loss based on the molecular attribute tag data, a covariance matrix of the molecular attribute tag data, an average value of the molecular attribute tag data, and an average value of the molecular attribute prediction data, wherein the second loss is used to represent a degree of difference between the tag attribute value of the labeled attribute in the molecular attribute tag data and the molecular attribute tag data, and the third loss is used to represent a degree of difference between the molecular attribute tag data and tag attribute values ​​of other attributes other than the labeled attribute among the M attributes included in the molecular attribute tag data.

[0250] The loss determination unit 1542 is further configured to determine the fourth loss based on a hidden space representation and a location parameter and a mean value of a probability distribution to which the hidden space representation follows, the fourth loss being used to represent the degree of dispersion of the hidden space representation with respect to the probability distribution, and the hidden space representation being a hidden layer feature of the sample molecule obtained by an intermediate layer of the molecular generation model.

[0251] The loss determination unit 1542 is further configured to determine the variational coding loss based on the first loss, the second loss, the third loss, and the fourth loss, and the variational coding loss is used to represent a degree of difference between a generated molecule generated based on the molecular attribute tag data and the sample molecule.

[0252] The loss determining unit 1542 is further configured to determine the loss function value based on the regression loss and the variational coding loss.

[0253] In some embodiments, when the molecular attribute prediction data of the sample molecules continuously changes due to training of the molecular generative model, the covariance matrix and mean value of the molecular attribute tag data are also continuously updated.

[0254] In some embodiments, the molecular generative model includes a first generative network and a second generative network, wherein the first generative network is configured to generate a hidden space representation based on the sample molecule and molecular attribute tag data of the sample molecule, and a mean value and a location parameter of a probability distribution followed by the hidden space representation are determined by the parameters of the first generative network, the sample molecule, and the molecular attribute tag data of the sample molecule, and the second generative network is configured to obtain the generated molecule based on the hidden space representation and the molecular attribute tag data of the sample molecule, and a mean value and a location parameter of the probability distribution followed by the generated molecule are determined by the parameters of the second generative network, the hidden space representation, and the molecular attribute tag data of the sample molecule.

[0255] In some embodiments, the molecular attribute prediction data for the sample molecules is obtained by a molecular attribute prediction model.

[0256] The model training module 1540 is further configured to perform the steps of: if the quantity of molecules corresponding to the training data is greater than a threshold, the molecular attribute prediction model adopts a first neural network model that is not pre-trained, and during training of the molecule generation model, adjusts parameters of the first neural network model using a difference between the molecular attribute-labeled data of the sample molecules and the molecular attribute prediction data of the sample molecules; or if the quantity of molecules corresponding to the training data is not greater than a threshold, the molecular attribute prediction model adopts a second neural network model that is pre-trained, the second neural network model having molecular attribute prediction ability obtained by pre-training using a complete dataset, the complete dataset including a plurality of substances and corresponding attribute values. In some embodiments, the second neural network model includes a backbone network and a fully connected network.

[0257] During training of the molecular generative model, the difference between the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data of the sample molecule is used to adjust the parameters of the fully connected network, while keeping the parameters of the backbone network unchanged.

[0258] According to the technical solutions provided in the embodiments of the present application, by training a molecular generation model using training data lacking labeled attribute values, the molecular attributes that the newly generated molecular data may have can be enriched without being limited to a few molecular attributes specified in the fully labeled data, thereby improving the diversity of molecular data generation. In addition, since the training data can include multiple fully labeled data, the training data can enrich the variety of molecular attributes of sample molecules, thereby further improving the diversity of the output results of the molecular generation model.

[0259] In addition, since labeled attribute values ​​for M attributes are missing in the training data, the lack of data in the incomplete labeled data can be compensated for by obtaining molecular attribute prediction data corresponding to the sample molecules. This improves the completeness of the training samples, making the subsequent training process smoother and improving the training accuracy of the molecular generation model.

[0260] In addition, unlike the training method in the related art that only adopts fully labeled data to train a molecular generation model, the technical solution provided in the embodiments of the present application allows training data lacking labeled attribute values ​​to be used to train a molecular generation model, thereby enriching the training method of the molecular generation model.

[0261] It should be noted that the device provided in the above embodiments is only an example of dividing the above functional modules, and in actual applications, the above functions can be assigned to different functional modules to complete them as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the above-described functions. Furthermore, the device provided in the above embodiments belongs to the same concept as the method embodiments, and its specific implementation process can be referred to the method embodiments, and will not be repeated here.

[0262] FIG. 17 is a structural block diagram of a computer device provided in one exemplary embodiment of the present application.

[0263] Typically, the computing device 1700 includes a processor 1701 and a memory 1702 .

[0264] The processor 1701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1701 may be implemented in hardware as at least one of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1701 may also include a main processor and a coprocessor. The main processor is a processor used to process data in an active state and is also called a central processing unit (CPU). The coprocessor is a low-power processor used to process data in a standby state. In some embodiments, the processor 1701 may be integrated with a graphics processing unit (GPU), which is used to render and draw content that needs to be displayed on a display screen. In some embodiments, the processor 1701 may further include an artificial intelligence (AI) processor, which is used to process computational operations related to machine learning.

[0265] The memory 1702 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1702 may further include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices, etc. In some embodiments, a computer program is stored in the non-transitory computer-readable storage medium in the memory 1702, and the computer program is loaded and executed by the processor to implement the method for training a molecular generative model provided in each of the above embodiments.

[0266] Those skilled in the art will appreciate that the structure shown in FIG. 17 does not constitute a limitation on computing device 1700, which may include more or fewer components than shown, combine certain components, or employ different component arrangements.

[0267] An exemplary embodiment further provides a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, causing the processor to perform the above-described method for training a molecular generative model.

[0268] Optionally, the computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a solid-state hard disk (SSD), an optical disk, etc. Here, the random access memory may include a resistive random access memory (ReRAM) and a dynamic random access memory (DRAM).

[0269] An exemplary embodiment further provides a computer program product, the computer program product including a computer program stored on a computer-readable storage medium, wherein a processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program to cause the computer device to perform the method for training a molecular generative model described above.

[0270] It should be noted that in the embodiments of the present application, a prompt interface and a pop-up window are displayed or voice prompt information is output before and during the collection of user-related data. The prompt interface, pop-up window, or voice prompt information is used to prompt that user-related data is currently being collected. Therefore, the present application starts the relevant step of acquiring user-related data only after obtaining a confirmation operation by the user on the prompt interface or pop-up window. Otherwise (i.e., if the confirmation operation by the user on the prompt interface or pop-up window is not obtained), the relevant step of acquiring user-related data is terminated, i.e., user-related data is not acquired. In other words, all user data collected in the present application will be processed in strict accordance with the requirements of relevant national laws and regulations, and will be processed with the consent and authorization of the user and the informed consent or individual consent of the personal information subject. Subsequent data use and processing actions will be carried out within the scope of laws, regulations, and the authorization of the personal information subject. The collection, use, and processing of relevant user data must comply with the relevant laws, regulations, and standards of relevant countries and regions. For example, the incomplete labelled data, sample molecules etc. associated with this application are obtained with full permission.

[0271] It should be understood that the term "plurality" in this specification refers to two or more than two. The term "and / or" only describes a relational relationship and indicates that three relations may exist. For example, A and / or B can indicate three cases: A exists independently, both A and B exist, and B exists independently. The symbol " / " usually indicates that the relation between related objects is an "or" relationship. Furthermore, the numbering of steps described in this specification merely exemplifies one possible execution order between steps. In some other embodiments, the above steps may not be executed in numerical order. For example, two differently numbered steps may be executed simultaneously, or two differently numbered steps may be executed in the reverse order of the illustrated steps. The embodiments of this specification are not limited thereto.

[0272] The above are only illustrative examples of the present application and are not intended to limit the present application, and any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application. [Explanation of symbols]

[0273] 10 Model Training Equipment 20 Model equipment 30 Molecular Generation Model 31 First Generating Network 32 Second Generator Network 33 Molecular Attribute Prediction Network 200 Data 200 training data 210 training sample set 1301 TensorFlow Platform 1302 PyTorch Platform 1400 molecular data 1500 equipment 1510 Data Acquisition Module 1520 Data Prediction Module 1530 Tag Acquisition Module 1540 Model Training Module 1541 Molecular Synthesis Unit 1542 Loss Determination Unit 1543 Model Training Unit 1700 Computer Equipment 1701 processor 1702 memory

Claims

1. 1. A method for training a molecular generative model executed by a computing device, comprising: acquiring training data for a molecular generation model, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer; determining that the molecular attribute labeled data of one sample molecule in the training data is incomplete when a labeled attribute value for at least one attribute among the M attributes is missing in the molecular attribute labeled data of the sample molecule, and predicting an attribute value for the at least one attribute of the sample molecule to obtain molecular attribute predicted data of the sample molecule; obtaining molecular attribute tag data of the sample molecule based on the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data; training the molecular generation model based on molecular attribute tag data of the sample molecules to obtain a trained molecular generation model.

2. The step of obtaining molecular attribute tag data of the sample molecule based on the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data includes: For each attribute among the M attributes, if a labeled attribute value of the attribute is missing from the molecular attribute labeled data of the sample molecule, obtaining a predicted attribute value of the attribute from the molecular attribute predicted data of the sample molecule, and setting the predicted attribute value as a tag attribute value of the attribute; If the labeled attribute value of the attribute included in the molecular attribute labeled data of the sample molecule is not absent, determining the labeled attribute value of the attribute as a tag attribute value of the attribute; obtaining molecular attribute tag data for the sample molecule based on tag attribute values ​​of the M attributes. The method for training a molecular generative model according to claim 1 .

3. The method for training the molecular generative model comprises: generating a mask matrix corresponding to the training data, the mask matrix including N×M elements, each element being used to indicate whether a labeled attribute value for one attribute of one sample molecule is absent, where N is a positive integer; A method for training a molecular generative model according to any one of claims 1 to 2.

4. The step of acquiring training data for the molecular generation model includes: obtaining at least two sets of complete labeled data, each set of complete labeled data including labeled attribute values ​​for at least one attribute of at least one molecule, the attributes included in the different sets of complete labeled data being different, and the molecules included in the different sets of complete labeled data being different; and combining the at least two sets of complete labeled data at the granularity of each molecule to obtain the training data. A method for training a molecular generative model according to any one of claims 1 to 3.

5. The step of training the molecular generation model based on the molecular attribute tag data of the sample molecules to obtain a trained molecular generation model includes: obtaining a generated molecule corresponding to the sample molecule based on the sample molecule and molecular attribute tag data of the sample molecule using the molecular generation model; determining a loss function value of the molecular generation model based on the sample molecule and the product molecule, the loss function value being used to represent a degree of difference between the sample molecule and the product molecule; and adjusting parameters of the molecular generative model based on the loss function value to obtain the trained molecular generative model. A method for training a molecular generative model according to any one of claims 1 to 4.

6. the loss function values ​​include a regression loss and a variational coding loss, and the variational coding loss includes a first loss, a second loss, a third loss, and a fourth loss; The step of determining a loss function value of the molecular generation model based on the sample molecule and the generation molecule includes: determining the regression loss based on labeled attribute values ​​of labeled attributes in the molecular attribute labeled data and predicted attribute values ​​of the labeled attributes in the molecular attribute predicted data, wherein the regression loss is used to represent a prediction accuracy of the molecular attribute predicted data, and the labeled attributes are attributes corresponding to non-missing labeled attribute values ​​in the molecular attribute labeled data; determining the first loss based on the product molecules and the sample molecules, the first loss being used to represent a direct degree of difference between the product molecules and the sample molecules; determining the second loss and the third loss based on the molecular attribute tag data, a covariance matrix of the molecular attribute tag data, an average value of the molecular attribute tag data, and an average value of the molecular attribute prediction data, wherein the second loss is used to represent a degree of difference between the molecular attribute tag data and a tag attribute value of the labeled attribute in the molecular attribute tag data, and the third loss is used to represent a degree of difference between the molecular attribute tag data and a tag attribute value of an attribute other than the labeled attribute among M attributes included in the molecular attribute tag data; determining the fourth loss based on a hidden space representation and a location parameter and a mean value of a probability distribution to which the hidden space representation conforms, the fourth loss being used to represent a degree of dispersion of the hidden space representation with respect to the probability distribution, the hidden space representation being a hidden layer feature of the sample molecule obtained by an intermediate layer of the molecular generative model; determining the variational coding loss based on the first loss, the second loss, the third loss, and the fourth loss, wherein the variational coding loss is used to represent a degree of difference between a generated molecule generated based on the molecular attribute tag data and the sample molecule; determining the loss function value based on the regression loss and the variational coding loss; The method for training a molecular generative model according to claim 5.

7. When the molecular attribute prediction data of the sample molecules continuously changes due to training of the molecular generation model, the covariance matrix and the mean value of the molecular attribute tag data are also continuously updated. The method for training a molecular generative model according to claim 6.

8. the molecular generative model includes a first generative network and a second generative network; the first generative network is configured to generate a hidden space representation based on the sample molecules and molecular attribute tag data of the sample molecules, and mean and location parameters of a probability distribution to which the hidden space representation follows are determined by parameters of the first generative network, the sample molecules, and molecular attribute tag data of the sample molecules; the second generative network is configured to obtain the generated molecule based on the hidden space representation and molecular attribute tag data of the sample molecule, and mean and location parameters of a probability distribution followed by the generated molecule are determined by parameters of the second generative network, the hidden space representation, and molecular attribute tag data of the sample molecule. A method for training a molecular generative model according to any one of claims 5 to 7.

9. The molecular attribute prediction data of the sample molecules is obtained by a molecular attribute prediction model, and the training method of the molecular generation model includes: If the quantity of molecules corresponding to the training data is greater than a threshold, the molecular attribute prediction model adopts a first neural network model that has not been pre-trained, and during training of the molecule generation model, adjusts parameters of the first neural network model using the difference between the molecular attribute labeled data of the sample molecules and the molecular attribute predicted data of the sample molecules; Or, If the quantity of molecules corresponding to the training data is not greater than a threshold, the molecular attribute prediction model may further include a step of employing a pre-trained second neural network model, the second neural network model having molecular attribute prediction ability obtained by pre-training using a complete dataset, the complete dataset including a plurality of substances and corresponding attribute values. A method for training a molecular generative model according to any one of claims 1 to 8.

10. the second neural network model includes a backbone network and a fully connected network; During training of the molecular generation model, the difference between the molecular attribute labeled data of the sample molecule and the molecular attribute predicted data of the sample molecule is used to adjust the parameters of the fully connected network, while keeping the parameters of the backbone network unchanged. The method for training a molecular generative model according to claim 9.

11. A training device for a molecular generative model, comprising: The system includes a data acquisition module, a data prediction module, a tag acquisition module, and a model training module; the data acquisition module is configured to acquire training data for a molecular generation model, the training data including molecular attribute-labeled data for each of a plurality of sample molecules, each molecular attribute-labeled data including labeled attribute values ​​for M attributes of the sample molecule, where M is a positive integer; the data prediction module is configured to determine that the molecular attribute-labeled data of one sample molecule in the training data is incomplete when a labeled attribute value for at least one attribute among the M attributes is missing in the molecular attribute-labeled data of the sample molecule, and predict an attribute value for the at least one attribute of the sample molecule to obtain molecular attribute prediction data of the sample molecule; the tag acquisition module is configured to obtain molecular attribute tag data of the sample molecule based on the molecular attribute labeled data and molecular attribute prediction data of the sample molecule; The molecular generative model training device is configured to train the molecular generative model based on molecular attribute tag data of the sample molecules to obtain a trained molecular generative model.

12. a processor and a memory in which a computer program is stored, The computer program is loaded and executed by the processor, causing the processor to perform the method according to any one of claims 1 to 10.

13. A computer-readable storage medium having stored thereon a computer program that, when loaded and executed by a processor, causes the processor to carry out the method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program stored on a computer-readable storage medium, wherein a processor reads the computer program from the computer-readable storage medium and executes it to realize the method of any one of claims 1 to 10.

Citation Information

Patent Citations

  • Drug molecule generation method based on deep learning

    CN110534164A

  • Drug small molecule property prediction method, device and equipment based on self-supervised learning

    CN113707235A

  • Training method and device of molecular graph reconstruction model and electronic equipment

    CN114334040A