Fragment-level feature fusion method and system based on inverse synthesis fragment segmentation algorithm

By applying inverse synthesis fragment slicing algorithm and graph neural network in the field of drug discovery, molecular fragment libraries are generated and feature fusion is carried out, and the problem of single strategy of molecular characterization methods and scarcity of labeled data in the prior art is solved, and more accurate prediction of molecular properties is achieved.

CN119763726APending Publication Date: 2025-04-04NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411922658.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In existing drug discovery methods, molecular characterization methods rely on a single strategy, making it difficult to effectively capture the characteristics of molecular fragments, and the scarcity of labeled data limits the prediction accuracy of the GNN model.

Method used

A fragment-level feature fusion representation method based on the inverse synthesis fragment slicing algorithm is adopted to generate molecular fragment libraries through BRICS, RECAP and MacFrag algorithms, and a graph isomorphic network and GNN are used for encoding and feature fusion to achieve fragment-level comparison learning and feature fusion between molecules and fragments.

Benefits of technology

By integrating fragment-level comparison learning and feature information between molecules and fragments, the model can more accurately capture the multi-level correlation between molecular features and its fragments, improving the accuracy of molecular properties prediction, and better than other self-supervised learning baseline models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_4
    Figure SMS_4
  • Figure SMS_6
    Figure SMS_6
Patent Text Reader

Abstract

The invention discloses a fragment-level feature fusion method and system based on an inverse synthesis fragment segmentation algorithm, and the method comprises the following steps: firstly, generating three molecular fragment libraries and fragment representations through employing BRICS, RECAP and MacFrag algorithms based on inverse synthesis; then encoding fragment representations obtained by BRICS and RECAP, dividing positive and negative sample pairs according to an enhanced graph, redistributing weights of the negative sample pairs, and performing comparative learning; then encoding the molecular representation and fragment representations obtained by BRICS and MacFrag, and implementing a cross attention mechanism; and finally, calculating contrast loss and normalized temperature cross entropy loss based on the representation of the contrast learning and cross attention mechanism, obtaining a joint loss function, and carrying out subsequent tasks. On the basis of an inverse synthesis fragment segmentation algorithm, fragment structure contrast learning and feature fusion between molecules and fragments are considered at the same time, and molecular features of more levels and finer granularity can be captured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of drug discovery scenarios, and specifically relates to a fragment-level feature fusion representation method based on a retrosynthetic fragment segmentation algorithm. Background Art

[0002] In order to increase the speed and reduce the cost of drug screening, cheminformatics researchers have been building quantitative structure-activity relationships through machine learning methods. In recent years, a large number of deep learning methods have been applied to drug discovery because they have powerful feature extraction capabilities and flexibility in model structure compared to traditional machine learning methods. Molecular property prediction is a very important research topic in AI pharmaceutical manufacturing, which attempts to learn a function that maps structure to property values. Molecular property prediction, such as toxicity, blood-brain barrier permeability, etc., is the key to accelerating drug discovery, and the accuracy of its prediction depends on the selection of molecular features (also called molecular descriptors).

[0003] Two-dimensional graph representation is a common method for molecular characterization. Substructure and fragment descriptors can facilitate the analysis and prediction of the structure-activity relationship of molecules. There are a series of models that use substructures for molecular characterization. In addition, the scarcity of labeled data is one of the main obstacles that hinder the GNN model from predicting molecular properties. Self-supervised learning (SSL) has attracted much attention due to its good generalization ability in many fields, including graph contrastive learning. Existing graph contrastive learning methods usually use different data augmentation schemes for graphs, which may change the semantics of cross-domain graphs and destroy the natural structure of molecules. Most of the current methods are based on a single strategy. If multiple strategies are used to study molecular characterization, the characterization effect may be further optimized. In addition, the current fragment-based methods only use segmentation algorithms to obtain fragment representations, and do not explore the principles and functions of the fragment segmentation algorithm itself. BRICS and RECAP both obtain fragments by breaking chemical bonds related to retrosynthesis, while the activity and other properties of molecules are closely related to chemical reactions. Breaking chemical bonds related to them may more accurately extract key fragments and promote the prediction of molecular properties.

