Score-guided low-rank hybrid expert knowledge graph forgetting method and system

By employing a score-guided low-rank hybrid expert knowledge graph forgetting method, which utilizes K-hop deletion of subgraphs and low-rank shared experts, combined with request-level gating and decoder score-driven optimization, the problem of dynamic adaptation and parameter redundancy in knowledge graph forgetting is solved, achieving efficient and scalable knowledge graph forgetting.

CN123050583APending Publication Date: 2026-11-06LANZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611414477.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing knowledge graph forgetting methods struggle to adapt to multi-relation requests when faced with dynamic forgetting requests. The encoding representation space is inconsistent with the link prediction and evaluation space, making it difficult to balance relation specificity and semantic sharing. Furthermore, relation-specific deletion parameters become redundant and scalability issues as the number of relations increases.

Method used

A score-driven low-rank hybrid expert knowledge graph forgetting method is adopted. By freezing entity embedding and relation decoder parameters, utilizing K-hop deletion subgraphs and low-rank shared experts, and combining request-level gating and decoder score-driven forgetting optimization, local adjustment and efficient forgetting are achieved.

Benefits of technology

It achieves adaptive adaptation to mixed forgetting requests for single-relation and multi-relation relationships, reduces computation and storage costs, maintains link prediction performance, reduces parameter redundancy, and improves the scalability and forgetting effect of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123050583A_ABST
    Figure CN123050583A_ABST
Patent Text Reader

Abstract

This invention discloses a score-guided low-rank hybrid expert knowledge graph forgetting method and system, relating to the fields of artificial intelligence, knowledge graphs, and graph neural networks. A K-hop deletion subgraph is constructed centered on the head and tail entities of the triples to be forgotten, freezing the trained knowledge graph model and preserving the gradient backpropagation path of the input entity states. A request-level unified gating is generated based on the empirical frequency of each relation in the forgetting condition, and an effective upprojection matrix is ​​obtained by weighted combination of shared low-rank experts. Residual updates are applied only to the entity representations within the deletion subgraph. An absolute suppression term and a same-relation ranking constraint are constructed using the triples to be forgotten as the negative class. The gradients of the retained triples are separated to form a score-guided forgetting loss, which is combined with locality loss to optimize the deletion operator parameters, outputting the model that has completed forgetting. This invention alleviates the problems of deletion operators being difficult to adapt to multiple relation requests, inconsistencies between the target and evaluation spaces, and parameter expansion with the number of relations, achieving controllable and efficient forgetting while maintaining knowledge retention performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence, knowledge graphs, graph neural networks, and machine learning model forgetting technologies. More specifically, this invention relates to a score-guided low-rank hybrid expert knowledge graph forgetting method and system. Background Technology

[0002] With the development of artificial intelligence and big data technologies, knowledge graphs have been widely applied in fields such as biomedicine, academic retrieval, intelligent recommendation, and encyclopedic knowledge services. Knowledge graphs typically describe semantic relationships between entities using knowledge triples in the form of head entity-relationship-tail entity, and continuously absorb new knowledge from databases, business systems, public knowledge bases, and internet resources. However, as data sources, business rules, and application environments constantly change, some knowledge facts in the knowledge graph may become invalid due to information updates, and there may also be issues such as annotation errors, data bias, privacy leaks, or non-compliance with legal and regulatory requirements. Therefore, it is necessary to remove specific knowledge triples and their impact on the model from the trained knowledge graph model. Knowledge graph forgetting is not simply removing triples from the database, because the impact of deleted knowledge may have already been retained in the model's message propagation process and prediction results.

[0003] Graph neural networks (GNNs) can aggregate entity, relation, and structural information in knowledge graphs through neighborhood message passing mechanisms, and have become an important technique for knowledge graph representation learning, knowledge completion, and link prediction. In relational GNNs, different relation types typically correspond to different message propagation parameters and feature transformation methods. After obtaining entity representations, the model also calculates the probability of knowledge triples being true through relation-specific decoders. Therefore, directly deleting a knowledge triple from the original knowledge graph data does not guarantee that the triple's impact on the model is fully eliminated. On the one hand, the information of the deleted triple may have already propagated to the representations of adjacent entities through multiple layers of message passing; on the other hand, the relation-specific decoder may still output a high prediction score for the triple. Thus, the knowledge to be deleted may simultaneously remain in the encoding representation space of the relational GNN and the output space of the knowledge graph decoder.

[0004] Traditional knowledge deletion methods typically require removing relevant knowledge triples from the training set and retraining the entire knowledge graph model using the remaining knowledge data. While this approach can mitigate the influence of specific knowledge to some extent, knowledge graphs are generally characterized by a large number of entities, diverse relation types, large triple sizes, and complex structural relationships. Retraining the model consumes significant computational resources and time, making it difficult to meet the application requirements of frequent knowledge updates, user privacy deletion requests, and real-time knowledge correction. To address these issues, machine forgetting technology has been introduced into the field of knowledge graph processing, forming knowledge graph forgetting techniques. The goal of knowledge graph forgetting is to locally adjust the trained relational graph neural network without a complete retraining process, making the adjusted model as close as possible to the state of the model trained without using the knowledge triples to be deleted, while maintaining its representational ability in retaining knowledge and link prediction performance.

[0005] Existing knowledge graph forgetting methods mainly include full or partial retraining methods, graph partitioning methods, gradient update or influence function methods, verifiable forgetting methods, and deletion operator methods. Full retraining can serve as a strong benchmark, but it has high computational and time costs on large-scale, multi-relational knowledge graphs and is difficult to adapt to continuously arriving deletion requests. Graph partitioning methods reduce the cost of single-time forgetting by splitting the graph into several subgraphs and retraining only the affected parts, but graph partitioning itself severs cross-partition structural dependencies and semantic connections, and model utility depends on the quality of partitioning and aggregation strategies; for highly coupled knowledge graphs, this segmentation-then-forgetting approach easily sacrifices the original relational structure for computational efficiency. Gradient ascent, gradient correction, and influence function methods directly act on the original model parameters, avoiding full retraining, but parameter updates affect a large amount of undeleted knowledge through shared weights, and influence function approximations usually rely on local linearization, Hessian, or specific model assumptions, resulting in approximation errors and computational burdens in deep nonlinear relational graph neural networks. Verifiable methods can provide theoretical boundaries or deletion guarantees, but they often need to satisfy specific model structures, convexity, or propagation forms, and their applicability is still limited by the backbone of complex knowledge graphs.

[0006] Deletion operator methods freeze the original relation graph neural network and insert a small number of trainable modules into local regions related to the knowledge to be deleted, updating only the newly added parameters. Therefore, they are well-suited for approximate forgetting of large-scale knowledge graphs. GNNDelete is a representative method that sets deletion operators after each graph neural network layer and optimizes them using two representation space objectives: Deleted Edge Consistency and Neighborhood Influence. Specifically, Deleted Edge Consistency moves the representation of the edge endpoint to be deleted closer to the representation of randomly selected node pairs, while Neighborhood Influence constrains the non-target representations within the deletion neighborhood to remain as unchanged as possible. This design is generalizable in isomorphic graphs and general graph forgetting, but its deletion decisions mainly rely on shared operators and representation space distances, without establishing a request-level adaptation mechanism tailored to the characteristics of relation types, relation composition, and relation-specific decoders in knowledge graphs.

[0007] Building upon this foundation, SCGU further addresses the high-risk complex-protein interaction forgetting in heterogeneous graphs and knowledge graphs by introducing relation-specific low-rank deletion operators within the GNNDelete framework. This allows for differentiated parameter transformations across different relations. While this approach mitigates the issue of different relations sharing the same deletion matrix in GNNDelete to some extent, its relation-specificity primarily involves configuring or calling corresponding deletion parameters based on relation type, and it has not yet simultaneously resolved the following interrelated problems.

[0008] First, existing methods still fall short in adapting to dynamic forgetting requests. Deletion requests in real-world knowledge graphs do not always correspond to a single, fixed relation, but may consist of triples of multiple relation types. Furthermore, the number, proportion, and semantic combination of relations in different requests change over time. GNNDelete uses a shared deletion operator and cannot change the deletion direction based on the relation composition of the current request. While SCGU provides differentiated parameters for different relations, it still lacks a request-level routing variable uniformly generated by the current complete forgetting request. Therefore, it struggles to instantly reorganize deletion capabilities based on single-relation, multi-relation mixtures, changes in relation proportions, and consecutively arriving deletion requests.

[0009] Second, existing GNNDelete-style losses suffer from a significant inconsistency between the training and evaluation spaces, a limitation that SCGU faces when using this type of representation to match forgetting targets. GNNDelete's Deleted EdgeConsistency primarily constructs the deletion signal by the distance between the intermediate representation of the endpoint of the edge to be deleted and the representation of random node pairs. However, knowledge graph link prediction does not ultimately determine the validity of triples based on the Euclidean distance between entity representations. Instead, relation-specific decoders such as DistMult jointly calculate the predicted logit or probability for the head entity, relation, and tail entity. Relational parameters, entity vector norms, and specific scoring functions all affect the mapping between changes in entity representations and changes in triple prediction scores. Therefore, even if the entities related to the triple to be deleted have undergone significant displacement in the encoding space, it cannot be guaranteed that the predicted score obtained after the relation decoder will necessarily decrease to a sufficiently low level. Existing methods essentially optimize an indirect proxy target in the encoding representation space but evaluate the final forgetting effect in the decoder's scoring space, resulting in a significant gap between the optimized object and the actual technical effect to be achieved.

[0010] Third, the SCGU-style approach of setting deletion transformations based on relationships is insufficient to leverage the shareable forgetting patterns among semantically related relationships. While different relationships in a knowledge graph may have different names, predicted semantics, and even endpoint types, their discrimination processes are not entirely independent and may rely on some common entity attributes, structural patterns, or latent representations. If deletion parameters are primarily separated according to relationship type, it's tantamount to directly converting different relationships into separate learning of deletion capabilities, causing the fundamental forgetting transformations that could be reused across multiple relationships to be repeatedly learned. Furthermore, when a forgetting request simultaneously includes multiple semantically related relationships, existing methods lack mechanisms for joint selection, combination, and dynamic fusion from a set of shared deletion capabilities.

[0011] Fourth, while SCGU enhances relation differentiation through relation specificity, it also suffers from the problem of parameter size expanding with relation complexity. The basic idea of ​​relation-specific deletion operators requires maintaining corresponding relation condition parameters or parameter paths for different relations. Even if low-rank decomposition reduces the parameter size of a single deletion transformation, as the types of relations in the knowledge graph continue to increase, it is still necessary to save corresponding relation-specific parameters for a large number of relations, leading to a significant increase in the overall number of parameters in the forgetting module with the number of relations. Especially in large-scale knowledge graphs containing dozens or even hundreds of relations, even if different relations have similar entity types, structural functions, or semantic patterns, their deletion parameters are still difficult to reuse fully, resulting in duplicate parameters and storage overhead.

[0012] Therefore, the core problems faced by existing technologies can be summarized into four technical issues that are coupled in the same forgetting request and need to be solved in a unified manner: the request-level adaptation problem of dynamic forgetting requests, the inconsistency between the encoding representation space and the link prediction evaluation space, the difficulty in balancing relation specificity and semantic sharing in multi-relation knowledge graphs, and the parameter redundancy and scalability problem caused by the increase in the number of relations for relation-specific deletion parameters. Summary of the Invention

