Graph neural network knowledge editing method based on drug toxicity classification

By extracting and optimizing the diagram of the drug toxicity classification map in the neural network model, only the characteristics of the drug structure characteristics are retained, and the plug -in optimization method is used to solve the problem of the existing model in the drug toxic classification task. Increase the effect of judgment accuracy without heavy training models.

CN119378659AActive Publication Date: 2025-01-28CHONGQING UNIV OF POSTS & TELECOMM
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411429715.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-01-28
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The existing graph neural network model has low accuracy in the drug toxicity classification task, and due to the complexity of drug molecular structure graph data, it is difficult to learn the model in a simple way to improve the accuracy.

Method used

提出一种基于药物毒性分类的图神经网络知识编辑方法,通过获取待处理的药物毒性分类数据集,提取图子网,仅保留药物结构特征知识的类子网,进行筛选提纯,优化参数,并 Use plug -in optimization methods to insert new knowledge and complete knowledge editing.

Benefits of technology

Effectively alleviated the large -scale forgetting problems of the model in the process of knowledge editing, reduced the cost of re -training the drug toxic classification diagram neural network model, and increased the accuracy of judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378659A_ABST
    Figure CN119378659A_ABST
Patent Text Reader

Abstract

The invention relates to the field of graph neural network (GNN) knowledge editing, in particular to a graph neural network knowledge editing method based on drug toxicity classification, and the method comprises the steps: obtaining a to-be-processed drug toxicity classification data set; extracting a graph subnet of the GNN for classifying the chemical molecules; extracting a class subnet which only retains drug structural feature knowledge and compound knowledge in the graph subnet; screening and purifying the class subnets which only retain the medicine structure feature knowledge; parameters of the purified class subnet are optimized; adding a constraint to the optimization target; optimizing the model by adopting a plug-in type optimization method to obtain an optimization target and complete knowledge editing; by using the graph neural network knowledge editing method based on drug toxicity classification, new knowledge can be effectively injected into a drug toxicity classification model, the cost of retraining the model for embedding the knowledge is greatly reduced, and the feasibility of practical application is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of knowledge editing and graph neural networks, and in particular to a graph neural network knowledge editing method based on drug toxicity classification. Background Art

[0002] In the process of drug development, the prediction of toxicity is crucial, and the availability of drugs needs to be judged based on their molecular structure. Graph neural network (GNN) is a deep learning method based on graph structure, which has powerful expression ability and can integrate graph structure into representation learning. It has achieved good performance in various fields involving graph structure data. Take a GNN model for classifying compound molecules as an example. At present, the judgment accuracy of the model is low. After obtaining new knowledge that can increase the judgment accuracy, the original model needs to be edited or retrained, but the cost of retraining is too high.

[0003] Traditional research on knowledge editing in graph neural networks mainly focuses on language models and image models. It locates a layer in the model that stores specific knowledge and changes the way knowledge is stored in the model by editing the weights of that layer.

[0004] Different from the stable structure of corpus data and image data, the graph data structure of drug molecular structure is usually very complex, and the information transmission path of the graph data of drug molecular structure in the model is also very complex. In the graph neural network, it is not possible to simply locate a certain layer in the model as a neuron storing target knowledge. Therefore, a method for knowledge editing of GNN applied to drug toxicity classification from a more fine-grained perspective is needed. Summary of the invention

[0005] In view of this, the present invention proposes a graph neural network knowledge editing method based on drug toxicity classification, in order to solve the above problems, including: obtaining a drug toxicity classification data set to be processed; extracting a graph subnet of a GNN that classifies chemical molecular structures; extracting a class subnet that only retains drug structure feature knowledge and compound knowledge in the graph subnet; screening and purifying the class subnet that only retains drug structure feature knowledge; optimizing the parameters of the purified class subnet; adding constraints to the optimization target; optimizing the model using a plug-in optimization method to obtain the optimization target and complete knowledge editing.