[0004] Therefore, a new fragment-level feature fusion representation method based on the retrosynthetic fragment segmentation algorithm is urgently needed. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention provides a fragment-level feature fusion representation method based on a retrosynthetic fragment segmentation algorithm, which can.

[0006] To solve the above technical problems, the present invention provides the following technical solution: a fragment-level feature fusion method based on a retrosynthetic fragment segmentation algorithm, comprising the following steps:

[0007] S1. Extract the feature information of each node and edge from the molecular graph, generate the molecular representation of the graph neural network input, use the BRICS algorithm and RECAP algorithm based on retrosynthesis to split the molecules into molecular fragments, and use the MacFrag algorithm to generate three molecular fragment libraries;

[0008] S2. Use the graph isomorphism network GIN to encode the fragment representations obtained by the BRICS algorithm and the RECAP algorithm, divide the positive and negative sample pairs according to the enhanced graph, redistribute the weights of the negative sample pairs, and perform comparative learning;

[0009] S3, use the GNN network to encode the molecular representation, the fragment representation obtained by BRICS, and the fragment representation obtained by MacFrag, and implement a cross-attention mechanism as three levels to obtain fusion features;

[0010] S4. After obtaining the representation of contrastive learning and the representation of the cross-attention mechanism, calculate the contrastive loss and normalized temperature cross entropy loss respectively, obtain the joint loss function, and carry out subsequent tasks.

[0011] Furthermore, the aforementioned step S1 is specifically as follows: extracting feature information of each node and edge from the molecular graph, and representing each molecule or fragment as a graph G = {V, E} with a number of nodes and edges, where V = {v1, v2, ..., v n} represents the set of atoms in a molecule, E = {e1, e2, …, e m} represents the set of chemical bonds between two atoms in a molecule; at the same time, the rdkit tool is used to segment the molecule using the BRICS algorithm and the RECAP algorithm, and the MacFrag algorithm is used to obtain the fragment library. The molecular fragment library is represented by the fragment set S G ={S1,S2,…,S T}, Q M = {Q1, Q2, ..., Q N} and R G = {R1, R2, ..., R P}; S T represents the representation of the Tth fragment obtained by the BRICS algorithm, Q N Represents the representation of the Nth segment obtained by the RECAP algorithm, R P It represents the representation of the Pth fragment obtained by the MacFrag algorithm.

[0012] Furthermore, the aforementioned step S2 includes the following sub-steps:

[0013] S2.1. Use the graph isomorphism network GIN to encode the fragment representation set obtained by the BRICS algorithm and the RECAP algorithm. Considering the edge features, the expanded node aggregation is as shown in formula (1):

[0014]

[0015] in, represents the aggregate feature vector of node v in the nth layer of GIN, ε uv It means to sum all neighboring nodes u of node v. represents the feature vector of the neighbor node u in the previous layer (n-1), N(v) represents the set of neighbor nodes of node v, σ(·) is a nonlinear activation function, ε uv Represents the edge features between node u and node v.

[0016] S2.2. By summing MLP, we get node embedding as shown in formula (2):

[0017]

[0018] in, Representation, the readout operation is implemented using average pooling of all nodes to obtain a graph representation of each molecular fragment;

[0019] S2.3, using the NT-Xent loss function, given 2N potential vectors {z1, ..., z 2N}From a group of N molecules, the positive pair (z i ,z j )’s NT-Xent loss function is shown in Equation (3). By minimizing Equation (3), the cosine similarity of the positive pair is expected to be the largest among all 2N-1 pairs;

[0020]

[0021] where τ is the temperature parameter,

[0022] S2.4, optimize the NT-Xent function, use MACCS fingerprint calculation BRICS and RECAP two segmentation algorithms to obtain the similarity between the fragments, negative sample pairs (M i ,M n ) of two latent vectors (z i ,z n ) is measured by the weight coefficient w in To compensate for the wrong negative sample pairs, as shown in formula (4).

[0023]

[0024] w in =1-λFPSim(M i ,M n )#(5)

[0025] Where w in ∈[0,1],FPSim(Mi ,M n ) Calculate given two samples (M i ,M n ), λ∈[0,1] is a hyperparameter that determines the degree of weight adjustment. The higher the λ, the more weight adjustment there is. When λ=0, no weight adjustment is performed.