[0013] This invention provides a score-guided low-rank hybrid expert knowledge graph forgetting method and system. It utilizes request-level gated combination to share low-rank experts and directly drives forgetting optimization with decoder scores. This alleviates problems such as the difficulty of adapting deletion operators to multiple relation requests, inconsistency between the target and evaluation spaces, and parameter expansion with the number of relations. It achieves controllable and efficient forgetting while maintaining knowledge retention performance.

[0014] To achieve these objectives and other advantages according to the present invention, a score-guided low-rank hybrid expert knowledge graph forgetting method is provided, which performs knowledge triple forgetting on a trained knowledge graph model, the trained knowledge graph model including entity embeddings, Each encoder layer and relation decoder, the methods include:

[0015] Obtain the knowledge graph to be processed Trained knowledge graph models Relation sets and the set of triples of knowledge to be forgotten Each triple of knowledge to be forgotten is represented as ,in For head entity, For relation types, For the tail entity; freeze the entity embedding parameters, encoder parameters, and relation decoder parameters, while preserving the gradient backpropagation paths of the encoder and relation decoder for the input entity state; perform K-hop neighborhood expansion centered on the head and tail entities of the knowledge triple to be forgotten, resulting in a K-hop deletion subgraph. Delete the K-jump subgraph Entities other than the head and tail entities are defined as a set of non-endpoint entities. Using frozen models for knowledge graphs Perform the original forward propagation and save the original entity representations output by each encoder layer. ;

[0016] Determine the current forgetting condition Statistics on current forgetting conditions Each relation type experience frequency Residual deletion operators are set in each layer of the encoder. The residual deletion operators include: a low-rank projection matrix shared across relations. , A cross-relationship shared expert projection matrix , , The projection matrix for each expert is not set according to the relationship type; the residual deletion operator also includes gated network parameters. , and gating relationship embedding The parameters of the gated relationship embedding and the frozen relationship decoder are independent of each other; according to Calculate relation types Potential gating, according to Generate the first The request-level unified gating vector of the layer is used as a K-hop deletion subgraph in the same forward propagation. The deletion control variable used by all entities within the scope, of which ;according to The combination yields an effective upprojection matrix, which only deletes subgraphs for K hops. Entity representation within Apply residual update: ,

[0017] in, For scaling factor, For low-rank dimensions, superscript This indicates transpose; the entity state updated by the residual is input into the next frozen encoder layer, and the entity state output from the last layer is input into the frozen relation decoder, which outputs the prediction score of the knowledge triple;

[0018] An absolute suppression term is constructed using the triplet of knowledge to be forgotten as the negative class sample, and a relative ranking constraint is constructed between the triplet of knowledge to be forgotten and its corresponding retained knowledge triplet to obtain a score-guided forgetting loss. The predicted score of the corresponding retained knowledge triplet is separated from the computation graph through a stopping gradient operation. Locality constraints are applied to the set of non-endpoint entities. The representation of the entity in the middle approximates the corresponding original entity representation, thus obtaining the locality loss;

[0019] The overall training objective is formed by weighting the score-guided forgetting loss and the locality loss. The gradient of the overall training objective is then backpropagated through the gradient backpropagation path, updating only the low-rank projection matrix. , expert projection matrix The parameters of the gating network and the gating relation embedding are not updated. The frozen entity embedding parameters, encoder parameters and relation decoder parameters are not updated. The updated parameters are used for request-level unified gating generation and residual update in the next round of forward propagation. The process is iterated until the number of training rounds or the convergence condition is met, and the knowledge graph model corresponding to the set of knowledge triplets to be forgotten is output.

[0020] Preferably, the current forgetting condition The determination method is as follows: During the optimization phase, take the current batch of deleted triplets. As a current condition of forgetting During the verification and testing phases, a complete set of triples of knowledge to be forgotten is taken. As a current condition of forgetting .

[0021] Preferably, the gated network parameters satisfy , Gating relationship embedding satisfies ,in Embed dimensions for gating relationships.

[0022] Preferably, when the current forgetting condition It contains only a single relation type At that time, the request-level unified gating vector is equal to the latent gating vector of that relation type, i.e. .

[0023] Preferably, The projection matrix on each expert is initialized to a zero matrix, making the residual deletion operator equivalent to the identity mapping at the beginning of training, so that the model starts training from the original model state.

[0024] Preferably, the first The number of trainable parameters for the layer residual deletion operator is:

[0025] ,

[0026] With the number of relation types The newly added trainable parameters are only those related to the gating relation embedding, and the low-rank lower projection matrix and expert upper projection matrix shared across relations do not repeatedly expand with the number of relation types.

[0027] Preferably, the absolute inhibition term is arranged according to The structure is as follows: The target value 0 is a fixed anchor point. For knowledge triples The predicted score;

[0028] Relative sorting constraints by Construction, in which For the first A triplet of knowledge to be forgotten To and Preservation of knowledge triples with the same relation type For steepness parameters, For interval parameters, The number of knowledge triples to be retained corresponding to each knowledge triple to be forgotten;

[0029] Fraction-guided forgetting loss is the sum of the absolute inhibition term and the relative ranking constraint, i.e. .

[0030] Preferably, local loss is calculated according to... structure;

[0031] The overall training objective is: ,

[0032] in, For the sake of scores, guide forgetting loss, For localized loss, These are the weighting coefficients.

[0033] Preferably, a K-jump deletion subgraph is used. The entity representations of entities other than those specified are not updated with residuals and remain as the corresponding original entity representations. The relation decoder is the DistMult decoder, and the encoder is a relation graph convolutional network R-GCN, a relation graph attention network R-GAT, a heterogeneous graph TransformerHGT, a heterogeneous graph attention network HAN, or a combined graph convolutional network CompGCN.

[0034] A knowledge graph forgetting system is used to implement the score-guided low-rank hybrid expert knowledge graph forgetting method described above. The system includes:

[0035] The forgetting request acquisition and condition generation unit is used to acquire the knowledge graph to be processed, the trained knowledge graph model with L encoder layers, the relation set, and the set of knowledge triples to be forgotten, and to determine the current forgetting conditions. Current forgetting conditions The optimization phase involves a small batch of currently deleted triplets, while the verification and testing phases involve a complete set of triplets to be forgotten.

[0036] The local deletion domain construction and preservation object determination unit is used to perform K-hop neighborhood expansion with the head and tail entities of the knowledge triple to be forgotten as the center, to obtain the K-hop deletion subgraph and the set of non-endpoint entities;

[0037] The frozen backbone and state interface unit is used to freeze entity embedding parameters, encoder parameters, and relation decoder parameters, retain the gradient backpropagation paths of the encoder and relation decoder for the input entity state, save the original entity representations output by each encoder layer, and output the knowledge triple prediction scores calculated by the frozen relation decoder based on the input entity state.

[0038] The request-level relation constitutes a decision-making and sharing low-rank expert execution unit, which is used to statistically analyze the empirical frequency of each relation type in the current forgetting condition, generate a request-level unified gating vector, and obtain an effective up-projection matrix by weighted combination of the expert up-projection matrix shared across relations according to the request-level unified gating vector, and apply residual updates only to the entity representations within the K-hop deletion subgraph;

[0039] The decoder score feedback and local preservation constraint generation unit is used to construct an absolute inhibition term and a relative ranking constraint of the same relation with the knowledge triplet as the negative class sample based on the predicted score of the knowledge triplet, to obtain the score-guided forgetting loss, and to construct the locality loss based on the original entity representation.

[0040] The closed-loop joint optimization unit is used to form the overall training objective by weighting the score-guided forgetting loss and locality loss. The gradient of the overall training objective is backpropagated through the gradient backpropagation path. Only the low-rank projection matrix, the expert projection matrix, the gated network parameters and the gating relationship embedding are updated. The updated parameters are returned to the request-level relationship to form the decision and shared low-rank expert execution unit until the number of training rounds or the convergence condition is met, and the knowledge graph model that has completed the forgetting of the specified knowledge is output.

[0041] The present invention has at least the following beneficial effects:

[0042] First, this invention achieves adaptive adaptation to dynamic forgetting requests such as single-relationship, multi-relationship mixture, and relationship ratio changes by using a unified gating system at the request level to form an aggregation decision based on the relationship of the current forgetting request. This decision is then used as the deletion control quantity adopted by all entities in the deleted subgraph during the same forward propagation, taking into account both relationship specificity and cross-relationship semantic sharing.

[0043] Secondly, by freezing the original backbone and retaining the gradient backpropagation path for the input entity state, this invention only updates the low-rank projection matrix, the expert projection matrix, the gated network parameters and the gated relationship embedding, thus avoiding a complete retraining of the original model and significantly reducing the time and storage cost of the forgetting process.

[0044] Third, this invention takes the predicted score output by the relation decoder as the direct optimization object. It drives the gating and expert parameter updates by using the absolute suppression term with the triplet to be forgotten as the negative class sample and the relative ranking constraint of the same relation. The predicted score of the retained triplet is separated from the computation graph by the stopping gradient operation, which alleviates the problem of inconsistency between the encoding representation space and the link prediction evaluation space, and avoids the model obtaining trivial solutions by raising the anchor score.

[0045] Fourth, this invention, through a low-rank expert pool shared across relations and low-dimensional gated relation embedding that grows linearly with the number of relations, ensures that the shared deletion capability does not repeatedly expand with relation types, suppresses parameter redundancy in the deletion module of multi-relation knowledge graphs, and improves the scalability of the method in large-scale knowledge graphs.

[0046] Fifth, by limiting the deletion operator to the K-hop deletion subgraph related to the triple to be deleted, and by using layer-by-layer locality loss to constrain the representation of non-endpoint entities to approximate the original representation, this invention reduces the interference of forgetting operations on irrelevant entities, retained knowledge triples, and the overall knowledge structure, thus achieving sufficient forgetting while maintaining predictive performance on retained knowledge.

[0047] 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

[0049] Figure 1 This is a patent concept diagram of the score-guided low-rank hybrid expert knowledge graph forgetting method of the present invention;

[0050] Figure 2 This is a patent flowchart of the score-guided low-rank hybrid expert knowledge graph forgetting method of the present invention;

[0051] Figure 3 This is a flowchart of the training algorithm for the knowledge graph forgetting method of the present invention;

[0052] Figure 4 This is a performance comparison chart of the present invention under six core dataset-backbone combinations;

[0053] Figure 5 This is a performance comparison chart of the present invention on three heterogeneous graph backbones on the WordNet18 dataset;

[0054] Figure 6 This is a comparison of the ablation experiment results of this invention on the WordNet18 dataset;

[0055] Figure 7 This is a control experiment diagram showing the independent effects of fractional-guided loss in this invention;

[0056] Figure 8 This is a comparison chart of the parameter efficiency of the present invention. Detailed Implementation

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

[0059] 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. It should be noted that the experimental methods described in the following embodiments, unless otherwise specified, are conventional methods and therefore should not be construed as limiting the invention.

[0060] Existing deletion operator methods cannot dynamically determine the deletion direction based on the overall relational composition of the current forgetting request, and optimizing the indirect proxy target in the encoding representation space makes it difficult to guarantee that the prediction score of the triple to be deleted in the relational decoder output space is effectively reduced. At the same time, there is a lack of complete and feasible procedural solutions for the parameter partitioning between the frozen backbone and the addition and deletion modules, as well as the construction of forward propagation and gradient backpropagation paths in forgetting training.

