Privacy protection method and device for discrete time dynamic graph and electronic equipment

Through the privacy protection method for discrete time dynamic graphs, using technologies such as node sampling, attention weight calculation and LSTM neural networks, the privacy leakage problems caused by uneven distribution of privacy and non-privacy edges in the dynamic graphs and structural mutations are solved, and strong privacy protection and data availability are achieved.

CN119808135AActive Publication Date: 2025-04-11BEIHANG UNIV

Patent Information

Application Number
CN202411612900.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-04-11
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

When handling the privacy protection of dynamic graphs, the prior art ignores the problem of uneven distribution of privacy edges and non-privacy edges, and fails to effectively deal with the privacy leakage risk of dynamic graphs when structural changes are changed.

Method used

A privacy protection method for discrete time dynamic graphs is proposed. Through node sampling, attention weight calculation, LSTM neural network characterization and fusion, generator multi-layer perceptron calculation results, and through gradient cropping and noise adjustment, privacy consumption is dynamically adjusted to ensure the intensity of privacy protection and data availability.

Benefits of technology

It effectively alleviates the problem of privacy-availability difficult to balance due to uneven distribution of privacy and non-private information, reduces the risk of privacy leakage caused by mutation in dynamic graph structure, improves the privacy protection intensity of discrete time dynamic graph data release, and ensures data availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808135A_ABST
    Figure CN119808135A_ABST
Patent Text Reader

Abstract

The invention relates to a discrete time dynamic graph-oriented privacy protection method and device and electronic equipment, and the method comprises the steps: carrying out the node sampling of an original discrete time dynamic graph, calculating the attention weight of a neighbor node of a collected node, carrying out the splicing, inputting the structure representation of an obtained noisy discrete time dynamic sub-graph into an LSTM neural network, and carrying out the splicing of the noisy discrete time dynamic sub-graph. And obtaining a time and structure fusion representation of the noisy discrete time dynamic sub-graph, and inputting the time and structure fusion representation into the generator multilayer perceptron to obtain a synthetic discrete time dynamic graph at the next moment. Through the method, the problem that the privacy-availability of the discrete time dynamic graph is difficult to continuously balance due to non-uniform distribution of privacy and non-privacy information can be effectively relieved. Meanwhile, through dynamic noise adjustment, the problem of privacy leakage possibly caused by sudden change of the dynamic graph structure at a certain moment is solved, the privacy protection intensity of dynamic graph data release at discrete time is further improved, and the availability of dynamic graph data at other moments is effectively guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer science and technology, and in particular to a privacy protection method, device and electronic device for discrete-time dynamic graphs. Background Art

[0002] In the real world, there is a widespread risk of privacy leakage when publishing and sharing graph data (such as social network graph data, trajectory network graph data, etc.). Privacy-Preserving Graph Publishing (PPGP) provides some corresponding privacy protection solutions, but it is mainly used for static graphs. However, most graph data in the real world are dynamically updated, which faces a higher risk of privacy leakage than static graphs.

[0003] Some researchers have begun to study the privacy release of dynamic graphs, but these techniques still have two flaws. First, they ignore the uneven distribution of private and non-private edges. We have noticed that in some real-world networks, such as social networks, the same user usually has more non-private information and less private information. Directly applying differential privacy methods may lead to insufficient protection of private information, while also introducing excessive noise to non-private information, which may undermine the continuous balance between privacy and data availability during the evolution of dynamic graphs. Second, they ignore the structural mutations that occur during the continuous evolution of dynamic graphs. Over time, the structure of dynamic graphs may suddenly change significantly, such as a sudden increase in node size, a sudden decrease in the number of edges between nodes, etc. Correspondingly, these structural mutations reflect the semantic behavior of users in the real world and reveal the privacy characteristics of user behavior trends, which may lead to privacy leakage. Summary of the invention

[0004] In view of this, the present application proposes a privacy protection method for discrete-time dynamic graphs to solve the problems reflected in the above-mentioned background technology.

[0005] According to one aspect of the present application, a privacy protection method for discrete-time dynamic graphs is provided, comprising:

[0006] Obtaining input data, wherein the input data includes an original discrete-time dynamic graph, a preset batch size, a discrete-time dynamic graph at a next moment, a preset gradient clipping constraint value, and a preset privacy budget;

[0007] Node sampling is performed on the original discrete-time dynamic graph, attention weights of neighboring nodes of the collected nodes are calculated, the attention weights are spliced, and the spliced ​​noisy discrete-time dynamic subgraph structural representation is input into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph;

[0008] splicing the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments, and inputting the spliced ​​result into the generator multi-layer perceptron to calculate the mutual information result;

[0009] Inputting the time and structure fusion representation of the noisy discrete-time dynamic subgraph into the generator multi-layer perceptron to obtain a synthetic discrete-time dynamic graph at the next moment;

[0010] Performing gradient discrimination on the synthetic discrete-time dynamic graph at the next moment according to the discrete-time dynamic graph at the next moment to obtain gradient information;

[0011] Clipping the gradient information according to the preset gradient clipping constraint value to obtain a first gradient clipping result and a second gradient clipping result;

