A local differential privacy graph data synthesis algorithm based on neighborhood structure

By employing a local differential privacy graph data synthesis algorithm based on neighborhood structure, the problem of balancing privacy protection and structural fidelity in existing graph data synthesis methods is solved, generating more accurate and usable synthesized graphs suitable for tasks such as community discovery and anomaly detection.

CN121997378BActive Publication Date: 2026-07-03ZHEJIANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2026-04-10
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing methods for synthesizing local differential privacy graph data struggle to balance preserving graph structure information and protecting privacy, resulting in significant structural differences between the synthesized graph and the real graph, particularly in terms of community structure and local clustering.

Method used

The local differential privacy graph data synthesis algorithm based on neighborhood structure captures the local dense structure of the original graph using the local information of nodes, and generates a synthetic graph with similar statistical characteristics. This includes obtaining noisy degree and adjacency list, calculating projection threshold, correcting inconsistencies in neighborhood structure information, and constructing edges by grouping to meet the triangulation and degree targets.

Benefits of technology

It significantly improves the accuracy and usability of synthetic graph reconstruction, generates more realistic topological structures, and better preserves the neighborhood structure characteristics of the original graph, making it suitable for community structure and local clustering analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121997378B_ABST
    Figure CN121997378B_ABST
Patent Text Reader

Abstract

The application discloses a local differential privacy graph data synthesis algorithm based on a neighborhood structure, and comprises the following steps: obtaining the disturbed node degree and the adjacency list of each user, and calculating a projection threshold value for constraining the sensitivity of triangle counting; using the projection threshold value and the disturbance mechanism to guide the user to calculate and report the core neighborhood structure information, and jointly optimizing the collected two neighborhood statistics of the degree and the triangle count value, correcting the structural inconsistency, and completing the generation of the target statistics; using the corrected target statistics to group all nodes, and sequentially executing an edge generation algorithm within and between groups, preferentially meeting the triangle count target, and then meeting the degree value requirement, and completing the construction of the synthesized graph meeting the local differential privacy protection. Under strict privacy protection, the application significantly improves the availability and fidelity of the synthesized graph data by maintaining the key neighborhood structure of the graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data privacy technology, specifically relating to a local differential privacy graph data synthesis algorithm based on neighborhood structure. Background Technology

[0002] Privacy-preserving graph data synthesis is a key technology in graph data analysis and sharing. By generating synthetic graphs with similar statistical characteristics without revealing individual privacy, it can provide data support for downstream tasks such as community discovery, anomaly detection, and personalized recommendations. Especially when dealing with real graph data containing sensitive information such as user relationships and behavioral patterns, anonymization or desensitization before publication is crucial to balance data utility and privacy protection needs. Local differential privacy models have attracted considerable attention due to their unique advantages. They allow data to be perturbed before leaving the user's device, preventing even data collectors from accessing the original sensitive information, thus effectively resisting various inference attacks and providing strong privacy protection. However, to achieve a high level of privacy protection, local differential privacy mechanisms must inject a considerable amount of noise into the data, posing a significant challenge to synthesizing high-fidelity graph data. Therefore, accurately capturing and reproducing the complex structure of graphs in noisy environments has become a critical issue that urgently needs to be addressed in this field.

[0003] Existing methods struggle to balance data availability and privacy protection. On one hand, they are limited to collecting the degree distribution of nodes. While robust to noise, the degree itself carries limited graph structure information, failing to effectively capture higher-order topological properties such as community structure, transitivity, and clustering coefficients. This leads to significant structural differences between the synthetic and real graphs, limiting their usability in complex analyses. On the other hand, existing methods directly publish complete adjacency lists. While theoretically preserving more comprehensive structural information, local differential privacy requires injecting significant noise to meet strict privacy requirements, severely disrupting the original structure and resulting in extremely poor usability of the synthetic data.

[0004] To strike a balance between these two approaches, researchers have attempted to employ intermediate-granularity features. For example, one method enriches the feature representation of nodes through an iterative process, classifying nodes based on their degree and, in each iteration, statistically analyzing the class labels of each node's neighbors to form a neighborhood class distribution vector. This vector, after perturbation, is sent to the data collector. The data collector then groups the nodes based on the collected noisy vector and generates a graph accordingly. While this method contains more neighborhood information than a single degree value, it is essentially an indirect statistical analysis of neighbor attributes and cannot detect connections between neighbors. Therefore, it cannot accurately infer and reconstruct higher-order properties crucial for local dense structures, such as triangulation and clustering coefficients, leading to significant deviations between the final synthesized graph and the real graph in terms of community structure and local clustering. Summary of the Invention

