Molecular property prediction method, related device and medium

By splitting and recombining molecules in the molecular dataset and optimizing the molecular encoder, the problem of difficulty in utilizing molecular substructure information in the prior art is solved, and the accuracy and generalization ability of molecular properties are improved.

CN119741990AActive Publication Date: 2025-04-01PENG CHENG LAB
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411616900.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-01
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

Existing molecular properties prediction methods rely on a large amount of labeled data, making it difficult to make full use of substructure information inside molecules, resulting in the accuracy of model predictions being limited in scenarios where data is scarce or molecular structure is complex.

Method used

By splitting the molecules in the label-free molecular dataset into molecular fragments and randomly recombined them in pairs, new training samples are generated, and these samples are used to optimize the molecular encoder to build a molecular properties prediction model.

Benefits of technology

The accuracy and generalization ability of molecular properties prediction are improved, and the molecular characterization ability of molecular encoder is optimized, so that the model can better understand the combination relationship between molecular fragments, and improve the characterization quality and prediction accuracy of complex molecular structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741990A_ABST
    Figure CN119741990A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a molecular property prediction method, a related device and a medium. According to the method, a first molecule in an unlabeled molecule data set is split and recombined to obtain a new second molecule, a training sample is determined based on the first molecule and the second molecule, and the molecular encoder is optimized by using the training sample. And training a molecular property prediction model based on the optimized molecular encoder by using the labeled molecular data set so as to realize accurate prediction of molecular properties. According to the embodiment of the invention, the substructure information in the molecule can be fully utilized to improve the prediction accuracy and generalization ability, so as to optimize the molecular characterization ability of the molecular encoder, and enable the target molecular encoder to better understand the combination relationship between the molecular fragments. And the characterization quality and the prediction precision of the complex molecular structure can be improved. The embodiment of the invention can be applied to scenes such as drug discovery, material science and molecular virtual screening.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of deep learning technology, and in particular to a molecular property prediction method, related devices and media. Background Art

[0002] In the field of molecular property prediction, rapid screening of molecules with specific properties through computational methods can greatly accelerate the process of drug development and material design.

[0003] In related technologies, molecular property prediction methods usually rely on a large amount of labeled data, and it is difficult to fully utilize the substructure information within the molecule to improve the accuracy and generalization of predictions. This limits the accuracy of model predictions in scenarios where data is scarce or the molecular structure is complex. How to improve the accuracy of molecular property predictions is an issue that needs to be discussed urgently. Summary of the invention

[0004] The embodiments of the present disclosure provide a molecular property prediction method, related devices and media, aiming to improve the accuracy of molecular property prediction.

[0005] In a first aspect, the present disclosure provides a method for predicting molecular properties, the method comprising:

[0006] Splitting each first molecule in the unlabeled molecular data set into at least one pair of molecular fragments, and recombining the plurality of molecular fragments obtained by splitting in pairs to obtain a plurality of second molecules, wherein the second molecules are different from the first molecules;

[0007] Taking the first molecule and the second molecule as training molecules, calling a preset molecular encoder to extract a complete molecular representation of each training molecule and a fragment molecular representation of each molecular fragment contained in the training molecule;

[0008] Determining a contrast loss value corresponding to each of the training molecules according to the complete molecule representation and the fragment molecule representation of each of the training molecules;

[0009] Optimizing the parameters of the molecular encoder according to the contrast loss value until the optimization end condition is reached to obtain a target molecular encoder that has completed the optimization;

[0010] Constructing a molecular property prediction model based on the target molecule encoder, the multi-layer perceptron, and the soft maximization layer;

[0011] Training the molecular property prediction model according to the labeled molecular data set to obtain a trained target molecular property prediction model;

[0012] The target molecule property prediction model is called to predict the target molecule to obtain the target molecule property.

[0013] In a second aspect, the present disclosure provides a molecular property prediction device, comprising:

[0014] A molecule splitting unit, used for splitting each first molecule in the unlabeled molecule data set into at least one pair of molecular fragments, and performing pairwise recombination of the plurality of molecular fragments obtained by splitting to obtain a plurality of second molecules, wherein the second molecules are different from the first molecules;

[0015] A molecular encoding unit, used to use both the first molecule and the second molecule as training molecules, and call a preset molecular encoder to extract a complete molecular representation of each training molecule and a fragment molecular representation of each molecular fragment contained in the training molecule;

[0016] A loss determination unit, configured to determine a contrast loss value corresponding to each of the training molecules according to the complete molecule representation and the fragment molecule representation of each of the training molecules;

[0017] A coding optimization unit, used for optimizing the parameters of the molecular encoder according to the contrast loss value until the optimization end condition is reached to obtain a target molecular encoder that has completed the optimization;

[0018] A model building unit, used for building a molecular property prediction model according to the target molecule encoder, the multi-layer perceptron, and the soft maximization layer;

[0019] A model training unit, used to train the molecular property prediction model according to the labeled molecular data set to obtain a trained target molecular property prediction model;

[0020] The molecule prediction unit is used to call the target molecule property prediction model to predict the target molecule and obtain the target molecule property.

[0021] Optionally, the molecular splitting unit is specifically used for:

[0022] retrieving each synthesizable bond of the first molecule;

[0023] For each of the first molecules, randomly selecting one of the synthesizable bonds to split the first molecule into two of the molecular fragments;

[0024] or,

[0025] For each of the first molecules, the first molecule is split multiple times according to each of the synthesizable bonds of the first molecule to obtain multiple pairs of different molecular fragments.

[0026] Optionally, the loss determination unit is specifically configured to:

[0027] Determining a reconstructed molecular representation of each of the training molecules according to the fragment molecular representation of each of the training molecules;

[0028] The contrast loss value corresponding to each of the training molecules is determined according to the complete molecular representation and the reconstructed molecular representation of each of the training molecules.

[0029] Optionally, the loss determination unit is specifically configured to:

[0030] For each of the training molecules, respectively determining the ratio of the fragment molar mass of each molecular fragment contained in the training molecule to the complete molar mass of the training molecule;

[0031] Setting the weight of each of the molecular fragments according to the ratio corresponding to each of the molecular fragments;

[0032] The reconstructed molecular representation of the training molecule is obtained by weighted summation according to the fragment molecular representation of each of the molecular fragments and the weight of each of the molecular fragments.