[0012] Inputting Gaussian noise, and adjusting the variance of the Gaussian noise according to a preset noise adjustment formula according to the first gradient clipping result and the mutual information result;

[0013] Calculate the privacy consumption according to the adjusted variance of the Gaussian noise, the preset order of the Rayli differential privacy, the second gradient clipping result and the preset batch size, and determine the consumption of the preset privacy budget according to the privacy consumption;

[0014] When the preset privacy budget is consumed, the synthetic discrete-time dynamic graph of the next moment is output.

[0015] As an optional implementation scheme of the present application, the input data also includes: a preset node subset size and noise that obeys a standard normal distribution; the node sampling of the original discrete-time dynamic graph, calculating the attention weights of the neighboring nodes of the collected nodes, splicing the attention weights, and inputting the spliced ​​noisy discrete-time dynamic subgraph structural representation into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph, including:

[0016] Selecting a node from the original discrete-time dynamic graph and using it as an element of the initialization subgraph node set;

[0017] Generate a BFS tree with the element as the root according to the preset node subset size;

[0018] Selecting nodes from the BFS tree, sampling the nodes according to a preset transition probability, expanding the number of elements of the initialized subgraph node set to a preset node subset size, and obtaining a discrete-time dynamic subgraph;

[0019] According to the noise that obeys the standard normal distribution, the attention weights of the neighboring nodes of the nodes in the discrete-time dynamic subgraph are calculated, the attention weights are spliced, and the spliced ​​noisy discrete-time dynamic subgraph structural representation is input into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph.

[0020] As an optional implementation scheme of the present application, the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments are spliced, and the spliced ​​result is input into the generator multi-layer perceptron to calculate the mutual information result, including:

[0021] Traversing historical moments, and according to the historical moments, splicing the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments to obtain the time and structure fusion long representation of the noisy discrete-time dynamic subgraphs;

[0022] The time and structure fusion long representation of the noisy discrete-time dynamic subgraph is input into the generator multi-layer perceptron, and the mutual information results between different moments in the time series are generated according to the preset calculation mutual information result inequality.

[0023] As an optional implementation scheme of the present application, Gaussian noise is input, and the variance of the Gaussian noise is adjusted according to a preset noise adjustment formula according to the first gradient clipping result and the mutual information result, including:

[0024] Preset noise attenuation rate;

[0025] When the mutual information result is greater than a preset threshold, adjusting the variance of the Gaussian noise according to the noise attenuation rate;

[0026] When the mutual information result is less than or equal to a preset threshold, the variance of the Gaussian noise is maintained.

[0027] As an optional implementation scheme of the present application, when the mutual information result exceeds a preset threshold, after adjusting the variance of the Gaussian noise according to the noise attenuation rate, the method further includes:

[0028] A generator noisy gradient is formed according to the adjusted variance of the Gaussian noise.

[0029] As an optional implementation scheme of the present application, the privacy consumption is calculated according to the adjusted variance of the Gaussian noise, the preset order of the Ruili differential privacy, the second gradient clipping result and the preset batch size, and the consumption of the preset privacy budget is determined according to the privacy consumption, including:

[0030] When the order of the preset Ruili differential privacy is greater than the preset order threshold, the privacy consumption is calculated by using a first privacy consumption formula according to the variance of the Gaussian noise, the second gradient clipping result and the preset batch size;

[0031] When the order of the preset Ruili differential privacy is less than or equal to the preset order threshold, the privacy consumption is calculated by a second privacy consumption formula according to the variance of the Gaussian noise, the second gradient clipping result and the preset batch size;

[0032] The remaining privacy budget after the privacy consumption in the current round is calculated according to the preset privacy budget.

[0033] As an optional implementation scheme of the present application, after calculating the remaining privacy budget after the privacy consumption in the current round according to the preset privacy budget, it also includes:

[0034] When the privacy budget has not been consumed or the current round is less than a preset training number threshold, the generator noisy gradient is input into the LSTM neural network.

[0035] As an optional implementation scheme of the present application, outputting the synthetic discrete-time dynamic graph at the next moment also includes:

[0036] When the current round is equal to the training times threshold, the synthetic discrete-time dynamic graph of the next moment is output.

[0037] The present application also provides a privacy protection device for discrete-time dynamic graphs, including:

[0038] An input data acquisition module is used to acquire input data, wherein the input data includes an original discrete-time dynamic graph, a preset batch size, a discrete-time dynamic graph at the next moment, a preset gradient clipping constraint value, and a preset privacy budget;

[0039] A node sampling module, used for performing node sampling on the original discrete-time dynamic graph;

[0040] A fusion representation module is used to calculate the attention weights of the neighboring nodes of the collected nodes and concatenate the attention weights; the concatenated noisy discrete-time dynamic subgraph structural representation is input into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph;

[0041] A splicing and fusion representation module is used to splice the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments, and input the splicing result into the generator multi-layer perceptron to calculate the mutual information result;

[0042] A discrete dynamic graph generation module is used to input the time and structure fusion representation of the noisy discrete time dynamic subgraph into the generator multi-layer perceptron to obtain a synthetic discrete time dynamic graph at the next moment;