[0026] Furthermore, in the aforementioned step S3, the fragment representation obtained by BRICS is specifically as follows: for a molecule, the molecule is represented by an undirected graph G = (V, E), where V represents a node set with |V| = N nodes, i.e., an atom set, and E≠V×V represents an edge set with M edges, i.e., a bond set. Suppose that for each node v i ∈V, edge e ij =(v i ,v j )∈E, initial attributes where d n is the node feature dimension, d e is the edge characteristic dimension. The BRICS algorithm decomposes G into a set of fragments, where the virtual atoms S = {S1, S2, ..., S p =BRICS(G);

[0027] The fragment representation obtained by MacFrag is as follows: MacFrag algorithm decomposes G into another set of fragments, where virtual atoms T = {T1, T2, ..., T q}=MacFrag(G).

[0028] Furthermore, the aforementioned step S3 includes the following sub-steps:

[0029] S3.1. The GNN-based model follows the message passing paradigm of message passing function, aggregation function and update function to iteratively extract atomic features. The nth layer of the message passing stage is expressed as:

[0030]

[0031] Among them, message, aggregate and update represent message delivery, aggregation and update functions respectively. is the hidden state of node i in layer (n-1), e ji is the feature vector of the edge from node j to node i, and N(i) defines the neighborhood set of node v;

[0032] S3.2, using the readout function, as shown in equation (8), the atomic feature set {h1 (K) , h2 (K) ,…,h N(K)}, and then calculate the numerator as shown in formula (9)

[0033]

[0034] Where N is the last iteration, and readout is a permutation invariant function acting on a set of nodes;

[0035] S3.3. Grouping BRICS segments G ={S1,S2,…,S T} and MacFrag fragment set R G = {R1, R2, ..., R P} is input into the GNN encoder. The encoders of the molecular graph and the fragment have the same network structure and weights, and two fragment representations are obtained. According to the h derived by the GNN encoder G and S G ={s1,s2…s T}, as the first and second layers, an additive attention mechanism is used to compute the attention scores for the set of fragments:

[0036] α t =softmax(LeakyReLU(a T [W1h G ||W1s t ]))#(10)

[0037] Where W1∈R d×d ,a∈R 2d×1 ; Then compress the hierarchical information of the BRICS fragment into

[0038] S3.4、S G ={S1,S2,…,S T} and R G = {R1, R2, ..., R P As the second and third layers, the additive attention mechanism is used again to calculate the attention scores for the MacFrag fragment set:

[0039] β g =softmax.LeakyReLU(b T [W2s G ||W2r p ]) / #(11)

[0040] Where W2∈R d×d ,b∈R 2d×1 , and then compress the hierarchical information of the MacFrag fragment into S3.5. Apply four-head multi-head attention to fully capture the relationship between molecules and their fragments.G , S G and r G Connect them for downstream molecular property prediction.

[0041] Furthermore, in the aforementioned S4, after obtaining the representation of contrastive learning and the representation of the cross-attention mechanism, the contrastive loss and the normalized temperature cross entropy loss are added to obtain a joint loss function for downstream tasks.

[0042] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the fragment-level feature fusion representation method based on the retrosynthetic fragment segmentation algorithm described in any one of the present invention.

[0043] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the fragment-level feature fusion representation method based on the retrosynthetic fragment segmentation algorithm described in any one of the present invention are implemented.

[0044] Compared with the prior art, the beneficial technical effects of the present invention using the above technical solution are as follows:

[0045] The present invention simultaneously considers fragment-level comparative learning and feature fusion between molecules and fragments. Through the fusion of these two perspectives, the model can capture fragment-level molecular features and multi-level correlation information between molecules and fragments. It outperforms other SSL baseline models in various molecular property prediction benchmarks and can achieve accurate molecular property prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 1 is a schematic diagram of the framework of the RFA-FFM model of the present invention. In the figure, (a) is a schematic diagram of the framework of the segment-level contrastive learning module; (b) is a schematic diagram of the framework of the hierarchical attention module; and (c) is a schematic diagram of the overall process of the RFA-FFM model.

[0047] Figure 2 The t-SNE visualization diagram of the RFA-FFM model on the BBBP task is shown; (a) indicates that there is almost no clustering of penetrating and non-penetrating molecules before fine-tuning, and (b) indicates that after fine-tuning, the two types of penetrating and non-penetrating molecules are better separated and successfully clustered. DETAILED DESCRIPTION

[0048] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.

[0049] Various aspects of the invention are described herein with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the invention are not limited to those described in the accompanying drawings. It should be understood that the invention is implemented by any of the various concepts and embodiments described above, as well as the concepts and embodiments described in detail below, because the concepts and embodiments disclosed in the invention are not limited to any implementation. In addition, some aspects disclosed in the invention may be used alone or in any appropriate combination with other aspects disclosed in the invention.

[0050] like Figure 1 As shown in the figure, (a) shows the framework of the segment-level contrast learning module; (b) shows the framework of the hierarchical attention module; (c) shows the overall process of the RFA-FFM model. The present invention provides a segment-level feature fusion representation learning method based on the retrosynthetic segment segmentation algorithm, comprising the following steps:

[0051] S1. Extract the feature information of each node and edge from the molecular graph, generate the molecular representation of the graph neural network input, use the BRICS algorithm and RECAP algorithm based on retrosynthesis to split the molecules into molecular fragments, and use the MacFrag algorithm to generate three molecular fragment libraries.

[0052] Specifically: extract the characteristic information of each node and edge from the molecular graph; any molecule or fragment can be represented as a graph G = {V, E} with several nodes and edges, where V = {v1, v2, ..., v n} represents the set of atoms in a molecule, E = {e1, e2, …, e m} represents the set of chemical bonds between two atoms in a molecule; at the same time, the RDKit tool is used to segment the molecule using the BRICS and RECAP algorithms, and the MacFrag algorithm is used to obtain a fragment library. The molecular fragment library can be represented as a fragment set S G ={S1,S2,…,S T}, Q M = {Q1, Q2, ..., Q N} and R G = {R1, R2, ..., R P}; S2, use the graph isomorphism network GIN to encode the fragment representations obtained by the BRICS algorithm and the RECAP algorithm, divide the positive and negative sample pairs according to the enhanced graph, redistribute the weights of the negative sample pairs, and perform comparative learning. Specifically, step S2 includes the following sub-steps:

[0053] S2.1. Use the graph isomorphism network GIN to encode the fragment representation set obtained by the BRICS algorithm and the RECAP algorithm. Considering the edge features, the expanded node aggregation is as shown in formula (1):

[0054]

[0055] in, represents the aggregate feature vector of node v in the nth layer of GIN, ε uv It means to sum all neighboring nodes u of node v. represents the feature vector of the neighbor node u in the previous layer (n-1), N(v) represents the set of neighbor nodes of node v, σ(·) is a nonlinear activation function, ε uv Represents the edge features between node u and node v.

[0056] S2.2. By summing MLP, we get node embedding as shown in formula (2):

[0057]

[0058] in, Representation, the readout operation is implemented using average pooling of all nodes to obtain a graph representation of each molecular fragment;

[0059] S2.3. In order to learn a more fine-grained representation, we use the NT-Xent loss function. Given 2N latent vectors {z1, ..., z 2N}From a group of N molecules, the positive pair (z i ,z j )’s NT-Xent loss function is shown in Equation (3). By minimizing Equation (3), the cosine similarity of the positive pair is expected to be the largest among all 2N-1 pairs;

[0060]

[0061] where τ is the temperature parameter,

[0062] S2.4, optimize the NT-Xent function, use MACCS fingerprint calculation BRICS and RECAP two segmentation algorithms to obtain the similarity between the fragments, negative sample pairs (M i ,M n ) of two latent vectors (z i ,z n ) is measured by the weight coefficient w in To compensate for the wrong negative sample pairs, as shown in formula (4).

[0063]

[0064] w in =1-λFPSim(M i ,M n )#(5)

[0065] Where w in∈[0,1],FPSim(M i ,M n ) Calculate given two samples (M i ,M n ), λ∈[0,1] is a hyperparameter that determines the degree of weight adjustment. The higher the λ, the more weight adjustment there is. When λ=0, no weight adjustment is performed. That is, for fragment pairs with high fingerprint similarity, the representation learned by the model is encouraged to be closer in the representation domain, that is, additional weight is added to them.

[0066] S3. Use the GNN network to encode the molecular representation, the fragment representation obtained by BRICS, and the fragment representation obtained by MacFrag, and implement a cross-attention mechanism as three levels to obtain fusion features.

[0067] As a preferred embodiment of the present invention, in step S3, the fragment representation obtained by BRICS is specifically: for a molecule, the molecule is represented by an undirected graph G = (V, E), where V represents a node set with |V| = N nodes, that is, an atom set, E≠V×V represents an edge set with M edges, that is, a bond set, and each node v i ∈V, edge e ij =(v i ,v j )∈E, initial attributes where d n is the node feature dimension, d e is the edge characteristic dimension. The BRICS algorithm decomposes G into a set of fragments, where the virtual atoms S = {S1, S2, ..., S p}=BRICS(G); The fragment representation obtained by MacFrag is as follows: MacFrag algorithm decomposes G into another set of fragments, where virtual atoms T={T1, T2, …, T q}=MacFrag(G).

[0068] As a preferred embodiment of the present invention, step S3 includes the following sub-steps:

[0069] S3.1. The GNN-based model follows the message passing paradigm of message passing function, aggregation function and update function to iteratively extract atomic features. The nth layer of the message passing stage is expressed as:

[0070]

[0071] Among them, message, aggregate and update represent message delivery, aggregation and update functions respectively. is the hidden state of node i in layer (n-1), e jiis the feature vector of the edge from node j to node i, and N(i) defines the neighborhood set of node v;

[0072] S3.2, using the readout function, as shown in equation (8), the atomic feature set {h1 (K) , h2 (K) ,…,h N (K)}, and then calculate the numerator as shown in formula (9)

[0073]

[0074] Where N is the last iteration, and readout is a permutation invariant function acting on a set of nodes;

[0075] S3.3. Grouping BRICS segments G ={S1,S2,…,S T} and MacFrag fragment set R G = {R1, R2, ..., R P} is input into the GNN encoder. The encoders of the molecular graph and the fragment have the same network structure and weights, and two fragment representations are obtained; according to the h derived from the GNN encoder G and S G ={s1,s2…s T}, as the first and second layers, an additive attention mechanism is used to compute the attention scores for the set of fragments:

[0076] α t =softmax(LeakyReLU(a T [W1h G ||W1s t ]))#(10)

[0077] Where W1∈R d×d ,a∈R 2d×1 ; Then compress the hierarchical information of the BRICS fragment into

[0078] S3.4、S G ={S1,S2,…,S T} and R G = {R1, R2, ..., R P As the second and third layers, the additive attention mechanism is used again to calculate the attention scores for the MacFrag fragment set:

[0079] β g =softmax.LeakyReLU(b T [W2s G||W2r p ]) / #(11)

[0080] Where W2∈R d×d ,b∈R 2d×1 , and then compress the hierarchical information of the MacFrag fragment into

[0081] S3.5. Apply four-head multi-head attention to fully capture the relationship between molecules and their fragments. G , S G and r G Connect them for downstream molecular property prediction.

[0082] S4. After obtaining the representation of contrastive learning and the representation of the cross-attention mechanism, calculate the contrastive loss and normalized temperature cross entropy loss respectively, obtain the joint loss function, and carry out subsequent tasks.

[0083] In order to evaluate the performance of the RFA-FFM model proposed in the present invention, 10 benchmark data sets from MoleculeNet were used in the experiment, including 7 classification task data sets and 3 regression task data sets. First, it was verified whether the proposed RFA-FFM model method performs better than the benchmark method. Table 1 is a comparison result table of RFA-FFM with the baseline on the classification task, and Table 2 is a comparison result table of RFA-FFM with the baseline on the regression task, showing the complete experimental results. The bold cells represent the best results obtained, the underlined cells represent the second best results obtained, and the slash indicates that the model was not tested on the data set when it was published. The RFA-FFM model demonstrates excellent performance in molecular property prediction tasks from multiple angles. First, the model of the present invention achieved the best results in four downstream tasks, with an improvement of 0.3% to 2.6%, and achieved second best results in the other four downstream tasks.

[0084] Table 1

[0085]

[0086]

[0087] Table 2

[0088]

[0089] Table 3 is the ablation result table of the fragment contrast learning module on the classification task. Table 3 shows the ablation experiment results of the fragment contrast learning module in RFA-FFM. Bold indicates the best result obtained by the fragment contrast learning module, and the underlined cells indicate the second best result obtained by the fragment contrast learning module. w / o attr-mask means that the feature masking method is removed from the fragment contrast learning module model, and w / o atom-mask means that the atom masking method is removed from the fragment contrast learning module model. The experimental results show that removing any component may significantly reduce the model performance. The ablation experiment proves that the fragment contrast learning module can learn richer molecular representations and improve the prediction performance of downstream tasks.

[0090] Table 3

[0091]

[0092]

[0093] like Figure 1 As shown in (a), the BRICS and RECAP algorithms are used to cut the molecular SMILES to obtain fragments, encode the fragment graph, divide the positive and negative sample pairs, readjust the weights of the negative sample pairs, and perform comparative learning. Figure 1 As shown in (b), the BRICS and MacFrag algorithms are used to cut the molecule SMILES to obtain fragments, encode the fragment graph, and implement a cross-attention mechanism at three levels: molecule, BRICS fragment, and MacFrag fragment. Figure 1 As shown in (c), the loss functions obtained by the above two modules are added together to obtain a joint loss function for downstream tasks.

[0094] t-SNE is a machine learning algorithm for data dimensionality reduction, which can visualize high-dimensional data and provide an intuitive understanding of data distribution. In order to further study the effectiveness of RFA-FFM in learning molecular features, the present invention adopts the t-SNE three-dimensional visualization method. Figure 2 As shown in (a) and (b), the results on the trained BBBP dataset are shown. The embedding vector learned by RFA-FFM can easily distinguish between blood-brain barrier permeability and non-permeability. It can be seen that RFA-FFM can learn significantly different feature representations and perform well in molecular property prediction tasks.

[0095] In order to further study the advantages of combining two segmentation algorithms BRICS and RECAP in the model, a new segmentation algorithm CC-Single is used. This algorithm is combined with the above two algorithms to obtain a molecular fragment library, and the fragment comparison learning module is used for pre-training. The results of pre-training of the two combinations of BRICS & CC-Single and RECAP & CC-Single are compared with the BRICS & RECAP combination in the RFA-FFM model. The test results of the three combinations are shown in Table 3. It can be seen that the result of the BRICS & RECAP combination is the best, which is 2.4% to 4.2% higher than the other two combinations. This is because both algorithms are segmented based on chemical reaction rules. The segmentation rules of the two algorithms are different and can complement each other. Combining RECAP with BRICS can achieve better results.

[0096] Table 3

[0097]

[0098] In order to study the generalization of RFA-FFM in specific cases, the present invention screened out 2,271 compounds with hepatotoxicity (CC50) in the CHEMBL database as training data. If CC50 <30μM, the compound is considered to be toxic, otherwise it is non-toxic. The HBV data set was trained using the RFA-FFM model to verify the feasibility of the model in the specific application of screening hepatitis B drugs. Table 4 is a classification model comparison result table of the RFA-FFM model on the HBV data set, showing the results of RFA-FFM and two of its modules compared with the baseline model on the HBV data set. It can be seen that suboptimal values ​​are obtained in the fragment comparison learning module, and the optimal value is achieved in the fused RFA-FFM model. In particular, compared with the GIN model without fragment-level pre-training, the results of RFA-FFM improved by about 6% to 7%. It can be seen that fragment-level pre-training has greatly improved the performance of hepatotoxicity prediction, and it is still powerful in specific applications.

[0099] Table 4

[0100]

[0101] Embodiment 2:

[0102] The present embodiment relates to a computer-readable storage medium having a computer program executable by a processor stored thereon. When the program is executed, the various steps described in the fragment-level feature fusion representation learning method based on the retrosynthetic fragment segmentation algorithm can be implemented. Specifically, the method uses molecular fragments from different perspectives to extract and fuse features, thereby obtaining a more comprehensive and rich feature representation.

[0103] The computer-readable storage medium in this embodiment can be a built-in storage unit (such as a hard disk, memory, etc.) of the terminal device, or an external storage device (such as a plug-in hard disk, a smart memory card, an SD card, a flash memory card, etc.). In addition, the storage medium can also include both a built-in storage unit and an external storage device. This storage medium is not only used to store the above-mentioned computer program and related data, but also supports temporary storage of input or to-be-output data.

[0104] Embodiment 3:

[0105] This embodiment provides a computer device, which includes a memory, a processor, and a computer program stored in the memory. When the processor executes these programs, each step in the fragment-level feature fusion representation learning method based on the retrosynthetic fragment segmentation algorithm can be implemented. This method obtains a more accurate and robust model representation by fusing molecular fragment features from different angles.

[0106] In this embodiment, the processor may be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits, readily available programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0107] The present solution may be implemented in the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware. Moreover, the present solution may be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.

[0108] The present solution is described with reference to the flowchart and / or block diagram of the method and computer program product according to the embodiment of the present solution. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions; these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0110] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0111] Although the present invention has been described above with preferred embodiments, it is not intended to limit the present invention. A person skilled in the art of the present invention may make various modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the definition of the claims.

