An input graph optimization privacy protection method and system for large model retrieval
Through the method of combining learning and deep graph information, combined with category prototype prompts and edge pruning and reconnection technology, the challenge of graph data privacy protection in large language model retrieval scenarios is solved, and the privacy nodes are accurately identified and protected, the risk of privacy leakage is reduced, and the structure and query performance of graph data are maintained.
Patent Information
- Application Number
- CN202411959961.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The prior art is difficult to accurately identify and protect privacy nodes in graph data without losing graph data structure information, especially in large language model retrieval scenarios, and face the dual challenges of privacy leakage and query performance.
By combining the mutual information of comparative learning and depth maps, the initial embedded representation of each node in the input graph is obtained, and a category prototype prompt is introduced for classification optimization to obtain the comparative learning weight constraint representation. Then, based on the global representation and the contrast learning weight constraint representation, the matching degree optimization is performed, the privacy nodes are identified, and the graph structure is adjusted to reduce the risk of privacy leakage through edge pruning and reconnection.
It realizes the precise identification and protection of privacy nodes in the input graph without losing the graph data structure information, reduces the risk of privacy leakage, and improves the accuracy of privacy recognition and task performance, ensuring the efficiency of graph analysis tasks.
Smart Images

Figure CN119383279B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an input graph optimization privacy protection method and system for large model retrieval, belonging to the technical field of privacy protection. Background Art
[0002] In recent years, with the rapid development of big data technology and the increasing complexity of application scenarios, the status and importance of privacy protection in data processing have been continuously improved. In particular, graph data has been widely used in social networks, knowledge graphs, recommendation systems and other fields due to its ability to accurately express complex entity relationships. However, with the continuous expansion of graph data and its deep integration with large language models (LLM), the privacy leakage problem of graph data has gradually emerged and has become a core challenge that needs to be solved urgently.
[0003] Graph privacy protection technology needs to deal with a variety of privacy risks, including the inference of sensitive node attributes, privacy leakage of edge relationships, and potential attack risks in complex query combinations. Existing privacy protection methods, such as data anonymization, structural perturbation, and differential privacy, can reduce the risk of privacy leakage to a certain extent, but often face significant technical limitations. For example, anonymization may destroy the structural consistency of graph data, and the random noise introduced by perturbation may weaken the utility of the data, while differential privacy often has a significant impact on query performance while protecting privacy.
[0004] In addition, with the widespread application of LLM in retrieval, complex query and semantic inference scenarios have further exacerbated the challenges of graph privacy protection, and existing technologies are difficult to cope with these diverse application requirements. Summary of the invention
[0005] The purpose of the present invention is to provide an input graph optimization privacy protection method and system for large model retrieval, which can accurately identify and protect the privacy nodes in the input graph without losing the data structure information of the input graph, thereby reducing the risk of privacy leakage of the input graph.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides an input graph optimization privacy protection method for large model retrieval, comprising:
[0008] Obtain the comparative learning weights of each node in the input graph, and based on the comparative learning weights of each node in the input graph, perform dual-perspective comparative learning of the input graph from the perspective of node attributes and the perspective of graph structure to obtain the initial embedding representation of each node in the input graph;
[0009] Based on the initial embedding representation of each node in the input graph, the category prototype prompt is introduced to classify and optimize each node in the input graph, and the contrastive learning weight constraint representation of each node in the input graph is obtained;
[0010] Obtain a global representation of the input graph, and based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph, optimize the matching degree of each node in the input graph to obtain an optimized representation of each node in the input graph;
[0011] Based on the optimized representation of each node in the input graph, the contextual tags of each node in the input graph are introduced to identify the private nodes in the input graph.
[0012] Based on the comparative learning weights of each node in the input graph, the edges of each privacy node in the input graph are screened for pruning, and the pruned edges of each privacy node in the input graph are reconnected with the goal of maximizing the exposure reduction to obtain the input graph after privacy protection;
[0013] The contrastive learning weight constraint representation of each node in the input graph after privacy protection is re-obtained to complete the privacy protection of the input graph.
[0014] In a second aspect, the present invention provides an input graph optimization privacy protection system for large model retrieval, comprising:
[0015] A privacy understanding module, which is used to obtain the comparative learning weights of each node in the input graph, and based on the comparative learning weights of each node in the input graph, perform dual-perspective comparative learning of the input graph from the node attribute perspective and the graph structure perspective to obtain the initial embedding representation of each node in the input graph; and based on the initial embedding representation of each node in the input graph, introduce category prototype prompts, perform classification optimization on each node in the input graph, and obtain the comparative learning weight constraint representation of each node in the input graph;
[0016] A privacy identification module, used to obtain a global representation of the input graph, and based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph, optimize the matching degree of each node in the input graph to obtain an optimized representation of each node in the input graph; and used to introduce context tags of each node in the input graph based on the optimized representation of each node in the input graph to identify privacy nodes in the input graph;
[0017] The privacy protection module is used to screen the edges of each privacy node in the input graph for pruning based on the comparative learning weights of each node in the input graph, and reconnect the pruned edges of each privacy node in the input graph with the goal of maximizing exposure reduction to obtain the input graph after privacy protection; and to re-obtain the comparative learning weight constraint representation of each node in the input graph after privacy protection to complete the privacy protection of the input graph.
[0018] In a third aspect, the present invention provides a computer device, comprising:
[0019] Storage medium for storing computer programs;
[0020] A processor is used to execute the computer program to implement the input graph optimization privacy protection method for large model retrieval as described in any one of the first aspects.
[0021] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the input graph optimization privacy protection method for large model retrieval as described in any one of the first aspects is implemented.
[0022] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the input graph optimization privacy protection method for large model retrieval as described in any one of the first aspects.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] The input graph optimization privacy protection method for large model retrieval provided by the present invention can accurately identify and protect the privacy nodes in the input graph without losing the data structure information of the input graph through the combination of contrastive learning and deep graph mutual information, thereby reducing the risk of privacy leakage of the input graph. By introducing category prototype prompts, it can effectively deal with the training problem of a small amount of labeled data. In the case of limited labeled samples, by enhancing the model's understanding of privacy nodes, the accuracy of privacy identification and task performance are improved. Compared with directly deleting the edges of privacy nodes, which causes the original graph structure to be destroyed, the present invention optimizes the adjacency matrix of the graph through edge reconnection and structural learning, which can effectively adjust the structure of the graph and reduce the possibility of privacy leakage, while retaining the practicality of the graph data and ensuring the efficiency of the graph analysis task. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of the input graph optimization privacy protection method for large model retrieval provided by an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of a privacy understanding module provided by an embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of adding a privacy understanding module prompt provided by an embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of a privacy identification module provided by an embodiment of the present invention;
[0029] Figure 5 It is a schematic diagram of large language model query graph data provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The technical solution of the present application is further described in detail below in conjunction with specific implementation methods.
[0031] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and should not be construed as limitations on the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments may be combined with each other.
[0032] Embodiment 1:
[0033] The present embodiment provides an input graph optimization privacy protection method for large model retrieval. The input graph optimization privacy protection method for large model retrieval provided by the present embodiment can be applied to a terminal, and can be executed by an input graph optimization privacy protection system for large model retrieval. The system can be implemented by software and / or hardware. The system can be integrated in a terminal, for example: any tablet computer or computer device with communication function.
[0034] Figure 1 This is a flow chart of the input graph optimization privacy protection method for large model retrieval provided in this embodiment. This flow chart only shows the logical sequence of the method in this embodiment. Different methods can be used without conflict. Figure 1 The steps shown or described are accomplished in the order shown.
[0035] like Figure 1 As shown, the input graph optimization privacy protection method for large model retrieval provided in this embodiment includes:
[0036] Obtain the comparative learning weights of each node in the input graph, and based on the comparative learning weights of each node in the input graph, perform dual-perspective comparative learning of the input graph from the perspective of node attributes and the perspective of graph structure to obtain the initial embedding representation of each node in the input graph;
[0037] Based on the initial embedding representation of each node in the input graph, the category prototype prompt is introduced to classify and optimize each node in the input graph, and the contrastive learning weight constraint representation of each node in the input graph is obtained;
[0038] Obtain a global representation of the input graph, and based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph, optimize the matching degree of each node in the input graph to obtain an optimized representation of each node in the input graph;
[0039] Based on the optimized representation of each node in the input graph, the contextual tags of each node in the input graph are introduced to identify the private nodes in the input graph.
[0040] Based on the comparative learning weights of each node in the input graph, the edges of each privacy node in the input graph are screened for pruning, and the pruned edges of each privacy node in the input graph are reconnected with the goal of maximizing the exposure reduction to obtain the input graph after privacy protection;
[0041] The contrastive learning weight constraint representation of each node in the input graph after privacy protection is re-obtained to complete the privacy protection of the input graph.
[0042] The input graph optimization privacy protection method for large model retrieval provided in this embodiment, through the combination of contrastive learning and deep graph mutual information, can accurately identify and protect the privacy nodes in the input graph without losing the data structure information of the input graph, thereby reducing the risk of privacy leakage of the input graph. By introducing category prototype prompts, it can effectively deal with the training problem of a small amount of labeled data. In the case of limited labeled samples, by enhancing the model's understanding of privacy nodes, the accuracy of privacy identification and task performance are improved. Compared with directly deleting the edges of privacy nodes, which causes the original graph structure to be destroyed, the present invention optimizes the adjacency matrix of the graph through edge reconnection and structural learning, which can effectively adjust the structure of the graph and reduce the possibility of privacy leakage, while retaining the practicality of the graph data and ensuring the efficiency of the graph analysis task.
[0043] Embodiment 2:
[0044] This embodiment provides an input graph optimization privacy protection method for large model retrieval. Based on Embodiment 1, the input graph optimization privacy protection method for large model retrieval provided by this embodiment specifically includes the following steps:
[0045] Step 1: Obtain the comparative learning weights of each node in the input graph, and based on the comparative learning weights of each node in the input graph, perform dual-perspective comparative learning of the input graph from the perspective of node attributes and the perspective of graph structure to obtain the initial embedding representation of each node in the input graph;
[0046] In this embodiment, obtaining the comparative learning weights of each node in the input graph specifically includes the following steps:
[0047] Step 1: Calculate the Katz index and structural entropy of each node in the input graph;
[0048] In this embodiment, the calculation formula of the Katz index of each node in the input graph is:
[0049] ;
[0050] in, Represents a node in the input graph With Node The Katz index, Represents the attenuation factor of Power, , Represents the adjacency matrix of the input graph of Power, express No. Line Column elements, i.e., from nodes in the input graph To Node Length The total number of paths, Indicates the length threshold.
[0051] Specifically, Determines the range of the domain considered when calculating the Katz index of each node in the input graph.
[0052] The calculation formula of the structural entropy of each node in the input graph is:
[0053] ;
[0054] in, Represents a node in the input graph With Node The structural entropy of Represents a node in the input graph With Node The set of common neighbor nodes of Represents a node in the input graph With Node Common neighbor nodes The contact weight, ,in, , Represents a node in the input graph With Node Common neighbor nodes With Node ,node The connection weights of , Represents a node in the input graph With Node Common neighbor nodes With Node ,node The connection weight of .
[0055] Specifically, if two nodes in the input graph are adjacent, the connection weight of the two nodes is 1, otherwise, the connection weight of the two nodes is 0.
[0056] Step 2: Based on the Katz index and structural entropy of each node in the input graph, calculate the contrastive learning weight of each node in the input graph.
[0057] In this embodiment, the calculation formula of the comparative learning weight of each node in the input graph is:
[0058] ;
[0059] in, Represents a node in the input graph With Node The contrastive learning weights, represents the first hyperparameter, represents the second hyperparameter.
[0060] In this embodiment, Figure 2 As shown in FIG, based on the comparative learning weights of each node in the input graph, the input graph is subjected to dual-perspective comparative learning from the node attribute perspective and the graph structure perspective, and the initial embedding representation of each node in the input graph is obtained. Specifically, the following steps are included:
[0061] Step 1: Construct a contrastive learning objective function based on the contrastive learning weights of each node in the input graph;
[0062] Step 2: Use a multi-layer perceptron network to obtain the representation of each node in the input graph from the perspective of node attributes;
[0063] In this embodiment, the multilayer perceptron network only uses node features to obtain the representation of each node in the input graph from the perspective of node attributes.
[0064] Step 3: Use graph neural network to obtain the representation of each node in the input graph from the perspective of graph structure;
[0065] In this embodiment, the graph neural network uses node features and graph structure to obtain the representation of each node in the input graph from the perspective of the graph structure.
[0066] Step 4: Based on the contrastive learning objective function, the multilayer perceptron network and the graph neural network are trained to make the representation of the same node in the input graph from the perspective of node attributes and from the perspective of graph structure closer, and to make the representation of different nodes in the input graph from the perspective of node attributes and from the perspective of graph structure farther, and obtain the trained multilayer perceptron network and graph neural network;
[0067] In this embodiment, the contrastive learning objective function is:
[0068] ;
[0069] in, Represents a node in the input graph Representation from the perspective of node attributes, , Represents a node in the input graph ,node Representation from the perspective of graph structure, express and The similarity function of express and The similarity function of represents the temperature parameter, Represents a node in the input graph With Node The contrastive learning weights, Represents the total number of nodes in the input graph.
[0070] Step 5: Use the trained graph neural network to obtain the representation of each node in the input graph from the perspective of the graph structure as the initial embedding representation of each node in the input graph.
[0071] Step 2: Based on the initial embedding representation of each node in the input graph, introduce the category prototype prompt, classify and optimize each node in the input graph, and obtain the contrast learning weight constraint representation of each node in the input graph;
[0072] In this embodiment, Figure 3 As shown, based on the initial embedding representation of each node in the input graph, the category prototype prompt is introduced to classify and optimize each node in the input graph, and the contrast learning weight constraint representation of each node in the input graph is obtained, which specifically includes the following steps:
[0073] Step 1: Based on the category labels of each node in the input graph, a category prototype prompt node is generated for each category label, and based on the initial embedding representation of each node corresponding to each category label, the initial representation of each category prototype prompt node is generated;
[0074] In this embodiment, the initial representation of each category prototype prompt node is:
[0075] ;
[0076] in, Represents a node in the input graph The category label of express The initial representation of the corresponding category prototype prompt node, express The corresponding node set, Represents a node in the input graph The initial embedding representation of .
[0077] Step 2: Based on the initial representation of each category prototype prompt node, a category prototype prompt vector is generated for each category label;
[0078] In this embodiment, in order to make the initial embedding representation of each node in the input graph understand the privacy on the graph while not destroying the correctness of the node classification, a category prototype prompt node is introduced, and the category prototype prompt node is added to the input graph as a virtual node to obtain a prompt expansion graph.
[0079] Specifically, assuming that there are Category labels, corresponding to each category label, generate a category prototype prompt node and a category prototype prompt vector, a total of Category prototype hint nodes and category prototype hint vectors, given by The category prototype prompt vectors together constitute a category prototype prompt vector set .Will Category prototype hint nodes are added as virtual nodes to the input graph In the middle of the day, The category prototype hint nodes are related to the input graph Nodes are formed weighted edges, The weighted edges together constitute a weighted edge set , get the hint expansion map ,in, represents the set of nodes of the input graph, Represents the edge set of the input graph.
[0080] Step 3: Based on the classification optimization objective function, the initial embedding representation of each node in the input graph and the prototype prompt vector of each category are optimized, so that the initial embedding representation and category prompt vector of the nodes corresponding to the same category label in the input graph are brought closer, and the initial embedding representation and category prompt vector of the nodes corresponding to different category labels in the input graph are pulled apart, and the optimized initial embedding representation of each node in the input graph is obtained as the comparative learning weight constraint representation of each node in the input graph.
[0081] In this embodiment, the classification optimization objective function is:
[0082] ;
[0083] in, Represents a node in the input graph The category label of , express , The corresponding category prototype prompt vector, express The corresponding node set, express and The similarity function of express and The similarity function of represents the temperature parameter, Represents a node in the input graph With Node The contrastive learning weights.
[0084] It should be noted that in actual applications, the labeled data of privacy nodes is limited. In order to solve this problem, a self-supervised pre-training method is adopted. First, unlabeled data is used for pre-training, and then fine-tuning is performed with the help of a small amount of annotations. The prompts used in this process are different from those used in the previous process.
[0085] Step 3: Obtain a global representation of the input graph, and based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph, optimize the matching degree of each node in the input graph to obtain an optimized representation of each node in the input graph;
[0086] In this embodiment, a global representation of the input graph is obtained, and based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph, the matching degree of each node in the input graph is optimized. Obtaining the optimized representation of each node in the input graph specifically includes the following steps:
[0087] Step 1: Use the read function to read the global representation of the input graph;
[0088] Step 2: Perturb the nodes in the input graph and obtain the representation of the perturbed nodes;
[0089] Step 3: Based on the first matching degree optimization objective function, optimize the contrastive learning weight constraint representation of each node in the input graph, maximize the matching degree between the contrastive learning weight constraint representation of each node in the input graph and the global representation of the input graph, minimize the matching degree between the representation of the perturbation node and the global representation of the input graph, and obtain the optimized contrastive learning weight constraint representation of each node in the input graph as the optimized representation of each node in the input graph.
[0090] In this embodiment, the first matching degree optimization objective function is:
[0091] ;
[0092] in, Represents a node in the input graph The contrastive learning weight constraint representation is Represents a disturbance node The expression, represents the global representation of the input graph, Indicates that , Projected into the same representation space, Indicates that , Projected into the same representation space, express and The matching score, express and The matching score, Express expectations, represents the total number of nodes in the input graph, Represents the total number of perturbation nodes.
[0093] Step 4: Based on the optimized representation of each node in the input graph, the contextual tags of each node in the input graph are introduced to identify the private nodes in the input graph.
[0094] In this embodiment, Figure 4 As shown in FIG. 1 , based on the optimized representation of each node in the input graph, the contextual tags of each node in the input graph are introduced, and the identification of the privacy nodes in the input graph specifically includes the following steps:
[0095] Step 1: Based on the second matching degree optimization objective function, the optimized representation of each node in the input graph is optimized twice, so that the matching degree between the optimized representation of each node in the input graph and its context label is maximized, and the matching degree between the optimized representation of each node in the input graph and the label different from its context label is minimized, and the optimized representation of each node in the input graph after the second optimization is obtained as the second optimized representation of each node in the input graph;
[0096] In this embodiment, the second matching degree optimization objective function is:
[0097] ;
[0098] in, Represents a node in the input graph The optimized representation of Represents a node in the input graph Contextual tags The expression, Represents a node in the input graph For privacy nodes, Represents a node in the input graph is a non-private node, Representation and Different contextual tags The expression, when hour ,when hour , Indicates that , Projected into the same representation space, Indicates that , Projected into the same representation space, express and The matching score, express and The matching score, Represents the total number of nodes in the input graph.
[0099] Step 2: Based on the quadratic optimization representation of each node in the input graph, identify the privacy nodes in the input graph according to the privacy node determination formula.
[0100] In this embodiment, the privacy node determination formula is:
[0101] ;
[0102] in, Represents a node in the input graph The quadratic optimization representation is: Represents a privacy token The expression, Represents a non-private token The expression, Indicates that , Projected into the same representation space, Indicates that , Projected into the same representation space, express and The matching score, express and The matching score.
[0103] If a node in the input graph satisfies the privacy node determination formula, the node is determined to be a privacy node.
[0104] Step 5: Based on the comparative learning weights of each node in the input graph, the edges of each privacy node in the input graph are screened for pruning, and based on the privacy protection objective function, the pruned edges of each privacy node in the input graph are reconnected to obtain the input graph after privacy protection;
[0105] In this embodiment, based on the comparative learning weights of each node in the input graph, screening the edges of each privacy node in the input graph for pruning specifically includes: if the comparative learning weight between a privacy node and a node in the input graph is greater than the comparative learning weight threshold, screening the edge connecting the privacy node and the node for pruning.
[0106] Define the edges that need to be pruned after each privacy node in the input graph is filtered out as candidate edges.
[0107] In this embodiment, with the goal of maximizing exposure reduction, the pruned edges of each privacy node in the input graph are reconnected to obtain the input graph after privacy protection, which specifically includes the following steps:
[0108] Step 1: Use random walk to query the input graph;
[0109] In this embodiment, random walk is used to simulate query behavior and perform harmless privacy-related queries on the input graph.
[0110] Step 2: Based on the probability of the random walk ending at each node in the input graph, calculate the transition probability of the edge connecting each node in the input graph with its neighboring nodes, and obtain the transition probability of the edge of each privacy node in the input graph being pruned according to the transition probability of the edge connecting each node in the input graph with its neighboring nodes;
[0111] In this embodiment, the calculation formula for the transition probability of the edge connecting each node in the input graph with its neighboring nodes is:
[0112] ;
[0113] in, Represents a node in the input graph Its neighbor nodes The transition probability of the connected edge, Represents a random walk around nodes in the input graph The probability of ending at Represents a node in the input graph The set of neighbor nodes.
[0114] The transition probability of the edge of each privacy node in the input graph being pruned is the transition probability of the edge connecting each privacy node with its neighboring node in the input graph. According to the calculation formula of the transition probability of the edge connecting each node with its neighboring node in the input graph, the transition probability of the edge connecting each privacy node with its neighboring node in the input graph can be calculated, that is, the transition probability of the edge of each privacy node in the input graph being pruned.
[0115] Step 3: The transition probability matrix is constructed by the transition probability of the edges connecting each node in the input graph with its neighboring nodes, and the basic matrix of the Markov chain is calculated based on the transition probability matrix;
[0116] In this embodiment, the calculation formula of the Markov chain basic matrix is:
[0117] ;
[0118] in, represents the Markov chain basic matrix, represents the identity matrix, represents the transition probability matrix, No. Line The column elements are .
[0119] Step 4: Based on the Markov chain basic matrix, use the absorbing Markov chain to calculate the exposure of each node in the input graph, and according to the exposure of each node in the input graph, obtain the exposure of each privacy node in the input graph, the exposure of the nodes corresponding to the pruned edges of each privacy node, and the exposure of each node reconnected with each privacy node;
[0120] In this embodiment, the calculation formula for the exposure amount of each node in the input graph is:
[0121] ;
[0122] in, Represents a node in the input graph The exposure amount, Represents a node in the input graph The privacy cost of the input node in the graph is is a privacy node, then ,otherwise, , express No. Line Column elements, A collection of nodes representing the input graph.
[0123] The exposure of each node in the input graph includes the exposure of each privacy node in the input graph, the exposure of the nodes corresponding to the pruned edges of each privacy node, and the exposure of each node reconnected with each privacy node. According to the calculation formula of the exposure of each node in the input graph, the exposure of each privacy node in the input graph, the exposure of the nodes corresponding to the pruned edges of each privacy node, and the exposure of each node reconnected with each privacy node can be calculated.
[0124] Step 5: Based on the transition probability of the pruned edges of each privacy node in the input graph, the exposure of each privacy node, the exposure of the nodes corresponding to the pruned edges of each privacy node, the exposure of each node reconnected with each privacy node, and the Markov chain basic matrix, calculate the exposure reduction of each privacy node in the input graph after reconnecting with each node;
[0125] In this embodiment, the calculation formula for the exposure reduction amount after each privacy node in the input graph is reconnected with each node is:
[0126] ;
[0127] in, Represents a private node in the input graph With Node The amount of exposure reduction after reconnection, Represents a private node in the input graph The transition probability of the pruned edge, , , Represents a private node in the input graph , Privacy Node The node corresponding to the pruned edge , and privacy nodes Reconnecting Node The exposure amount, Represents a private node in the input graph The privacy cost, Indicates transpose.
[0128] Step 6: With the goal of maximizing exposure reduction, screen the nodes that are reconnected to the privacy nodes in the input graph to obtain the optimal reconnection nodes corresponding to the privacy nodes in the input graph;
[0129] In this embodiment, the optimal reconnection node corresponding to each privacy node in the input graph is:
[0130] ;
[0131] in, Represents a private node in the input graph The corresponding optimal reconnection node, express Maximum The value of .
[0132] Step 7: Replace the pruned edges with the edges connecting each privacy node in the input graph with its corresponding optimal reconnection node to obtain the privacy-protected input graph.
[0133] Step 6: Re-obtain the comparative learning weight constraint representation of each node in the input graph after privacy protection to complete the privacy protection of the input graph.
[0134] In this embodiment, re-obtaining the comparative learning weight constraint representation of each node in the input graph after privacy protection specifically includes: bringing the input graph after privacy protection into the forward propagation of the graph neural network for training, and obtaining the comparative learning weight constraint representation of each node in the input graph after privacy protection.
[0135] In this embodiment, the forward propagation formula of the graph neural network is:
[0136] ;
[0137] in, Represents the graph neural network Layer hidden representation, represents the normalized adjacency matrix of the input graph, Represents the graph neural network Layers can learn weight matrices, represents a non-linear activation function.
[0138] In this embodiment, a large language model is used to perform harmless but privacy-related queries on the input graph before and after privacy protection to evaluate whether privacy protection has successfully reduced the exposure of private nodes and whether it can satisfy normal queries that do not involve privacy. Figure 5 As shown in the figure, the obtained representation is first stored in the storage space, and then the large language model is used to call the already constructed natural language query to parse the natural language into a structured logical query.
[0139] The conversion logic includes:
[0140] Entity recognition and linking, specifically including: extracting key entities from the query and linking them to nodes in the graph database;
[0141] Condition construction, specifically including: mapping descriptive conditions into logical rules;
[0142] Structured expression generation, specifically including: organizing conditions into logical query graphs (such as projection, intersection, and union operations).
[0143] The query is passed to the Neural Graph Database for specific data retrieval, including:
[0144] Embedded query: Queries are mapped to the embedding space of the graph database, and the underlying relationships are inferred through neural networks;
[0145] Logical inference: Perform logical operations (such as projection, intersection, and union operations) on graph data based on parsed conditions.
[0146] Answer generation: The results of retrieval and inference are converted into a set of target entities or attributes.
[0147] Finally, the large language model combines the retrieved data to generate answers in natural language and feeds them back to the user. At this stage, the large language model uses its own generation capabilities to convert structured answers (graph data retrieval results) into natural language expressions that meet user needs. If it is a privacy-protected node, the result returned will be another answer to replace the original node.
[0148] By using a large language model to perform harmless but privacy-related queries on the privacy-protected input graph, it can be seen that the input graph optimization privacy protection method for large model retrieval provided in this embodiment can accurately identify and protect privacy nodes, effectively reduce the risk of privacy leakage, and at the same time ensure the functional integrity of the graph data.
[0149] The input graph optimization privacy protection method for large model retrieval provided in this embodiment can flexibly adapt to the privacy protection needs in different fields and scenarios, has strong scalability, and can be applied to a variety of graph data processing tasks, such as social networks, knowledge graphs, recommendation systems, etc.; it can not only effectively ensure data privacy, but also maintain the query and analysis capabilities of graph data under the premise of privacy protection, thereby avoiding the performance loss caused by data disturbance or encryption in traditional privacy protection methods.
[0150] Embodiment 3:
[0151] This embodiment provides an input graph optimization privacy protection system for large model retrieval, including:
[0152] A privacy understanding module, which is used to obtain the comparative learning weights of each node in the input graph, and based on the comparative learning weights of each node in the input graph, perform dual-perspective comparative learning of the input graph from the node attribute perspective and the graph structure perspective to obtain the initial embedding representation of each node in the input graph; and based on the initial embedding representation of each node in the input graph, introduce category prototype prompts, perform classification optimization on each node in the input graph, and obtain the comparative learning weight constraint representation of each node in the input graph;
[0153] A privacy identification module, used to obtain a global representation of the input graph, and based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph, optimize the matching degree of each node in the input graph to obtain an optimized representation of each node in the input graph; and used to introduce context tags of each node in the input graph based on the optimized representation of each node in the input graph to identify privacy nodes in the input graph;
[0154] The privacy protection module is used to screen the edges of each privacy node in the input graph for pruning based on the comparative learning weights of each node in the input graph, and reconnect the pruned edges of each privacy node in the input graph with the goal of maximizing exposure reduction to obtain the input graph after privacy protection; and to re-obtain the comparative learning weight constraint representation of each node in the input graph after privacy protection to complete the privacy protection of the input graph.
[0155] The input graph optimization privacy protection system for large model retrieval provided in this embodiment can execute the input graph optimization privacy protection method for large model retrieval provided in Example 1 or Example 2, and has the corresponding functional modules and beneficial effects of the execution method.
[0156] Embodiment 4:
[0157] This embodiment provides a computer device, including:
[0158] Storage medium for storing computer programs;
[0159] A processor is used to execute a computer program to implement the input graph optimization privacy protection method for large model retrieval in Example 1 or Example 2.
[0160] Embodiment 5:
[0161] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the input graph optimization privacy protection method for large model retrieval in embodiment 1 or embodiment 2 is implemented.
[0162] Embodiment 6:
[0163] This embodiment provides a computer program product, including a computer program. When the computer program is executed by a processor, the input graph optimization privacy protection method for large model retrieval in embodiment 1 or embodiment 2 is implemented.
[0164] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0165] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0166] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0168] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An input graph optimization privacy protection method for large model retrieval, characterized in that: include: Obtain the comparative learning weights of each node in the input graph, and based on the comparative learning weights of each node in the input graph, perform dual-perspective comparative learning of the input graph from the perspective of node attributes and the perspective of graph structure to obtain the initial embedding representation of each node in the input graph; Based on the initial embedding representation of each node in the input graph, the category prototype prompt is introduced to classify and optimize each node in the input graph, and the contrastive learning weight constraint representation of each node in the input graph is obtained; Obtain a global representation of the input graph, and based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph, optimize the matching degree of each node in the input graph to obtain an optimized representation of each node in the input graph; Based on the optimized representation of each node in the input graph, the contextual tags of each node in the input graph are introduced to identify the private nodes in the input graph. Based on the contrast learning weights of each node in the input graph, the edges of each privacy node in the input graph are screened for pruning, and the pruned edges of each privacy node in the input graph are reconnected with the goal of maximizing the exposure reduction to obtain the input graph after privacy protection; if the contrast learning weight between a privacy node and a node in the input graph is greater than the contrast learning weight threshold, the edge connecting the privacy node and the node is screened for pruning; The contrastive learning weight constraint representation of each node in the input graph after privacy protection is re-obtained to complete the privacy protection of the input graph.
2. The input graph optimization privacy protection method for large model retrieval according to claim 1 is characterized in that: Obtaining the comparative learning weights of each node in the input graph includes: Calculate the Katz index and structural entropy of each node in the input graph; Based on the Katz index and structural entropy of each node in the input graph, the contrastive learning weight of each node in the input graph is calculated; Among them, the calculation formula of the Katz index of each node in the input graph is: ; in, Represents a node in the input graph With Node The Katz index, Represents the attenuation factor of Power, Represents the adjacency matrix of the input graph of Power, express No. Line Column elements, i.e., from nodes in the input graph To Node Length is The total number of paths, Indicates the length threshold; The calculation formula of the structural entropy of each node in the input graph is: ; in, Represents a node in the input graph With Node The structural entropy of Represents a node in the input graph With Node The set of common neighbor nodes of Represents a node in the input graph With Node Common neighbor nodes The contact weight, ,in, , Represents a node in the input graph With Node Common neighbor nodes With Node ,node The connection weights of , Represents a node in the input graph With Node Common neighbor nodes With Node ,node The connection weight of The calculation formula for the contrastive learning weight of each node in the input graph is: ; in, Represents a node in the input graph With Node The contrastive learning weights, represents the first hyperparameter, represents the second hyperparameter.
3. The input graph optimization privacy protection method for large model retrieval according to claim 1 is characterized in that: Based on the comparative learning weights of each node in the input graph, the input graph is subjected to dual-perspective comparative learning from the node attribute perspective and the graph structure perspective to obtain the initial embedding representation of each node in the input graph, including: Construct a contrastive learning objective function based on the contrastive learning weights of each node in the input graph; Use a multi-layer perceptron network to obtain the representation of each node in the input graph from the perspective of node attributes; Use graph neural networks to obtain the representation of each node in the input graph from the perspective of graph structure; Based on the contrastive learning objective function, the multilayer perceptron network and graph neural network are trained to make the representation of the same node in the input graph from the perspective of node attributes and the representation from the perspective of graph structure closer, and to make the representation of different nodes in the input graph from the perspective of node attributes and the representation from the perspective of graph structure farther, so as to obtain the trained multilayer perceptron network and graph neural network; Use the trained graph neural network to obtain the representation of each node in the input graph from the perspective of the graph structure as the initial embedding representation of each node in the input graph; Among them, the contrastive learning objective function is: ; in, Represents a node in the input graph Representation from the perspective of node attributes, , Represents a node in the input graph ,node Representation from the perspective of graph structure, express and The similarity function of express and The similarity function of represents the temperature parameter, Represents a node in the input graph With Node The contrastive learning weights, Represents the total number of nodes in the input graph.
4. The input graph optimization privacy protection method for large model retrieval according to claim 1 is characterized in that: Based on the initial embedding representation of each node in the input graph, the category prototype prompt is introduced to classify and optimize each node in the input graph, and the contrast learning weight constraint representation of each node in the input graph is obtained, including: Based on the category labels of each node in the input graph, a category prototype prompt node is generated corresponding to each category label, and based on the initial embedding representation of each node corresponding to each category label, an initial representation of each category prototype prompt node is generated; Based on the initial representation of each category prototype prompt node, a category prototype prompt vector is generated corresponding to each category label; Based on the classification optimization objective function, the initial embedding representation of each node in the input graph and the prototype prompt vector of each category are optimized, so that the initial embedding representation and the category prompt vector of the nodes corresponding to the same category label in the input graph are brought closer, and the initial embedding representation and the category prompt vector of the nodes corresponding to different category labels in the input graph are pulled farther apart, and the optimized initial embedding representation of each node in the input graph is obtained as the comparative learning weight constraint representation of each node in the input graph; Among them, the initial representation of each category prototype prompt node is: ; in, Represents a node in the input graph The category label of express The initial representation of the corresponding category prototype prompt node, express The corresponding node set, Represents a node in the input graph The initial embedding representation of The classification optimization objective function is: ; in, Represents a node in the input graph The category label of , express , The corresponding category prototype prompt vector, express The corresponding node set, express and The similarity function of express and The similarity function of represents the temperature parameter, Represents a node in the input graph With Node The contrastive learning weights.
5. The input graph optimization privacy protection method for large model retrieval according to claim 1 is characterized in that: Obtain a global representation of the input graph, and optimize the matching degree of each node in the input graph based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph. Obtaining the optimized representation of each node in the input graph includes: Use the read function to read the global representation of the input graph; Perturb the nodes in the input graph and obtain the representation of the perturbed nodes; Based on the first matching degree optimization objective function, the contrastive learning weight constraint representation of each node in the input graph is optimized to maximize the matching degree between the contrastive learning weight constraint representation of each node in the input graph and the global representation of the input graph, and minimize the matching degree between the representation of the perturbation node and the global representation of the input graph, and the optimized contrastive learning weight constraint representation of each node in the input graph is obtained as the optimized representation of each node in the input graph; Among them, the first matching degree optimization objective function is: ; in, Represents a node in the input graph The contrastive learning weight constraint representation is Represents a disturbance node The expression, represents the global representation of the input graph, Indicates that , Projected into the same representation space, Indicates that , Projected into the same representation space, express and The matching score, express and The matching score, Express expectations, represents the total number of nodes in the input graph, Represents the total number of perturbation nodes.
6. The input graph optimization privacy protection method for large model retrieval according to claim 1 is characterized in that: Based on the optimized representation of each node in the input graph, the contextual tags of each node in the input graph are introduced to identify the privacy nodes in the input graph, including: Based on the second matching degree optimization objective function, the optimized representation of each node in the input graph is optimized twice, so that the matching degree between the optimized representation of each node in the input graph and the representation of its context label is maximized, and the matching degree between the optimized representation of each node in the input graph and the representation of the label different from its context label is minimized, and the optimized representation of each node in the input graph after the second optimization is obtained as the second optimized representation of each node in the input graph; Based on the quadratic optimization representation of each node in the input graph and the privacy node determination formula, the privacy nodes in the input graph are identified; Among them, the second matching degree optimization objective function is: ; in, Represents a node in the input graph The optimized representation of Represents a node in the input graph Contextual tags The expression, Represents a node in the input graph For privacy nodes, Represents a node in the input graph is a non-private node, Representation and Different contextual tags The expression, when hour ,when hour , Indicates that , Projected into the same representation space, Indicates that , Projected into the same representation space, express and The matching score, express and The matching score, Represents the total number of nodes in the input graph; The privacy node determination formula is: ; in, Represents a node in the input graph The quadratic optimization representation is: Represents a privacy token The expression, Represents a non-private token The expression, Indicates that , Projected into the same representation space, Indicates that , Projected into the same representation space, express and The matching score, express and The matching score of If a node in the input graph satisfies the privacy node determination formula, the node is determined to be a privacy node.
7. The input graph optimization privacy protection method for large model retrieval according to claim 1 is characterized in that: With the goal of minimizing privacy exposure, the pruned edges of each privacy node in the input graph are reconnected to obtain the privacy-protected input graph, which includes: Use random walks to query the input graph; Based on the probability of the random walk ending at each node in the input graph, the transition probability of the edge connecting each node in the input graph with its neighboring nodes is calculated, and the transition probability of the edge of each privacy node in the input graph being pruned is obtained according to the transition probability of the edge connecting each node in the input graph with its neighboring nodes; The transition probability matrix is formed by the transition probability of the edges connecting each node in the input graph with its neighboring nodes, and the basic matrix of the Markov chain is calculated based on the transition probability matrix; Based on the Markov chain basic matrix, the exposure of each node in the input graph is calculated using the absorbing Markov chain. According to the exposure of each node in the input graph, the exposure of each privacy node in the input graph, the exposure of the nodes corresponding to the pruned edges of each privacy node, and the exposure of each node reconnected with each privacy node are obtained. Based on the transition probability of the pruned edges of each privacy node in the input graph, the exposure of each privacy node, the exposure of the nodes corresponding to the pruned edges of each privacy node, the exposure of each node reconnected with each privacy node, and the basic matrix of the Markov chain, calculate the exposure reduction of each privacy node in the input graph after reconnecting with each node; With the goal of maximizing exposure reduction, the nodes that are reconnected to the privacy nodes in the input graph are screened to obtain the optimal reconnection nodes corresponding to the privacy nodes in the input graph. Replace the pruned edges of the edges connecting each privacy node in the input graph with its corresponding optimal reconnection node to obtain the input graph after privacy protection; Among them, the calculation formula for the transition probability of the edge connecting each node in the input graph with its neighboring nodes is: ; in, Represents a node in the input graph Its neighbor nodes The transition probability of the connected edge, Represents a random walk around nodes in the input graph The probability of ending at Represents a node in the input graph The set of neighbor nodes of The calculation formula of the Markov chain basic matrix is: ; in, represents the Markov chain basic matrix, represents the identity matrix, represents the transition probability matrix, No. Line The column elements are ; The calculation formula for the exposure of each node in the input graph is: ; in, Represents a node in the input graph The exposure amount, Represents a node in the input graph The privacy cost of the input node in the graph is is a privacy node, then ,otherwise, , express No. Line Column elements, A set of nodes representing the input graph; The calculation formula for the exposure reduction after each privacy node in the input graph is reconnected to each node is: ; in, Represents a private node in the input graph With Node The amount of exposure reduction after reconnection, Represents a private node in the input graph The transition probability of the pruned edge, , , Represents a private node in the input graph , Privacy Node The node corresponding to the pruned edge , and privacy nodes Reconnecting Node The exposure amount, Represents a private node in the input graph The privacy cost, represents transpose; The optimal reconnection node corresponding to each privacy node in the input graph is: ; in, Represents a private node in the input graph The corresponding optimal reconnection node, express Maximum The value of .
8. The input graph optimization privacy protection method for large model retrieval according to claim 3 is characterized in that: The contrastive learning weight constraint representation of each node in the input graph after regaining privacy protection includes: The privacy-protected input graph is brought into the forward propagation of the graph neural network for training, and the comparative learning weight constraint representation of each node in the privacy-protected input graph is obtained; Among them, the forward propagation formula of the graph neural network is: ; in, Represents the graph neural network Layer hidden representation, represents the normalized adjacency matrix of the input graph, Represents the graph neural network Layers can learn weight matrices, represents a non-linear activation function.
9. An input graph optimization privacy protection system for large model retrieval, characterized in that: include: A privacy understanding module, which is used to obtain the comparative learning weights of each node in the input graph, and based on the comparative learning weights of each node in the input graph, perform dual-perspective comparative learning of the input graph from the node attribute perspective and the graph structure perspective to obtain the initial embedding representation of each node in the input graph; and based on the initial embedding representation of each node in the input graph, introduce category prototype prompts, perform classification optimization on each node in the input graph, and obtain the comparative learning weight constraint representation of each node in the input graph; The privacy identification module is used to obtain the global representation of the input graph, and based on the global representation of the input graph and the comparative learning weight constraint representation of each node in the input graph, optimize the matching degree of each node in the input graph to obtain the optimized representation of each node in the input graph; and for introducing context labels of each node in the input graph based on an optimized representation of each node in the input graph, and identifying privacy nodes in the input graph; The privacy protection module is used to screen the edges of each privacy node in the input graph for pruning based on the comparative learning weights of each node in the input graph, and reconnect the pruned edges of each privacy node in the input graph with the goal of maximizing the exposure reduction to obtain the input graph after privacy protection; And a contrastive learning weight constraint representation of each node in the input graph after re-acquisition of privacy protection is used to complete the privacy protection of the input graph; wherein, if the contrastive learning weight between a privacy node and a node in the input graph is greater than the contrastive learning weight threshold, the edge connecting the privacy node and the node is filtered for pruning.
Citation Information
Patent Citations
Social influence prediction method and system based on heterogeneous graph neural network privacy protection
CN115146312A
Graph modification method and equipment based on graph privacy protection and graph utility improvement, and medium
CN118228798A