[0043] A gradient discrimination module, used for performing gradient discrimination on the synthetic discrete-time dynamic graph at the next moment according to the discrete-time dynamic graph at the next moment to obtain gradient information;

[0044] A gradient clipping module, used to clip the gradient information according to the preset gradient clipping constraint value to obtain a first gradient clipping result and a second gradient clipping result;

[0045] A variance adjustment module, used for inputting Gaussian noise, and adjusting the variance of the Gaussian noise according to a preset noise adjustment formula according to the first gradient clipping result and the mutual information result;

[0046] A privacy consumption calculation module, used to calculate the privacy consumption according to the adjusted variance of the Gaussian noise, the preset order of the Rayli differential privacy, the second gradient clipping result and the preset batch size, and determine the consumption of the preset privacy budget according to the privacy consumption;

[0047] The judgment module is used to output the synthetic discrete-time dynamic graph at the next moment when the preset privacy budget is consumed.

[0048] The present application also provides an electronic device, including:

[0049] processor;

[0050] a memory for storing processor-executable instructions;

[0051] Wherein, the processor is configured to implement the above-mentioned privacy protection method for discrete-time dynamic graphs when executing the executable instructions.

[0052] Beneficial effects of this application:

[0053] This application can effectively alleviate the problem of the privacy-availability balance of discrete-time dynamic graphs caused by the uneven distribution of private and non-private information. At the same time, through dynamic noise adjustment, the privacy leakage problem caused by the sudden change of the dynamic graph structure at a certain moment is solved, and the privacy protection strength of the discrete-time dynamic graph data release is further improved, and the availability of dynamic graph data at other times is effectively guaranteed.

[0054] Other features and aspects of the present application will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the present application and, together with the description, serve to explain the principles of the present application.

[0056] Figure 1 A flowchart showing a privacy protection method for discrete-time dynamic graphs according to an embodiment of the present application;

[0057] Figure 2 A block diagram of a privacy protection device for discrete-time dynamic graphs according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0058] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0059] Among them, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application or simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0060] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0061] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0062] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.

[0063] Dynamic graphs can be divided into discrete-time dynamic graphs and continuous-time dynamic graphs according to the different ways of time evolution. Continuous-time dynamic graphs need to record every change action of the graph (such as the addition and deletion of edges or nodes), which has high computational complexity and is difficult to implement. Discrete-time dynamic graphs sample and record graph changes at certain time intervals (also called graph snapshots), which have lower computational complexity and are more common in practical applications. Therefore, this application mainly solves the problem of privacy release of discrete-time dynamic graphs.

[0064] Many researchers have used graph neural network (GNN) models to learn the features of discrete-time dynamic graphs. These methods are mainly divided into: matrix decomposition-based, random walk-based, and deep learning-based. Matrix decomposition-based methods usually assume that all relationships are linear, which may not be able to capture more complex nonlinear patterns. Random walk-based methods have low computational efficiency for large graphs, and the walk process has a certain degree of randomness, which may lead to poor feature learning effects. Deep learning-based methods can capture complex nonlinear relationships in the latent space, and have stronger scalability and parallelization capabilities for large graphs, and have achieved excellent results in practical applications. Therefore, this application mainly solves the privacy release problem of discrete-time dynamic graphs based on a deep learning architecture.

[0065] In order to protect the privacy of graph data, many researchers have conducted related research, which mainly includes three types of methods: anonymization methods, differential privacy (DP) methods, and privacy computing methods (such as homomorphic encryption or multi-party computing). Anonymization methods usually lack strict privacy guarantees and are vulnerable to attackers with extensive knowledge. Differential privacy (DP) methods can provide mathematical privacy guarantees, which means that even if the attacker has background knowledge, he cannot obtain more information about the user. Privacy computing methods can provide stronger privacy protection, but at the cost of greatly reduced data availability, which makes them unsuitable for scenarios where graph data is published and shared. Therefore, this application mainly combines deep learning architecture and differential privacy (DP) methods to solve the problem of privacy publication of discrete-time dynamic graphs.

[0066] Common differential privacy methods include (ε,δ)-DP and Ruili differential privacy ((α,ε)-RDP), among which (ε,δ)-DP is the most common differential privacy, but it requires a very fine privacy budget, which will be accumulated in multiple queries, which may affect the availability of data. Ruili differential privacy ((α,ε)-RDP) allows more fine-grained control of the privacy budget allocation for different queries, thereby improving data availability and preventing the introduction of more noise. Therefore, this application mainly combines deep learning architecture and Ruili differential privacy ((α,ε)-RDP) to solve the privacy publication problem of discrete-time dynamic graphs.

[0067] Example 1

[0068] Figure 1 FIG. 1 is a flowchart of a privacy protection method for discrete-time dynamic graphs according to an embodiment of the present application. Figure 1 As shown, the flow chart includes:

[0069] S100, obtaining input data, where the input data includes an original discrete-time dynamic graph, a preset batch size, a discrete-time dynamic graph at a next moment, a preset gradient clipping constraint value, and a preset privacy budget;

