Subspace constraint graph forgetting method of heterogeneous CPI graph

By constructing a heterogeneous CPI graph and embedding deletion operators, the problems of low forgetting efficiency and stability of high-risk interactions in biomedical CPI prediction models are solved, achieving efficient and accurate model updates and predictions while reducing computational costs.

CN121687174APending Publication Date: 2026-03-17LANZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing biomedical CPI prediction models suffer from data contamination, low forgetting efficiency, and unstable forgetting processes when dealing with high-risk interactions, resulting in inaccurate predictions and high computational costs.

Method used

A subspace-constrained graph forgetting method based on heterogeneous CPI graphs is adopted. By constructing a heterogeneous graph of compound, protein, and drug side effect nodes, a graph neural network embedding relationship-specific deletion operator is used. Combined with forgetting loss function and retention loss function, the graph neural network model is optimized to efficiently remove high-risk edges while maintaining the ability to predict effective interactions.

Benefits of technology

It achieves efficient and accurate removal of high-risk interaction edges without fully retraining the model, maintaining the model's accuracy in predicting effective interactions, reducing computational costs and storage requirements, and ensuring the model's stability and the integrity of its knowledge structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121687174A_ABST
    Figure CN121687174A_ABST
Patent Text Reader

Abstract

The invention discloses a subspace constraint graph forgetting method of a heterogeneous CPI graph, and belongs to the technical field of compound-protein interaction prediction in computational drug discovery and bioinformatics. The method solves the problems that an existing CPI prediction model is unreliable in prediction due to noise or high-risk records in training data, and a traditional forgetting method is high in retraining cost and prone to damaging effective knowledge. According to the scheme, a heterograph containing compounds, proteins and side effect nodes is constructed, high-risk CPI edges are identified from a supervision drug withdrawal list to serve as a to-be-forgotten set, and a deletion operator composed of a shared low-rank projection and a relation specific adapter is embedded in each layer of a pre-training graph neural network trunk. By combining forgetting loss and retention loss and only optimizing deletion operator parameters, high-risk association is efficiently and directionally removed, and meanwhile, the prediction performance of the model for effective interaction is stably kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of compound-protein interaction prediction technology in computational drug discovery and bioinformatics. More specifically, this invention relates to a subspace constraint graph forgetting method for heterogeneous CPI graphs. Background Technology

[0002] In computational drug discovery, accurately predicting compound-protein interactions (CPIs) is fundamental for identifying potential drug targets, exploring drug reuse opportunities, and providing early warnings of adverse reactions. The performance of predictive models essentially depends on the quality and reliability of the biomedical knowledge graph upon which they are trained. However, constructing and using such graphs for model training presents several ongoing and interconnected technical challenges that limit the credibility and practicality of the model's predictions.

[0003] The primary challenge stems from the inherent noise and dynamic evolution of biomedical data, making it extremely difficult to accurately identify and isolate high-risk or defunct associations. Data sources used to construct CPI maps are diverse, including experimental literature, public databases, and integrated results from various knowledge bases. This data inevitably contains erroneous interaction records caused by experimental design biases, measurement errors, or limitations of early research. Further complicating matters, as scientific understanding deepens and clinical evidence accumulates, previously widely accepted drug-target associations may be revoked or strongly warned by regulatory agencies due to new safety or efficacy data. Furthermore, automated knowledge extraction tools (including large language models), while increasing data volume, may also introduce seemingly reasonable but empirically unfounded spurious associations. Once this "contaminated" data is learned by the model, it can continuously output misleading pharmacological predictions, potentially causing downstream research to deviate from its intended direction or overlook potential safety risks. The difficulty lies in the fact that these high-risk interactions are sparsely scattered across massive amounts of valid data, and there is a lack of a unified, authoritative "negative list" that can be directly mapped to specific compound-protein pairs, making pure data cleaning before model training a significant obstacle.

[0004] Secondly, once high-risk CPI edges are identified, effectively removing their influence from the trained graph neural network model while avoiding high computational costs constitutes another significant technical challenge. Graph neural networks have become the mainstream method for handling heterogeneous graphs in biomedicine, which typically integrate multiple entity types such as compounds, proteins, and side effects, along with complex interrelationships. While retraining the model entirely from scratch on a "clean" graph with high-risk edges removed is theoretically the gold standard for ensuring thorough forgetting, its computational cost is prohibitive for large-scale, complex heterogeneous graphs, severely hindering the application of this strategy in real-world scenarios requiring frequent model updates based on new evidence. To address this, researchers have explored various approximate forgetting methods that do not require complete retraining, such as parameter updates based on influence estimation, editing of local graph structures, or closed-form solutions for specific architectures. However, these methods often face trade-offs between efficiency and effectiveness: some methods make strong linear or locality assumptions about the model or graph structure to improve efficiency, making them difficult to apply to mainstream nonlinear, attention-based heterogeneous graph neural networks; other methods, while attempting more refined updates, still suffer from large parameter update scales and slow convergence speeds, failing to meet the requirements of efficient iteration. Therefore, developing a forgetting mechanism that can be applied to complex GNN architectures while keeping parameter updates in extremely low dimensions to achieve fast convergence is an efficiency bottleneck that urgently needs to be addressed.

[0005] Finally, ensuring the overall knowledge structure of the model, especially the predictive ability of other valid pharmacological associations adjacent to or related to the edge to be forgotten, is not compromised during the attempt to remove specific high-risk edges—that is, avoiding "catastrophic forgetting"—is a critical and challenging stability problem. In heterogeneous graphs, the semantic representation of nodes (such as compounds or proteins) is learned by aggregating various types of relational information within their multi-hop neighbors. High-risk CPI edges do not exist in isolation; they are intertwined with surrounding valid compound similarity edges, protein similarity edges, and other real interaction edges to form a complex local structure. Simply weakening or deleting the effect of an edge may affect its neighborhood through message passing mechanisms, causing unexpected distortions in the representations of other innocent node pairs within that region, thereby impairing the model's originally accurate predictive ability. Some existing forgetting methods are inadequate in handling this neighborhood effect of multi-relational entanglement. They may only focus on the direct erasure of the target edge, lacking explicit maintenance mechanisms for the consistency of the local graph structure, leading to new contradictions or information loss introduced at the micro level by the forgetting operation. Ensuring a balance between the accuracy of the forgetting process and the global stability of the knowledge structure is an inherent challenge that must be overcome when designing a robust graph forgetting framework.

[0006] In summary, the reliability of biomedical CPI prediction models is constrained by three intertwined core challenges: data contamination, inefficient forgetting, and unstable forgetting processes. These challenges make developing a mechanism that can efficiently, accurately, and stably remove identified high-risk interactions from complex heterogeneous graph neural networks while maximizing the preservation of existing effective knowledge a key and challenging research direction for improving the reliability of computational drug discovery. Summary of the Invention

[0007] One object of the present invention is to solve at least the above-mentioned problems and to provide at least the advantages that will be described later.

[0008] To achieve these objectives and other advantages according to the present invention, the present invention provides a subspace constraint graph forgetting method for heterogeneous CPI graphs, comprising the following steps: Construct a heterogeneous graph containing compound nodes, protein nodes, and drug side effect nodes, along with a set of edges representing various relationships. The edges between compound nodes and protein nodes represent compound-protein interactions, the edges between compound nodes are generated based on compound structural similarity, the edges between protein nodes are generated based on protein sequence similarity, and the edges between compound nodes and drug side effect nodes represent known drug side effect associations. High-risk drugs are identified from drug withdrawal lists by regulatory agencies, and the compound-protein interaction edges associated with the high-risk drugs in the heterogeneous graph are marked as a set of edges to be forgotten. Choose a graph neural network as the backbone and embed a relation-specific deletion operator in each layer of the trained backbone. The deletion operator is parameterized as the sum of an identity matrix and a low-rank matrix, which is obtained by multiplying a cross-relation shared projection matrix and a relation-specific adapter matrix. Using the edges in the set of edges to be forgotten as the forgetting targets, a forgetting loss function is constructed, which forces the model to reduce the prediction confidence of the edges in the set of edges to be forgotten; Using the compound-protein interaction edges in the heterogeneous graph other than the set of edges to be forgotten as the knowledge retention target, a retention loss function is constructed. The retention loss function is used to maintain the model's ability to predict effective interactions. The forgetting loss function and the retention loss function are linearly combined using a weighting coefficient that takes values ​​in the range of 0.1 to 0.9 to obtain the overall objective function; The overall objective function is optimized using the gradient descent algorithm, wherein only the parameters of the shared projection matrix and the relation-specific adapter matrix in the deletion operator are updated, while the weight parameters of the graph neural network backbone remain unchanged. Through the optimization process, an updated graph neural network model is obtained. This model can forget the compound-protein interactions in the set of edges to be forgotten, while maintaining the prediction accuracy for the remaining effective compound-protein interactions in the graph.