[0005] To address real-world scenarios requiring privacy-preserving graph data synthesis, this invention provides a local differential privacy graph data synthesis algorithm based on neighborhood structure. This algorithm fully utilizes the local information of nodes to capture the local dense structure of the original graph and generates a synthesized graph with similar statistical characteristics based on the collected information. This improves the usability of the synthesized graph while ensuring individual privacy.

[0006] A local differential privacy graph data synthesis algorithm based on neighborhood structure includes the following steps:

[0007] (1) Obtain the node degree and adjacency list of each user after local differential privacy perturbation, and calculate the projection threshold for constraining triangulation sensitivity based on the noisy degree;

[0008] (2) Project the local data of each user using the projection threshold, calculate and generate noisy triangular count values, and perform joint optimization operations to correct the inconsistency of neighborhood structure information, thereby obtaining the target statistics of each user;

[0009] (3) Group all user nodes according to the target statistics, and construct edges within the group to satisfy the triangular counting target and construct edges between the groups to satisfy the degree target, thereby generating the composite graph.

[0010] Furthermore, the specific implementation of step (1) is as follows:

[0011] S11: Each user node obtains its local real degree and real adjacency table;

[0012] S12: Perturb the true degree using the Laplace mechanism to generate a noisy degree;

[0013] S13: Perturb the real adjacency list using a random response mechanism to generate a noisy adjacency list;

[0014] S14: Collect all user-reported noisy degree and noisy adjacency list, and concatenate them to obtain noisy degree sequence and noisy adjacency matrix, forming a complete set of noisy statistics;

[0015] S15: For each user, based on their generated noisy degree and privacy budget allocation, determine their projection threshold by solving an optimization problem, that is, find a threshold that minimizes the sum of the information loss error caused by projection and the error introduced by noise.

[0016] Furthermore, the Laplace mechanism in step S12 first sets a privacy budget for degree collection. The user starts from the scale parameter as A random noise value is sampled from the Laplace distribution and added to the true degree to obtain the noisy degree; the random response mechanism in step S13 first sets a privacy budget for adjacency list collection. For each element in the true adjacency list, with probability To keep its original value unchanged, with probability Invert its value to generate a noisy adjacency list; the projection threshold expression in step S15 is: ,in For users i The projection threshold, For users i The noisy degree, The correction factor is to be optimized.

[0017] Furthermore, the local differential privacy graph data synthesis algorithm based on neighborhood structure is characterized in that the correction factor This is obtained by minimizing the following objective function:

[0018]

[0019] in: The objective function is denoted as .

[0020] Furthermore, the specific implementation of step (2) is as follows:

[0021] S21: Distribute the noisy adjacency matrix and projection threshold to the corresponding users;

[0022] S22: After receiving the projection threshold, the user node performs a projection operation on its own real adjacency list, reduces its adjacency relationship, and generates a pruned local view.

[0023] S23: The user node combines the pruned local view with the noisy adjacency matrix to form a hybrid view, and then calculates its local triangular count value on this view and performs unbiased correction.

[0024] S24: The user node uses privacy budget and Laplace mechanism to perturb the triangular count value, generate a noisy triangular count value and report it;

[0025] S25: Aggregate the noisy triangular count values ​​reported by all users, and check whether the neighborhood structure information of each user meets the structural constraints. The neighborhood structure information is represented by neighborhood statistics composed of noisy degree and noisy triangular count values.

[0026] S26: For neighborhood statistics that do not satisfy the structural constraints, perform a constrained optimization process to find a new set of target statistics that satisfy the structural constraints.

[0027] Further, in step S23, the user node uses a noisy adjacency matrix to query whether there is a connecting edge between any two neighbors in the local view. If there is, it is determined that these two neighbors, together with the user node, form a triangle. The number of such triangles is counted in this way, which is the triangle count value, and it is unbiasedly corrected based on the flip probability of the adjacency table. In step S24, a privacy budget is first set for the triangle counting. For any user i Its scale parameter is By sampling a random noise value from the Laplace distribution and adding it to the triangular count value, we obtain the noisy triangular count value. The structural constraints in step S25 are as follows: and and The number is non-negative; the optimization process in step S26 involves minimizing the objective function. The target statistic is obtained by solving the problem. ,in and users respectively i Target degree and target triangulation value, and The weight values ​​are set and are inversely proportional to the Laplace distribution scaling parameters used for adding noise to the degree and triangular counts, respectively.