[0061] This invention provides a score-guided low-rank hybrid expert knowledge graph forgetting method, which performs knowledge triple forgetting on a trained knowledge graph model, including entity embeddings, The system consists of an encoder layer and a relation decoder, where L is a positive integer. The encoder can employ relational graph convolutional networks (R-GCN), relational graph attention networks (R-GAT), etc. The relation decoder is used to calculate the prediction score of knowledge triples based on entity states, such as... Figure 1 As shown, the overall principle of this invention is as follows: Given a trained knowledge graph model and a set of triples to be forgotten, firstly, a K-hop deletion subgraph is constructed centered on the endpoints of the triples to be forgotten, and the backbone is frozen. Then, a unified gating system at the generation request level is formed based on the relationship of the current forgetting request. The gating system dynamically combines shared low-rank experts to form an effective deletion mapping for the current request. Residual updates are applied only to the entity representations within the deletion subgraph. The processed entity states are then processed by a frozen encoder and a frozen relation decoder to obtain triple prediction scores. The score-guided loss directly generates gradients based on these prediction scores. The backpropagation path through the retained gradients only updates the gating and expert parameters. Simultaneously, locality loss constrains non-endpoint entity representations to prevent excessive drift. The above process is iteratively executed until the training round number or convergence condition is met. Specifically, the method of this invention includes:

[0062] (1) Input Acquisition and Data Preparation: Acquiring the knowledge graph to be processed Trained knowledge graph models Relation sets and the set of triples of knowledge to be forgotten A set of knowledge triples to be forgotten is one or more knowledge triples specified by the user through a forgetting request, whose influence needs to be removed from the model. It consists of one or more knowledge triples specified in the current knowledge forgetting request, and each knowledge triple to be forgotten is represented as ,in For head entity, For relation types, For the tail entity, the set of triples of knowledge to be forgotten is represented as: ,

[0063] in, =1,…, , Indicates the number of triples in the set;

[0064] Simultaneously obtain the number of hops for deleting a subgraph. Low-rank dimension Number of experts And other configuration parameters required for training;

[0065] (2) Determining the frozen and local deletion domains: Freezing the trained knowledge graph model All raw parameters The original parameters include at least entity embedding parameters, encoder parameters, and relation decoder parameters. This means that parameter values ​​are not updated during forgetting training, and the gradient backpropagation paths of the encoder and relation decoder for the input entity state are preserved. Only the parameters θ of newly added or deleted modules are optimized. δ θ δ It includes at least the shared low-rank projection matrix, the expert projection matrix, the gated network parameters, and the gated relation embedding parameters, which are independent of the frozen decoder relation parameters.

[0066] For a trained knowledge graph model with L encoder layers The output of the l-th encoder layer is an entity state matrix that corresponds one-to-one with each entity in the knowledge graph. : ,in, This represents the number of entities in the knowledge graph. Indicates the first The entity feature dimension output by each encoder layer. The Action is entity Entity representation in the l-th encoder layer ,and ;

[0067] Extracting the set of triples of knowledge to be forgotten The head and tail entities of all knowledge triples constitute the endpoint entity set. : ,

[0068] K-hop neighborhood expansion is performed using the head and tail entities of the triplet of knowledge to be forgotten as the center. That is, the neighborhood range is expanded outward along the relation edges in the graph by K layers, with K being a positive integer, using the specified entity set as the center. This results in a neighborhood range consisting of the endpoint entities and their... K-hop deletion subgraph consisting of triples of entities and related knowledge within the skip neighborhood : ,in, This indicates execution centered on the set of input entities. Jump neighborhood expansion operation;

[0069] K-jump delete subgraph This is used to limit the direct scope of the low-rank hybrid deletion operator used for conditionalizing relational composition. The deletion operator only applies to... The entity within the representation applies a residual update, not... External entities are represented to be directly updated with residuals;

[0070] Deleting the K-jump subgraph Entities other than the head and tail entities are defined as a set of non-endpoint entities. : ,

[0071] Non-endpoint entity collection Used to calculate layer-by-layer locality loss, making the intermediate representation of non-endpoint entities after forgetting as close as possible to their intermediate representation in the frozen original model, thereby limiting the incidental representation changes caused by the forgetting operation;

[0072] (3) Preservation of original entity representation: using a frozen model Knowledge graph Perform the original forward propagation and save the original entity representations output by each encoder layer. : ,in, This indicates that the model is frozen up to the [number]th [year]. The entity states generated by each encoder layer, l=1,…,L This indicates selecting the entity. The corresponding representation, the original entity representation The deletion operator is kept fixed during training and serves as a reference representation for layer-by-layer locality loss;

[0073] Furthermore, it also includes: receiving the entity state matrix. And only delete the subgraph for K jumps. The entity representation within the conditional low-rank mixed residuals is composed of applied relational components.

[0074] For the first to L-1 encoder layers, the processed entity state is passed to the next frozen encoder layer; for the Lth encoder layer, the processed entity state is passed to the relation decoder with parameters frozen but retaining the gradient backpropagation path for the input entity state. Preferably, when DistMult is used as the relation decoder, DistMult calculates the knowledge triples. Predicted score The predicted score is then sent as a closed-loop feedback signal.

[0075] (4) Request-level gating decision:

[0076] GNNDelete uses a fixed method. Mapping, and setting up mappings independently for each relationship requires... One parameter; based on the distribution of empirical relations in the condition set, adaptive updates are selected from the shared low-rank hybrid structure;

[0077] Determine the current forgetting condition Statistics on current forgetting conditions Each relation type experience frequency ;

[0078] Residual deletion operators are set in each layer of the encoder, that is, trainable deletion modules are set up in the form of residuals superimposed on the output of the encoder layer. The residual deletion operators include a low-rank projection matrix shared across relations. , A cross-relationship shared expert projection matrix , , The projection matrix for each expert is not set separately according to the relationship type;

[0079] The residual deletion operator also includes gating network parameters. , and gating relationship embedding Gating network parameters , and gating relationship embedding For the l-th layer specific gating parameters, the gating relation embedding and the frozen relation decoder parameters are independent of each other;

[0080] according to Calculate relation types The potential gate vector, according to Generate the first The request-level unified gating vector is a gating vector generated based on the overall relational composition of the current forgetting condition. It is used by all entities within the deleted subgraph in the same forward propagation. The request-level unified gating vector serves as the K-hop deleted subgraph in the same forward propagation. The deletion control variable used by all entities within the subgraph is to uniformly apply a deletion direction determined by the current forget request relation to all entities within the deleted subgraph. ;

[0081] The request-level unified gating, used uniformly by the l-th layer operator for each entity within the K-hop deletion subgraph, does not route individual triples separately. Instead, it aggregates and encodes the relational composition of the current condition set and uses it as a common control variable for entities within the local deletion subgraph during the same forward propagation. This is especially relevant for condition sets containing only a single relation. For condition sets containing multiple relations, the frequency-weighted average of the potential gating vectors of each relation is used to encode the relation composition in the complete forgetting request;

[0082] (5) Shared low-rank expert execution: according to The combination yields an effective upward projection matrix.

[0083] K-jump subgraph deletion only Entity representation within Apply residual update:

[0084] ,

[0085] Where h represents the row vector representation of the entity in the current layer. This represents the transpose of the low-rank projection matrix. This represents the transpose of the effective projection matrix. For scaling factor, For low-rank dimensions, superscript Indicates transpose. Since the effective upprojection matrix is ​​a weighted combination of the upprojection matrices of each expert, residual update is actually equivalent to applying the upprojection obtained by combining the low-rank downprojection matrix with the request-level matrix to the entity representation. The rank of the effective residual does not exceed [a certain value]. The deletion operator family is restricted to a shared low-rank subspace;

[0086] At the same time, increase The set of adaptive component compositions can be extended to obtain a rank-adaptive set that fits the composition of the affected subgraph relations. The residual mapping, only for K-hop deletion subgraph The entity representation h within the subgraph is subject to residual update, while the entity representation of entities outside the subgraph is not subject to residual update and remains the original entity representation.

[0087] The entity state updated by residuals is input into the next frozen encoder layer. The entity state output from the last layer is input into the frozen relation decoder, which outputs the prediction score of the knowledge triple. ;

[0088] (6) Score-guided loss construction: The absolute inhibition term is constructed with the triplet of knowledge to be forgotten as the negative class sample. That is, the binary cross-entropy term is constructed with the goal of the predicted score of the triplet of knowledge to be forgotten approaching the fixed anchor point 0. This directly reduces the predicted score of the triplet to be deleted. The relative ranking constraint between the triplet of knowledge to be forgotten and the triplet of knowledge retained with the same relation is constructed so that the predicted score of the triplet to be deleted is lower than that of the triplet of knowledge retained with the same relation. The triplet of knowledge retained with the same relation refers to the triplet of knowledge retained with the same relation type as the triplet to be forgotten and not in the set to be forgotten. The score-guided forgetting loss is obtained. The predicted score of the triplet of knowledge retained with the same relation is separated from the computation graph by stopping the gradient operation. That is, the predicted score of the retained triplet does not participate in the gradient backpropagation, which avoids the model from obtaining trivial solutions by raising the score of the retained anchor point. The absolute inhibition term and the relative ranking constraint are combined to obtain the score-guided forgetting loss.

[0089] Set of non-endpoint entities according to locality constraints The representation of the entity in the code approximates the corresponding original entity representation, yielding a locality loss. This locality loss is calculated layer by layer for each encoder layer. For each layer, the locality loss is calculated in the set of non-endpoint entities. The norm square of the difference between the current representation and the original entity representation is accumulated for each entity. By excluding the endpoint entities of the triplet to be forgotten from the set of non-endpoint entities, the locality loss does not constrain the endpoint entities, and the endpoint entity representation is allowed to be modified by the deletion operator. Thus, targeted forgetting of the triplet to be deleted is achieved within the deletion subgraph, while constraining the incidental drift of non-endpoint entities.

[0090] (7) Closed-loop joint optimization: The overall training objective is formed by weighting the score-guided forgetting loss and the locality loss. The gradient of the overall training objective is backpropagated through the gradient backpropagation path. Specifically, the score-guided forgetting loss is first obtained from the absolute suppression term and the same relation ranking term of the triple to be deleted. The gradient of this loss is calculated on the decoder output score. The gradient is backpropagated to the final entity state through the relation decoder with parameter freezing but retaining the input gradient propagation path. Then, it passes through the last deletion operator, the previous frozen encoder, and each layer of deletion operators in sequence along the computation graph, and finally reaches the gating network parameters, gating relation embedding parameters, shared low-rank projection matrix, and expert projection matrix of each layer. The frozen encoder, entity embedding, and decoder parameters only participate in the forward calculation and input gradient propagation, and do not perform parameter updates. Only the low-rank projection matrix is ​​updated. , expert projection matrix The gating network parameters and gating relation embeddings are not updated, and the frozen entity embedding parameters, encoder parameters and relation decoder parameters are not updated. If a certain expert combination fails to effectively reduce the decoder score of the current triple to be deleted, the score-guided loss will directly adjust the gating through the above path, reduce the mixing weight of unfavorable experts and increase the mixing weight of favorable experts, and update the corresponding expert transformation parameters. The updated parameters are used for request-level unified gating generation and residual update in the next round of forward propagation. The process is iterated until the number of training rounds or the convergence condition is met, and the knowledge graph model corresponding to the set of knowledge triples to be forgotten is output.