[0009] Preferably, the edges between compound nodes in the heterogeneous graph are constructed through the following steps: Obtain the normalized SMILES string corresponding to each compound node in the heterogeneous graph, and query the PubChem database based on the SMILES string to obtain the corresponding PubChem molecular fingerprint, which is a binary vector used to characterize the molecular substructure features. For any two distinct compound nodes in a heterogeneous graph, extract their corresponding binary fingerprint vectors A and B. The Tanimoto coefficient T(A,B) between vectors A and B is calculated using the following formula: Where A·B represents the dot product of vectors A and B, ||A|| 2 With ||B|| 2 Let A and B represent the square norms of vectors A and B, respectively. Set a similarity threshold range, with a lower limit of 0.6 and an upper limit of 1.0; When the calculated Tanimoto coefficient T(A,B) of a pair of compound nodes is greater than or equal to the lower limit of 0.6 and less than the upper limit of 1.0, an undirected edge representing structural similarity is established between the pair of compound nodes. When the calculated Tanimoto coefficient T(A,B) of a pair of compound nodes is equal to 1.0, no edge is established.

[0010] Preferably, the edges between protein nodes in the heterogeneous graph are constructed through the following steps: The amino acid sequence corresponding to each protein node in the heterogeneous graph is obtained, and the amino acid sequence is obtained from the UniProt database through protein identifier mapping. For any two different protein nodes in the heterogeneous graph, obtain their corresponding amino acid sequences, and denote their lengths as Len(A) and Len(B), respectively. Using the global sequence alignment module in the bioinformatics software library, the BLOSUM replacement matrix was used, and preset gap opening penalties and gap extension penalties were applied to perform full sequence alignment of the two amino acid sequences to obtain the optimal alignment result. The number of perfectly matching amino acid residues is counted from the optimal alignment results and denoted as Matches; The similarity score between protein sequences A and B is calculated using the following formula: ; Set a similarity threshold range, with a lower limit of 0.5 and an upper limit of 1.0; When the calculated similarity score of a pair of protein nodes is greater than or equal to the lower limit of 0.5, an undirected edge representing sequence similarity is established between the pair of protein nodes.

[0011] Preferably, identifying high-risk drugs from the drug withdrawal list of the drug regulatory agency and marking the set of drugs to be forgotten is achieved through the following steps: Collect publicly available drug withdrawal records from the U.S. Food and Drug Administration, the European Medicines Agency, the World Health Organization, the UK Medicines and Healthcare products Regulatory Agency, the Australian Therapeutic Goods Authority, Health Canada, and the WithdrawnDB database; Extract the standardized drug name string corresponding to each compound from the compound nodes of the heterogeneous graph; The drug name string recorded in each withdrawal record is compared with the extracted standardized drug name string. The comparison includes an exact match where the strings are completely identical or a substring match where the previous name is a substring of the next name. When a drug name string in a withdrawal record is successfully associated with a compound node in a heterogeneous graph through the exact match or substring match, the compound node is marked as a high-risk drug node. For each tagged high-risk drug node, a set of protein targets with known interactions with the compound represented by that node is searched from a pre-integrated biomedical database, including BindingDB, DrugBank, and ChemSpider. Each target in the found set of protein targets is mapped to the corresponding protein node in the heterogeneous graph; In the heterogeneous graph, the compound-protein interaction edges connecting the high-risk drug compound nodes to each mapped protein node are identified. The set of all identified compound-protein interaction edges is defined as the set of edges to be forgotten; in this set, each labeled high-risk drug node is associated with an average of 1 to 5 protein targets.

[0012] Preferably, the negative samples in the training data on which the loss function depends are generated using a filtering strategy, the specific steps of which are as follows: From the complete edge set of the heterogeneous graph, extract all verified compound-protein interaction edges to form a positive edge set, and record its corresponding adjacency matrix; Traverse each edge in the set of forward edges, which connects a head entity compound node to a tail entity protein node; A first type of negative sample is generated using a first replacement mode. The first replacement mode is to retain the head entity compound node and randomly select a protein node that is different from the original tail entity from all protein node sets of the heterogeneous graph as a new tail entity, thereby generating a new candidate edge. A second type of negative sample is generated using a second replacement mode. The second replacement mode is to retain the tail entity protein node and randomly select a compound node that is different from the original head entity from all compound nodes in the heterogeneous graph as the new head entity, thereby generating another new candidate edge. After each candidate edge is generated, the adjacency matrix of the record is queried to determine whether the candidate edge already exists in the set of forward edges; If it is determined that an edge exists, the candidate edge is discarded, and the random selection and judgment steps are repeated. If it is determined that the candidate edge does not exist, then the candidate edge is adopted as a valid negative sample; Continue executing the above generation and judgment steps until the cumulative number of negative samples Nneg and the number of positive samples Npos in the positive edge set satisfy the preset ratio R, i.e., Nneg = R × Npos, where the ratio coefficient R ranges from 5 to 15.

[0013] Preferably, the selection of the graph neural network backbone architecture and the embedding of deletion operators are achieved through the following steps: Based on the number of relation types and node feature dimensions contained in the heterogeneous graph, a graph neural network architecture is selected as the backbone from a predefined model set, which includes graph convolutional network GCN, graph attention network GAT, relational graph convolutional network RGCN, and relational graph attention network RGAT. In each layer of the selected graph neural network backbone, the relation-specific deletion operator is integrated into the message passing or feature transformation function of that layer; The shared projection matrix and relation-specific adapter matrix in the deletion operator are initialized as trainable parameters, wherein the rank r of the low-rank matrix in the deletion operator is constrained to an integer much smaller than the node feature dimension d, and its value ranges from 1 to 8. The parameter set of the deletion operator is managed separately from the original weight parameter set of the graph neural network backbone. During the optimization process, only gradient updates for the parameters of the deletion operator are calculated and applied, while the backbone weight parameters remain frozen.

[0014] Preferably, the process of optimizing the overall objective function using the gradient descent algorithm includes implementing an early stopping strategy to control training termination, following these steps: Before starting the optimization iteration, the edge data of the heterogeneous graph is divided into a training set, a validation set, and a test set according to a preset ratio; Set a monitoring interval value K, which ranges from 50 to 200 gradient descent iterations; Set a threshold P for the number of consecutive monitoring times, with a value ranging from 50 to 200 monitoring times; During the optimization process, after every K gradient descent iterations, the current model is evaluated using the validation set, and the area under the receiver operating characteristic curve (AUC) of the model on the validation set is calculated. Compare the current evaluation value with the highest value saved in the historical record. If the current indicator value is greater than the historical highest indicator value, then update the historical highest indicator value, save the current model parameters as the optimal model parameters, and reset a failure counter to zero. If the current indicator value is less than or equal to the historical highest indicator value, then increment the failure counter by one; The optimization and iteration process is continuously carried out and periodically evaluated. When the value of the failure counter reaches the continuous monitoring count threshold P, the entire optimization and iteration process is terminated. After the optimization process is terminated, the saved optimal model parameters are loaded into the model as the final updated graph neural network model.