[0028] Furthermore, the specific implementation of step (3) is as follows:

[0029] S31: Group all user nodes according to the target triangular count value, so that nodes in the same group have similar neighborhood structure targets;

[0030] S32: To ensure the effectiveness and homogeneity of the groups, all groups are checked. Groups whose number of nodes has not reached the preset minimum size are sorted according to the target triangular count value, and the nodes are merged with adjacent groups in turn.

[0031] S33: For each group, determine the generation probability of connecting edges within the group based on the total number of target triangles, and establish a dense local neighborhood structure based on the generation probability.

[0032] S34: After completing the construction of the intra-group edges, calculate the degree generated for each node and compare it with the target degree to obtain the remaining degree of each node;

[0033] S35: Construct a binary indexed tree for each group to maintain the residual degree of each node within the group;

[0034] S36: Traverse all distinct pairs of groups and calculate the number of candidate edges to be generated between the pairs based on the total residual degree of the nodes in the two groups.

[0035] S37: For any pair of groups, select nodes from the two groups for inter-group connections, with the probability of a node being selected being proportional to its residual degree; then randomly select one node from each of the nodes used for inter-group connections in these two groups, and add a connecting edge between them.

[0036] S38: Update the remaining degree of the two nodes of the connecting edge and adjust the binary indexed tree of their respective groups accordingly;

[0037] S39: Repeat steps S37 to S38 until all grouping pairs have been traversed and the corresponding number of candidate connection edges have been generated, and finally the construction of the composite graph that satisfies the target statistics is completed.

[0038] Furthermore, the generation probability in step S33 is determined by the relational expression. ,in k The number of nodes in the group. q The probability of generation is given; the number of candidate edges generated in step S36 is proportional to the product of the total residual degree of the nodes within the two groups.

[0039] A computer device includes a memory and a processor, wherein the memory stores a computer program and the processor executes the computer program to implement the aforementioned local differential privacy graph data synthesis algorithm based on neighborhood structure.

[0040] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned local differential privacy graph data synthesis algorithm based on a neighborhood structure.

[0041] Based on the above technical solution, the present invention has the following beneficial technical effects:

[0042] 1. This invention designs a projection threshold optimization algorithm that can adaptively calculate the projection threshold for each user based on the initially collected noisy degree count. This design effectively constrains the sensitivity of the triangulation counting process and solves the problem that triangulation counting is difficult to collect effectively under the local differential privacy model due to its high sensitivity. Thus, it can more accurately obtain the key neighborhood structure features of the graph within a limited privacy budget.

[0043] 2. This invention proposes a joint optimization algorithm for statistics to correct the inherent structural contradiction between the degree sequence and the triangular counting sequence caused by privacy noise. This design ensures that the target statistics used to guide the generation of the synthetic graph are structurally realizable, which significantly improves the accuracy of reconstruction and the usability of the synthetic graph.

[0044] 3. This invention designs a graph reconstruction strategy. This strategy first constructs the local structural skeleton of the graph based on the target triangulation value, and then completes the global degree distribution. Compared with the traditional method of only matching degree, this strategy can generate a synthetic graph with a more realistic topological structure and better maintain the neighborhood structure characteristics of the original graph. It performs better in downstream analysis tasks such as clustering coefficient and modularity. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of the local differential privacy graph data synthesis algorithm based on neighborhood structure according to the present invention.

[0046] Figure 2 This is a schematic diagram of the basic statistics collection algorithm in this invention.

[0047] Figure 3 This is a schematic diagram of the target statistic generation algorithm in this invention.

[0048] Figure 4 This is a schematic diagram of the synthetic graph reconstruction algorithm in this invention. Detailed Implementation

[0049] To describe the present invention in more detail, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0050] like Figure 1 As shown, this embodiment provides a local differential privacy graph data synthesis algorithm based on a neighborhood structure, specifically including the following steps:

[0051] (1) Obtain the degree and adjacency list of each user after local differential privacy perturbation, and calculate the projection threshold for constraining triangular counting sensitivity based on the collected noisy degree.

