Molecular property prediction method and device based on graph neural network and large language model
By combining graph neural networks and large language models, and integrating molecular structure information and textual information, the inefficiency of existing drug discovery methods has been solved, enabling more efficient and accurate prediction of molecular properties and promoting the intelligent process of drug discovery.
Patent Information
- Application Number
- CN202511128917.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-13
AI Technical Summary
Existing drug discovery methods rely on time-consuming and labor-intensive experimental techniques, and existing computational methods fail to effectively integrate functional group structure information with textual information, resulting in low efficiency in predicting molecular properties.
By combining graph neural networks and large language models, structural and textual information of functional groups is obtained from molecular structure diagrams. A fine-tuned large language model is used to generate descriptive text of functional groups, and molecular properties are predicted through message passing neural networks.
This has improved the accuracy and efficiency of molecular property prediction, enabled a more intelligent drug discovery platform, reduced R&D costs, and improved drug safety and efficacy.
Smart Images

Figure CN120636600B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of natural language processing and drug discovery, in particular to a molecular property prediction method and device based on a graph neural network and a large language model. BACKGROUND
[0002] Natural Language refers to the language form used by humans in daily life for communication and expression of thoughts. Natural Language Processing (NLP) is an important research direction in the intersection of computer science, artificial intelligence (AI) and linguistics, and its core goal is to enable computers to understand, analyze and generate human language, thereby realizing efficient interaction between man and machine. The research scope of NLP is wide, covering a variety of tasks, including but not limited to text classification, sentiment analysis, machine translation, text generation, question and answer systems, etc. These tasks have important application value in the fields of information retrieval, intelligent customer service, medical diagnosis, financial analysis, etc.
[0003] Drug Discovery refers to the systematic process of identifying and developing new drugs that can treat diseases or improve health conditions through scientific methods. As an important part of modern medicine and biotechnology, Drug Discovery involves the cross and integration of multiple disciplines, including chemistry, biology, pharmacology, computer science, etc. In this process, finding new molecules with specific therapeutic effects and safety is one of the core goals. The properties of molecules, such as hydrophilicity, hydrophobicity, toxicity, metabolic stability, etc., directly determine the safety and effectiveness of drugs. Therefore, accurately predicting the properties of molecules is one of the key challenges in the field of Drug Discovery.
[0004] Traditional drug discovery methods mainly rely on experimental approaches, including high-throughput screening (HTS) and low-throughput in vivo testing. While these methods can identify potential drug candidates to some extent, their limitations are also apparent. 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 comprehensively cover the diversity of molecular properties, resulting in low screening efficiency. In addition, molecules are composed of functional groups, and the properties of functional groups have a decisive influence on the overall properties of molecules. However, existing computational methods, such as graph neural networks (GNNs) and large language models (LLMs), while performing well in certain tasks, have not effectively integrated the structural information of functional groups and text information, limiting their application in molecular property prediction. Large language models are deep learning models trained on large amounts of text data, enabling the model to 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 massive datasets.
[0005] Specifically, the relevant information of molecular properties is usually recorded in scientific literature, patents, and databases in the form of natural language. These text data contain rich chemical knowledge and experimental experience, but how to extract useful information from them and combine it with molecular structure data remains a pressing problem. Existing graph neural network-based methods mainly focus on the graph representation of molecular structure, while large language models focus on the processing of text information, lacking effective coordination mechanisms between the two. Therefore, developing a computational framework that can utilize both functional group structural information and text information is of great significance to improve the accuracy and efficiency of molecular property prediction.
[0006] In summary, the application potential of natural language processing technology in the field of drug discovery is enormous, especially in the aspect of molecular property prediction. By combining the structural information of functional groups and text information, a more intelligent drug discovery platform can be constructed, thereby accelerating the development process of new drugs, reducing research and development costs, and improving the safety and effectiveness of drugs. Future research should focus on developing multi-modal fusion algorithm models to fully exploit the synergistic effects of natural language processing and molecular computing technology, bringing new breakthroughs to the field of drug discovery. SUMMARY
[0007] The present application aims at the deficiencies of the prior art, and provides a molecular property prediction method and device based on a graph neural network and a large language model.
[0008] The present application aims at the deficiencies of the prior art, and provides a molecular property prediction method and device based on a graph neural network and a large language model.
[0009] According to the SMILES of the molecule, a molecular structure graph is obtained; wherein the molecular structure graph comprises structural information of atoms and functional groups;
[0010] For the structural information of the functional groups in the molecular structure graph, a fine-tuned large language model is used to generate a description text of each functional group, and a text encoder is used to encode the description text to obtain text information of each functional group;
[0011] A text node and feature information are added to the molecular structure graph, and an edge is added between the text node and the corresponding functional group, to obtain a final version of the molecular structure graph; wherein the feature information of the text node is the text information of the corresponding functional group;
[0012] The final version of the molecular structure graph is input into a trained molecular property predictor to obtain a prediction result of the molecular property.
[0013] Further, the obtaining of the molecular structure graph specifically comprises:
[0014] According to the SMILES of the molecule, an atomic structure graph of the molecule is obtained;
[0015] The BRICS algorithm is used to disconnect the chemical bonds of the molecule, and the molecule is split into a functional group graph composed of functional groups, wherein the functional groups are connected through the disconnected chemical bonds; then the functional groups and the atoms contained therein are connected to obtain an atom-functional group graph in which the atoms are connected to the functional groups;
[0016] The atomic structure graph, the functional group graph and the atom-functional group graph are combined into a molecular structure graph; wherein the nodes in the molecular structure graph comprise atoms and functional groups, and the edges comprise chemical bonds between atoms, chemical bonds between functional groups and edges connected by the atoms contained in the functional groups;
[0017] The atomic information and the functional group information of the molecule are taken as feature information of the nodes in the molecular structure graph; and the chemical bond information between the atoms and the chemical bond information between the functional groups are taken as feature information of the edges in the molecular structure graph.
[0018] Further, the atomic information includes atomic number, total degree of the atom, charge of the atom, chirality information of the atom, number of hydrogen atoms adjacent to the atom, hybridization type of the atom, aromatic atom and atomic mass, and a vector formed by splicing all the atomic information is taken as a feature vector of the atom in the molecular structure graph;
[0019] The functional group information includes chemical characteristics, MACCS keys and molecular word vector representation.
[0020] The chemical bond information between the atoms includes chemical bond type, conjugated chemical bond, ring chemical bond and stereo configuration of the chemical bond.
[0021] The chemical bond information between the functional groups includes broken chemical bond type.
[0022] Further, the fine-tuned large language model is obtained by the following method:
[0023] First, a pre-trained large language model Qwen2.5-7b is obtained, and then the pre-trained large language model Qwen2.5-7b is fine-tuned using the collected SMILES-text data to obtain a fine-tuned large language model Qwen2.5-7b for generating the description text of the functional group.
[0024] Further, the text information includes an input identifier and an attention mask, and is obtained by a text encoder, and the text encoder adopts a language model SciBERT.
[0025] Further, the molecular property predictor is constructed based on a graph neural network, and specifically includes three message passing neural networks for processing information of atoms, functional groups and texts in the final version of the molecular structure graph respectively and a multi-layer perception for obtaining a prediction result of the molecular property; each message passing neural network includes a message passing stage and a readout stage, the message passing stage includes a message generation stage, a message aggregation stage and a node update stage, each node sends a message generated by a message generation function to adjacent nodes in the message generation stage, wherein the message generation function is implemented by a multi-head attention mechanism and is used for calculating a message according to a feature vector of an edge and a feature vector of an adjacent node; each node aggregates all the received messages by an aggregation function in the message aggregation stage, wherein the aggregation function is summation; each node updates an original feature vector of the node by using the aggregated messages through an update function in the node update stage, wherein the update function is a linear function and is implemented by a multi-layer perception; the readout stage is implemented by a gated recurrent unit; and the output results of the three message passing neural networks are obtained after passing through a last multi-layer perception to obtain the prediction result of the molecular property.
[0026] Further, when the message passing neural network is used to process the information of the atoms in the final version of the molecular structure graph, the processed information includes: the feature vector of the atom node, the feature vector of the functional group node, and the edge feature information between the atom 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 graph.
[0027] Further, when the message passing neural network is used to process the information of the functional groups in the final version of the molecular structure graph, the processed information includes: the feature vector of the atom node, the feature vector of the functional group node, the edge feature information between the atom 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 graph.
[0028] Further, when the message passing neural network is used to process the information of the text in the final version of the molecular structure graph, 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 atom 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 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 graph.
[0029] The edge feature information between the functional group and its corresponding text node is specifically obtained by: performing cross calculation on the molecular word vector representation in the functional group information and the feature vector of the text node connected thereto to obtain hidden layer features as the edge feature information between the functional group and its corresponding text node.
[0030] The second aspect of the embodiment of the present application provides a device for implementing the above-mentioned molecular property prediction method based on the graph neural network and the large language model, comprising:
[0031] A molecular graph extraction module is configured to obtain a molecular structure graph according to the SMILES of a molecule; wherein the molecular structure graph includes structural information of atoms and functional groups.
[0032] A text prediction module is configured to generate description text of each functional group using a fine-tuned large language model for the structural information of the functional groups in the molecular structure graph, and encode the description text using a text encoder to obtain text information of each functional group.
[0033] A molecular structure graph perfecting module is configured to add a text node and feature information in the molecular structure graph, and add an edge between the text node and its corresponding functional group to obtain a final version of the molecular structure graph; wherein the feature information of the text node is the text information of the corresponding functional group.
[0034] A property prediction module is configured to input the finalized molecular structure diagram into a trained molecular property predictor to obtain a prediction result of the molecular property.
[0035] The application has the advantages that the application can predict the molecular property based on the graph neural network and the large language model, cut the molecule into functional groups, extract the structure information and the text information of the functional groups by Mol2Vec and SciBERT, use three message passing networks to extract the information of the atoms, the functional groups and the text respectively, input all the three kinds of information into the model for modeling and training, and realize the prediction of the molecular property. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 is a flowchart of the molecular property prediction method based on the graph neural network and the large language model of the application;
[0037] Figure 2 is an architecture flowchart of the molecular property prediction method based on the graph neural network and the large language model of the application;
[0038] Figure 3 is a construction flowchart of the large language model of the application;
[0039] Figure 4 is a flowchart of the message passing in the message passing neural network of the application;
[0040] Figure 5 is a schematic diagram of the transmission process of the atom information in the message passing neural network of the application;
[0041] Figure 6 is a schematic diagram of the transmission process of the functional group information in the message passing neural network of the application;
[0042] Figure 7 is a schematic diagram of the transmission process of the text information in the message passing neural network of the application;
[0043] Figure 8 is a structural schematic diagram of the molecular property prediction device based on the graph neural network and the large language model of the application;
[0044] Figure 9 is a schematic diagram of the change process of the data of the molecular property prediction in an embodiment of the application. DETAILED DESCRIPTION
[0045] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, unless otherwise indicated, like numbers in the attached drawings refer to the same or similar elements. Obviously, the drawings shown herein are only a few embodiments of the present application, and other drawings can be obtained from these drawings by those skilled in the art without any creative effort. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0046] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0047] It will be understood that, although the terms first, second, third, etc. can be used herein to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one piece of information from another piece of information. For example, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information, without departing from the scope of the present application. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon determination" or "in response to a determination".
[0048] The present application will be described in detail below with reference to the accompanying drawings. The features in the following embodiments and implementations can be combined with each other without conflict.
[0049] Referring to Figure 1 and Figure 2 The molecular property prediction method based on graph neural network and large language model of the present application specifically includes the following steps:
[0050] (1) Obtain a molecular structure graph according to the SMILES (Simplified Molecular Input Line Entry System) of the molecule; wherein the molecular structure graph includes the structural information of atoms and functional groups.
[0051] (1.1) Obtain the atomic structure graph of the molecule according to the SMILES of the molecule.
[0052] (1.2) Using BRICS algorithm to break the chemical bonds of the molecule designated by the user, and split the molecule into a functional group graph composed of functional groups, wherein the functional groups are connected by the broken chemical bonds; then connect the functional groups with the atoms contained therein to obtain an atom-functional group graph in which the atoms are connected to the functional groups.
[0053] It should be understood that the BRICS algorithm is a computational method for molecular cleavage, mainly used in medicinal chemistry and retrosynthetic analysis, and its core idea is to disassemble the molecule into a series of synthesizable and meaningful fragments, which usually correspond to common chemical reaction functional groups or pharmacophores.
[0054] (1.3) Combine the atom structure graph, the functional group graph, and the atom-functional group graph into a molecule structure graph; wherein the nodes in the molecule structure graph include atoms and functional groups, and the edges include chemical bonds between atoms, chemical bonds between functional groups, and edges connected by functional groups and atoms contained therein.
[0055] (1.4) Take the atom information and the functional group information of the molecule as the feature information of the nodes in the molecule structure graph; take the chemical bond information between atoms and the chemical bond information between functional groups as the feature information of the edges in the molecule structure graph.
[0056] Further, the atom 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 aromaticity of the atom, and the atomic mass. The vector obtained by splicing all the atom information is taken as the feature vector of the atom in the molecule structure graph.
[0057] In this embodiment, several important 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 atoms, then 1 is placed at the corresponding position of the atomic number in the feature vector of the atom, otherwise 0 is placed.
[0058] In the molecule, the degree of an atom refers to the number of adjacent atoms directly connected to the atom, and this total degree is independent of the type of chemical bond (such as single bond, double bond, or triple bond) and only related to the number of atoms directly connected to the atom. In this embodiment, common degrees are listed: 0~5. Using one-hot encoding, if the total degree of the atom is one of the above listed degrees, then 1 is placed at the corresponding position of the total degree of the atom in the feature vector of the atom, otherwise 0 is placed.
[0059] The charge value of an atom generally refers to the charge state of the atom in a chemical reaction or a compound; a normal atom is electrically neutral, loses electrons and the atom is positively charged, and gains electrons and the atom is negatively charged. Common charge values are: -1, -2, 1, 2, 0. Using one-hot encoding, if the charge number of an atom is one of the common charges listed above, a 1 is placed at the corresponding position of the charge of the atom in the feature vector of the atom, otherwise a 0 is placed.
[0060] The chirality information of an atom refers to whether the atom has chirality in a molecule, i.e., whether the atom cannot coincide with its mirror image; a chiral atom generally refers to an atom connected to four different groups, such an atom is called a chiral center; the presence of a chiral center makes the molecule chiral, i.e., the molecule cannot coincide with its mirror image. The RDKit toolkit lists multiple types, in this embodiment, the first four commonly used types are selected. Using one-hot encoding, if the chirality information of an atom is one of the four chirality information listed above, a 1 is placed at the corresponding position of the chirality information of the atom in the feature vector of the atom, otherwise a 0 is placed.
[0061] For the number of hydrogen atoms adjacent to the atom, the total number of hydrogen atoms on an atom includes explicit hydrogen atoms and implicit hydrogen atoms, hydrogen atoms have only one electron, and are easy to form chemical bonds with other atoms by sharing or transferring electrons to achieve a stable state, and the simple structure, low electronegativity, high reactivity and wide existence of hydrogen atoms make it easy to combine with other atoms. The common value range of the number of hydrogen atoms adjacent to the atom is: 0~4. Using one-hot encoding, if the number of hydrogen atoms adjacent to the atom is one of the common hydrogen atom numbers listed above, a 1 is placed at the corresponding position of the number of hydrogen atoms adjacent to the atom in the feature vector of the atom, otherwise a 0 is placed.
[0062] The hybridization type of an atom refers to the type of electron orbital hybridization adopted by the atom during chemical bonding, where hybridization refers to the process of recombining atomic orbitals when forming chemical bonds to form new equivalent orbitals, thereby optimizing the geometry and stability of the molecule. Common hybridization types include: SP hybridization, SP2 hybridization, SP3 hybridization, SP3D hybridization, SP3D2 hybridization. Using one-hot encoding, if the hybridization type of an atom is one of the common hybridization types listed above, a 1 is placed at the corresponding position of the hybridization type of the atom in the feature vector of the atom, otherwise a 0 is placed.
[0063] Aromaticity atoms refer to 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 comes from the delocalization of electrons in the ring. The most typical example is the benzene ring, in which the carbon atoms are aromaticity atoms. If the atom is an aromaticity atom, the corresponding position of the aromaticity atom in the eigenvector of the atom is marked as 1, otherwise it is marked as 0.
[0064] The atomic mass is mainly composed of the mass of protons and neutrons in the atomic nucleus, because the mass of the electron is relatively small. The mass of a proton or a neutron is about 1 atomic mass unit.
[0065] Further, the functional group information includes chemical features, MACCS keys (Molecular ACCess System keys) and Mol2Vec representation.
[0066] Among them, 27 kinds of chemical features are defined in the feature factory of the RDKit toolkit. Using one-hot encoding, if the functional group has one of the features, the corresponding position of the chemical feature in the functional group information vector is set to 1, otherwise it is set to 0. RDKit is an open source chemical informatics toolkit developed by Greg Landrum, which provides various chemical data processing tools, including reading and writing of chemical structures, generation and editing of molecular structures, processing of chemical reactions, and calculation of molecular descriptors. Many molecular-related operations in this application will be processed by the interface in the RDKit toolkit.
[0067] MACCS keys are a kind of chemical fingerprint used to describe molecular structure, which is composed of a set of predefined substructure features, each feature corresponding to a binary bit (0 or 1). If a certain predefined substructure feature exists in the molecule, the corresponding bit in the functional group information vector is set to 1, otherwise it is set to 0.
[0068] Mol2Vec representation is obtained by word2vec model, specifically, the functional group is regarded as a word, each compound is regarded as a sentence, the substructure of the molecule is encoded into a word, and then the word2vec model is used to obtain the corresponding word vector, that is, the embedding vector representation of each substructure; further, in order to obtain the embedding of the molecule, all the substructures that can be found in a molecule are added and averaged to obtain the embedding of the molecule, that is, the Mol2Vec representation of the molecule.
[0069] Further, the chemical bond information between atoms includes chemical bond type, conjugated chemical bond, ring chemical bond and stereochemistry of chemical bond.
[0070] Among them, in chemistry, the bond type determines the way and nature of the connection between atoms. Common bond types include: single bond, double bond, triple bond, aromatic bond. Using one-hot encoding, if the bond type is one of the common bond types listed above, then 1 is placed at the corresponding position of the bond type, otherwise 0 is placed. For example, the bond type has 4 bits, and if the bond type between two atoms is a double bond, then 1 is placed at the 2nd position of the 4-bit bond type, and the remaining 3 positions are 0.
[0071] Conjugated bond refers to a special chemical bond formed by the delocalization of electrons between adjacent double bonds or aromatic rings and other structures in a molecule. The electrons in the conjugated system are not limited between two atoms, but can be shared and delocalized among multiple atoms, thereby increasing the stability of the molecule. If the bond is a conjugated bond, then 1 is placed at its corresponding position, otherwise 0 is placed.
[0072] For the bond on the ring, in chemistry, a cyclic structure refers to a closed ring formed by the connection of atoms by chemical bonds. To determine whether a bond is in a ring means to check whether the two atoms connected by the bond belong to the same cyclic structure. If the bond is a bond on the ring, then 1 is placed at its corresponding position, otherwise 0 is placed.
[0073] The stereochemistry of a chemical bond refers to the arrangement of atoms or groups of atoms in space in a molecule. Different stereochemistry will cause changes in the physical and chemical properties of the molecule. Common stereochemistries include: no explicit stereochemistry information, stereochemistry is not important or uncertain, Z configuration, E configuration, cis configuration, trans configuration. Using one-hot encoding, if the stereochemistry of the bond is one of the above listed stereochemistries, then 1 is placed at the corresponding position of the stereochemistry of the bond, otherwise 0 is placed.
[0074] Further, the bond information between functional groups and functional groups includes the type of broken bond. Among them, the BRICS algorithm defines 16 rules for breaking (such as amide bond, ester bond, carbon-carbon single bond, etc.) to identify and break the chemical bonds in the molecule that are relevant to chemical reactions. These rules are based on the chemical environment of the bond and the surrounding substructure, aiming to preserve valuable structural and functional content in the molecule. Using one-hot encoding, if the bond breaking rule is one of the 16 breaking rules listed above, then 1 is placed at that position, otherwise 0 is placed.
[0075] In the present embodiment, a molecular structure graph is obtained according to the SMILES of the molecule, and the molecule is disconnected into functional groups based on the BRICS algorithm to obtain a graph G={V, E}, wherein the node set V includes two types of nodes, i.e., atom nodes a and functional group nodes p; and the edge set E includes three types of edges, i.e., edge type a-b-a between atom nodes, edge type p-r-p between functional groups, and edge type a-x-p between atoms and functional groups. The atom node a is attached with a feature vector composed of the 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 of the atom, which are saved as the fields of the node a. The functional group p is attached with a feature vector composed of chemical features, MACCS keys, and molecular word vector representation. The edge type a-b-a between atom nodes is attached with one-hot encoding of the bond information (i.e., connection type) between atoms. The edge type p-r-p between functional groups is attached with one-hot encoding of the types of two atoms connected by the bond. They are respectively represented as:
[0076] ;
[0077] ;
[0078] ;
[0079]
[0080] In the formula, represents the feature vector of the atom node a, represents the atomic number of the atom, represents the total degree of the atom, represents the charge number 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, represents whether the atom is an aromatic atom, represents the atomic mass of the atom; represents the feature vector of the functional group node p, represents the chemical features, represents the MACCS keys, represents the molecular word vector representation; represents the edge type between atom nodes, represents one-hot encoding of the bond information (i.e., connection type) between atoms; represents the edge type between functional groups, one-hot encoding representing two types of atoms connected by a chemical bond.
[0081] (2) For the structure information of the functional groups in the molecular structure diagram, a fine-tuned large language model is used to generate a description text for each functional group, and a text encoder is used to encode it to obtain the text information of each functional group.
[0082] Further, as shown in Figure 3 , the construction process of the large language model mainly involves a pre-training stage and a supervised fine-tuning stage, and different stages require different sizes of data sets and different types of algorithms, which will produce different types of models, and the resources required also have very big difference. 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 fine-tune the pre-trained large language model Qwen2.5-7b using LoRA (Low-Rank Adaptation) to obtain the fine-tuned large language model Qwen2.5-7b for generating the description text of the functional group. Among them, when using SMILES-text data to fine-tune the pre-trained large language model Qwen2.5-7b using LoRA, data derived from the LPM-24 dataset or chebi-20 dataset can be used. The data used contains three fields, namely instruction (instruction), input (input) and output (output) fields. The Instuction 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 in the LPM-24 dataset and the SMILES field in the chebi-20 dataset as input. Extract the caption field in the LPM-24 dataset and the description field in the chebi-20 dataset as output.”. The instruction field and the input field are input into Qwen2.5-7b, and the dialogue template embedding is obtained: “[INPUT]<|im_start|>system;
[0083] You are a helpful assistant.<|im_end|>;
[0084] <|im_start|>user;
[0085] 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;
[0086] {input}<|im_end|>;
[0087] <|im_start|>assistant;
[0088] {output}”. In this dialogue template, input and output are fields in the extracted data set, and the content in output will be used as the label during the training of Qwen2.5-7b. The dialogue template is the input during the training of Qwen2.5-7b. The molecule in the fine-tuning process is provided by the data set, and the generated description text is for the entire molecule.
[0089] It should be understood that Qwen2.5-7b is a pre-trained large language model with basic language generation and dialogue capabilities. Fine-tuning is to make it learn the knowledge in the field of molecules in this invention, so that the content of the answer is more in line with the needs of the molecular field task.
[0090] It should be noted that LoRA is a high-efficiency model fine-tuning technology, which aims to reduce the parameter amount 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 keep most of the parameters of the pre-trained model unchanged, and by adding low-rank matrices to simulate the amount of parameter changes, thereby adapting to specific tasks.
[0091] Further, for the structure information of the functional groups in the molecular structure graph, the fine-tuned large language model is used to generate the description text of each functional group. Since the description text of the functional group cannot be directly used as the feature information of the node, a text encoder is used to encode the description text of the functional group, and the encoded vector is used as the text information of the functional group. The text information is used as the feature information of the text node in the molecular structure graph.
[0092] Further, the text information includes input identifiers (Input_ids) and attention masks (Attention_mask), which are obtained by a text encoder, and the text encoder uses a small language model SciBERT. SciBERT is a BERT model pre-trained using a total of 1.14 million scientific papers in the fields of biomedicine and computer science, and is more suitable for natural language processing tasks in the field of scientific papers. The tokenizer in SciBERT is a core component for converting raw text into a format that SciBERT can process in natural language processing. The tokenizer can split continuous natural language text (such as sentences, paragraphs, etc.) into discrete basic units (tokens) through a specific algorithm, and then convert the original text into a digital sequence that the model can understand, where each number corresponds to a unique tokenID in the vocabulary of the model. The input of SciBERT is a natural language text sentence, which is then tokenized, mapped to the vocabulary, and finally obtains the output encoding vector, which is used as the text information of the functional group. Input_ids is part of the output of the tokenizer in SciBERT, and each element is an integer representing the index of each token in the input sequence. These indexes are generated based on the vocabulary in SciBERT. Attention_mask is also part of the output of the tokenizer in SciBERT, and each element is an integer with a value of 0 or 1, indicating whether the token at the corresponding position should be paid attention to; a value of 1 indicates that the token at the position is a valid input, and a value of 0 indicates that the position is a padding token, which is added by adding meaningless symbols (usually [PAD]) to make all input sequences uniform in length.
[0093] (3) Adding text nodes and feature information to the molecular structure graph obtained in step (1), and adding edges between the text nodes and their corresponding functional groups to obtain a final version of the molecular structure graph; wherein the feature information of the text node is the text information of the corresponding functional group.
[0094] In this embodiment, the fine-tuned Qwen2.5-7b is used to generate the corresponding description text of the functional group in the molecular structure graph, and SciBERT is used to encode the description text of the functional group to obtain the text information of the functional group. Each functional group corresponds to a text node, and the text node t representing the functional group text is added to the molecular structure graph, and the edge p-x-t between the functional group node and the text node is added. The text 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:
[0095] ;
[0096] wherein, represents the feature information of the text node, represents the language model SciBERT, represents the description text of the functional group.
[0097] In one possible implementation, the molecular structure graph includes: atom nodes, functional group nodes, text nodes, and edges composed of inter-atomic chemical bonds, edges composed of chemical bonds connecting functional groups, edges composed of connections between functional groups and atoms contained therein, and edges composed of connections between functional groups and corresponding text nodes.
[0098] (4) The final version of the molecular structure graph 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, respectively, and use the multilayer perception therein to fuse the information of the three dimensions to obtain the final prediction result, i.e., the prediction result of the molecular property.
[0099] In this embodiment, the molecular property predictor is constructed based on a graph neural network (GNN), and specifically includes three message passing neural networks (MPNN) for processing the information of atoms, functional groups, and text in the final version of the molecular structure graph, respectively, and a multilayer perception (MLP) for obtaining the prediction result of the molecular property, as shown in Figure 2 . Each message passing neural network includes two stages of message passing stage and readout stage, and the message passing stage includes three stages of message generation stage, message aggregation stage, and node update stage. As shown in Figure 4As shown, 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 (Multi-Head Attention) for calculating the message according to the feature vector of the edge and the feature vector of the adjacent node; the purpose of passing the message in the message generation stage is to pass the information required by the node when calculating to the node, so for each edge, each source node will pass the feature vector of the source node and the feature vector of the edge to the destination node; for each destination node, it may receive messages from multiple source nodes, and it will store these messages in the mailbox. In the message aggregation stage, each node aggregates all the messages it receives by using an aggregation function, and the aggregation function is summation, and the purpose is to update the feature vector of the node according to the messages passed by the neighbor nodes. For each node, it first aggregates the messages passed by the message function from the mailbox and clears the messages in the mailbox. In the node update stage, each node updates the original feature vector of the node by using the aggregated message through an update function, wherein the update function is a linear function implemented by a multi-layer perception machine; the node combines the aggregated result and the original feature vector of the node to update the original feature vector of the node. In the node update stage, the parameters of the message function are the edges, including the feature information of the source node and the target node, and the processed data is placed in the mailbox of the node. In the readout stage, a gated recurrent unit (Gated Recurrent Unit, GRU) is used. Finally, the output results of the three message passing neural networks are obtained after passing through the last multi-layer perception machine to obtain the prediction results of the molecular properties.
[0100] It should be noted that GNN is a kind of deep learning model specially used for processing graph structure data, which can capture the complex relationship between nodes in the graph. The core of GNN is to learn the representation of nodes and graphs by iteratively passing and aggregating the feature information of nodes and their neighbors. This GNN model not only considers the features of the nodes themselves, but also fully utilizes the connection relationship between the nodes, so that the state update of each node depends on the information of its adjacent nodes.
[0101] MPNN is a neural network framework for processing graph structure data, and its core idea is to regard the nodes in the graph as message passers through a message passing mechanism, and to realize the deep feature extraction of the graph structure data by converting the message passing process between the nodes and their neighbor nodes into the forward propagation process of the neural network.
[0102] MLP is a kind of feedforward neural network model, which is composed of multiple neuron layers, usually including an input layer, one or more hidden layers and an output layer. MLP learns the relationship between input data and target output by adjusting the weights and biases between neurons, so as to realize complex nonlinear mapping.
[0103] Multi-head attention mechanism is a core component in the Transformer model, aiming to enhance the model's expressive power and generalization ability 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.
[0104] GRU is a variant of Recurrent Neural Network (RNN) designed to address the gradient vanishing and exploding problems that traditional RNNs often encounter when processing long sequence data. GRU effectively solves these problems by introducing a gating mechanism, while maintaining the simplicity of the structure, making it perform well in many tasks. GRU contains two important gating mechanisms: reset gate and update gate.
[0105] Further, when the message passing neural network is used to process the information of the atoms in the final version of the molecular structure graph, the processed information includes: the feature vector of the atom node , the feature vector of the functional group node , and the edge feature information between the atom nodes . The feature vectors of the nodes and the edge feature information are passed through the corresponding message passing neural network and finally saved in the molecular structure graph.
[0106] Specifically, the atomic information learning framework based on the message passing neural network is as shown in Figure 5 In this framework, the edge feature message is generated by a message generation function and passed to adjacent nodes. Specifically, the message generation function calculates the message based on the edge features and the features of the connected nodes, thereby capturing the local interaction information between nodes. For each node, the system uses an aggregation function to integrate its own feature information , with all the messages received from adjacent nodes. The aggregation function usually uses summation operation to ensure that the node can integrate the information of its local environment. Subsequently, the feature information of the nodes and edges is updated by an update function, thereby generating new node representations and edge representations. The update function is a linear function, usually implemented by a multi-layer perceptron, to capture complex nonlinear relationships. Through multiple iterations of the above message passing, aggregation and updating process, the node can gradually integrate the information from its multi-hop neighbors, thereby learning the global graph structure information.
[0107] Further, when the message passing neural network is used to process the information of the functional groups in the final version of the molecular structure graph, the processed information includes: the feature vector of the atom node , the feature vector of the functional group node , the edge feature information between the atom 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 stored in the molecular structure diagram.
[0108] Specifically, the functional group information learning framework based on message-passing neural networks is as follows: Figure 6 As shown, in this framework, the feature messages of the edges , Messages are generated using a message generation function and passed to neighboring nodes. Specifically, the message generation function calculates messages based on the characteristics of edges and connected nodes, thereby capturing local interaction information between nodes. For each node, the system uses an aggregation function to extract its own feature information. , The system integrates all received messages from neighboring nodes. The aggregation function typically employs a summation operation to ensure that nodes can synthesize information from their local environment. Subsequently, the system updates the feature information of nodes and edges using an update function, generating new node and edge representations. The update function is typically implemented using a multilayer perceptron to capture complex nonlinear relationships. Through multiple iterations of the message passing, aggregation, and update processes, nodes can progressively integrate information from their multi-hop neighbors, thereby learning global graph structure information.
[0109] Furthermore, when the message-passing neural network is used to process textual information in the final molecular structure diagram, the information processed 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 Edge feature information between functional groups and their corresponding text nodes The feature vectors and edge feature information of the nodes are transmitted through the corresponding message passing neural network and finally stored in the molecular structure diagram.
[0110] Among them, the edge feature information between functional groups and their corresponding text nodes Specifically, this is obtained through the following method: representing the molecular word vectors from the functional group information. and the feature vectors of the text nodes connected to it Perform cross-calculation, that is, represent the molecular word vectors in the functional group information separately. and the feature vectors of text nodes After passing through an MLP and layer normalization, the product yields the degree of matching between the functional group structure and the text, i.e., the hidden layer features serve as the edge feature information between the functional group and its corresponding text node. , is represented as:
[0111] ;
[0112] ;
[0113] ;
[0114] wherein, represents the feature vector of the text node the output result after passing through an MLP and layer normalization, represents the molecular word vector representation in the functional group information the output result after passing through an MLP and layer normalization, represents layer normalization, represents matrix multiplication.
[0115] Specifically, the functional group information learning framework based on message passing neural network is as shown in Figure 7 , in which the feature messages of the edges , , are generated by a message generation function and passed to the adjacent nodes. Specifically, the message generation function calculates the message according to the features of the edge and the features of the connected nodes, so as to capture the local interaction information between nodes. For each node, the system will use an aggregation function to integrate its own feature information , with all the messages received from adjacent nodes. The aggregation function usually adopts summation operation to ensure that the node can integrate the information of its local environment. Subsequently, the system updates the feature information of the node and the edge by an update function, thereby generating new node representation and edge representation. 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 the information from its multi-hop neighbors, thereby learning the global graph structure information. As can be seen from the above, three message passing neural networks are used to extract the information of atoms, functional groups and text respectively, and then the last MLP is used to obtain the prediction result of the molecular property, as shown in the following formula:
[0116] ;
[0117] ;
[0118] ;
[0119] ;
[0120] wherein, , , respectively extracted by three message passing neural networks, denotes a message passing neural network, denotes a prediction result of a molecular property, denotes a multi-layer perception.
[0121] In this embodiment, the molecular property predictor needs to be trained to obtain the trained molecular property predictor. During the training process, the loss function of the molecular property predictor uses the binary cross-entropy loss function, the optimization objective is to minimize the loss function of the molecular property predictor, the network parameters in the molecular property predictor are adjusted and optimized, the Adam optimizer is used for optimization, and the Noam learning rate scheduler is used. The loss function of the molecular property predictor is calculated based on the prediction result of the molecular property output by the molecular property predictor and its corresponding true label, and the true label of the molecular property is annotated when collecting data. These are common training methods and will not be repeated here.
[0122] In summary, the present application combines graph neural networks and large language models to predict molecular properties. By using the general language ability of the large language model Qwen2.5-7b to generate enhanced functional group description text, and then using a small language model SciBERT as a text encoder. The graph neural network as the last molecular property predictor contains three message passing neural networks with attention mechanisms to extract atomic, functional group and text information, respectively. That is, the final version of the molecular structure graph 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 structure information and text information of the molecular structure graph. This method can combine multi-scale information and fully consider various information to improve the accuracy of property prediction.
[0123] In some other embodiments, in practical applications, using traditional experiments to predict the properties of molecules requires a lot of manpower and resources. With the development of artificial intelligence, more and more methods are used for molecular property prediction. One solution is to consider molecules as graph structures and use graph neural networks for prediction, and another solution is to represent molecules in the form of strings. However, both methods only predict from the perspective of the entire molecule, while molecules are composed of functional groups, and the properties of functional groups largely determine the properties of molecules. Moreover, most information about molecules is recorded in the form of text, and existing solutions cannot predict from the perspective of functional groups combining structure information and text information.
[0124] To solve the above problems, the embodiment provides a molecule property prediction method and device based on a graph neural network and a large language model, which can improve the accuracy of molecule property prediction. The molecule property prediction device based on the graph neural network and the large language model is used to implement the molecule property prediction method based on the graph neural network and the large language model in the above embodiment. The device includes a molecule graph extraction module, a text prediction module, a molecule structure graph perfecting module, and a property prediction module, as shown in Figure 8 The SMILES of the molecule is subjected to the molecule graph extraction module to obtain a molecule structure graph with atomic and functional group information. The molecule structure graph is subjected to the text prediction module to obtain text information of each functional group. The molecule structure graph extracted by the molecule graph extraction module and the text information of each functional group output by the text prediction module are subjected to the molecule structure graph perfecting module to obtain a final version of the molecule structure graph with atomic, functional group, and text information. The final version of the molecule structure graph is subjected to the property prediction module to obtain a prediction result of the molecule property for application in a downstream task.
[0125] In the embodiment, the molecule graph extraction module is used to obtain a molecule structure graph according to the SMILES of the molecule; wherein the molecule structure graph includes structural information of atoms and functional groups.
[0126] In the embodiment, the text prediction module is used to generate a description text of each functional group by using a fine-tuned large language model for the structural information of the functional group in the molecule structure graph, and encode the description text by using a text encoder to obtain text information of each functional group. Specifically, the structural information of the functional group in the molecule structure graph output by the molecule graph extraction module is input to the text prediction module. The text prediction module generates a description text of the functional group by using the fine-tuned large language model, and encodes the description text of each functional group by using the text encoder to generate corresponding text information of each functional group.
[0127] In the embodiment, the molecule structure graph perfecting module is used to add a text node and feature information in the molecule structure graph obtained by the molecule graph extraction module, and add an edge between the text node and the corresponding functional group to obtain a final version of the molecule structure graph; wherein the feature information of the text node is the text information of the corresponding functional group.
[0128] In the embodiment, the property prediction module is used to input the final version of the molecule structure graph output by the molecule structure graph perfecting module to a trained molecule property predictor to obtain a prediction result of the molecule property.
[0129] Exemplarily, the molecular property prediction method and device of the present application are used in the development of drugs for human body. For example, BACE-1 is an important target for Alzheimer's drug research, and it is necessary to know whether the molecule has an inhibitory effect on BACE-1 in drug development. Specifically, the SMILES expression of the molecule is input into the molecular graph extraction module to obtain the 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, the molecule has an inhibitory effect on BACE-1, and its data change process is shown in FIG. 8. Figure 9
[0130] The molecular structure graph obtained after the molecule passes 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. The molecular graph obtained by this method contains two types of nodes, atoms and functional groups, and three types of edges, atom-atom, functional group-functional group, and atom-functional group. The atomic number, degree, charge number, chirality information, total number of hydrogen atoms, hybridization type, whether it is an aromatic atom, and atomic mass of the node and edge feature information can be obtained from the database of RDKit. The bond type, maccs key, inter-atomic bond type, and inter-functional group bond type of the functional group can be calculated using the methods provided by RDKit, and the mol2vec vector of the functional group is calculated by the mol2vec library.
[0131] In the text prediction module, the large language model used is Qwen2.5-7b, and 30,000 SMILES-text data are used for LoRA fine-tuning to make the text generation result of the model more accurate. The four functional groups extracted in the molecular graph extraction module are used as the input of the text prediction module to obtain the corresponding text information describing the properties of the functional groups.
[0132] Through the molecular structure graph refinement module, four text type nodes are added to the molecular graph, and SCIBERT is used to encode the text as the feature information of the text node. The text is added to the edge corresponding to the functional group, and the product of the information of the functional group and the text encoding information is used as the edge feature information. The molecular graph containing text is obtained.
[0133] The property prediction module includes three message passing neural networks, which learn the information of atoms, functional groups and text respectively. The message passing neural network uses a multi-head attention mechanism to generate messages and pass them to adjacent nodes. These messages are stored in a mailbox. Then, the messages passed by the message function are aggregated from the mailbox using a summation aggregation function. The nodes are then updated using a linear function. Finally, the results of each message passing neural network are read out using a GRU. The results of the three message passing neural networks are used to calculate the final prediction result using an MLP.
[0134] The above examples are only used to illustrate the technical solutions of the present application, but not limit it; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for predicting molecular properties based on graph neural networks and large language models, characterized in that, Specifically, it includes: Molecular structure diagrams are obtained based on the smils of the molecules; these diagrams include structural information about 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 a text encoder is used to encode it to obtain the text information of each functional group. Text nodes and feature information are added to the molecular structure diagram, and edges are added between the text nodes and their corresponding functional groups to obtain the final version of the 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 predicted molecular properties.
2. The molecular property prediction method based on graph neural networks and large language models according to claim 1, characterized in that, The acquisition of the molecular structure diagram specifically includes: Obtain the atomic structure diagram of the molecule based on its smiles; The BRICS algorithm is used to break the specified chemical bonds of the molecule, splitting the molecule into a functional group diagram composed of functional groups, where 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 diagram of the connection between atoms and functional groups. Atomic structure diagrams, functional group diagrams, and atom-functional group diagrams are combined to form molecular structure diagrams. In the molecular structure diagram, nodes contain atoms and functional groups, and edges contain chemical bonds between atoms, chemical bonds between functional groups, and edges connecting functional groups to their contained atoms. Atomic and functional group information of molecules are used as feature information of nodes in molecular structure diagrams; chemical bond information between atoms and chemical bond information between functional groups are used as feature information of edges in molecular structure diagrams.
3. The molecular property prediction method based on graph neural networks and large language models according to claim 2, characterized in that, 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 formed by splicing all the atomic information is used as the feature vector of the atom in the molecular structure diagram. The functional group information includes chemical features, MACCS keys, and molecular word vector representations; The information on chemical bonds between atoms includes the type of chemical bond, conjugated chemical bonds, ring chemical bonds, and the stereoconfiguration of the chemical bonds; The information on chemical bonds between functional groups includes the types of broken chemical bonds.
4. The molecular property prediction method based on graph neural networks and large language models according to claim 1, characterized in that, The finely tuned large language model is obtained through the following method: First, a pre-trained large language model Qwen2.5-7b is obtained. Then, LoRA fine-tuning of the pre-trained large language model Qwen2.5-7b is performed using collected SMILES-text data to obtain a fine-tuned large language model Qwen2.5-7b, which is used to generate descriptive text for functional groups.
5. The molecular property prediction method based on graph neural networks and large language models according to claim 1, characterized in that, The text information includes input identifiers and attention masks, which are obtained through a text encoder that uses the SciBERT language model.
6. The molecular property prediction method based on graph neural networks and large language models according to claim 1, characterized in that, The molecular property predictor is constructed based on a graph neural network, specifically comprising three message-passing neural networks for processing information from atoms, functional groups, and text in the final molecular structure diagram, and a multilayer perceptron for obtaining the predicted molecular properties. Each message-passing neural network includes a message-passing phase and a readout phase. The message-passing phase includes a message generation phase, a message aggregation phase, and a node update phase. In the message generation phase, each node sends the message generated by the message generation function to its neighboring nodes. The message generation function is implemented using a multi-head attention mechanism to calculate the message based on the feature vectors of the edges and the feature vectors of the neighboring nodes. In the message aggregation phase, each node aggregates all the messages it receives using an aggregation function, which is a summation function. In the node update phase, each node updates its original feature vector using the aggregated messages through an update function, which is a linear function implemented using a multilayer perceptron. The readout phase is implemented using a gated recurrent unit. The outputs of the three message-passing neural networks are then passed through the final multilayer perceptron to obtain the predicted molecular properties.
7. The molecular property prediction method based on graph neural networks and large language models according to claim 6, characterized in that, When the message-passing neural network is used to process atomic information in the final molecular structure diagram, the processed information includes: feature vectors of atomic nodes, feature vectors of functional group nodes, and edge feature information between atomic nodes; the feature vectors and edge feature information of nodes are passed through the corresponding message-passing neural network and finally stored in the molecular structure diagram.
8. The molecular property prediction method based on graph neural networks and large language models 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 molecular structure diagram, the information processed includes: feature vectors of atomic nodes, feature vectors of functional group nodes, edge feature information between atomic nodes, and edge feature information between functional group nodes; the feature vectors and edge feature information of nodes are passed through the corresponding message-passing neural network and finally stored in the molecular structure diagram.
9. The molecular property prediction method based on graph neural networks and large language models according to claim 6, characterized in that, When the message-passing neural network is used to process text information in the final 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 and edge feature information of nodes are passed through the corresponding message-passing neural network and finally stored in the molecular structure diagram. Specifically, the edge feature information between functional groups and their corresponding text nodes is obtained through the following method: cross-calculate the molecular word vector representation in the functional group information and the feature vector of the connected text node to obtain the hidden layer features as the edge feature information between the functional group and its corresponding text node.
10. An apparatus for implementing the molecular property prediction method based on graph neural networks and large language models as described in any one of claims 1-9, characterized in that, include: The molecular diagram extraction module is used to obtain molecular structure diagrams based on the smiles of a molecule; the molecular structure diagram includes 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 finely tuned large language model, and then encodes 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 version of the 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 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