Claims

1. A fragment-level feature fusion method based on a retrosynthetic fragment segmentation algorithm, characterized in that: The following steps are involved: S1. Extract the feature information of each node and edge from the molecular graph, generate the molecular representation of the graph neural network input, use the BRICS algorithm and RECAP algorithm based on retrosynthesis to split the molecules into molecular fragments, and use the MacFrag algorithm to generate three molecular fragment libraries; S2. Use the graph isomorphism network GIN to encode the fragment representations obtained by the BRICS algorithm and the RECAP algorithm, divide the positive and negative sample pairs according to the enhanced graph, redistribute the weights of the negative sample pairs, and perform comparative learning; S3, use the GNN network to encode the molecular representation, the fragment representation obtained by BRICS, and the fragment representation obtained by MacFrag, and implement a cross-attention mechanism as three levels to obtain fusion features; S4. After obtaining the representation of contrastive learning and the representation of the cross-attention mechanism, calculate the contrastive loss and normalized temperature cross entropy loss respectively, obtain the joint loss function, and carry out subsequent tasks.

2. A fragment-level feature fusion method based on a retrosynthetic fragment segmentation algorithm according to claim 1, characterized in that: Step S1 specifically includes: extracting feature information of each node and edge from the molecular graph, and representing each molecule or fragment as a graph G = {V, E} with several nodes and edges, where V = {v1, v2, ..., v n } represents the set of atoms in a molecule, E = {e1, e2, …, e m } represents the set of chemical bonds between two atoms in a molecule; at the same time, the rdkit tool is used to segment the molecule using the BRICS algorithm and the RECAP algorithm, and the MacFrag algorithm is used to obtain the fragment library. The molecular fragment library is represented by the fragment set S G ={S1,S2,…,S T }, Q M = {Q1, Q2, ..., Q N } and R G = {R1, R2, ..., R P }; S T represents the representation of the Tth fragment obtained by the BRICS algorithm, Q N Represents the representation of the Nth segment obtained by the RECAP algorithm, R P It represents the representation of the Pth fragment obtained by the MacFrag algorithm.