[0052] The graph data structure addressed in this invention is widely used in various practical applications. For example, in online social networks, graphs consist of user nodes and edges representing friend relationships; in financial risk control systems, graphs consist of account nodes and edges representing transfer records. Since these connections contain extremely sensitive personal privacy information, directly collecting raw data poses a serious privacy risk. To prevent privacy leaks, this step employs a local differential privacy architecture to ensure that data is de-identified and noise-adding processed before leaving the user's local device. This stage, as the foundation for graph synthesis, focuses on addressing the high sensitivity of high-order structure statistics. Since directly calculating triangles introduces excessive noise, the system needs to "project" and truncate the user's neighborhood. Using the collected base noisy degree counts, this step utilizes a statistical model to construct an optimization problem, finding a balance between "information loss bias caused by truncation" and "variance introduced by noise." This dynamically calculates an optimized projection threshold for each user, which strictly limits the query range of subsequent triangle counting, maximizing the preservation of graph structural features while ensuring privacy, thus laying a crucial foundation for generating a high-quality synthesized graph. Therefore, the specific implementation process of this step includes the following sub-steps:

[0053] S11: Each user node obtains its local true degree and true adjacency table.

[0054] Assume there are n users in the system, each user This represents a node in the graph. For any user... Its true degree The adjacency list is defined as the number of neighboring nodes directly connected to this node. It is a binary vector of length n. If the user With users If an edge exists, the value of the j-th position in the vector is 1; otherwise, it is 0. This true degree and the adjacency list constitute the basic structural information of the user's local view.

[0055] S12: Using the Laplace mechanism to determine the true degree Perturb the function to generate a noisy degree.