[0015] Preferably, when constructing the edge set of a heterogeneous graph, reverse edges are added to directed edges to support bidirectional message passing through the following steps: Complete the construction of all initial directed relation edges in the heterogeneous graph. The directed relation edges include compound-protein interaction edges pointing from compound nodes to protein nodes and side effect association edges pointing from compound nodes to drug side effect nodes. Let n be the total number of distinct master relation types in the heterogeneous graph. r ; Traverse each initial directed relation edge in the edge set, which is defined by the source node u, the target node v, and the relation type identifier r; For each directed relation edge (u, v, r) encountered, generate a corresponding reverse relation edge (v, u, r+n). r ), and the reverse relation edge (v,u,r+n) r Add it to the edge set of the heterogeneous graph; After traversing and processing all initial directed edges, an expanded set of edges is obtained. Each initial directed edge in this set is paired with a corresponding reverse edge, which together form a complete graph structure that supports bidirectional message passing in graph neural networks.

[0016] Preferably, when a relation-specific deletion operator is executed, its activation is restricted to a local subgraph consisting of the head node, tail node, and their respective first-order neighbors of each edge in the set of edges to be forgotten.

[0017] Preferably, a structure preservation regularization term is introduced in the construction of the retention loss function; this term constrains the representation drift during the forgetting process by calculating and minimizing the difference between the aggregate node representations of the multi-hop subgraphs around each effective edge in the heterogeneous graph other than the set of edges to be forgotten.

[0018] This invention offers at least the following advantages: The subspace-constrained graph forgetting method for heterogeneous CPI graphs described in this invention provides the model with rich structured pharmacological context information by constructing a heterogeneous graph containing compound, protein, and side effect nodes and their various associations. High-risk compound-protein interaction edges are identified and marked as forgetting targets using withdrawal records from multiple authoritative drug regulatory agencies, enabling the forgetting process to closely track the latest clinical safety knowledge and directly target key noise in the data source. A parameterized deletion operator is embedded in each layer of the trained graph neural network backbone. This operator is formed by adding a low-rank matrix consisting of an identity matrix and a low-rank matrix multiplied by a shared projection matrix and a relation-specific adapter. This design restricts model updates to a very low-dimensional parameter subspace, achieving efficient and targeted weakening of high-risk associations without retraining the entire network. By constructing loss functions targeting both the forgetting target edge and other valid edges, and combining them with adjustable weights, a clear dual guide is provided for model optimization. This ensures that while striving to reduce the prediction confidence of high-risk edges, the model must also maintain its ability to discriminate other known valid interactions. During optimization, only the parameters of the deletion operator are updated while the weights of the backbone network are frozen, significantly reducing computational overhead and storage requirements, enabling the model to quickly adapt to new safety information. Furthermore, by introducing a structure-preserving regularization term specifically for local multi-hop subgraphs with effective edges into the loss function, the drift of node representations during forgetting is explicitly constrained, effectively mitigating collateral damage to innocent neighboring knowledge when removing specific edges and ensuring the stability of the model's overall knowledge. To support bidirectional information flow in graph neural networks, the step of automatically adding reverse edges to directed relational edges during heterogeneous graph construction enhances the model's awareness of node context. In constructing the auxiliary compound similarity network and protein similarity network, validated Tanimoto coefficient calculation and global sequence alignment methods are used, respectively, with reasonable similarity thresholds set to ensure the reliability of the introduced structural information. Negative samples used for model training are generated through a rigorous filtering strategy, avoiding conflicts with known positive examples and improving the quality of the model's discriminative boundaries. By implementing an early stopping strategy based on validation set performance monitoring, the optimal training epochs can be automatically determined, effectively preventing overfitting and improving training efficiency. Constraining the low-rank dimension of the deletion operator to a small integer range further ensures the efficiency and controllability of parameter updates. Strictly limiting the activation range of the deletion operator to the local neighborhood directly related to the edge to be forgotten ensures the accuracy and specificity of the forgetting operation, minimizing interference with irrelevant regions of the graph.In summary, these technical features work together to enable the final model to efficiently forget specific high-risk compound-protein interactions while robustly maintaining its accuracy in predicting a large number of effective pharmacological associations in the graph, providing a more reliable foundational tool for AI-based drug discovery.

[0019] Other advantages, objectives and features of the present invention will become apparent in part from the following description, and in part from those skilled in the art through study and practice of the invention. Attached Figure Description

[0020] Figure 1 This is a framework diagram of the Subspace Constraint Graph Forgetting (SCGU) method for heterogeneous CPI graphs in this invention.

[0021] Figure 2 This is a graph showing the fractions of the ablation experiment in this invention on different models.

[0022] Figure 3 This is a comparison of the convergence of SCGU (orange) and GNNDelete (blue) based on the relational graph convolutional network (RGCN) backbone in this invention. Detailed Implementation

[0023] The present invention will now be described in further detail with reference to specific embodiments, so that those skilled in the art can implement it based on the description.

[0024] It should be understood that terms such as “having,” “comprising,” and “including” as used herein do not exclude the presence or addition of one or more other elements or combinations thereof.

[0025] It should be noted that, unless otherwise specified, the experimental methods described in the following implementation plan are all conventional methods, and the reagents and materials described are all commercially available unless otherwise specified.

[0026] I. Methods and Data 1.1 Dataset This approach integrates multiple biomedical knowledge sources related to CPI. The goal is to remove unreliable or fabricated associations, providing a robust foundation for model training and validation.

[0027] This invention integrates information from multiple well-established databases, including CTD, UniProt, PubChem, SIDER, DrugBank, ChemSpider, and BindingDB. Furthermore, it utilizes four classic drug-target interaction (DTI) benchmark datasets—Luo's dataset, Hetionet, Yamanishi 08, and BioKG—to supplement interaction information. These heterogeneous resources collectively provide data on compounds, proteins, side effects, and drug-disease associations.

[0028] Protein candidates were first screened from the CTD (Cognitive Disease Target), retaining genes with a disease association score higher than 20, indicating a strong biological association with the disease. These genes were then mapped to UniProt protein IDs and amino acid sequences, resulting in a consolidated set of 1,975 proteins. This invention uses relatively lenient thresholds to ensure coverage of diverse potential targets.

[0029] Drug compounds were primarily derived from the CTD and the aforementioned DTI datasets, with only entries retaining those having a compound-disease association score higher than 10. Interaction information was further augmented using BindingDB, DrugBank, and ChemSpider. Molecular representations (such as SMILES strings and PubChem compound IDs) were standardized to maintain consistency across databases. Drug side effect information from SIDER was incorporated to enrich the dataset's contextual information. A statistical summary of the comprehensive dataset is shown in Table 1.

[0030] To further improve the reliability and clinical relevance of the dataset, withdrawal information from major drug regulatory agencies was additionally integrated. This step enabled the identification and processing of high-risk CPIs that indicated obsolescence or posed safety risks.

[0031] Drug withdrawal information is considered an indicator of potential pharmacological risks. Continued reliance on CPIs associated with withdrawn drugs could lead to wasted research resources or safety blind spots in downstream applications. Therefore, it is desirable for the model to dynamically reduce its dependence on these high-risk CPIs, ensuring its predictions remain consistent with the latest regulatory and clinical knowledge.

[0032] Withdrawal records were collected from seven international regulatory agencies and databases, including the US FDA, European EMA, WHO, UK MHRA, Australian TGA, Canadian HC, and WithdrawnDB (WDB). The coverage areas, abbreviations, and main withdrawal categories of each source are summarized in Table 2. Drug names in the withdrawal lists were compared with compounds in the heterogeneous dataset of this invention using exact matching and substring matching. For each matched drug, this invention identified 1–5 associated protein targets as potentially unreliable interactions. This process yielded 175 high-risk CPIs involving 51 compounds and 146 unique proteins. These edges were labeled as “forgotten sets” for subsequent graph forgetting experiments.

[0033] It is important to note that regulatory withdrawal statements are based on the drug level and do not specify the exact compound-protein pairing. Therefore, the high-risk CPIs in the dataset are obtained by associating the withdrawn drug with its primary targets recorded in public biochemical resources, rather than directly from the withdrawal documents.

