Molecular property prediction methods, related devices, and media

By decomposing and recombining molecular fragments from unlabeled molecular datasets and optimizing molecular encoders, and combining multilayer perceptrons and soft maximization layers to construct molecular property prediction models, the problem of failing to fully utilize the internal substructure information of molecules in existing technologies is solved, achieving higher prediction accuracy and generalization ability.

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

Patent Information

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

AI Technical Summary

Technical Problem

Existing methods for predicting molecular properties rely on large amounts of labeled data, making it difficult to fully utilize substructure information within molecules. This results in limited prediction accuracy and generalization ability in scenarios with scarce data or complex molecular structures.

Method used

The molecules in the unlabeled molecular dataset are split into multiple molecular fragments, randomly recombine them in pairs to construct new training samples, and then a molecular property prediction model is constructed by combining a multilayer perceptron and a soft maximization layer after optimization by a molecular encoder, and trained using a labeled dataset.

Benefits of technology

It improves the accuracy and generalization ability of molecular property prediction, enables a better understanding of the combination relationships between molecular fragments, and enhances the characterization quality and prediction accuracy of complex molecular structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741990B_ABST
    Figure CN119741990B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a molecular property prediction method, related device and medium. The method splits and recombines a first molecule in an unlabeled molecule dataset to obtain a new second molecule, determines a training sample based on the first molecule and the second molecule, and optimizes a molecular encoder using the training sample. Then, the molecular property prediction model based on the optimized molecular encoder is trained using a labeled molecule dataset to achieve accurate prediction of the molecular property. Embodiments of the present disclosure can fully utilize the substructure information inside the molecule to improve the accuracy and generalization ability of the prediction, optimize the molecular representation ability of the molecular encoder, and enable the target molecular encoder to better understand the combination relationship between the molecular fragments, thereby improving the representation quality and prediction accuracy of complex molecular structures. Embodiments of the present disclosure can be applied to drug discovery, material science, molecular virtual screening and other scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of deep learning, in particular to a molecular property prediction method, related device and medium. BACKGROUND

[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 inside the molecule to improve the prediction accuracy and generalization ability. This limits the accuracy of model prediction in scenarios where data is scarce or molecular structure is complex. How to improve the accuracy of molecular property prediction is a problem that needs to be discussed. SUMMARY

[0004] Embodiments of the present disclosure provide a molecular property prediction method, related device and medium, aiming to improve the accuracy of molecular property prediction.

[0005] In a first aspect, the present disclosure provides a molecular property prediction method, comprising:

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

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

[0008] According to the complete molecular representation and the fragment molecular representation of each training molecule, determining a contrast loss value corresponding to each training molecule;

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

[0010] According to the target molecular encoder, a multilayer perceptron and a soft-max layer, constructing a molecular property prediction model;

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

[0012] Calling the target molecular property prediction model to predict a target molecule to obtain a target molecular property.

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

[0014] a molecule splitting unit, configured to split each first molecule in an unlabeled molecule dataset into at least one pair of molecular fragments, and recombine 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;

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

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

[0017] an encoding optimization unit, configured to optimize parameters of the molecule encoder according to the contrast loss value until an optimization end condition is reached, to obtain a target molecule encoder after optimization is completed;

[0018] a model construction unit, configured to construct a molecular property prediction model according to the target molecule encoder, a multilayer perceptron, and a soft-max layer;

[0019] a model training unit, configured to train the molecular property prediction model according to a labeled molecule dataset to obtain a trained target molecular property prediction model;

[0020] a molecule prediction unit, configured to call the target molecular property prediction model to predict a target molecule to obtain a target molecular property.

[0021] Optionally, the molecule splitting unit is specifically configured to:

[0022] retrieve a synthesizable bond of each first molecule;

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

[0024] or,

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

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

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

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

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

[0030] determine, for each of the training molecules, a ratio of a fragment molar mass of each molecular fragment included in the training molecule to a complete molar mass of the training molecule;

[0031] set a weight of each of the molecular fragments according to the ratio corresponding to the molecular fragment;

[0032] obtain the reconstructed molecular representation of the training molecule 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] calculate a first similarity of the complete molecular representation and the reconstructed molecular representation of a current training molecule;

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

[0036] calculate the contrast loss value of the current training molecule 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 similarity to the temperature coefficient.

[0037] Optionally, the encoding optimization unit is specifically configured to:

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

[0039] update and optimize the parameter according to the gradient and the learning rate.

[0040] Optionally, the encoding optimization unit is specifically configured to:

[0041] optimize the parameter of the molecular encoder according to the contrast loss value, and add one to an optimization step number;

[0042] determine that the optimization of the molecular encoder is completed in a case where the optimization step number is greater than a preset value;

