A data privacy protection method, system, computer device and storage medium

By constructing a layer-by-layer forgetting operator and an improved contrastive learning framework, the association of sensitive edges in graph neural networks is eliminated in a coordinated manner, solving the problems of incomplete forgetting and high computational cost in graph neural networks, and achieving efficient and thorough data privacy protection.

CN121413031BActive Publication Date: 2026-05-05NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF SCI & TECH
Filing Date
2025-12-24
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing graph neural networks struggle to maintain overall model performance while removing specific user or sensitive relationship data. Furthermore, existing methods suffer from high computational costs, incomplete forgetting, and severe performance degradation, making them difficult to deploy in practical applications.

Method used

By constructing a layer-wise forgetting operator and an improved comparative learning framework, the direct association of sensitive edges and their propagation effects in the graph topology are eliminated in a coordinated manner. The layer-wise forgetting operator (DEL) and the improved InfoNCE loss function are combined with the performance preservation loss function to achieve efficient and thorough graph data forgetting.

Benefits of technology

It achieves efficient and thorough removal of sensitive data while ensuring model performance, reducing computational overhead, improving forgetting effects, and reducing the risk of privacy leaks. It is applicable to scenarios such as social networks and medical knowledge graphs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121413031B_ABST
    Figure CN121413031B_ABST
Patent Text Reader

Abstract

This invention discloses a data privacy protection method, system, computer device, and storage medium. The method includes the following steps: obtaining the original graph data G to be privacy-protected from the client; initializing a GNN model and pre-training it on the original graph data G; setting a forgetting target and further iteratively training and optimizing the pre-trained GNN model based on contrastive learning to obtain an optimized GNN model; inputting new graph data to be privacy-protected transmitted from the client into the optimized GNN model and outputting privacy-protected graph data. This invention, by constructing a layer-by-layer forgetting operator and an improved contrastive learning framework, collaboratively eliminates the direct association of sensitive edges and their propagation influence in the graph topology, thereby achieving accurate and efficient graph data forgetting while ensuring the overall performance of the model, thus achieving effective data privacy protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence security and data privacy protection technology, and in particular, it relates to a data privacy protection method, system, computer device, and storage medium. Background Technology

[0002] Graph neural networks, as an important tool for processing graph-structured data, have demonstrated powerful capabilities in fields such as social network analysis, recommender systems, and knowledge graphs. With the increasing sophistication of data privacy regulations, a key challenge remains: how to remove specific user or sensitive relationship data from a trained graph neural network while maintaining overall model performance.

[0003] Early graph data forgetting methods primarily employed precise forgetting schemes, such as achieving complete forgetting through data sharding and model retraining. While these methods guarantee forgetting effectiveness, they require complete original training data, and their computational cost increases linearly with the data size, making them difficult to deploy in practical applications.

[0004] To address the efficiency issue, recent studies have proposed approximate forgetting methods based on influence functions, which estimate the impact of data points on the model by calculating parameter gradients. While these methods reduce computational overhead, they have the following limitations: 1) They only consider the direct impact of the target data itself, ignoring its topological propagation effect in the graph structure, leading to incomplete forgetting; 2) They lack a mechanism to protect the neighborhood structure when removing sensitive edges, causing a significant decrease in model performance; 3) It is difficult to achieve a good balance between privacy protection and model utility.

[0005] The fundamental problem with existing methods lies in their failure to fully consider the interaction mechanism between the topological characteristics of graph data and the parameter updates of neural networks. Specifically, the deletion of edges in a graph will affect the node representations within its hop neighborhood through multiple layers of the network, and existing methods lack specific handling for this propagation effect. Therefore, a new graph data forgetting method is needed that can simultaneously ensure thorough forgetting, computational efficiency, and performance preservation, in order to achieve effective data privacy protection. Summary of the Invention

[0006] The purpose of this invention is to address the problems existing in the prior art by providing a data privacy protection method, system, computer device, and storage medium. This invention constructs a layer-by-layer forgetting operator and an improved contrastive learning framework to collaboratively eliminate the direct association of sensitive edges and their propagation effects in the graph topology. This achieves accurate and efficient graph data forgetting while ensuring the overall performance of the model, thereby realizing effective data privacy protection.