[0091] Specifically, such as Figure 3 As shown, the training process is executed as follows: Input data is acquired; local subgraphs within a certain hop count range are extracted centered on the head and tail entities of the triplet to be forgotten, and non-endpoint entities are identified; the original entity representations of each layer are saved using the frozen original model; a low-rank hybrid deletion module is added after each encoding layer, and the expert projection matrix is ​​initialized to a zero matrix; the current training batch is selected from the triplet to be forgotten, the same relation retained triplet, and non-endpoint entities, using the current triplet mini-batch as the condition set and calculating the empirical frequency of each relation type; a unified gating and dynamic combination of experts are generated to form an effective deletion mapping, residual updates are applied to the entity states within the deleted subgraph, and prediction scores are obtained through the frozen encoder and relation decoder; the absolute suppression term, the same relation relative ordering constraint, and the layer-by-layer locality loss are calculated based on the prediction scores to form the overall objective; the gradient is backpropagated through the encoder and decoder with the gradient frozen but the input gradient path retained, updating only the gating network parameters, gating relation embedding parameters, low-rank projection matrix, and expert projection matrix; batch training is repeated until the training rounds or convergence conditions are met, and the model that has completed the specified knowledge forgetting is output.

[0092] In the above technical solution, by preserving the gradient backpropagation paths of the encoder and relation decoder for the input entity state, and only updating the low-rank projection matrix, expert projection matrix, gated network parameters, and gated relation embedding, forgetting training can be completed while freezing the backbone parameters of the original model, significantly reducing the computational cost and storage overhead of the forgetting process. Simultaneously, by using request-level unified gating to aggregate and encode the frequency of various relation experiences in the current forgetting condition, entities within the subgraph deleted in the same forward propagation share a unified deletion control quantity. This allows for adaptive adjustment of the deletion direction based on the composition of the requested relations, balancing relation awareness and cross-relation parameter sharing. An absolute suppression term is constructed using the triples of knowledge to be forgotten as negative class samples, and a relative ranking constraint with the same relation is constructed. This allows forgetting optimization to directly affect the prediction score output by the relation decoder. By stopping gradient operations, the prediction score of the retained triples does not participate in gradient backpropagation. This reduces the score of the triples to be deleted while preventing the model from obtaining trivial solutions by increasing the score of the retained triples, which is beneficial for improving the stability of forgetting training and the final forgetting effect, while maintaining the model's predictive performance in knowledge retention.

[0093] The selection of the current forgetting condition during the optimization, validation, and testing phases directly impacts how the request-level gating characterizes the relationships within a single request. If the entire forgetting set is used throughout, the mini-batch training during the optimization phase and the dynamic adaptation of the request-level gating cannot be reflected. In another technical solution, the current forgetting condition... The method for determining this is as follows: During the optimization phase, the set of triples of knowledge to be forgotten is... The scale is usually large. If the complete set is used as the condition set for each forward propagation, the gating system will struggle to perceive the dynamic changes in the composition of mini-batch relationships as the optimization process progresses. Therefore, the current mini-batch of deleted triples should be used. As a current condition of forgetting That is, during the optimization phase, each parameter update is based only on the current mini-batch. The model employs an empirical frequency generation gating system for various relationships, allowing the gating parameters to be updated stochastically with varying mini-batch relationship composition. During the validation and testing phases, the model parameters are no longer updated, and the complete set of triples to be forgotten is used. As a current condition of forgetting This generates a deterministic complete request gating, ensuring that the deletion mapping used in verification and testing is consistent with the complete forget request that needs to be implemented in the end.

[0094] In the above technical solution, using the current batch of deleted triples as the current forgetting condition during the optimization phase enables the request-level unified gating to dynamically adapt to the relational composition of a single training batch; using the complete set of knowledge triples to be forgotten as the current forgetting condition during the verification and testing phases enables the generation of deterministic complete request gating, ensuring that the training behavior of the gating is consistent with the request-level adaptation process during the verification and testing phases, thereby improving the consistency of the gating across different phases.

[0095] The dimensional settings of the gating network parameters and the gating relation embedding affect the interface matching between the gating output's representation dimension and the cross-relationship shared expert; improper dimension selection will affect the feasibility of combining the potential gating vector and the expert's projection matrix. In another technical solution, the gating network parameters satisfy... , Gating relationship embedding satisfies ,in For embedding dimensions into gating relationships, preferably, The value is 16;

[0096] The gating weight matrix of layer l Its number of rows and number of experts Same, column number and gating relationship embedding dimension Same, gated bias vector Its dimensions and number of experts Similarly, the gated relation embedding and the frozen relation decoder parameters are independent of each other. That is, the gated relation embedding is a trainable parameter that is independently maintained by the deletion module and is not frozen or shared with the decoder relation parameters. The temperature parameter τ>0 in the latent gated softmax is used to control the sharpness of the gated distribution.

[0097] In the above technical solution, the gating network parameters and The dimension is embedded by the gating relationship. and number of experts Confirm, gating relationship embedding The dimension is This provides a dimension-matching interface constraint for matrix operations between low-rank projection matrices, expert projection matrices, and gating networks, ensuring the computational feasibility and parameter scale controllability of potential gating vectors and request-level unified gating vectors.

[0098] When a forget request contains only a single relation type, the request-level unified gating should degenerate into a potential gating of that relation itself; if the aggregation rule cannot maintain consistency in the single-relation case, it will lead to a contradiction between the gating training behavior and the composition of the request relation. In another technical solution, when the current forgetting condition... It contains only a single relation type At that time, the empirical frequency of this relation in the condition set After normalization, the frequency is 1, and the frequency of other relation types is 0. Therefore, the frequency-weighted summation only retains the relation type. The latent gated item, the request-level unified gated vector is equal to the latent gated vector of this relation type, that is... For each component If true, the deletion direction of a single relation forgetting request is determined independently by the relation's own potential gating, without incorporating gating components from other relations.

[0099] In the above technical solution, under the forgetting request of a single relation type, the unified gating vector at the request level is equal to the potential gating vector of that relation type, so that the multi-relation aggregation rule naturally degenerates into single-relation gating in boundary cases, avoiding additional mixing due to aggregation that does not match the actual relation composition of the request, and maintaining the accuracy of gating behavior in the single-relation forgetting scenario.

[0100] The initialization method of the deletion operator determines whether forgetting training starts from the original model state; improper initialization introduces a representation shift inconsistent with the original prediction at the beginning of training. In another technical solution, before training begins, the deletion operator is initialized... The expert projection matrix is ​​initialized to a zero matrix, since the effective projection matrix... The result of the projection matrix of each expert is a uniformly gated weighted combination according to the request level, when all When all are zero matrices, Also a zero matrix, residual update amount The output of the residual deletion operator is zero. With input Equality means that the residual deletion operator is equivalent to the identity mapping at the beginning of training. At the beginning of training, the model output is completely consistent with the output of the original frozen model, so that the model starts training from the original model state. During the training process, the projection matrices of each expert learn their own deletion transformation direction from zero step by step.

[0101] In the above technical solution, when the projection matrix of each expert is initialized to a zero matrix, the output of the residual deletion operator is the same as the input, which is equivalent to the identity mapping. This allows the forgetting training to start from the original model state, avoiding the introduction of an inconsistency between the entity representation in the subgraph to be deleted and the original model at the beginning of the training stage. This helps to maintain the predictive performance of the model in the initial stage in terms of knowledge retention and improve training stability.

[0102] The composition of trainable parameters for shared low-rank hybrid experts and their growth pattern with the number of relation types are related to the storage and computational overhead of the forgetting module in large-scale multi-relation knowledge graphs. In another technical solution, the l-th layer residual deletion operator includes: a low-rank projection matrix. Its parameter count is ; Projection matrix of experts The number of parameters in the projection matrix for each expert is ,total Gating weight matrix Its parameter count is Gated bias vector Its parameter count is and gating relationship embedding Relation set Each relationship in the table corresponds to one 3D gated relation embedding, with the number of parameters being , No. The number of trainable parameters for the layer residual deletion operator is The total of all items includes the gate bias parameters. These parameters accumulate with the number of encoder layers L. Compared to setting complete parameter matrices separately according to relationship types, this embodiment only retains different relationships. Dimensionally gated relationships are embedded and shared through request-level gated composition, varying with the number of relationship types. The newly added trainable parameters are only those related to the gating relationship embedding. The low-rank lower projection matrix and expert upper projection matrix shared across relations do not repeatedly expand with the number of relation types. Specifically, the state dimensions of the two deletion operators are 128 and 64, respectively, with a low-rank dimension of... =8, number of shared experts =4, Gated Relation Embedding Dimension If the parameter count is 16, then the total number of trainable parameters can be reduced to N = 7816 + 32 * |R|. This means that for each additional relation, the two-layer deletion module only adds 32 parameters. In contrast, relation-specific methods... With a comparison configuration of 16, each additional relation requires 16 × (128 + 64) = 3072 additional relation-specific low-rank parameters.

[0103] In the above technical solution, the number of trainable parameters of the l-th layer residual deletion operator is composed of the lower projection matrix, the upper projection matrices of each expert, the parameters of the gated network, and the parameter scale of the gated relation embedding. As the number of relation types increases, the newly added trainable parameters are only the parameters related to the gated relation embedding. The shared low-rank lower projection matrix and the upper projection matrix of the experts do not expand repeatedly with the number of relation types, thereby effectively suppressing the expansion of the forgetting module parameter scale with the increase of the number of relations and improving the storage and computation efficiency of forgetting in multi-relation knowledge graphs.

[0104] The specific construction method of the absolute suppression term and the relative ranking constraint of the same relation in the score-guided forgetting loss determines the optimization behavior of suppressing the predicted score of the triplet to be deleted while preventing the predicted score of the retained triplet from being falsely affected. If the predicted score of the retained triplet participates in gradient backpropagation, the model may obtain a trivial solution by raising the score of the retained triplet. In another technical solution, the triplet of knowledge to be forgotten is used as the negative class sample, and for each triplet of knowledge to be forgotten... With its predicted score Constructing a binary cross-entropy suppression term with a fixed anchor point 0: The absolute suppression term is... Construct, in which, This represents a binary cross-entropy operation with logits, where the target value of 0 is a fixed anchor point. This indicates summing all triplets in the set of triplets to be forgotten. For knowledge triples The predicted score, with a target value of 0, provides a fixed negative class anchor point for the triplet of knowledge to be forgotten, directly constraining the absolute score of the triplet to be forgotten, so that its predicted score is suppressed to the vicinity of the anchor point.

[0105] Relative sorting constraints by Construct, in which, For the first A triplet of knowledge to be forgotten To and Preservation of knowledge triples with the same relation type To preserve the predicted scores of the triples, The predicted score for the triplet to be forgotten. The steepness parameter controls the steepness of the softplus function. For interval parameters, The number of knowledge triples to retain for each knowledge triple to be forgotten corresponding to the same relation is determined by the ordering constraint. When the value is negative, the output loss is close to zero. Not less than A penalty is imposed when the predicted score of the triple to be forgotten is lower than that of its corresponding retained triple by at least one interval. Using the same relation pairing can avoid the problem of incomparable decoder score distributions corresponding to different relations;