[0056] To meet local differential privacy requirements, each user sets their true degree locally. Add Laplace noise: Let the privacy budget for degree collection be... ,user From the Laplace distribution Lap( Sample a random noise value and add it to the true degree. This allows us to obtain the noisy degree. ,like Figure 2As shown, this noisy score will then be sent to the data collector to mask the user's actual number of connections.

[0057] S13: Utilize a random response mechanism to process the real adjacency list. Perturb the nodes to generate a noisy adjacency list.

[0058] A random response mechanism is used to perturb the edge information in the adjacency list: Let the privacy budget used for adjacency list collection be... For adjacency lists For each of the numbers, the user determines the probability. Keep the original value unchanged, or use probability. Flip it; through this process, a noisy adjacency list that satisfies local differential privacy is generated. ,like Figure 2 As shown.

[0059] S24: Collect all user-reported noisy degree and noisy adjacency list, aggregate the noisy adjacency list into a noisy adjacency matrix, and form a complete set of noisy statistics.

[0060] The data collector receives a set of noisy degrees from all n users. and noisy adjacency list set The collector concatenates these noisy adjacency lists in column vector form according to user index order to construct a global noisy adjacency matrix. ,like Figure 2 As shown. At this point, the data collector has a preliminary noisy view of the graph structure, namely the noisy degree sequence and the noisy adjacency matrix.

[0061] S25: For each user, based on the collected noisy degree and privacy budget allocation, determine the projection threshold by solving an optimization problem, that is, find a threshold that minimizes the sum of the information loss error caused by projection and the error introduced by noise.

[0062] To limit the sensitivity of triangular counting in subsequent stages, a projection threshold needs to be calculated for each user. Using noisy degrees directly as the threshold is inaccurate; therefore, the threshold is parameterized as follows: ,in This is the correction factor to be optimized. The objective function of this optimization problem aims to balance two types of errors: one is the projection bias caused by the truncation of true neighbors due to an excessively low threshold, and the other is the noise error caused by the excessive variance of subsequently added noise due to an excessively high threshold. By minimizing this objective function, the optimal [factor / function] can be calculated. This allows us to obtain the optimal projection threshold for each user. Therefore, the objective function is:

[0063]

[0064] in: To allocate the privacy budget portion to the degree estimation, the optimal value is calculated by minimizing this objective function. This allows us to obtain the optimal projection threshold for each user. .

[0065] (2) Project the local data of each user using the projection threshold, calculate and generate noisy triangular count values, and perform joint optimization operations to correct the inconsistencies between neighborhood structure information, thereby obtaining a set of target statistics.

[0066] This step aims to obtain local clustering features of the graph under local differential privacy constraints. These features consist of the degree extracted in the previous step and the triangulation count to be extracted in this step. To address the high sensitivity issue caused by directly counting triangles, this step introduces graph projection technology. Specifically, it truncates the user's neighbor list using a threshold calculated in the previous stage, forcibly limiting the maximum number of connections for each node. This strictly limits the sensitivity of the triangulation count within the threshold range, preventing noise from overwhelming the true signal. During the counting process, each user combines their own real, pruned edge information with the noisy adjacency matrix fed back by the data collector to infer the connectivity between neighbors, constructing a hybrid view to complete the local triangulation count. Subsequently, based on the post-processing property of differential privacy—that is, arbitrary computational processing of the noisy data does not increase the risk of privacy leakage—further processing is applied. Furthermore, since independent noise injection may disrupt the inherent geometric dependencies between statistics—that is, the number of triangles a node can form cannot mathematically exceed the maximum number that can be formed by pairwise combinations of neighboring nodes—this step also includes a crucial consistency correction process. By establishing a constraint relationship model between triangles and degrees, noisy statistics are mapped to the nearest valid solution space, eliminating logical contradictions and significantly improving the structural fidelity of the synthetic graph. Based on the post-processing property of local differential privacy, that is, arbitrary computational processing on data that satisfies local differential privacy constraints will not increase the risk of privacy leakage, and no new noise will be introduced during the consistency correction process. Therefore, the specific implementation process of this step includes the following sub-steps:

[0067] S21: Distribute the noisy adjacency matrix and projection threshold to the corresponding users.

[0068] The collector will aggregate the global noisy adjacency matrix generated in the previous stage. It will be distributed to every user in the system, and will also be tailored to each user. Specific projection threshold Inform the relevant users. This step creates a feedback loop, enabling users to utilize global noise information and personalized truncation parameters to assist in local high-order structure statistics, preparing data for building hybrid views.

[0069] S22: After receiving the projection threshold, the user node performs a projection operation on its own real adjacency list, reduces its adjacency relationship, and generates a pruned local view.

[0070] user Check its true degree With the received threshold Relationship: If Users will randomly sample and retain data from all their neighbors. The current degree is forcibly truncated by selecting one neighbor and discarding the rest, such as... Figure 3 As shown; if If this is not the case, then all neighbor information is retained. This process generates a pruned view, the core function of which is to ensure that the maximum impact (i.e., sensitivity) of subsequent trigonometric counting functions when changing a single edge is strictly limited. This avoids adding excessive privacy protection noise.

[0071] S23: The user node combines the pruned local view with the global noisy adjacency matrix aggregated by the collector to form a hybrid view, and calculates its local triangular count value on this view.

[0072] Since local users only know their own connections with their neighbors, and are unaware of connections between neighbors, a hybrid view needs to be constructed. Using noisy adjacency matrix To query any two neighbors in its trimmed neighbor list and To check if there is an edge between them, i.e., to examine... The value, if Then determine This forms a triangle; the user iterates through all combinations of retained neighbor pairs and accumulates them to obtain the local triangle count value. ,like Figure 3 As shown. Although Despite the presence of noise, this method, when combined with real local edge information, can provide a relatively accurate basis for estimation.

[0073] S24: User nodes use privacy budget and Laplace mechanism to perturb the calculated triangular count value, generate a noisy triangular count value and report it.

[0074] To meet local differential privacy requirements, users need to calculate the triangular count value. Add noise. At this point, the sensitivity of the trigonometric counting function has been affected by the projected threshold. The privacy budget defined and set for triangulation is... Users from the Laplace distribution Lap Medium sampling noise and added After unbiased correction, a noisy triangular count value is generated. ,like Figure 3 As shown. Subsequently, the user sends the encrypted value to the collector. This process ensures that even if an attacker obtains the count value, they cannot deduce any specific sensitive information about the user.

[0075] S25: Aggregate the noisy triangular count values ​​reported by all users, and for each user's neighborhood structure information (pairing noisy degree and noisy triangular count value), check whether it meets the structural constraint condition, that is, the triangular count value should be less than the maximum number of edges that can be formed based on its degree.

[0076] After receiving the noisy triangular count values ​​from all users, the collector compares them with the noisy score collected in the first phase. Pairing is performed to form neighborhood statistics. ,like Figure 3 As shown. For a degree of A node can have at most [number] neighbors. Edges, i.e., the maximum number of edges formed There are several triangles; furthermore, the degree and trigonometric counts must be non-negative. Because Laplace noise can be negative or have excessive amplitude, the collected... It is very likely to violate the inequality If a negative value is found, the data collector needs to perform a consistency check on the statistics for each user and mark all outlier data points that violate geometric constraints.

[0077] S26: For neighborhood statistics that do not satisfy the structural constraints, the collector performs a constrained optimization process to find a new set of degree and triangular count values ​​that satisfy the constraints.

[0078] To correct data inconsistencies and improve the utility of synthetic data, the data collector models this correction process as a constrained optimization problem. For each violation, a neighborhood statistic is used. The goal is to find the corrected statistic. ,like Figure 3 As shown, this makes the weighted Euclidean distance... Minimum, while satisfying constraints And nonnegativity constraints. Among them, weights... and The variance of the statistics is set to be inversely proportional to the variance of the noise added to each statistic; that is, the greater the noise of the statistic, the greater the allowable shift during correction. By solving this quadratic programming problem, the statistics are projected onto the feasible region boundary of the valid solution space, resulting in a set of target statistics that both conform to the geometric laws of the graph structure and retain as much of the original noise information as possible. For pairs that meet the structural constraints, their target statistics are the neighborhood statistics.

[0079] (3) Group all nodes according to the target statistics, and construct edges within the group to satisfy the triangular counting target and construct edges between the groups to satisfy the degree target, thereby generating the composite graph.

[0080] This step employs a high-order structure-first reconstruction strategy. Degree, as a first-order statistic, is relatively robust, while triangles, as a high-order structure, are extremely sensitive to edge changes. If edges are adjusted to generate triangles after satisfying the degree requirement, any small modification will trigger a cascading effect, disrupting the balanced degree distribution. Since adding edges to the graph simultaneously affects both node degree and the number of triangles, satisfying the degree constraint first, and then adding edges later to complete the triangles, will disrupt the balanced degree distribution. Therefore, this step adopts a generation approach similar to a random block model: first, nodes with similar triangular structure requirements are clustered into the same group; then, dense local subgraphs are built within each group to satisfy the high-order triangle counting objective; finally, the remaining degree budget is used to build sparse connections between groups to satisfy the first-order degree objective. To efficiently complete this process on large-scale graphs, especially addressing the high-frequency update problem of weighted random sampling, this step introduces a binary indexed tree (BIT) data structure, reducing the edge generation complexity from linear to logarithmic. Therefore, the specific implementation process of this step includes the following sub-steps:

[0081] S31: Based on the triangular count values ​​generated in the target statistics in the previous step, group all nodes so that nodes in the same group have similar neighborhood structure targets.

[0082] To efficiently construct triangles, the algorithm leverages the characteristic that "closely connected communities easily form triangles." The system uses the target triangle count value... The nodes are divided into different groups. Grouping nodes with similar triangle formation requirements together allows for a unified setting of the edge connection probability within the group in subsequent steps. This probability ensures that the probability exactly satisfies the average triangle formation requirement of all nodes in the group, thereby maximizing the homogeneity of the structure within the group.

[0083] S32: To ensure the effectiveness and homogeneity of the groups, all groups are checked. Groups whose number of nodes has not reached the preset minimum size are sorted according to their target triangular count value and then merged with adjacent groups in turn until they meet the minimum size requirement.

[0084] The size of the groups must be strictly within a feasible range. Inside, minimum scale The geometric conditions for forming triangles determine: to form In a triangle, a node needs at least a certain number of neighbors (denoted as ). ),satisfy Therefore, the number of nodes in the group must be at least 1. Otherwise, it would be physically impossible to construct enough triangles. Maximum allowed number This is constrained by the degree of the nodes: to prevent excessive edges from being connected within a group to form triangles, causing the degree of a node to exceed its total target degree. Group size It cannot expand indefinitely (i.e.) (The minimum degree budget within the group cannot be exceeded). This step mainly handles the case of violating the lower bound. That is, when a group is too small to support the target number of triangles, the algorithm marks it as illegal, sorts it according to the target triangle count, and merges it with adjacent groups. This strategy not only solves the problem that small groups cannot generate enough triangles, but also preserves the structural homogeneity within the group to the greatest extent because it only merges groups with similar targets.