[0043] In a case where the optimized step number is less than or equal to the preset value, jumping to the calling preset molecular encoder to extract a complete molecular representation of each training molecule and a fragment molecular representation of a molecular fragment contained in each training molecule.

[0044] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the molecular property prediction method in the first aspect when executing the computer program.

[0045] In a fourth aspect, a computer-readable storage medium is provided, which stores computer-executable instructions, and the computer-executable instructions implement the molecular property prediction method in the first aspect when executed by a computer.

[0046] In a fifth aspect, a computer program product is provided, which includes a computer program or computer instructions stored in a computer-readable storage medium, and 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 executes the molecular property prediction method in the first aspect.

[0047] In the present disclosure, each first molecule in the unlabeled molecular dataset is split into multiple molecular fragments, and the molecular fragments are randomly recombined in pairs to reconstruct multiple new second molecules as part of the training sample. Then, the first molecules and the second molecules are used to optimize the molecular encoder. After the optimization of the molecular encoder, a molecular property prediction model is constructed by the target molecular encoder, the multilayer perceptron, and the soft-max layer. Then, the unlabeled molecular dataset is used to train the molecular property prediction model to obtain a target molecular property prediction model, so as to accurately predict the molecular properties of target molecules. Compared with the prior art in which only the labeled dataset is used to train the prediction model, the present disclosure first splits and reconstructs the first molecules in the unlabeled molecular dataset to obtain training samples composed of first molecules and second molecules, and pre-trains the molecular encoder by using the training samples. The substructure information inside the molecule can be fully utilized to improve the prediction accuracy and generalization ability, so as to optimize the molecular representation ability of the molecular encoder, so that the target molecular 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 representation quality and prediction accuracy of complex molecular structures.

[0048] Additional features and advantages of the present disclosure will be set forth in the description that follows, and in part will be apparent from the description, or can be learned by practice of the present disclosure. The objectives and other advantages of the present disclosure will be realized and attained by the structure particularly pointed out in the description and claims. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 System architecture diagram applied to the molecular property prediction method according to an embodiment of the present disclosure;

[0050] Figure 2 Flowchart of the molecular property prediction method according to an embodiment of the present disclosure;

[0051] Figure 3 For Figure 2 Flowchart of step 210 of splitting each first molecule into at least one pair of molecular fragments in the method according to an embodiment of the present disclosure;

[0052] Figure 4 For Figure 3 Schematic diagram of splitting the first molecule into at least one pair of molecular fragments in the method according to an embodiment of the present disclosure;

[0053] Figure 5 For Figure 2 Flowchart of step 230 of 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 in the method according to an embodiment of the present disclosure;

[0054] Figure 6 For Figure 5 Flowchart of step 510 of determining the reconstructed molecular representation of each training molecule according to the fragment molecular representation of each training molecule in the method according to an embodiment of the present disclosure;

[0055] Figure 7 For Figure 5 Flowchart of step 520 of determining the contrast loss value in the method according to an embodiment of the present disclosure;

[0056] Figure 8 For Figure 2 Flowchart of step 240 of optimizing the parameters of the molecular encoder according to the contrast loss value in the method according to an embodiment of the present disclosure;

[0057] Figure 9 Flowchart of training the molecular property prediction model provided by an example of the present disclosure;

[0058] Figure 10 Module diagram of the molecular property prediction device according to an embodiment of the present disclosure;

[0059] Figure 11 Terminal structure diagram of the molecular property prediction method according to an embodiment of the present disclosure Figure 2 ​

[0060] Figure 12 is according to an embodiment of the present disclosure Figure 2 a server structure diagram of the molecular property prediction method shown. DETAILED DESCRIPTION

[0061] In order to make the purposes, technical methods and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and do not limit the present disclosure.

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

[0063] In the description of the embodiments of the present disclosure, unless otherwise explicitly limited, the words such as arrangement, installation, connection and the like should be broadly understood, and those skilled in the art can reasonably determine the specific meaning of the above words in the embodiments of the present disclosure in combination with the specific content of the technical solutions. In the embodiments of the present disclosure, the words "further", "exemplary" or "optionally" are used to represent as an example, illustration or description, and should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. The use of "further", "exemplary" or "optionally" is intended to present the relevant concept in a specific manner.

[0064] Before the embodiments of the present disclosure are further described in detail, the terms and terms involved in the embodiments of the present disclosure are explained, and the terms and terms involved in the embodiments of the present disclosure are applicable to the following explanations:

[0065] Breakable Rigid Inorganic Core Structure (BRICS): An algorithm for molecular disassembly and synthesis that enables the decomposition and reassembly of molecules by recognizing specific chemical environments within the molecule. 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 a bond can be synthesized and provides a synthesis function. In addition, BRICS can also generate unique fragments of a single molecule, and also supports the generation of unique fragments of a collection of a series of molecules.

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