[0007] The technical solution to achieve the objective of this invention is as follows: On one hand, a data privacy protection method is provided, the method comprising the following steps:

[0008] Step 1: Obtain the original graph data G to be protected for privacy from the client;

[0009] Step 2: Initialize the GNN model and pre-train it on the original graph data G;

[0010] Step 3: Set a forgetting target and further iterate and optimize the pre-trained GNN model based on contrastive learning to obtain the optimized GNN model;

[0011] Step 4: For the new graph data to be privacy-preserved transmitted by the client, input it into the optimized GNN model and output the privacy-preserved graph data.

[0012] Furthermore, in step 2, the Adam optimizer is pre-trained on the original graph data G until the model converges.

[0013] Furthermore, step 3 specifically includes:

[0014] Step 3-1: Set the number of training rounds T and determine the set of target edges to be forgotten in the graph data G. In each training round, the target edge set is removed from the graph data to generate updated graph data. ;

[0015] Step 3-2, update the graph data Input the pre-trained GNN model to obtain the basic node embedding Z;

[0016] Step 3-3: Using the layer-by-layer forgetting operator, the basic node embeddings are corrected sequentially from the shallowest to the deepest layers of the GNN model to generate the final embeddings. ;

[0017] Steps 3-4: Construct comparison sample pairs: Construct positive and negative sample pairs based on the deleted target edges;

[0018] Steps 3-5: Construct a joint loss function that includes a forgetting loss function and a performance preservation loss function. The forgetting loss function forces the model to ignore the existence of sensitive edges, i.e., the target edges that need to be forgotten, by maximizing the similarity probability of positive sample pairs. The performance preservation loss function is used to constrain the embedding variation to ensure the local structure and semantic coherence of the unremoved parts.

[0019] Steps 3-6: Based on the comparison sample pairs and the joint loss function, train and optimize the pre-trained GNN model;

[0020] Steps 3-7: Repeat steps 3-2 to 3-6 for iterative training until the preset number of training rounds T is reached or the preset convergence condition is met, and finally the optimized GNN model is output.

[0021] Furthermore, the specific process of step 3-3 includes:

[0022] Define a conditionally activated forgetting operator for each layer of the GNN model. This operator is triggered and performs parameterized transformations only within the local neighborhood of the target-sensitive edge; for the deleted edge... In GNN, the first The layer defines the forgetting operator as a mapping function for conditional activation as follows:

[0023]

[0024] in, For parameterized transformation functions, For the first The learnable weight matrix of the layer, the weight matrix Shared within each floor; Representing an edge In the Layer Skip neighborhood subgraph; For nodes In the Features of the layer For the first Forgetting operator of layers;

[0025] Determine the optimal number of hops in the neighborhood to achieve the best balance between forgetting effect and computational cost;

[0026] From the shallowest to the deepest layers of the GNN model, the corresponding forgetting operator is applied layer by layer to correct the node embeddings in the neighborhood of sensitive edges, gradually decoupling their associations. After corrections at all layers, the final embedding is output. .

[0027] Furthermore, the construction of contrast sample pairs in steps 3-4 specifically involves: positive sample pairs being constructed from the deleted edges. "Invalid edges" that do not exist in the randomly sampled graph data G. The negative sample pairs are composed of the deleted edges. Compared to the "valid edges" retained in graph data G. constitute.

[0028] Furthermore, the joint loss function in steps 3-5 is as follows:

[0029]

[0030] In the formula, For the joint loss function, Forgetting loss function, To preserve the performance loss function, This is the balance coefficient.

[0031] Furthermore, the forgetting loss function Specifically:

[0032]

[0033] In the formula, Edges deleted in corresponding positive sample pairs invalid edge with random sampling The edge representation vector is calculated based on the embedding of the two endpoints. Edges deleted in corresponding negative sample pairs With effective edges The edges represent vectors. The cosine similarity function is used. This is a temperature parameter used to control the sharpness of the similarity distribution.