[0085] S33: Within each group, the probability of edge generation is determined based on the number of target triangles, and a dense local neighborhood structure is established. This process prioritizes satisfying the target triangle count values ​​of each node within the group.

[0086] Each group is treated as an independent ER (Erdősh-Rani) random graph. In order to determine the probability of connecting edges within a group The algorithm establishes an equation based on the expectation property of the ER random graph: the sum of the target triangular counts of all nodes in the group. It should be equal to the probability. and the number of nodes within the group The total number of triangles with lower expectation, i.e. By solving this equation, the required connection probability can be derived in reverse. Then, using this probability, all node pairs within the group are connected by edges, such as... Figure 4 As shown, this method uses statistical mean to macroscopically make the number of triangles generated in the group close to the target value, thus establishing a basic local clustering structure.

[0087] S34: After completing the construction of the intra-group edges, calculate the degree generated for each node and compare it with its target degree to obtain the remaining degree of each node.

[0088] node The total target degree is In step S33, the connection has already been made. The inner edges of the strip group. The difference is then calculated. ,this This represents how many more edges need to be added to the node to meet the target degree requirement. These remaining degrees will be used for subsequent inter-group connections.

[0089] S35: Build a binary indexed tree for each group and maintain the residual degree of each node in the group.

[0090] To efficiently handle dynamic weights during subsequent large-scale random edge connections, the system initializes a binary indexed tree (BIT) for each group. This data structure stores the residual degree of all nodes within the corresponding group. and support in This algorithm completes weight-based random sampling and weight updates within a time complexity, which solves the problem of excessive time complexity in reconstructing the array when the weights change frequently in the traditional roulette wheel algorithm.