[0067] In related technologies, with the rapid development of artificial intelligence (AI) technology, AI has shown great potential in the field of science, especially in computational chemistry and materials science. AI for Science (AI4S) technology efficiently handles complex tasks through data-driven methods, with 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 particularly effective in handling 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. Existing molecular property prediction techniques mostly rely on the characterization of the whole molecule, ignoring the internal fragments and their combination methods. Although some pre-training models have used unlabeled data for representation learning, there are still the following problems:

[0069] Problem one: Difficulty in capturing the complex relationship between molecular fragments: Existing models mainly focus on the representation of the whole molecule, and do not fully utilize the detailed information of the internal fragments and their combination relationships, resulting in limited performance of the model in handling complex molecular structures.

[0070] Problem two: Inadequate use of unlabeled data: Many pre-training methods only encode the whole molecule, failing to effectively utilize the internal substructure and 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 internal substructure information of the molecule to improve the accuracy and generalization ability of the prediction. This limits the performance of the model in scenarios where data is scarce or molecular structure is complex. How to improve the accuracy of molecular property prediction is a pressing problem

[0072] Based on this, the embodiment of the disclosure provides a molecular property prediction method, related device and medium, by splitting each first molecule in the unlabeled molecular dataset 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 completing the optimization of the molecular encoder, a molecular property prediction model is constructed through the target molecular encoder, the multilayer perceptron, and the soft maximization layer. At this time, the molecular property prediction model is trained using the labeled molecular dataset to obtain the target molecular property prediction model, so as to accurately predict the molecular properties of the target molecule. Compared with the prior art in which only the labeled dataset is used to train the prediction model, the first molecule of the unlabeled molecular dataset is used for splitting and reconstruction in the present disclosure to obtain the training sample composed of the first molecule and the second molecule, and the molecular encoder is pre-trained through the training sample, which can fully utilize the substructure information inside the molecule to improve the prediction accuracy and generalization ability, so as to optimize the molecular representation ability of the molecular encoder, so that the target molecular encoder can better understand the combination relationship between the molecular fragments. Finally, the molecular prediction model constructed based on the molecular encoder that has completed the optimization can improve the representation quality and prediction accuracy of the complex molecular structure.

[0073] System architecture and scenario description to which the embodiment of the disclosure is applied

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

[0075] The server 110 refers to a computer system that can provide the object terminal 130 with molecular property prediction services, molecular encoder optimization services, and molecular property prediction model training services. Compared with the object terminal 130, the server 110 has higher requirements in stability, security, performance, etc. The server 110 can also be a database that can provide the object terminal 130 with data acquisition services. The server 110 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part (such as a virtual machine) of a high-performance computer, a combination of parts (such as virtual machines) of multiple high-performance computers, etc. The server 110 can 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 used to display the results of molecular property prediction, model training / optimization, etc., for the object to view, or to provide the object with an interface for performing tasks such as molecular property prediction, molecular encoder optimization, and uploading and configuring prediction model training-related information. The object can input the dataset for molecular property prediction and model training and / or various task information into the object terminal 130. The object terminal 130 can take various forms, including desktop computers, laptops, PDAs (personal digital assistants), mobile phones, dedicated terminals, and graphics tablets. Furthermore, it can be a single device or a collection of multiple devices. For example, multiple devices can be connected via a local area network, sharing a single display device to work collaboratively, forming a single terminal. The terminal can also communicate with the server 110 via wired or wireless means, or via the Internet 120, to exchange data.

[0077] General Description of Embodiments in this Disclosure

[0078] It should be noted that the embodiments of this disclosure can be applied to scenarios such as drug discovery, materials science, and molecular virtual screening. In related technologies, existing molecular property prediction methods typically rely on large amounts of labeled data and struggle to fully utilize substructure information within molecules to improve prediction accuracy and generalization ability, resulting in low accuracy of the final molecular property prediction. Some embodiments of this disclosure provide a molecular property prediction method, related apparatus, and medium, aiming to improve the accuracy of molecular property prediction.

[0079] The molecular property prediction method involves splitting and recombining molecules in an unlabeled molecular dataset to obtain new molecules, using these new molecules as training samples to optimize the molecular encoder, and then using a labeled molecular dataset to train a molecular property prediction model based on the optimized molecular encoder, thereby achieving accurate prediction of molecular properties.

[0080] The molecular property prediction method of this disclosure can be executed on a server, on a terminal, or partially on a server and partially on a terminal.

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

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

[0083] Step 220, 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 each training molecule, wherein the first molecule and the second molecule are both training molecules;

[0084] Step 230, determining a 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 an optimization end condition is reached, to obtain a target molecular encoder after optimization;

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

[0087] Step 260, training the molecular property prediction model according to the labeled molecular dataset to obtain a trained target molecular property prediction model;

[0088] Step 270, calling the target molecular property prediction model to predict the target molecule to obtain the target molecular property.