[0033] Optionally, the contrast loss value is obtained by the following steps:

[0034] Calculating a first similarity between the complete molecular representation and the reconstructed molecular representation of the current training molecule;

[0035] Calculating a second similarity between the complete molecular representation of the current training molecule and each other training molecule except the current training molecule;

[0036] The contrast loss value of the current training molecule is calculated according to an exponent of a ratio of the first similarity to a preset temperature coefficient and an exponent of a ratio of each of the second similarities to the temperature coefficient.

[0037] Optionally, the encoding optimization unit is specifically used for:

[0038] Calculating the gradient of each parameter of the molecular encoder according to the contrast loss value and a preset learning rate;

[0039] The parameters are updated and optimized according to the gradient and the learning rate.

[0040] Optionally, the encoding optimization unit is specifically used for:

[0041] Optimizing the parameters of the molecular encoder according to the contrast loss value, and increasing the number of optimization steps by one;

[0042] When the number of optimization steps is greater than a preset value, determining that the optimization of the molecular encoder is completed;

[0043] When the number of optimization steps is less than or equal to the preset value, the process jumps to calling the preset molecular encoder to extract the complete molecular representation of each training molecule and the fragment molecular representation of the molecular fragments contained in each training molecule.

[0044] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for predicting molecular properties as in the first aspect is implemented.

[0045] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer executes the computer program, the molecular property prediction method as in the first aspect is implemented.

[0046] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, comprising a computer program or computer instructions, wherein the computer program or the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer program or the computer instructions from the computer-readable storage medium, and the processor executes the computer program or the computer instructions, so that the computer device performs the molecular property prediction method as in the first aspect.

[0047] In the present disclosure, each first molecule in the unlabeled molecular data set is split into multiple molecular fragments, and the molecular fragments are randomly recombined in pairs, and multiple new second molecules are reconstructed as part of the training sample, and then the molecular encoder is optimized using the first molecule and the second molecule. After the molecular encoder is optimized, a molecular property prediction model is constructed through a target molecule encoder, a multi-layer perceptron, and a soft maximization layer. At this time, the molecular property prediction model is trained with a labeled molecular data set to obtain a target molecular property prediction model to accurately predict the molecular properties of the target molecule. Compared with the prior art, in which the prediction model is trained only with a labeled data set, the present disclosure first uses the first molecule of the unlabeled molecular data set to split and reconstruct, and obtains a training sample composed of a first molecule and a second molecule. The molecular encoder is pre-trained with the training sample, and the substructure information inside the molecule can be fully utilized to improve the accuracy and generalization ability of the prediction, so as to optimize the molecular characterization ability of the molecular encoder, so that the target molecule encoder can better understand the combination relationship between molecular fragments. Finally, the molecular prediction model constructed based on the optimized molecular encoder can improve the characterization quality and prediction accuracy of complex molecular structures.

[0048] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A system architecture diagram for a molecular property prediction method according to an embodiment of the present disclosure;

[0050] Figure 2 is a flow chart of a method for predicting molecular properties according to one embodiment of the present disclosure;

[0051] Figure 3 for Figure 2 A flow chart of splitting each first molecule into at least one pair of molecular fragments in step 210;

[0052] Figure 4 for Figure 3 A schematic diagram of splitting a first molecule into at least a pair of molecular fragments;

[0053] Figure 5 for Figure 2 A flow chart of step 230 in which the contrast loss value corresponding to each training molecule is determined according to the complete molecular representation and the fragment molecular representation of each training molecule;

[0054] Figure 6 for Figure 5 A flow chart of step 510 for determining a reconstructed molecular representation of each training molecule based on the fragment molecular representation of each training molecule;

[0055] Figure 7 for Figure 5 A flow chart of determining the contrast loss value in step 520;

[0056] Figure 8 for Figure 2 A flow chart of step 240 in which the parameters of the molecular encoder are optimized according to the contrast loss value;

[0057] Fig. 9 A flowchart for training a molecular property prediction model provided for an example of the present disclosure;

[0058] Fig.10 is a module diagram of a molecular property prediction device according to an embodiment of the present disclosure;

[0059] Fig.11 According to the embodiment of the present disclosure Figure 2 The terminal structure diagram of the molecular property prediction method shown;

[0060] Fig.12 According to the embodiment of the present disclosure Figure 2 Server structure diagram of the molecular property prediction method shown. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical methods and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present disclosure and are not used to limit the present disclosure.

[0062] It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0063] In the description of the embodiments of the present disclosure, unless otherwise clearly defined, words such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above words in the embodiments of the present disclosure in combination with the specific content of the technical solution. In the embodiments of the present disclosure, words such as "further", "exemplarily" or "optionally" are used to indicate examples, illustrations or explanations, and should not be interpreted as being more preferred or more advantageous than other embodiments or design solutions. The use of words such as "further", "exemplarily" or "optionally" is intended to present related concepts in a specific way.

[0064] Before further describing the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are described. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations:

[0065] Breakable Rigid Inorganic CoreStructure (BRICS): is an algorithm for molecular disassembly and synthesis that achieves molecular decomposition and reassembly by identifying specific chemical environments in molecules. BRICS can recognize 16 different chemical environments and disassemble molecules into smaller fragments that can be used for further chemical synthesis. The BRICS algorithm disassembles based on whether the bond can be synthesized and provides synthesis functions. In addition, BRICS can also generate unique fragments of a single molecule and also supports the generation of unique fragments of a series of molecular collections.

[0066] IoU (Intersection over Union): is a measure of the accuracy of detecting corresponding objects in a specific dataset. It is used to evaluate the similarity between the predicted result and the true result. Specifically, IoU is the intersection area between the predicted bounding box and the true bounding box divided by their union area, which is used to measure the overlap between the predicted bounding box and the true bounding box.

[0067] Among related technologies, with the rapid development of artificial intelligence (AI) technology, AI has shown great potential in the scientific field, especially in computational chemistry and materials science. AI for Science (AI4S) technology efficiently handles complex tasks through data-driven methods, and has the advantages of large-scale data processing and high-dimensional data pattern mining. AI not only accelerates the discovery process and reduces experimental costs, but is also particularly effective in dealing with complex molecular structures.

