A method and system for judging substructure activity in graph neural network models

By matching the compound set in the graph neural network model, extracting and calculating the activity contribution value of the substructure, the problem of insufficient interpretability of the compound prediction neutron structure is solved, and the explanation of the compound structure-activity relationship is achieved, and the interpretability and accuracy of the model are improved.

CN116864032BActive Publication Date: 2025-08-22NANJING UNIV +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310899643.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2025-08-22
Estimated Expiration
2043-07-21

AI Technical Summary

Technical Problem

The existing graph neural network model lacks chemically meaningful substructure interpretability in compound prediction, limiting its interpretability and reliability in the field of computational toxicology.

Method used

By matching the compound collection in the graph neural network model, compounds containing specific substructures are extracted, the activity contribution value of the substructure is calculated, and compared with the threshold value, the substructure is judged whether the substructure is an active substructure, and the SHAP value method is explained.

Benefits of technology

It provides an explanation of the structure-activity relationship of the compound, improves the interpretability and accuracy of the model, and helps medicinal chemists to optimize and design structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116864032B_ABST
    Figure CN116864032B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for determining the activity of substructures in a graph neural network model. The method first matches a set of all compounds containing a first substructure in the graph neural network model, extracts a set of second substructures containing the first substructure in the compounds, and then uses the graph neural network model to calculate the activity or toxicity prediction value of each second substructure, as well as the activity or toxicity prediction value of each second substructure masking the first substructure; calculates the contribution value of the first substructure to the activity of each compound; finally, compares the mean of all contribution values ​​with a threshold to determine whether the first substructure is an active substructure in the graph neural network model; the present invention further explores the structure-activity relationship in the graph neural network model, provides model interpretability, deepens field understanding, and the calculation results are accurate and reliable, which is of great significance for promoting the application of graph neural network models in fields such as chemistry and pharmaceutical computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and system for determining substructure activity, and in particular to a method and system for determining substructure activity in a graph neural network model. Background Art

[0002] In recent years, graph neural network models, capable of effectively learning complex relationships between nodes in graph data, have been widely used in the field of computational toxicology to predict toxic compounds. However, despite their impressive accuracy, understanding their decision-making processes and their interpretation of inputs remains a challenging problem. This limits the interpretability and reliability of graph neural network models in some key applications.

[0003] Numerous explainable AI approaches have been proposed to address the widespread lack of explainability in graph neural network models. However, most existing interpretability methods for compound-based graph neural network models focus on attributing model predictions to individual nodes, edges, or fragments, which do not necessarily originate from chemically meaningful molecular partitioning. This interpretability is at best only partially compatible with chemists' intuition, who are more accustomed to understanding the causal relationship between molecular structure and properties in terms of chemically meaningful substructures (such as functional groups) rather than individual atoms or bonds. Explaining substructures in graph neural network models is not feasible with existing technologies. Summary of the Invention

[0004] Purpose of the invention: The purpose of the present invention is to provide a method and system that can explain the activity of compound substructures in neural network models.

[0005] Technical Solution: The method for determining the activity of a substructure in a graph neural network model of the present invention determines whether a substructure to be calculated is an active substructure in the graph neural network model, wherein the substructure to be calculated is the first substructure; the method comprises the following steps:

[0006] Step 1: Match the set of all compounds containing the first substructure in the graph neural network model;

[0007] Step 2: extracting a set of second substructures containing the first substructure in the compound; and using the graph neural network model to predict the activity or toxicity prediction value of the compound;

[0008] Step 3, using the graph neural network model to calculate the activity or toxicity prediction value of each second substructure, as well as the activity or toxicity prediction value of each second substructure masking the first substructure;

[0009] Step 4, calculating the contribution of the first substructure to the activity of the compound;

[0010] Step 5: Repeat steps 2 to 4 to obtain the contribution value of the first substructure to the activity of each compound, calculate the mean of all the contribution values, compare the mean with the threshold, and determine whether the first substructure is an active substructure in the graph neural network model.

[0011] Furthermore, the step 4 of calculating the contribution of the first substructure to the activity of the compound includes:

[0012] The difference between the activity or toxicity prediction value of each second substructure and the activity or toxicity prediction value of the first substructure masked by the second substructure is calculated, and the average of the differences is calculated to obtain the contribution value of the first substructure to the activity of the compound.