[0034] Furthermore, the performance preservation loss function Specifically:

[0035]

[0036] In the formula, Indicates mean square error. , These represent the edges that were deleted. Neighboring nodes On the side After deletion, before deletion, in the first Characteristics of the layer.

[0037] On the other hand, a data privacy protection system is provided, the system comprising:

[0038] The first module is used to: obtain the raw graph data G to be protected for privacy from the client;

[0039] The second module is used to initialize the GNN model and pre-train it on the original graph data G.

[0040] The third module is used to: set a forgetting target, and further iteratively train and optimize the pre-trained GNN model based on contrastive learning to obtain an optimized GNN model;

[0041] The fourth module is used to: input the new graph data to be privacy-preserved transmitted by the client into the optimized GNN model, and output the privacy-preserved graph data.

[0042] Compared with the prior art, the significant advantages of this invention are:

[0043] (1) High efficiency and low cost: This invention adopts an approximate forgetting framework and trains only a lightweight layer-by-layer forgetting operator (DEL). Experimental verification shows that on the Cora dataset, the training time of this method (25 minutes) is much lower than the 120 minutes of exact forgetting (RETRAIN), and the computational cost is significantly reduced to about 65.7% of GIF (an approximate forgetting method based on graph influence function), making it suitable for large-scale graph data.

[0044] (2) Thoroughness of Forgetting: Existing methods (such as GNNDELETE (a graph editing-based forgetting method)) only delete the edges themselves, ignoring the neighborhood propagation effect. This invention uses the DEL operator to... - Jump neighborhood ( =2) The precise embedding within the inner edge completely eliminates the propagation effect of sensitive edges. Experimental verification shows that on datasets such as Cora and CS, the forgetting performance index (df_auc) of this invention is improved by 12.3% to 20.1% compared to the baseline GNNDELETE.

[0045] (3) Model performance preservation: Existing methods (such as GNNDELETE (a graph editing-based forgetting method) and GRADIENT_ASCENT (a gradient ascent-based adversarial forgetting method)) cause a significant drop in test set performance (10% to 15%) during forgetting. This invention preserves performance loss ( The negative sample design in contrastive learning maintains the semantic coherence of non-forgotten edges. Experimental results show that the link prediction AUROC (area under the ROC curve) (dt_auc) of this invention on the test set is only 3.2%-4.5% lower than that of retraining (RETRAIN), significantly outperforming other approximation methods.

[0046] (4) Enhanced privacy protection: The improved InfoNCE loss (information noise contrast estimation loss) proposed in this invention pushes the embedding of deleted edges toward the invalid edge distribution. This significantly reduces the feature discrimination of membership inference attacks (MIA), reducing the AUC (area under the ROC curve) of MIA attacks by 8%-14%, effectively reducing the risk of privacy leakage.

[0047] (5) Application value: This invention achieves the best balance between privacy protection and model utility (completeness of forgetting, performance preservation, and computational efficiency). It can be directly applied to scenarios such as erasing sensitive relationships on social networks and privacy compliance of medical knowledge graphs, providing technical support for the implementation of the GDPR (General Data Protection Regulation) "right to be forgotten" in graph data scenarios.

[0048] (6) The present invention is superior to the prior art in terms of efficiency, performance, privacy protection and application value, and can solve the problems of high computational cost, incomplete forgetting and serious degradation of model performance in the existing graph forgetting learning methods.

[0049] The present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0050] Figure 1 This is a flowchart of a data privacy protection method for contrastive learning in one embodiment.

[0051] Figure 2 This is an architecture diagram of the graph forgetting learning algorithm based on contrastive learning according to one embodiment of the present invention. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0053] It should be noted that if the embodiments of the present invention involve descriptions such as "first" and "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include at least one of those features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0054] In one embodiment, combined Figure 1 and Figure 2 This paper presents a data privacy protection method aimed at addressing the problem of ineffective data privacy protection caused by the difficulty in completely removing sensitive relationships in graph neural networks. The method achieves accurate forgetting of sensitive edges through layer-by-layer correction and comparison of constraints. The method specifically includes the following steps:

[0055] Step 1: Obtain the original graph data G to be protected for privacy from the client;

[0056] Here, we obtain the original graph data. ,in For a set of nodes, It is an edge set;

[0057] Step 2: Initialize the GNN model and pre-train it on the original graph data G;

[0058] Preferably, the GNN model uses, but is not limited to, the Graph Attention Network (GAT), because its attention mechanism is better suited to the need for "directed forgetting".

[0059] Preferably, in the original graph data The Adam optimizer is used for pre-training (e.g., 100 epochs) until the model converges, yielding the initial model parameters. This step aims to allow the model to learn the complete structure and features of the graph, serving as a baseline for subsequent forgetting operations.

[0060] Step 3: Further iteratively train and optimize the pre-trained GNN model using a graph forgetting learning algorithm based on contrastive learning to obtain an optimized GNN model; specifically: set a forgetting target, and further iteratively train and optimize the pre-trained GNN model based on contrastive learning to obtain an optimized GNN model.

[0061] Step 4: For the new graph data to be privacy-preserved transmitted by the client, input it into the optimized GNN model and output the privacy-preserved graph data.

[0062] Furthermore, in one embodiment, step 3 specifically includes:

[0063] Step 3-1: Set the number of training rounds T and determine the set of target edges to be forgotten in the graph data G. In each training round, the target edge set is removed from the graph data to generate updated graph data. ;

[0064] Preferably, 5% of the training set edges are randomly selected as the target edge set. ;

[0065] Step 3-2, update the graph data Input the pre-trained GNN model to obtain the basic node embedding Z;

[0066] Step 3-3: Using the layer-by-layer forgetting operator, the basic node embeddings are corrected sequentially from the shallowest to the deepest layers of the GNN model to generate the final embeddings. ;

[0067] Steps 3-4: Construct comparison sample pairs: Construct positive and negative sample pairs based on the deleted target edges;

[0068] Here, in order to force the model to "forget" sensitive edges in the feature space, this invention introduces a contrastive learning mechanism.

[0069] Steps 3-5: Construct a joint loss function that includes a forgetting loss function and a performance preservation loss function. The forgetting loss function forces the model to ignore the existence of sensitive edges, i.e., the target edges that need to be forgotten, by maximizing the similarity probability of positive sample pairs. The performance preservation loss function is used to constrain the embedding variation to ensure the local structure and semantic coherence of the unremoved parts.

[0070] Steps 3-6: Based on the comparison sample pairs and joint loss function, the pre-trained GNN model is trained and optimized through backpropagation;

[0071] Steps 3-7: Repeat steps 3-2 to 3-6 for iterative training until the preset number of training rounds T is reached or the preset convergence condition is met. The final output is the optimized GNN model, which effectively removes the influence of the target data while preserving prediction performance on the undeleted data. Here, the total loss is used... The parameters of the GNN model and the parameters of the layer-by-layer forgetting operator (DEL) are updated synchronously through the backpropagation algorithm. The Adam optimizer (e.g., learning rate 1e-3) is used to iterate the training for a certain number of rounds (e.g., 200 epochs) until convergence.

[0072] Preferably, in some embodiments, step 3-3 specifically includes:

[0073] Define a conditionally activated forgetting operator for each layer of the GNN model. This operator is triggered and performs parameterized transformations only within the local neighborhood of the target-sensitive edge; for the deleted edge... In GNN, the first The layer defines the forgetting operator as a mapping function for conditional activation as follows:

[0074]

[0075] The first formula indicates when the node When triggered, the operator does not operate on nodes outside the neighborhood.

[0076] in, For parameterized transformation functions, For the first The learnable weight matrix of the layer, the weight matrix Shared within each floor; Representing an edge In the Layer Skip neighborhood subgraph; For nodes In the Features of the layer For the first Forgetting operator of layers;

[0077] Determine the optimal number of hops in the neighborhood to achieve the best balance between forgetting effect and computational cost;

