Training method and device of molecular property prediction model, electronic equipment and medium
By performing phased training on the molecular property prediction model, including masking of non-geometric information and noise processing of geometric information, the problem of low accuracy of molecular property prediction is solved, the recognition and prediction ability of the model is improved, and training resources are saved.
Patent Information
- Application Number
- CN202411555132.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-25
AI Technical Summary
The prior art is difficult to effectively improve the accuracy of molecular properties prediction, especially when there is a lack of molecular data to be predicted.
By masking the non-geometric information of the sample molecules and noise processing, a pre-trained data set is formed and a phased training process is carried out to improve the accuracy of the molecular properties prediction model.
The molecular property prediction model has enhanced the recognition and prediction ability of geometric information and non-geometric information of atoms in the molecule, improved the accuracy of molecular property prediction, and saved training time and computing resources.
Smart Images

Figure CN119517216A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to artificial intelligence technology, and in particular to a training method, device, electronic device and medium for a molecular property prediction model. Background Art
[0002] The molecular property prediction task uses computer models and algorithms to predict the various physical and chemical properties and biological activities of molecules. Molecular properties may include water solubility, lipophilicity, toxicity, biological activity, and pharmacokinetic characteristics of molecules. In actual application, the molecular data to be predicted may be missing, and the molecular property prediction function of training molecular property models alone cannot cover the above situation, which leads to inaccurate prediction results.
[0003] In the related technology, there is currently no better way to improve the accuracy of molecular property prediction. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and medium for training a molecular property prediction model, which can improve the accuracy of molecular property prediction by the molecular property prediction model through a staged training process.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application embodiment provides a method for training a molecular property prediction model, the method comprising:
[0007] Performing mask processing on the first non-geometric information of at least one atom of the sample molecule to obtain second non-geometric information;
[0008] Performing noise processing on the first geometric information of at least one atom of the sample molecule to obtain second geometric information;
[0009] Combining the first non-geometric information of the atom that has not been subjected to the mask processing, the second non-geometric information, the first geometric information of the atom that has not been subjected to the noise adding processing, and the second geometric information into a pre-training data set;
[0010] Based on the pre-training data set, calling the molecular property prediction model to perform a first training task to obtain the trained molecular property prediction model;
[0011] Based on the original data set of the sample molecules, a second training task of molecular property prediction processing is performed on the trained molecular property prediction model to obtain a trained molecular property prediction model.
[0012] The present application embodiment provides a training device for a molecular property prediction model, comprising:
[0013] A sample acquisition module, used for performing mask processing on first non-geometric information of at least one atom of a sample molecule to obtain second non-geometric information;
[0014] The sample acquisition module is further used to perform noise processing on the first geometric information of at least one atom of the sample molecule to obtain second geometric information;
[0015] The sample acquisition module is further used to combine the first non-geometric information of the atom that has not been subjected to the mask processing, the second non-geometric information, the first geometric information of the atom that has not been subjected to the noise addition processing, and the second geometric information into a pre-training data set;
[0016] A first training module, used to call the molecular property prediction model to perform a first training task based on the pre-training data set to obtain the trained molecular property prediction model;
[0017] The second training module is used to perform a second training task of molecular property prediction processing on the trained molecular property prediction model based on the original data set of the sample molecules to obtain a trained molecular property prediction model.
[0018] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0019] A memory for storing computer executable instructions or computer programs;
[0020] The processor is used to implement the training method of the molecular property prediction model provided in the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.
[0021] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program, which is used to implement the training method of the molecular property prediction model provided in the embodiment of the present application when executed by a processor.
[0022] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the training method of the molecular property prediction model provided in the embodiment of the present application is implemented.
[0023] The embodiments of the present application have the following beneficial effects:
[0024] The non-geometric information of the sample molecules is masked, the geometric information of the sample molecules is denoised, and the samples are combined into a pre-training data set, which increases the degree of replication of the sample data. Based on the processed sample data, the actual data can be predicted, so that in the process of executing the first training task, the molecular property prediction model can enhance its recognition and prediction capabilities for the geometric information and non-geometric information of the atoms in the molecule. On this basis, the training task of performing molecular property prediction processing on the parameters of the pre-trained molecular property prediction model can improve the accuracy of the molecular property prediction model in predicting molecular properties. At the same time, since the molecular property prediction model after the first training task has learned the basic knowledge of the geometric information and non-geometric information of the atoms in the molecule, when the second training task specifically trains the molecular property prediction function, the convergence speed of the molecular property prediction model is accelerated, thereby saving training time and the computing resources required for training. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 Schematic diagram of the application mode of the training method of the molecular property prediction model provided in the embodiment of the present application;
[0026] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0027] Figure 3A It is a first flow chart of the method for training a molecular property prediction model provided in an embodiment of the present application;
[0028] Figure 3B is a second flow chart of the method for training a molecular property prediction model provided in an embodiment of the present application;
[0029] Figure 3C 3 is a schematic diagram of a third process of the method for training a molecular property prediction model provided in an embodiment of the present application;
[0030] Figure 3D 4 is a schematic diagram of a fourth process flow of a method for training a molecular property prediction model provided in an embodiment of the present application;
[0031] Figure 4A is a schematic diagram of a molecular structure diagram provided in an embodiment of the present application;
[0032] Figure 4B It is a schematic diagram of the principle of processing molecular data provided by an embodiment of the present application;
[0033] Figure 5 is a fifth flow chart of the method for training a molecular property prediction model provided in an embodiment of the present application;
[0034] Fig. 6A It is a schematic diagram of the principle of molecular property prediction provided in the embodiments of the present application;
[0035] Figure 6B Schematic diagram of the principle of training a molecular property prediction model provided in an embodiment of the present application;
[0036] Figure 6C It is a schematic diagram of the principle of applying the molecular property prediction model provided in the embodiments of the present application.
[0037] Figure 7 It is a schematic diagram of the structure of the molecular property prediction model provided in the embodiments of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0039] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0040] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0041] It should be pointed out that the relevant data collection and processing in this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained, and subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0042] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0044] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0045] 1) Graph Neural Network (GNN): A type of deep learning model for processing graph structured data. Graph neural networks learn node representation and graph representation by performing message passing and aggregation on the nodes and edges of the graph. Graph neural networks have a wide range of applications in social network analysis, knowledge graphs, molecular biology and other fields. In a graph neural network, the graph is represented as G = (V, E), where V represents the node set and E represents the edge set. Given a node feature matrix X, the goal of the graph neural network is to learn a function f that maps the node feature matrix to the node representation matrix H, that is, H = f(X).
[0046] 2) Molecule: It is the smallest unit in a substance that can exist independently, is relatively stable, and maintains the physical and chemical properties of the substance. Molecules are composed of atoms, which are combined into molecules in a certain order and arrangement through certain forces.
[0047] 3) Chemical bond: It is a general term for the strong interaction between two or more adjacent atoms (or ions) in a pure molecule or crystal. The force that binds ions or atoms together is generally called a chemical bond. Types of chemical bonds include: ionic bonds, covalent bonds, and metallic bonds.
[0048] 4) Molecular structure diagram: A graphical representation method for representing the connection mode and spatial arrangement between atoms in a molecule. It graphically shows how the atoms inside a molecule are connected together by chemical bonds, and the relative positions of these atoms in space. In the embodiments of the present application, the edges in the molecular structure diagram are used to represent the chemical bonds between atoms, and the nodes in the molecular structure diagram are atoms.
[0049] 5) Molecular formula: It is a graphical representation method that uses chemical symbols and line segments to represent the connection between atoms in a molecule. The molecular formula reveals the arrangement of atoms in a molecule and the chemical bonds between them. Specifically, the molecular formula shows how atoms are connected to each other through single bonds, double bonds, or triple bonds, and their relative positions in space.
[0050] 6) Equivariant Map: A mapping that is commutative with group actions. Given a mapping X→Y, where X and Y are the input vector space and the output vector space respectively. If for the group G, we have Then the mapping It is group G equivariant.
[0051] 7) Multilayer Perceptron (MLP): A feedforward neural network that usually consists of an input layer, one or more hidden layers, and an output layer, hereinafter referred to as MLP. Each layer contains multiple neurons, and neurons in adjacent layers are connected by weights. MLP is a supervised learning model widely used in classification and regression problems.
[0052] 8) Equivariant Graph Neural Network: Equivariant Graph Neural Network satisfies equivariance based on the message passing framework of graph neural network. Equivariant Graph Neural Network contains several layers of equivariant message passing layers. In equivariant graph neural network, each equivariant message passing layer is used not only to update the features of nodes, but also to maintain the structural invariance of the graph. This is usually achieved by introducing specific orthogonal transformations or equivariant mappings to ensure that the structural properties of the graph (such as rings, trees, etc.) are maintained after the transformation.
[0053] 9) Molecular properties: refers to the chemical and physical characteristics determined by the inherent properties of the molecule itself. These properties usually include the size, shape, composition, structure, chemical reactivity, stability, kinetic behavior, and intermolecular interactions of the molecule. Macroscopic molecular properties, such as solubility, boiling point, melting point, acidity and alkalinity, optical activity, magnetism, toxicity, affinity, etc.
[0054] 10) Atom: It is the smallest particle that cannot be divided in chemical reactions. The type of atom varies according to the number of protons and neutrons: the number of protons determines which element the atom belongs to, while the number of neutrons determines which isotope of the element the atom is. Atoms make up molecules and molecules make up substances. In substances, charges of the same kind repel each other, and charges of different kinds attract each other.
[0055] 11) Masking: usually refers to the process of selectively shielding or ignoring certain information when processing data. The key to masking is to selectively modify data to achieve specific purposes or meet specific requirements. This processing method is widely used in many fields, such as data preprocessing, feature extraction, privacy protection, and signal enhancement. In the embodiment of the present application, the atomic types in the molecule are masked by masking to improve the effect of training the molecular property prediction model.
[0056] 12) Noise processing: It is a data preprocessing technique, commonly used in machine learning and data analysis to improve the generalization ability and robustness of the model. The core idea is to artificially introduce a certain amount of random noise into the coordinate data to simulate the uncertainty of data in the real world. The noise type can be Gaussian noise, salt and pepper noise, etc., or more complex physics-based perturbations. The size and type of noise can be adjusted according to the specific task and data.
[0057] 13) Pre-training: A common method in deep learning that involves training a model on a large-scale unlabeled dataset to learn common features or patterns of the data. The main purpose of pre-training is to use unlabeled data to improve the performance of the model, especially when labeled data is scarce. The process of pre-training a model usually consists of two stages: a pre-training stage and a fine-tuning stage. In the pre-training stage, the model is trained on a large-scale unlabeled dataset to learn the underlying structure and features of the data. This process usually involves unsupervised learning or self-supervised learning tasks such as predicting the next word, predicting missing words, predicting future frames, etc.
[0058] The embodiments of the present application provide a training method for a molecular property prediction model, a training device for a molecular property prediction model, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the accuracy of molecular property prediction by the molecular property prediction model through a staged training process.
[0059] The following describes an exemplary application of the electronic device provided in the embodiments of the present application. The electronic device provided in the embodiments of the present application can be implemented as a terminal device, such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a smart TV, a vehicle terminal, a virtual reality (VR) device, an augmented reality (AR) device, and other types of terminals, and can also be implemented as a server. The following describes an exemplary application when the electronic device is implemented as a terminal device or a server.
[0060] refer to Figure 1 , Figure 1 Schematic diagram of the application mode of the training method of the molecular property prediction model provided in the embodiment of the present application; for example, Figure 1 The server 200, network 300, terminal device 400 and database 500 are involved. The terminal device 400 is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two.
[0061] For example, the terminal device 400 may be a terminal device used by a user, such as a computer or a mobile phone; the user may be a technician, the server 200 may be a server of a molecular property analysis platform, and the database 500 may be a molecular database storing a large amount of molecular-related data.
[0062] For example, the user sends a training request through the terminal device 400, and sends the training request to the server 200 through the network 300. The server 200 extracts a large number of sample molecular structure diagrams from the database 500 according to the detection request, calls the training method of the molecular property prediction model provided in the embodiment of the present application, trains the initialized molecular property prediction model, and obtains a trained molecular property prediction model. The trained molecular property prediction model can be stored in the server 200.
[0063] The user sends the molecular data to be processed through the terminal device 400. The molecular data to be processed can be represented in the form of a molecular structure diagram. Each node in the molecular structure diagram is an atom, and each atom is associated with corresponding geometric information and non-geometric information. The molecular data to be processed is uploaded to the server 200 through the network 300. The server 200 calls the trained molecular property prediction model based on the molecular data to be processed to predict the molecular properties of the molecules corresponding to the molecular data to be processed. The server 200 sends the predicted molecular properties to the terminal device 400, so that the user can determine the molecular properties corresponding to the molecular data to be processed and further study the substances associated with the molecular structure diagram.
[0064] In some embodiments, the training method of the molecular property prediction model of the embodiment of the present application can also be applied in the following application scenarios:
[0065] 1. Drug discovery and design: Based on the training method of the molecular property prediction model provided in the embodiment of the present application, the molecular property prediction model is trained, and based on the trained molecular property prediction model, the molecular properties such as the biological activity and toxicity of the compound are predicted to screen out potential therapeutic drugs. The molecular property prediction model can help scientists evaluate the biological activity, toxicity, solubility, metabolic stability and other properties of candidate drug molecules, thereby screening out more potential candidate drugs at an early stage and accelerating the drug development process. Alternatively, for existing drugs, the structural optimization of drug molecules is guided by predicting molecular properties to improve efficacy and reduce side effects.
[0066] 2. Chemistry and materials science: Based on the training method of the molecular property prediction model provided in the embodiments of the present application, the molecular property prediction model is trained, and based on the trained molecular property prediction model, the physical and chemical properties of the molecules of new materials, such as conductivity, thermal stability, optical properties, etc., are predicted. Based on the predicted molecular properties, it is helpful to design new electronic components, catalysts, energy storage materials, etc.
[0067] 3. Food science: Based on the training method of the molecular property prediction model provided in the embodiments of the present application, the molecular property prediction model is trained, and based on the trained molecular property prediction model, the molecular properties of the compound molecules in the food are predicted to determine whether there are harmful substances in the food, such as toxins, pesticide residues, etc., to ensure food safety.
[0068] 4. Agriculture: Based on the training method of the molecular property prediction model provided in the embodiments of the present application, the molecular property prediction model is trained, and based on the trained molecular property prediction model, the properties of the molecules in the pesticide are predicted. In the research and development of pesticides, the molecular property prediction model can predict the activity, residue and environmental behavior of the pesticide, which is of great significance for the development of environmentally friendly pesticides.
[0069] 5. Environmental science: Based on the training method of the molecular property prediction model provided in the embodiments of the present application, the molecular property prediction model is trained, and based on the trained molecular property prediction model, the molecular properties of the molecules in the water and air collected in the environment are determined to determine whether there are pollutants in the environment based on the molecular properties.
[0070] The embodiments of the present application can be implemented through database technology. In short, a database can be regarded as an electronic file cabinet where electronic files are stored. Users can add, query, update, delete, etc. data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application program.
[0071] A database management system (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, retrieval, security, and backup. Database management systems can be classified according to the database model they support, such as relational, XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters, mobile phones; or according to the query language used, such as Structured Query Language (SQL), XQuery; or according to performance focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages at the same time.
[0072] In some embodiments, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The electronic device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal device and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0073] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be Figure 1 Server 200 in Figure 2 The server 200 shown includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the server 200 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .
[0074] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0075] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0076] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0077] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0078] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0079] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB), etc.;
[0080] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The training device 455 of the molecular property prediction model stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, including the following software modules: a sample acquisition module device, a first training module 4552 and a second training module 4553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.
[0081] The training method of the molecular property prediction model provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the terminal device provided in the embodiment of the present application.
[0082] The following describes the training method of the molecular property prediction model provided in the embodiment of the present application. As mentioned above, the electronic device for implementing the training method of the molecular property prediction model in the embodiment of the present application can be a terminal device or a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.
[0083] It should be noted that in the example of molecular property prediction processing performed by the training method of the molecular property prediction model below, organic molecules are used as an example. Based on the understanding of the following text, those skilled in the art can apply the training method of the molecular property prediction model provided in the embodiment of the present application to the processing of other types of molecules, for example: molecular property prediction for molecules of multiple components in proteins, and molecular property prediction for molecules of metal materials.
[0084] See also Figure 3A , Figure 3A is a flow chart of the training method of the molecular property prediction model provided in the embodiment of the present application, which will be combined with Figure 3AThe steps shown are explained. Figure 3A The execution entity of the step is Figure 1 Server 200 in.
[0085] In step 301, mask processing is performed on first non-geometric information of at least one atom of a sample molecule to obtain second non-geometric information.
[0086] For ease of understanding, the application scenario of the training method of the molecular property prediction model provided in the embodiment of the present application is explained. The data representation of the sample molecule is a molecular structure diagram, in which each node represents an atom, and the edges between the nodes are chemical bonds between atoms. Each atom in the molecular structure diagram carries geometric information and non-geometric information. The geometric information of the molecule mainly refers to the spatial structure of the arrangement of atoms inside the molecule, which determines the shape and spatial orientation of the molecule. The non-geometric information of the molecule covers other properties of the molecule except the spatial structure, which are usually related to the chemical and physical properties of the molecule. The geometric information corresponding to the atoms in the molecule refers to the spatial arrangement of the atoms and the relative position relationship between the atoms, including: atomic coordinates, chemical bond length, chemical bond angle; the non-geometric information of the atom does not directly describe the spatial structure of the molecule, but is information related to the chemical and physical properties of the molecule. The non-geometric information of the atom includes: atomic charge, atomic type, chemical bond type of the atom, and atomic hybridization state.
[0087] For example, mask processing is a process of replacing original data with a mask. In an embodiment of the present application, mask processing for non-geometric information can be implemented in the following way: replacing the original type of processing with a preconfigured type.
[0088] In some embodiments, reference Figure 3B , Figure 3B is a second flow chart of the method for training a molecular property prediction model provided in an embodiment of the present application; step 301 can be performed by Figure 3B Steps 3011 to 3012 are implemented as described in detail below.
[0089] In step 3011, each atom in the sample molecule is traversed, and the following processing is performed on the traversed atoms: the traversed atoms are selected based on a first preconfigured probability.
[0090] For example, a random selection is performed for each traversed atom based on a first preconfigured probability, and the first preconfigured probability can be set according to the requirements of an actual application scenario.
[0091] In some embodiments, the selection of traversed atoms based on the first preconfigured probability can be achieved in the following way: generate random probabilities for the traversed atoms to obtain a first probability; when the first probability is less than the first preconfigured probability, determine that the atom is selected as the first target atom; when the first probability is greater than or equal to the first preconfigured probability, determine that the atom is not selected.
[0092] For example, during the random probability generation process, the generated probability ranges from 0 to 1. If the first probability is less than the value of the first preconfigured probability, the current atom is used as the first target atom. Conversely, if the first probability is greater than or equal to the value of the first preconfigured probability, mask processing is not performed on the current atom.
[0093] In some embodiments, the first preconfigured probability can be replaced with a first preconfigured value, and a random number generation process is performed for a preset numerical interval to obtain a first random number. When the first random number is less than the first preconfigured value, it is determined that the atom is selected as the first target atom; when the first random number is greater than or equal to the first preconfigured value, it is determined that the atom is not selected. For example: the numerical interval is set to 0 to 100, the first preconfigured value is 20, and a random number generation process is performed for the traversed atom. The random number obtained is 15, which is less than the first preconfigured value 20, and the traversed atom is used as the first target atom.
[0094] In step 3012, in response to the atom being selected as the first target atom, the first atom type in the first non-geometric information of the first target atom is masked to a preconfigured type to obtain second non-geometric information of the first target atom.
[0095] For example, in response to the atom not being selected as the first target atom, the first non-geometric information of the atom is maintained. In response to the atom being selected as the first target atom, the first atom type of the first target atom is masked to a preconfigured type, and the masking method is to replace the label of the atom type in the data corresponding to the first target atom with the label of the preconfigured type. The label of the preconfigured type can be set to 1 or 0. That is, the label of the atom type in the first non-geometric information is replaced with 0 to form the second non-geometric information.
[0096] In an embodiment of the present application, the atomic type of the atom is masked in a random manner. By masking the atom type, the molecular property prediction model is forced to learn to rely on other contextual information to predict the masked part, which helps the model capture more generalized patterns in molecules, thereby improving the generalization ability of the model on unseen data. Masking of atom types can be used as part of unsupervised learning, where the model does not need to rely on labeled data, but learns directly from the intrinsic structure of the data itself, and the absence of labeled data saves the computing resources required for training. By randomly selecting masked atoms to use different masking patterns, the diversity of training data is actually increased, which helps the model see more diverse molecular representations.
[0097] Continue to refer Figure 3A In step 302, first geometric information of at least one atom of the sample molecule is subjected to noise processing to obtain second geometric information.
[0098] For example, as can be seen from the above, geometric information includes atomic coordinates, chemical bond lengths, chemical bond angles, etc. Noise processing is the process of adding noise data to the original data. In the embodiment of the present application, the noise processing for geometric information can be implemented in the following way: superimpose the original coordinates of the atom with the coordinates generated by calling the noise function to obtain the atomic coordinates after noise.
[0099] In some embodiments, reference Figure 3C , Figure 3C is a third flow chart of the method for training a molecular property prediction model provided in an embodiment of the present application; step 302 can be performed by Figure 3C Steps 3021 to 3022 are implemented as described in detail below.
[0100] In step 3021, each atom in the sample molecule is traversed, and the following processing is performed on the traversed atoms: the traversed atoms are selected based on the second preconfigured probability.
[0101] For example, a random selection is performed for each traversed atom based on a second preconfigured probability, and the second preconfigured probability can be set according to the requirements of an actual application scenario.
[0102] In some embodiments, the selection of traversed atoms based on a second preconfigured probability can be achieved in the following manner: random probability is generated for the traversed atoms to obtain a second probability; when the second probability is less than the second preconfigured probability, it is determined that the atom is selected as the second target atom; when the second probability is greater than or equal to the second preconfigured probability, it is determined that the atom is not selected.
[0103] For example, during the random probability generation process, the generated probability ranges from 0 to 1. If the second probability is less than the value of the second preconfigured probability, the current atom is used as the second target atom. Conversely, if the second probability is greater than or equal to the value of the second preconfigured probability, no noise processing is performed on the current atom.
[0104] In some embodiments, the second preconfigured probability can be replaced by a second preconfigured value, and a random number generation process is performed for a given preset numerical interval to obtain a second random number. When the second random number is less than the second preconfigured value, it is determined that the atom is selected as the second target atom; when the second random number is greater than or equal to the second preconfigured value, it is determined that the atom is not selected. For example: the numerical interval is set to 0 to 100, the second preconfigured value is 20, and a random number generation process is performed for the traversed atom. The random number obtained is 15, which is less than the second preconfigured value 20, and the traversed atom is used as the second target atom.
[0105] In step 3022 , in response to the atom being selected as the second target atom, preconfigured noise is added to the first coordinate in the first geometric information of the second target atom to obtain second geometric information of the second target atom.
[0106] For example, in response to the atom not being selected as the second target atom, the first geometric information of the atom is maintained. In response to the atom being selected as the second target atom, the first coordinate of the second target atom is superimposed with the preconfigured noise, and the preconfigured noise can be a Gaussian function. For example: Atom geometric information Represented as the three-dimensional coordinates of the atom, that is The coordinates of atom i Add Gaussian noise ∈ i ,Right now Gaussian noise is superimposed on the first coordinate in the first geometric information to form second geometric information.
[0107] In an embodiment of the present application, the coordinates of the atoms are denoised in a random manner, and the denoising process enables the molecular property prediction model to adapt to the random fluctuations in the input data, thereby being more robust when processing data in the real world, and reducing the prediction errors caused by small noises introduced during data acquisition or processing. By introducing noise, the molecular property prediction model is forced to learn more generalized features, rather than just memorizing the specific details in the training data, thereby improving the performance of the molecular property prediction model on new data. In addition, in actual application scenarios, the atomic coordinates in the molecules obtained experimentally may have certain errors, and the denoising process can simulate this experimental error to a certain extent, making the trained model closer to the actual experimental conditions.
[0108] Continue to refer Figure 3AIn step 303, the first geometric information, the first non-geometric information, the second non-geometric information of the atom that has not been subjected to mask processing, the first geometric information and the second geometric information of the atom that has not been subjected to noise processing are combined into a pre-training data set.
[0109] For example, the atom used to perform masking is used as the mask atom, and the atom used to perform noise addition is used as the noise addition atom; wherein the noise addition atom and the mask atom are the same atom, or the noise addition atom and the mask atom are different atoms. Then, step 303 can be interpreted as combining the first geometric information of atoms other than the noise addition atom, the second geometric information of the noise addition atom, the first non-geometric information of atoms other than the mask atom, and the second non-geometric information of the mask atom into a pre-training data set. For ease of understanding, refer to Figure 4A as well as Figure 4B , Figure 4A is a schematic diagram of the molecular structure diagram provided in the embodiment of the present application; the benzene ring molecular formula is (C 6 H 6 ), the molecular structure formula of the benzene ring is converted into a molecular structure diagram. Each node in the molecular structure diagram is an atom, and the edges between atoms represent chemical bonds. Figure 4B It is a schematic diagram of processing molecular data provided by an embodiment of the present application; an atomic node A is randomly selected from the benzene ring molecular structure diagram, the atomic type of the atomic node A is masked (atomic node A represents the masked atom), and the coordinates of the atomic node B are noised (atomic node B represents the noisy atom) to obtain a sample molecular structure diagram. The sample molecular structure diagram (that is, a molecular structure diagram in a pre-trained data set) can be used to pre-train a molecular property prediction model to obtain a pre-trained molecular property prediction model.
[0110] In step 304, based on the pre-training data set, the molecular property prediction model is called to perform a first training task to obtain a trained molecular property prediction model.
[0111] For example, the molecular property prediction model includes: a graph neural network, a first prediction module, a second prediction module and a molecular property prediction module, wherein the graph neural network is used to extract features from molecular data, and the molecular data includes geometric information and non-geometric information; the first prediction module is used to predict the first non-geometric information corresponding to the second non-geometric information, the second prediction module is used to predict the first geometric information corresponding to the second geometric information, and the molecular property prediction module is used to predict molecular properties. The first training task is to perform pre-training processing on the molecular property prediction model, which is used to train the molecular property prediction model's prediction function for geometric information and non-geometric information, and improve the model's robustness and generalization. The loss function of the first training task is the sum of the loss functions corresponding to the two prediction functions. For the prediction of geometric information, the loss function can be a cross entropy loss or an information entropy loss. For the prediction of non-geometric information, the loss function can be a regression loss.
[0112] For ease of understanding, the structural schematic diagram of the molecular prediction model provided in the embodiment of the present application is explained below in conjunction with the accompanying drawings. Figure 7 : is a schematic diagram of the structure of the molecular property prediction model provided in the embodiment of the present application. The graph neural network in the molecular property prediction model can be implemented as an equivariant graph neural network, the first prediction module is implemented as a type prediction module, which can be a convolutional neural network model for performing classification processing, and the second prediction module is implemented as a coordinate prediction module, which can be a recurrent neural network model for performing regression processing. The molecular property prediction module includes a pooling layer and a multilayer perceptron.
[0113] The molecular property prediction model 700 includes: an equivariant graph neural network 701, a molecular property detection module 702, a type prediction module 703, and a coordinate prediction module 704. The molecular property detection module 702 includes: a pooling layer 7021 and a property prediction multilayer perceptron 7022. The equivariant graph neural network 701 includes a plurality of message passing layers, for example: message passing layer 1 to message passing layer N, N is a positive integer, and the message passing layer includes a multilayer perceptron. The type prediction module 703 is used to determine the predicted coordinate information of the noisy atoms based on the output of the equivariant graph neural network 701, and the coordinate prediction module 704 is used to determine the predicted atomic type of the masked atoms based on the output of the equivariant graph neural network 701.
[0114] In some embodiments, reference Figure 3D , Figure 3D is a fourth flow chart of the method for training a molecular property prediction model provided in an embodiment of the present application; step 304 can be performed by Figure 3D Steps 3041 to 3044 are implemented as described in detail below.
[0115] In step 3041, based on each first non-geometric information and each second non-geometric information, the molecular property prediction model is called to perform atom type prediction processing, and a first cross entropy loss of the molecular property prediction model is determined based on the result of the atom type prediction processing.
[0116] For example, the atomic type prediction process includes: feature extraction process, and classification process based on the features extracted. Cross-Entropy Loss is a commonly used loss function in the field of machine learning and deep learning, which is suitable for classification problems. Its core purpose is to measure the difference between the probability distribution predicted by the model and the probability distribution of the true label.
[0117] In some embodiments, step 3041 can be implemented in the following manner: based on each first non-geometric information and each second non-geometric information, calling the molecular property prediction model to perform feature extraction processing to obtain a first geometric feature of the sample molecule; based on the first geometric feature, classifying the mask atoms in the sample molecule to obtain a predicted type of each mask atom, wherein the mask atom is an atom used to perform mask processing; based on the predicted type of the mask atom and the first atom type, determining the first cross entropy loss of the molecular property prediction model.
[0118] For example, the first geometric feature is extracted by the graph neural network mentioned above. In the equivariant graph neural network, the output of the previous layer is the input of the current layer. (where the superscript l represents the value after l layers of iterations), the geometric information of the current layer is calculated using the following formulas (2.1) to (2.4): and non-geometric information
[0119]
[0120] Among them, σ 1 ,σ 2 ,σ 3 is a multi-layer perceptron. ij It is the update value corresponding to the non-geometric information and geometric information between atoms i and j.
[0121] In some embodiments, the equivariant graph neural network can also introduce more complex update forms. For example, an attention mechanism can be introduced into the equivariant graph neural network, and the update formula of the equivariant graph neural network can be modified to the following formulas (3.1) to (3.6):
[0122]
[0123] Among them, α ij is the attention coefficient, WQ ,W K is a learnable weight matrix.
[0124] In some embodiments, the non-geometric representation of a given equivariant graph neural network output is Using multi-layer perceptron Mapping is performed and the atomic type prediction probability p is obtained through the normalization function (softmax) i , expressed as the following formula (4.1) and formula (4.2):
[0125]
[0126] Among them, s i ∈R C , C is the number of atomic species, (·) k represents the kth element of a vector, (p i ) k represents the probability that atom i is of type k. The atom type with the highest predicted probability is selected as the predicted atom type, and the cross entropy loss between the predicted type and the actual type is determined. The predicted probability p of the predicted atom type is i and the actual type of the label l i Calculate the first cross entropy loss L of the predicted mask atom type tp , expressed as the following formula (5.1):
[0127] L tp =-∑ i∈A ∑ k (l i ) k log(p i ) k (5.1)
[0128] Where A is the set of atoms whose types are masked, (·) k represents the kth element of the vector, l i is the one-hot encoding of the type of the atom before it is masked. For example, if the type of the atom before it is masked is c, then
[0129] In step 3042, based on each first geometric information and each second geometric information, the molecular property prediction model is called to perform atomic position prediction processing, and the first regression loss of the molecular property prediction model is determined based on the result of the atomic position prediction processing.
[0130] For example, the atom type prediction process includes: feature extraction process, and position regression process based on the features extracted. Regression loss is an indicator used to measure the difference between the predicted value of the regression model and the true value. In the regression task, the goal of the model is to predict a continuous value, rather than a discrete category label like in the classification task. Therefore, the regression loss function is used to evaluate the closeness between the value predicted by the model and the actual observed value.
[0131] In some embodiments, step 3042 can be implemented in the following manner: based on each first geometric information and each second geometric information, calling the molecular property prediction model to perform feature extraction processing to obtain a first non-geometric feature of the sample molecule; based on the first non-geometric feature, predicting the position of the noisy atoms in the sample molecule to obtain the predicted coordinates of each mask atom, wherein the noisy atoms are atoms used to perform the noisy processing; based on the predicted coordinates of the noisy atoms and the first coordinates, determining the first regression loss of the molecular property prediction model.
[0132] Example, based on the predicted coordinates obtained and the actual first coordinate label Calculate the regression loss L for coordinate prediction coo , represented by the following formula (5.2):
[0133]
[0134] In step 3043, a first total loss of the molecular property prediction model is determined based on the first cross entropy loss and the first regression loss.
[0135] For example, the first total loss can be the sum of the first cross entropy loss and the first regression loss. For example, the first total loss is represented by L pre =L tp +L coo . Alternatively, a weighted sum of the results.
[0136] In step 3044, based on the first total loss, the parameters of the molecular property prediction model are updated by back propagation to obtain a trained molecular property prediction model.
[0137] For example, the method of updating the parameters of each part of the molecular property prediction model can be back propagation processing, updating the parameters of each part of the molecular property prediction model to reduce the value of the first total loss, performing multiple update processes until the number of updates reaches the corresponding preconfigured number of iterations, and obtaining a molecular property prediction model that completes the training process of the first training task.
[0138] In the embodiment of the present application, masks and noise are added to the original data through a staged training method. The introduction of masks and noise can force the model to learn more robust and generalized features, rather than just memorizing the specific details in the training data. This helps the model perform better on new, unseen data. Masks and noise increase the diversity of the data, making it difficult for the model to achieve a perfect fit on the training data, thereby reducing the risk of overfitting.
[0139] Continue to refer Figure 3A In step 305, based on the original data set of the sample molecules, the trained molecular property prediction model is subjected to a second training task of molecular property prediction processing to obtain a trained molecular property prediction model.
[0140] For example, the second training task is used to train the molecular property prediction model to perform the molecular property prediction processing function, which belongs to the fine-tuning stage in the training process. Based on the pre-trained model, a small amount of task-specific data is used to further train the model to adapt to a specific task or field. The loss function used in the second training task can be a cross entropy loss, and the training method used is supervised training.
[0141] In some embodiments, the original data set includes sample molecule data and actual molecular properties of the sample molecules; step 305 can be implemented in the following manner: based on the sample molecule data, calling the trained molecular property prediction model for classification processing to obtain a first prediction probability of the sample molecule for different molecular properties; selecting the molecular property with the highest first prediction probability as the predicted molecular property of the sample molecule; determining a second cross-entropy loss of the molecular property prediction model based on the predicted molecular properties and the actual molecular properties; based on the second cross-entropy loss, updating the parameters of the molecular property prediction model through back propagation to obtain a trained molecular property prediction model.
[0142] For example, the classification processing is implemented through the graph neural network and property prediction module in the molecular property prediction model. The graph neural network is used to extract features of sample molecular data, and the pooling layer of the property prediction module is used to perform pooling processing on the feature extraction results. The multilayer perceptron of the property prediction module calls the normalization function based on the results of the pooling processing to predict the first prediction probability of the sample molecule for different molecular properties.
[0143] For example, taking non-geometric information as an example, assume that the non-geometric information of atom i output by the equivariant graph neural network is The pooling layer aggregates the non-geometric information of all atomic nodes in the sample molecular structure graph by summing up to obtain the global information h global , represented by the following formula (7.1):
[0144]
[0145] Where V is the node set of the molecular structure graph.
[0146] In some embodiments, the pooling layer can aggregate non-geometric information of points and edges at the same time, that is, the calculation formula of the pooling layer can be modified to the following formula (7.2):
[0147]
[0148] Based on the above global non-geometric information h global , calling the property detection multilayer perceptron, the calculation formula corresponding to the multilayer perceptron is as follows formula (8):
[0149]
[0150] Among them, based on the global non-geometric information h global , calling the multi-layer perceptron (MLP) to predict the predicted value of the molecular property, Act(·) is the activation function, are the weights (W) and biases (b) of the two linear layers of the multilayer perceptron, and y is the predicted value of the molecular property.
[0151] The second cross entropy loss L pred Can be characterized as Assuming that there are multiple samples, the total loss of the model can be the mean absolute error (MAE), which is expressed as the following formula (9):
[0152]
[0153] in, is the predicted value With the actual value y i The error between , n is a positive integer, n is the number of molecules used as samples. The molecular property prediction model is fine-tuned as a whole through the total loss.
[0154] In some embodiments, the original data set also includes sample molecule data, actual molecular properties of the sample molecules, and actual properties of atomic groups in the sample molecules; step 305 can be implemented in the following manner: based on the sample molecule data, calling the trained molecular property prediction model to perform feature extraction processing to obtain molecular features of the sample molecules; performing molecular property classification processing based on the molecular features to obtain predicted molecular properties of the sample molecules, and determining the second cross-entropy loss of the molecular property prediction model based on the predicted molecular properties and the actual molecular properties; performing property classification processing of atomic groups based on the molecular features to obtain predicted properties of atomic groups in the sample molecules, and determining the third cross-entropy loss of the molecular property prediction model based on the predicted properties and the actual properties of the atomic groups; determining the second total loss based on the second cross-entropy loss and the third cross-entropy loss; based on the second total loss, updating the parameters of the molecular property prediction model through back propagation to obtain a trained molecular property prediction model.
[0155] For example, an atomic group refers to a group of atoms in a molecule, which usually participates in the reaction as a whole in a chemical reaction. Atomic groups can be neutral or charged. The study of atomic groups is crucial to understanding the properties and reaction mechanisms of compounds. By identifying and modifying specific atomic groups, molecular properties can be determined. The method for determining the predicted properties of atomic groups can refer to the prediction processing of molecular properties mentioned above. The process includes: extracting features from atomic groups, calling a multilayer perceptron to predict the prediction probabilities for different properties based on the feature extraction results, and selecting the property corresponding to the highest prediction probability as the predicted property. The method for obtaining the cross entropy loss can refer to the above, and will not be repeated here. The second total loss can be the sum of the second cross entropy loss and the third cross entropy loss, or the weighted summation result.
[0156] In an embodiment of the present application, on the basis of the second cross entropy loss, the third cross entropy loss corresponding to the predicted properties of the atomic group is combined, and the properties at the molecular level and the atomic group level can be considered at the same time, so that the model can learn the characteristics of the molecule at different scales, which helps to understand the structure and properties of the molecule more comprehensively. The properties of the atomic group have a great influence on the overall properties of the molecule. Combining the loss at the group level can enhance the model's ability to recognize local features of the molecule, thereby improving the accuracy of predicting the overall molecular properties. By modeling the properties of the atomic group, the model can learn more generalized features, which may be consistent in different types of molecules, enhancing the generalization ability of the model on different molecular structures.
[0157] In some embodiments, based on the sample molecule data, calling the trained molecular property prediction model to perform feature extraction processing to obtain the molecular characteristics of the sample molecules can be achieved in the following way: based on the sample molecule data, calling the trained molecular property prediction model to perform multiple levels of feature extraction processing to obtain the feature information of each atom in the sample molecule, wherein the output of the feature extraction processing at each level is the input of the feature extraction processing at the next level; performing aggregation processing on the feature information of each atom to obtain the molecular characteristics of the sample molecules.
[0158] For example, the feature extraction processing of the trained molecular property prediction model is implemented by an equivariant graph neural network. The principle of the equivariant graph neural network is referred to above and will not be described in detail this time.
[0159] In some embodiments, after step 305, molecular property prediction processing can be performed in the following manner: feature extraction processing is performed on the molecular data of the molecule to be detected based on the trained molecular property prediction model to obtain the second geometric feature and the second non-geometric feature of the molecule to be detected; based on the second geometric feature and the second non-geometric feature, the molecule to be detected is classified to obtain the second prediction probability of the molecule to be detected for different molecular properties; at least one molecular property with the highest second prediction probability is selected as the target molecular property of the molecule to be detected, wherein the types of molecular properties include: physical properties and chemical properties.
[0160] For example, the principles of feature extraction and classification processing can be referred to above, and will not be repeated here. Physical properties include conductivity, thermal stability, and optical properties. Chemical properties include redox properties, acidity and alkalinity, toxicity, and biological activity. In actual application scenarios, the same molecule may have multiple different properties. The actual number of at least one molecular property finally selected is set according to the actual scenario.
[0161] In the embodiment of the present application, the non-geometric information of the sample molecules is masked, the geometric information of the sample molecules is noised, and combined into a pre-training data set, which increases the degree of replication of the sample data, and the processing of predicting the actual data can be performed based on the processed sample data, so that in the process of executing the first training task, the molecular property prediction model is enhanced. The recognition ability and prediction ability of the geometric information and non-geometric information of the atoms in the molecule. On this basis, the training task of performing molecular property prediction processing on the parameters of the pre-trained molecular property prediction model can improve the accuracy of the molecular property prediction model in predicting molecular properties. At the same time, since the molecular property prediction model after the first training task has learned the basic knowledge of the geometric information and non-geometric information of the atoms in the molecule, when the second training task specifically trains the molecular property prediction function, the convergence speed of the molecular property prediction model is accelerated, thereby saving training time and the computing resources required for training.
[0162] Below, an exemplary application of the training method of the molecular property prediction model of the embodiment of the present application in an actual application scenario will be described.
[0163] In the related art, the model used is pre-trained by processing the molecular property prediction, for example: masked coordinate prediction pre-training or coordinate denoising pre-training is performed on a large amount of unlabeled molecular data, and then fine-tuned on a small amount of data with molecular property labels and applied to the molecular property prediction task. The masked atom type prediction pre-training method first masks the atom type, and then uses the classification task of predicting the masked atom type as the pre-training task of the molecular model; the coordinate denoising pre-training method first adds noise to the atomic coordinates, and uses the regression task of predicting the atomic coordinate noise as the pre-training task of the molecular model. The masked atom type prediction pre-training method can only allow the model to learn the non-geometric properties of the molecule, and the coordinate denoising pre-training method can only allow the model to learn the geometric properties of the molecule. Both pre-training methods cannot allow the molecular model to learn both the geometric and non-geometric properties of the molecule, which limits the performance gain of pre-training on the molecular model.
[0164] An embodiment of the present application provides a training method for a molecular property prediction model, which combines masked atom type prediction and coordinate denoising joint pre-training, simultaneously performs atom type masking and coordinate noise addition operations on molecules, and uses atom type recovery and noise prediction as pre-training tasks, which enables the molecular model to learn the geometric and non-geometric properties of molecules at the same time, thereby improving the gain of pre-training on the generalization ability of the molecular model, and further improving the prediction accuracy of the model in downstream tasks of molecular property prediction.
[0165] The following is an explanation of the training method of the molecular property prediction model provided in the embodiment of the present application in conjunction with the accompanying drawings. Figure 5 , Figure 5 is a fifth flow chart of the method for training a molecular property prediction model provided in an embodiment of the present application; Figure 5 The executive body is Figure 1 Server 200 in.
[0166] In step 501, non-geometric feature information of the original molecular graph data is masked, and geometric information of the original molecular graph data is noised to obtain sample molecular graph data.
[0167] For example, molecular graph data is data represented as a molecular structure graph. To facilitate understanding, the molecular structure graph is explained. Molecules are composed of atoms and chemical bonds. Atoms can be regarded as nodes and chemical bonds as edges, thereby abstracting the graph structure of molecules. Figure 4A is a schematic diagram of the molecular structure diagram provided in the embodiment of the present application; the benzene ring molecular formula is (C 6 H6 ), the molecular structure of the benzene ring is converted into a molecular structure diagram. Each node in the molecular structure diagram is an atom, and the edges between atoms represent chemical bonds. i Both have geometric information and non-geometric information, each of which is defined as follows:
[0168] Non-geometric information of atoms h i : Some properties of the atom itself, such as the number of electric charges, the number of protons, the number of neutrons, etc. i ∈R d , where d is the characteristic dimension of the atom.
[0169] Atomic geometry information The three-dimensional coordinates of the atom, i.e.
[0170] Molecular representation M: A molecule is represented as a collection of atomic geometric information and non-geometric information, that is,
[0171] For example, the geometric information of a molecule mainly refers to the spatial structure of the arrangement of atoms within the molecule, which determines the shape and spatial orientation of the molecule. Specifically, it includes the following aspects: Molecular shape: determined by the bond angles and bond lengths between atoms in the molecule, which can be linear, triangular, tetrahedral, planar quadrilateral, etc. Molecular symmetry: The arrangement of atoms in a molecule may have different symmetry elements, such as rotation axis, reflection plane, inversion center, etc. Molecular configuration: In stereochemistry, molecular configuration refers to the specific arrangement of atoms in a molecule in space, which cannot be converted into each other through rotation operations between molecules.
[0172] The non-geometric information of molecules covers other properties of molecules besides their spatial structure. These properties are usually related to the chemical and physical properties of molecules, including: the mass and volume of molecules; molecular polarity: the uneven distribution of charge inside molecules, which causes molecules to have positive and negative poles. Intermolecular forces: the interaction forces between molecules, such as van der Waals forces, hydrogen bonds, ionic bonds, etc. Molecular motion: the movement of molecules in space, including translation, rotation and vibration. Chemical properties of molecules: the ability of molecules to participate in chemical reactions, including its reactivity, stability, etc. In chemical and physical research, these two properties are important foundations for understanding the properties of substances and reaction mechanisms. By studying the geometric properties of molecules, the physical and chemical properties of molecules can be predicted; while the non-geometric properties are directly related to the actual behavior and function of molecules.
[0173] In the embodiment of the present application, masking the non-geometric feature information of the original molecular graph data refers to masking the atomic type of the atoms in the molecule, and the masking method can be to set the atomic type to a preset atomic type. For example: masking the type of atom i, that is, treating the masked atomic type as an atomic type and using it to initialize the non-geometric representation h of atom i i .
[0174] Adding noise to the geometric information of the original molecular graph data means adding Gaussian noise to the coordinates of the geometric information of the atoms in the molecule. For example: Add Gaussian noise ∈ i ,Right now
[0175] Figure 4B It is a schematic diagram of processing molecular data provided by an embodiment of the present application; an atomic node A is randomly selected from the benzene ring molecular structure diagram, the atomic type of the atomic node A is masked, and the coordinates of the atomic node B are noised to obtain a sample molecular structure diagram. The sample molecular structure diagram can be used to pre-train a molecular property prediction model to obtain a pre-trained molecular property prediction model.
[0176] Input different molecules for masking and noise processing. The algorithm steps of the processing process are as follows:
[0177] (1) Input the characteristic information of the molecular structure graph: The point set of the given input molecular structure graph is V.
[0178] (2) Randomly select the atomic node to be masked: traverse each node i∈V in the point set, perform a random test with probability p, and determine whether to mask the type of atom i based on the result of the random test. That is, the masked atom type is also regarded as an atom type and used to initialize the non-geometric representation h of atom i. i .
[0179] (3) Randomly select the atomic node to be noised: traverse each node i∈V in the point set, perform a random test with probability p, and determine whether to add noise to the coordinates of atom i based on the results of the random test. Add Gaussian noise ∈ i ,Right now
[0180] (4) Output: Returns a molecular structure diagram that can be applied to the pre-training process.
[0181] In step 502, the molecular property prediction model is pre-trained as a whole based on the sample molecular graph data.
[0182] For example, the masked atom type prediction and coordinate denoising joint pre-training method can be combined with any molecular property prediction model. In the embodiment of the present application, the molecular property prediction model based on the equivariant graph neural network is used as an example for explanation. For ease of understanding, the structure of the molecular property prediction model provided in the embodiment of the present application is explained. Figure 7 It is a structural schematic diagram of the molecular property prediction model provided in an embodiment of the present application. The molecular property prediction model 700 includes: an equivariant graph neural network 701, a molecular property detection module 702, a type prediction module 703, and a coordinate prediction module 704. The molecular property detection module 702 includes: a pooling layer 7021 and a property prediction multilayer perceptron 7022. The equivariant graph neural network 701 includes a plurality of message passing layers, for example: message passing layer 1 to message passing layer N, N is a positive integer, and the message passing layer includes a multilayer perceptron. The type prediction module 703 is used to determine the predicted coordinate information of the noisy atoms based on the output of the equivariant graph neural network 701, and the coordinate prediction module 704 is used to determine the predicted atomic type of the masked atoms based on the output of the equivariant graph neural network 701.
[0183] Commonly used graph neural networks include graph convolutional networks (GCNs), graph attention networks (GATs), and graph isomorphism networks (GINs). The basic operation of graph neural networks is message passing, which can be expressed as the following formula (1):
[0184]
[0185] in, represents the representation of node v at layer l, is a nonlinear activation function, N(v) represents the set of neighbor nodes of node v, and M is a message function used to calculate the message between node u and node v.
[0186] In equivariant graph neural networks, the output of the previous layer is the input of the current layer. (where the superscript l represents the value after l layers of iterations), the geometric information of the current layer is calculated using the following formulas (2.1) to (2.4): and non-geometric information
[0187]
[0188] Among them, σ 1 ,σ 2 ,σ3 is a multi-layer perceptron. ij It is the update value corresponding to the non-geometric information and geometric information between atoms i and j.
[0189] In some embodiments, the equivariant graph neural network can also introduce more complex update forms. For example, an attention mechanism can be introduced into the equivariant graph neural network, and the update formula of the equivariant graph neural network can be modified to the following formulas (3.1) to (3.6):
[0190]
[0191]
[0192] Among them, α ij is the attention coefficient, W Q ,W K is a learnable weight matrix.
[0193] Based on the feature information of each atom output by the equivariant graph neural network (the first output feature information above), the type prediction module is used to predict the masked atom type, and the coordinate prediction module is used to predict the noisy atomic coordinates.
[0194] In some embodiments, the non-geometric representation of a given equivariant graph neural network output is First, we use a multi-layer perceptron Mapping is performed and the atomic type prediction probability p is obtained through the normalization function (softmax) i , expressed as the following formula (4.1) and formula (4.2):
[0195]
[0196] Among them, s i ∈R C , C is the number of atomic species, (·) k represents the kth element of a vector, (p i ) k represents the probability that atom i is of type k.
[0197] For example, the molecular graph after atom type masking and coordinate noise addition is input into the molecular model and the output p of the masked atom type prediction module is used i and the actual label l i Calculate the cross entropy loss L for the predicted mask atom type tp , expressed as the following formula (5.1):
[0198] L tp =-∑ i∈A ∑ k (l i) k log(p i ) k (5.1)
[0199] Where A is the set of atoms whose types are masked, (·) k represents the kth element of the vector, l i is the one-hot encoding of the type of the atom before it is masked. For example, if the type of the atom before it is masked is c, then
[0200] In some embodiments, the coordinate prediction module uses the geometric representation output by the equivariant graph neural network as the predicted value of the noisy coordinate. That is, the geometric representation of atom i output by the last level of the given equivariant graph neural network is The coordinate prediction value The calculation formula is as follows (4.3):
[0201]
[0202] For example, the molecular structure graph after noise processing is input into the molecular property prediction model and the output of the mask prediction module is used and the actual label Calculate the regression loss L for coordinate prediction coo , represented by the following formula (5.2):
[0203]
[0204] Using the regression loss L of coordinate prediction coo and the cross entropy loss L tp The molecular property prediction model is pre-trained as a whole. The total loss function is represented by L pre =L tp +L coo .
[0205] For example, using the total pre-training loss L pre The molecular property prediction model is pre-trained. The method of pre-training the molecular property prediction model can be a back propagation algorithm, which optimizes the weights by gradient descent to reduce the loss function. Back propagation is an algorithm for training neural networks. It updates the weights by calculating the gradient of the loss function with respect to the weights. In back propagation, forward propagation is first performed to calculate the output of each neuron, and then the loss value of the output layer is calculated. Then, the error is back propagated from the output layer to the input layer to update the weight of each neuron. Assume that the loss of the jth neuron in the l+1th layer is The derivative of the activation function is f′, then we have the following formula (6.1):
[0206]
[0207] in, is the target output of the jth neuron in the l+1th layer. Based on this, the loss of the i-th neuron in the lth layer is calculated, which is represented by formula (6.2):
[0208]
[0209] Finally, the weights are updated by the following formula (6.3)
[0210]
[0211] Where η is the learning rate.
[0212] In step 503, the pre-trained molecular property prediction model is fine-tuned based on the original molecular graph data to obtain a trained molecular property prediction model.
[0213] For example, after pre-training, the molecular property prediction model will obtain a pre-trained weight, which contains the common features and knowledge to distinguish different types of molecules. In the fine-tuning stage, these pre-trained weights will be used as the initial weights of the molecular property prediction model and trained on specific molecular property prediction tasks to adjust the model's weights to suit the molecular property prediction task.
[0214] Step 503 can be implemented in the following way: input the sample molecular structure graph into the pre-trained molecular property prediction model, and the equivariant graph neural network in the molecular property prediction model performs feature extraction processing on the sample molecular structure graph to obtain the first output feature information of each atom in the sample molecular structure graph. The output feature information of atom i is represented as The pooling layer in the molecular property prediction model aggregates the output feature information of each atom to obtain global feature information; based on the global feature information, the property prediction multi-layer perceptron in the molecular property prediction model is called to obtain predicted molecular properties, and the loss function is determined based on the predicted molecular properties and the actual molecular properties. The molecular property prediction model is back-propagated based on the loss function to obtain a trained molecular property prediction model.
[0215] refer to Figure 6B , Figure 6BIt is a schematic diagram of the principle of training a molecular property prediction model provided in an embodiment of the present application; the training samples include: sample geometric information and sample non-geometric information of molecules (taking benzene ring molecules as an example), and molecular property labels. The sample geometric information and sample non-geometric information are input into a molecular property prediction model pre-trained based on masked atom type prediction and coordinate denoising, and the molecular property prediction model pre-trained based on masked atom type prediction and coordinate denoising outputs predicted molecular properties, and the predicted molecular properties are compared with the actual molecular properties corresponding to the molecular property labels, the loss of the model to be trained is determined, and the pre-trained molecular property prediction model is fine-tuned based on the loss to obtain a trained molecular property prediction model.
[0216] For example, assume that the non-geometric information of atom i output by the equivariant graph neural network is The pooling layer aggregates the non-geometric information of all atomic nodes in the sample molecular structure graph by summing up to obtain the global non-geometric information h global (that is, the global feature information mentioned above), represented by the following formula (7.1):
[0217]
[0218] Where V is the node set of the molecular structure graph.
[0219] In some embodiments, the pooling layer can aggregate non-geometric information of points and edges at the same time, that is, the calculation formula of the pooling layer can be modified to the following formula (7.2):
[0220]
[0221] Based on the above global non-geometric information h global , calling the property detection multilayer perceptron, the calculation formula corresponding to the multilayer perceptron is as follows formula (8):
[0222]
[0223] Among them, based on the global non-geometric information h global , calling the multi-layer perceptron (MLP) to predict the predicted value of the molecular property, Act(·) is the activation function, are the weights (W) and biases (b) of the two linear layers of the multilayer perceptron, and y is the predicted value of the molecular property.
[0224] If there are multiple sample molecular structure graphs, then the sub-loss L corresponding to each sample molecular structure graph is pred Can be characterized as The total loss of the model can be the mean absolute error (MAE), which is expressed as the following formula (9):
[0225]
[0226] in, is the predicted value With the actual value y i The error between , n is a positive integer, n is the number of molecules used as samples. The molecular property prediction model is fine-tuned as a whole through the total loss.
[0227] In step 504, based on the molecular structure diagram to be processed, the trained molecular property prediction model is called to perform prediction to obtain predicted molecular properties.
[0228] For example, the molecular property prediction is defined as: given a large unlabeled molecular dataset {M i} and a small number of labeled molecular datasets {M i ,y i}(y i is the molecular property label), and complete the molecular property prediction task. The molecular property prediction task is to predict its properties given a molecular representation M. The prediction principle has been explained in step 503 and will not be repeated here. Fig. 6A , Fig. 6A It is a schematic diagram of the principle of molecular property prediction provided in the embodiment of the present application; molecular properties are predicted based on the geometric information and non-geometric information of the molecule (the benzene ring is used as an example in the embodiment of the present application).
[0229] refer to Figure 6C , Figure 6C The molecular structure diagram of the benzene ring molecule is input into the molecular property prediction model pre-trained based on masked atom type prediction and coordinate denoising, and the molecular property prediction model outputs the molecular properties predicted for the benzene ring molecule.
[0230] In some embodiments, if there are geometric representations of masked or missing atoms in the input molecular structure diagram, the model can call the mask prediction module to determine the predicted geometric information of the masked atoms, and predict the molecular properties based on the predicted geometric information and the actual characteristic information of unmasked atoms; if the molecular structure diagram input into the model is a complete molecular structure diagram and there is no masked or missing part, the mask prediction module branch of the model does not need to be used, and only the pooling layer and the property prediction multi-layer perceptron are used to predict the properties of the molecular structure diagram.
[0231] In the embodiments of the present application, the molecular property prediction model based on the joint pre-training of masked atom type prediction and coordinate denoising can be applied to molecular property prediction tasks; it is general and can be extended to other microstructures, such as proteins, RNA, etc.; it is versatile and can be applied in different scenarios, for example: in industrial application scenarios, drug discovery and material design can be promoted by predicting molecular properties.
[0232] The following further describes the exemplary structure of the training device 455 for the molecular property prediction model provided in the embodiment of the present application as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the training device 455 of the molecular property prediction model in the memory 450 may include:
[0233] The sample acquisition module 4551 is used to perform mask processing on the first non-geometric information of at least one atom of the sample molecule to obtain second non-geometric information; the sample acquisition module 4551 is also used to perform noise processing on the first geometric information of at least one atom of the sample molecule to obtain second geometric information; the sample acquisition module 4551 is also used to combine the first non-geometric information of the atom that has not been subjected to the mask processing, the second non-geometric information, the first geometric information of the atom that has not been subjected to the noise processing, and the second geometric information into a pre-training data set; the first training module 4552 is used to call the molecular property prediction model to perform a first training task based on the pre-training data set to obtain the trained molecular property prediction model; the second training module 4553 is used to perform a second training task of molecular property prediction processing on the trained molecular property prediction model based on the original data set of the sample molecule to obtain a trained molecular property prediction model.
[0234] In some embodiments, the sample acquisition module 4551 is used to traverse each of the atoms in the sample molecule and perform the following processing on the traversed atoms: select the traversed atoms based on a first preconfigured probability; in response to the atom being selected as the first target atom, mask the first atom type in the first non-geometric information of the first target atom to a preconfigured type, and obtain the second non-geometric information of the first target atom.
[0235] In some embodiments, the sample acquisition module 4551 is used to generate random probabilities for the traversed atoms to obtain a first probability; when the first probability is less than the first preconfigured probability, it is determined that the atom is selected as the first target atom; when the first probability is greater than or equal to the first preconfigured probability, it is determined that the atom is not selected.
[0236] In some embodiments, the sample acquisition module 4551 is used to traverse each of the atoms in the sample molecule and perform the following processing on the traversed atoms: select the traversed atoms based on a second preconfigured probability; in response to the atom being selected as the second target atom, add preconfigured noise to the first coordinate in the first geometric information of the second target atom to obtain the second geometric information of the second target atom.
[0237] In some embodiments, the sample acquisition module 4551 is used to generate random probabilities for the traversed atoms to obtain a second probability; when the second probability is less than the second preconfigured probability, it is determined that the atom is selected as the second target atom; when the second probability is greater than or equal to the second preconfigured probability, it is determined that the atom is not selected.
[0238] In some embodiments, the first training module 4552 is used to call the molecular property prediction model to perform atomic type prediction processing based on each of the first non-geometric information and each of the second non-geometric information, and determine the first cross entropy loss of the molecular property prediction model based on the result of the atomic type prediction processing; call the molecular property prediction model to perform atomic position prediction processing based on each of the first geometric information and each of the second geometric information, and determine the first regression loss of the molecular property prediction model based on the result of the atomic position prediction processing; determine the first total loss of the molecular property prediction model based on the first cross entropy loss and the first regression loss; based on the first total loss, update the parameters of the molecular property prediction model through back propagation to obtain the trained molecular property prediction model.
[0239] In some embodiments, the first training module 4552 is used to call the molecular property prediction model to perform feature extraction processing based on each of the first non-geometric information and each of the second non-geometric information to obtain a first geometric feature of the sample molecule; classify the mask atoms in the sample molecule based on the first geometric feature to obtain a predicted type of each of the mask atoms, wherein the mask atom is an atom used to perform the mask processing; and determine a first cross entropy loss of the molecular property prediction model based on the predicted type of the mask atom and the first atom type.
[0240] In some embodiments, the first training module 4552 is used to call the molecular property prediction model to perform feature extraction processing based on each of the first geometric information and each of the second geometric information to obtain a first non-geometric feature of the sample molecule; predict the position of the noisy atoms in the sample molecule based on the first non-geometric feature to obtain the predicted coordinates of each of the mask atoms, wherein the noisy atoms are atoms used to perform the noisy processing; and determine the first regression loss of the molecular property prediction model based on the predicted coordinates of the noisy atoms and the first coordinates.
[0241] In some embodiments, the sample acquisition module 4551 is used to use the atom used to perform the mask processing as the mask atom, and the atom used to perform the noise processing as the noise atom; wherein the noise atom and the mask atom are the same atom, or the noise atom and the mask atom are different atoms.
[0242] In some embodiments, the original data set includes sample molecule data and actual molecular properties of the sample molecules; the second training module 4553 is used to call the trained molecular property prediction model for classification processing based on the sample molecule data to obtain a first prediction probability of the sample molecule for different molecular properties; select the molecular property with the highest first prediction probability as the predicted molecular property of the sample molecule; determine the second cross entropy loss of the molecular property prediction model based on the predicted molecular property and the actual molecular property; based on the second cross entropy loss, update the parameters of the molecular property prediction model through back propagation to obtain the trained molecular property prediction model.
[0243] In some embodiments, the original data set also includes sample molecule data, actual molecular properties of the sample molecules, and actual properties of atomic groups in the sample molecules; the second training module 4553 is used to call the trained molecular property prediction model to perform feature extraction processing based on the sample molecule data to obtain molecular characteristics of the sample molecules; perform molecular property classification processing based on the molecular characteristics to obtain predicted molecular properties of the sample molecules, and determine the second cross-entropy loss of the molecular property prediction model based on the predicted molecular properties and the actual molecular properties; perform property classification processing of atomic groups based on the molecular characteristics to obtain predicted properties of atomic groups in the sample molecules, and determine the third cross-entropy loss of the molecular property prediction model based on the predicted properties of the atomic groups and the actual properties; determine the second total loss based on the second cross-entropy loss and the third cross-entropy loss; based on the second total loss, update the parameters of the molecular property prediction model through back propagation to obtain the trained molecular property prediction model.
[0244] In some embodiments, the second training module 4553 is used to call the trained molecular property prediction model to perform multiple levels of feature extraction processing based on the sample molecule data to obtain feature information of each atom in the sample molecule, wherein the output of the feature extraction processing at each level is the input of the feature extraction processing at the next level; and the feature information of each atom is aggregated to obtain the molecular characteristics of the sample molecule.
[0245] In some embodiments, the second training module 4553 is used to perform a second training task of performing molecular property prediction processing on the trained molecular property prediction model based on the original data set of the sample molecule, and after obtaining the trained molecular property prediction model, perform feature extraction processing on the molecular data of the molecule to be detected based on the trained molecular property prediction model to obtain the second geometric feature and the second non-geometric feature of the molecule to be detected; classify the molecule to be detected based on the second geometric feature and the second non-geometric feature to obtain the second prediction probability of the molecule to be detected for different molecular properties; select at least one molecular property with the highest second prediction probability as the target molecular property of the molecule to be detected, wherein the types of molecular properties include: physical properties and chemical properties.
[0246] In some embodiments, the molecular property prediction model includes: a graph neural network, a first prediction module, a second prediction module and a molecular property prediction module, wherein the graph neural network is used to extract features from molecular data, and the molecular data includes geometric information and non-geometric information; the first prediction module is used to predict first non-geometric information corresponding to the second non-geometric information, the second prediction module is used to predict first geometric information corresponding to the second geometric information, and the molecular property prediction module is used to predict molecular properties.
[0247] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer program or the computer executable instruction from the computer-readable storage medium, and the processor executes the computer program or the computer executable instruction, so that the electronic device executes the training method of the molecular property prediction model described in the embodiment of the present application.
[0248] The present application embodiment provides a computer-readable storage medium storing computer executable instructions, wherein the computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will be caused to execute the training method of the molecular property prediction model provided by the present application embodiment, for example, Figure 3A The training method of the molecular property prediction model is shown.
[0249] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0250] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0251] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0252] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0253] In summary, through the embodiment of the present application, the non-geometric information of the sample molecules is masked, the geometric information of the sample molecules is denoised, and combined into a pre-training data set, the degree of replication of the sample data is increased, and the processing of predicting the actual data can be performed based on the processed sample data, so that in the process of executing the first training task, the molecular property prediction model is enhanced. The recognition ability and prediction ability of the geometric information and non-geometric information of the atoms in the molecule. On this basis, the training task of performing molecular property prediction processing on the parameters of the pre-trained molecular property prediction model can improve the accuracy of the molecular property prediction model in predicting molecular properties. At the same time, since the molecular property prediction model after the first training task has learned the basic knowledge of the geometric information and non-geometric information of the atoms in the molecule, when the second training task specifically trains the molecular property prediction function, the convergence speed of the molecular property prediction model is accelerated, thereby saving training time and the computing resources required for training.
[0254] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A method for training a molecular property prediction model, characterized in that: The method comprises: Performing mask processing on the first non-geometric information of at least one atom of the sample molecule to obtain second non-geometric information; Performing noise processing on the first geometric information of at least one atom of the sample molecule to obtain second geometric information; Combining the first non-geometric information of the atom that has not been subjected to the mask processing, the second non-geometric information, the first geometric information of the atom that has not been subjected to the noise adding processing, and the second geometric information into a pre-training data set; Based on the pre-training data set, calling the molecular property prediction model to perform a first training task to obtain the trained molecular property prediction model; Based on the original data set of the sample molecules, a second training task of molecular property prediction processing is performed on the trained molecular property prediction model to obtain a trained molecular property prediction model.
2. The method according to claim 1, characterized in that The step of performing mask processing on the first non-geometric information of at least one atom of the sample molecule to obtain the second non-geometric information includes: Each atom in the sample molecule is traversed, and the following processing is performed on the traversed atom: Selecting the traversed atom based on a first preconfigured probability; In response to the atom being selected as the first target atom, the first atom type in the first non-geometric information of the first target atom is masked to a preconfigured type to obtain second non-geometric information of the first target atom.
3. The method according to claim 2, characterized in that The selecting operation on the traversed atoms based on the first preconfigured probability includes: Generating random probabilities for the traversed atoms to obtain a first probability; When the first probability is less than the first preconfigured probability, determining that the atom is selected as the first target atom; When the first probability is greater than or equal to the first preconfigured probability, it is determined that the atom is not selected.
4. The method according to claim 1, characterized in that: The step of performing noise processing on the first geometric information of at least one atom of the sample molecule to obtain second geometric information includes: Each atom in the sample molecule is traversed, and the following processing is performed on the traversed atom: Selecting the traversed atom based on a second preconfigured probability; In response to the atom being selected as the second target atom, preconfigured noise is added to the first coordinate in the first geometric information of the second target atom to obtain second geometric information of the second target atom.
5. The method according to claim 4, characterized in that The selecting the traversed atom based on the second preconfigured probability includes: Generating random probabilities for the traversed atoms to obtain a second probability; When the second probability is less than the second preconfigured probability, determining that the atom is selected as the second target atom; When the second probability is greater than or equal to the second preconfigured probability, it is determined that the atom is not selected.
6. The method according to claim 1, characterized in that The method of calling the molecular property prediction model to perform a first training task based on the pre-training data set to obtain the trained molecular property prediction model includes: Based on each of the first non-geometric information and each of the second non-geometric information, calling the molecular property prediction model to perform atom type prediction processing, and determining a first cross entropy loss of the molecular property prediction model based on a result of the atom type prediction processing; Based on each of the first geometric information and each of the second geometric information, calling the molecular property prediction model to perform atomic position prediction processing, and determining a first regression loss of the molecular property prediction model based on a result of the atomic position prediction processing; Determining a first total loss of the molecular property prediction model based on the first cross entropy loss and the first regression loss; Based on the first total loss, the parameters of the molecular property prediction model are updated through back propagation to obtain the trained molecular property prediction model.
7. The method according to claim 6, characterized in that The step of calling the molecular property prediction model to perform atom type prediction processing based on each of the first non-geometric information and each of the second non-geometric information, and determining a first cross entropy loss of the molecular property prediction model based on a result of the atom type prediction processing, includes: Based on each of the first non-geometric information and each of the second non-geometric information, calling the molecular property prediction model to perform feature extraction processing to obtain a first geometric feature of the sample molecule; Performing classification processing on mask atoms in the sample molecule based on the first geometric feature to obtain a predicted type of each mask atom, wherein the mask atom is an atom used to perform the mask processing; Based on the predicted type of the masked atom and the first atom type, a first cross entropy loss of the molecular property prediction model is determined.
8. The method according to claim 6, characterized in that The step of calling the molecular property prediction model to perform atomic position prediction processing based on each of the first geometric information and each of the second geometric information, and determining a first regression loss of the molecular property prediction model based on a result of the atomic position prediction processing, comprises: Based on each of the first geometric information and each of the second geometric information, calling the molecular property prediction model to perform feature extraction processing to obtain a first non-geometric feature of the sample molecule; Predicting the position of the noise-added atom in the sample molecule based on the first non-geometric feature to obtain the predicted coordinates of each of the mask atoms, wherein the noise-added atom is an atom used to perform the noise-adding process; Based on the predicted coordinates of the noisy atoms and the first coordinates, a first regression loss of the molecular property prediction model is determined.
9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: The atom used to perform the masking process is used as the mask atom, and the atom used to perform the noise adding process is used as the noise adding atom; wherein the noise adding atom and the mask atom are the same atom, or the noise adding atom and the mask atom are different atoms.
10. The method according to any one of claims 1 to 8, characterized in that: The original data set includes sample molecule data and actual molecular properties of the sample molecules; The second training task of performing molecular property prediction processing on the trained molecular property prediction model based on the original data set of the sample molecules to obtain a trained molecular property prediction model includes: Based on the sample molecule data, calling the trained molecular property prediction model to perform classification processing to obtain a first prediction probability of the sample molecule for different molecular properties; Selecting the molecular property with the highest first prediction probability as the predicted molecular property of the sample molecule; Determining a second cross entropy loss of the molecular property prediction model based on the predicted molecular property and the actual molecular property; Based on the second cross entropy loss, the parameters of the molecular property prediction model are updated through back propagation to obtain the trained molecular property prediction model.
11. The method according to any one of claims 1 to 8, characterized in that: The original data set also includes sample molecule data, actual molecular properties of the sample molecules, and actual properties of atomic groups in the sample molecules; The second training task of performing molecular property prediction processing on the trained molecular property prediction model based on the original data set of the sample molecules to obtain a trained molecular property prediction model includes: Based on the sample molecule data, calling the trained molecular property prediction model to perform feature extraction processing to obtain the molecular features of the sample molecule; Performing molecular property classification processing based on the molecular features to obtain predicted molecular properties of the sample molecules, and determining a second cross entropy loss of the molecular property prediction model based on the predicted molecular properties and the actual molecular properties; Performing property classification processing of atomic groups based on the molecular features to obtain predicted properties of atomic groups in the sample molecules, and determining a third cross entropy loss of the molecular property prediction model based on the predicted properties of the atomic groups and the actual properties; Determining a second total loss based on the second cross entropy loss and the third cross entropy loss; Based on the second total loss, the parameters of the molecular property prediction model are updated through back propagation to obtain the trained molecular property prediction model.
12. The method according to claim 11, characterized in that The step of calling the trained molecular property prediction model to perform feature extraction based on the sample molecular data to obtain the molecular features of the sample molecule includes: Based on the sample molecule data, calling the trained molecular property prediction model to perform multiple levels of feature extraction processing to obtain feature information of each atom in the sample molecule, wherein the output of the feature extraction processing at each level is the input of the feature extraction processing at the next level; The characteristic information of each atom is aggregated to obtain the molecular characteristics of the sample molecule.
13. The method according to any one of claims 1 to 8, characterized in that: After performing the second training task of molecular property prediction processing on the trained molecular property prediction model based on the original data set of the sample molecules to obtain a trained molecular property prediction model, the method further includes: Based on the trained molecular property prediction model, feature extraction processing is performed on the molecular data of the molecule to be detected to obtain a second geometric feature and a second non-geometric feature of the molecule to be detected; Classify the molecules to be detected based on the second geometric feature and the second non-geometric feature to obtain second predicted probabilities of the molecules to be detected for different molecular properties; At least one molecular property with the highest second prediction probability is selected as the target molecular property of the molecule to be detected, wherein the types of the molecular properties include: physical properties and chemical properties.
14. The method according to any one of claims 1 to 8, characterized in that: The molecular property prediction model includes: a graph neural network, a first prediction module, a second prediction module and a molecular property prediction module, wherein the graph neural network is used to extract features from molecular data, and the molecular data includes geometric information and non-geometric information; the first prediction module is used to predict the first non-geometric information corresponding to the second non-geometric information, the second prediction module is used to predict the first geometric information corresponding to the second geometric information, and the molecular property prediction module is used to predict molecular properties.
15. A training device for a molecular property prediction model, characterized in that: The device comprises: A sample acquisition module, used for performing mask processing on first non-geometric information of at least one atom of a sample molecule to obtain second non-geometric information; The sample acquisition module is further used to perform noise processing on the first geometric information of at least one atom of the sample molecule to obtain second geometric information; The sample acquisition module is further used to combine the first non-geometric information of the atom that has not been subjected to the mask processing, the second non-geometric information, the first geometric information of the atom that has not been subjected to the noise addition processing, and the second geometric information into a pre-training data set; A first training module, used to call the molecular property prediction model to perform a first training task based on the pre-training data set to obtain the trained molecular property prediction model; The second training module is used to perform a second training task of molecular property prediction processing on the trained molecular property prediction model based on the original data set of the sample molecules to obtain a trained molecular property prediction model.
16. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions or computer programs; A processor, for implementing the method for training a molecular property prediction model according to any one of claims 1 to 14 when executing computer executable instructions or computer programs stored in the memory.
17. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the training method of the molecular property prediction model according to any one of claims 1 to 14 is implemented.
18. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the training method of the molecular property prediction model according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Molecular state prediction method and device and storage medium
CN116959600A
Training method and device of molecular codec, equipment and storage medium
CN116959623A
Model training method and device, use method and device, equipment and storage medium
CN117219185A
Directed protein docking algorithm
US20030215877A1
Cited By
Crystal material property prediction system and method based on graph network and denoising pre-training
CN120340720A