[0068] For example, in the field of molecular property prediction, rapid screening of molecules with specific properties through computational methods can greatly accelerate the process of drug development and material design. Most existing molecular property prediction technologies rely on the characterization of the molecule as a whole, while ignoring the fragments within the molecule and their combination. Although some pre-trained models have used unlabeled data for representation learning, the following problems still exist:

[0069] Problem 1: It is difficult to capture the complex relationships between molecular fragments: Existing models mainly focus on the characterization of the entire molecule, and do not fully utilize the detailed information of the internal fragments of the molecule and their combination relationships, resulting in limited performance of the model when dealing with molecules with complex structures.

[0070] Problem 2: Insufficient use of unlabeled data: Many pre-training methods only encode the molecule as a whole and fail to effectively use the internal substructure and its combination information of the molecule. This not only reduces the learning efficiency of the model on unlabeled data, but also limits the performance of the model in subsequent supervised learning.

[0071] It can be seen that existing molecular property prediction methods usually rely on a large amount of labeled data, and it is difficult to fully utilize the substructure information within the molecule to improve the accuracy and generalization of predictions. This limits the performance of the model in scenarios where data is scarce or the molecular structure is complex. How to improve the accuracy of molecular property prediction is an issue that needs to be discussed urgently.

[0072] Based on this, the embodiment of the present disclosure provides a molecular property prediction method, related device and medium, by splitting each first molecule in the unlabeled molecular data set into multiple molecular fragments, randomly recombining the molecular fragments in pairs, reconstructing multiple new second molecules as part of the training sample, and then optimizing the molecular encoder using the first molecule and the second molecule. After the molecular encoder is optimized, a molecular property prediction model is constructed by a target molecule encoder, a multi-layer perceptron, and a soft maximization layer. At this time, the molecular property prediction model is trained with a labeled molecular data set to obtain a target molecular property prediction model to accurately predict the molecular properties of the target molecule. Compared with the prior art, in which the prediction model is trained only with a labeled data set, the present disclosure first splits and reconstructs the first molecule of the unlabeled molecular data set to obtain a training sample composed of a first molecule and a second molecule, and pre-trains the molecular encoder with the training sample, which can make full use of the substructure information inside the molecule to improve the accuracy and generalization ability of the prediction, so as to optimize the molecular characterization ability of the molecular encoder, so that the target molecule encoder can better understand the combination relationship between the molecular fragments. Finally, the molecular prediction model constructed based on the optimized molecular encoder can improve the characterization quality and prediction accuracy of complex molecular structures.

[0073] System architecture and scenario description of the application of the disclosed embodiments

[0074] Figure 1 1 is a system architecture diagram for the molecular property prediction method according to an embodiment of the present disclosure, which includes an object terminal 130, the Internet 120, a server 110, and the like.

[0075] The server 110 refers to a computer system that can provide molecular property prediction services, molecular encoder optimization services, and molecular property prediction model training services to the object terminal 130. Compared with the object terminal 130, the server 110 has higher requirements in terms of stability, security, performance, etc. The server 110 can also be a database that can provide data acquisition services to the object terminal 130. The server 110 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part of a high-performance computer (such as a virtual machine), a combination of parts of multiple high-performance computers (such as virtual machines), etc. The server 110 can also communicate with the object terminal 130 in a wired or wireless manner, or through the Internet 120, to exchange data.

[0076] The object terminal 130 is a device used to display the results of molecular property prediction, model training / optimization results, etc., so that the object can view them, or provide the object with an operation interface for molecular property prediction, molecular encoder optimization, prediction model training related task information upload, configuration, etc. The object can enter the data set required for molecular property prediction and model training and / or various types of task information in the object terminal 130. The object terminal 130 includes various forms such as desktop computers, laptops, PDAs (personal digital assistants), mobile phones, dedicated terminals, and digital tablets. In addition, it can be a single device or a collection of multiple devices. For example, multiple devices are connected through a local area network, share a display device for collaborative work, and together constitute a terminal. The terminal can also communicate with the server 110 in a wired or wireless manner, or through the Internet 120, to exchange data.

[0077] General description of the disclosed embodiments

[0078] It should be noted that the embodiments of the present disclosure can be applied to scenarios such as drug discovery, material science, and molecular virtual screening. In the related art, existing molecular property prediction methods usually rely on a large amount of labeled data, and it is difficult to fully utilize the substructure information within the molecule to improve the accuracy and generalization ability of the prediction, resulting in a low accuracy of the final molecular property prediction. Some embodiments of the present disclosure provide a molecular property prediction method, related devices, and media, which are intended to improve the accuracy of molecular property prediction.

[0079] The molecular property prediction method is to obtain new molecules by splitting and recombining the molecules in the unlabeled molecular data set, optimize the molecular encoder based on the new molecules to determine the training samples, and then use the labeled molecular data set to train the molecular property prediction model based on the optimized molecular encoder to achieve accurate prediction of molecular properties.

[0080] The molecular property prediction method of the embodiment of the present disclosure may be executed on a server, may be executed on a terminal, or may be executed partially on a server and partially on a terminal.

[0081] like Figure 2 As shown, according to one embodiment of the present disclosure, a molecular property prediction method includes:

[0082] Step 210: split each first molecule in the unlabeled molecular data set into at least one pair of molecular fragments, and reassemble the multiple molecular fragments obtained by splitting into two pairs to obtain multiple second molecules, wherein the second molecules are different from the first molecules;

[0083] Step 220: Use both the first molecule and the second molecule as training molecules, and call a preset molecular encoder to extract a complete molecular representation of each training molecule and a fragment molecular representation of the molecular fragments contained in each training molecule;

[0084] Step 230, determining the contrast loss value corresponding to each training molecule according to the complete molecular representation and the fragment molecular representation of each training molecule;

[0085] Step 240, optimizing the parameters of the molecular encoder according to the contrast loss value until the optimization end condition is reached, thereby obtaining a target molecular encoder that has completed the optimization;

[0086] Step 250, constructing a molecular property prediction model according to the target molecule encoder, the multi-layer perceptron, and the soft maximization layer;

[0087] Step 260: training the molecular property prediction model according to the labeled molecular data set to obtain a trained target molecular property prediction model;

[0088] Step 270: Call the target molecule property prediction model to predict the target molecule to obtain the target molecule property.