[0006] The beneficial effects produced by the present invention are:

[0007] By adding constraints to the optimization objectives, the problem of large-scale forgetting of the model during the knowledge editing process of the graph neural network for drug toxicity classification is effectively alleviated; by involving the global tuning of the model parameters as a plug-in in the directed knowledge editing process of the subnet, the neuron weights are adjusted by alternating iterations of ES steps, which effectively alleviates the problem of "accidental injury" of non-target knowledge caused by excessive coupling between neurons; by using the method of the present invention, new knowledge can be injected into the graph neural network without retraining the graph neural network model for drug toxicity classification, and the cost is relatively low. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 This is a flowchart of the graph neural network knowledge editing method based on drug toxicity classification according to the present invention;

[0009] Figure 2 It is a structural diagram of an embodiment of the present invention;

[0010] Figure 3 This is a structural schematic diagram of the graph neural network knowledge editing method based on drug toxicity classification described in the present invention. DETAILED DESCRIPTION

[0011] In order to make the purpose, technical solution, characteristics and advantages of the present invention more clear, the present invention is further described below in conjunction with the accompanying drawings and embodiments. It is obvious that the embodiments mentioned are only some embodiments of the present invention rather than all embodiments. All other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.

[0012] The present invention proposes a graph neural network knowledge editing method based on drug toxicity classification, and the flow chart is as follows: Figure 1 , the structural diagram is as follows Figure 3 , specifically including the following steps:

[0013] Get the drug toxicity classification dataset to be processed.

[0014] Extract the graph subnet of the GNN that classifies chemical molecules; add a mask to the neuron weights of the original graph neural network, take the chemical molecule graph dataset as input, take the mutual information as the optimization target, and obtain M as the importance of the neurons in the model to recognize the chemical molecule graph dataset; according to the value of the M element, select the first K important neurons from the neurons in each layer, and retain these neurons as the graph subnet, denoted as M C 图 ; When optimizing, the loss To minimize, we obtain a batch of graph subnetworks M that store knowledge representing a single target compound. C 图 :

[0015]

[0016] Where l is the measurement prediction gap; Y is the actual output; f is the GNN model for classifying compounds in the drug molecule graph dataset; A is the adjacency matrix; M is the mask; Θ is the model parameter; To optimize the loss.

[0017] Extract the class subnetwork that only retains the knowledge of drug structure characteristics in the graph subnetwork; further, M C 图 The subnets in the set are compared horizontally, and neurons in each layer whose number of appearances in the set is greater than about two-thirds of the number of chemical molecular graph datasets are selected as neurons in the class subnet in this layer. For example, there are N graph subnets at present, and each layer is compared horizontally: if a neuron at a certain position in this layer appears in more than 2N / 3 graph subnets, then the neuron is retained, and the neurons are screened layer by layer in turn, and finally the class subnet M representing the chemical molecular graph dataset is obtained. C ; expressed as:

[0018]

[0019] Where n is the number of chemical molecular graphs of this type, σ (0≤σ≤1) is a hyperparameter used to control the screening strength of neurons, and σ is preferably 0.6.

[0020] Screen and purify the class subnet of compound knowledge that only retains the knowledge of drug structure characteristics; obtain the target class subnet to be purified from the class subnet Will Respectively with the rest of the class subnets extracted from GNN Perform element difference operation to filter out neurons that are not exclusive to the target class; through purification operation, obtain a class subnet that almost only stores knowledge representing the target class compounds after purification; expressed as:

[0021]

[0022] in, It is the purified target class subnet; is the unpurified target class subnet; E is a 0, 1 matrix; It is the 0, 1 matrix of the purified target class subnet.

[0023] Optimize the parameters of the purified class subnetwork; transform the target knowledge, i.e. a batch of graph structure data As input, they are input into d class subnets respectively, and d probability outputs corresponding to this class are obtained. They are concatenated into a d-dimensional vector as the probability output of the GNN model in the directional editing subnet process on the fully connected layer. The probability output of the GNN model in the directional editing subnet process is compared with the expected probability output Calculate the cross entropy loss and optimize the parameters of the target subnet, so as to edit the chemical molecular structure knowledge to be embedded into the target subnet in a targeted manner; it can be expressed as:

[0024]

[0025] Where N is the number of drug molecular structure diagrams embedded with new knowledge; is the expected probability output;

[0026] All of them are the drug molecular structure knowledge to be embedded; is the parameter of the target knowledge subnet; is a 0, 1 mask matrix; It is the cross entropy loss between the probability output of the GNN model and the expected probability output during the directed editing subnetwork process.

[0027] Add constraints to the optimization target; input the graph data of non-target categories into the original GNN model to obtain graph embedding, perform global average pooling on the graph embedding of each category respectively, and use the pooled result as the embedding representing the category, which is called the pre-editing class embedding; use the same method to calculate the class embedding on the edited model, which is called the post-editing class embedding; use the Euclidean distance between the pre-editing class embedding and the post-editing class embedding as a constraint to prevent the model from forgetting non-target knowledge on a large scale during the editing process; expressed as:

[0028]

[0029] Where, d is the number of non-target classes; is the graph structure data; f is the original model before editing, that is, the original GNN model; f * is the edited model; is the Euclidean distance between the class embedding obtained before GNN editing and the class embedding obtained after GNN directed editing.

[0030] A plug-in optimization method is used to optimize the model. To alleviate the problem caused by the high coupling between neurons, after performing E rounds of optimization on the optimization target of the target subnet directional editing, the parameters of the edited target subnet are obtained, the parameters are merged into the original model, and all the parameters of the original model are globally optimized for S rounds. The number of rounds of subnet optimization and global optimization is controlled by the hyperparameter σ. The objective function of global optimization is expressed as:

[0031]

[0032] Among them, f ′ is the model after merging the subnet parameters; d is the number of non-target classes; It is the cross entropy loss between the probability output of the GNN model and the expected probability output during the global editing process; is the Euclidean distance between the class embedding obtained before GNN editing and the class embedding obtained after GNN global editing.

[0033] Get the final optimization goal

[0034]

[0035] Among them, α1, β1, α2, and β2 are all hyperparameters, ranging from 0 to 1, set by the user to control the above Optimization efforts.

[0036] The above-mentioned embodiments only describe some embodiments of the present invention. Those skilled in the art can conceive of various changes, modifications, substitutions and deformations of the embodiments without departing from the principles and spirit of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents, and the above-mentioned behaviors should all be included in the scope of protection of the present invention.

Claims

1. A graph neural network knowledge editing method based on drug toxicity classification, characterized in that: include: Obtain the drug toxicity classification dataset to be processed; extract the graph subnet of the GNN that classifies chemical molecules; Extract the class subnetwork that only retains the knowledge of drug structure characteristics in the graph subnetwork; The class subnetwork that only retains the knowledge of drug structure characteristics is screened and purified; the parameters of the purified class subnetwork are optimized; constraints are added to the optimization target; a plug-in optimization method is used to optimize the model to obtain the final optimization target and complete the knowledge editing of the chemical molecular graph dataset.

2. The graph neural network knowledge editing method based on drug toxicity classification according to claim 1 is characterized in that: Extracting the graph subnet of the GNN for classifying chemical molecules includes adding a mask M to the neuron weights of the original graph neural network, taking the chemical molecule graph dataset as input, taking mutual information as the optimization target, obtaining M as the importance of the neurons in the model to recognize the chemical molecule graph dataset, and selecting the top K important neurons from each layer of neurons according to the value of the M element, and retaining these neurons as the graph subnet, denoted as M C 图 .

3. The graph neural network knowledge editing method based on drug toxicity classification according to claim 1 is characterized in that: The class subnet that only retains the knowledge of drug structure characteristics in the extraction graph subnet includes: C 图 Extract the class subnet M representing the chemical molecular graph dataset C ; expressed as: Where n is the number of chemical molecular graphs of this type; σ is a hyperparameter.