[0089] The steps 210 to 270 are briefly described as follows.

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

[0091] The first molecule is a molecule in the unlabeled molecular dataset. The molecular fragment refers to two molecular fragments obtained by splitting the first molecule. The first molecule can be split into two molecular fragments by cutting a certain synthetic bond of the first molecule, i.e., a pair of molecular fragments. It should be noted that each splitting of the first molecule is cutting a synthetic bond 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 splitting a different synthetic bond, to obtain multiple pairs of different molecular fragments, each pair of molecular fragments being able to form a complete first molecule.

[0092] The second molecule refers to a new molecule that meets the physical and chemical rules, which is obtained by randomly combining two molecular fragments from the set of molecular fragments obtained by splitting each first molecule.

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

[0094] The complete molecular representation refers to the molecular representation of a complete training molecule, representing the structure, composition, properties, and other characteristics of the complete molecule. The fragment molecular representation refers to the molecular representation of the molecular fragments that make up the training molecule, representing the structure, composition, properties, and other characteristics of the molecular fragments.

[0095] In step 230, the embodiments of the present disclosure train the molecular encoder through contrastive learning. The contrastive loss value refers to the loss value calculated based on the loss function of contrastive learning in the contrastive learning process. Contrastive learning is a self-supervised learning method that aims to learn the feature representation of data by comparing the similarity between samples.

[0096] In step 240, the optimization end condition refers to a condition for indicating that the optimization of the molecular encoder has reached the expected target. Illustratively, the optimization end condition can be that the contrastive loss value is less than a preset threshold value; or the optimization end condition can be that the number of iterations of the iterative optimization of the molecular encoder reaches a preset number of steps. The target molecular encoder refers to a molecular encoder that has completed optimization and has a desired level of performance.

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

[0098] The molecular property prediction model is formed by connecting the target molecular encoder with an initialized MLP layer and a Softmax layer, and is a model for predicting molecular properties.

[0099] In step 260, the labeled molecular dataset is a dataset containing molecular structures and their related labels.

[0100] Illustratively, the training process of the molecular property prediction model is as follows: the prepared labeled molecular dataset is used 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 its performance in predicting molecular properties. The training adopts a supervised learning method, and through the definition of a loss function (such as mean square error) and an optimizer, the model parameters are continuously optimized using the backpropagation algorithm. During the training process, the performance of the molecular property prediction model is regularly evaluated, and indicators such as IoU, precision, etc. are used to measure the performance of the model. According to the evaluation results, the learning rate, optimizer or other hyperparameters may need to be adjusted to further improve the performance of the model.

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

[0102] The above embodiments of steps 210 to 270 split each first molecule in the unlabeled molecule dataset into multiple molecular fragments, and reconstruct multiple new second molecules as part of the training sample by randomly recombining the molecular fragments. The first molecule is divided into multiple molecular fragments according to the synthetic bond, 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 learning ability of the model for complex structural relationships between molecular fragments is enhanced.

[0103] The molecular encoder is optimized using the first molecules and the second molecules. After the optimization of the molecular encoder, the molecular property prediction model is constructed by the target molecular encoder, the multilayer perceptron, and the soft-max layer. At this time, the molecular property prediction model is trained using the labeled molecule dataset to obtain the target molecular property prediction model, so as to accurately predict the molecular property of the target molecule. Compared with the prior art in which only the labeled dataset is used to train the prediction model, the present disclosure first splits and reconstructs the first molecules in the unlabeled molecule dataset to obtain the training sample composed of the first molecules and the second molecules, and pre-trains the molecular encoder by using the training sample, so as to fully utilize the substructure information inside the molecule to improve the prediction accuracy and the generalization ability, to optimize the molecular representation ability of the molecular encoder, so that the target molecular 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 representation quality and the prediction accuracy of the complex molecular structure.

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

[0105] In an embodiment, with reference to Figure 3 , step 210 includes:

[0106] Step 310, retrieving the synthetic bond of each first molecule;

[0107] Step 320, for each first molecule, randomly selecting a synthetic bond to divide the first molecule into two molecular fragments;

[0108] Or,

[0109] Step 330, for each first molecule, dividing the first molecule multiple times according to each synthetic bond of the first molecule to obtain multiple pairs of different molecular fragments.

[0110] In the embodiment, the synthesizable bond refers to a chemical bond capable of binding atoms in a molecule together. By retrieving the synthesizable bonds of a molecule, the molecule can be split into two molecular fragments by cutting the synthesizable bonds.

[0111] Exemplarily, as shown in Figure 4 , it is assumed that a first molecule is A1-B1-C1, where 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 is used to retrieve that the first molecule has the synthesizable bond 1 and the synthesizable bond 2.

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