[0089] Steps 210 to 270 are briefly described below.

[0090] In step 210, the unlabeled molecular data set refers to a molecular data set without predefined labels or classification information. For example, the unlabeled molecular data can be collected from a public database or experimental data.

[0091] The first molecule is the only molecule in the unlabeled molecular data set. The molecular fragment refers to the two molecular fragments obtained by splitting the first molecule. By cutting a certain synthesizable bond of the first molecule, the first molecule can be split into two molecular fragments, that is, a pair of molecular fragments. It should be noted that each splitting of the first molecule is to cut one of the synthesizable bonds of the first molecule. If the first molecule is to be split into multiple pairs of molecular fragments, the complete first molecule is split multiple times, each time a different synthesizable bond is split, thereby obtaining multiple pairs of different molecular fragments, and each pair of molecular fragments can form a complete first molecule.

[0092] The second molecule refers to a new molecule that conforms to the laws of physical chemistry and is obtained by randomly combining two molecular fragments from a set of molecular fragments obtained by splitting the first molecules.

[0093] In step 220, the training molecules refer to molecules used to train the molecular encoder. The molecular encoder is used to encode molecular information into a certain form of embedding or representation to facilitate subsequent processing and generation.

[0094] Complete molecular characterization refers to the molecular characterization of an entire training molecule, which characterizes the structure, composition, properties, etc. of the complete molecule. Fragment molecular characterization refers to the molecular characterization of the molecular fragments that make up the training molecule, which characterizes the structure, composition, properties, etc. of the molecular fragments.

[0095] In step 230, the disclosed embodiment trains the molecular encoder by contrastive learning, and the contrastive loss value refers to the loss value calculated based on the contrastive learning loss function during the contrastive learning process. Contrastive learning is a self-supervised learning method that aims to learn the feature representation of data by comparing the similarities between samples.

[0096] In step 240, the optimization end condition refers to a condition used to indicate that the optimization of the molecular encoder has reached the expected goal. Exemplarily, the optimization end condition may be a threshold value where the contrast loss value is less than a preset value; or, the optimization end condition may be that the number of steps for iterative optimization of the molecular encoder reaches a preset number of steps. The target molecular encoder refers to a molecular encoder that has completed the optimization and whose performance has reached the expected level.

[0097] In step 250, a multilayer perceptron (MLP) is a feedforward network model based on an artificial neural network, which consists of an input layer, one or more hidden layers, and an output layer. The soft maximization layer, or Softmax layer, is a key component for multi-classification tasks in deep learning. It implements the classification function by converting the input vector into a probability distribution and is usually used as the last layer of a neural network.

[0098] The molecular property prediction model is formed by connecting a target molecule encoder to an initialized MLP layer and a Softmax layer, and is used to predict the molecular properties of the model.

[0099] In step 260 , the labeled molecule dataset is a dataset that includes molecular structures and their associated labels.

[0100] Exemplarily, the training process of the molecular property prediction model is: use a prepared labeled molecular data set to train the molecular property prediction model. During the training process, the molecular property prediction model adjusts its parameters according to the label data to improve the performance in molecular property prediction. The training adopts a supervised learning method, by defining a loss function (such as mean square error) and an optimizer, and using the back propagation algorithm to continuously optimize the model parameters. During the training process, the performance of the molecular property prediction model is regularly evaluated, and indicators such as IoU, accuracy, etc. are used to measure the performance of the model. Based on the evaluation results, it may be necessary to adjust the learning rate, optimizer, or other hyperparameters to further improve model performance.

[0101] In step 270, the target molecule refers to a molecule whose molecular property needs to be predicted. The target molecule property refers to a molecular property output by the target molecule property prediction model by inputting the target molecule into the target molecule property prediction model.

[0102] In the above-mentioned embodiment of step 210 to step 270, each first molecule in the unlabeled molecular data set is split into multiple molecular fragments, and the molecular fragments are randomly recombined in pairs to reconstruct multiple new second molecules as parts of the training sample. The first molecule is split into multiple molecular fragments according to the synthesizable bonds, and new second molecules are generated by cross-combining these fragments. By utilizing the recombination of molecular fragments, the training data is enriched, and the model's ability to learn the complex structural relationship between molecular fragments is enhanced.

[0103] The molecular encoder is then optimized using the first molecule and the second molecule. After the molecular encoder is optimized, a molecular property prediction model is constructed through a target molecule encoder, a multi-layer perceptron, and a soft maximization layer. At this time, the molecular property prediction model is trained using a labeled molecular data set to obtain a target molecular property prediction model to accurately predict the molecular properties of the target molecule. Compared with the prior art in which the prediction model is trained only through a labeled data set, the present disclosure first uses the first molecule of the unlabeled molecular data set to split and reconstruct, and obtains a training sample composed of the first molecule and the second molecule. The molecular encoder is pre-trained through the training sample, and the substructure information inside the molecule can be fully utilized to improve the accuracy and generalization of the prediction, so as to optimize the molecular characterization ability of the molecular encoder, so that the target molecule encoder can better understand the combination relationship between molecular fragments. Finally, the molecular prediction model constructed based on the optimized molecular encoder can improve the characterization quality and prediction accuracy of complex molecular structures.

[0104] The above is a general description of steps 210 to 270 . The specific implementation process of steps 310 to 380 will be described in detail below.

[0105] In one embodiment, referring to Figure 3 , step 210 comprises:

[0106] Step 310, retrieving the synthesizable bonds of each first molecule;

[0107] Step 320: for each first molecule, randomly select a synthesizable bond to split the first molecule into two molecular fragments;

[0108] or,

[0109] Step 330: For each first molecule, the first molecule is split multiple times according to each synthesizable bond of the first molecule to obtain multiple pairs of different molecular fragments.

[0110] In this embodiment, the synthesizable bond refers to a chemical bond that can bind atoms in a molecule together. By searching for the synthesizable bonds of the molecule, the molecule can be split into two molecular fragments by cutting the synthesizable bonds.

[0111] For example, Figure 4 As shown, assume that a first molecule is A1-B1-C1, wherein A1 and B1 are connected by a synthesizable bond 1 (bond 1 in the figure), and B1 and C1 are connected by a synthesizable bond 2 (bond 2 in the figure).

[0112] The BRICS method was used to retrieve that the first molecule had synthesizable bonds 1 and 2.