[0078] From the shallowest to the deepest layers of the GNN model, the corresponding forgetting operator is applied layer by layer to correct the node embeddings in the neighborhood of sensitive edges, gradually decoupling their associations. After corrections at all layers, the final embedding is output. .

[0079] The motivation behind the layer-by-layer forgetting operator (DEL operator) is that GNNs update node representations by aggregating neighborhood information, and deleting an edge will affect multi-hop neighborhoods. The DEL operator decouples the influence of sensitive edges layer by layer, focusing on local structure at the shallow level and severing higher-order semantic connections at the deep level. Preferably, setting the neighborhood hop count k=2 achieves the best balance between thoroughness of forgetting and computational cost.

[0080] Preferably, in some embodiments, constructing the comparison sample pairs in step 3-4 specifically involves: the positive sample pairs being constructed by the deleted edges. "Invalid edges" that do not exist in the randomly sampled graph data G. Composition, here , It belongs to an edge that does not exist at all; negative sample pairs are formed by the deleted edges. Compared to the "valid edges" retained in graph data G. constitute, .

[0081] Here, the purpose of positive sample pairs is to make the model believe that the existence of deleted edges is the same as that of edges that did not exist in the graph in the first place, i.e., "invalidation". The purpose of negative sample pairs is to distinguish sensitive edges from normal edges and prevent the model from forgetting the semantics of valid edges as well (to prevent excessive forgetting).

[0082] Furthermore, in one embodiment, the joint loss function in steps 3-5 is specifically:

[0083]

[0084] In the formula, For the joint loss function, Forgetting loss function, To preserve the performance loss function, This is the balance coefficient.

[0085] Preferably, when At that time, the model achieved optimal performance in terms of forgetting effect, performance retention, and resistance to attack.

[0086] Here, the forgetting loss function The improved InfoNCE contrastive loss function is as follows:

[0087]

[0088] In the formula, Edges deleted in corresponding positive sample pairs invalid edge with random sampling The edge representation vector is calculated based on the embedding of the two endpoints. Edges deleted in corresponding negative sample pairs With effective edges The edges represent vectors. The cosine similarity function is used. This is a temperature parameter used to control the sharpness of the similarity distribution.

[0089] Preferably, when When the value is 0.1, the model achieves its best performance in terms of forgetting effect (df_auc).

[0090] Here, the performance preservation loss function Specifically:

[0091]

[0092] In the formula, Indicates mean square error. , These represent the edges that were deleted. Neighboring nodes On the side After deletion, before deletion, in the first Characteristics of the layer.

[0093] In one embodiment, a data privacy protection system is provided, the system comprising:

[0094] The first module is used to: obtain the raw graph data G to be protected for privacy from the client;

[0095] The second module is used to initialize the GNN model and pre-train it on the original graph data G.

[0096] The third module is used to: set a forgetting target, and further iteratively train and optimize the pre-trained GNN model based on contrastive learning to obtain an optimized GNN model;

[0097] The fourth module is used to: input the new graph data to be privacy-preserved transmitted by the client into the optimized GNN model, and output the privacy-preserved graph data.

[0098] For specific limitations regarding the data privacy protection system, please refer to the limitations on data privacy protection methods mentioned above, which will not be repeated here. Each module in the aforementioned data privacy protection system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0099] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements:

[0100] Step 1: Obtain the original graph data G to be protected for privacy from the client;

[0101] Step 2: Initialize the GNN model and pre-train it on the original graph data G;

[0102] Step 3: Set a forgetting target and further iterate and optimize the pre-trained GNN model based on contrastive learning to obtain the optimized GNN model;

[0103] Step 4: For the new graph data to be privacy-preserved transmitted by the client, input it into the optimized GNN model and output the privacy-preserved graph data.

[0104] For specific limitations on each step, please refer to the limitations on data privacy protection methods mentioned above, which will not be repeated here.

[0105] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program being implemented when executed by a processor:

[0106] Step 1: Obtain the original graph data G to be protected for privacy from the client;

[0107] Step 2: Initialize the GNN model and pre-train it on the original graph data G;

[0108] Step 3: Set a forgetting target and further iterate and optimize the pre-trained GNN model based on contrastive learning to obtain the optimized GNN model;