[0114] If the splitting mode corresponding to step 330 (mode 2 in the figure) is referred to, the first molecule is split according to the synthesizable bond 1 to obtain the molecular fragments A1 and B1-C1, and the first molecule is split according to the synthesizable bond 2 to obtain the 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 provides a set of molecular fragments for subsequent cross combination to form a plurality of new second molecules by splitting each first molecule according to the synthesizable bonds to obtain a plurality of molecular fragments. By the splitting mode of the first molecule provided in the embodiment, more molecular fragments can be obtained, thereby improving the number and probability of recombining into new second molecules, further improving the number of samples, and enabling the subsequent optimization of the molecular encoder to better learn the structural relationship between the molecular fragments.

[0116] In an embodiment, referring to Figure 5 , step 230 includes:

[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, determining a comparison 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 a feature of the entire 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 entire 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 taken as positive pairs, and the complete molecular representation of the training molecule and the complete molecular representation of other training molecules in the same batch are taken as negative pairs, and the molecular encoder is optimized by contrast learning.

[0121] In the embodiments provided by 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 the reconstructed molecular representation and the complete molecular representation, so as to optimize the molecular encoder by the contrast loss value. By combining the combination of each molecular fragment representation as the overall representation of the corresponding molecule with the overall representation of the corresponding molecule generated by the molecular encoder for contrast learning, it can be ensured that the generated molecular representation more accurately reflects the physical characteristics of the molecule and its molecular fragments, and the rationality and precision of the molecular representation are optimized.

[0122] In an embodiment, referring to Figure 6 , step 510 comprises:

[0123] Step 610, for each training molecule, the ratio of the fragment molecular weight of each molecular fragment contained in the training molecule to the complete molecular weight of the training molecule is determined respectively;

[0124] Step 620, according to the ratio corresponding to each molecular fragment, the weight of each molecular fragment is set;

[0125] Step 630, 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.

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

[0127]

[0128] wherein 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 feature 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 by steps 610 and 620, the molar mass is introduced as a weighting factor in the characterization of the training molecules and their molecular fragments, and the characterization of the training molecules is decomposed into the combination of the characterizations of the molecular fragments by weighted calculation. Thus, the generated molecular characterization more accurately reflects the physical characteristics of the molecules and their molecular fragments, and the rationality and accuracy of the molecular characterization are optimized.

[0130] In an embodiment, the reference value is calculated by the following steps: Figure 7 The contrast loss value is obtained by the following steps:

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

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

[0133] Step 730, calculating 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 the present embodiment, the first similarity refers to the cosine similarity between the complete molecular characterization of the current training molecule and its reconstructed molecular characterization. The second similarity refers to the cosine similarity between the complete molecular characterization of the current training molecule and the complete molecular characterization of each of the other training molecules except the current training molecule. For example, assuming that there are 5 training molecules in the current batch, then the second similarity between the current training molecule and the other four training molecules is 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] wherein, represents the contrast loss value of the i-th training molecule, represents the complete molecular characterization of the k-th 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 the positive pair, 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 the negative pair, and the contrast loss value of the current training molecule is calculated, so that the contrast loss value takes into account the characteristics of the molecule and its molecular fragments, and the optimized molecular encoder generates a molecular representation that more accurately reflects the physical characteristics of the molecule and its molecular fragments, and optimizes the rationality and accuracy of the molecular representation.

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

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

[0141] Step 820, the parameters are updated and optimized according to the gradient and the learning rate.

[0142] In the present embodiment, the learning rate is a hyperparameter that is preset to determine the speed and direction of updating the parameters in the optimization process of the molecular encoder. Illustratively, the learning rate can be set based on expert experience, or adjusted and set based on the change of the contrast loss value, or adjusted and set according to the change of the gradient.

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

[0144]

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

[0146] In the above embodiment, the contrast loss value calculated based on the complete molecular representation and the reconstructed molecular representation of the training molecule is used to optimize the parameters of the molecular encoder, which enhances the learning ability of the optimized molecular encoder for the complex structure relationship between the molecular fragments and improves the accuracy of the molecular representation generated by the model.

[0147] In an embodiment, step 240 comprises:

[0148] The parameters of the molecular encoder are optimized according to the contrast loss value, and the optimization step number is increased by one;

[0149] In the case where the optimization step number is greater than the preset value, it is determined that the optimization of the molecular encoder is completed;

[0150] In a case where the optimization step number is less than or equal to the preset value, jumping to calling the preset molecular encoder to extract a complete molecular representation of each training molecule and a fragment molecular representation of a molecular fragment contained in each training molecule.

[0151] In the embodiment, the optimization step number refers to the number of iterations of optimization of the molecular encoder. The preset value refers to the preset number of iterations of optimization 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 iteration of model parameter update are performed.

[0152] The optimization step number greater than the preset value indicates that the current molecular encoder has reached the expected optimization result, and thus the current molecular encoder is taken as the target molecular encoder of optimization completion.