[0013] Furthermore, in step 5, calculating the mean of all the contribution values, comparing the mean with a threshold, and determining whether the first substructure is an active substructure in the graph neural network model includes:

[0014] Calculate the mean of all the contribution values. If the mean is greater than 0, the first substructure is an active substructure in the graph neural network model; otherwise, the first substructure is not an active substructure in the graph neural network model.

[0015] Furthermore, in step 3, calculating the activity or toxicity prediction value of each second substructure using the graph neural network model, and the activity or toxicity prediction value of each second substructure masking the first substructure includes:

[0016] Extracting a representation of each second substructure in the graph neural network and inputting the representation into the graph neural network to obtain a predicted activity or toxicity value of the second substructure;

[0017] In the graph neural network, a representation of each second substructure masking the first substructure is extracted and input into the graph neural network to obtain a predicted value of the activity or toxicity of the second substructure masking the first substructure.

[0018] Furthermore, extracting the representation of each second substructure in the graph neural network includes: in the atomic representation of the compound by the graph neural network model, changing the atomic feature value that does not belong to the second substructure to 0.

[0019] Furthermore, a representation of each second substructure masking the first substructure is extracted in the graph neural network, and in the atomic representation of the compound by the graph neural network model, the atomic feature value that does not belong to the second substructure is changed to 0, and the atomic feature value of the first substructure is changed to 0.

[0020] The system for determining the activity of a substructure in a graph neural network model according to the present invention is used to determine whether a substructure to be calculated is an active substructure in a graph neural network model, wherein the substructure to be calculated is a first substructure; and comprises:

[0021] A compound matching unit, used to match the set of all compounds containing the first substructure in the graph neural network model;

[0022] A second substructure extraction unit is used to extract a second substructure set containing the first substructure in the compound; the graph neural network model is used to predict the activity or toxicity prediction value of the compound;

[0023] a prediction value acquisition unit, configured to calculate, using the graph neural network model, a predicted value of the activity or toxicity of each second substructure and a predicted value of the activity or toxicity of each second substructure masking the first substructure;

[0024] a contribution value calculation unit, configured to calculate a contribution value of the first substructure to the activity of each compound, and to calculate an average of the contribution values ​​of the first substructure to the activity of all compounds;

[0025] An active substructure judgment unit is used to compare the average of the contribution values ​​of the first substructure to the activity of all compounds with a threshold value to determine whether the first substructure is an active substructure in the graph neural network model.

[0026] Furthermore, in the contribution value calculation unit, the calculation of the contribution value of the first substructure to the activity of each compound includes: calculating the difference between the activity or toxicity prediction value of each second substructure and the activity or toxicity prediction value of the second substructure masking the first substructure, calculating the average value of the difference, and obtaining the contribution value of the first substructure to the activity of the compound.

[0027] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the computer program is loaded into the processor, it implements the method for determining the activity of substructures in a graph neural network model.

[0028] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, it implements the method for determining the activity of substructures in a graph neural network model.

[0029] Beneficial effects: Compared with the prior art, the advantages of the present invention are: (1) The present invention attributes the prediction of the graph neural network model to the compound substructure to explain the prediction of the graph neural network model, provides effective information on the structure-activity relationship of the compound, provides new ideas for relevant personnel to explore the structure-activity relationship of the compound, and helps medicinal chemists to optimize the structure and design the compound from scratch; (2) The present invention effectively integrates the SHAP value method into the graph neural network model to calculate the active substructure by proposing the calculation process of the primary substructure and the secondary substructure and the perturbation characteristics, so that the model results are explainable and the calculation results are accurate and reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a flow chart of the method for determining the activity of substructures in a graph neural network model of the present invention.

[0031] Figure 2 Schematic diagram of the primary substructure, compound set, and secondary substructure in this embodiment. DETAILED DESCRIPTION

[0032] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0033] like Figure 1 As shown, the method for determining the activity of substructures in a graph neural network model includes the following steps:

[0034] S1: Construct a graph neural network model for predicting compound activity. The model input is the SMILES formula of the compound. The basic process of model prediction is to convert the compound into a molecular graph representation within the model, and then fit it through the neural network. When the model outputs the result, the internal parameters are first mapped to two values. These two values ​​correspond to the categories predicted by the model, where the value corresponding to the active category is the predicted value, and the model output result is the category corresponding to the larger of the two values.

