Unlink to Unlearn: Simplifying Edge Unlearning in GNNs

As concerns over data privacy intensify, unlearning in Graph Neural Networks (GNNs) has emerged as a prominent research frontier in academia. This concept is pivotal in enforcing the \textit{right to be forgotten}, which entails the selective removal of specific data from trained GNNs upon user request. Our research focuses on edge unlearning, a process of particular relevance to real-world applications. Current state-of-the-art approaches like GNNDelete can eliminate the influence of specific edges yet suffer from \textit{over-forgetting}, which means the unlearning process inadvertently removes excessive information beyond needed, leading to a significant performance decline for remaining edges. Our analysis identifies the loss functions of GNNDelete as the primary source of over-forgetting and also suggests that loss functions may be redundant for effective edge unlearning. Building on these insights, we simplify GNNDelete to develop \textbf{Unlink to Unlearn} (UtU), a novel method that facilitates unlearning exclusively through unlinking the forget edges from graph structure. Our extensive experiments demonstrate that UtU delivers privacy protection on par with that of a retrained model while preserving high accuracy in downstream tasks, by upholding over 97.3\% of the retrained model's privacy protection capabilities and 99.8\% of its link prediction accuracy. Meanwhile, UtU requires only constant computational demands, underscoring its advantage as a highly lightweight and practical edge unlearning solution.


INTRODUCTION
Although Graph Neural Networks (GNNs) have achieved great success in various tasks [16], this advancement inherently comes with the risk of privacy leakage, as training data with sensitive personal information can be implicitly "remembered" within model parameters.To address these concerns, recent legislations, e.g., EU's General Data Protection Regulation (GDPR) and the California Consumer Privacy Act (CCPA), have granted individuals with the right to be forgotten, enabling them to request elimination of their private data from online platforms.Consequently, machine unlearning [3] has emerged, allowing quick and efficient removal of specific data from a trained model, rather than retraining from scratch.
In this paper, we focus on edge unlearning, a key unlearning scheme in graphs, owing to its pivotal role in real-world applications such as safeguarding edge privacy in social networks.Consider the scenario where individuals in online social networks may seek to conceal certain private social connections.In these instances, GNNs that have been trained on these graphs require timely updates to eliminate any influence of the data intended to be forgotten, while preserving performance on retrained edges.
Recently, GNNDelete has achieved state-of-the-art performance in edge unlearning, however, we observed a considerable decline in its prediction accuracy for edges in the retained training set, especially for those resembling or closely associated with the edges subjected to unlearning.We introduce the term over-forgetting to describe such a phenomenon, where an unlearning algorithm inadvertently eliminates an excessive amount of information from the retained data.In this context, "excessive" refers to a scenario where the performance of the unlearned model on retained data deteriorates significantly compared to a model retrained from scratch using only the retained data.
In this study, we address the challenge of over-forgetting by introducing Unlink to Unlearn (UtU).Our investigation has revealed deficiencies in the design of GNNDelete's loss functions.One loss function designed to eliminate the influence of forget edges opts for an unsuitable optimization objective, being the primary contributor to over-forgetting.The other, designed to alleviate the issue of overforgetting, fails to prevent the performance decline of retaining edges as intended.In light of these findings, we deprecate both loss functions in GNNDelete, while facilitating edge unlearning by unlinking forget edges from the original graph structure.Our method eliminates the need for complex parameter optimization, reducing computation overhead by orders of magnitude.Our experimental evaluations indicate that UtU's performance on downstream tasks, its efficacy in unlearning, and its output distribution are more aligned with those of the retrained model, which is broadly regarded as the gold standard of unlearning.

PRELIMINARIES 2.1 Operation of GNNs
Consider a graph  = ( , ) with node set  and edge set .Each node   ∈  is often associated with a feature vector   .A GNN model M, parameterized by  , is composed of multiple GNN layers, which process node features and graph structural information to generate node embeddings via the message passing mechanism.
Initialized by  0  =   for each node   , the operation of -th GNN layer can be formally expressed as follows: where N () denotes neighborhood of   , and msg(•) and upd(•) vary among different GNN types, representing message function and update function.The final output of M is the node embeddings of last layer, denoted by  = M (,  ).