[0153] The optimization step number not exceeding the preset value indicates that the current molecular encoder has not reached the expected optimization result, and thus the next round of iteration of optimization of the parameters of the molecular encoder needs to be performed. In the embodiment, the embodiments or combinations provided in the above steps 510 and 520, the above steps 610 to 630, the above steps 710 to 730, the above steps 810 and 820, etc. can be used to optimize the molecular encoder.

[0154] The molecular property prediction method of the present disclosure is described in detail below through an example. It can be understood that the following embodiments are only used to better illustrate the molecular property prediction method of the present disclosure and are not specifically limited.

[0155] For example, referring to Figure 9 , the training process of the molecular property prediction model of the present disclosure is as follows:

[0156] Step S001: initializing a data set. A large amount of unlabeled molecular data is collected from public databases and experimental data to form a data set D, and BRICS is used to retrieve a synthesizable bond for each molecule (a first molecule) in the data set D, and a synthesizable bond is randomly selected to split the molecule to generate two molecular fragments.

[0157] Step S002: generating new molecular data and constructing a pre-training data set. The multiple molecular fragments obtained by splitting each molecule in step S001 are collected to obtain a molecular fragment set. The molecular fragments in the molecular fragment set are randomly combined in pairs, and if two fragments from different molecules can be combined and generate a new molecule that meets the physical and chemical rules, the new molecule (a second molecule) obtained by recombination is incorporated into the data set D. Finally, the pre-training data set is D={S0,S1,…,S max_num} and S i represent the i-th sample (training molecule), and max_num represents the total number of samples contained in D, wherein Si ={Mol, Mol1, Mol2}, Mol, Mol1, Mol2 represent the complete molecule and its corresponding molecular fragments, respectively.

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

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

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

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

[0162]

[0163] wherein represent the molar mass of the i-th training molecule and its corresponding molecular fragment, respectively, τ is the temperature coefficient, N is the number of samples in a batch, represents the complete molecule representation of the k-th training molecule except the i-th training molecule, exp() is the exponential function, and sim() is the cosine similarity function. The calculated contrastive loss value is Then, the gradients of the parameters of the molecular encoder M are calculated according to the contrastive 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 step number epoch_max. If epoch_now is less than epoch_max, jump to S005; otherwise, jump to S008.

[0166] Step S008: Train the pre-trained molecular property prediction model using the labeled molecular dataset to obtain the final target molecular property prediction model, which can batch predict molecular properties. The pre-trained molecular property prediction model refers to the molecular property prediction model after optimizing the molecular encoder in the molecular property prediction model.

[0167] The above example divides each molecule into multiple molecular fragments according to the breakable bond by the BRICS method, and cross-combines these fragments to generate new molecules. By recombining molecular fragments to generate new molecules, the training sample is enriched, and the learning ability of the model for the complex relationship between molecular fragments is improved. Also, the molar mass is introduced as a weighting factor between the molecular and molecular fragment representations. Through the weighted calculation of the weight, the representation of the molecule can be decomposed into the combination of the fragment representations. Thus, it ensures that the generated molecular representation more accurately reflects the physical properties of the molecule and its fragments, optimizing the rationality and accuracy of the representation.

[0168] Device and equipment description of the embodiments of the present disclosure

[0169] It can be understood that although each step in each of the above flowcharts is displayed in sequence according to the arrow representation, these steps are not necessarily executed in sequence according to the arrow representation. Unless otherwise stated in this embodiment, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, at least part of the steps in the above flowcharts can include multiple steps or multiple stages, which 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 sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.

[0170] Figure 10 The structure diagram of the molecular property prediction device provided by the embodiments of the present disclosure is shown. The molecular property prediction device 1000 includes:

[0171] The molecular splitting unit 1010 is configured to split each first molecule in the unlabeled molecular dataset into at least one pair of molecular fragments, and recombine the multiple molecular fragments obtained by splitting two by two to obtain multiple second molecules, wherein the second molecules are different from the first molecules.

[0172] The molecular encoding unit 1020 is configured to 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, by taking the first molecule and the second molecule as training molecules.

[0173] The loss determination unit 1030 is configured to determine a contrast loss value corresponding to each training molecule according to the complete molecular representation and the fragment molecular representation of the training molecule.

[0174] The encoding optimization unit 1040 is configured to optimize parameters of the molecular encoder according to the contrast loss value until an optimization end condition is reached, to obtain a target molecular encoder after optimization.

[0175] The model construction unit 1050 is configured to construct a molecular property prediction model according to the target molecular encoder, the multi-layer perceptron and the soft-max layer.

[0176] The model training unit 1060 is configured to train the molecular property prediction model according to the labeled molecular dataset, to obtain a trained target molecular property prediction model.