[0113] If referring to the splitting method corresponding to step 320 (method 1 in the figure), the synthesizable bond 1 is randomly selected for splitting, and correspondingly, the molecular fragments obtained by splitting the first molecule are two fragments A1 and B1-C1.

[0114] Referring to the splitting method corresponding to step 330 (method 2 in the figure), the first molecule is split according to the synthesizable bond 1 to obtain molecular fragments A1 and B1-C1, and the first molecule is split according to the synthesizable bond 2 to obtain molecular fragments A1-B1 and C1. Finally, the molecular fragments obtained by splitting the first molecule include A1, B1-C1, A1-B1, and C1.

[0115] The above embodiment divides each first molecule into multiple molecular fragments according to synthesizable bonds to provide a set of molecular fragments for subsequent cross-combination to form multiple new second molecules. Through the first molecule splitting method provided in this embodiment, more molecular fragments can be obtained, thereby increasing the number and probability of recombining into new second molecules, further increasing the number of samples, and enabling the molecular encoder to better learn the structural relationship between molecular fragments when it is subsequently optimized.

[0116] In one embodiment, referring to Figure 5 , step 230 comprises:

[0117] Step 510, determining a reconstructed molecular representation of each training molecule according to the fragment molecular representation of each training molecule;

[0118] Step 520: Determine the contrast loss value corresponding to each training molecule according to the complete molecular representation and the reconstructed molecular representation of each training molecule.

[0119] In step 510, the reconstructed molecular representation refers to the feature of the whole molecule of the training molecule calculated based on the fragment molecular features of the two molecular fragments constituting the corresponding training molecule. For the same training molecule, the complete molecular representation is the feature of the whole molecule of the training molecule obtained by the molecular encoder, and the reconstructed molecular representation is calculated from the fragment molecular features of the two molecular fragments of the training molecule.

[0120] In step 520, the complete molecular representation and the reconstructed molecular representation of the training molecule are used as positive pairs, and the complete molecular representation of the training molecule and the complete molecular representations of other training molecules in the same batch are used as negative pairs, and the molecular encoder is optimized using contrastive learning.

[0121] In the embodiments provided in the above steps 510 and 520, the reconstructed molecular representation is determined by the fragment molecular representation of the molecular fragments contained in the training molecule, and the contrast loss value is determined by using the reconstructed molecular representation and the complete molecular representation, so as to optimize the molecular encoder by using the contrast loss value. By using the combination of the molecular fragment representations as the overall representation of the corresponding molecule and performing comparative learning in combination with the overall representation of the corresponding molecule generated by the molecular encoder, it is possible to ensure that the generated molecular representation more accurately reflects the physical properties of the molecule and its molecular fragments, and optimize the rationality and accuracy of the molecular representation.

[0122] In one embodiment, referring to Figure 6 , step 510 includes:

[0123] Step 610: for each training molecule, respectively determine the ratio of the fragment molar mass of each molecular fragment contained in the training molecule to the complete molar mass of the training molecule;

[0124] Step 620: setting the weight of each molecular fragment according to the ratio corresponding to each molecular fragment;

[0125] Step 630: According to the fragment molecular representations of each molecular fragment and the weights of each molecular fragment, weighted sum is performed to obtain the reconstructed molecular representation of the training molecule.

[0126] Exemplarily, for any batch, the reconstructed molecular representation of the training molecules is calculated by the following formula:

[0127]

[0128] Among them, i represents the i-th training molecule in the current batch, represents the reconstructed molecular representation of the i-th training molecule, represents the complete molecular representation of the i-th training molecule encoded by the molecular encoder, Represents the fragment molecular features of the molecular fragment corresponding to the i-th training molecule. Respectively represent the molar mass of the i-th training molecule and its corresponding molecular fragment.

[0129] In the embodiments provided in the above steps 610 and 620, the molar mass is introduced as a weighting factor in the characterization process of the training molecule and its molecular fragments, and the characterization of the training molecule is decomposed into a combination of the characterizations of the molecular fragments through weighted calculation. This ensures that the generated molecular characterization more accurately reflects the physical properties of the molecule and its molecular fragments, and optimizes the rationality and accuracy of the molecular characterization.

[0130] In one embodiment, referring to Figure 7 , the contrast loss value is obtained by the following steps:

[0131] Step 710, calculating a first similarity between the complete molecular representation and the reconstructed molecular representation of the current training molecule;

[0132] Step 720, calculating the second similarity between the complete molecular representation of the current training molecule and each other training molecule except the current training molecule;

[0133] Step 730: Calculate the contrast loss value of the current training molecule according to the exponent of the ratio of the first similarity to the preset temperature coefficient and the exponent of the ratio of each second similarity to the temperature coefficient.

[0134] In this embodiment, the first similarity refers to the cosine similarity between the complete molecular representation of the current training molecule and its reconstructed molecular representation. The second similarity refers to the cosine similarity between the complete molecular representation of the current training molecule and the complete molecular representation of a certain other training molecule except the current training molecule. For example, assuming that there are 5 training molecules in the current batch, the second similarities between the current training molecule and the other four training molecules are calculated respectively, and a total of 4 second similarities are calculated.

[0135] Exemplarily, the contrast loss value is calculated by the following formula:

[0136]

[0137] in, represents the contrast loss value of the i-th training molecule, represents the complete molecular representation of the kth training molecule except the i-th training molecule, τ is the temperature coefficient, N is the number of samples in a batch, exp() is the exponential function, and sim() is the cosine similarity function.

[0138] In the above embodiment, the complete molecular representation and the reconstructed molecular representation of the current training molecule are taken as a positive pair, and the complete molecular representation of the current training molecule and the complete molecular representation of other training molecules in the same batch are taken as a negative pair, and the contrast loss value of the current training molecule is calculated, so that the contrast loss value takes the characteristics of the molecule and its molecular fragments into consideration, so that the molecular representation generated by the optimized molecular encoder more accurately reflects the physical properties of the molecule and its molecular fragments, thereby optimizing the rationality and accuracy of the molecular representation.

[0139] In one embodiment, referring to Figure 8 , step 240 comprises:

[0140] Step 810: Calculate the gradient of each parameter of the molecular encoder according to the contrast loss value and the preset learning rate;