[0109] Step 4: For the new graph data to be privacy-preserved transmitted by the client, input it into the optimized GNN model and output the privacy-preserved graph data.

[0110] For specific limitations on each step, please refer to the limitations on data privacy protection methods mentioned above, which will not be repeated here.

[0111] As a specific example, the graph forgetting learning algorithm based on contrastive learning proposed in this invention will be further verified and explained in detail.

[0112] Scenario and Data Preparation: This embodiment uses the Cora citation network dataset to simulate a social network scenario. The hardware environment consists of a 3.6GHz CPU and 12GB of GPU memory; the software environment uses Python 3.8, PyTorch 1.12.1, DGL 0.9.1, and CUDA 11.6; the dataset used is the Cora dataset, containing 19,793 nodes and 126,842 edges; the forgetting objective is set as randomly selecting 5% of the edges from the training set as the "sensitive relations" to be erased, i.e., the target edge set. .

[0113] Core steps and parameter settings:

[0114] Step 1, Pre-training: Using the GAT architecture, in the context of... Pre-training was performed on the complete Cora graph with a learning rate of 1e-3 for 100 epochs.

[0115] Step 2, Layer-by-layer correction: Using the DEL operator. Based on parameter sensitivity experiments, the neighborhood hop count... Suppose we have 2. When k=2, we achieve the optimal balance between forgetting effect, model performance, and computational efficiency.

[0116] Step 4, Forgetting Training: Total Loss Based on parameter sensitivity experiments, the equilibrium coefficient... Set the value to 0.5. Use the Adam optimizer with a learning rate of 1e-3, train for 200 epochs, and set an early stopping mechanism.

[0117] Results and Analysis:

[0118] The experimental results of the method of this invention on the Cora dataset (GAT architecture, 5% edge deletion) are shown in Table 1, demonstrating its superiority.

[0119] Table 1 Comparison of Experimental Results

[0120]

[0121] As can be seen from Table 1:

[0122] Model performance (dt_auc): The method of this invention achieves a performance (dt_auc) of 0.9203 on the test set. This is significantly higher than GNNDELETE (0.8004), while only 4.5% lower than the "gold standard" RETRAIN (0.9630), achieving efficient performance preservation.

[0123] Forgetting effect (df_auc): The forgetting effect metric (df_auc) of this invention is 12.3% higher than the baseline GNNDELETE. This demonstrates that the combination of the DEL operator and contrastive learning can more thoroughly erase the neighborhood propagation effect of sensitive edges.

[0124] Computational efficiency (time cost): The time cost of the method in this invention is only 25 minutes. This is far less than the 120 minutes required for RETRAIN, saving approximately 80% of the time, and is also lower than GIF and GNNDELETE, demonstrating excellent computational efficiency.

[0125] Privacy Protection (mia_auc): This invention reduces the AUC (mia_auc) of member inference attacks by 8%-14%. This is attributed to the improved InfoNCE loss of this invention, which pushes the embeddings of deleted edges towards the invalid edge distribution, reducing the attacker's feature discriminative power.

[0126] In summary, the solution of this invention achieves the best balance between computational efficiency, model performance, thoroughness of forgetting, and privacy protection in the application of sensitive relationship erasure on social networks.

[0127] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention without departing from its spirit and scope should be included within the protection scope of the present invention.

Claims