[0177] The molecular prediction unit 1070 is configured to call the target molecular property prediction model to predict a target molecule, to obtain a target molecular property.

[0178] Optionally, the molecular splitting unit 1010 is specifically configured to:

[0179] retrieve a synthesizable bond of each first molecule;

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

[0181] or,

[0182] for each first molecule, split the first molecule according to each synthesizable bond of the first molecule to obtain a plurality of pairs of different molecular fragments.

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

[0184] determine a reconstructed molecular representation of each training molecule according to the fragment molecular representation of the training molecule;

[0185] determine a contrast loss value corresponding to each training molecule according to the complete molecular representation and the reconstructed molecular representation of the training molecule.

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

[0187] for each training molecule, determine a ratio of a fragment molar mass of each molecular fragment contained in the training molecule to a complete molar mass of the training molecule.

[0188] According to the ratio corresponding to each molecular fragment, the weight of each molecular fragment is 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] The first similarity between the complete molecular representation and the reconstructed molecular representation of the current training molecule is calculated;

[0192] The second similarity between the complete molecular representation of the current training molecule and each other training molecule except the current training molecule is calculated;

[0193] 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, the contrast loss value of the current training molecule is calculated.

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

[0195] According to the contrast loss value and the preset learning rate, the gradient of each parameter of the molecular encoder is calculated;

[0196] According to the gradient and the learning rate, the parameter is updated and optimized.

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

[0198] According to the contrast loss value, the parameters of the molecular encoder are optimized, and the optimization step number is increased by one;

[0199] In the case where the optimization step number is greater than the preset value, it is determined that the molecular encoder optimization is completed;

[0200] In the case where the optimization step number is less than or equal to the preset value, it is jumped to calling the preset molecular encoder to extract the complete molecular representation of each training molecule and the fragment molecular representation of the molecular fragment contained in each training molecule.

[0201] Reference Figure 11 , Figure 11 To realize the structure block diagram of the terminal of the molecular property prediction method of the embodiment of the present disclosure, the terminal 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, etc. Those skilled in the art can understand that,Figure 11 The terminal structure shown does not constitute a limitation on the mobile phone or computer, and can include more or fewer components than shown, or combine certain components, or different component arrangements.

[0202] The RF circuit 1110 can be used for receiving and sending signals in the process of information or call, in particular, receiving the downlink information of the base station and processing by the processor 1180; in addition, sending the uplink data to the base station.

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

[0204] The input unit 1130 can 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 can include a touch panel 1131 and other input devices 1132.

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

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

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

[0208] The terminal of the embodiment of the present disclosure includes but is not limited to a mobile phone, a computer, etc. The embodiment of the present disclosure can be applied to various scenarios, including but not limited to drug discovery, material science, molecular virtual screening, etc.

[0209] Figure 12A structure block diagram of a server for implementing a part of the molecular property prediction method of the embodiments of the present disclosure. The server can vary greatly due to configuration or performance, and can include one or more central processing units (CPUs) 1222 (e.g., one or more processors) and a memory 1232, one or more storage media 1230 (e.g., one or more mass storage devices) storing applications 1242 or data 1244. Among them, the memory 1232 and the storage medium 1230 can be temporary storage or persistent storage. The programs stored in the storage medium 1230 can include one or more modules (not shown in the figure), each of which can include a series of instruction operations in the server. Further, the central processing unit 1222 can be configured to communicate with the storage medium 1230 and execute a series of instruction operations in the storage medium 1230 on the server.

[0210] The server can also include one or more power supplies 1226, one or more wired or wireless network interfaces 1250, one or more input / 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 processing unit 1222 in the server can be used to execute the molecular property prediction method of the embodiments of the present disclosure.

[0212] The embodiments of the present disclosure also provide a computer-readable storage medium for storing program code for executing the molecular property prediction method of each of the above embodiments.

[0213] The embodiments of the present disclosure also provide a computer program product including a computer program. The processor of the computer device reads and executes the computer program, so that the computer device executes the molecular property prediction method as described above.

[0214] The terms "first", "second", "third", "fourth", and the like in the description of the disclosure and the above drawings, if any, are used to distinguish similar objects, and do not have to be used to describe a particular order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the disclosure described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "contain" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device containing a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units 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" refers to one or more, and "multiple" refers to two or more. "And / or" is used to describe the relationship between the associated content, which means that there can be three relationships, for example, "A and / or B" can represent three cases: 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 represents an "or" relationship between the associated content. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and 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 two or more, greater than, less than, more than, etc. are not included in the number, above, below, etc. are understood to include the number.

[0217] In several embodiments provided by the present disclosure, it should be understood that the disclosed system, device and method 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, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed mutual ones can be 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 separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0219] In addition, each functional unit in various embodiments of the present disclosure can be integrated into one processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0220] If the integrated unit is realized 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 such understanding, the technical solutions of the present disclosure essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present disclosure. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

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