[0070] In this embodiment, the original discrete-time dynamic graph is trained to finally output the synthetic discrete-time dynamic graph at the next moment. The input data for training includes the original discrete-time dynamic graph that needs to be privacy-protected, the specified batch size B, and the real discrete-time dynamic graph at the next moment. Specify the gradient clipping constraint value T and specify the privacy budget ε.

[0071] S200, sampling nodes of the original discrete-time dynamic graph, calculating the attention weights of neighboring nodes of the collected nodes, splicing the attention weights, and inputting the spliced ​​noisy discrete-time dynamic subgraph structural representation into an LSTM neural network to obtain a time and structure fusion representation of the noisy discrete-time dynamic subgraph;

[0072] Given a discrete-time dynamic graph G T ={G1,…,G t}, for the original discrete-time dynamic graph G T ={G1,…,G t} Perform node sampling and grow nodes according to the sampled nodes to form a discrete-time dynamic subgraph For any given node in the discrete-time dynamic subgraph, the generator self-attention mechanism is used to calculate the embedding of the neighbor nodes of the given node based on the structural self-attention layer to calculate the attention weight, and then form the representation of the given node. The representations of all given nodes are spliced ​​to form a noisy discrete-time dynamic subgraph structural representation.

[0073] The noisy discrete-time dynamic subgraph structural representation is input into the LSTM layer to capture the pattern of the dynamic graph evolving over time, forming a time-structure fusion representation of the noisy discrete-time dynamic subgraph.

[0074] S300, splicing the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments, and inputting the spliced ​​result into a generator multi-layer perceptron to calculate the mutual information result;

[0075] Traverse all historical moments and represent the time-structure fusion of the noisy discrete-time dynamic subgraphs at two different moments and Splicing is performed to obtain a time-structure fusion long representation of a noisy discrete-time dynamic subgraph

[0076] enter The mutual information results between graphs at different times in the sequence are formed through the MLP layer

[0077] S400, inputting the time and structure fusion representation of the noisy discrete-time dynamic subgraph into the generator multi-layer perceptron to obtain a synthetic discrete-time dynamic graph at the next moment;

[0078] Time-structure fusion representation of noisy discrete-time dynamic subgraphs Input to the MLP layer to obtain the synthetic discrete-time dynamic graph of the next moment

[0079] S500, performing gradient discrimination on the synthetic discrete-time dynamic graph at the next moment according to the discrete-time dynamic graph at the next moment to obtain gradient information;

[0080] Input the next moment of synthetic discrete-time dynamic graph and the real discrete time dynamic diagram of the next moment Through the MLP layer, the gradient information Θ is fed back G .

[0081] S600, clipping the gradient information according to the preset gradient clipping constraint value to obtain a first gradient clipping result and a second gradient clipping result;

[0082] Input gradient information Θ G And the gradient clipping constraint value T, forming a clipped gradient Θ' that is no greater than T G And the L2-sensitivity Δ2f of the clipped gradient. The first gradient clipping result is the clipped gradient Θ' not greater than T G , the second gradient clipping result is the L2-sensitivity Δ2f of the clipped gradient.

[0083] S700, inputting Gaussian noise, and adjusting the variance of the Gaussian noise according to a preset noise adjustment formula according to the first gradient clipping result and the mutual information result;

[0084] Input clipped gradient Θ' G , and add a mean of 0 and a variance of σ e Gaussian noise According to the mutual information results Dynamically adjust the variance σ of Gaussian noisee .

[0085] S800, calculating the privacy consumption according to the adjusted variance of the Gaussian noise, the preset order of the Rayli differential privacy, the second gradient clipping result and the preset batch size, and determining the consumption of the preset privacy budget according to the privacy consumption;

[0086] Adjusted Gaussian noise variance σ' e The noise variance of the current training round is combined with the order of Rayleigh Differential Privacy (RDP), the gradient function L2-sensitivity Δ2f and the batch size B to calculate the privacy consumption, and finally calculate the remaining privacy budget of the current round.

[0087] S900, when the preset privacy budget is consumed, output the synthetic discrete-time dynamic graph at the next moment.

[0088] When the privacy budget If it is exhausted, the training ends and the synthetic discrete-time dynamic graph of the next moment is output.

[0089] As an optional implementation scheme of the present application, the input data also includes: a preset node subset size and noise that obeys a standard normal distribution; the node sampling of the original discrete-time dynamic graph, the calculation of the attention weights of the neighboring nodes of the collected nodes, the splicing of the attention weights, and the input of the spliced ​​noisy discrete-time dynamic subgraph structural representation into the LSTM neural network to obtain a noisy discrete-time dynamic subgraph time and structural fusion representation, including: selecting a node from the original discrete-time dynamic graph and using it as an element of the initialization subgraph node set; generating a BFS tree with the element as the root according to the preset node subset size; selecting a node from the BFS tree, sampling the node according to a preset transfer probability, and expanding the number of elements of the initialization subgraph node set to the preset node subset size to obtain a discrete-time dynamic subgraph; calculating the attention weights of the neighboring nodes of the nodes in the discrete-time dynamic subgraph according to the noise that obeys a standard normal distribution, splicing the attention weights, and inputting the spliced ​​noisy discrete-time dynamic subgraph structural representation into the LSTM neural network to obtain a noisy discrete-time dynamic subgraph time and structural fusion representation.