[0106] Preserving knowledge triples Predicted score Separate from the computation graph by stopping gradient operations, i.e. The ranking loss, by not using the fractional derivative of the ranking constraint with respect to the parameters as a function of backpropagation gradients, separates the scores of retained triplets from the computation graph. This prevents the model from obtaining trivial solutions by increasing anchor scores. If the scores of retained triplets were used for gradient backpropagation, the model could satisfy the ranking constraint by raising the scores of retained triplets instead of lowering the scores of the triplets to be deleted, leading to a decrease in the predictive performance of retained knowledge. When a sufficiently small first-order update step size is used and the gradient of the scores of deleted triplets with respect to the parameters is non-zero, the ranking loss can provide a local descent direction, causing the scores of the corresponding deleted triplets to decrease. The ranking term can penalize the inversion of scores between sampled triplets of the same relation.

[0107] The fraction-guided forgetting loss is the sum of the absolute inhibition term and the relative ranking constraint, i.e.:

[0108] ,

[0109] in, Used to reduce the score for deleting triples. Used to penalize the reverse order of scores between sampled triples of the same relation.

[0110] In the above technical solution, the absolute suppression term uses a fixed anchor point of 0 to perform binary cross-entropy suppression on the predicted scores of the triplet of knowledge to be forgotten, directly reducing the absolute score of the knowledge to be deleted in the decoding output space; the relative ranking constraint uses softplus to impose a ranking constraint on the score difference between the retained triplet and the triplet to be deleted, penalizing the inversion of scores between the two; at the same time, the predicted scores of the retained triplet are separated from the computation graph through the stopping gradient operation, avoiding the model from obtaining trivial solutions by raising the anchor score, so that the score-guided forgetting loss forms an effective balance between suppressing the score to be deleted and maintaining the retained score.

[0111] The construction of locality loss and overall training objective relates to the degree to which the forgetting operation constrains the drift associated with non-endpoint entity representations, and the weighted balance between the forgetting effect and the utility of retained knowledge. In another technical solution, This represents the set of entities in the subgraph that are not endpoints of the triples to be forgotten. Locality loss is calculated as follows: structure;

[0112] in, For encoder layers, Representing entities The entity representation after residual update in the l-th encoder layer Show entity The original entity representation obtained through the original forward propagation at the l-th encoder layer is obtained by excluding the head and tail entities of the triple of knowledge to be forgotten. In addition, the locality loss does not constrain endpoint entities, thus allowing the deletion operator to modify the representation of endpoint entities, achieving forgetting of the triples to be deleted. At the same time, it constrains the layer-by-layer representation of non-endpoint entities to approximate the original representation, so that non-endpoint entities in the deletion subgraph do not undergo excessive collateral drift. The deletion subgraph mask is used to limit the direct scope of the residual operator, and the node representation penalty term is used to regularize the collateral representation changes caused by the forgetting operation.

[0113] The overall training objective is:

[0114] ,

[0115] in, For the sake of scores, guide forgetting loss, For localized loss, These are the weighting coefficients;

[0116] The fractional guided loss constrains that the knowledge to be deleted should be compressed in the decoded output space, and the locality loss constrains that the non-endpoint entity representations should not drift excessively. Together, they constitute the overall training objective. The overall training objective does not directly update the frozen backbone, but is backpropagated to the request-level gating and shared low-rank expert parameters through the input gradient path of the frozen backbone.

[0117] In the above technical solution, locality loss constrains each encoder layer and each non-endpoint entity item by item, so that the representation of the non-endpoint entity after residual update is close to its original entity representation, and restricts the drift of the attached representation of irrelevant entities caused by the forgetting operation; the overall training objective is to use weight coefficients to guide the weighting of forgetting loss and locality loss on the score, so as to ensure that the score of the knowledge to be deleted is sufficiently reduced, while maintaining the basic stability of the retained knowledge and its non-target entity representation, and achieving a balance between forgetting effect and model utility.

[0118] The scope of the deletion operator and the specific type of the backbone encoder affect the method's versatility across different graph neural network backbones and its ability to suppress interference from representations of irrelevant external entities. In another approach, K-hop deletion of subgraphs is employed. The entity representations of entities other than those specified are not updated with residuals and remain as their original entity representations, thus strictly limiting the effect of the deletion operator to the local subgraph related to the triples to be deleted; the relation decoder is the DistMult decoder, predicting scores. The DistMult decoder calculates the relationship based on the head entity representation, relation parameters, and tail entity representation. The encoder is a relation graph convolutional network R-GCN, a relation graph attention network R-GAT, a heterogeneous graph TransformerHGT, a heterogeneous graph attention network HAN, or a combined graph convolutional network CompGCN. For different encoders, only the corresponding number of layers and the feature width of each layer need to be adjusted. The closed-loop connection relationship between request-level relation composition decision, shared low-rank expert execution, decoder score feedback, and local preservation constraints remains unchanged. When using DistMult as the relation decoder, the original parameters of DistMult are frozen, but its gradient backpropagation path for the input entity state is retained. This interface method can cover the five encoders tested, thus maintaining consistent forgetting behavior on different backbones.

[0119] In the above technical solution, the entity representation outside the deleted subgraph is retained without residual update, thus further limiting the scope of the deletion operator. Through the adaptation of DistMult relation decoder and various encoders such as R-GCN, R-GAT, HGT, HAN, and CompGCN, the method can be compatible with various mainstream knowledge graph neural network backbones, improving the versatility of the method under different model architectures and data forms.

[0120] Knowledge graph forgetting systems include:

[0121] The forgetting request acquisition and condition generation unit is used to acquire the knowledge graph to be processed, the trained knowledge graph model with L encoder layers, the relation set, and the set of knowledge triples to be forgotten, and to determine the current forgetting conditions. Current forgetting conditions During the optimization phase, the current batch of deleted triples is used; during the verification and testing phases, the complete set of triples to be forgotten is used. The forgetting request acquisition and condition generation unit sends the current condition set C and relation set to the request-level relation composition decision and sharing low-rank expert execution unit as the request-side control input for request-level unified gating.

[0122] The local deletion domain construction and preservation object determination unit is used to perform K-hop neighborhood expansion with the head and tail entities of the knowledge triple to be forgotten as the center, to obtain the K-hop deletion subgraph and the set of non-endpoint entities, and output the deletion subgraph mask to the request-level relation composition decision and shared low-rank expert execution unit, and output the set of non-endpoint entities to the decoder score feedback and local preservation constraint generation unit.

[0123] The frozen backbone and state interface unit is used to freeze entity embedding parameters, encoder parameters, and relation decoder parameters, retain the gradient backpropagation paths of the encoder and relation decoder for the input entity state, save the original entity representations output by each encoder layer, and output the knowledge triple prediction scores calculated by the frozen relation decoder based on the input entity state.

[0124] The request-level relation constitutes a decision-making and sharing low-rank expert execution unit, which is used to statistically analyze the empirical frequency of each relation type in the current forgetting condition, generate a request-level unified gating vector, and weight and combine the expert upprojection matrix shared across relations according to the request-level unified gating vector to obtain the effective upprojection matrix. The residual update is applied only to the entity representation within the K-hop deletion subgraph, and the corrected entity state is output.

[0125] The decoder score feedback and local preservation constraint generation unit is used to construct an absolute inhibition term and a relative ordering constraint with the knowledge triple to be forgotten as the negative class sample based on the predicted score of the knowledge triple, to obtain the score-guided forgetting loss, and to construct a local loss based on the original entity representation, and output two types of feedback signals.

[0126] The closed-loop joint optimization unit is used to form the overall training objective by weighting the score-guided forgetting loss and local loss. The gradient of the overall training objective is backpropagated through the gradient backpropagation path. Only the low-rank projection matrix, the expert projection matrix, the gated network parameters and the gating relationship embedding are updated. The updated parameters are returned to the request-level relationship to form the decision and shared low-rank expert execution unit until the number of training rounds or the convergence condition is met, and the knowledge graph model that has completed the forgetting of the specified knowledge is output.

[0127] The forgetting request acquisition and condition generation unit provides the current condition set to the request-level relation composition decision-making and shared low-rank expert execution unit; the local deletion domain construction and object preservation determination unit provides the deletion subgraph mask and non-endpoint entity set; the frozen trunk and state interface unit provides entity states to the request-level relation composition decision-making and shared low-rank expert execution unit, and provides relation decoder scores to the decoder score feedback and local preservation constraint generation unit; the request-level relation composition decision-making and shared low-rank expert execution unit outputs the corrected entity states; the decoder score feedback and local preservation constraint generation unit outputs score-guided loss and locality loss; the closed-loop joint optimization unit backpropagates the loss gradient to the request-level relation composition decision-making and shared low-rank expert execution unit, and only updates the parameters of the addition and deletion modules. Thus, the system forms a closed-loop data flow encompassing request relation composition, unified gating, shared expert combination, effective deletion mapping, frozen decoder scores, loss feedback, gating, and expert updates.

[0128] In the above technical solution, through the orderly collaboration of the forgetting request acquisition and condition generation unit, the local deletion domain construction and object determination unit, the frozen trunk and state interface unit, the request-level relationship composition decision and shared low-rank expert execution unit, the decoder score feedback and local preservation constraint generation unit, and the closed-loop joint optimization unit, the request relationship composition decision, shared expert execution, decoder score feedback and parameter feedback are organized into a closed-loop data flow. This enables the above forgetting method to be implemented in a modular way, which is convenient for building knowledge graph forgetting services in different deployment environments.

[0129] To verify the effectiveness of the technical solution of this invention, this embodiment focuses on four experimental objectives: (1) verifying the improvement of this invention in deleting knowledge indicators and the retention of knowledge indicators; (2) verifying the generalization ability of this invention across different encoder backbones; (3) verifying the role and synergistic relationship of the three components: request-level unified gating (relationship composition gating), shared low-rank hybrid structure, and fractional guided loss (decoder fractional direct supervision); (4) verifying the efficiency advantage of this invention in terms of trainable parameter scale. Corresponding to the above objectives, the overall experimental design includes the following four sets of comparative experiments: direct comparison experiment with SCGU, additional backbone generalization experiment, ablation experiment, and fractional guided loss independent action comparison experiment, supplemented with parameter efficiency statistical analysis. Among them, the direct comparison experiment with SCGU and other groups and the additional backbone generalization experiment correspond to Figure 4 , Figure 5 The experimental results of ablation experiments, fraction-guided loss independent-effect controlled experiments, and parameter efficiency statistical analysis correspond to the following: Figure 6 , Figure 7 , Figure 8 .

[0130] To comprehensively evaluate the technical effects of this invention, this embodiment conducts experiments on link prediction and forgetting tasks in a knowledge graph triple (edge) deletion scenario. WordNet18, FB15k-237, DBLP, and ogbl-biokg public graph datasets are selected for experimental verification. These datasets cover lexical semantic knowledge graphs, general knowledge graphs, academic heterogeneous networks, and biomedical knowledge graphs, respectively, and can be used to verify the processing effects of this invention in link prediction, edge deletion, and forgetting tasks. WordNet18, DBLP, and FB15k-237 are used for... Figures 4 to 8 The forgetting performance, ablation, and parameter efficiency experiments shown are presented in ogbl-biokg, which is used to verify the computational efficiency and relational adaptation capabilities of this invention on large-scale heterogeneous knowledge graphs.