[0034] Importantly, these 175 withdrawn CPI relationships represent only a tiny fraction of the complete CPI space, forming a sparse subgraph. These deleted edges are distributed across a variety of compound and protein families, rather than being concentrated on a few nodes, indicating that the forgotten set is not limited to a single or localized regulatory situation. This broad coverage alleviates concerns about overfitting the model to narrow interaction patterns and ensures that the forgetting task encompasses diverse relationship types. A statistical summary of the CPI subgraph is shown in Table 3.

[0035] The final dataset contains 16,189 nodes, divided into three categories: compounds, proteins, and drug side effects. This includes 8,360 compounds with SMILES and CIDs, 1,975 proteins with amino acid sequences and UIDs, and 5,854 drug side effects. Among these, 175 identified high-risk CPIs constitute the primary target of this invention's forgetting assessment.

[0036] 1.2 Introduction to Similarity Methods 1.2.1 Compound Similarity To quantify the structural similarity between compounds, this invention uses PubChem fingerprints as binary molecular descriptors. Each fingerprint encodes the presence or absence of a specific molecular substructural feature, thus achieving a compact representation of molecular features. These bit vectors are widely used to evaluate pairwise similarity between compounds based on encoding patterns.

[0037] The similarity between two compounds is measured by the Tanimoto coefficient, which is defined as follows: Where A and B are fingerprint vectors, and A·B represents their dot product. and Represents their respective square norms.

[0038] For each pair of compounds, this invention calculates T(A,B) to quantify their structural overlap. To avoid invalid results due to identical isomers, this invention excludes pairs with T(A,B)=1 from downstream analyses.

[0039] 1.2.2 Protein Similarity Protein similarity is assessed through global alignment of their amino acid sequences. For two proteins A and B, this invention uses a BLOSUM substitution matrix and employs predefined gap opening and gap extension penalties for alignment. A dynamic programming algorithm is used to determine the optimal amino acid correspondence between the two sequences across their full length.

[0040] The maximum number of matching amino acids obtained after global comparison is denoted as Matches, and a similarity score is calculated based on these. ; where Len(A) and Len(B) are the lengths of the two amino acid sequences.

[0041] This normalization method ensures comparability between protein sequences of different lengths.

[0042] All calculations are performed using the pairwise2.align.globalxx module in the Biopython package.

[0043] 1.3 Construction of Heterogeneous Graphs Define heterogeneous graphs as ,in Represents a set of nodes. Denotes the set of edges. This is the node feature matrix. Node set. It contains three non-overlapping node types: compound (C), protein (P), and side effect (S), numbered sequentially as follows: ; edge set It is constructed from various biological relationships. The directed interaction edge C→P from compound to protein comes from a binary adjacency matrix. Non-zero terms in the matrix. The compound-compound similarity edge C↔C originates from the similarity matrix S. cc Only compound pairs with a similarity ≥ 0.6 are retained. Protein-protein similarity edges P ↔ P originate from the similarity matrix S. pp Protein pairs with a similarity ≥ 0.5 are retained. Furthermore, the directed edge C→S from compound to side effect originates from matrix A. cs Non-zero items. For each relation type r, this invention assigns a unique identifier.

[0044] For each edge (u,v,r), add an additional reverse edge (v,u,r+n). r ); to support bidirectional information transfer in GNNs, where n r The total number of master relation types.

[0045] In the prediction task, only CPI edges (compound-protein) serve as supervisory signals; while CCS (compound similarity), PPS (protein similarity), and SE (side effect association) are used only as auxiliary structural features to enhance message delivery. Negative samples are generated using a "filtering strategy": the head entity (compound) or tail entity (protein) of a positive sample is replaced, but the replacement must be a node of the same type. This strategy ensures that the generated negative samples do not overlap with any real positive samples.

[0046] First-order neighbor nodes refer to all nodes in a heterogeneous graph that are directly connected to a given node through any type of relation edge, including compound nodes, protein nodes, and side effect nodes.

[0047] 1.4 Subspace Graph Forgetting Method 1.4.1 Formal Definition of Forgetting Task The removal strategy for high-risk CPIs emphasizes accuracy while minimizing interference with the overall model. Compared to the computationally expensive and destructive complete retraining, a more canonical approach is adopted to selectively modify the already trained GNN. The goal is to preserve the integrity of effective pharmacological relationships while forgetting erroneous interactions. To this end, a modular, layer-by-layer deletion operator is designed that can be seamlessly embedded into various GNN architectures, enabling fine-grained removal of high-risk CPIs without compromising the model's overall predictive ability.

[0048] set up For heterogeneous graphs, This is a fully trained GNN model. The forgetting task is triggered by a "forgetting request," which is a specified set of high-risk CPI edges in the graph, denoted as . The goal is to obtain a new model. Their actions should be consistent with those described in the "cleaned image". The model trained on the above is equivalent; in The high-risk borders have been removed.

[0049] To approach this ideal state as closely as possible without complete retraining, the modified model QUOTE Two core requirements must be met: 1. Erasure Integrity: For the forget set any edge e in cp Model m' should no longer retain any residual memory of its existence. The model's output should be completely independent of whether the edge exists; that is, from the model's perspective, this high-risk connection should be considered "virtual and never existed".

[0050] 2. Knowledge Stability: The forgetting process must be controlled and should not cause collateral damage to the knowledge already learned by the model. For all other valid parts of the diagram, the model... The prediction should be consistent with the original model. The predictions were almost identical. This ensures that removing a small number of high-risk data points will not trigger a series of unexpected chain reactions across the entire network.

[0051] 1.4.2 Mathematical Form of the Forgetting Principle Removing high-risk compound-protein interactions from heterogeneous graphs is no simple task, as the representations of nodes and edges are closely intertwined with their local and global graph structures. To ensure that the forgetting process is both effective and non-destructive, this invention formalizes its objectives through two core mathematical principles.

[0052] Fidelity of Erasure: This principle requires that, after forgetting, the model's treatment of any deleted edge should be statistically indistinguishable from its treatment of a random "non-existent connection." Formally, let m' be the model after forgetting, and its generated node embeddings be h'. The scoring function for the model (e.g., dot product or a small MLP) is used to predict the probability of an edge existing.

[0053] The forgetting process must guarantee the following: the score distribution of the deleted edges. Scoring distribution of random non-edge Almost identical: ; .

[0054] If the above conditions are met, it means that the model has truly forgotten the set of forgotten memories. The specific structural information related to those edges.

[0055] Structural Preservation: This principle ensures that... (the text abruptly ends here, likely due to an incomplete sentence or a missing section.) During this process, the learned representations corresponding to the effective structures in the graph will not be destroyed. Let... Indicates surrounding a valid edge The k-hop closed subgraph. Let Agg(·) be an aggregation function (e.g., element-wise mean). In the forgotten model, the aggregation representation of this subgraph should be close to the corresponding representation in the original model. It can be represented as: ; in, and These are the node embeddings of the original model m and the forgotten model m', respectively. This constraint can be viewed as a regularization term, which helps prevent catastrophic forgetting of valuable learned knowledge.

[0056] In summary, these two principles provide a rigorous framework for assessing and optimizing the forgetting process: the first principle ensures that what should be forgotten is indeed forgotten, while the second principle ensures that what should be remembered is still well preserved.

[0057] Figure 1 This provides an overview of subspace graph forgetting methods. In the figure, (a) relation-aware subspace constraints are introduced into the graph neural network (GNN) architecture to achieve forgetting of high-risk compound-protein interactions (CPIs). (b) The training objective simultaneously optimizes an "erasure loss" to force the forgetting of spurious associations and a "retention loss" to maintain the accuracy of predictions of real interactions. (c) Fine-grained deletion operators are applied to each layer of the network to suppress activations induced by erroneous edges, thereby achieving efficient and stable forgetting in CPI graphs.

[0058] 1.4.3 SCGU Forget Operator: Mechanism and Theory To effectively remove a high-risk interaction e from a heterogeneous graph cp A mechanism was designed to intercept and neutralize the impact of information in a "surgical" manner as it propagates through the layers of the GNN.