[0222] The above is a specific description of the embodiments of the present disclosure, but the present disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present disclosure, and these equivalent modifications or replacements 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 includes: Each first molecule in the unlabeled molecular dataset is split into at least one pair of molecular fragments. The multiple molecular fragments obtained from the splitting are then recombined in pairs to obtain multiple second molecules, wherein the second molecules are different from the first molecules. Both the first molecule and the second molecule are used as training molecules. A preset molecular encoder is called to extract the complete molecular characterization of each training molecule and the fragment molecular characterization of the molecular fragments contained in each training molecule. Based on the fragment molecular characterization of each training molecule, determine the reconstructed molecular characterization of each training molecule; Based on the complete molecular representation and the reconstructed molecular representation of each training molecule, a contrastive loss value corresponding to each training molecule is determined; wherein, the contrastive loss value is obtained through 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; calculating the contrastive loss value of the current training molecule based on the exponent of the ratio of the first similarity to a preset temperature coefficient, and the exponent of the ratio of each second similarity to the temperature coefficient; The parameters of the molecular encoder are optimized based on the contrast loss value until the optimization termination condition is met, thus obtaining the target molecular encoder that has been optimized. A molecular property prediction model is constructed based on the target molecule encoder, multilayer perceptron, and soft maximization layer. The molecular property prediction model is trained based on the labeled molecular dataset to obtain the trained target molecular property prediction model. The target molecule property prediction model is invoked to predict the target molecule and obtain its properties.

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 includes: Retrieve the synthetic bonds of each of the first molecule; For each of the first molecule, a synthetic bond is randomly selected to divide the first molecule into two molecular fragments; or, For each of the first molecule, the first molecule is divided multiple times according to each of the synthetic bonds of the first molecule to obtain multiple pairs of different molecular fragments.

3. The method according to claim 1, characterized in that, The step of determining the reconstructed molecular representation of each training molecule based on the fragmented molecular representation of each training molecule includes: For each training molecule, the ratio of the fragment molar mass of each molecular fragment contained in the training molecule to the whole molar mass of the training molecule is determined. The weight of each molecular fragment is set according to the ratio corresponding to each molecular fragment; The reconstructed molecular characterization of the training molecule is obtained by weighted summation based on the fragment molecular characterization of each molecular fragment and the weight of each molecular fragment.

4. The method according to any one of claims 1 to 3, characterized in that, The optimization of the parameters of the molecular encoder based on the contrast loss value includes: The gradients of each parameter of the molecular encoder are calculated based on the contrast loss value and the preset learning rate. The parameters are updated and optimized based on the gradient and the learning rate.

5. The method according to claim 4, characterized in that, The step of optimizing the parameters of the molecular encoder based on the contrast loss value until the optimization termination condition is met, to obtain the optimized target molecular encoder, includes: The parameters of the molecular encoder are optimized based on the contrast loss value, and the optimization step number is incremented by one. If the number of optimization steps is greater than a preset value, the molecular encoder optimization is determined to be complete. If 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 characterization of each training molecule and the fragment molecular characterization of the molecular fragments contained in each training molecule.

6. A molecular property prediction device, characterized in that, include: A molecular splitting unit is used to split each first molecule in the unlabeled molecular dataset into at least one pair of molecular fragments, and to recombine the multiple molecular fragments obtained by splitting into pairs to obtain multiple second molecules, wherein the second molecules are different from the first molecules; The molecular encoding unit is used to take both the first molecule and the second molecule as training molecules, and call a preset molecular encoder to extract the complete molecular characterization of each training molecule and the fragment molecular characterization of the molecular fragments contained in each training molecule. A loss determination unit is configured to determine a reconstructed molecular representation of each training molecule based on the fragmented molecular representation of each training molecule; and to determine a contrastive loss value corresponding to each training molecule based on the complete molecular representation and the reconstructed molecular representation of each training molecule; wherein the contrastive loss value is obtained through 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; and calculating the contrastive loss value of the current training molecule based on the exponent of the ratio of the first similarity to a preset temperature coefficient and the exponent of the ratio of each second similarity to the temperature coefficient. The encoding optimization unit is used to optimize the parameters of the molecular encoder based on the contrast loss value until the optimization termination condition is met, so as to obtain the target molecular encoder that has been optimized. The model building unit is used to build a molecular property prediction model based on the target molecule encoder, multilayer perceptron, and soft maximization layer. The model training unit is used to train the molecular property prediction model based on the labeled molecular dataset to obtain the trained target molecular property prediction model. The molecular prediction unit is used to call the target molecule property prediction model to predict the target molecule and obtain the target molecule properties.

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

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that implement the molecular property prediction method as described in any one of claims 1 to 5.

9. 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 the 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, causing the computer device to perform the molecular property prediction method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

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

    CN117059199A