[0141] Step 820: Update and optimize the parameters according to the gradient and learning rate.

[0142] In this embodiment, the learning rate is a pre-set hyperparameter for determining the speed and direction of updating parameters during the molecular encoder optimization process. Exemplarily, the learning rate can be set based on expert experience, or adjusted based on the change of the contrast loss value, or adjusted according to the change of the gradient.

[0143] Exemplarily, the parameter optimization of the molecular encoder can be performed by the following formula:

[0144]

[0145] Among them, θnew is the updated optimized parameter, θold is the current parameter, α is the learning rate, is the gradient of the current parameter determined based on the contrastive loss value.

[0146] In the above embodiment, the parameters of the molecular encoder are optimized using the contrast loss value calculated based on the complete molecular representation and the reconstructed molecular representation of the training molecule, thereby enhancing the learning ability of the optimized molecular encoder for the complex structural relationship between molecular fragments and improving the accuracy of the molecular representation generated by the model.

[0147] In one embodiment, step 240 includes:

[0148] Optimize the parameters of the molecular encoder according to the contrast loss value, and increase the number of optimization steps by one;

[0149] When the number of optimization steps is greater than a preset value, it is determined that the optimization of the molecular encoder is completed;

[0150] When the number of optimization steps is less than or equal to the preset value, the process jumps to calling the preset molecular encoder to extract the complete molecular representation of each training molecule and the fragment molecular representation of the molecular fragments contained in each training molecule.

[0151] In this embodiment, the number of optimization steps refers to the number of iterative optimizations of the molecular encoder. The preset value refers to the preset number of iterations of the optimization training of the molecular encoder. When the preset value is 1, one round of model parameter update is performed, and when the preset value is 2, two rounds of model parameter iterative updates are performed.

[0152] If the number of optimization steps is greater than the preset value, it means that the current molecular encoder has achieved the desired optimization result, so the current molecular encoder is used as the target molecular encoder after the optimization is completed.

[0153] If the number of optimization steps does not exceed the preset value, it means that the current molecular encoder has not achieved the desired optimization result, and the parameters of the molecular encoder need to be optimized for the next round of iteration. In this embodiment, the molecular encoder can be optimized using the embodiments or combinations provided by steps 510 and 520, steps 610 to 630, steps 710 to 730, steps 810 and 820, etc.

[0154] The following is a comprehensive and specific description of the molecular property prediction method disclosed in the present invention through an example. It is understood that the following embodiments are all for the purpose of better illustrating the molecular property prediction method disclosed in the present invention, and are not specifically limited.

[0155] For example, refer to Fig. 9 , the training process of the molecular property prediction model disclosed in the present invention is as follows:

[0156] Step S001: Initialize the data set. Collect a large amount of unlabeled molecular data from public databases and experimental data to form a data set D, and use BRICS to retrieve synthesizable bonds for each molecule (the first molecule), and randomly select a synthesizable bond to split the molecule to generate two molecular fragments.

[0157] Step S002: Generate new molecular data and construct a pre-training data set. Collect the multiple molecular fragments obtained by splitting each molecule in step S001 to obtain a molecular fragment set. Randomly combine the molecular fragments in the molecular fragment set. If two fragments from different molecules can combine and generate a new molecule that conforms to the laws of physical chemistry, then the new molecule (second molecule) obtained by the recombination is incorporated into the data set D. The final pre-training data set is D = {S 0 ,S 1 ,…,S max_num},S irepresents the i-th sample (training molecule), max_num represents the total number of samples contained in D, where S i = {Mol,Mol 1 ,Mol 2},Mol,Mol 1 ,Mol 2 They represent the complete molecule and its corresponding molecular fragment respectively.

[0158] Step S003: Initialize the molecular property prediction model. Connect the molecular encoder to an initialized MLP layer and a Softmax layer to obtain an initialized molecular property prediction model.

[0159] Step S004: Initialize the parameters of the molecular encoder M, as well as the maximum number of training batches epoch_max and the learning rate lr. Set the current training batch to epoch_now = 0. It should be noted that the training batch in this example is the same as the number of optimization steps in the above embodiment.

[0160] Step S005: Calculate the contrast loss and optimize the molecular encoder. Use the molecular encoder M to encode the samples of the pre-training dataset D, including complete molecules and their molecular fragments, and generate a complete molecular representation of each training molecule in D. Fragmentation molecular characterization of molecular fragments corresponding to each molecule And calculate the reconstructed molecular representation based on the fragment molecular representation of each training molecule The specific calculation formula is shown in the following formula (1).

[0161] The molecular encoder M is pre-trained using the contrastive learning method. The positive pairs are set as follows: one is the molecular representation of the complete molecule, and the other is the weighted sum of the molecular fragment representations that make up the molecule, with the weight being the molar mass ratio of the molecular fragments to the complete molecule. The negative pairs are set as: molecular pairs of different samples from the same batch. For any batch, the formula for contrastive loss is as follows:

[0162]

[0163] in Respectively represent the molar mass of the i-th training molecule and its corresponding molecular fragment, τ is the temperature coefficient, N is the number of samples in a batch, represents the complete molecular representation of the kth training molecule except the i-th training molecule, exp() is the exponential function, and sim() is the cosine similarity function. The contrast loss value is calculated Finally, the gradients of various parameters of the molecular encoder M are calculated according to the contrast loss value and the learning rate, and the parameters of the molecular encoder are updated and optimized based on the gradients.

[0164] Step S006: epoch_now is incremented by one.

[0165] Step S007: Determine whether the current epoch_now is less than the set maximum number of steps epoch_max. If epoch_now is less than epoch_max, jump to S005; otherwise jump to S008.

[0166] Step S008: Use the labeled molecular data set to train the pre-trained molecular property prediction model to obtain the final target molecular property prediction model, which can predict molecular properties in batches. The pre-trained molecular property prediction model refers to a molecular property prediction model after optimizing the molecular encoder in the molecular property prediction model.

[0167] In the above example, each molecule is split into multiple molecular fragments according to the breakable bonds by the BRICS method, and these fragments are cross-combined to generate new molecules. The new molecules are generated by the recombination of molecular fragments, which enriches the training samples and improves the model's ability to learn the complex relationships between molecular fragments. The molar mass is also introduced as a weighting factor between the molecular and molecular fragment representations. Through the weighted calculation of the weights, the molecular representation can be decomposed into a combination of its fragment representations. This ensures that the generated molecular representation more accurately reflects the physical properties of the molecule and its fragments, and optimizes the rationality and accuracy of the representation.