[0059] To address this, a novel, layer-by-layer forgetting operator is proposed, which is applied conditionally and efficiently parameterized through low-rank adaptation.

[0060] set up Indicates the first The transformation function of a multilayer GNN. This invention adds a forgetting operator to this function. This operator is used to modify the output node representation of the layer. By default, this operator is "silent," activating only a local set. The inner activation is a set consisting of the local neighborhood around the deleted edge e.

[0061] in, It is a learnable, relation-specific transformation. This conditional application ensures that the forgetting process is highly targeted, thus preserving the majority of the model's computation and learned representations.

[0062] If implemented directly, each relation type would require a full-rank transformation matrix, which would be computationally very expensive.

[0063] In the method of this invention, it is decomposed into a low-rank subspace, thereby reducing the number of parameters: ;in, As the shared projection basis across all relationships at this layer, and This is a lightweight, relation-specific adapter. This design captures common forgetting patterns across relation types while maintaining computational efficiency. Importantly, because... Therefore, by The introduced updates are constrained to a low-dimensional subspace. This constraint limits the magnitude and direction of the perturbation applied during the forgetting process, preventing uncontrolled drift in message passing within heterogeneous graphs and ensuring that changes in representation always remain within a bounded range. A detailed proof of the formal derivation of this stability result is given in Section 1.4.4.

[0064] also, The impact of multi-hop message passing and its spectral behavior are theoretically analyzed in Section 1.4.5. We prove that the propagation of the deletion effect between GNN layers is bounded, and that this low-rank update does not introduce new high-amplitude spectral modes, thus avoiding spectral leakage. The number of hops k is an adjustable hyperparameter, typically taking values ​​of 2 or 3, used to control the local extent of structure preservation.

[0065] This residual can be explicitly written as This distinguishes SCGU from methods like GNNDelete that learn the complete transformation matrix for each relation type. Using the identity transformation as an "anchor" for updates ensures that the forgetting operation is more like a controlled perturbation than a "complete replacement," thus contributing to more stable convergence. Furthermore, because... Shared across relationships, but only lightweight. The matrix is ​​relation-specific, and the savings in the number of parameters come from both the low-rank structure itself and the sharing mechanism across relations, rather than simply from the choice of a smaller rank.

[0066] 1.4.4 Details and stability proof of the SCGU operator The detailed derivation of the theoretical guarantee of the SCGU operator is as follows, which clarifies why subspace constraint parameterization can bring about bounded and stable forgetting updates.

[0067] For the final Lth layer of a GNN, the forgotten nodes are represented as follows: ; in: It is the shared projection matrix of the Lth layer; It is a relationship-specific adapter; and Therefore, the update item It is confined to an r-dimensional subspace within a d-dimensional feature space.

[0068] To ensure the deletion of edges For Erasure Integrity, we define the upper bound of the representational shift as: ; We implicitly assume that the activation function σ(·) is 1-Lipschitz (e.g., ReLU or LeakyReLU), that is: .

[0069] Using subspace parameterization and operator norm properties, the above bound can be written as: ; In particular, the offset caused by the low-rank update satisfies: ; This indicates that the magnitude of the disturbance is from (i.e., the spectral norm) directly controls this. Because The perturbation only acts on the lower-dimensional subspace, avoiding arbitrary distortion in its orthogonal directions.

[0070] Finally, the offset of node similarity has the following lower bound: ; This result shows that the representation offset between the original node embedding and the forgotten node embedding is strictly bounded, thus ensuring the stability of the forgetting process.

[0071] More specifically, item It plays the role of the Lipschitz constant in the layer-by-layer deletion operator. As long as the operator norm remains moderate, the similarity of the node representations will not exceed the aforementioned quadratic bound, and will not be destroyed even if multiple forgetting steps are performed.

[0072] We further analyze the trainable adapter The behavior during the optimization process. Let the forgetting loss be L. forget The standard gradient descent update is as follows: ; Where η>0 is the learning rate and t is the number of iterations. Due to the effective operator... Keeping unchanged, the updated trajectory is restricted to P (L) The columns span a low-rank subspace. If we assume L... forget about With L g - For a continuous Lipschitz gradient, when η < 2 / L g Under the given conditions, first-order optimization guarantees that the loss sequence is non-increasing and converges to a stable point in the restricted subspace. Shared projection matrix P (L) Especially important in multi-relationship graphs: it acts as a specific adapter for all relationships. Aligning to a unified subspace avoids misalignment of update directions between different relations. This reduces the risk of spectral leakage, enabling SCGU to exhibit more stable and direction-controlled update behavior in multi-relation GNNs.

[0073] 1.4.5 Propagation of the Deletion Operator in Message Passing We analyze the deletion operator How to propagate during message passing in a GNN and prove its spectral stability. Let the representation of node u in the l-th layer be... The trainable weight matrix is , Neighborhood σ(·) is the 1-Lipschitz activation function. The deletion operator for relation r in the l-th layer of SCGU is: Incorporating this into message passing updates yields: This indicates that the deletion operation only affects incoming messages.

[0074] Substitution have to: ; The third term represents the low-rank perturbation introduced by the deletion step. Let the update without deletion be: ; Difference term satisfy: ; Recursively applying this boundary, we can obtain the result after L levels: ; We prove that the effects of deletion remain bounded during interlayer propagation. We analyze the spectral properties: This is an update of the rank-r of I. Let... Let i be the i-th eigenvalue, then: And there are: ; This means that at most r eigenvalues ​​deviate from 1, and high-amplitude spectral modes will not appear. Therefore: ; ρ(·) is the spectral radius. This ensures that the operator will not produce runaway amplification or introduce spectral leakage outside the low-rank subspace. Therefore, the deletion operator of SCGU propagates in a controlled, bounded, and stable manner during message passing.

[0075] 2. Experiment 2.1 Experimental Setup All experiments were implemented in Python 3.8 using PyTorch 2.0.1 and accelerated on NVIDIA CUDA 11.8. This invention evaluates the proposed method on a compound-protein interaction (CPI) prediction task, using representative GNN backbone networks including RGCN, RGAT, GCN, and GAT. Further implementation and training details are provided in Section 2.1.1.

[0076] 2.1.1 Experimental Details Experiment setup details All models were trained using the Adam optimizer and employed early stopping on the validation set AUC. Each GNN backbone network was pre-trained for 3000 epochs. For heterogeneous models, validation is performed every 500 epochs. For isomorphic models, validation is performed every 100 epochs.

[0077] The forgetting phase runs 100–1000 iterations depending on convergence. All hyperparameters are set via grid search, and the final configuration is released with the codebase. The dataset is divided into training, validation, and test sets at 85% / 5% / 10%. During training, negative samples are generated at a ratio of 10:1 to positive samples to reflect the sparsity of the true CPI.

[0078] To simulate real-world forgetting scenarios, we selected 175 high-risk CPI edges as removal targets: these edges were included in the initial training and removed during the forgetting phase. The validation and test sets remained completely consistent across all experimental runs. To ensure reproducibility, we fixed all random seeds. The fixed removal set consisted of the 175 high-risk CPI edges selected from the training graph; no additional locality partitioning or resampling was performed. The final model and settings are released in a public codebase.

[0079] Assessment details To comprehensively evaluate the performance of the forgetting framework, we employ two complementary evaluation dimensions: knowledge retention and forgetting effectiveness.

[0080] Knowledge Retention: This metric measures the model's performance on the test set. The model's predictive performance on valid CPI interactions is shown above. Higher scores indicate that the forgetting process does not impair the model's ability to identify legitimate pharmacological associations.

[0081] Forgetting effectiveness: This metric measures the degree to which the model forgets the deleted high-risk edges. Edges in the forgetting set. The forgotten edges are treated as negative (label 0), and an equal number of positive edges (label 1) are sampled from the remaining valid edges. If AUC_f or AUPR_f is high, it indicates that the model assigns low confidence to the forgotten edges and is able to successfully distinguish these erroneous interactions.