[0131] The WordNet18 dataset is a multi-relation knowledge graph extracted from the English lexical knowledge base WordNet. Nodes represent lexical concepts or sets of synonyms, and relation edges represent semantic connections between different lexical concepts, including hypernyms, hyponyms, similarity relations, and derivation relations. The WN18 dataset contains 40,943 entities, 18 relation types, and 151,442 triples, with the training set containing 141,442 triples, and the validation and test sets each containing 5,000 triples. Since different semantic relations have different propagation patterns and prediction distributions, this dataset can be used to verify the ability of relation composition conditional deletion operators to distinguish between different relation types, and to evaluate the score suppression effect of triples to be deleted and the link prediction performance on retained triples.

[0132] The FB15k-237 dataset is a multi-relation knowledge graph constructed from the Freebase general knowledge base. The entities in this dataset involve various real-world objects such as people, places, organizations, films, sports, and social events. Relation types represent semantic connections between entities, such as occupation, nationality, affiliated organization, place of birth, and social associations. The FB15k-237 dataset contains 14,541 entities, 237 relation types, and 310,116 triples. The training set contains 272,115 triples, the validation set contains 17,535 triples, and the test set contains 20,466 triples. Compared to the original FB15k dataset, FB15k-237 filters some inverse relations, reducing information leakage caused by inverse relations between training and test data. Because FB15k-237 has a variety of relation types and a complex entity connection structure, this dataset can be used to test the ability of the present invention to generate adaptive forgetting directions for relations under conditions of high relation heterogeneity, and to verify the adaptability of the hybrid expert model combined with low-rank adaptation technology to deletion requests for different relation compositions.

[0133] The DBLP dataset is a heterogeneous information network constructed from academic literature data in the field of computer science. This dataset contains four node types: authors, papers, terms, and conferences. There are 4057 author nodes, 14328 paper nodes, 7723 terminology nodes, and 20 conference nodes, totaling 26128 nodes. Author nodes can be categorized with labels according to research areas such as databases, data mining, artificial intelligence, and information retrieval. Relationships in DBLP include author-paper, paper-terminology, and paper-conference associations; when forward and reverse relationships are treated as directed relationships, six types of directed edges can be formed. The DBLP dataset is used for link prediction tasks, constructing edge deletion tasks by deleting author-paper, paper-terminology, or paper-conference relationships.

[0134] The ogbl-biokg dataset is a biomedical knowledge graph constructed using Open Graph Benchmark, with data sourced from multiple biomedical databases. This dataset contains five entity types: disease, protein, drug, side effect, and protein function, totaling 93,773 entities and 5,088,434 relation edges. Specifically, there are 10,687 disease entities, 17,499 protein entities, 10,533 drug entities, 9,969 side effect entities, and 45,085 protein function entities. The dataset includes 51 types of directed relations, including various drug-drug interactions, protein-protein interactions, and drug-protein, drug-side effect, and function-function relationships. ogbl-biokg is characterized by a large number of nodes, complex relation semantics, and rich entity types, and is used to verify the computational efficiency and relation adaptability of this invention in large-scale heterogeneous knowledge graphs. In one implementation, erroneous or retractable drug interactions, protein associations, disease associations, or drug side effects triples are set as forgotten objects to simulate application scenarios such as biomedical knowledge correction, sensitive association deletion, and data compliance processing.

[0135] The experiment included multiple comparison methods, categorized into four types and nine methods in total, based on their technical approaches. The RETRAIN method, a complete retraining approach, served as a performance upper bound, retraining the model on the complete dataset after removing the triplets to be deleted. Graph partitioning methods, represented by Graph Eraser, divide the knowledge graph into several pieces and retrain on the affected pieces. Specifically, this includes two balanced graph partitioning algorithms: BEKM and BLPA. BEKM is based on balanced K-Means partitioning using node embeddings, while BLPA is based on balanced partitioning using link structures. Gradient update methods, represented by Gradient Ascent and Descent-to-Delete, adjust the original model parameters through reverse optimization. Specifically, Grad.Ascent (performing gradient ascent on the triplets to be deleted to achieve reverse learning) and Zeroth-Order (approximating model parameters using the zeroth-order gradient) are used. Deletion operator methods are represented by GNNDelete and SCGU. GNNDelete employs a shared deletion operator and representation space objective, while SCGU introduces a relation-specific low-rank deletion operator on the GNNDelete framework, making it structurally closest to the method of this invention and serving as the most crucial comparison object. The SLMGU method of this invention also belongs to the deletion operator class, consisting of a request-level unified gating (relation composition gating), a shared low-rank hybrid structure, and a score-guided loss (direct supervision of decoder scores). Furthermore, the schema-based subgraph forgetting method Schema Unlearning utilizes the schema structure of knowledge graphs to locate and forget subgraphs associated with the triples to be deleted. All the above comparison methods maintain consistent experimental data partitioning, encoder backbone, and evaluation metric settings with this invention to ensure fairness in the comparison. Figure 4 , Figure 5 This study compares the performance of methods for forgetting, covering nine experimental groups across the four categories mentioned above. To evaluate the parameter overhead of each method, Figure 8 Further, the following references and methods were selected based on parameter update criteria: Original (no parameter updates), Retrain (complete retraining with all model parameters updated), GradientAscent (the same method as Grad.Ascent) and Descent-to-Delete, GraphEraser (10 partitions, each partition independently updates all model parameters), GNNDelete, SCGU (ρ=16), and the present invention SLMGU (ρ=8). =4), and the number of trainable parameters for each method on each dataset is counted; Zeroth-Order and SchemaUnlearning are not included in the parameter size statistics. The data partitioning and encoder settings for each method are consistent with those used in the forgetting performance experiments during parameter statistics.

[0136] The experiment used two types of metrics to evaluate the forgetting effect from two dimensions. The knowledge retention metric (DT) measures the model's link prediction utility on retained knowledge triples, including DT AUC and DT AUP. The knowledge deletion metric (DF) measures the target separation ability between the knowledge to be deleted and the retained knowledge, i.e., the degree to which the prediction score of the triple to be deleted is suppressed relative to the retained triples, including DF AUC and DF AUP. A higher DT metric indicates better retention of task utility on retained knowledge, while a higher DF metric indicates more thorough forgetting of the knowledge to be deleted. All metrics are expressed as area ratio (AUC) or average precision (AUP), with higher values ​​being better.

[0137] Experiment 1: Comparison of Main Forgetting Performance and Cross-Corner Generalization

[0138] Following the overall experimental setup described above, this experiment compared forgetting performance on three datasets: WordNet18, DBLP, and FB15k-237, categorizing them into four classes and nine method groups, and using two metrics: DT and DF. Figure 4 Two backbone encoders, R-GCN and R-GAT, were used on three datasets to form six dataset-backbone combinations. Figure 5 On WordNet18, three heterogeneous graph backbones—HGT, HAN, and CompGCN—were further used for cross-backbone generalization comparison.

[0139] Figure 4 This section presents performance comparisons of nine experimental groups across six core dataset-backbone combinations. The nine experimental groups include the fully retrained reference group (RETRAIN), the graph partitioning group (BEKM), the graph partitioning group (BLPA), the gradient ascent group (Grad.Ascent), the schema unlearning group (Schema Unlearning), the zero-order optimization group (Zeroth-Order), the deletion operator group (GNNDelete), the relation-aware deletion operator comparison group (SCGU), and the invention group (SLMGU). The nine experimental groups were compared across six dataset-backbone combinations using R-GCN and R-GAT backbone encoders on three knowledge graph datasets: WordNet18, DBLP, and FB15k-237. Evaluation metrics were the knowledge retention metrics DT AUC and DT AUP, and the knowledge deletion metrics DF AUC and DF AUP (higher values ​​are better, indicated by arrows). Values ​​are expressed as mean ± standard deviation.

[0140] In all six core experimental settings, SLMGU achieved the strongest target-oriented DF separation capability among the evaluated methods, while maintaining competitive DT task utility: the baseline methods based on graph partitioning and gradient updates remained close to stochastic levels in multiple settings, while the operator class removal method maintained stronger model utility.

[0141] On all six core dataset-backbone combinations, this invention maintains DT performance comparable to or higher than that of SCGU, while achieving higher DF metrics.

[0142] Taking WordNet18's R-GAT as an example: SCGU's DT AUC is 86.79±2.35, DF AUC is 55.17±3.45, and DF AUP is 51.07±1.33; the DT AUC of this invention is 87.02±2.64, and the DF AUC and DF AUP are improved to 90.07±8.36 and 88.83±7.28, respectively. That is, while the knowledge retention DT AUC is improved by 0.23 percentage points, the DF AUC and DF AUP are improved by 34.90 percentage points and 37.76 percentage points, respectively. This shows that this invention does not sacrifice knowledge retention performance for forgetting metrics, but rather achieves stronger separation of deletion targets while basically maintaining the original task utility.

[0143] This setting also represents the largest performance improvement across all comparisons: without sacrificing DT performance, SLMGU improves the DF AUC by 30.8 percentage points compared to the strongest non-retrained baseline method (GNNDelete, DF AUC 59.31). Results on the DBLP and FB15k-237 datasets also show the same trend, indicating that this method can stably achieve score separation for the deletion target on different datasets.

[0144] Figure 5 This section presents a performance comparison chart for six experimental groups on the WordNet18 dataset across three heterogeneous graph backbones: RETRAIN (full retraining reference), Schema Unlearning, Zeroth-Order, GNNDelete (deletion operator), SCGU (relation-aware deletion operator comparison), and SLMGU (the invention-specific group). The six experimental groups were compared across three heterogeneous graph backbones: HGT, HAN, and CompGCN. Evaluation metrics included knowledge retention metrics (DT AUC, DT AUP) and knowledge deletion metrics (DF AUC, DF AUP) (higher values ​​are better), expressed as mean ± standard deviation.

[0145] Under the three backbones, the DF AUC and DF AUP of the SLMGU group of the present invention are significantly higher than those of the SCGU comparative group, which verifies that the request-level unified gating and shared low-rank hybrid mechanism of the present invention can maintain stable operation across different backbones. Specifically, compared to SCGU: Under HGT, the DT AUCs for both were 96.57 and 96.63, respectively, remaining essentially unchanged, while the DF AUC increased from 70.42 to 88.73 (+18.31 percentage points), and the DF AUP increased from 67.78 to 88.26 (+20.48 percentage points); Under HAN, the DT AUC increased from 97.75 to 97.95, the DF AUC increased from 73.96 to 95.03 (+21.07 percentage points), and the DF AUP increased from 71.97 to 94.83 (+22.86 percentage points); Under CompGCN, the DT AUC increased from 96.95 to 97.67, the DF AUC increased from 64.48 to 94.73 (+30.25 percentage points), and the DF AUP increased from 58.30 to 95.07 (+36.77 percentage points).

[0146] comprehensive Figure 4 and Figure 5 Compared to the listed SCGU direct comparison configurations, the present invention improves the DF AUC by an average of 13.52 percentage points and the DF AUP by an average of 15.06 percentage points; during the same period, the DT AUC and DT AUP improve by an average of 0.62 percentage points and 0.50 percentage points, respectively. This comparison illustrates that relation-specific low-rank parameters alone are insufficient to guarantee sufficient forgetting. The synergy between request-level unified gating (relation composition gating), shared low-rank hybrid structure, and fraction-guided loss (decoder fraction direct supervision) is a key reason for achieving the aforementioned technical effects.

[0147] Experiment 2: Ablation Experiment