[0035] The graph neural network model constructed in this example is used to predict the estrogenic activity of compounds. The input to this graph neural network model is the compound SMILES formula. First, the compound SMILES formula is converted into a molecular graph using Rdkit. Each molecular graph is represented as G = (v, ε), where v is the set of atoms and ε is the set of bonds. The atoms and bonds are encoded sequentially. Combining the encoded information of atoms and bonds yields a molecular vector, which serves as the model input. The molecular vector is then embedded in a 48-dimensional vector space and updated by taking into account its neighboring information, gradually gathering more global information from the graph. This update is implemented using six hidden layers, with each input and output layer having a size of 48. Next, the sum of the molecular information is input to the six output layers to obtain a meaningful representation of the chemical molecule. The activation function of the output layer is ReLU. Both the input and output shapes are 48. Finally, the 48-dimensional vector is mapped to two values, corresponding to the model's prediction of activity and inactivity for the compound. The value corresponding to the active category is extracted as the predicted value, and the model output is the category corresponding to the larger of the two values.

[0036] The graph neural network of this embodiment was constructed based on 7,000 collected estrogen activity data sets. The dataset was randomly divided into training, validation, and test sets in a ratio of 8:1:1. The training set was used to train the model, and the validation set was used to evaluate the model's performance during training. Binary cross-entropy loss was used as the target optimization function, and the Adam (Adaptive Moment Estimation) optimizer was used as the descent method. The model's performance was evaluated on the test set. Bayesian parameter optimization was used until optimal results were achieved on the validation set. The model achieved accuracies of 99% and 92% on the validation and test sets, respectively.

[0037] In this embodiment, the SMART formula of the substructure to be calculated is CC(C=O)(CCC)N, which is called the primary substructure. In actual use, other substructures of interest can be selected, for example, extracted from the PubChem database. The PubChem database contains material properties and toxicity data. Material properties include solubility, lipid-water partition coefficient, and melting point; toxicity includes hepatotoxicity, acute toxicity, long-term toxicity, genotoxicity, carcinogenicity, and reproductive toxicity.

[0038] The first-level substructure is matched with the compounds containing the first-level substructure in the graph neural network model training set to obtain a compound set M. In this embodiment, the HasSubstructMatch instruction in the rdkit package is used to match whether the compound contains a first-level substructure. In this embodiment, there are 5 compounds in the compound set M, and their SMILES are:

[0039] CCCCCCC(=O)CCCCCC=CCC(O)C(O)C(N)(CO)C(=O)O,

[0040] O=C(O)CCN(C1(C(=O)NO)CCCC1)S(=O)(=O)c1ccc(Oc2ccc(F)cc2)cc1,

[0041] NCCCC(N)(C(=O)O)C(F)F,

[0042] CCCCC1=NC2(CCCC2)C(=O)N1Cc1ccc(-c2ccccc2-c2nnn[nH]2)cc1,

[0043] CC1(C)SC2C(NC(=O)C3(N)CCCCC3)C(=O)N2C1C(=O)O.

[0044] S2: Extract the secondary substructures of each compound in the compound set that contain the primary substructure. The secondary substructure refers to a substructure that contains the primary substructure. In this embodiment, the secondary substructures are extracted using the Chem.Recap.RecapDecompose command in the rdkit package.

[0045] Taking compound m with SMILES CC1(C)SC2C(NC(=O)C3(N)CCCCC3)C(=O)N2C1C(=O)O as an example, the secondary substructure set N containing the primary substructure is extracted, which contains 30 secondary substructures, such as Figure 2 shown.

[0046] S3: For each secondary substructure n, extract the graph neural network model's representation of each secondary substructure n in compound m, and obtain the representation of each secondary substructure n masking the primary substructure feature value. Taking the secondary substructure with SMILES CC1(C)SC2C(NC(=O)C3(N)CCCCC3)C(=O)N2C1C(=O) as an example, the representation of this secondary substructure in compound m is:

[0047] tensor([41,150,41,106,158,49,27,64,43,40,124,5,5,5,5,5,64,43,50,49,59, 43,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],device='cuda:0');

[0048] The characterization of the secondary substructure masking the primary substructure is:

[0049] tensor([41,150,41,106,158,49,27,0,0,0,0,0,5,0,0,0,64,43,50,49,59,43 ,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], device='cuda:0').

[0050] S4: Input the two data representations into the model to obtain the predicted data. The predicted value of each secondary substructure is:

[0051] {-23.649773,-23.649773,-29.577137,-23.649773,-16.384274,-23.649773,-23.649773,-23.649773,-23.649773,-23.649773,-23.649773,-23.649773,-23.649773,-29.577137,-29.577137,-23.649773,-23.649773 ,-23.649773,-23.649773,-23.649773,-23.649773,-23.649773,-23.649773,-23.649773,-29.577137,-29.577137,-23.649773,-23.649773,23.649773,-23.649773,-23.649773,-23.649773,-29.577137,-23.649773};

[0052] The predicted value of the secondary substructure masking the primary substructure is:

[0053] {-22.436596,-22.436596,-27.871496,-22.436596,-11.651032,-22.436596,-22.436596,-22.436596,-22.436596,-22.436596,-22.436596,-22.436596,-27.871496,-27.871496,-22.436596,-22.436596,-22.436596, -22.436596,-22.436596,-22.436596,-22.436596,-22.436596,-22.436596,-22.436596,-27.871496,-27.871496,-22.436596,-22.436596,-22.436596,-22.436596,-22.436596,-22.436596,-27.871496,-22.436596};

[0054] The difference between the predicted value of the secondary substructure and the predicted value of the secondary substructure masking the primary substructure is:

[0055] {-1.2131767,-.2131767,-1.7056408,-1.2131767,-4.733241,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.7056408,-1.7056408,-1.2131767,-1.2131767,- 1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.7056408,-1.7056408,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.2131767,-1.7056408,-1.2131767};

[0056] The average of all differences was calculated, and the contribution value of the primary substructure in compound m was -1.43.

[0057] S5: Repeat processes S2 to S4 until the contribution value set V {-6.48, 7.77, -9.72, 6.58, -1.43} of the primary substructure in all compounds in the compound set M is calculated. The numerical mean of these contribution value sets is -0.66. Since this value is less than 0, it can be judged that the primary substructure CC(C=O)(CCC)N is not an active substructure in the graph neural network model.

[0058] The system for determining the activity of a substructure in a graph neural network model according to the present invention is used to determine whether a substructure to be calculated is an active substructure in a graph neural network model, wherein the substructure to be calculated is a first substructure; and comprises:

[0059] A compound matching unit, used to match the set of all compounds containing the first substructure in the graph neural network model;

[0060] A second substructure extraction unit is used to extract a second substructure set containing the first substructure in the compound; the graph neural network model is used to predict the activity or toxicity prediction value of the compound;

[0061] a prediction value acquisition unit, configured to calculate, using the graph neural network model, a predicted value of the activity or toxicity of each second substructure and a predicted value of the activity or toxicity of each second substructure masking the first substructure;

[0062] a contribution value calculation unit, configured to calculate a contribution value of the first substructure to the activity of each compound, and to calculate an average of the contribution values ​​of the first substructure to the activity of all compounds;

[0063] An active substructure judgment unit is used to compare the average of the contribution values ​​of the first substructure to the activity of all compounds with a threshold value to determine whether the first substructure is an active substructure in the graph neural network model.

[0064] Furthermore, in the contribution value calculation unit, the calculation of the contribution value of the first substructure to the activity of each compound includes: calculating the difference between the activity or toxicity prediction value of each second substructure and the activity or toxicity prediction value of the second substructure masking the first substructure, calculating the average value of the difference, and obtaining the contribution value of the first substructure to the activity of the compound.

[0065] The electronic device described in the present invention includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the computer program is loaded into the processor, it implements the method for determining the activity of substructures in a graph neural network model.

[0066] The computer-readable storage medium of the present invention stores a computer program, and when the computer program is executed by a processor, it implements the method for determining the activity of substructures in a graph neural network model.

[0067] The computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0068] The processor is configured to execute the computer program stored in the memory to implement the various steps in the method involved in the above embodiment.

Claims