[0082] Baseline Method Details We compare SCGU with the following representative graph forgetting baseline methods: Retraining: Completely discard the original model and retrain a new GNN on the cleaned graph. This method represents the theoretical upper limit of forgetting performance, but it is computationally very expensive.

[0083] GIF: An architecture-agnostic approach that uses influence functions to estimate the parameter updates required to forget a target.

[0084] Unlink to Unlearn (UTU): A lightweight forgetting method that directly removes target edges, aiming to minimize over-forgetting while maintaining downstream performance.

[0085] GraphEraser: Approximates retraining through graph partitioning and aggregation-based mechanisms to avoid the overhead of full training.

[0086] GraphEditor: Provides efficient closed-loop forgetting updates for linear GNN architectures.

[0087] CertUnlearn: A theoretically guaranteed certified unlearning framework that ensures the verifiability of information removal.

[0088] GradAscent: Through the forgetting set The gradient ascent of the loss function is applied to the edges in the model, directly optimizing the model to increase the loss associated with the target, thereby promoting forgetting.

[0089] Descent-to-Delete: Approximate retraining by performing several steps of gradient descent on each deleted edge and adding noise to achieve statistical indistinguishability.

[0090] GNNDelete: Introduces a layer-by-layer deletion operator into the GNN architecture to achieve fine-grained edge deletion while preserving the local graph structure.

[0091] 2.2 Evaluation Method A dual-perspective evaluation strategy is employed to examine both the retention of effective knowledge and the effectiveness of the forgetting process. Specifically, this invention measures two dimensions: (1) Knowledge Retention – assessing the model's ability to maintain predictive performance on unseen effective interactions; and (2) Erasure Efficacy – quantifying the degree to which the model forgets high-risk or spoofed associations. For each evaluation dimension, this invention reports the area under the ROC curve (AUC) and the area under the precision-recall curve (AUPR). Higher AUC_t and AUPR_t indicate that the model performs well in terms of effective knowledge retention; while higher AUC_f and AUPR_f correspond to effective and targeted forgetting effects.

[0092] 2.3 Baseline Method To comprehensively evaluate the performance of SCGU, it is compared with a set of representative graph forgetting baseline methods under two settings: homogeneous graph GNN and heterogeneous graph GNN. In the homogeneous graph scenario, this invention uses GCN and GAT as the backbone network; while in the heterogeneous graph scenario, RGCN and RGAT are used as the backbone network. The baseline methods include: Retrain, GIF, Unlink to Unlearn (UtU), GraphEraser, GraphEditor, CertUnlearn, GradAscent, Descent-to-Delete (D2D), and GNNDelete.

[0093] 2.4 Comparison with baseline methods The systematic experimental results summarized in Table 4 show that SCGU consistently outperforms existing forgetting baseline methods across all four GNN architectures. It achieves a new optimal balance between preserving model utility and effectively erasing spurious information.

[0094] On the GCN backbone, SCGU establishes its advantage by surpassing the costly retraining baseline: specifically, it improves the knowledge retention metric AUC_t by approximately 2–3%, while further improving the forgetting performance metric AUC_f by nearly 4%. This performance gap is even more significant compared to weaker baseline methods: for example, SCGU achieves improvements of up to 40–70% in forgetting-related metrics compared to GraphEditor and GraphEraser, demonstrating that relying solely on simple linear updates or local perturbations is far from sufficient for this task. Even against stronger competitors like UtU and GNNDelete, the method of this invention still achieves a significant gain of 10–20% in forgetting performance, further validating SCGU's ability to perform fine-grained, selective forgetting without compromising the model's predictive capabilities.

[0095] This trend also continues in the GAT architecture based on attention mechanisms. On GAT, this invention achieves a 2–4% improvement in forgetting performance (AUC_f, AUPR_f) while maintaining knowledge retention (AUC_t, AUPR_t) only 1–2% lower than Retrain. Compared to dedicated forgetting baseline methods, SCGU also shows significant advantages: an improvement of over 30–45% compared to GraphEraser and 15–25% compared to UtU. This indicates that the method of this invention effectively eliminates spurious edges while still retaining the predictive ability learned by the neighborhood attention mechanism.

[0096] Superiority on Complex Heterogeneous Architectures: The low-rank, relation-aware design employed in this invention has the most prominent advantages on complex heterogeneous graphs, and this type of graph structure is particularly well-suited for modeling complex CPI data.

[0097] On RGCN, SCGU's knowledge retention performance is almost identical to Retrain (with a difference of only 1–2%), but its forgetting ability is 3–4% higher than this "gold standard." Compared to gradient-based forgetting methods like GradAscent, SCGU's improvement exceeds 40–55%; and compared to GraphEraser, this gain can even reach 50–60%. These results indicate that in complex relational graphs, low-rank adaptation mechanisms are particularly effective in "untangling" high-risk interactions, while other methods often suffer from poor generalization due to overly simplified update strategies, or even performance degradation.

[0098] On the most expressive RGAT architecture, SCGU achieves an overall optimal balance between the goals of "knowledge retention – forgetting effect". This further highlights the robustness of the method of this invention and proves that it is equally effective in highly complex, relation-aware, and attention-based scenarios.

[0099] In summary, these results establish SCGU as a new benchmark for CPI forgetting tasks. Across four GNN backbones, SCGU consistently and significantly outperforms baseline methods: performance gains on high-risk (to-be-forgotten) subsets are typically between 20–40%, and in some settings even reach 70–80%, while knowledge retention metrics are almost indistinguishable from full retraining. In contrast, methods relying on linear approximations or local perturbations, such as GraphEraser and CertUnlearn, have limited ability to maintain global consistency and often experience performance breakdowns when faced with complex relational patterns. In stark contrast, SCGU, through targeted low-rank gradient updates, selectively removes high-risk CPI edges while preserving remaining potential pharmacological relationships, making it a robust and efficient solution for graph forgetting in compound-protein interaction networks.

[0100] Interestingly, in a few cases, SCGU even outperformed the Retrain baseline on forgetting metrics. This stems from their drastically different training dynamics, rather than some kind of "abnormal advantage": Retrain has never encountered these high-risk CPI edges and therefore does not explicitly learn to suppress associated patterns; while SCGU first encodes these interactions on the complete graph and then applies a targeted deletion step to deliberately weaken their impact. This "learn-then-suppress" process allows SCGU to achieve more decisive score reductions on the "to-forget" set, while maintaining overall performance comparable to full retraining.

[0101] 2.5 Ablation Experiment 2.5.1 Impact of different loss function weights 𝛼 To investigate the forgetting mechanism in the CPI forgetting task, ablation experiments were conducted to examine the impact of the hyperparameter φ. As shown in Table 5 and Figure 2, the value of φ significantly affects the balance between preserving true CPI predictions and forgetting spurious associations. This trend is most pronounced for RGCN.

[0102] When α is small (e.g., 0.0–0.2), the model prioritizes preserving neighborhood influence, resulting in stable performance on the retain set, but limited ability to distinguish between deleted edges and true edges. When α increases to around 0.4–0.6, the model reaches an optimal compromise, achieving significant improvements in both AUC and AUPR, indicating a stronger ability to isolate high-risk interactions without compromising the predictive performance of true CPI. However, when α is too large (e.g., 0.8–1.0), retain set performance declines, reflecting an overemphasis on edge deletion consistency at the expense of neighborhood structure. A similar, but milder, trend is observed in GCN. A moderate α helps distinguish high-risk edges, but the gain plateaus earlier than in RGCN, reflecting a simpler structural assumption in isomorphic graphs. For GAT and RGAT, the performance curves remain stable over a wider range of α, with peak performance occurring around 0.4–0.6. Overall, moderate values ​​of α (0.4–0.6) yielded the most robust results, with the largest relative improvement observed in RGCN. This analysis suggests that α plays a key moderating role between effective knowledge retention and spurious relation forgetting, further reinforcing the reliability of the forgetting framework proposed in this invention.