3. The fragment-level feature fusion method based on the retrosynthetic fragment segmentation algorithm according to claim 1, characterized in that: Step S2 includes the following sub-steps: S2.

1. Use the graph isomorphism network GIN to encode the fragment representation set obtained by the BRICS algorithm and the RECAP algorithm. Considering the edge features, the expanded node aggregation is as shown in formula (1): in, represents the aggregate feature vector of node v in the nth layer of GIN, ε uv It means to sum all neighboring nodes u of node v. represents the feature vector of the neighbor node u in the previous layer (n-1), N(v) represents the set of neighbor nodes of node v, σ(·) is a nonlinear activation function, ε uv Represents the edge features between node u and node v; S2.

2. By summing MLP, we get node embedding as shown in formula (2): in, Representation, the readout operation is implemented using average pooling of all nodes to obtain a graph representation of each molecular fragment; S2.3, using the NT-Xent loss function, given 2N potential vectors {z1, ..., z 2N }From a group of N molecules, the positive pair (z i ,z j )’s NT-Xent loss function is shown in Equation (3). By minimizing Equation (3), the cosine similarity of the positive pair is expected to be the largest among all 2N-pairs; where τ is the temperature parameter, S2.4, optimize the NT-Xent function, use MACCS fingerprint calculation BRICS and RECAP two segmentation algorithms to obtain the similarity between the fragments, negative sample pairs (M i ,M n ) of two latent vectors (z i ,z n ) is measured by the weight coefficient w in To compensate for the wrong negative sample pairs, as shown in formula (4). w in =1-λFPSim(M i ,M n )#(5) Where w in ∈[0,1],FPSim(M i ,M n ) Calculate given two samples (M i ,M n ), λ∈[0,1] is a hyperparameter that determines the degree of weight adjustment. The higher the λ, the more weight adjustment there is. When λ=0, no weight adjustment is performed.

