Molecular property prediction method and device based on graph neural network and large language model
By combining graph neural networks and large language models, molecules are split into functional groups and descriptive text is generated to construct the final molecular structure diagram, which solves the problem of inaccurate molecular property prediction in existing technologies and achieves more efficient drug discovery.
Patent Information
- Application Number
- CN202511128917.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-08-13
AI Technical Summary
Existing drug discovery methods rely on experimental methods, which are time-consuming, labor-intensive and inefficient. Graph neural networks and large language models fail to effectively integrate functional group structure information and text information, resulting in inaccurate predictions of molecular properties.
Combining graph neural networks and large language models, the BRICS algorithm is used to split molecules into functional groups. A fine-tuned large language model is used to generate functional group description text, and information is extracted through a text encoder to construct the final molecular structure diagram. The message passing neural network is then used to predict molecular properties.
It improves the accuracy and efficiency of molecular property prediction, realizes the effective integration of functional group structure information and text information, and enhances the intelligent level of drug discovery.
Smart Images

Figure CN120636600A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing and drug discovery technology, and in particular to a molecular property prediction method and device based on graph neural networks and a large language model. Background Art
[0002] Natural language refers to the linguistic forms humans use to communicate and express their thoughts in daily life. Natural language processing (NLP) is a key research area at the intersection of computer science, artificial intelligence (AI), and linguistics. Its core goal is to enable computers to understand, analyze, and generate human language, thereby enabling efficient interaction between humans and machines. NLP research covers a wide range of tasks, including but not limited to text classification, sentiment analysis, machine translation, text generation, and question-answering systems. These tasks have important applications in information retrieval, intelligent customer service, medical diagnosis, financial analysis, and other fields.
[0003] Drug discovery refers to the systematic process of identifying and developing new drugs that can treat diseases or improve health outcomes through scientific methods. As a crucial component of modern medicine and biotechnology, drug discovery involves the intersection and integration of multiple disciplines, including chemistry, biology, pharmacology, and computer science. One of the core goals of this process is to identify new molecules with specific efficacy and safety profiles. Molecular properties, such as hydrophilicity, hydrophobicity, toxicity, and metabolic stability, directly determine drug safety and efficacy. Therefore, accurately predicting molecular properties is a key challenge in drug discovery.
[0004] Traditional drug discovery methods rely primarily on experimental approaches, including high-throughput in vitro screening (HTS) and low-throughput in vivo testing. While these methods can identify potential drug candidates to a certain extent, their limitations are also evident. First, the drug development process often requires testing thousands of compounds, which is time-consuming, labor-intensive, and costly. Second, experimental methods often fail to fully capture the diversity of molecular properties, resulting in low screening efficiency. Furthermore, molecules are composed of functional groups, the properties of which have a decisive influence on the overall properties of the molecule. However, existing computational methods, such as graph neural networks (GNNs) and large language models (LLMs), while performing well in certain tasks, have not yet effectively integrated structural and textual information about functional groups, limiting their application in molecular property prediction. Among them, large language models refer to deep learning models trained using large amounts of text data, so that the model can generate natural language text or understand the meaning of language text. These models can provide in-depth knowledge and language generation on various topics by training on huge data sets.
[0005] Specifically, relevant information on molecular properties is usually recorded in scientific literature, patents, and databases in the form of natural language. These textual data contain a wealth of chemical knowledge and experimental experience, but how to extract useful information from them and combine it with molecular structure data remains an urgent problem to be solved. Existing graph neural network-based methods mainly focus on the graphical representation of molecular structure, while large language models focus on the processing of textual information, and there is a lack of effective synergy between the two. Therefore, developing a computational framework that can simultaneously utilize functional group structure information and textual information is of great significance to improving the accuracy and efficiency of molecular property prediction.
[0006] In summary, natural language processing technology has enormous potential for application in drug discovery, particularly in molecular property prediction. By combining structural and textual information about functional groups, a more intelligent drug discovery platform can be constructed, thereby accelerating the development of new drugs, reducing R&D costs, and improving drug safety and efficacy. Future research should focus on developing multimodal fusion algorithmic models to fully exploit the synergistic effects of natural language processing and molecular computing technologies, thereby bringing new breakthroughs to the field of drug discovery. Summary of the Invention
[0007] The present invention aims to address the shortcomings of the existing technology by providing a method and device for molecular property prediction based on graph neural networks and large language models. The present invention can improve the accuracy of molecular property prediction by combining textual information about functional groups.
[0008] The object of the present invention is achieved through the following technical solutions: In a first aspect, an embodiment of the present invention provides a molecular property prediction method based on a graph neural network and a large language model, specifically comprising: Obtain a molecular structure diagram based on the SMILES of the molecule; wherein the molecular structure diagram includes the structural information of atoms and functional groups; For the structural information of functional groups in the molecular structure diagram, a fine-tuned large language model is used to generate descriptive text for each functional group, and then a text encoder is used to encode it to obtain the textual information of each functional group; Add text nodes and feature information to the molecular structure diagram, and add edges between the text nodes and their corresponding functional groups to obtain the final molecular structure diagram; the feature information of the text nodes is the text information of their corresponding functional groups; The final molecular structure diagram is input into the trained molecular property predictor to obtain the prediction results of the molecular properties.
[0009] Furthermore, the obtaining of the molecular structure diagram specifically includes: Obtain the atomic structure diagram of the molecule based on the SMILES of the molecule; Using the BRICS algorithm, the chemical bonds specified in the molecule are broken, and the molecule is split into a functional group graph consisting of functional groups, where the functional groups are connected by broken chemical bonds; then the functional groups are connected to the atoms they contain to obtain an atom-functional group graph connecting the atoms and functional groups; Combining the atomic structure diagram, the functional group diagram, and the atom-functional group diagram into a molecular structure diagram; wherein the nodes in the molecular structure diagram include atoms and functional groups, and the edges include chemical bonds between atoms, chemical bonds between functional groups, and edges connecting functional groups to the atoms they contain; The atomic information and functional group information of the molecule are used as the characteristic information of the nodes in the molecular structure graph; the chemical bond information between atoms and the chemical bond information between functional groups are used as the characteristic information of the edges in the molecular structure graph.
[0010] Furthermore, the atomic information includes the atomic number, the total atomic degree, the atomic charge, the atomic chirality information, the number of hydrogen atoms adjacent to the atom, the atomic hybridization type, the aromatic atoms and the atomic mass. The vector formed by splicing all the atomic information is used as the characteristic vector of the atom in the molecular structure diagram; The functional group information includes chemical features, MACCS keys and molecular word vector representations; The chemical bond information between atoms includes chemical bond type, conjugated chemical bond, ring chemical bond and chemical bond stereo configuration; The chemical bond information between the functional groups includes the type of broken chemical bonds.
[0011] Furthermore, the fine-tuned large language model is obtained by the following method: First, obtain the pre-trained large language model Qwen2.5-7b, and then use the collected SMILES-text data to perform LoRA fine-tuning on the pre-trained large language model Qwen2.5-7b to obtain the fine-tuned large language model Qwen2.5-7b, which is used to generate description text of functional groups.
[0012] Furthermore, the text information includes an input identifier and an attention mask, which are specifically obtained through a text encoder, and the text encoder adopts the language model SciBERT.
[0013] Furthermore, the molecular property predictor is constructed based on a graph neural network, specifically including three message passing neural networks for respectively processing the information of atoms, functional groups and text in the final version of the molecular structure diagram and a multi-layer perceptron for obtaining the prediction results of molecular properties; wherein, each message passing neural network includes a message passing stage and a readout stage, and the message passing stage includes a message generation stage, a message aggregation stage and a node update stage. In the message generation stage, each node sends the message generated by the message generation function to the adjacent node, wherein the message generation function is implemented by a multi-head attention mechanism, which is used to calculate the message based on the feature vector of the edge and the feature vector of the adjacent node; in the message aggregation stage, each node aggregates all the messages it receives through an aggregation function, wherein the aggregation function is summation; in the node update stage, each node uses the aggregated message to update the original feature vector of the node through the update function, wherein the update function is a linear function implemented by a multi-layer perceptron; the readout stage is implemented using a gated recurrent unit; the output results of the three message passing neural networks pass through the last multi-layer perceptron to obtain the prediction results of the molecular properties.
[0014] Furthermore, when the message passing neural network is used to process the information of atoms in the final version of the molecular structure diagram, the processed information includes: the feature vectors of the atomic nodes, the feature vectors of the functional group nodes, and the edge feature information between the atomic nodes; the feature vectors of the nodes and the edge feature information are transmitted through the corresponding message passing neural network and finally saved in the molecular structure diagram.
[0015] Furthermore, when the message passing neural network is used to process the information of functional groups in the final version of the molecular structure diagram, the processed information includes: the feature vectors of the atomic nodes, the feature vectors of the functional group nodes, the edge feature information between the atomic nodes, and the edge feature information between the functional group nodes; the feature vectors and edge feature information of the nodes are transmitted through the corresponding message passing neural network and finally saved in the molecular structure diagram.
[0016] Furthermore, when the message passing neural network is used to process the information of the text in the final version of the molecular structure diagram, the processed information includes: feature vectors of functional group nodes, feature vectors of text nodes, edge feature information between atomic nodes, edge feature information between functional group nodes, and edge feature information between functional groups and their corresponding text nodes; the feature vectors of the nodes and the edge feature information are transmitted through the corresponding message passing neural network and finally stored in the molecular structure diagram; Among them, the edge feature information between the functional group and its corresponding text node is obtained specifically by the following method: cross-calculating the molecular word vector representation in the functional group information and the feature vector of the text node connected to it, and obtaining the hidden layer feature as the edge feature information between the functional group and its corresponding text node.
[0017] A second aspect of an embodiment of the present invention provides an apparatus for implementing the above-mentioned molecular property prediction method based on a graph neural network and a large language model, comprising: The molecular graph extraction module is used to obtain the molecular structure graph based on the SMILES of the molecule; wherein the molecular structure graph includes the structural information of atoms and functional groups; The text prediction module is used to generate descriptive text for each functional group in the molecular structure diagram using a fine-tuned large language model and then encode it using a text encoder to obtain the text information of each functional group. The molecular structure diagram improvement module is used to add text nodes and feature information to the molecular structure diagram, and add edges between the text nodes and their corresponding functional groups to obtain the final molecular structure diagram; the feature information of the text nodes is the text information of their corresponding functional groups; The property prediction module is used to input the final molecular structure diagram into the trained molecular property predictor to obtain the prediction results of the molecular properties.
[0018] The beneficial effect of the present invention is that it can predict molecular properties based on graph neural networks and large language models, and after cutting molecules into functional groups, extract the structural information and text information of the functional groups through Mol2Vec and SciBERT, and then use three message passing networks to extract the information of atoms, functional groups and text respectively, and input all three types of information into the model for modeling and training to achieve the prediction of molecular properties; the present invention fully considers the structural information and text information of atoms and functional groups in molecules, and then uses message passing neural networks to learn this information, so that the prediction of molecular properties is more accurate, effectively improving the accuracy of molecular property prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of the molecular property prediction method based on graph neural network and large language model of the present invention; Figure 2 This is a flow chart of the architecture of the molecular property prediction method based on graph neural network and large language model of the present invention; Figure 3 This is the construction process of the large language model of the present invention; Figure 4 is a flow chart of message passing in a message passing neural network of the present invention; Figure 5 It is a schematic diagram of the atomic information transmission process in the message passing neural network of the present invention; Figure 6 Schematic diagram of the transmission process of functional group information in the message transmission neural network of the present invention; Figure 7 It is a schematic diagram of the text information transmission process in the message transmission neural network of the present invention; Figure 8 Schematic diagram of the structure of the molecular property prediction device based on graph neural network and large language model of the present invention; Figure 9 Schematic diagram of the change process of data for molecular property prediction in one embodiment of the present invention. DETAILED DESCRIPTION
[0020] The exemplary embodiments will be described in detail herein, with examples shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Obviously, the drawings used in the following description are only some embodiments of the present invention, and it is possible for a person of ordinary skill in the art to derive other drawings based on these drawings without inventive effort. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0021] The terms used in this invention are for the purpose of describing specific embodiments only and are not intended to limit the invention. The singular forms "a," "the," and "the" used in this invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0022] It should be understood that although the terms "first," "second," "third," etc. may be used in the present invention to describe various information, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. Depending on the context, the term "if" as used herein may be interpreted as "when," "when," or "in response to determining."
[0023] The present invention will be described in detail below with reference to the accompanying drawings. Unless there is any conflict, the features of the following embodiments and implementations may be combined with each other.
[0024] See also Figure 1 and Figure 2 The molecular property prediction method based on graph neural network and large language model of the present invention specifically includes the following steps: (1) Obtain the molecular structure diagram based on the SMILES (Simplified Molecular Input Line Entry System) of the molecule; the molecular structure diagram includes the structural information of atoms and functional groups.
[0025] (1.1) Obtain the atomic structure diagram of the molecule based on its SMILES.
[0026] (1.2) Using the BRICS algorithm, the chemical bonds specified in the molecule are broken, and the molecule is split into a functional group graph consisting of functional groups, where the functional groups are connected by broken chemical bonds; then the functional groups are connected to the atoms they contain to obtain an atom-functional group graph in which the atoms are connected to the functional groups.
[0027] It should be understood that the BRICS algorithm is a computational method for molecular cleavage, mainly used in medicinal chemistry and retrosynthetic analysis. Its core idea is to decompose molecules into a series of synthesizable and meaningful fragments, which usually correspond to common chemical reaction functional groups or pharmacophores.
[0028] (1.3) Combine the atomic structure diagram, functional group diagram, and atom-functional group diagram into a molecular structure diagram; wherein the nodes in the molecular structure diagram contain atoms and functional groups, and the edges contain chemical bonds between atoms, chemical bonds between functional groups, and edges connecting functional groups to the atoms they contain.
[0029] (1.4) The atomic information and functional group information of the molecule are used as the characteristic information of the nodes in the molecular structure graph; the chemical bond information between atoms and the chemical bond information between functional groups are used as the characteristic information of the edges in the molecular structure graph.
[0030] Furthermore, the atomic information includes the atomic number, the total degree of the atom, the charge of the atom, the chirality information of the atom, the number of hydrogen atoms adjacent to the atom, the hybridization type of the atom, the aromatic atoms and the atomic mass. The vector spliced together from all the atomic information is used as the characteristic vector of the atom in the molecular structure diagram.
[0031] Among them, the atomic number refers to the number of protons in the nucleus of an element. It is a unique identifier for each element and determines the element's position in the periodic table and the properties of the element. In this example, several important types of atoms are listed: bromine, carbon, nitrogen, oxygen, fluorine, phosphorus, sulfur, chlorine, and iodine. Using one-hot encoding, if the atomic type of the atom is one of the above important types of atoms, the corresponding position of the atomic number in the atom's eigenvector is set to 1, otherwise it is set to 0.
[0032] In a molecule, the degree of an atom refers to the number of neighboring atoms to which it is directly connected. This total degree is independent of the type of chemical bond (e.g., single, double, or triple bonds), and is only related to the number of atoms to which the atom is directly connected. In this example, common degrees are listed: 0 to 5. Using one-hot encoding, if the total degree of an atom is one of the degrees listed above, the corresponding position of the total degree of the atom in the atom's feature vector is set to 1; otherwise, it is set to 0.
[0033] The charge of an atom typically refers to the charge state of the atom in a chemical reaction or compound. Normally, an atom has equal charge and is electrically neutral. Losing an electron results in a positive charge, while gaining an electron results in a negative charge. Common charge values include -1, -2, 1, 2, and 0. Using one-hot encoding, if an atom's charge falls into one of the common values listed above, the corresponding position in the atom's eigenvector is set to 1; otherwise, it is set to 0.
[0034] The chirality information of an atom refers to whether the atom has chirality in a molecule, that is, whether the atom cannot overlap with its mirror image; a chiral atom usually refers to an atom connected to four different groups, which is called a chiral center; the existence of a chiral center makes the molecule chiral, that is, the molecule cannot overlap with its mirror image. There are many types listed in the RDKit toolkit. In this embodiment, the first four more common types are selected. Using one-hot encoding, if the chirality information of an atom is one of the four types of chirality information listed above, the corresponding position of the chirality information of the atom in the atom's eigenvector is set to 1, otherwise it is set to 0.
[0035] The total number of hydrogen atoms adjacent to an atom includes both explicit and implicit hydrogen atoms. Hydrogen atoms have only one electron and easily form chemical bonds with other atoms by sharing or transferring electrons, achieving a stable state. Their simple structure, low electronegativity, high reactivity, and widespread presence also facilitate their bonding with other atoms. Common values for the number of hydrogen atoms adjacent to an atom range from 0 to 4. Using one-hot encoding, if the number of hydrogen atoms adjacent to an atom is one of the common values listed above, the corresponding position in the atom's eigenvector is set to 1; otherwise, it is set to 0.
[0036] The hybridization type of an atom refers to the type of electron orbital hybridization adopted by the atom during chemical bonding. Hybridization is the process by which atomic orbitals recombine during chemical bond formation to form new equivalent orbitals, thereby optimizing the molecular geometry and stability. Common hybridization types include: SP hybridization, SP2 hybridization, SP3 hybridization, SP3D hybridization, and SP3D2 hybridization. Using one-hot encoding, if the atom's hybridization type is one of the common hybridization types listed above, the corresponding position of the atom's hybridization type in the atom's feature vector is set to 1; otherwise, it is set to 0.
[0037] Aromatic atoms are those atoms that participate in the formation of aromatic rings. Aromaticity is a chemical concept used to describe the stability of certain cyclic molecules, which stems from the delocalization of electrons within the ring. A typical example is the benzene ring, where the carbon atoms are aromatic atoms. If an atom is aromatic, the corresponding position in the atom's eigenvector is marked as 1; otherwise, it is marked as 0.
[0038] Atomic mass is primarily composed of the masses of the protons and neutrons in the nucleus, as the mass of electrons is relatively small. The mass of one proton or one neutron is approximately 1 atomic mass unit.
[0039] Furthermore, functional group information includes chemical features, MACCS keys (Molecular ACCess System keys) and molecular word vector (Mol2Vec) representation.
[0040] The RDKit toolkit's feature factory defines 27 chemical features. Using one-hot encoding, if a functional group possesses one of these features, the corresponding position in the functional group information vector is set to 1; otherwise, it is set to 0. RDKit is an open-source cheminformatics toolkit developed by Greg Landrum. It provides various chemical data processing tools, including reading and writing chemical structures, generating and editing molecular structures, processing chemical reactions, and calculating molecular descriptors. Many of the molecular-related operations in this invention are handled using interfaces within the RDKit toolkit.
[0041] A MACCS key is a chemical fingerprint used to describe a molecular structure. It consists of a set of predefined substructure features, each of which corresponds to a binary bit (0 or 1). If a predefined substructure feature exists in a molecule, the corresponding bit in the functional group information vector is set to 1, otherwise it is set to 0.
[0042] The word vector representation of molecules is obtained through the word vector model word2vec. Specifically, functional groups are regarded as words, each compound is regarded as a sentence, the substructures of the molecule are encoded into words, and the word2vec model is used to obtain the corresponding word vectors, that is, the embedding vector representation (embedding) of each substructure. Furthermore, in order to obtain the embedding of the molecule, all substructures found in a molecule are summed and averaged to obtain the embedding of a molecule, which is the Mol2Vec representation of the molecule.
[0043] Furthermore, the chemical bond information between atoms includes the chemical bond type, conjugated chemical bonds, ring chemical bonds and the three-dimensional configuration of chemical bonds.
[0044] In chemistry, the bond type determines the connection and properties between atoms. Common bond types include single, double, triple, and aromatic bonds. Using one-hot encoding, if the bond type is one of the common bond types listed above, the corresponding position is set to 1; otherwise, it is set to 0. For example, the bond type has 4 bits. If the bond type between two atoms is a double bond, the second position of the 4-bit bond type is set to 1, and the remaining 3 positions are set to 0.
[0045] Conjugated chemical bonds are special bonds formed in molecules by delocalizing electrons between adjacent double bonds or aromatic rings. In a conjugated system, electrons are not confined between two atoms but can be shared and delocalized across multiple atoms, increasing the stability of the molecule. If a bond is conjugated, the corresponding position is set to 1; otherwise, it is set to 0.
[0046] Regarding cyclic bonds, in chemistry, a cyclic structure refers to atoms connected by chemical bonds to form a closed ring. Determining whether a chemical bond is cyclic means checking whether the two atoms connected by the bond belong to the same cyclic structure. If the chemical bond is cyclic, the corresponding position is set to 1; otherwise, it is set to 0.
[0047] The stereoconfiguration of a chemical bond refers to the spatial arrangement of atoms or atomic groups in a molecule. Different stereoconfigurations can lead to changes in the physical and chemical properties of the molecule. Common stereoconfigurations include: no clear stereoconfiguration information, uncertain or unimportant stereoconfiguration, Z configuration, E configuration, cis configuration, and trans configuration. Using one-hot encoding, if the chemical bond stereoconfiguration is one of the above, the corresponding position of the chemical bond stereoconfiguration is set to 1; otherwise, it is set to 0.
[0048] Furthermore, information about chemical bonds between functional groups includes the type of bond broken. The BRICS algorithm defines 16 breakage rules (e.g., amide bonds, ester bonds, carbon-carbon single bonds, etc.) for identifying and breaking chemical bonds relevant to chemical reactions in molecules. These rules are based on the chemical environment and surrounding substructure of the bond, aiming to preserve valuable structural and functional content within the molecule. One-hot encoding is used; if the bond breaking rule corresponds to one of the 16 listed breakage rules, the position is assigned a 1; otherwise, it is assigned a 0.
[0049] In this embodiment, a molecular structure diagram is obtained based on the SMILES of the molecule, and the molecule is broken into functional groups based on the BRICS algorithm to obtain a graph G={V,E}, where the node set V contains two types of nodes, namely, atomic nodes a and functional group nodes p; the edge set E contains three types of edges, namely, edge types aba between atomic nodes, edge types prp between functional groups, and edge types axp between atoms and functional groups. The atomic node a is accompanied by a feature vector consisting of the atomic atomic number, total degree, charge number, chirality information, number of hydrogen atoms adjacent to the atom, hybridization type, whether it is an aromatic atom, and atomic mass, which is saved as a field of node a. The functional group p is accompanied by a feature vector consisting of chemical features, MACCS keys, and molecular word vector representations. The edge type aba between atomic nodes is accompanied by a one-hot encoding of the chemical bond information (i.e., connection type) between atoms. The edge type prp between functional groups is accompanied by a one-hot encoding of the two atom types connected by chemical bonds. They are respectively expressed as: ; ; ;
[0050] Where, Represents the eigenvector of atomic node a, represents the atomic number of the atom, represents the total degree of the atom, represents the charge of the atom, represents the chirality information of the atom, represents the number of hydrogen atoms adjacent to the atom, represents the hybridization type of the atom, Indicates whether the atom is aromatic. represents the atomic mass of an atom; represents the eigenvector of the functional group node p, Represents chemical characteristics, Represents the MACCS key, Represents the molecular word vector representation; Indicates the edge type between atomic nodes. One-hot encoding of chemical bond information (i.e., connection type) between atoms; Indicates the edge type between functional groups. A one-hot encoding representing two atom types connected by a chemical bond.
[0051] (2) For the structural information of the functional groups in the molecular structure diagram, a fine-tuned large language model is used to generate the description text of each functional group, and a text encoder is used to encode it to obtain the text information of each functional group.
[0052] Furthermore, if Figure 3 As shown, the construction process of a large language model mainly involves pre-training and supervised fine-tuning. Different stages require different data sets and different types of algorithms, resulting in different types of models and requiring significantly different resources. The fine-tuned large language model is obtained as follows: first, obtain the pre-trained large language model Qwen2.5-7b. Then, use the collected SMILES-text data to perform LoRA (Low-Rank Adaptation) fine-tuning on the pre-trained large language model Qwen2.5-7b to obtain the fine-tuned large language model Qwen2.5-7b, which is used to generate functional group description text. Among them, when using SMILES-text data to fine-tune LoRA on the pre-trained large language model Qwen2.5-7b, data from the LPM-24 dataset or the chebi-20 dataset can be used. The data used contains three fields, namely instruction, input, and output fields. The instruction field uses the same instruction: "You are an expert in molecular fields, and now you are required to provide a descriptive text for a molecule based on its SMILES expression. Extract the canonical field from the LPM-24 dataset and the SMILES field from the chebi-20 dataset as input. Extract the caption field from the LPM-24 dataset and the description field from the chebi-20 dataset as output.". Input the intruction field and the input field into Qwen2.5-7b, and the dialogue template will be used to embed it: "[INPUT]<|im_start|>system; You are a helpful assistant.<|im_end|>; <|im_start|>user; You are an expert in molecular fields, and now you are required to provide a descriptive text for a molecule based on its SMILES expression; {input}<|im_end|>; <|im_start|>assistant; {output}". In this dialogue template, input and output are fields extracted from the dataset. The content in output will be used as the label during Qwen2.5-7b training, and the dialogue template is the input during Qwen2.5-7b training. The molecules used in the fine-tuning process are those provided by the dataset, and the generated description text is for the entire molecule.
[0053] It should be understood that Qwen2.5-7b is a pre-trained large language model with basic language generation and conversation capabilities. Fine-tuning allows it to learn the molecular domain knowledge in this invention, so that its answers are more in line with the requirements of molecular domain tasks.
[0054] It's important to note that LoRA is an efficient model fine-tuning technique designed to reduce the number of parameters required for fine-tuning by inserting low-rank matrices into pre-trained models, thereby improving training efficiency and avoiding overfitting. The core idea of LoRA is to simulate parameter variations by adding low-rank matrices while keeping most of the pre-trained model parameters unchanged, thereby achieving adaptation to specific tasks.
[0055] Furthermore, for the structural information of the functional groups in the molecular structure diagram, a fine-tuned large language model is used to generate descriptive text for each functional group. Since the descriptive text of the functional group cannot be directly used as the feature information of the node, it is necessary to use a text encoder to encode the descriptive text of the functional group, and use the encoded vector as the text information of the functional group, and use the text information as the feature information of the text node in the molecular structure diagram.
[0056] Furthermore, text information includes input identifiers (input_ids) and attention masks (attention_mask), which are obtained through a text encoder using the smaller language model SciBERT. SciBERT is a BERT model pre-trained using 1.14 million scientific papers in biomedicine and computer science, making it particularly suitable for natural language processing tasks in scientific research. The tokenizer in SciBERT is the core component in natural language processing that converts raw text into a format that SciBERT can process. Using a specific algorithm, the tokenizer breaks down continuous natural language text (such as sentences and paragraphs) into discrete basic units (tokens), converting the raw text into a sequence of numbers that the model can understand. Each number corresponds to a unique token ID in the model's vocabulary. SciBERT takes natural language text sentences as input, which are then tokenized and mapped to the vocabulary. The final output is an encoded vector, which serves as the text information of the functional group. Input_ids is part of the output of the tokenizer in SciBERT. Each element is an integer representing the index of each token in the input sequence. These indices are generated based on the vocabulary in SciBERT. Attention_mask is also part of the output of the tokenizer in SciBERT. Each element is an integer with a value of 0 or 1, which is used to indicate whether the token at the corresponding position should be paid attention to. A value of 1 indicates that the token at that position is a valid input, and a value of 0 indicates that the token at that position is a padding token. Specifically, a meaningless symbol (usually [PAD]) is added to make all input sequences reach the same length.
[0057] (3) Add text nodes and feature information to the molecular structure diagram obtained in step (1), and add edges between the text nodes and their corresponding functional groups to obtain the final molecular structure diagram; the feature information of the text nodes is the text information of their corresponding functional groups.
[0058] In this example, the fine-tuned Qwen2.5-7b was used to generate the corresponding descriptive text for the functional groups in the molecular structure diagram, and SciBERT was used to encode the descriptive text of the functional groups to obtain the textual information of the functional groups. Each functional group corresponds to a text node. A text node t is added to the molecular structure diagram to represent the functional group text, and an edge pxt is added between the functional group node and the text node; the textual information of the functional group is used as the feature information of the corresponding text node. The feature information of the text node is represented as: ;
[0059] Where, Represents the characteristic information of the text node, Represents the language model SciBERT, Descriptive text representing the functional group.
[0060] In a possible embodiment, the molecular structure diagram includes: atomic nodes, functional group nodes, text nodes, and edges formed by chemical bonds between atoms, edges formed by chemical bonds connecting functional groups through chemical bonds, edges formed by connections between functional groups and the atoms they contain, and edges formed by connections between functional groups and their corresponding text nodes.
[0061] (4) The final version of the molecular structure diagram is input into the trained molecular property predictor to utilize the three message passing neural networks contained therein to perform calculations from the three dimensions of atoms, functional groups, and text, and use the multi-layer perceptron therein to fuse the information of the three dimensions to obtain the final prediction result, that is, the prediction result of the molecular properties.
[0062] In this embodiment, the molecular property predictor is constructed based on a graph neural network (GNN), which specifically includes three message passing neural networks (MPNNs) for processing the information of atoms, functional groups, and text in the final molecular structure diagram, and a multilayer perceptron (MLP) for obtaining the prediction results of molecular properties. Figure 2 As shown in Figure 2. Each message passing neural network includes two stages: message passing stage and readout stage. The message passing stage includes three stages: message generation stage, message aggregation stage and node update stage. Figure 4As shown in the figure, during the message generation phase, each node sends the message generated by the message generation function to adjacent nodes. The message generation function is implemented using a multi-head attention mechanism, which is used to calculate messages based on the feature vectors of the edge and the feature vectors of the adjacent nodes. The purpose of transmitting messages during the message generation phase is to pass the information required for node calculation to the node. Therefore, for each edge, each source node will transmit its own feature vector and the feature vector of the edge to the destination node. Each destination node may receive messages from multiple source nodes, which it will store in a mailbox. During the message aggregation phase, each node aggregates all received messages using an aggregation function. The aggregation function is a summation function, which aims to update its own feature vector based on messages from neighboring nodes. Each node first aggregates the messages passed by the message function from the mailbox and clears the messages in the mailbox. During the node update phase, each node uses the aggregated messages to update its original feature vector using an update function. The update function is a linear function implemented using a multilayer perceptron. The node combines the aggregated results with the original feature vector to update the node's original feature vector. The message function in the node update phase takes an edge as its parameter, including feature information for the source and target nodes. The processed data is placed in the node's mailbox. The readout phase is implemented using a gated recurrent unit (GRU). Finally, the outputs of the three message passing neural networks are passed through a final multilayer perceptron to produce the predicted molecular properties.
[0063] It should be noted that GNNs are a type of deep learning model specifically designed for processing graph-structured data, capable of capturing the complex relationships between nodes in a graph. The core of GNNs is to learn representations of nodes and graphs by iteratively transferring and aggregating feature information of nodes and their neighbors. This GNN model not only considers the characteristics of the nodes themselves but also fully utilizes the connections between nodes, ensuring that each node's state update depends on the information of its neighboring nodes.
[0064] MPNN is a neural network framework for processing graph-structured data. Its core idea is to treat the nodes in the graph as message messengers through a message passing mechanism, and to achieve deep feature extraction of graph-structured data by converting the message passing process between the node and its neighboring nodes into the forward propagation process of the neural network.
[0065] An MLP is a feedforward neural network model consisting of multiple layers of neurons, typically an input layer, one or more hidden layers, and an output layer. MLP learns the relationship between input data and target outputs, adjusting the weights and biases between neurons to achieve complex nonlinear mapping.
[0066] The multi-head attention mechanism is a core component in the Transformer model. It aims to enhance the expressiveness and generalization capabilities of the model by processing multiple attention heads in parallel. It calculates the attention of different subspaces in parallel through multiple different attention heads, thereby capturing rich contextual information in the input data.
[0067] GRU is a variant of recurrent neural networks (RNNs) designed to address the vanishing and exploding gradient problems that traditional RNNs often encounter when processing long sequences of data. By introducing a gating mechanism, GRU effectively addresses these issues while maintaining a simple structure, enabling it to excel in many tasks. GRUs contain two important gating mechanisms: a reset gate and an update gate.
[0068] Furthermore, when the message passing neural network is used to process the information of atoms in the final molecular structure diagram, the processed information includes: the feature vector of the atomic node , the eigenvector of the functional group node , edge feature information between atomic nodes The node feature vector and edge feature information are transmitted through the corresponding message passing neural network and finally saved in the molecular structure graph.
[0069] Specifically, the atomic information learning framework based on message passing neural network is as follows Figure 5 As shown, in this framework, the characteristic message of the edge Messages are generated through the message generation function and passed to adjacent nodes. Specifically, the message generation function calculates messages based on the characteristics of the edges and the characteristics of the connected nodes, thereby capturing the local interaction information between the nodes. For each node, the system uses the aggregation function to aggregate its own feature information. 、 The message is then integrated with all messages received from neighboring nodes. The aggregation function typically uses a summation operation to ensure that the node can integrate information about its local environment. Subsequently, the update function updates the node and edge feature information to generate new node and edge representations. The update function is a linear function, typically implemented using a multi-layer perceptron to capture complex nonlinear relationships. Through multiple iterations of this message passing, aggregation, and update process, a node can gradually integrate information from its multi-hop neighbors, thereby learning the global graph structure.
[0070] Furthermore, when the message passing neural network is used to process the information of functional groups in the final molecular structure diagram, the processed information includes: the feature vector of the atomic node , the eigenvector of the functional group node , edge feature information between atomic nodes , edge feature information between functional group nodes The node feature vector and edge feature information are transmitted through the corresponding message passing neural network and finally saved in the molecular structure graph.
[0071] Specifically, the functional group information learning framework based on message passing neural network is as follows Figure 6 As shown, in this framework, the characteristic message of the edge 、 Messages are generated through the message generation function and passed to adjacent nodes. Specifically, the message generation function calculates messages based on the characteristics of the edges and the characteristics of the connected nodes, thereby capturing the local interaction information between the nodes. For each node, the system uses the aggregation function to aggregate its own feature information. 、 The message passing function is then integrated with all messages received from neighboring nodes. The aggregation function typically uses a summation operation to ensure that the node can integrate information about its local environment. Subsequently, the system updates the node and edge feature information using an update function, generating new node and edge representations. The update function is typically implemented using a multi-layer perceptron to capture complex nonlinear relationships. Through multiple iterations of this message passing, aggregation, and update process, a node can gradually integrate information from its multi-hop neighbors, thereby learning the global graph structure.
[0072] Furthermore, when the message passing neural network is used to process the information of the text in the final version of the molecular structure diagram, the processed information includes: the feature vector of the functional group node , feature vector of text node , edge feature information between atomic nodes , edge feature information between functional group nodes , edge feature information between functional groups and their corresponding text nodes The node feature vector and edge feature information are transmitted through the corresponding message passing neural network and finally saved in the molecular structure graph.
[0073] Among them, the edge feature information between the functional group and its corresponding text node The specific method is as follows: the molecular word vector in the functional group information is represented as and the feature vector of the text node connected to it Perform cross calculation, that is, represent the molecular word vectors in the functional group information and the feature vector of the text node After an MLP and layer normalization, the functional group structure and the text matching degree are obtained by multiplication, that is, the hidden layer features are used as the edge feature information between the functional group and its corresponding text node. , expressed as: ; ; ;
[0074] Where, Feature vector representing a text node The output after an MLP and layer normalization, Molecular word vector representation representing functional group information The output after an MLP and layer normalization, Representation layer normalization, Represents matrix multiplication.
[0075] Specifically, the functional group information learning framework based on message passing neural network is as follows Figure 7 As shown, in this framework, the characteristic message of the edge 、 、 Messages are generated through the message generation function and passed to adjacent nodes. Specifically, the message generation function calculates messages based on the characteristics of the edges and the characteristics of the connected nodes, thereby capturing the local interaction information between the nodes. For each node, the system uses the aggregation function to aggregate its own feature information. 、 Integrate with all messages received from neighboring nodes. The aggregation function usually uses a summation operation to ensure that the node can integrate the information of its local environment. Subsequently, the system updates the feature information of the nodes and edges through the update function to generate new node representations and edge representations. The update function is usually implemented by a multi-layer perceptron to capture complex nonlinear relationships. Through multiple iterations of the above message passing, aggregation and update process, the node can gradually integrate information from its multi-hop neighbors, thereby learning global graph structure information. From the above content, it can be seen that three message passing neural networks are used to extract information of atoms, functional groups and text respectively, and then the final MLP is used to obtain the prediction results of molecular properties, as shown in the following formula: ; ; ; ;
[0076] Where, 、 、 The information of atoms, functional groups and texts extracted by three message passing neural networks are respectively, represents a message passing neural network, represents the predicted results of molecular properties, Represents a multilayer perceptron.
[0077] In the present embodiment, it is necessary to train the molecular property predictor, to obtain the molecular property predictor trained. In the training process, the loss function of the molecular property predictor uses a binary cross entropy loss function, with the loss function of minimizing the molecular property predictor as an optimization target, and each network parameter in the molecular property predictor is adjusted and optimized using the Adam optimizer, using the Noam learning rate scheduler. Wherein the loss function of the molecular property predictor is based on the predicted result of the molecular property output by the molecular property predictor and its corresponding true label calculation acquisition, and the true label of molecular property is the mark made when collecting data. These are all commonly used training methods, and will not be repeated here.
[0078] In summary, the present invention combines graph neural networks and large language models to achieve the prediction of molecular properties. It generates descriptive text for enhanced functional groups by utilizing the universal language capabilities of the large language model Qwen2.5-7b, and then uses a small language model SciBERT as a text encoder. The graph neural network serves as the final molecular property predictor, which contains three message passing neural networks with attention mechanisms to extract information about atoms, functional groups, and text respectively. The final version of the molecular structure diagram with text information is used as the input of the graph neural network to calculate the properties of the molecule. The graph neural network can learn the structural information and text information of the molecular structure diagram. This method can combine multi-scale information to fully consider various information and improve the accuracy of property prediction.
[0079] In other embodiments, in practical applications, using traditional experiments to predict molecular properties requires a significant amount of manpower and resources. With the development of artificial intelligence, an increasing number of methods are being used to predict molecular properties. One approach is to view molecules as graph structures and use graph neural networks for prediction, while another approach is to represent molecules using strings. However, both methods only predict from the perspective of the entire molecule. Molecules are composed of functional groups, and the properties of these functional groups largely determine their properties. Furthermore, most information about molecules is recorded in text form. Existing methods are unable to combine structural and textual information for prediction from the perspective of functional groups.
[0080] In response to the above problems, this embodiment proposes a molecular property prediction method and device based on graph neural network and large language model, which can improve the accuracy of molecular property prediction. The molecular property prediction device based on graph neural network and large language model is used to implement the molecular property prediction method based on graph neural network and large language model in the above embodiment. The device includes a molecular graph extraction module, a text prediction module, a molecular structure graph improvement module and a property prediction module, such as Figure 8As shown in the figure, the SMILES of the molecule is processed through the molecular graph extraction module to obtain a molecular structure graph with atomic and functional group information. The molecular structure graph is then processed through the text prediction module to obtain text information about each functional group. The molecular structure graph extracted by the molecular graph extraction module and the text information about each functional group output by the text prediction module are then processed through the molecular structure graph improvement module to obtain a final molecular structure graph with atomic, functional group, and text information. The final molecular structure graph is then processed through the property prediction module to obtain predicted molecular properties for downstream tasks.
[0081] In this embodiment, the molecular graph extraction module is used to obtain a molecular structure graph based on the SMILES of the molecule; wherein the molecular structure graph includes structural information of atoms and functional groups.
[0082] In this embodiment, the text prediction module is used to generate descriptive text for each functional group in the molecular structure graph using a fine-tuned large language model, and then encode the text using a text encoder to obtain the text information for each functional group. Specifically, the structural information of the functional groups in the molecular structure graph output by the molecular graph extraction module is input into the text prediction module. The text prediction module uses the fine-tuned large language model to generate descriptive text for the functional groups. The text encoder then encodes the descriptive text for each functional group to generate corresponding text information for each functional group.
[0083] In this embodiment, the molecular structure graph improvement module is used to add text nodes and feature information to the molecular structure graph obtained by the molecular graph extraction module, and add edges between the text nodes and their corresponding functional groups to obtain the final version of the molecular structure graph; the feature information of the text nodes is the text information of their corresponding functional groups.
[0084] In this embodiment, the property prediction module is used to input the final molecular structure diagram output by the molecular structure diagram improvement module into the trained molecular property predictor to obtain the prediction results of the molecular properties.
[0085] Exemplarily, the molecular property prediction method and device of the present invention are used in the development of drugs that act on the human body. For example, BACE-1 is an important target for Alzheimer's drug research. In drug development, it is necessary to know whether the molecule has an inhibitory effect on BACE-1. Specifically, the SMILES expression of the molecule is input into the molecular graph extraction module to obtain a molecular structure graph. Taking the "FCC#Cc1cc(ccc1)[C@]1(N=C(N)N(C)C1=O)c1ccc(OC(F)F)cc1" molecule in the BACE dataset as an example, this molecule has an inhibitory effect on BACE-1, and its data change process is as follows. Figure 9 shown.
[0086] The molecular structure diagram of this molecule obtained after passing through the molecular graph extraction module contains 28 atoms and 4 functional groups. The atom extraction method is based on the SMILES expression, and the functional groups are extracted by breaking the 16 chemical bonds defined by BRICS. This method results in a molecular graph containing two nodes: atoms and functional groups, and three edges: atom-atom, functional group-functional group, and atom-functional group. The atomic number, degree, charge number, chirality, total number of hydrogen atoms, hybridization type, whether it is an aromatic atom, and atomic mass of the atoms in the node and edge feature information can be obtained from the information in the RDKit database. The chemical bond type of the functional group, the maccs key, the chemical bond type between atoms, and the chemical bond type between functional groups can all be calculated using the methods provided by RDKit. The mol2vec vector of the functional group is calculated using the mol2vec library.
[0087] The text prediction module uses the Qwen2.5-7b large language model and uses 30,000 SMILES-text data for LoRA fine-tuning to ensure more accurate text generation. The four functional groups extracted from the molecular graph extraction module are used as input to the text prediction module, generating corresponding text information describing the properties of the functional groups.
[0088] Using the molecular graph enhancement module, we added four text-type nodes to the molecular graph and used SCIBERT to encode the text as feature information for the text nodes. We also added text to the edges corresponding to the functional groups, using the product of the functional group information and the text encoding information as the edge feature information. This resulted in a molecular graph containing text.
[0089] The property prediction module consists of three message passing neural networks, which learn information about atoms, functional groups, and text, respectively. The message passing neural networks use a multi-head attention mechanism to generate messages and pass them to adjacent nodes. These messages are then stored in a mailbox. A summation aggregation function is then used to aggregate the messages passed by the message function from the mailbox. A linear function is then used to update the nodes. Finally, a GRU is used to read out the results of each message passing neural network. The results of the three message passing neural networks are combined using an MLP to calculate the final prediction.
[0090] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A molecular property prediction method based on graph neural network and large language model, characterized in that: Specifically include: Obtain a molecular structure diagram based on the SMILES of the molecule; wherein the molecular structure diagram includes the structural information of atoms and functional groups; For the structural information of functional groups in the molecular structure diagram, a fine-tuned large language model is used to generate descriptive text for each functional group, and then a text encoder is used to encode it to obtain the textual information of each functional group; Add text nodes and feature information to the molecular structure diagram, and add edges between the text nodes and their corresponding functional groups to obtain the final molecular structure diagram; the feature information of the text nodes is the text information of their corresponding functional groups; The final molecular structure diagram is input into the trained molecular property predictor to obtain the prediction results of the molecular properties.
2. The molecular property prediction method based on graph neural network and large language model according to claim 1, characterized in that: The obtaining of the molecular structure diagram specifically includes: Obtain the atomic structure diagram of the molecule based on the SMILES of the molecule; Using the BRICS algorithm, the chemical bonds specified in the molecule are broken, and the molecule is split into a functional group graph consisting of functional groups, where the functional groups are connected by broken chemical bonds; then the functional groups are connected to the atoms they contain to obtain an atom-functional group graph connecting the atoms and functional groups; Combining the atomic structure diagram, the functional group diagram, and the atom-functional group diagram into a molecular structure diagram; wherein the nodes in the molecular structure diagram include atoms and functional groups, and the edges include chemical bonds between atoms, chemical bonds between functional groups, and edges connecting functional groups to the atoms they contain; The atomic information and functional group information of the molecule are used as the characteristic information of the nodes in the molecular structure graph; the chemical bond information between atoms and the chemical bond information between functional groups are used as the characteristic information of the edges in the molecular structure graph.
3. The molecular property prediction method based on graph neural network and large language model according to claim 2, characterized in that: The atomic information includes the atomic number, the total atomic degree, the atomic charge, the atomic chirality, the number of hydrogen atoms adjacent to the atom, the atomic hybridization type, the aromatic atoms and the atomic mass. The vector formed by splicing all the atomic information is used as the characteristic vector of the atom in the molecular structure diagram; The functional group information includes chemical features, MACCS keys and molecular word vector representations; The chemical bond information between atoms includes chemical bond type, conjugated chemical bond, ring chemical bond and chemical bond stereo configuration; The chemical bond information between the functional groups includes the type of broken chemical bonds.
4. The molecular property prediction method based on graph neural network and large language model according to claim 1, characterized in that: The fine-tuned large language model is obtained by the following method: First, obtain the pre-trained large language model Qwen2.5-7b, and then use the collected SMILES-text data to perform LoRA fine-tuning on the pre-trained large language model Qwen2.5-7b to obtain the fine-tuned large language model Qwen2.5-7b, which is used to generate description text of functional groups.
5. The molecular property prediction method based on graph neural network and large language model according to claim 1, characterized in that: The text information includes an input identifier and an attention mask, which is specifically obtained through a text encoder, and the text encoder adopts the language model SciBERT.
6. The molecular property prediction method based on graph neural network and large language model according to claim 1, characterized in that: The molecular property predictor is constructed based on a graph neural network, and specifically includes three message passing neural networks for respectively processing the information of atoms, functional groups and text in the final version of the molecular structure diagram and a multi-layer perceptron for obtaining the prediction results of molecular properties; wherein, each message passing neural network includes a message passing stage and a readout stage, and the message passing stage includes a message generation stage, a message aggregation stage and a node update stage. In the message generation stage, each node sends the message generated by the message generation function to the adjacent node, wherein the message generation function is implemented by a multi-head attention mechanism, and is used to calculate the message based on the feature vector of the edge and the feature vector of the adjacent node; in the message aggregation stage, each node aggregates all the messages it receives through an aggregation function, wherein the aggregation function is summation; in the node update stage, each node uses the aggregated message to update the original feature vector of the node through the update function, wherein the update function is a linear function implemented by a multi-layer perceptron; the readout stage is implemented using a gated recurrent unit; the output results of the three message passing neural networks pass through the last multi-layer perceptron to obtain the prediction results of the molecular properties.
7. The molecular property prediction method based on graph neural network and large language model according to claim 6, characterized in that: When the message passing neural network is used to process the information of atoms in the final version of the molecular structure diagram, the processed information includes: the feature vectors of the atomic nodes, the feature vectors of the functional group nodes, and the edge feature information between the atomic nodes; the feature vectors of the nodes and the edge feature information are transmitted through the corresponding message passing neural network and finally saved in the molecular structure diagram.
8. The molecular property prediction method based on graph neural network and large language model according to claim 6, characterized in that: When the message passing neural network is used to process the information of functional groups in the final version of the molecular structure diagram, the processed information includes: the feature vectors of the atomic nodes, the feature vectors of the functional group nodes, the edge feature information between the atomic nodes, and the edge feature information between the functional group nodes; the feature vectors of the nodes and the edge feature information are transmitted through the corresponding message passing neural network and finally saved in the molecular structure diagram.
9. The molecular property prediction method based on graph neural network and large language model according to claim 6, characterized in that: When the message passing neural network is used to process the information of the text in the final version of the molecular structure diagram, the processed information includes: the feature vector of the functional group node, the feature vector of the text node, the edge feature information between the atomic nodes, the edge feature information between the functional group nodes, and the edge feature information between the functional group and its corresponding text node; the feature vector and the edge feature information of the node are transmitted through the corresponding message passing neural network and finally stored in the molecular structure diagram; Among them, the edge feature information between the functional group and its corresponding text node is obtained specifically by the following method: cross-calculating the molecular word vector representation in the functional group information and the feature vector of the text node connected to it, and obtaining the hidden layer feature as the edge feature information between the functional group and its corresponding text node.
10. A device for implementing the molecular property prediction method based on graph neural network and large language model according to any one of claims 1 to 9, characterized in that: include: The molecular graph extraction module is used to obtain the molecular structure graph based on the SMILES of the molecule; wherein the molecular structure graph includes the structural information of atoms and functional groups; The text prediction module is used to generate descriptive text for each functional group in the molecular structure diagram using a fine-tuned large language model and then encode it using a text encoder to obtain the text information of each functional group. The molecular structure diagram improvement module is used to add text nodes and feature information to the molecular structure diagram, and add edges between the text nodes and their corresponding functional groups to obtain the final molecular structure diagram; the feature information of the text nodes is the text information of their corresponding functional groups; The property prediction module is used to input the final molecular structure diagram into the trained molecular property predictor to obtain the prediction results of the molecular properties.
Citation Information
Patent Citations
Drug relationship extraction method based on deep learning
CN111949792A
Molecular property prediction method based on chemical element knowledge graph and functional group prompt
CN115762657A
Input data generation system, input data generation method, and storage medium
US20220391699A1
User interface for generating and manipulating molecular images with natural language instructions
US20240331235A1
Large Language Model for Unified Text and Point Cloud Molecular Input
US20250182858A1
Cited By
Compound fat solubility prediction method based on multilevel feature fusion graph neural network
CN121096482A
Comparison learning molecular property prediction method based on anti-fact and large language model
CN121506292A
Contrastive learning molecular property prediction method based on counterfactual and large language model
CN121506292B