[0103] 2.5.2 Ablation Experiment of Deletion Operator W To investigate the contribution of the deletion operator W to the CPI forgetting framework, this invention conducted comparative ablation experiments with two variants and the full SCGU model. The first variant, MLP-only, replaces the deletion operator W with a shallow MLP lacking low-rank structure. The second variant, Single A+B, uses a pair of low-rank factors shared across all relations, thereby canceling relation-specific adaptation. These experiments were conducted on the RGCN and RGAT backbones, which are particularly relevant to heterogeneous CPI graphs, to assess the impact of both low-rank parameterization and relation specificity. As shown in Table 6, on RGCN and RGAT, the full SCGU model consistently outperforms both variants on all metrics (AUC_t, AUPR_t, AUC_f, AUPR_f). The MLP-only variant is slightly inferior to SCGU, especially on the forgetting set, reflecting the importance of low-rank structure in capturing meaningful graph structure deletions. The decline is more pronounced in the Single A+B variant, particularly in AUC_f and AUPR_f, indicating that relation-specific low-rank adaptation is crucial for effectively forgetting spurious associations while preserving genuine interactions. These results indicate that low-rank parameterization and relation specificity of the deletion operator are essential for improving the forgetting effect and preserving the true CPI prediction.

[0104] 2.5.3 Layered ablation experiments The experimental results across the four backbone networks are summarized in Table 7. As shown in Table 7, the "last layer only" variant performs similarly to the retraining baseline, but consistently underperforms the layer-wise strategy (i.e., the proposed method) across all models. In particular, the layer-wise strategy maintains a more stable balance between knowledge retention and edge forgetting. For example, on GCN, the layer-wise approach achieves a 2–3% improvement on the test set compared to the "last layer only" variant, and exhibits better forgetting consistency. Similarly, RGCN's performance degrades when the deletion operator is used only on the last layer, highlighting the importance of distributing the deletion operator across all layers to capture the heterogeneity of the CPI graph. In GAT and RGAT, the performance gap between "last layer only" and "retraining" is smaller, indicating that the attention mechanisms in these architectures compensate to some extent for the lack of multi-layer deletion operators. Nevertheless, the full layer-wise strategy still outperforms in isolating high-risk CPI edges, demonstrating its effectiveness in distinguishing key interactions. Overall, these results suggest that while deletion only in the last layer may achieve near-retraining levels, a layer-by-layer deletion strategy is crucial for maximizing the forgetting effect in complex CPI graphs.

[0105] 2.6 Spatial and temporal efficiency of the model of this invention First, the spatial efficiency of the model in this invention is evaluated by comparing the number of trainable parameters of different forgetting methods in the CPI forgetting scenario. As shown in Table 8, the method of this invention achieves a significant reduction in the number of parameters compared to retraining classes and gradient-based methods.

[0106] Further comparisons were made of the actual wall-clock time of different methods on the CPI forgetting task. As shown in Table 9, the method of this invention performs excellently in terms of time overhead under both RGCN and GCN architectures: the running time of SCGU is significantly reduced compared to retraining; at the same time, SCGU also shows better time efficiency than methods such as GNNDelete and GIF. Among them, the low-rank settings (rank=1, rank=2, rank=4) further shortened the computation time while ensuring performance.

[0107] Figure 3 A comparison of the convergence of SCGU (orange) and GNNDelete (blue) based on the RGCN backbone network. The figure shows the complete 1000 training steps (top left), as well as magnified views of different training stages. SCGU stabilizes quickly and maintains a lower loss within about 100 steps, while GNNDelete converges more slowly and fluctuates more. Figure 3 Together with Table 10, this demonstrates the convergence behavior of the model.

[0108] In comparison, retraining requires more than 25,000 steps to stabilize, GNNDelete requires about 1,835 steps, while SCGU only requires 96 steps to converge—meaning a speedup of 270× compared to retraining and 19× compared to GNNDelete.

[0109] This rapid convergence demonstrates that the low-rank adaptation mechanism of this invention can effectively align and update parameters associated with spurious CPI edges, making it particularly suitable for biomedical scenarios: this feature is especially important when new compound-protein evidence is constantly emerging and frequent model updates are required.

[0110] Overall, these results demonstrate that the method of this invention has superior space efficiency, time efficiency, and convergence efficiency compared to all baseline methods, and maintains high prediction fidelity and good scalability in real CPI forgetting tasks.

[0111] This study addresses the challenge of unreliable compound-protein interaction (CPI) associations in biomedical knowledge graphs, which can propagate high-risk signals and weaken prediction reliability. To mitigate this problem, this invention proposes SCGU, a subspace-constrained graph forgetting framework based on low-rank adaptation and oriented towards graph neural networks. SCGU can efficiently and selectively remove erroneous relations while preserving valid knowledge. By utilizing shared low-rank projections and relation-specific adapters, the method of this invention reduces parameter complexity during forgetting and accelerates model convergence.

[0112] Experimental results demonstrate that SCGU effectively eliminates high-risk CPIs while maintaining strong predictive performance, outperforming existing baseline methods in both accuracy and efficiency. SCGU provides a practical and scalable solution for reliable forgetting in biomedical graphs, contributing to the development of more reliable and adaptive AI systems for drug discovery.

[0113] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and examples shown and described herein.

Claims

1. A subspace-constrained graph-forgetting method for heterogeneous CPI graphs, characterized in that, The method comprises the following steps: constructing a heterogeneous graph comprising compound nodes, protein nodes and drug side effect nodes, and an edge set of various relationships therebetween, wherein an edge between a compound node and a protein node represents a compound-protein interaction, an edge between compound nodes is generated based on compound structural similarity, an edge between protein nodes is generated based on protein sequence similarity, and an edge between a compound node and a drug side effect node represents a known drug side effect association; identifying a high-risk drug from a drug withdrawal list of a drug regulatory agency, and marking the compound-protein interaction edges associated with the high-risk drug in the heterogeneous graph as a set of edges to be forgotten; selecting a graph neural network as a backbone, and embedding a relationship-specific deletion operator in each layer of the trained backbone, the deletion operator being parameterized as the sum of a unit matrix and a low-rank matrix, the low-rank matrix being obtained by multiplying a projection matrix shared across relationships and an adapter matrix specific to the relationship; constructing a forgetting loss function with the edges in the set of edges to be forgotten as forgetting targets, the forgetting loss function forcing the model to reduce the predicted confidence of the edges in the set of edges to be forgotten; constructing a retention loss function with the compound-protein interaction edges in the heterogeneous graph other than the set of edges to be forgotten as knowledge retention targets, the retention loss function being used to maintain the model's prediction ability for valid interactions; linearly combining the forgetting loss function and the retention loss function by a weight coefficient ranging from 0.1 to 0.9 to obtain an overall objective function; optimizing the overall objective function using a gradient descent algorithm, wherein only the parameters of the shared projection matrix and the relationship-specific adapter matrix in the deletion operator are updated, and the weight parameters of the graph neural network backbone remain unchanged; through the optimization process, an updated graph neural network model is obtained, which can forget the compound-protein interactions in the set of edges to be forgotten while maintaining prediction accuracy for the remaining valid compound-protein interactions in the graph.

2. The subspace-constrained graph-forgetting method of heterogeneous CPI graphs of claim 1, wherein, The construction of edges between compound nodes in the heterogeneous graph is achieved by the following steps: obtain the standardized SMILES string corresponding to each compound node in the heterogeneous graph, and based on the SMILES string, query the PubChem database to obtain the corresponding PubChem molecular fingerprint, which is a binary vector representing the characteristics of molecular substructures; for any two different compound nodes in the heterogeneous graph, extract their corresponding binary fingerprint vectors A and B; The Tanimoto coefficient T(A,B) between vectors A and B is calculated, which is calculated by the formula where A.B represents the dot product of vectors A and B, and ||A||2 2 and ||B||2 2 represent the squared norms of vectors A and B, respectively. set a similarity threshold range, with a lower limit of 0.6 and an upper limit of 1.0; when the calculated Tanimoto coefficient T(A, B) of a pair of compound nodes is greater than or equal to the lower limit value 0.6 and less than the upper limit value 1.0, a structure similarity undirected edge is established between the pair of compound nodes; when the calculated Tanimoto coefficient T(A, B) of a pair of compound nodes is equal to 1.0, no edge is established.