Edge Unlearning on GNNs
Let M 0 be a randomly initialized GNN, and let the original model M * be trained using a learning algorithm A (M 0 , ) on graph .The forget set, defined as   ⊆ , contains the edges requested for removal, while the retain set   = \  represents the remaining edges in the training graph .The objective of unlearning is to devise an unlearning process U that renders the unlearned model M  = U (M * , ,   ) indistinguishable from the retrained model M  = A (M 0 ,   ), with   = ( ,   ) being the retain graph.
A variety of unlearning algorithms have been developed to address edge unlearning requests in GNNs.[4,5] leverages SISA paradigm [2], where only the sub-model corresponding to the removed data needs to be retrained and then aggregates its result with other sub-models.Other strategies directly update the original model, including leveraging the influence function [14], providing a theoretical guarantee of unlearning via differential privacy [15], projecting parameters to irrelevant subspace [7].

GNNDelete
Recently, GNNDelete [6] surpasses various baseline methods, showing a strong capability to unlearn selected edges by a learning-tounlearn framework.It first inserts a linear transformation  with learnable parameters after each GNN layer, while freezing the original model's parameters. is only applied to nodes in -hop enclosing subgraph of forget edge   , namely    , by transforming each  node's original embedding into unlearned embedding:  ′  =   (   ); for other nodes, their embeddings remain unchanged.
Two loss functions, Deleted Edge Consistency (DEC) loss L  and Neighborhood Influence (NI) loss L   , are then computed layerwise.Generally, DEC loss is intended for unlearning edges in   , while the NI loss aims to repair node embeddings in    .We will discuss their design in more detail in 3.2.During the backward pass, the parameters of  are optimized based on the weighted total loss, which is represented as: GNNDelete uses  = 0.5 to report its performance, claiming this setting can achieve the best overall performance.

UTU: UNLINK TO UNLEARN
While GNNDelete reports a prominent unlearning ability, it suffers from the issue of over-forgetting.In this section, we first provide a formal introduction to the over-forgetting problem, subsequently revealing the connection between GNNDelete's inappropriate loss and over-forgetting.By removing these loss functions, we further introduce our simplified approach UtU to alleviate over-forgetting.

Over-forgetting in Edge Unlearning
As previously introduced, over-forgetting refers to the phenomenon where the performance of retain set significantly deteriorates after unlearning.Figure 1 shows the over-forgetting observed on GNNDelete.Despite only 5% of the edges being unlearned, a substantial 92.4% of the retained edges experience performance decrement.Conversely, the retrained model's predictions for the majority of retained edges remain mostly unchanged.In order to quantitatively assess over-forgetting, we compare the performance of unlearned model against a retrained model to gauge the impact of the forgetting procedure.
For link prediction task, the probability of the existence of the edge between nodes (  ,   ) is predicted by integrating their final embeddings    ,    using a score function  (•), as    =  (   ,    ).For    ∈   , we identify over-forgetting if the predicted probability of    in M  decreases compared to M  , i.e., Δ   =  ( ′  ,  ′  ) −  (   ,    ) < 0, where  ′ and   represent embeddings generated by models M  and M  , respectively.Typically, our focus is on the overall performance decline across   , which can be measured as Δ  = mean(Δ   ), ∀   ∈   .

Analysis on Unlearning Target
Now we discuss the design of GNNDelete's loss functions to find out the source of over-forgetting.The Deleted Edge Consistency (DEC) loss minimizes the difference between predictions of forget edges   and random-chosen node pairs: ) where [•; •] denotes the concatenation of two vectors.mse refers to Mean-Squared Error.∈  means randomly chosen.
However, random node pairs may not be a suitable optimization target.The optimization of DEC loss will introduce structural noise by encouraging node embeddings in   to reflect random connections rather than actual graph topology, leading to inaccurate representations and prediction results.Moreover, this noise propagates to neighboring nodes by message passing mechanism as pointed out in Sec.2.1, degrading the embedding quality on a broader scale and exacerbating the issue of over-forgetting.
Besides, connected nodes in a graph tend to share similar attributes or belong to the same class according to the homophily hypothesis [10].Despite being removed due to unlearning requests, the samples in   originate from pre-existing edges in the graph, implying that their end nodes ought to exhibit strong homophily, and should not be equated with arbitrarily selected node pairs.
Neighborhood Influence (NI) loss base on the idea that removing   should not affect the predictions of its enclosing subgraph   : where ∥ signifies the concatenation of multiple vectors.
NI loss guides the unlearned embedding  ′  to match the original one, acting as a regularization term for node embeddings in    to mitigate the structural noise induced by DEC loss.However, note that node features and edges are combined as GNN's input, the original embedding is generated using the original graph without removing   's influence.That means the unlearned embedding will still contain structural information of edges in forget set, which weakens its ability to repair over-forgetting.