[0168] Description of the apparatus and device of the present disclosure

[0169] It is to be understood that, although the steps in the above-mentioned flowcharts are sequentially displayed according to the characterization of arrows, these steps are not necessarily executed in sequence according to the order of arrow characterization. Unless there is a clear description in the present embodiment, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0170] Fig.10 The schematic diagram of the structure of the molecular property prediction device provided in the embodiment of the present disclosure. The molecular property prediction device 1000 includes:

[0171] A molecule splitting unit 1010 is used to split each first molecule in the unlabeled molecule data set into at least one pair of molecular fragments, and to reassemble the multiple molecular fragments obtained by splitting into two pairs to obtain multiple second molecules, wherein the second molecules are different from the first molecules;

[0172] The molecular encoding unit 1020 is used to use the first molecule and the second molecule as training molecules, and call a preset molecular encoder to extract the complete molecular representation of each training molecule and the fragment molecular representation of the molecular fragments contained in each training molecule;

[0173] A loss determination unit 1030, for determining a comparison loss value corresponding to each training molecule according to the complete molecular representation and the fragment molecular representation of each training molecule;

[0174] The coding optimization unit 1040 is used to optimize the parameters of the molecular encoder according to the contrast loss value until the optimization end condition is reached to obtain the optimized target molecular encoder;

[0175] A model building unit 1050 is used to build a molecular property prediction model based on the target molecule encoder, the multi-layer perceptron, and the soft maximization layer;

[0176] A model training unit 1060 is used to train a molecular property prediction model according to a labeled molecular data set to obtain a trained target molecular property prediction model;

[0177] The molecule prediction unit 1070 is used to call the target molecule property prediction model to predict the target molecule and obtain the target molecule property.

[0178] Optionally, the molecule splitting unit 1010 is specifically used for:

[0179] Retrieving the synthesizable bonds of each first molecule;

[0180] For each first molecule, a synthesizable bond is randomly selected to split the first molecule into two molecular fragments;

[0181] or,

[0182] For each first molecule, the first molecule is split multiple times according to each synthesizable bond of the first molecule to obtain multiple pairs of different molecular fragments.

[0183] Optionally, the loss determining unit 1030 is specifically configured to:

[0184] Determining a reconstructed molecular representation of each training molecule based on the fragmented molecular representation of each training molecule;

[0185] According to the complete molecular representation and the reconstructed molecular representation of each training molecule, the contrast loss value corresponding to each training molecule is determined.

[0186] Optionally, the loss determining unit 1030 is specifically configured to:

[0187] For each training molecule, respectively determine the ratio of the fragment molar mass of each molecular fragment contained in the training molecule to the complete molar mass of the training molecule;

[0188] According to the ratios corresponding to the molecular fragments, the weights of the molecular fragments are set;

[0189] According to the fragment molecular representation of each molecular fragment and the weight of each molecular fragment, the reconstructed molecular representation of the training molecule is obtained by weighted summation.

[0190] Optionally, the contrast loss value is obtained by the following steps:

[0191] Calculate the first similarity between the complete molecular representation and the reconstructed molecular representation of the current training molecule;

[0192] Calculating a second similarity between the complete molecular representation of the current training molecule and each other training molecule except the current training molecule;

[0193] The contrast loss value of the current training molecule is calculated according to the exponent of the ratio of the first similarity to the preset temperature coefficient and the exponent of the ratio of each second similarity to the temperature coefficient.

[0194] Optionally, the coding optimization unit 1040 is specifically configured to:

[0195] Calculate the gradient of each parameter of the molecular encoder according to the contrast loss value and the preset learning rate;

[0196] Update and optimize the parameters according to the gradient and learning rate.

[0197] Optionally, the coding optimization unit 1040 is specifically configured to:

[0198] Optimize the parameters of the molecular encoder according to the contrast loss value, and increase the number of optimization steps by one;

[0199] When the number of optimization steps is greater than a preset value, it is determined that the optimization of the molecular encoder is completed;

[0200] When the number of optimization steps is less than or equal to the preset value, the process jumps to calling the preset molecular encoder to extract the complete molecular representation of each training molecule and the fragment molecular representation of the molecular fragments contained in each training molecule.

[0201] Reference Fig.11 , Fig.11The structural block diagram of the terminal part for implementing the molecular property prediction method of the embodiment of the present disclosure includes: a radio frequency (RF) circuit 1110, a memory 1115, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, a processor 1180, and a power supply 1190. Those skilled in the art can understand that Fig.11 The terminal structure shown does not constitute a limitation on the mobile phone or computer, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0202] The RF circuit 1110 may be used for receiving and sending signals during information transmission or communication. In particular, after receiving downlink information from the base station, the information is sent to the processor 1180 for processing. In addition, the uplink data is sent to the base station.

[0203] The memory 1115 may be used to store software programs and modules. The processor 1180 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 1115 .

[0204] The input unit 1130 may be used to receive input digital or character information and generate key signal input related to the setting and function control of the content terminal. Specifically, the input unit 1130 may include a touch panel 1131 and other input devices 1132 .

[0205] The display unit 1140 may be used to display input information or provided information and various menus of the content terminal. The display unit 1140 may include a display panel 1141.

[0206] The audio circuit 1160 , the speaker 1161 , and the microphone 1162 may provide an audio interface.

[0207] In this embodiment, the processor 1180 included in the terminal can execute the molecular property prediction method of the previous embodiment.

[0208] The terminals of the embodiments of the present disclosure include but are not limited to mobile phones, computers, etc. The embodiments of the present disclosure can be applied to various scenarios, including but not limited to drug discovery, material science, molecular virtual screening, etc.

[0209] Fig.12The block diagram of the part of the server for implementing the molecular property prediction method of the disclosed embodiment. The server may have a relatively large difference due to different configurations or performances, and may include one or more central processing units (Central Processing Units, referred to as CPU) 1222 (for example, one or more processors) and memory 1232, one or more storage media 1230 (for example, one or more mass storage devices) storing application programs 1242 or data 1244. Among them, memory 1232 and storage medium 1230 may be short-term storage or permanent storage. The program stored in storage medium 1230 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Further, central processing unit 1222 may be configured to communicate with storage medium 1230, and execute a series of instruction operations in storage medium 1230 on the server.