3. The subspace-constrained manifold-forgotten method of heterogeneous CPI graphs of claim 1, wherein, The construction of edges between protein nodes in the heterogeneous graph is achieved by the following steps: obtaining an amino acid sequence corresponding to each protein node in the heterogeneous graph, which is mapped from the UniProt database through a protein identifier; For any two different protein nodes in the heterogeneous graph, obtain their corresponding amino acid sequences, whose lengths are denoted as Len(A) and Len(B) respectively; Using the global sequence alignment module in the bioinformatics software library, using the BLOSUM substitution matrix and applying the preset gap opening penalty and gap extension penalty, performing global sequence alignment on the two amino acid sequences to obtain the optimal alignment result; From the optimal alignment result, the number of completely matched amino acid residues is counted and denoted as Matches; The similarity score of protein sequences A and B is calculated by the formula ; Set a similarity threshold range, the lower limit value of which is 0.5 and the upper limit value of which is 1.0; When the calculated similarity score of a pair of protein nodes is greater than or equal to the lower limit value 0.5, a sequence similarity representing undirected edge is established between the pair of protein nodes.

4. The subspace-constrained manifold-forgotten method of heterogeneous CPI graphs of claim 1, wherein, Identifying high-risk drugs from the drug withdrawal list of drug regulatory agencies and marking the to-be-forgotten edge set is achieved by the following steps: Collecting public withdrawal records from the U.S. Food and Drug Administration, the European Medicines Agency, the World Health Organization, the British Medicines and Health Products Regulatory Agency, the Australian Therapeutic Goods Administration, the Canadian Health Department, and the WithdrawnDB database; From the compound nodes of the heterogeneous graph, extract the standardized drug name string corresponding to each compound; Compare the drug name string recorded in each withdrawal record with the extracted standardized drug name string, which includes exact matching of string complete consistency or substring matching of previous name as substring of later name; When the drug name string in a withdrawal record is successfully associated with a compound node in the heterogeneous graph through the exact matching or substring matching, mark the compound node as a high-risk drug node; For each high-risk drug node marked, find a set of protein targets that have known interaction relationships with the compound represented by the node from the pre-integrated biomedical database, including BindingDB, DrugBank, and ChemSpider; Map each target in the found set of protein targets to the corresponding protein node in the heterogeneous graph; In the heterogeneous graph, identify the compound-protein interaction edges connecting the high-risk drug compound node and each mapped protein node; Define the set of all identified compound-protein interaction edges as the to-be-forgotten edge set; wherein each marked high-risk drug node is associated with 1 to 5 protein targets on average.

5. The subspace-constrained manifold-forgotten method of heterogeneous CPI graphs of claim 1, wherein, The negative samples in the training data relied on by the loss function are generated by filtering strategy, and the specific steps are as follows: From the complete edge set of the heterogeneous graph, extract all verified compound-protein interaction edges to form a positive edge set, and record their corresponding adjacency matrix; traversing each edge in the set of positive edges, the edge connecting a head entity compound node and a tail entity protein node; generating a first type of negative sample using a first replacement mode, the first replacement mode being to keep the head entity compound node and randomly select a protein node different from the original tail entity from the set of all protein nodes of the heterogeneous graph as a new tail entity, thereby generating a new candidate edge; generating a second type of negative sample using a second replacement mode, the second replacement mode being to keep the tail entity protein node and randomly select a compound node different from the original head entity from the set of all compound nodes of the heterogeneous graph as a new head entity, thereby generating another new candidate edge; after generating each candidate edge, querying the recorded adjacency matrix to determine whether the candidate edge already exists in the set of positive edges; if it is determined that the candidate edge exists, discarding the candidate edge and re-executing the steps of random selection and determination; if it is determined that the candidate edge does not exist, adopting the candidate edge as an effective negative sample; continuously executing the above generation and determination steps until the number of adopted negative samples Nneg and the number of positive samples in the set of positive edges Npos satisfy a preset proportional relationship R, i.e. Nneg = R x Npos, where the value range of the proportional coefficient R is 5 to 15.

6. The subspace-constrained manifold-forgotten method of heterogeneous CPI graphs of claim 1, wherein, The selection of the graph neural network backbone architecture and the embedding of the deletion operator are implemented by the following steps: selecting a graph neural network architecture as the backbone from a pre-defined model set according to the number of relationship types contained in the heterogeneous graph and the node feature dimension, the pre-defined model set including graph convolution network GCN, graph attention network GAT, relationship graph convolution network RGCN, and relationship graph attention network RGAT; integrating the relationship-specific deletion operator into the message passing or feature transformation function of each layer of the selected graph neural network backbone; initializing the shared projection matrix and the relationship-specific adapter matrix in the deletion operator as trainable parameters, wherein the rank r of the low-rank matrix in the deletion operator is constrained to be an integer much smaller than the node feature dimension d, and the value range of r is 1 to 8; managing the parameter set of the deletion operator separately from the original weight parameter set of the graph neural network backbone, and only calculating and applying the gradient update for the deletion operator parameters during the optimization process, while the backbone weight parameters remain frozen.

7. The subspace-constrained manifold-forgotten method of heterogeneous CPI graphs of claim 1, wherein, The process of optimizing the overall objective function using the gradient descent algorithm implements an early stopping strategy to control the training termination according to the following steps: Before starting the optimization iteration, divide the edge data of the heterogeneous graph into a training set, a validation set, and a test set according to a pre-set proportion; set a monitoring interval value K, whose value range is 50 to 200 times of gradient descent iteration; set a continuous monitoring times threshold P, whose value range is 50 to 200 times of monitoring; During the optimization process, after every K gradient descent iterations, evaluate the current model using the validation set to calculate the area under the receiver operating characteristic curve (AUC) of the model on the validation set; comparing the current evaluation result with the highest evaluation result saved in the history record; if the current evaluation result is greater than the highest evaluation result, updating the highest evaluation result, saving the current model parameter as the best model parameter, and resetting a failure counter to zero; if the current evaluation result is less than or equal to the highest evaluation result, adding one to the failure counter; continuously performing optimization iteration and periodic evaluation, and terminating the entire optimization iteration process when the value of the failure counter reaches the threshold P of the continuous monitoring times; after the optimization process is terminated, loading the saved best model parameter into the model as the final updated graph neural network model.

8. The subspace-constrained manifold-forgotten method of heterogeneous CPI graphs of claim 1, wherein, In constructing the edge set of the heterogeneous graph, the following steps are taken to add reverse edges for directed edges to support bidirectional message passing: After the construction of all initial directed relationship edges in the heterogeneous graph is completed, the directed relationship edges include compound-protein interaction edges from compound nodes to protein nodes and side effect association edges from compound nodes to drug side effect nodes; counting the total number of different main relation types in the heterogeneous graph, denoted as ; traverse each initial directed relationship edge in the edge set, which is defined by a source node u, a target node v and a relationship type identifier r; For each directed relation edge traversed , a corresponding reverse relation edge is generated , and the reverse relation edge is added to the edge set of the heterogeneous graph. After traversing and processing all initial directed relationship edges, an extended edge set is obtained, in which each initial directed relationship edge is associated with a corresponding reverse relationship edge, which together form a complete graph structure to support bidirectional message passing of graph neural networks.

9. The subspace-constrained manifold-forgotten method of heterogeneous CPI graphs of claim 1, wherein, The relationship-specific deletion operator is activated within a local subgraph composed of the head node and tail node of each edge in the edge set to be forgotten and their respective first-order neighbor nodes.

10. The subspace-constrained manifold-forgotten method of heterogeneous CPI graphs of claim 1, wherein, In the construction of the reserved loss function, a structure-preserving regularization term is introduced; this term constrains the representation drift during the forgetting process by calculating and minimizing the difference between the aggregated node representations of the model around each valid edge in the heterogeneous graph before and after forgetting, except for the edge set to be forgotten.