UtU: a Minimalist Approach
Given the preceding analysis, we propose to eliminate the DEC loss due to its selection of an unsuitable target for forgetting.Following the removal of DEC loss, the NI loss, initially serving as a corrective measure for DEC loss, is also deemed unnecessary.We then propose that edge unlearning can be effectively achieved by only altering the input edge indexes to that of retain graph   , which can be named Unlink to Unlearn: where  * denotes parameters of original model M * .This approach is grounded on the insights of GNN operations.The edges in the graph mainly facilitate message passing between node features, as delineated in Eq. 1.Most GNN models' parameters are located during the node features' update step, as specified in Eq. 2, which does not involve edge utilization.Therefore, removing a forgotten edge during inference can effectively block message propagation from neighboring nodes linked to the forget set.This action alone suffices to eliminate the edge's influence from the model, thereby achieving our unlearning objective.

EXPERIMENTS 4.1 Experimental Setup
Datasets.We conduct the experiments on four real-world datasets, including citation networks: CoraFull [1] and PubMed [1], and collaboration networks: CS [12] and OGB-collab [8].Table 1 shows details of these datasets.In accordance with previous work, we split 90% edges for the training set, 5% for validation, and 5% for test.
Tasks.Following the common practice in [6,15], we train all models on link prediction task and then perform edge unlearning.Forget edges are randomly chosen from the training set.We vary the proportion of forget edges from 0.1% to 5% to examine algorithm performance under different scenarios.There are few scenarios where more than 5% of edges need to be unlearned simultaneously.
Metrics.We adopt ROC-AUC to evaluate downstream tasks for link prediction.To assess the effectiveness of unlearning, we compare the unlearned model against the retrained model using JS divergence and ROC-AUC of MI Attack.Additionally, we use Δ, introduced in Sec.3.1, to compare over-forgetting.
Implementation.We follow the default hyper-parameter setting of all baselines, and metrics are reported across an average of five independent runs.Codes are available at provided link1 .

Experiment Result and Anlysis
4.2.1 Downstream Task.In this part, we compare the utility of unlearned models obtained by different unlearning methods, as we anticipate that unlearning will not harm the performance of GNN on downstream tasks.ROC-AUC was used to determine the model's ability to predict hidden test edges.Results are shown in Table 2, where UtU performs the best in most settings, with the closest gap of 0.001 on average compared to retraining.

Unlearning Efficacy.
The model after unlearning should treat the forget edges as if it had never seen them before.Hence, we expect predictions on these edges to be similar to those of a model that has been retrained from scratch.Following [16], we use the activation distance measured by JS divergence, along with membership inference (MI) attack [11] to assess whether the model has truly achieved the effect of unlearning.Figure 2 illustrates that the   outputs of forget edges from UtU closely mirror those from the retrained model.Table 3 shows that the resistance to MI Attack of UtU is generally more aligned with retraining than baseline methods.
4.2.3Over-forgetting evaluation.Figure 3 shows the trend of Δ as the size of the forget set changes.As described in 3.1, Δ represents the average difference of the edge predictions of the retain set, compared with that of retrained.Lower Δ indicates more serious over-forgetting.The results indicate that our method remains unaffected by over-forgetting, regardless of the forget set's size.Furthermore, its predictions of retain set are also highly consistent with those of the retrained model.

CONCLUSION
In this work, we address the issue of over-forgetting in the state-ofthe-art edge unlearning method, GNNDelete.Our analysis identifies a correlation between its loss functions and the over-forgetting problem.To mitigate this, we introduce a simplified approach named Unlink to Unlearn (UtU).UtU effectively eliminates the influence of forgotten edges by merely unlinking the forgotten edges, thus obstructing the corresponding message-passing paths in GNN during the inference stage.Experimental results demonstrate that UtU acts  on par with the retrained model with near-zero computational overhead.Our findings suggest that removing a small number of edges might have little influence on the model parameters, highlighting an avenue for future research to investigate this phenomenon.

Figure 1 :
Figure1: An intuitive demonstration of over-forgetting, comparing the difference of retaining edge predictions before and after forgetting.The x-axis represents the change in predicted probabilities after unlearning, and the y-axis shows the distribution of these changes across the retain set   .

Figure 3 :
Figure 3: Comparison of over-forgetting on GAT backbone.

Table 1 :
Statistical Overview of the Datasets.