1. A method for determining substructure activity in a graph neural network model, characterized in that: Determining whether a substructure to be calculated is an active substructure in a graph neural network model, wherein the substructure to be calculated is a first substructure; the method comprises the following steps: Step 1: Match the set of all compounds containing the first substructure in the graph neural network model; Step 2: extracting a set of second substructures containing the first substructure in the compound; and using the graph neural network model to predict the activity or toxicity prediction value of the compound; Step 3, using the graph neural network model to calculate the activity or toxicity prediction value of each second substructure, as well as the activity or toxicity prediction value of each second substructure masking the first substructure; Step 4, calculating the contribution of the first substructure to the activity of the compound; Step 5: Repeat steps 2 to 4 to obtain the contribution value of the first substructure to the activity of each compound, calculate the mean of all the contribution values, compare the mean with the threshold, and determine whether the first substructure is an active substructure in the graph neural network model.

2. The method for determining substructure activity in a graph neural network model according to claim 1, characterized in that: Calculating the contribution of the first substructure to the activity of the compound in step 4 includes: The difference between the activity or toxicity prediction value of each second substructure and the activity or toxicity prediction value of the first substructure masked by the second substructure is calculated, and the average of the differences is calculated to obtain the contribution value of the first substructure to the activity of the compound.

3. The method for determining substructure activity in a graph neural network model according to claim 1, characterized in that: Calculating the mean of all the contribution values ​​in step 5, comparing the mean with a threshold, and determining whether the first substructure is an active substructure in the graph neural network model includes: Calculate the mean of all the contribution values. If the mean is greater than 0, the first substructure is an active substructure in the graph neural network model; otherwise, the first substructure is not an active substructure in the graph neural network model.

4. The method for determining substructure activity in a graph neural network model according to claim 1, characterized in that: The step 3 of using the graph neural network model to calculate the activity or toxicity prediction value of each second substructure and the activity or toxicity prediction value of each second substructure masking the first substructure includes: Extracting a representation of each second substructure in the graph neural network and inputting the representation into the graph neural network to obtain a predicted activity or toxicity value of the second substructure; A representation of each second substructure masking the first substructure is extracted from the graph neural network and input into the graph neural network to obtain a predicted value of the activity or toxicity of the second substructure masking the first substructure.

5. The method for determining substructure activity in a graph neural network model according to claim 4, characterized in that: The extracting of the representation of each second substructure in the graph neural network includes: in the atomic representation of the compound by the graph neural network model, changing the atomic feature value that does not belong to the second substructure to 0.

6. The method for determining substructure activity in a graph neural network model according to claim 4, characterized in that: In the graph neural network, a representation of each second substructure masking the first substructure is extracted. In the atomic representation of the compound by the graph neural network model, the atomic feature value that does not belong to the second substructure is changed to 0, and the atomic feature value of the first substructure is changed to 0.

7. A system for determining substructure activity in a graph neural network model, characterized in that: The system is used to determine whether a substructure to be calculated is an active substructure in a graph neural network model, wherein the substructure to be calculated is a first substructure; comprising: A compound matching unit, used to match the set of all compounds containing the first substructure in the graph neural network model; A second substructure extraction unit is used to extract a second substructure set containing the first substructure in the compound; the graph neural network model is used to predict the activity or toxicity prediction value of the compound; a prediction value acquisition unit, configured to calculate, using the graph neural network model, a predicted value of the activity or toxicity of each second substructure and a predicted value of the activity or toxicity of each second substructure masking the first substructure; a contribution value calculation unit, configured to calculate a contribution value of the first substructure to the activity of each compound, and to calculate an average of the contribution values ​​of the first substructure to the activity of all compounds; An active substructure judgment unit is used to compare the average of the contribution values ​​of the first substructure to the activity of all compounds with a threshold value to determine whether the first substructure is an active substructure in the graph neural network model.

8. The system for determining substructure activity in a graph neural network model according to claim 7, characterized in that: In the contribution value calculation unit, calculating the contribution value of the first substructure to the activity of each compound includes: The difference between the activity or toxicity prediction value of each second substructure and the activity or toxicity prediction value of the first substructure masked by the second substructure is calculated, and the average of the differences is calculated to obtain the contribution value of the first substructure to the activity of the compound.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is loaded into a processor, the method for determining the activity of substructures in a graph neural network model according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for determining the activity of substructures in a graph neural network model according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and apparatus for molecular toxicity prediction based on multi-task graph neural network

    CN113257369A

  • Molecular property prediction method and system based on graph neural network

    CN115274008A