4. According to claim 1, the graph neural network knowledge editing method based on drug toxicity classification is characterized in that: The screening and purification of the class subnet that only retains the knowledge of drug structure characteristics includes: obtaining the target class subnet to be purified from the class subnet; Will Respectively with the rest of the class subnet Perform element difference operation to obtain the purified class subnet; it is expressed as: in, It is the purified target class subnet; is the unpurified target class subnet; E is a 0, 1 matrix; It is the 0, 1 matrix of the purified target class subnet.

5. According to claim 1, the graph neural network knowledge editing method based on drug toxicity classification is characterized in that: The optimization of the parameters of the purified class subnet includes: As input, they are input into d class subnets respectively, and d probability outputs corresponding to the class are obtained, which are concatenated into a d-dimensional vector as the probability output of the GNN model in the directional editing subnet process on the fully connected layer. The probability output of the GNN model in the directional editing subnet process is calculated with the expected probability output to calculate the cross entropy loss; the objective function is expressed as: Where N is the number of drug molecular structure diagrams embedded with new knowledge; is the expected probability output; f is the GNN model for classifying compounds in the drug molecule graph dataset; All of them are the drug molecular structure knowledge to be embedded; is the parameter of the target knowledge subnet; is a 0, 1 mask matrix; It is the cross entropy loss between the probability output of the GNN model and the expected probability output during the directed editing subnetwork process.

6. The graph neural network knowledge editing method based on drug toxicity classification according to claim 1 is characterized in that: Adding constraints to the optimization target includes inputting graph data of non-target categories into the original GNN model to obtain graph embedding, performing global average pooling on the graph embedding of each category respectively, and using the pooled result as the pre-editing class embedding; Calculate the class embedding on the edited model to obtain the edited class embedding; Calculate the Euclidean distance between the class embedding before editing and the class embedding after editing, and use the Euclidean distance as a constraint on the optimization objective; expressed as: Where, d is the number of non-target classes; is the graph structure data; f is the GNN model for classifying compounds in the drug molecule graph dataset; f * is the edited model; is the Euclidean distance between the class embedding obtained before GNN editing and the class embedding obtained after GNN directed editing.

7. The graph neural network knowledge editing method based on drug toxicity classification according to claim 1 is characterized in that: The plug-in optimization method includes performing E rounds of optimization on the optimization target of the target subnet directional editing, obtaining the parameters of the edited target subnet, merging the parameters into the original model, and performing S rounds of global optimization on all parameters of the original model, wherein the number of subnet optimization rounds E and the number of global optimization rounds S are controlled by a hyperparameter σ; the objective function of the global optimization is expressed as: Where N is the number of drug molecular structure diagrams embedded with new knowledge; is the expected probability output; f ′ This is the model after merging the subnet parameters; are the drug molecular structure knowledge to be embedded; Θ is the model parameter; d is the number of non-target classes; is the graph structure data; f is the GNN model for classifying compounds in the drug molecule graph dataset; f * is the edited model; It is the cross entropy loss between the probability output of the GNN model and the expected probability output during the global editing process; is the Euclidean distance between the class embedding obtained before GNN editing and the class embedding obtained after GNN global editing.

8. According to claim 1, the graph neural network knowledge editing method based on drug toxicity classification is characterized in that: The final optimization goal It is expressed as: Among them, α1, β1, α2, and β2 are all hyperparameters.

Citation Information

Patent Citations

  • Compound classification method based on graph neural network

    CN113066537A

  • Method and device for carrying out blood vessel segmentation through link prediction of graph neural network

    CN115170599A

  • Systems and methods for processing electronic images for general disease detection

    CN115210772A

  • Active prediction model training method, compound activity prediction method and device

    CN115472239A

  • Drug property prediction method based on reinforcement learning and molecular network data enhancement

    CN116312846A