[0148] To examine the effects and synergistic relationships of the components of this invention on forgetting, this invention, with a fixed score-guided loss (absolute inhibition term and relation-based ranking term), used the WordNet18 dataset as a benchmark. It sequentially added relation composition gating, a low-rank mixed structure, and simultaneously enabled both. Four configurations were used for ablation comparison: score-guided only, relation composition gating, low-rank mixed structure, and simultaneous enabling of both. The evaluation metrics were DT AUC, DF AUC, and DF AUP (the arrow direction indicates that higher values ​​are better). The results are as follows: Figure 6 As shown.

[0149] Relationship composition gating is the main source of improved forgetting performance. After setting a fixed score as the guiding objective, adding relation composition gating alone can increase the DF AUC from 71.20 percentage points to 74.31 percentage points (+3.11 percentage points) and DFAUP from 76.17 percentage points to 78.59 percentage points (+2.42 percentage points), while the DT AUC only slightly increases from 90.27 percentage points to 90.33 percentage points. This indicates that adaptively selecting shared components based on the relation distribution in forgetting requests can more accurately model the deletion direction corresponding to different relations.

[0150] Low-rank hybrid structures have both enhancing and stabilizing effects. When added alone, the DF AUC and DF AUP are only 71.06 and 75.60 percentage points respectively, roughly the same as the fraction-guided configuration, indicating a relatively limited forgetting gain. However, when combined with relational gating, the expressive power of the gating mechanism is further enhanced, resulting in the optimal DF AUC (75.99 percentage points) and DF AUP (80.82 percentage points), representing improvements of approximately 4.8 and 4.7 percentage points respectively compared to fraction-guided configurations alone. Furthermore, low-rank hybrid structures also make the training process smoother and achieve near-optimal convergence speed.

[0151] The absolute suppression term and the ranking term within the relation are complementary. Using only the absolute suppression term or only the ranking loss results in a weaker forgetting effect than using both together. The absolute suppression term directly reduces the absolute prediction score of deleted triples, while the ranking term ensures that the score of deleted triples is lower than that of retained triples within the same relation. Combining both improves both the DF AUC and DF AUP simultaneously, while DT remains essentially unchanged (DT AUC ranges from 90.27 to 90.68 percentage points across the four configurations).

[0152] The above ablation results, from the perspective of a closed-loop system, illustrate that the components are not simply superimposed: the conditionalization of relational composition determines which experts to select and their proportions; the low-rank hybrid structure determines which shared parameters to use for deletion; and the absolute inhibition term and the same relational ranking together provide feedback on whether the score of the knowledge to be deleted has been truly reduced. After the three are connected according to the aforementioned data flow, the score feedback can directly correct the gating selection and expert transformation.

[0153] Experiment 3: Fraction-guided loss independent-effect controlled experiment

[0154] To further verify the independent role of the score-guided forgetting loss proposed in this invention, this embodiment uses GNNDelete and SCGU as the basic methods without changing the existing deletion operator structure. Only the original forgetting loss is replaced with the score-guided loss (SG) proposed in this invention. The rest of the model structure, encoder, deletion operator and training settings remain unchanged, thereby eliminating the influence of gating mechanism, shared low-rank mixed structure and model capacity changes on the experimental results, and directly examining the effect brought about by the change of forgetting optimization objective.

[0155] Based on GNNDelete and SCGU, and with the original forgetting loss replaced by the score-guided loss (SG) of this invention, the changes in DT AUC, DF AUC, and DF AUP on the R-GCN and R-GAT encoders of the WordNet18 dataset are as follows: Figure 7 As shown, on the R-GCN and R-GAT encoders of the WordNet18 dataset, replacing the original forgetting loss with a score-guided loss significantly improved the knowledge deletion evaluation metrics of both GNNDelete and SCGU, while the performance on the knowledge retention task only changed slightly. Specifically, under the R-GCN encoder, after adopting the score-guided loss, the DF AUC and DF AUP of GNNDelete increased by approximately 5.1 percentage points and 3.5 percentage points, respectively; after adopting the score-guided loss, the DF AUC and DF AUP of SCGU increased by approximately 8.1 percentage points and 6.5 percentage points, respectively, while the DT AUC changed by only approximately +0.07 percentage points and +0.01 percentage points. Under the more complex R-GAT encoder for relational modeling, this difference widens further: after replacing GNNDelete with fractional guided loss, the DF AUC improves by approximately 37.2 percentage points, and the DF AUP improves by approximately 53.9 percentage points; when SCGU adopts the same fractional guided mechanism, the DF AUC improves by approximately 47.2 percentage points, and the DF AUP improves by approximately 56.3 percentage points, while the corresponding DT AUC only changes by approximately -0.15 percentage points and -0.20 percentage points, respectively. This demonstrates that fractional guided loss can significantly enhance the ability of existing deletion operators to suppress forgotten knowledge while essentially maintaining the predictive performance of retained knowledge.

[0156] The above results further demonstrate that the forgetting objective employed by existing GNNDelete and SCGU methods constitutes a significant factor limiting their forgetting effectiveness. These methods primarily weaken the knowledge to be deleted indirectly by adjusting entity representations or matching specific embedding objectives. However, there is no direct correspondence between changes in entity embedding and the predicted scores of triples output by the relation-specific decoder. Therefore, even if the forgetting constraints in the embedding space are satisfied, it cannot guarantee that the scores of the triples to be deleted will be sufficiently reduced in the actual link prediction space. In contrast, the score-guided loss of this invention directly optimizes the knowledge graph decoder output. By imposing score suppression on the triples to be deleted and establishing relative ordering constraints using triples retained by the same relation, the parameter updates of the deletion operator directly serve the final goal of reducing the predicted scores of the knowledge to be forgotten. Consistent DF performance improvements were observed on both GNNDelete and SCGU deletion operator frameworks, indicating that this improvement does not simply stem from the relation composition gating or shared low-rank hybrid structure used in this invention, but rather from the score-guided forgetting objective itself effectively alleviating the inconsistency between the traditional embedding space forgetting objective and the actual scoring space of the knowledge graph.

[0157] Therefore, this invention demonstrates that the score-guided mechanism can provide effective decoder score feedback; in the core embodiment of this invention, this score feedback is further used as a common optimization signal for the request-level unified gating and the shared low-rank hybrid structure, forming a closed loop from relation composition decision, deletion mapping execution to decoder score feedback, rather than as an additional loss independent of the gating and shared low-rank hybrid structure.

[0158] Experiment 4: Parameter Efficiency Comparison Experiment

[0159] To evaluate the parameter overhead of different knowledge graph forgetting methods, the original model (no parameter updates), the fully retrained method (Retrain), the gradient update methods Gradient Ascent and Descent-to-Delete, the graph partitioning method GraphEraser (10 partitions), the deletion operator method GNNDelete, SCGU (ρ=16), and the present invention SLMGU (ρ=8) were compared. =4) Comparison of the number of trainable parameters when using R-GCN and R-GAT encoders on the WordNet18, DBLP, and FB15k-237 datasets, respectively. Figure 8 As shown. The results demonstrate that the SLGGU of this invention maintains a low number of trainable parameters across all three datasets and has a significant advantage over SCGU, which employs relation-specific parameter deletion.

[0160] On the WordNet18 dataset, SCGU requires updating 58,368 parameters, while the SLMGU of this invention requires only 8,392 parameters, a reduction of 49,976 parameters, resulting in a decrease of approximately 85.6% in the number of trainable parameters. The parameters required by SCGU are approximately 7.0 times those required by the SLMGU of this invention. On the DBLP dataset, SCGU requires 21,504 parameters, while the SLMGU of this invention requires only 8,008 parameters, a reduction of approximately 62.8%. The parameters required by SCGU are approximately 2.7 times those required by the SLMGU of this invention.

[0161] This difference is further amplified on the FB15k-237 dataset, which has a richer variety of relation types. SCGU requires updating 731,136 parameters, while the SLGGU of this invention only requires 15,400 parameters, a reduction of 715,736, resulting in a decrease of approximately 97.9% in the number of trainable parameters. In other words, under this experimental setting, the forgetting module parameter size of SCGU is approximately 47.5 times that of the SLGGU of this invention. This indicates that as the number of relation types in the knowledge graph increases, the parameter expansion problem caused by SCGU's independent modeling using relation-specific parameters intensifies rapidly, while this invention does not experience a corresponding increase in parameter expansion with the increase in the number of relations.

[0162] Compared to GNNDelete, this invention also offers a parameter advantage. GNNDelete requires 20,480 trainable parameters on all three datasets, while the present invention, SLMGU, requires only 8,392, 8,008, and 15,400 parameters on WordNet18, DBLP, and FB15k-237, respectively, representing reductions of approximately 59.0, 60.9, and 24.8 percentage points. Therefore, this invention does not sacrifice forgetting performance by increasing the size of the deletion module, but rather achieves stronger relational adaptation capabilities with a lower or similar parameter budget.

[0163] The above results show that although SCGU improves relation discrimination by setting relation-aware deletion parameters for different relations, the cost is that the parameter size is highly sensitive to the number of relations. When the knowledge graph contains a large number of relation types, this scheme needs to maintain a large number of relation-specific parameters, and its parameter efficiency decreases significantly. This invention transforms the maintenance of a complete deletion capability for each relation into multiple relations sharing basic experts by sharing a low-rank projection space, a shared expert pool, and a request-level gating combination mechanism, and dynamically combines experts according to the current forgetting request. Thus, different relations do not need to copy the complete deletion parameters separately, but can reuse existing forgetting directions in a shared low-rank parameter space. In the two-layer setting of this embodiment, SMGU only adds 32 gating relation embedding parameters for each new relation, while SCGU, in the comparison configuration of ρ=16, needs to add 3072 new relation-specific low-rank parameters for each new relation. Therefore, the difference between the two is not only due to the low-rank dimension values, but mainly due to the different parameter organization methods of shared experts + low-dimensional relation gating and low-rank transformation copied by relation. This mechanism significantly reduces parameter redundancy while maintaining relation awareness, making the present invention particularly suitable for large-scale knowledge graph forgetting tasks with a large number of relations.

[0164] Therefore, the advantages of this invention over SCGU are not only reflected in the improved forgetting effect, but also in the significantly higher parameter utilization efficiency. Experimental results show that SCGU suffers from significant parameter expansion in knowledge graphs with a high relation count, while SLMGU can achieve adaptive relation forgetting with a much smaller number of trainable parameters than SCGU, thus achieving a better balance between forgetting performance, parameter efficiency, and applicability to large-scale knowledge graphs.

[0165] Existing knowledge graph forgetting methods struggle to balance complete sharing and complete isolation based on relationships in the parameter organization of deletion operators: the former fails to express relationship differences, while the latter leads to severe parameter expansion as the number of relationships increases. To address these issues, this invention proposes a knowledge graph forgetting solution that is decoupled from the knowledge graph backbone encoder and features a core closed loop: decision-making based on request-level relationships, execution by shared low-rank experts, score feedback from the relationship decoder, and parameter backpropagation.

[0166] This invention is applicable to tasks such as knowledge graph completion and link prediction, where the main output is a relation decoder score, and supports knowledge triple deletion-type forgetting requests. By setting up a forgetting module decoupled from the backbone encoder, this invention can be adapted to different knowledge graph neural network backbones, such as Relational Graph Convolutional Network (R-GCN), Relational Graph Attention Network (R-GAT), Knowledge Graph Transformer, Heterogeneous Graph Attention Network (HAN), and Comparative Graph Convolutional Network (CompGCN), thereby improving compatibility under different knowledge structures and model architectures.