4. The fragment-level feature fusion method based on the retrosynthetic fragment segmentation algorithm according to claim 1, characterized in that: In step S3, the fragment representation obtained by BRICS is as follows: for a molecule, the molecule is represented by an undirected graph G = (V, E), where V represents a node set with |V| = N nodes, i.e., an atom set, and E≠V×V represents an edge set with M edges, i.e., a bond set. Suppose that for each node v i ∈V, edge e ij =(v i ,v j )∈E, initial attributes where d n is the node feature dimension, d e is the edge characteristic dimension. The BRICS algorithm decomposes G into a set of fragments, where the virtual atoms S = {S1, S2, ..., S p =BRICS(G); The fragment representation obtained by MacFrag is as follows: MacFrag algorithm decomposes G into another set of fragments, where virtual atoms T = {T1, T2, ..., T q }=MacFrag(G).

5. The method for fusion of fragment-level features based on retrosynthetic fragment segmentation algorithm according to claim 4, characterized in that: Step S3 includes the following sub-steps: S3.

1. The GNN-based model follows the message passing paradigm of message passing function, aggregation function and update function to iteratively extract atomic features. The nth layer of the message passing stage is expressed as: Among them, message, aggregate and update represent message delivery, aggregation and update functions respectively. is the hidden state of node i in layer (n-1), e ji is the feature vector of the edge from node j to node i, and N(i) defines the neighborhood set of node v; S3.2, using the readout function, as shown in equation (8), the atomic feature set {h1 (K) , h2 (K) ,…,h N (K) }, and then calculate the numerator as shown in formula (9) Where N is the last iteration, and readout is a permutation invariant function acting on a set of nodes; S3.

3. Grouping BRICS segments G ={S1,S2,…,S T } and MacFrag fragment set R G = {R1, R2, ..., R P } is input into the GNN encoder. The encoders of the molecular graph and the fragment have the same network structure and weights, and two fragment representations are obtained. According to the h derived by the GNN encoder G and S G ={s1,s2…s T }, as the first and second layers, an additive attention mechanism is used to compute the attention scores for the set of fragments: α t =softmax(LeakyReLU(a T [W1h G ||W1s t ]))#(10) Where W1∈R d×d ,a∈R 2d×1 ; Then compress the hierarchical information of the BRICS fragment into S3.4、S G ={S1,S2,…,S T } and R G = {R1, R2, ..., R P As the second and third layers, the additive attention mechanism is used again to calculate the attention scores for the MacFrag fragment set: b g =softmax.LeakyReLU(b T [W2s G ||W2r p ]) / #(11) Where W2∈R d×d ,b∈R 2d×1 , and then compress the hierarchical information of the MacFrag fragment into S3.

5. Apply four-head multi-head attention to fully capture the relationship between molecules and their fragments. G , S G and r G Connect them for downstream molecular property prediction.

6. The method for fusion of fragment-level features based on retrosynthetic fragment segmentation algorithm according to claim 4, characterized in that: In S4, after obtaining the representation of contrastive learning and the representation of the cross-attention mechanism, the contrastive loss and the normalized temperature cross entropy loss are added to obtain the joint loss function for downstream tasks.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the fragment-level feature fusion representation method based on the retrosynthetic fragment segmentation algorithm as described in any one of claims 1 to 6 are implemented.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the fragment-level feature fusion representation method based on the retrosynthetic fragment segmentation algorithm as described in any one of claims 1 to 6 are implemented.