[0091] S36: Traverse all distinct pairs of groups and calculate the number of candidate edges to be generated between the two groups proportionally based on the sum of the residual degrees of all nodes in the two groups.

[0092] The expected number of edges to be established between two groups is proportional to the product of the remaining total degree of the two groups. This simulates the characteristic of communities with high degree in real networks that tend to connect with other communities with high degree, ensuring the rationality of the macroscopic topology.

[0093] S37: Randomly select nodes using a binary indexed tree (BIT) for grouping, with the probability of each node being selected proportional to its residual degree; randomly select one node from each of the two groups and add an edge between them, such as... Figure 4 As shown.

[0094] During graph generation, the vast majority of nodes have low degrees, with only a very small number having high degrees. If simple random sampling is used, a large number of low-degree nodes will quickly meet their degree requirements and leave the candidate pool. This results in high-degree nodes still having a large amount of remaining degree requirements in the later stages of processing, but there are no available low-degree nodes to connect them to. This implementation makes the selection probability proportional to the remaining degree, forcing high-degree nodes to establish connections at a faster speed, ensuring that they can complete degree filling synchronously with low-degree nodes.

[0095] S38: Update the remaining degree of the two selected nodes and adjust the binary indexed tree of their respective groups accordingly.

[0096] Whenever at node and Adding an edge between nodes immediately reduces their residual degree requirement by 1, requiring a real-time update of the binary indexed tree (BIT) to adjust the weights. Once a node's residual degree reaches zero, its weight in the BIT becomes zero, allowing it to be automatically removed from subsequent sampling, ensuring that the final degree of any node will not exceed its target value.

[0097] S39: Repeat steps S37 to S38 until all grouping pairs have been traversed and the corresponding candidate number of edges have been generated, and finally the construction of the composite graph that satisfies the target statistics is completed.

[0098] The above description of the embodiments is provided to enable those skilled in the art to understand and apply the present invention. Those skilled in the art can readily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made to the present invention by those skilled in the art based on the disclosure thereof should be within the scope of protection of the present invention.

Claims

1. A method for local differential privacy graph data synthesis based on neighborhood structure, characterized in that, Includes the following steps: (1) Obtain the node degree and adjacency list of each user after local differential privacy perturbation, and calculate the projection threshold for constraining triangulation sensitivity based on the noisy degree; (2) Project the local data of each user using the projection threshold, calculate and generate noisy triangular count values, and perform joint optimization operations to correct the inconsistency of neighborhood structure information, thereby obtaining the target statistics of each user. The target statistics include target degree and target triangular count value. The specific implementation includes: S25: Aggregate the noisy triangular count values ​​reported by all users, and check whether the neighborhood structure information of each user meets the structural constraints. The neighborhood structure information is represented by neighborhood statistics composed of noisy degree and noisy triangular count value; S26: For neighborhood statistics that do not meet the structural constraints, perform a constrained optimization process to find a new set of target statistics that meet the structural constraints. (3) Group all user nodes according to the target statistics, and construct edges within each group to satisfy the triangular counting target and construct edges between groups to satisfy the degree target, thereby generating the composite graph. The specific implementation method is as follows: S31: Group all user nodes according to the target triangular count value, so that nodes in the same group have similar neighborhood structure targets; S32: To ensure the effectiveness and homogeneity of the groups, all groups are checked. Groups whose number of nodes has not reached the preset minimum size are sorted according to the target triangular count value, and then the nodes are merged with the adjacent groups in turn. S33: For each group, determine the generation probability of connecting edges within the group based on the total number of target triangles, and establish a dense local neighborhood structure based on the generation probability. S34: After completing the construction of the intra-group edges, calculate the degree generated for each node and compare it with the target degree to obtain the remaining degree of each node; S35: Construct a binary indexed tree for each group to maintain the residual degree of each node within the group; S36: Traverse all distinct pairs of groups and calculate the number of candidate edges to be generated between the pairs based on the total residual degree of the nodes in the two groups. S37: For any pair of groups, select nodes in both groups for inter-group connections, with the probability of a node being selected being proportional to its residual degree; then randomly select one node from each of the nodes used for inter-group connections in these two groups, and add a connecting edge between them. S38: Update the remaining degree of the two nodes of the connecting edge, and adjust the binary indexed tree of the group in which they belong simultaneously; S39: Repeat steps S37 to S38 until all grouping pairs have been traversed and the corresponding number of candidate connection edges have been generated, and finally the construction of the composite graph that satisfies the target statistics is completed.