[0090] Given an original discrete-time dynamic graph G T ={G1,…,G t}, randomly select a node v from the original discrete-time dynamic graph, initialize the subgraph node set V' = {v}, and calculate the node subset size according to the specified Generate a BFS tree with v as the root for Randomly select a node v i , according to the transition probability p(v j |v i ) performs node sampling to expand the subgraph. Among them, the transition probability: p(v j |v i ) is calculated as:

[0091]

[0092] where w j,i ∈{0.5w,w,2w} is an edge (v j ,v i ) weight. When v j and v i When it is a privacy node, w j,i =0.5w. If v j or v i is a privacy node, then w j,i =w, otherwise, if these two are non-private nodes, w j,i = 2w; the temperature parameter τ<1 is used to increase the probability of private nodes being sampled. Repeat the growth of nodes in the subgraph node set until the number of nodes in V' is equal to Forming discrete-time dynamic subgraphs

[0093] Input Discrete-time Dynamic Subgraph and a set of noises Γ={γ1,…,γ t For any given node v, based on the structured self-attention layer, the attention weight is calculated according to the embedding of its neighboring nodes in, f act represents the nonlinear activation function, is the edge weight between nodes u and v, W s represents the shared weight, a represents the weight vector of the attention function, and || represents the connection operation. This forms the representation of node v: in Represents the set of neighbors of node v. Then, by calculating and concatenating multiple attention heads in each self-attention layer, an output representation that can capture the structural properties of the subgraph is constructed. Where hd represents the number of attention heads. Forming a noisy discrete-time dynamic subgraph structure representation

[0094] Representing the noisy discrete-time dynamic subgraph structure Input into the LSTM layer to capture the pattern of dynamic graph evolution over time and form a time-structure fusion representation of noisy discrete-time dynamic subgraphs

[0095] For example, given an actual social network discrete time dynamic graph, the number of nodes is 1899, the number of edges is 59835, and there are 10 snapshots of the dynamic graph at a certain time; the sliding window size is w = 5; the batch size is B = 64; the real dynamic graph at the sixth time (i.e. the next time) The number of nodes that each subgraph needs to contain is 80; the gradient clipping constraint value T = 1; a set of noises Γ = {γ1,…,γ t}, the mean is 0, the variance is 1; the initial Epoch of the model training times is 200; the order of Rayleigh Differential Privacy (RDP) is α=2, and the specified privacy budget ε=1.

[0096] According to the number of nodes that each subgraph needs to contain = 80 and the number of sampled subgraphs = 20, sampling is performed to obtain a discrete-time dynamic subgraph.

[0097] Use a sliding window size of 5 and input the discrete time dynamic subgraph of 5 historical moments And a set of noises Γ={γ1,…,γ5} that follow a standard normal distribution, select the number of attention heads hd=8, and construct an output representation that can capture the structural attributes of the subgraph Finally, the noisy discrete-time dynamic subgraph structure representation of these five moments is formed

[0098] The noisy discrete-time dynamic subgraph structural representations at 5 moments are input to form the time-structure fusion representations of the noisy discrete-time dynamic subgraphs at 5 historical moments and the 6th moment.

[0099] As an optional implementation scheme of the present application, the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments are spliced, and the spliced ​​results are input into the generator multi-layer perceptron to calculate the mutual information results, including: traversing historical moments, and according to the historical moments, splicing the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments to obtain a long representation of the time and structure fusion of the noisy discrete-time dynamic subgraph; inputting the long representation of the time and structure fusion of the noisy discrete-time dynamic subgraph into the generator multi-layer perceptron, and generating the mutual information results between different moments in the time series according to a preset inequality for calculating the mutual information results.

[0100] Traverse all historical moments and represent the time-structure fusion of the noisy discrete-time dynamic subgraphs at two different moments and Splicing is performed to obtain a time-structure fusion long representation of a noisy discrete-time dynamic subgraph

[0101] enter The mutual information calculation results between graphs at different times in the time series are formed through the MLP layer The calculation method is as follows: Among them, f ξ represents the MLP layer, and N is the number of subgraph nodes, that is, Adjust the parameters of MLP to maximize the right-hand side equation to obtain the mutual information result.

[0102] For example, we traverse five historical moments, and concatenate the noisy discrete-time dynamic subgraph time-structure fusion representations of two different moments, such as time 1, time 2; time 1, time 3; time 2, time 5, etc., to obtain the noisy discrete-time dynamic subgraph time-structure fusion long representation. enter The mutual information results between graphs at different times in the time series are formed through the MLP layer

[0103] As an optional implementation scheme of the present application, Gaussian noise is input, and the variance of the Gaussian noise is adjusted according to a preset noise adjustment formula based on the first gradient clipping result and the mutual information result, including: when the mutual information result is greater than a preset threshold, the variance of the Gaussian noise is adjusted according to a preset noise attenuation rate; when the mutual information result is less than or equal to the preset threshold, the variance of the Gaussian noise is maintained.

[0104] Input clipped gradient Θ' G , and add a mean of 0 and a variance of σ e Gaussian noise Noi e , according to the mutual information results Dynamically adjust the variance σ of Gaussian noise e , where the noise adjustment formula is: If the value of the mutual information result exceeds the threshold τ, the noise scale will be reduced to σ' e = kσ e ; otherwise keep σ e . Where k is the preset noise attenuation rate, 0 <k<1。

[0105] Specific example: Input the clipped gradient Θ' G , and add a mean of 0 and an initial variance of σ e =100 Gaussian noise Noi e . Let the noise attenuation rate k = 0.45, the mutual information threshold τ = 0.5, according to the mutual information results Dynamically adjust the variance σ of Gaussian noise e .

[0106] As an optional implementation scheme of the present application, when the mutual information result exceeds a preset threshold, after adjusting the variance of the Gaussian noise according to the noise attenuation rate, the method further includes:

[0107] A generator noisy gradient is formed according to the adjusted variance of the Gaussian noise.

[0108] According to the adjusted noise variance σ' e , and finally form the noisy gradient of the perturbed generator

[0109] As an optional implementation scheme of the present application, the privacy consumption is calculated according to the adjusted variance of the Gaussian noise, the preset order of Ruili differential privacy, the second gradient clipping result and the preset batch size, and the consumption of the preset privacy budget is determined according to the privacy consumption, including: when the order of the preset Ruili differential privacy is greater than the preset order threshold, the privacy consumption is calculated according to the variance of the Gaussian noise, the second gradient clipping result and the preset batch size through the first privacy consumption formula; when the order of the preset Ruili differential privacy is less than or equal to the preset order threshold, the privacy consumption is calculated according to the variance of the Gaussian noise, the second gradient clipping result and the preset batch size through the second privacy consumption formula; and the remaining privacy budget after the privacy consumption in the current round is calculated according to the preset privacy budget.

[0110] According to the current round noise variance σ' e , the order of Rayleigh Differential Privacy (RDP), the gradient function L2-sensitivity Δ2f and the batch size B to calculate the privacy consumption. The calculation formula is as follows: If the specified order of Rayleigh Differential Privacy (RDP) α>2, then ε≤Bα(Δ2f) 2 / 2σ 2 ; If α≤2 and the current round noise variance σ'e is large, then ε≤16B / σ 2 ; If α≤2 and the current round noise variance σ'e is small, then The final calculation forms the remaining privacy budget for the current round

[0111] For example, the privacy consumption is calculated based on the current round noise variance σ'e, the order of Rayleigh differential privacy (RDP), the gradient function L2-sensitivity Δ2f=2 and the batch size B=64. At this time, the current round noise variance σ'e is large, and the privacy budget consumed by the current round ε=1024 / (σ'e) 2 , calculate the remaining privacy budget for the current round

[0112] As an optional implementation scheme of the present application, after calculating the remaining privacy budget after the privacy consumption in the current round according to the preset privacy budget, it also includes: when the privacy budget has not been consumed or the current round is less than a preset training number threshold, the generator noisy gradient is input into the LSTM neural network.

[0113] Determine whether the model training epoch or privacy budget has been reached exhausted, if not, the generator is noisy with gradients Feedback to the generator LSTM to optimize the training again; if yes, the training ends. For example, to determine whether 200 trainings or the privacy budget have been reached Exhausted.

[0114] As an optional implementation scheme of the present application, outputting the synthetic discrete-time dynamic graph of the next moment also includes: when the current round is equal to a preset training number threshold, outputting the synthetic discrete-time dynamic graph of the next moment.

[0115] When the number of training times reaches the specified model training Epoch, the training is stopped and the next moment synthetic discrete-time dynamic graph is output, such as the aforementioned synthetic discrete-time dynamic graph at the sixth moment.

[0116] The above methods can effectively alleviate the problem of privacy-availability balance in discrete-time dynamic graphs caused by uneven distribution of private and non-private information. At the same time, through dynamic noise adjustment, the privacy leakage problem caused by the sudden change of dynamic graph structure at a certain moment is solved, which further improves the privacy protection strength of discrete-time dynamic graph data release and effectively guarantees the availability of dynamic graph data at other times.

[0117] Example 2

[0118] Based on the same principle as the above method, a privacy protection device for discrete-time dynamic graphs is also proposed, see Figure 2 , a privacy protection device 100 for discrete-time dynamic graphs according to an embodiment of the present disclosure includes:

[0119] An input data acquisition module 110 is used to acquire input data, wherein the input data includes an original discrete-time dynamic graph, a preset batch size, a discrete-time dynamic graph at a next moment, a preset gradient clipping constraint value, and a preset privacy budget;

[0120] A node sampling module 120, configured to perform node sampling on the original discrete-time dynamic graph;

[0121] The fusion representation module 130 is used to calculate the attention weights of the neighboring nodes of the collected nodes and concatenate the attention weights; input the concatenated noisy discrete-time dynamic subgraph structure representation into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph;

[0122] A splicing and fusion representation module 140 is used to splice the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments, and input the splicing result into the generator multi-layer perceptron to calculate the mutual information result;

[0123] A discrete dynamic graph generation module 150 is used to input the time and structure fusion representation of the noisy discrete time dynamic subgraph into the generator multi-layer perceptron to obtain a synthetic discrete time dynamic graph at the next moment;

[0124] A gradient determination module 160 is used to perform gradient determination on the synthetic discrete-time dynamic graph at the next moment according to the discrete-time dynamic graph at the next moment to obtain gradient information;

[0125] A gradient clipping module 170, configured to clip the gradient information according to the preset gradient clipping constraint value to obtain a first gradient clipping result and a second gradient clipping result;

[0126] A variance adjustment module 180, configured to input Gaussian noise, and adjust the variance of the Gaussian noise according to a preset noise adjustment formula based on the first gradient clipping result and the mutual information result;

[0127] A privacy consumption calculation module 190 is used to calculate the privacy consumption according to the adjusted variance of the Gaussian noise, the preset order of the Ruili differential privacy, the second gradient clipping result and the preset batch size, and determine the consumption of the preset privacy budget according to the privacy consumption;

[0128] The judgment module 200 is used to output the synthetic discrete-time dynamic graph at the next moment when the preset privacy budget is consumed.

[0129] Obviously, those skilled in the art should understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned control methods. The modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by computing devices, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.

[0130] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned control methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0131] Example 3

[0132] Furthermore, an electronic device is proposed, comprising:

[0133] processor;

[0134] a memory for storing processor-executable instructions;

[0135] Wherein, the processor is configured to implement the privacy protection method for discrete-time dynamic graphs described in Example 1 when executing the executable instructions.

[0136] The electronic device of the embodiment of the present disclosure includes a processor and a memory for storing processor executable instructions, wherein the processor is configured to implement any of the above-mentioned privacy protection methods for discrete-time dynamic graphs when executing the executable instructions.

[0137] It should be noted that the number of processors may be one or more. At the same time, the electronic device of the embodiment of the present disclosure may also include an input device and an output device. The processor, memory, input device, and output device may be connected via a bus or in other ways, which are not specifically limited here.

[0138] The memory, as a computer-readable storage medium for the privacy protection method for discrete-time dynamic graphs, can be used to store software programs, computer executable programs, and various modules, such as the program or module corresponding to the privacy protection method for discrete-time dynamic graphs in the embodiment of the present disclosure. The processor executes various functional applications and data processing of the electronic device by running the software programs or modules stored in the memory.

[0139] The input device can be used to receive input numbers or signals. The signal can be a key signal related to user settings and function control of the device / terminal / server. The output device can include a display device such as a display screen.

[0140] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A privacy protection method for discrete-time dynamic graphs, characterized in that: include: Obtaining input data, wherein the input data includes an original discrete-time dynamic graph, a preset batch size, a discrete-time dynamic graph at a next moment, a preset gradient clipping constraint value, and a preset privacy budget; Node sampling is performed on the original discrete-time dynamic graph, attention weights of neighboring nodes of the collected nodes are calculated, the attention weights are spliced, and the spliced ​​noisy discrete-time dynamic subgraph structural representation is input into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph; splicing the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments, and inputting the spliced ​​result into the generator multi-layer perceptron to calculate the mutual information result; Inputting the time and structure fusion representation of the noisy discrete-time dynamic subgraph into the generator multi-layer perceptron to obtain a synthetic discrete-time dynamic graph at the next moment; Performing gradient discrimination on the synthetic discrete-time dynamic graph at the next moment according to the discrete-time dynamic graph at the next moment to obtain gradient information; Clipping the gradient information according to the preset gradient clipping constraint value to obtain a first gradient clipping result and a second gradient clipping result; Inputting Gaussian noise, and adjusting the variance of the Gaussian noise according to a preset noise adjustment formula according to the first gradient clipping result and the mutual information result; Calculate the privacy consumption according to the adjusted variance of the Gaussian noise, the preset order of the Rayli differential privacy, the second gradient clipping result and the preset batch size, and determine the consumption of the preset privacy budget according to the privacy consumption; When the preset privacy budget is consumed, the synthetic discrete-time dynamic graph of the next moment is output.

2. The privacy protection method for discrete-time dynamic graphs according to claim 1, characterized in that: The input data also includes: a preset node subset size and noise that obeys a standard normal distribution; the node sampling of the original discrete-time dynamic graph, calculating the attention weights of the neighboring nodes of the collected nodes, splicing the attention weights, and inputting the spliced ​​noisy discrete-time dynamic subgraph structural representation into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph, including: Selecting a node from the original discrete-time dynamic graph and using it as an element of the initialization subgraph node set; Generate a BFS tree with the element as the root according to the preset node subset size; Selecting nodes from the BFS tree, sampling the nodes according to a preset transition probability, expanding the number of elements of the initialized subgraph node set to a preset node subset size, and obtaining a discrete-time dynamic subgraph; According to the noise that obeys the standard normal distribution, the attention weights of the neighboring nodes of the nodes in the discrete-time dynamic subgraph are calculated, the attention weights are spliced, and the spliced ​​noisy discrete-time dynamic subgraph structural representation is input into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph.

3. The privacy protection method for discrete-time dynamic graphs according to claim 2, characterized in that: The time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments are spliced, and the spliced ​​result is input into the generator multi-layer perceptron to calculate the mutual information result, including: Traversing historical moments, and according to the historical moments, splicing the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments to obtain the time and structure fusion long representation of the noisy discrete-time dynamic subgraphs; The time and structure fusion long representation of the noisy discrete-time dynamic subgraph is input into the generator multi-layer perceptron, and the mutual information results between different moments in the time series are generated according to the preset calculation mutual information result inequality.

4. The privacy protection method for discrete-time dynamic graphs according to claim 1, characterized in that: Inputting Gaussian noise, and adjusting the variance of the Gaussian noise according to a preset noise adjustment formula according to the first gradient clipping result and the mutual information result, including: When the mutual information result is greater than a preset threshold, adjusting the variance of the Gaussian noise according to a preset noise attenuation rate; When the mutual information result is less than or equal to a preset threshold, the variance of the Gaussian noise is maintained.

5. The privacy protection method for discrete-time dynamic graphs according to claim 4, characterized in that: When the mutual information result exceeds a preset threshold, after adjusting the variance of the Gaussian noise according to the noise attenuation rate, the method further includes: A generator noisy gradient is formed according to the adjusted variance of the Gaussian noise.

6. The privacy protection method for discrete-time dynamic graphs according to claim 5, characterized in that: Calculating the privacy consumption according to the adjusted variance of the Gaussian noise, the preset order of the Rayli differential privacy, the second gradient clipping result, and the preset batch size, and determining the consumption of the preset privacy budget according to the privacy consumption, including: When the order of the preset Ruili differential privacy is greater than the preset order threshold, the privacy consumption is calculated by using a first privacy consumption formula according to the variance of the Gaussian noise, the second gradient clipping result and the preset batch size; When the order of the preset Ruili differential privacy is less than or equal to the preset order threshold, the privacy consumption is calculated by a second privacy consumption formula according to the variance of the Gaussian noise, the second gradient clipping result and the preset batch size; The remaining privacy budget after the privacy consumption in the current round is calculated according to the preset privacy budget.

7. The privacy protection method for discrete-time dynamic graphs according to claim 6, characterized in that: After calculating the remaining privacy budget after the privacy consumption in the current round according to the preset privacy budget, the method further includes: When the privacy budget has not been consumed or the current round is less than a preset training number threshold, the generator noisy gradient is input into the LSTM neural network.

8. The privacy protection method for discrete-time dynamic graphs according to claim 7, characterized in that: Outputting the synthetic discrete-time dynamic graph at the next moment also includes: When the current round is equal to the preset training times threshold, the synthetic discrete-time dynamic graph of the next moment is output.

9. A privacy protection device for discrete-time dynamic graphs, characterized in that: include: An input data acquisition module is used to acquire input data, wherein the input data includes an original discrete-time dynamic graph, a preset batch size, a discrete-time dynamic graph at the next moment, a preset gradient clipping constraint value, and a preset privacy budget; A node sampling module, used for performing node sampling on the original discrete-time dynamic graph; A fusion representation module is used to calculate the attention weights of the neighboring nodes of the collected nodes and concatenate the attention weights; The concatenated noisy discrete-time dynamic subgraph structural representation is input into the LSTM neural network to obtain the time and structure fusion representation of the noisy discrete-time dynamic subgraph; A splicing and fusion representation module is used to splice the time and structure fusion representations of the noisy discrete-time dynamic subgraphs at two different moments, and input the splicing result into the generator multi-layer perceptron to calculate the mutual information result; A discrete dynamic graph generation module is used to input the time and structure fusion representation of the noisy discrete time dynamic subgraph into the generator multi-layer perceptron to obtain a synthetic discrete time dynamic graph at the next moment; A gradient discrimination module, used for performing gradient discrimination on the synthetic discrete-time dynamic graph at the next moment according to the discrete-time dynamic graph at the next moment to obtain gradient information; A gradient clipping module, used to clip the gradient information according to the preset gradient clipping constraint value to obtain a first gradient clipping result and a second gradient clipping result; A variance adjustment module, used for inputting Gaussian noise, and adjusting the variance of the Gaussian noise according to a preset noise adjustment formula according to the first gradient clipping result and the mutual information result; A privacy consumption calculation module, used to calculate the privacy consumption according to the adjusted variance of the Gaussian noise, the preset order of the Rayli differential privacy, the second gradient clipping result and the preset batch size, and determine the consumption of the preset privacy budget according to the privacy consumption; The judgment module is used to output the synthetic discrete-time dynamic graph at the next moment when the preset privacy budget is consumed.

10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the privacy protection method for discrete-time dynamic graphs as described in any one of claims 1 to 8 when executing the executable instructions.

Citation Information

Patent Citations

  • Social influence prediction method and system based on heterogeneous graph neural network privacy protection

    CN115146312A

  • Self-adaptive privacy protection federal learning method

    CN116739079A

  • Social activity recommendation method and device for multi-modal data privacy protection

    CN117540106A

  • Generative adversarial network data synthesis method based on adaptive differential privacy

    CN117744716A

  • Next-generation point-of-interest security recommendation strategy based on asynchronous advantage reinforcement learning

    CN118484596A

Cited By

  • Image depth compressed sensing method and system oriented to multi-level privacy protection

    CN121357293A