1. A data privacy protection method, characterized in that, The method includes the following steps: Step 1: Obtain the original graph data G to be protected for privacy from the client; Step 2: Initialize the GNN model and pre-train it on the original graph data G; Step 3: Set a forgetting target and further iterate and optimize the pre-trained GNN model based on contrastive learning to obtain the optimized GNN model; Step 4: For the new graph data to be privacy-preserved transmitted by the client, input it into the optimized GNN model and output the privacy-preserved graph data; Step 3 specifically includes: Step 3-1: Set the number of training rounds T and determine the set of target edges to be forgotten in the graph data G. In each training round, the target edge set is removed from the graph data to generate updated graph data. ; Step 3-2, update the graph data Input the pre-trained GNN model to obtain the basic node embedding Z; Step 3-3: Using the layer-by-layer forgetting operator, the basic node embeddings are corrected sequentially from the shallowest to the deepest layers of the GNN model to generate the final embeddings. ; Steps 3-4: Construct comparison sample pairs: Construct positive and negative sample pairs based on the deleted target edges; Steps 3-5: Construct a joint loss function that includes a forgetting loss function and a performance preservation loss function. The forgetting loss function forces the model to ignore the existence of sensitive edges, i.e., the target edges that need to be forgotten, by maximizing the similarity probability of positive sample pairs. The performance preservation loss function is used to constrain the embedding variation to ensure the local structure and semantic coherence of the unremoved parts. Steps 3-6: Based on the comparison sample pairs and the joint loss function, train and optimize the pre-trained GNN model; Steps 3-7: Repeat steps 3-2 to 3-6 for iterative training until the preset number of training rounds T is reached or the preset convergence condition is met, and finally output the optimized GNN model. The specific process of step 3-3 includes: Define a conditionally activated forgetting operator for each layer of the GNN model. This operator is triggered only in the local neighborhood of the target-sensitive edge and performs a parameterized transformation; for the deleted edge... In GNN, the first The layer defines the forgetting operator as a mapping function for conditional activation as follows: ; in, For parameterized transformation functions, For the first The learnable weight matrix of the layer, the weight matrix Shared within each floor. Indicates the first The dimension of the layer's weight matrix; Representing an edge In the Layer Jump neighborhood subgraph; For nodes In the Features of the layer For the first Forgetting operator for layers; Determine the optimal number of hops in the neighborhood to achieve the best balance between forgetting effect and computational cost; From the shallowest to the deepest layers of the GNN model, the corresponding forgetting operator is applied layer by layer to correct the node embeddings in the neighborhood of sensitive edges, gradually decoupling their associations. After corrections at all layers, the final embedding is output. .

2. The data privacy protection method according to claim 1, characterized in that, In step 2, the Adam optimizer is used to pre-train the model on the original graph data G until the model converges.

3. The data privacy protection method according to claim 1, characterized in that, The construction of contrast sample pairs in steps 3-4 specifically involves: positive sample pairs being constructed using the deleted edges. Invalid edges that do not exist in the randomly sampled graph data G constitute, Negative samples are formed by the deleted edges. The valid edges retained in the graph data G constitute, .

4. The data privacy protection method according to claim 3, characterized in that, The joint loss function in steps 3-5 is as follows: ; In the formula, For the joint loss function, Forgetting loss function, To preserve the performance loss function, This is the balance coefficient.

5. The data privacy protection method according to claim 4, characterized in that, The balance coefficient .

6. The data privacy protection method according to claim 4, characterized in that, The forgetting loss function Specifically: ; In the formula, Edges deleted in corresponding positive sample pairs invalid edge with random sampling The edge representation vector is calculated based on the embedding of the two endpoints. The deleted edge in the corresponding negative sample pair With effective edges The edges represent vectors. The cosine similarity function is used. This is a temperature parameter used to control the sharpness of the similarity distribution.

7. The data privacy protection method according to claim 6, characterized in that, The performance retention loss function Specifically: ; In the formula, This represents the mean square error. , These represent the edges that were deleted. Neighboring nodes On the side After deletion, before deletion, in the first Characteristics of the layer.

8. A data privacy protection system based on the method of any one of claims 1 to 7, characterized in that, The system includes: The first module is used to: obtain the raw graph data G to be protected for privacy from the client; The second module is used to initialize the GNN model and pre-train it on the original graph data G. The third module is used to: set a forgetting target, and further iteratively train and optimize the pre-trained GNN model based on contrastive learning to obtain an optimized GNN model; The fourth module is used to: input the new graph data to be privacy-preserved transmitted by the client into the optimized GNN model, and output the privacy-preserved graph data.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Q network control method and device and readable storage medium

    CN115906998A

  • Privacy protection vertical federal learning method and system based on gradient boosting decision table

    CN116502729A