2. The method of claim 1, wherein, The specific implementation method of step (1) is as follows: S11: Each user node obtains its local real degree and real adjacency table; S12: Perturb the true degree using the Laplace mechanism to generate a noisy degree; S13: Perturb the real adjacency list using a random response mechanism to generate a noisy adjacency list; S14: Collect all user-reported noisy degree and noisy adjacency list, and concatenate them to obtain noisy degree sequence and noisy adjacency matrix, forming a complete set of noisy statistics; S15: For each user, based on their generated noisy degree and privacy budget allocation, determine their projection threshold by solving an optimization problem, that is, find a threshold that minimizes the sum of the information loss error caused by projection and the error introduced by noise.

3. The local differential privacy graph data synthesis method based on neighborhood structure according to claim 2, characterized in that: The Laplace mechanism in step S12 first sets a privacy budget for degree collection. The user starts from the scale parameter as A random noise value is sampled from the Laplace distribution and added to the true degree to obtain the noisy degree; the random response mechanism in step S13 first sets a privacy budget for adjacency list collection. For each element in the true adjacency list, with probability To keep its original value unchanged, with probability Invert its value to generate a noisy adjacency list; the projection threshold expression in step S15 is: ,in For users i The projection threshold, For users i The noisy degree, The correction factor is to be optimized.

4. The local differential privacy graph data synthesis method based on neighborhood structure according to claim 3, characterized in that, The correction factor This is obtained by minimizing the following objective function: ; in: The objective function is denoted as .

5. The local differential privacy graph data synthesis method based on neighborhood structure according to claim 3, characterized in that, The specific implementation method of step (2) is as follows: S21: Distribute the noisy adjacency matrix and projection threshold to the corresponding users; S22: After receiving the projection threshold, the user node performs a projection operation on its own real adjacency list, reduces its adjacency relationship, and generates a pruned local view. S23: The user node combines the pruned local view with the noisy adjacency matrix to form a hybrid view, and then calculates its local triangular count value on this view and performs unbiased correction. S24: The user node uses privacy budget and Laplace mechanism to perturb the triangular count value, generate a noisy triangular count value and report it.

6. The local differential privacy graph data synthesis method based on neighborhood structure according to claim 5, characterized in that: In step S23, the user node uses a noisy adjacency matrix to query whether there is a connecting edge between any two neighbors in the local view. If there is, it is determined that these two neighbors, together with the user node, form a triangle. The number of such triangles is counted, which is the triangle count value, and it is unbiasedly corrected based on the flip probability of the adjacency table. In step S24, a privacy budget is first set for the triangle counting. For any user i Its scale parameter is By sampling a random noise value from the Laplace distribution and adding it to the triangular count value, we obtain the noisy triangular count value. ; The structural constraints in step S25 are as follows: and and The number is non-negative; the optimization process in step S26 involves minimizing the objective function. The target statistic is obtained by solving the problem. ,in and users respectively i Target degree and target triangulation value, and The weight values ​​are set and are inversely proportional to the Laplace distribution scaling parameters used for adding noise to the degree and triangular counts, respectively.

7. The local differential privacy graph data synthesis method based on neighborhood structure according to claim 6, characterized in that: The generation probability in step S33 is determined by the relational formula. ,in k The number of nodes in the group. q The probability of generation is given; the number of candidate edges generated in step S36 is proportional to the product of the total residual degree of the nodes within the two groups.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: The processor is used to execute the computer program to implement the local differential privacy graph data synthesis method based on the neighborhood structure as described in any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements the local differential privacy graph data synthesis method based on the neighborhood structure as described in any one of claims 1 to 7.