[0210] The server may also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input and output interfaces 1258, and / or one or more operating systems 1241, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0211] The central processor 1222 in the server can be used to execute the molecular property prediction method of the embodiment of the present disclosure.

[0212] The embodiments of the present disclosure also provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the molecular property prediction methods of the aforementioned embodiments.

[0213] The embodiment of the present disclosure also provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes and implements the above-mentioned molecular property prediction method.

[0214] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar contents, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0215] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated content, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the associated content before and after is in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0216] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.

[0217] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0218] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0219] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0220] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0221] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.

[0222] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.

Claims

1. A method for predicting molecular properties, characterized in that: The method comprises: Splitting each first molecule in the unlabeled molecular data set into at least one pair of molecular fragments, and recombining the plurality of molecular fragments obtained by splitting in pairs to obtain a plurality of second molecules, wherein the second molecules are different from the first molecules; Taking the first molecule and the second molecule as training molecules, calling a preset molecular encoder to extract a complete molecular representation of each training molecule and a fragment molecular representation of each molecular fragment contained in the training molecule; Determining a contrast loss value corresponding to each of the training molecules according to the complete molecule representation and the fragment molecule representation of each of the training molecules; Optimizing the parameters of the molecular encoder according to the contrast loss value until the optimization end condition is reached to obtain a target molecular encoder that has completed the optimization; Constructing a molecular property prediction model based on the target molecule encoder, the multilayer perceptron, and the soft maximization layer; Training the molecular property prediction model according to the labeled molecular data set to obtain a trained target molecular property prediction model; The target molecule property prediction model is called to predict the target molecule to obtain the target molecule property.

2. The method according to claim 1, characterized in that The step of splitting each first molecule in the unlabeled molecular dataset into at least one pair of molecular fragments comprises: retrieving each synthesizable bond of the first molecule; For each of the first molecules, randomly selecting one of the synthesizable bonds to split the first molecule into two of the molecular fragments; or, For each of the first molecules, the first molecule is split multiple times according to each of the synthesizable bonds of the first molecule to obtain multiple pairs of different molecular fragments.

3. The method according to claim 1, characterized in that The determining, according to the complete molecular representation and the fragment molecular representation of each training molecule, the contrast loss value corresponding to each training molecule comprises: Determining a reconstructed molecular representation of each of the training molecules according to the fragment molecular representation of each of the training molecules; The contrast loss value corresponding to each of the training molecules is determined according to the complete molecular representation and the reconstructed molecular representation of each of the training molecules.

4. The method according to claim 3, characterized in that Determining the reconstructed molecular representation of each training molecule according to the fragment molecular representation of each training molecule includes: For each of the training molecules, respectively determining the ratio of the fragment molar mass of each molecular fragment contained in the training molecule to the complete molar mass of the training molecule; Setting the weight of each of the molecular fragments according to the ratio corresponding to each of the molecular fragments; The reconstructed molecular representation of the training molecule is obtained by weighted summation according to the fragment molecular representation of each of the molecular fragments and the weight of each of the molecular fragments.

5. The method according to claim 4, characterized in that The contrast loss value is obtained by the following steps: Calculating a first similarity between the complete molecular representation and the reconstructed molecular representation of the current training molecule; Calculating a second similarity between the complete molecular representation of the current training molecule and each other training molecule except the current training molecule; The contrast loss value of the current training molecule is calculated according to an exponent of a ratio of the first similarity to a preset temperature coefficient and an exponent of a ratio of each of the second similarities to the temperature coefficient.

6. The method according to any one of claims 1 to 5, characterized in that: The step of optimizing the parameters of the molecular encoder according to the contrast loss value comprises: Calculating the gradient of each parameter of the molecular encoder according to the contrast loss value and a preset learning rate; The parameters are updated and optimized according to the gradient and the learning rate.

7. The method according to claim 6, characterized in that The step of optimizing the parameters of the molecular encoder according to the contrast loss value until the optimization end condition is reached to obtain the optimized target molecular encoder comprises: Optimizing the parameters of the molecular encoder according to the contrast loss value, and increasing the number of optimization steps by one; When the number of optimization steps is greater than a preset value, determining that the optimization of the molecular encoder is completed; When the number of optimization steps is less than or equal to the preset value, the process jumps to calling the preset molecular encoder to extract the complete molecular representation of each training molecule and the fragment molecular representation of the molecular fragments contained in each training molecule.

8. A molecular property prediction device, characterized in that: include: A molecule splitting unit, used for splitting each first molecule in the unlabeled molecule data set into at least one pair of molecular fragments, and performing pairwise recombination of the plurality of molecular fragments obtained by splitting to obtain a plurality of second molecules, wherein the second molecules are different from the first molecules; A molecular encoding unit, used to use both the first molecule and the second molecule as training molecules, and call a preset molecular encoder to extract a complete molecular representation of each training molecule and a fragment molecular representation of each molecular fragment contained in the training molecule; A loss determination unit, configured to determine a contrast loss value corresponding to each of the training molecules according to the complete molecule representation and the fragment molecule representation of each of the training molecules; A coding optimization unit, used for optimizing the parameters of the molecular encoder according to the contrast loss value until the optimization end condition is reached to obtain a target molecular encoder that has completed the optimization; A model building unit, used for building a molecular property prediction model according to the target molecule encoder, the multi-layer perceptron, and the soft maximization layer; A model training unit, used to train the molecular property prediction model according to the labeled molecular data set to obtain a trained target molecular property prediction model; The molecule prediction unit is used to call the target molecule property prediction model to predict the target molecule and obtain the target molecule property.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the molecular property prediction method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer can implement the molecular property prediction method according to any one of claims 1 to 7 when executing the computer program.

11. A computer program product comprising a computer program or computer instructions, characterized in that The computer program or the computer instructions are stored in a computer-readable storage medium, and the processor of a computer device reads the computer program or the computer instructions from the computer-readable storage medium. The processor executes the computer program or the computer instructions, so that the computer device executes the molecular property prediction method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Molecular property prediction model training method, storage medium and property prediction device

    CN117059199A