Molecular performance prediction method and system based on layered characterization
By constructing a multi-level graph structure and hierarchical information interaction mechanism, the problem of insufficient information fusion in multimodal molecular representation learning is solved, and efficient expression of molecular representation and accurate prediction of molecular properties are achieved.
Patent Information
- Application Number
- CN202510910471.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-10-17
AI Technical Summary
Existing technologies have difficulty achieving efficient information fusion and interaction under multimodal conditions in molecular representation learning, resulting in insufficient model perception of key structural features, limiting the expressiveness of molecular representations and the accuracy of downstream property predictions.
A multi-level graph structure is constructed, and a directed self-attention mechanism and an inter-layer masked multi-head attention propagation module are adopted. A hierarchical information interaction mechanism is designed, and multi-layer semantic fusion and interaction are performed through a hierarchical graph representation fusion module to enhance the expressive power of molecular representation.
It realizes multi-scale information fusion and interaction between the atomic layer, group layer and molecular layer, improves the expressive power of molecular representation and the generalization performance of the model, promotes the coordinated expression of local fine-grained structure and global semantics, and improves the accuracy of molecular performance prediction.
Smart Images

Figure CN120808912A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of molecular property prediction, and particularly relates to a molecular property prediction method and system based on hierarchical representation. BACKGROUND
[0002] With the continuous development of deep learning technology, data-driven molecular property prediction methods have gradually replaced traditional experimental or rule-driven methods, and have made significant progress in drug screening, toxicity prediction, and material design. In particular, the widespread application of graph neural networks and sequence-based models (such as Transformers) has made it possible to automatically extract useful features from structured and unstructured molecular data, greatly improving the efficiency and accuracy of molecular property prediction. SMILES sequences have advantages in encoding global semantics, making it easy for models to capture long-range dependency information; molecular graphs are more consistent with real atomic connection relationships and are suitable for modeling local structural features. Both provide important information about molecular structure and properties from different angles. However, in practical applications, molecules often have semantic structural hierarchy (such as functional groups, ring structures, etc.) and modality diversity (such as graph structure and linear representation), so single-modality and single-level modeling methods cannot fully exploit the multi-dimensional semantics of molecules, limiting the representation ability and generalization performance of the model.
[0003] Therefore, researchers have begun to introduce multi-modal fusion strategies into molecular representation learning, jointly modeling graph structure and SMILES sequence information to integrate complementary features from different modalities and improve the predictive ability of the model. Some methods achieve modality fusion through simple feature concatenation or attention mechanisms, while others attempt to build structure-level representations to enhance molecular-level modeling capabilities. However, these methods still face the following challenges: First, most existing methods only perform shallow fusion at the representation level, lacking deep alignment of multi-layer semantic structures between different modalities, and failing to fully integrate atomic-level, substructure-level, and molecular-level semantics layer by layer, resulting in limited fusion effectiveness. Second, existing models mostly fail to model and highlight key semantic information in the structural hierarchy, causing the semantic weight of important substructures to be diluted during the fusion process, which is not conducive to the model's perception of key structural features. Therefore, the key problem in molecular representation learning is how to construct a fusion network with structural hierarchical modeling capability under multi-modal conditions, effectively integrate and interact information between different modalities and different semantic levels, thereby improving the expressiveness of molecular representation and enhancing the performance of the model in downstream property prediction tasks. SUMMARY
[0004] In view of the deficiencies of the prior art, the purpose of the present application is to provide a molecular property prediction method and system based on hierarchical representation, which solves the problems in the prior art.
[0005] The object of the present application can be achieved by the following technical solutions:
[0006] A molecular property prediction method based on hierarchical representation, comprising the following steps:
[0007] Based on the molecular graph structure and the SMILES sequence, a multi-level graph structure is constructed, including the atom layer, the group layer and the molecule layer;
[0008] A hierarchical information interaction mechanism combining intra-layer aggregation and inter-layer information transmission is designed, and the semantic fusion of the multi-layer structure is performed to obtain the representation of the atom layer, the group layer and the molecule layer;
[0009] Based on the attention mechanism, a hierarchical graph representation fusion module is constructed to differentially fuse the representations of the atom layer, the group layer and the molecule layer, automatically strengthen the expression of key structural features, and construct a unified fused molecular representation;
[0010] A loss function for the prediction task is constructed, the fused molecular representation is input into a fully connected neural network prediction model, the mapping relationship between the fused molecular representation and the molecular property is learned through training, and end-to-end molecular property prediction is realized.
[0011] Further, the calculation process of the representation of the atom layer is:
[0012] The directed self-attention mechanism is used to update each directed bond :
[0013]
[0014] Wherein, ε ij is a set containing all other incident directed bonds of the current bond and its source atom, and are the hidden representations of the directed bond in the tth and (t+1)th message interaction steps respectively; DSA represents the directed self-attention mechanism;
[0015] Each atom i aggregates messages from all its incident directed bonds through a multi-head attention mechanism:
[0016]
[0017] Wherein, is the representation vector of atom i after the (t+1)th message interaction, a represents an atom; AttUpdate is a feature aggregation function based on the multi-head attention mechanism, which is used to adaptively integrate messages from each directed bond according to the attention weight; is the representation vector of atom i at the tth message interaction, a directed bond pointing from atom j to atom i the representation after the t+1th update; the set of neighboring atoms of atom i, i.e., all atom indices that have a bond connection with atom i;
[0018] introducing a learnable global atom virtual node aggregating global atom features through the following readout operation:
[0019]
[0020] where, is the representation of global atom layer virtual node after the t+1th message passing; Readout is a global aggregation function based on multi-head attention mechanism, which is used to guide the virtual node to selectively integrate structural information from all atom nodes ; n is the number of atom nodes in the current molecule;
[0021] concatenating and mapping all global atom node features in the T-layer message passing to obtain the representation of atom layer:
[0022]
[0023] where, h atom is the representation of atom layer, φ is a learnable nonlinear projection function; T is the total number of iteration steps of message passing mechanism, is the embedding representation of atom-level virtual node in the tth iteration; || represents the concatenation operation of features in different rounds.
[0024] Further, the calculation process of the representation of the group layer is:
[0025] The DSA mechanism is used to model the relevance between structural fragments, and each group node i is updated as follows in the t+1th iteration:
[0026]
[0027] where, is the updated representation of the ith group node in the t+1th iteration, m represents the group; is the representation of the ith group node in the tth iteration, which is the input of the current iteration update; E m is the edge set between group nodes in the group graph constructed based on chemical connection, which is used to define the neighbor range that each node can interact under the DSA mechanism;
[0028] aggregating all group features through global group virtual nodes to obtain the representation of the group layer:
[0029]
[0030] where h motif is the representation of the group layer, is the global group feature obtained by aggregating the learnable global group virtual nodes in the t-th iteration.
[0031] Further, the representation of the molecule layer is aggregated by the inter-layer transfer mechanism from the group layer, where denotes the molecule layer embedding feature in the t-th step, and the representation of the molecule layer is obtained by fusing the T-layer molecule embeddings:
[0032]
[0033] where h c is the representation of the molecule layer.
[0034] 5. The hierarchical representation-based molecular property prediction method of claim 1, wherein the inter-layer transfer mechanism comprises an inter-layer propagation module based on a mask multi-head attention mechanism, and a basic propagation formula of the inter-layer propagation module is:
[0035]
[0036] wherein, denotes the node representation of the layer level l∈{atom layer, group layer, molecule layer} in the t-th step, and M l→l+1 is a binary mask matrix with a shape of N l+1 ×(N l +N l+1 ); N l and N l+1 are the numbers of nodes in the l-th layer and the l+1-th layer, respectively; is an inter-layer propagation function; is the updated representation of each node in the layer level l+1 in the t+1-th iteration after fusing the low-layer node and the previous state of itself; is the node representation from the layer level l in the t+1-th iteration, which is used as the information source in the current cross-layer propagation.
[0037] Further, the hierarchical graph representation fusion module constructs a hierarchical attention framework based on a keyless attention mechanism, first models three types of cross-layer semantic interaction relationships of atom-group, group-molecule, and atom-molecule, respectively, to obtain three interaction representations, and then further fuses the three interaction representations to generate a unified fused molecule representation
[0038] h am =KeylessAtt(h atom ,h motif )
[0039] h mc =KeylessAtt(h motif ,h c )
[0040] h ac =KeylessAtt(h atom ,h c )
[0041]
[0042] Among them, h atom is the characterization of the atomic layer, h motif is the characterization of the group layer, h c Characterization of the molecular layer; h am 、h mc 、h ac KeylessAtt is the interaction representation obtained by fusing the features of the atomic layer and the group layer, the group layer and the molecular layer, and the atomic layer and the molecular layer through the keyless attention mechanism.
[0043] A molecular property prediction system based on hierarchical characterization, comprising:
[0044] Multi-level graph structure construction unit: Based on the molecular graph structure and SMILES sequence, a multi-level graph structure is constructed, including atomic layer, group layer and molecular layer;
[0045] Hierarchical information interaction unit: Design a hierarchical information interaction mechanism that combines intra-layer aggregation with inter-layer information transfer, fuse multi-layer structural semantics, and obtain representations at the atomic, group, and molecular levels;
[0046] Fusion unit: A layered graph representation fusion module is constructed based on the attention mechanism to differentially fuse the representations of the atomic, group, and molecular layers, automatically enhance the expression of key structural features, and construct a unified fused molecular representation.
[0047] Prediction module: Construct a loss function for prediction tasks, input the fused molecule representation into a fully connected neural network prediction model, and learn the mapping relationship between the fused molecule representation and molecular properties through training to achieve end-to-end molecular performance prediction.
[0048] A computer storage medium stores a readable program. When the program is run, the program can instruct a computing device to execute the above-mentioned molecular property prediction method based on hierarchical characterization.
[0049] An electronic device comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0050] The memory is used to store at least one executable instruction, which makes the processor execute the operation corresponding to the above-mentioned molecular performance prediction method based on hierarchical representation.
[0051] A computer program product comprises computer instructions instructing a computing device to execute the operation corresponding to the above-mentioned molecular performance prediction method based on hierarchical representation.
[0052] The beneficial effects of the present application are:
[0053] 1. The present application designs a hierarchical message interaction mechanism based on a directed self-attention mechanism by constructing a multi-level molecular graph structure, realizes multi-scale information fusion and interaction between the atomic layer, the group layer and the molecular layer, and overcomes the problems of insufficient multi-modal feature fusion and missing hierarchical semantic interaction in the prior art. At the same time, by proposing an inter-layer mask multi-head attention propagation module, the efficient transmission and semantic alignment of information between different structure levels are effectively guaranteed, and the expression ability of molecular representation is enhanced.
[0054] 2. On the basis of the hierarchical graph representation, the present application proposes a bondless attention mechanism and constructs a hierarchical graph representation fusion module, which can dynamically aggregate the semantic interaction information of the three levels of atoms, groups and molecules, highlight key structural features and global semantics, and thus realize more accurate molecular performance prediction. This mechanism not only promotes the collaborative expression of local fine-grained structure and global semantics, but also improves the generalization ability and application stability of the model for complex molecular structures. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained without creative labor.
[0056] Figure 1 is a flow chart of the molecular performance prediction method based on hierarchical representation of the present application;
[0057] Figure 2 is a principle architecture diagram of the molecular performance prediction method of the present application. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0059] Molecular property prediction task aims to construct high-quality molecular representation by learning the structure and semantic features of molecules to support downstream prediction tasks such as classification or regression. Current mainstream methods usually use two modalities of information as model input, namely SMILES molecular linear representation sequence and molecular graph structure. Among them, SMILES (Simplified Molecular Input Line Entry System) encodes the molecular structure in the form of a string, which compresses the global syntax information of the molecule by rules such as atomic symbol, bond type and branching structure. Based on natural language processing technology, the semantic and structural features of the molecule on the global scale can be learned from the SMILES sequence; while the molecular graph structure is based on graph neural networks, which regards the molecule as a graph composed of nodes of atoms and edges of chemical bonds, and models the interaction between atoms through local message passing mechanism to capture the local structural features and topological correlation information of the molecule. Finally, the model will fuse the feature representations from the SMILES modality and the graph structure modality to form a unified molecular representation vector, which is input to the fully connected layer to realize the numerical prediction of the molecular properties, including regression tasks (such as solubility, activity value) or classification tasks (such as toxicity, reactivity, etc.). After training, the model needs to be tested on new molecules that have not been seen before, requiring accurate prediction of the target molecular attribute value and good generalization ability.
[0060] Embodiment 1
[0061] As shown in Figure 1 and Figure 2 , a molecular property prediction method based on hierarchical representation includes the following steps:
[0062] S1, based on the molecular graph structure and the SMILES sequence, a multi-level graph structure is constructed, including: atom layer, group layer and molecule layer;
[0063] Based on the atomic level, group level representation of the graph structure and the molecular level semantic features of the SMILES sequence, a multi-level molecular graph structure is constructed to model the semantic information from local to global in the molecular structure; in the molecular property prediction task, to realize multi-granularity feature extraction from local structure to global semantics, this embodiment proposes a multi-modal hierarchical molecular graph construction method, and the overall graph structure is composed of three parts of atom layer, group layer and molecule layer. This structure supports the model to extract representations and interact at different semantic levels, enhancing the molecular representation capability. The construction process of each level is described as follows:
[0064] 1) Atom layer construction
[0065] The molecule is modeled as a directed graph G=(V a ,E a), where V a is a set of atoms, E a is a set of chemical bonds; each bond is encoded as a directed edge (i→j) to preserve the direction information of the bond; each atom node i has an original feature vector Each chemical bond e ij has a feature vector The atom features are mapped to a unified embedding space by sharing a linear transformation, obtaining the atom initial hidden representation Further, the directional bond representation is constructed This representation fuses the features of the bond itself and its connected atoms, modeling the directionality of the bond, thus optimizing the information transmission process.
[0066] 2) Group layer construction
[0067] On the basis of the atom graph, the Breaking of Retrosynthetically Interesting Chemical Substructures (BRICS) molecular decomposition algorithm based on chemical rules is used to aggregate atoms into chemical functional substructures, constructing the group V m Each group node corresponds to a structural unit with chemical significance, and the edge connection matrix E m between groups is derived from the cross-group bonds broken in the original graph. The initial representation of the group is obtained by average pooling of the embedding representations of its contained atoms, forming a graph node representation at the level of structural units as input for subsequent information propagation and interaction.
[0068] 3) Molecule layer construction
[0069] At the global level, a molecular-level graph node representing the semantic of the molecule is constructed. By encoding the SMILES sequence through a pre-trained Transformer model (such as RoBERTa), a global sequence representation is obtained, forming the initial feature representation of the molecular-level node to provide global molecular semantic support.
[0070] S2, a hierarchical information interaction mechanism combining intra-layer aggregation and inter-layer information transmission is designed, and the multi-layer structure semantics are fused, obtaining the representation of the atom layer, the group layer, and the molecule layer;
[0071] The hierarchical information interaction mechanism aims to enhance the multi-level graph representation ability of molecular structure, and realize the information coordination and fusion between local interaction and global semantics by modeling the semantic relationship between different structure levels (atomic layer, group layer, molecular layer). The hierarchical information interaction mechanism consists of two parts: intra-layer aggregation and inter-layer transmission, and iteratively interacts for T rounds to realize information layer-by-layer fusion and global semantic enhancement.
[0072] 1) Intra-layer aggregation;
[0073] Intra-layer aggregation aims to model the semantic relationship within the structure at the atomic layer, group layer and molecular layer respectively, capture local interaction information at each layer, and retain the structural semantic features at different levels. The specific content includes:
[0074] 1.1) Atomic layer aggregation
[0075] The atomic layer models the fine-grained dependency between atoms and bonds through a two-stage directional attention propagation mechanism.
[0076] First, the directional self-attention mechanism (DSA) is used to update each directional bond , and the update process is as follows:
[0077]
[0078] where ε ij is a set containing all other incident directional bonds of the current bond and its source atom, and are the hidden representations of directional bond in the t-th and t+1-th message interaction steps, respectively; the specific process is as follows:
[0079] The attention weight is calculated by scaling the dot product attention, and the corresponding bond-level message aggregation is:
[0080]
[0081] where, is the attention weight between directional bond and its context bond q in the t+1-th message interaction step, is the linear projection matrix of the query vector in the t+1-th message passing, which is used to map the hidden representation of the directional bond to the query space, where Q e represents the edge of the query (Query) vector; represents the hidden representation of the context bond q in the t-th message passing, is the linear projection matrix of the key vector for the t+1-th message passing, used to map the hidden representation of the context key to the key space, where K e represents the edge of the key (Key) vector; D h is the dimension of the hidden representation, is the normalized attention weight, representing the degree of attention to the query key over the context key q; softmax is the standard normalization function, represents all context keys related to the attention weight of is the aggregated message vector, which is obtained by weighted summing the value vectors of the context keys, used to update the hidden representation of the directed key ; is the linear projection matrix of the value vector, used to map the hidden representation of the context key to the value space, where V e represents the edge of the value (Value) vector;
[0082] Finally, the key representation update is completed through the residual connection:
[0083]
[0084] where LayerNorm represents the layer normalization operation;
[0085] Then, each atom i aggregates messages from all its incident directed keys by multi-head attention mechanism, and updates its representation:
[0086]
[0087] where, is the representation vector of atom i after the t+1-th message interaction, a represents the atom; AttnUpdate represents a feature aggregation function based on multi-head attention mechanism, which is used to adaptively integrate messages from each directed key according to the attention weight; is the representation vector of atom i at the t-th message interaction; is the directed key from atom j to atom i after the t+1-th update; is the set of adjacent atoms of atom i, i.e., all atom indices that have a key connection with atom i;
[0088] To realize the extraction of atomic-level semantics, a learnable global atomic virtual node is introduced to aggregate global atomic features through the following readout operation:
[0089]
[0090] where, is the global atom layer virtual node representation obtained after the t+1th message passing, is the global atom layer virtual node representation obtained after the tth message passing, Readout is a global aggregation function based on multi-head attention mechanism, and n is the number of atom nodes in the current molecule, i.e., the total number of atoms;
[0091] Finally, all global atom node features in the t-layer message passing are spliced and mapped to realize the modeling of multi-scale atom-level interaction, and the atom layer representation is obtained:
[0092]
[0093] where, h atom is the representation of the atom layer, φ is a learnable nonlinear projection function, T is the total number of iteration steps of the message interaction (i.e., inter-layer information propagation) mechanism, is the embedding representation of the atom-level virtual node in the tth iteration, and || represents the splicing operation of different rounds of features.
[0094] 1.2) Group layer aggregation
[0095] In the group layer, the DSA mechanism is also used to model the relevance between structural fragments. Each group node i is updated in the t+1th iteration as follows:
[0096]
[0097] where, is the updated representation of the ith group node in the t+1th iteration, and m represents the group; is the representation of the ith group node in the tth iteration, which is the input of the current iteration update; E m is the edge set between group nodes in the group graph constructed based on the chemical connection relationship, which is used to define the neighbor range that each node can interact under the DSA (directional self-attention) mechanism;
[0098] The readout operation in the group layer is consistent with that in the atom layer, i.e., the global group virtual node is obtained by aggregating all group features, thereby obtaining the group layer representation:
[0099]
[0100] where, h motif is the representation of the group layer, is the global group feature obtained by aggregating the learnable global group virtual node in the tth iteration.
[0101] 1.3) Molecular layer polymerization
[0102] Molecular layer refers to the gradual convergence of group layers through interlayer transmission mechanism, wherein represents the molecular layer embedding feature of the t-th step. The final molecular layer representation is achieved by fusing the molecular embeddings of T layers, realizing global representation and multi-scale structure modeling of cross-layer information.
[0103]
[0104] wherein h c is the representation of the molecular layer; represents the molecular layer embedding feature of the t-th step.
[0105] 2) Interlayer transmission mechanism
[0106] To achieve efficient transmission and fusion of information between different levels of molecular structure, the embodiment proposes an interlayer propagation module based on a mask multi-head attention mechanism, which is used to sequentially complete the uplink message transmission from the atomic layer to the group layer and then to the molecular layer. The basic propagation formula of the interlayer propagation module is as follows:
[0107]
[0108] wherein, represents the node representation of level l∈{atomic layer, group layer, molecular layer} in the t-th step, and M l→l+1 is a binary mask matrix indicating the effective interlayer connection relationship (including the node self-loop), with a shape of N l+1 ×(N l +N l+1 ); N l and N l+1 are the number of nodes in the l-th layer and the l+1-th layer, respectively; (·) is an interlayer propagation function, is the representation of each node on the l+1-th level after updating by fusing the low-level nodes and the previous state of itself in the t+1-th iteration, is the node representation from the l-th level, which is used as the information source in the current cross-layer propagation in the t+1-th iteration;
[0109] Interlayer propagation function The multi-head mask attention mechanism is used to realize information interaction. Specifically, the upper layer node (such as a group or a molecule) is taken as a query item (Query), and key information is extracted from the structural associated lower layer node and the previous iteration layer representation of itself. The query is generated from the upper layer node representation, and the key (Key) and value (Value) are obtained by linear transformation after splicing the upper and lower layer node representations. The attention calculation process is strictly limited to the mask m l→l+1The defined connection relationship is only performed in an effective cross-layer connection area, so as to control information transmission range and keep structural semantic consistency.
[0110] S3, based on an attention mechanism, constructs a hierarchical graph representation fusion module, differentiates and fuses the representations of the atomic layer, the group layer and the molecular layer obtained in S2, automatically strengthens the expression of key structural features, and constructs a unified fused molecular representation.
[0111] In order to realize efficient fusion of multi-level graph structure representation, the present application proposes a hierarchical graph representation fusion module for fusing key information across layers while keeping structural semantics. The module uses an attention mechanism to differentially fuse multi-level structural information such as the atomic layer, the group layer and the molecular layer, automatically strengthens the expression of key structural features, and thus constructs a unified and information-rich fused molecular representation. Specifically, the calculation formula of the fused molecular representation is as follows:
[0112]
[0113] Wherein, h atom , h motif , h c represent the representations of the atomic layer, the group layer and the molecular layer respectively; and HGRF(·) represents the hierarchical graph representation fusion module.
[0114] The hierarchical graph representation fusion module constructs a hierarchical attention framework based on a keyless attention mechanism. First, three types of cross-layer semantic interaction relationships, i.e. atom-group, group-molecule and atom-molecule, are modeled respectively to obtain three interaction representations, so as to mine the potential semantic dependencies among multi-level structures. Then, the three interaction representations are further fused to generate a unified fused molecular representation
[0115] h am =KeylessAtt(h atom ,h motif )
[0116] h mc =KeylessAtt(h motif ,h c )
[0117] h ac =KeylessAtt(h atom ,h c )
[0118]
[0119] Wherein, h am , h mc, h ac The interactive representation obtained by fusing the atomic layer and the group layer, the group layer and the molecular layer, and the atomic layer and the molecular layer features through the keyless attention mechanism is denoted as S3, and KeylessAtt denotes the keyless attention mechanism.
[0120] The keyless attention mechanism fuses the input information x1, x2, …, x k , and performs weighted aggregation in the following manner:
[0121]
[0122] where e i is a linear mapping result of the input feature x i and a learnable weight parameter w, k is the number of input features, x i is each layer input feature to be fused, w is a learnable weight parameter, and λ i is a normalized attention weight. This mechanism does not need to explicitly construct a key and a query pair, can highlight the importance of the information source in a more concise manner, and realizes efficient aggregation of multi-scale structure representation.
[0123] S4, constructing a loss function for a prediction task, inputting the fused molecular representation constructed in S3 into a fully connected neural network prediction model, learning the mapping relationship between the fused molecular representation and the molecular property through training, and realizing end-to-end accurate prediction of the molecular performance.
[0124] Specifically, the fused molecular representation is input into a fully connected layer with learnable parameters, performs linear transformation, and obtains a prediction result of the molecular property , and the calculation manner is as follows:
[0125]
[0126] where FC(·) is a linear mapping function with learnable parameters, used to project the fused high-dimensional feature representation to the output dimension corresponding to the task.
[0127] For different types of molecular property prediction tasks, the prediction module adopts a differentiated loss function for supervised learning.
[0128] If the task is a classification task, a weighted binary cross-entropy loss function (Weighted Binary Cross Entropy Loss, BCE) is adopted, and the calculation manner of the loss function is as follows:
[0129]
[0130] where y is a real label of a sample, Sigmoid function, and a is a positive sample weighting factor.
[0131] If the task is a classification task, a mean squared error loss function (MSE) is used, and the loss function is calculated in the following manner:
[0132]
[0133] where y i and respectively represent the true value and the predicted value of the i-th sample, and N represents the total number of samples.
[0134] Through the above steps, the system completes supervised training of molecular properties based on the unified fused multi-level molecular representation, realizes accurate prediction of classification or regression for different task scenarios, and ensures effective improvement of prediction performance.
[0135] Based on the similar inventive concept, the embodiment of the present application also provides a computer storage medium, which stores a readable program, and when the program is run by a processor, the program can execute the above-mentioned molecular performance prediction method based on hierarchical representation.
[0136] Based on the similar inventive concept, the embodiment of the present application provides an electronic device, which comprises a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface complete communication with each other through the communication bus.
[0137] The memory is used to store at least one executable instruction, and the executable instruction makes the processor execute the operation corresponding to the above-mentioned molecular performance prediction method based on hierarchical representation.
[0138] Based on the similar inventive concept, the embodiment of the present application also provides a computer program product, which comprises computer instructions, and the computer instructions instruct a computing device to execute the operation corresponding to the above-mentioned molecular performance prediction method based on hierarchical representation.
[0139] Embodiment 2
[0140] Based on the molecular performance prediction method based on hierarchical representation proposed in embodiment 1, in the present embodiment, a molecular performance prediction system based on hierarchical representation is proposed, which specifically comprises:
[0141] A multi-level graph structure construction unit: based on the molecular graph structure and the SMILES sequence, a multi-level graph structure is constructed, including an atom layer, a group layer and a molecule layer;
[0142] A hierarchical information interaction unit: a hierarchical information interaction mechanism combining intra-layer aggregation and inter-layer information transmission is designed, multi-layer structure semantics are fused, and the representations of the atom layer, the group layer and the molecule layer are obtained.
[0143] Fusion unit: a hierarchical graph representation fusion module is constructed based on an attention mechanism, and the representations of the atomic layer, the group layer and the molecular layer are differentially fused, the expression of key structural features is automatically strengthened, and a unified fused molecular representation is constructed;
[0144] Prediction module: a loss function for a prediction task is constructed, the fused molecular representation is input into a fully connected neural network prediction model, the mapping relationship between the fused molecular representation and the molecular property is learned through training, and end-to-end molecular performance prediction is realized.
[0145] The method of the present application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium such as a CD ROM, a RAM, a floppy disk, a hard disk or a magneto-optical disk, or be downloaded through a network originally stored in a remote recording medium or a non-transitory machine-readable medium and stored in a local recording medium, so that the method described herein can be processed by such software on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware such as an ASIC or an FPGA. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component (for example, RAM, ROM, flash memory, etc.) that can store or receive software or computer code, which, when accessed and executed by the computer, processor or hardware, implements the method described herein. In addition, when a general-purpose computer accesses code for implementing the method shown herein, the execution of the code will convert the general-purpose computer into a special-purpose computer for executing the method shown herein.
[0146] The basic principles, main features and advantages of the present application are shown and described above. It should be understood by those skilled in the art that the present application is not limited by the above examples, and the above examples and descriptions in the specification are only to illustrate the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application.
Claims
1. A molecular property prediction method based on hierarchical characterization, characterized in that: The following steps are involved: Based on the molecular graph structure and SMILES sequence, a multi-level graph structure is constructed, including atomic layer, group layer and molecular layer; Design a hierarchical information interaction mechanism that combines intra-layer aggregation with inter-layer information transfer to fuse multi-layer structural semantics and obtain representations at the atomic, group, and molecular levels. A layered graph representation fusion module is constructed based on the attention mechanism to differentially fuse the representations of the atomic, group, and molecular layers, automatically enhance the expression of key structural features, and construct a unified fused molecular representation. A loss function for prediction tasks is constructed, the fused molecule representation is input into a fully connected neural network prediction model, and the mapping relationship between the fused molecule representation and the molecular properties is learned through training to achieve end-to-end molecular performance prediction.
2. A molecular property prediction method based on hierarchical characterization according to claim 1, characterized in that: The calculation process of the atomic layer characterization is: Use directed self-attention mechanism to To update: Among them, ε ij is the set of all other incident directed bonds of the current bond and its source atoms, and There are directional keys in the tth and t+1th message interaction steps respectively The hidden representation of ;DSA represents the directed self-attention mechanism; Each atom i is fed with all its incident directed bonds through a multi-head attention mechanism Aggregate messages: in, is the representation vector of atom i after the t+1th message interaction, a represents the atom; AttnUpdate is a feature aggregation function based on the multi-head attention mechanism, which is used to adaptively integrate messages from each directed key according to the attention weight; is the representation vector of atom i at the tth message interaction, is a directed bond from atom j to atom i Representation after the t+1th update; is the set of adjacent atoms of atom i, that is, the indices of all atoms that are bonded to atom i; Introducing a learnable global atomic virtual node Global atomic features are aggregated through the following readout operations: in, is the global atomic layer virtual node representation obtained after the t+1th message interaction; Readout is a global aggregation function based on the multi-head attention mechanism, which is used to guide the virtual node to Selectively integrate structural information; n is the number of atomic nodes in the current molecule; All global atomic node features in the T-layer message passing are concatenated and mapped to obtain the atomic layer representation: Among them, h atom is the representation of the atomic layer, φ is a learnable nonlinear projection function; T is the total number of iterations of the message interaction mechanism, is the embedding representation of the atomic virtual node in the tth iteration, and || represents the concatenation operation of features from different rounds.
3. The molecular property prediction method based on hierarchical characterization according to claim 2, characterized in that: The calculation process for characterization of the group layer is: The DSA mechanism is used to model the association between structural fragments. Each group node i represents the following update in the t+1 iteration: in, is the updated representation of the i-th group node in the t+1th iteration, and m represents the group; is the representation of the i-th group node in the t-th iteration, which is the input of the current iteration update; E m It is the edge set between each group node in the group graph constructed based on chemical connectivity, which is used to define the range of neighbors that each node can interact with under the DSA mechanism; Virtual nodes via global groups Aggregate all group features to obtain group-level representation: Among them, h motif For the characterization of the group layer, is the global group feature obtained by aggregating the learnable global group virtual nodes in the tth iteration.
4. The molecular property prediction method based on hierarchical characterization according to claim 2, characterized in that: The molecular layer representation is formed by the convergence of group layers through the interlayer transfer mechanism, where represents the molecular layer embedding feature at step t, and the molecular layer representation is achieved by fusing the molecular embedding of the T layer: Among them, h c Characterization of the molecular layer.
5. The molecular property prediction method based on hierarchical characterization according to claim 1, characterized in that: The inter-layer transfer mechanism includes an inter-layer propagation module based on a masked multi-head attention mechanism. The basic propagation formula of the inter-layer propagation module is: in, Represents the node representation of the level l∈{atomic layer, group layer, molecular layer} in the tth step, M l→l+1 is a binary mask matrix with a shape of N l+1 ×(N l +N l+1 );N l and N l+1 are the number of nodes in the lth layer and the l+1th layer respectively; is the inter-layer propagation function; In the t+1th iteration, each node on level l+1 is updated by fusing the lower-level nodes and its own state in the previous round; is the node representation from level l in the t+1th iteration, which is used as the information source in this round of cross-layer propagation.
6. The molecular property prediction method based on hierarchical characterization according to claim 1, characterized in that: The hierarchical graph representation fusion module builds a hierarchical attention framework based on the bondless attention mechanism. First, it models three types of cross-layer semantic interaction relationships: atom-group, group-molecule, and atom-molecule, and obtains three interaction representations. Then, it further fuses the three interaction representations to generate a unified fused molecule representation. h am =KeylessAtt(h atom ,h motif ) h mc =KeylessAtt(h motif ,h c ) h ac =KeylessAtt(h atom ,h c ) Among them, h atom is the characterization of the atomic layer, h motif is the characterization of the group layer, h c Characterization of the molecular layer; h am 、h mc 、h ac KeylessAtt is the interaction representation obtained by fusing the features of the atomic layer and the group layer, the group layer and the molecular layer, and the atomic layer and the molecular layer through the keyless attention mechanism.
7. A molecular property prediction system based on hierarchical characterization, characterized in that: include: Multi-level graph structure construction unit: Based on the molecular graph structure and SMILES sequence, a multi-level graph structure is constructed, including atomic layer, group layer and molecular layer; Hierarchical information interaction unit: Design a hierarchical information interaction mechanism that combines intra-layer aggregation with inter-layer information transfer, fuse multi-layer structural semantics, and obtain representations at the atomic, group, and molecular levels; Fusion unit: A layered graph representation fusion module is constructed based on the attention mechanism to differentially fuse the representations of the atomic, group, and molecular layers, automatically enhance the expression of key structural features, and construct a unified fused molecular representation. Prediction module: Construct a loss function for prediction tasks, input the fused molecule representation into a fully connected neural network prediction model, and learn the mapping relationship between the fused molecule representation and molecular properties through training to achieve end-to-end molecular performance prediction.
8. A computer storage medium storing a readable program, characterized in that: When the program is run, the program can instruct a computing device to execute a molecular property prediction method based on hierarchical characterization as claimed in any one of claims 1 to 6.
9. An electronic device, characterized in that: include: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the molecular property prediction method based on hierarchical characterization according to any one of claims 1 to 6.
10. A computer program product comprising computer instructions, characterized in that The computer instructions instruct the computing device to execute operations corresponding to the molecular property prediction method based on hierarchical characterization as described in any one of claims 1 to 6.
Citation Information
Cited By
Molecular attribute prediction method and system based on nuclear power charge sorting and KAN fusion
CN121281694A
A method and system for predicting molecular properties based on nuclear charge ordering and KAN fusion
CN121281694B