[0167] In terms of structural design, this invention employs a request-level unified gating (relationship composition decision). The gating does not pre-select a fixed independent operator for a single relation, but rather generates a unified mixed weight based on the relation composition of the current complete forgetting request; multiple relations can share the same expert, and different requests can form different expert combinations. Therefore, this invention can simultaneously express relation differences and semantic commonalities, and adapt to dynamic forgetting requests involving single relations, mixed multiple relations, and changing relation proportions.

[0168] Furthermore, this invention uses a shared low-rank expert pool as the execution carrier (shared low-rank hybrid structure). Each expert provides reusable deletion directions within a shared low-rank subspace, and request-level gating dynamically fuses the expert outputs to form an effective residual mapping corresponding to the current request. This structure does not simply replicate a set of parameters for each relation, but allows different relations, such as those all dependent on drug features, to reuse some experts, thereby achieving a balance between parameter efficiency, relation specificity, and cross-relation semantic sharing.

[0169] Furthermore, this invention uses score-guided loss as a unified feedback signal for request-level gating decisions and shared low-rank expert execution. The absolute suppression term (BCE) of the triple to be deleted and the same relation ranking term directly generate error signals in the relation decoder output space; the original parameters of the decoder and encoder remain frozen, but the gradient backpropagation path for the input entity state is retained, allowing the error signals to be transmitted to the gating network parameters, gating relation embedding parameters, and shared low-rank expert parameters. Thus, the adjustment of gating weights is directly based on whether the score of the triple to be deleted is reduced, rather than solely on whether random embedding matching is completed, thereby mitigating the problems of inconsistency between the encoding space and the evaluation space, dynamic changes in random negative references, and multi-loss gradient conflicts.

[0170] The core of this invention is not to use relation gating, MoE, and score loss as three interchangeable independent modules in parallel, but to solidify them into a directional closed-loop link: the relation composition of the current forget request determines the unified gating, the unified gating determines the combination of shared low-rank experts and the effective deletion mapping, the effective deletion mapping changes the local entity state, the frozen relation decoder converts the state change into triple scores, and the score loss then adjusts the gating and expert parameters in reverse; at the same time, the locality loss restricts the incidental changes of non-target entities in the same backpropagation process.

[0171] Through the above technical solution, this invention can perform knowledge forgetting processing on knowledge graph data of different scales, relational complexities, and knowledge deletion scenarios, while taking into account both the forgetting effect of the knowledge to be deleted and the task performance of knowledge retention. Experimental results show that the method achieves superior forgetting evaluation results under multiple knowledge graph datasets, different relational graph neural network backbones, and various experimental settings, indicating that the method has good task adaptability, model compatibility, and application generalization ability.

[0172] This invention can be applied to scenarios such as biomedical knowledge graphs, academic knowledge graphs, multi-relationship knowledge graphs, and encyclopedic knowledge bases. It is used to delete erroneous knowledge, outdated knowledge, sensitive relationships, personal privacy information, and knowledge facts that do not comply with laws and regulations. It can also serve tasks such as knowledge correction, privacy protection, authorization revocation, dynamic knowledge updates, and security maintenance of knowledge graph models.

[0173] The number of devices and processing scale described herein are for the purpose of simplifying the description of the invention. Applications, modifications, and variations of the invention will be readily apparent to those skilled in the art.

[0174] 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 illustrations shown and described herein.

Claims

1. A fraction-guided low-rank hybrid expert knowledge graph forgetting method, characterized in that, Perform knowledge triple forgetting on a trained knowledge graph model, which includes entity embeddings, Each encoder layer and relation decoder, the methods include: Obtain the knowledge graph to be processed Trained knowledge graph models Relation sets and the set of triples of knowledge to be forgotten Each triple of knowledge to be forgotten is represented as ,in For head entity, For relation types, For the tail entity; freeze the entity embedding parameters, encoder parameters, and relation decoder parameters, while preserving the gradient backpropagation paths of the encoder and relation decoder for the input entity state; perform K-hop neighborhood expansion centered on the head and tail entities of the knowledge triple to be forgotten, resulting in a K-hop deletion subgraph. Delete the K-jump subgraph Entities other than the head and tail entities are defined as a set of non-endpoint entities. Using frozen models for knowledge graphs Perform the original forward propagation and save the original entity representations output by each encoder layer. ; Determine the current forgetting condition Statistics on current forgetting conditions Each relation type experience frequency Residual deletion operators are set in each layer of the encoder. The residual deletion operators include: a low-rank projection matrix shared across relations. , A cross-relationship shared expert projection matrix , , The projection matrix for each expert is not set according to the relationship type; the residual deletion operator also includes gated network parameters. , and gating relationship embedding The parameters of the gated relationship embedding and the frozen relationship decoder are independent of each other; according to Calculate relation types Potential gating, according to Generate the first The request-level unified gating vector of the layer is used as a K-hop deletion subgraph in the same forward propagation. The deletion control variable used by all entities within the scope, of which ;according to The combination yields an effective upprojection matrix, which only deletes subgraphs for K hops. Entity representation within Apply residual update: , in, For scaling factor, For low-rank dimensions, superscript This indicates transpose; the entity state updated by the residual is input into the next frozen encoder layer, and the entity state output from the last layer is input into the frozen relation decoder, which outputs the prediction score of the knowledge triple; An absolute suppression term is constructed using the triplet of knowledge to be forgotten as the negative class sample, and a relative ranking constraint is constructed between the triplet of knowledge to be forgotten and the triplet of knowledge retained by the same relation, resulting in a score-guided forgetting loss. The predicted score of the triplet of knowledge retained by the same relation is separated from the computation graph through a stopping gradient operation. Locality constraints are applied to the set of non-endpoint entities. The representation of the entity in the middle approximates the corresponding original entity representation, thus obtaining the locality loss; The overall training objective is formed by weighting the score-guided forgetting loss and the locality loss. The gradient of the overall training objective is then backpropagated through the gradient backpropagation path, updating only the low-rank projection matrix. , expert projection matrix The parameters of the gating network and the gating relation embedding are not updated. The frozen entity embedding parameters, encoder parameters and relation decoder parameters are not updated. The updated parameters are used for request-level unified gating generation and residual update in the next round of forward propagation. The process is iterated until the number of training rounds or the convergence condition is met, and the knowledge graph model corresponding to the set of knowledge triplets to be forgotten is output.

2. The fraction-guided low-rank hybrid expert knowledge graph forgetting method according to claim 1, characterized in that, Current forgetting conditions The determination method is as follows: During the optimization phase, take the current batch of deleted triplets. As a current condition of forgetting ; During the verification and testing phases, a complete set of triples of knowledge to be forgotten is obtained. As a current condition of forgetting .

3. The fraction-guided low-rank hybrid expert knowledge graph forgetting method according to claim 1, characterized in that, Gated network parameters satisfy , Gating relationship embedding satisfies ,in Embed dimensions for gating relationships.

4. The fraction-guided low-rank hybrid expert knowledge graph forgetting method according to claim 1, characterized in that, When the current forgetting condition It contains only a single relation type At that time, the request-level unified gating vector is equal to the latent gating vector of that relation type, i.e. .

5. The fraction-guided low-rank hybrid expert knowledge graph forgetting method according to claim 1, characterized in that, The projection matrix on each expert is initialized to a zero matrix, making the residual deletion operator equivalent to the identity mapping at the beginning of training, so that the model starts training from the original model state.

6. The fraction-guided low-rank hybrid expert knowledge graph forgetting method according to claim 1, characterized in that, No. The number of trainable parameters for the layer residual deletion operator is: , With the number of relation types The newly added trainable parameters are only those related to the gating relation embedding, and the low-rank lower projection matrix and expert upper projection matrix shared across relations do not repeatedly expand with the number of relation types.

7. The fraction-guided low-rank hybrid expert knowledge graph forgetting method according to claim 1, characterized in that, Absolute inhibition terms The structure is as follows: The target value 0 is a fixed anchor point. For knowledge triples The predicted score; Relative sorting constraints by Construction, in which For the first A triplet of knowledge to be forgotten To and Preservation of knowledge triples with the same relation type For steepness parameters, For interval parameters, The number of knowledge triples to be retained corresponding to each knowledge triple to be forgotten; Fraction-guided forgetting loss is the sum of the absolute inhibition term and the relative ranking constraint, i.e. .

8. The fraction-guided low-rank hybrid expert knowledge graph forgetting method according to claim 1, characterized in that, Local loss according to structure; The overall training objective is: , in, For the sake of scores, guide forgetting loss, For localized loss, These are the weighting coefficients.

9. The fraction-guided low-rank hybrid expert knowledge graph forgetting method according to claim 1, characterized in that, K-jump delete subgraph The entity representations of entities other than those specified are not updated with residuals and remain as the corresponding original entity representations. The relation decoder is the DistMult decoder, and the encoder is a relation graph convolutional network R-GCN, a relation graph attention network R-GAT, a heterogeneous graph TransformerHGT, a heterogeneous graph attention network HAN, or a combined graph convolutional network CompGCN.

10. A knowledge graph forgetting system, characterized in that, The system is used to implement the score-guided low-rank hybrid expert knowledge graph forgetting method according to any one of claims 1 to 9, the system comprising: The forgetting request acquisition and condition generation unit is used to acquire the knowledge graph to be processed, the trained knowledge graph model with L encoder layers, the relation set, and the set of knowledge triples to be forgotten, and to determine the current forgetting conditions. Current forgetting conditions The optimization phase involves a small batch of currently deleted triplets, while the verification and testing phases involve a complete set of triplets to be forgotten. The local deletion domain construction and preservation object determination unit is used to perform K-hop neighborhood expansion with the head and tail entities of the knowledge triple to be forgotten as the center, to obtain the K-hop deletion subgraph and the set of non-endpoint entities; The frozen backbone and state interface unit is used to freeze entity embedding parameters, encoder parameters, and relation decoder parameters, retain the gradient backpropagation paths of the encoder and relation decoder for the input entity state, save the original entity representations output by each encoder layer, and output the knowledge triple prediction scores calculated by the frozen relation decoder based on the input entity state. The request-level relation constitutes a decision-making and sharing low-rank expert execution unit, which is used to statistically analyze the empirical frequency of each relation type in the current forgetting condition, generate a request-level unified gating vector, and obtain an effective up-projection matrix by weighted combination of the expert up-projection matrix shared across relations according to the request-level unified gating vector, and apply residual updates only to the entity representations within the K-hop deletion subgraph; The decoder score feedback and local preservation constraint generation unit is used to construct an absolute inhibition term and a relative ranking constraint of the same relation with the knowledge triplet as the negative class sample based on the predicted score of the knowledge triplet, to obtain the score-guided forgetting loss, and to construct the locality loss based on the original entity representation. The closed-loop joint optimization unit is used to form the overall training objective by weighting the score-guided forgetting loss and locality loss. The gradient of the overall training objective is backpropagated through the gradient backpropagation path. Only the low-rank projection matrix, the expert projection matrix, the gated network parameters and the gating relationship embedding are updated. The updated parameters are returned to the request-level relationship to form the decision and shared low-rank expert execution unit until the number of training rounds or the convergence condition is met, and the knowledge graph model that has completed the forgetting of the specified knowledge is output.