Poison edge removal device, poison edge removal method and poison edge removal program
The poison edge removal device addresses the challenge of unsupervised graph contrastive learning by optimizing the adjacency matrix to distance node embeddings, effectively preventing poisoning attacks without labeled data.
Patent Information
- Application Number
- JP2023045603
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2043-03-22
AI Technical Summary
Existing countermeasure methods for poisoning attacks on graph neural networks (GNNs) require labeled data, making them unsuitable for unsupervised graph contrastive learning, which relies on unlabeled data.
A poison edge removal device and method that utilizes an unsupervised graph contrast learning model to optimize an encoding function, perform data augmentation, calculate gradients, and modify the adjacency matrix to maximize the distance between node embeddings and their center of gravity, effectively removing poisonous edges without labeled data.
Prevents poisoning attacks on unsupervised graph contrast learning by modifying the adjacency matrix to distance node embeddings from their center of gravity, thereby creating a clean graph without the need for labeled data.
Smart Images

Figure 2024135088000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a countermeasure against poisoning attacks on graph neural networks (GNNs). [Background technology]
[0002] Graph neural networks (GNNs), which can handle classification tasks for graph data, have been attracting attention and can be applied to community analysis in social networks and prediction of molecular features in drug discovery. However, in the field of graph learning, there is a shortage of labeled datasets due to the large human burden involved in creating labeled data for specific classification tasks, and there is a problem that overfitting is likely to occur. Therefore, it is expected that unsupervised graph contrast learning (e.g., see Non-Patent Document 1) will solve this problem by applying contrast learning technology, which can learn from huge amounts of unlabeled data as is, to graph data. However, poisoning attacks against unsupervised graph contrast learning have also been reported (e.g., see Non-Patent Document 2), and countermeasures against these attacks are necessary.
[0003] As an existing countermeasure against poisoning attacks on graph data, a method has been proposed in which a poisoned graph is converted into a clean graph by utilizing the inherent characteristics of graph data (see, for example, Non-Patent Document 3). A clean graph tends to have a low-rank adjacency matrix and sparseness because only a limited number of nodes with similar characteristics are connected. On the other hand, when creating poison data, there is a tendency to connect nodes with different characteristics in order to reduce the accuracy of downstream classification tasks, which impairs the similarity of the characteristics of adjacent nodes inherent in a clean graph and the low-rank and sparse nature of the adjacency matrix. Existing countermeasures take advantage of this fact and generate a clean adjacency matrix by removing poison edges. [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] Zhu, Yanqiao, et al. "Graph contrastive learning with adaptive augmentation." Proceedings of the Web Conference 2021. 2021. [Non-Patent Document 2] Zhang, Sixiao, et al. "Unsupervised graph poisoning attack via contrastive loss back-propagation." WWW '22: Proceedings of the ACM Web Conference 2022. 2022. [Non-Patent Document 3] JIN, Wei, et al. "Graph structure learning for robust graph neural networks." Proceedings of the 26th ACM SIGKDD international conference on knowledge discovery & data mining. pp. 66-74. 2020. Summary of the Invention [Problem to be solved by the invention]
[0005] However, existing countermeasures assume supervised GNNs and require correct labels to remove the effects of poison data. For this reason, it is difficult to directly apply existing countermeasures to unsupervised graph contrast learning, which assumes unlabeled data. Therefore, a method for preventing poisoning attacks on unsupervised graph contrast learning without utilizing data labels is desired.
[0006] An object of the present invention is to provide a poisonous edge removal device, a poisonous edge removal method, and a poisonous edge removal program that can prevent poisoning attacks against unsupervised graph control learning without using labeled data. [Means for solving the problem]
[0007] The poison edge removal device of the present invention comprises a graph learning unit that learns a graph consisting of an adjacency matrix indicating edges and features of nodes using an unsupervised graph contrastive learning model and optimizes an encoding function for acquiring embedded representations of nodes; a representation acquisition unit that generates a plurality of extended graphs by performing a data extension operation on the graph and acquires embedded representations of each node of the extended graphs using the encoding function; a gradient calculation unit that sums gradients related to the adjacency matrix for an objective function related to the distance from the center of gravity of the embedded representation calculated for each of the plurality of extended graphs; an adjacency matrix conversion unit that preferentially selects one element of the adjacency matrix having a large absolute value of the gradient and inverts the value so as to maximize the objective function; and an output unit that repeats the processing of the graph learning unit, the representation acquisition unit, the gradient calculation unit and the adjacency matrix conversion unit a predetermined number of times and outputs the converted graph.
[0008] The expression acquisition unit may generate two types of graph sets by performing a data augmentation operation on the graph, and the gradient calculation unit may add up the gradients of the two types of graph sets.
[0009] The poison edge removal method of the present invention includes a graph learning step of learning a graph consisting of an adjacency matrix indicating edges and features of nodes using an unsupervised graph contrast learning model, and optimizing an encoding function for acquiring embedded representations of nodes; a representation acquisition step of generating a plurality of extended graphs by performing a data extension operation on the graph, and acquiring embedded representations of each node of the extended graphs using the encoding function; a gradient calculation step of summing gradients related to the adjacency matrix for an objective function related to the distance from the center of gravity of the embedded representation calculated for each of the plurality of extended graphs; an adjacency matrix transformation step of preferentially selecting one element of the adjacency matrix having a large absolute value of the gradient and inverting the value so as to maximize the objective function; and an output step of repeating the processes of the graph learning step, the representation acquisition step, the gradient calculation step, and the adjacency matrix transformation step a predetermined number of times, and outputting the transformed graph.
[0010] A poison edge removal program according to the present invention causes a computer to function as the poison edge removal device. Effect of the Invention
[0011] According to the present invention, it is possible to prevent poisoning attacks against unsupervised graph contrast learning without using labeled data. [Brief description of the drawings]
[0012] [Figure 1] FIG. 2 is a diagram illustrating a functional configuration of a poison edge removal device according to an embodiment. [Diagram 2] 1 is a flowchart showing a procedure of a poison edge removal method according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] An example of an embodiment of the present invention will now be described. In a poisoning attack against unsupervised graph learning, poison edges are added between nodes that are not actually related to each other. As a result, while unsupervised graph learning would normally distribute the embeddings, the embeddings of nodes affected by the poison edges are distributed near the center of gravity, resulting in a decrease in the accuracy of classification tasks. The poison edge removal device of this embodiment focuses on this characteristic and removes the effect of poisonous edges by modifying the adjacency matrix of the input graph so as to maximize the distance between the embedded representation of each node and its center of gravity, thereby outputting a clean graph.
[0014] [Unsupervised graph contrastive learning] The unsupervised graph contrast learning targeted in this embodiment is a graph data G={A,X}(A∈{0,1} N×N is the adjacency matrix, X∈R N×F This is an algorithm that does not use the node label in (where represents the feature of the node), but instead compares the node of interest with similar and dissimilar nodes, and optimizes (learns) the encoding function to obtain the embedding representation of the node of interest. The embedded representation with the learned encoding function can be utilized in tasks such as node classification or link prediction.
[0015] In existing unsupervised contrastive learning methods for graph data that assume node classification and link prediction, two data augmentation operations are first performed on G to generate two augmented graphs. The data augmentation operations referred to here refer to modification of edge connections or masking of node features, etc.
[0016] Next, let us assume that an embedding representation e = g{f(A,X)} is obtained by the encoding function f(·) and the projection function g(·) used for contrastive learning. Then, the embedding representation e in the two augmented graphs obtained by the data augmentation operation is 1 ={e i 1 |1≦i≦N} and e 2 ={e i 2 |1≦i≦N} is obtained.
[0017] Learning is then performed by optimizing the parameters of the contrastive learning model in the direction that minimizes the objective function L using the gradient of L.
number
number
[0018] [Attack model] The attacker aims to reduce the accuracy of the embedding representation of the encoding function by training the poison graph using unsupervised graph contrastive learning, and as a result, to reduce the accuracy of downstream classification tasks that use the encoding function. The downstream classification tasks are assumed to be node classification, which classifies the class of nodes in the graph, and link prediction, which predicts whether links exist between each node.
[0019] A poison graph is created by selecting effective edges from a clean graph to reduce the accuracy of the embedding representation of the encoding function, and modifying them little by little. Specifically, an attacker generates a poison graph by, for example, following the steps below.
[0020] 1. Create a surrogate model S of the unsupervised graph contrast learning method to be attacked. 2. The graph data G is trained using a surrogate model S, and the parameter-optimized encoding function f(·) and the projection function g(·) used for contrastive training are used to perform K data augmentation operations and calculate the loss function L of the surrogate model S. 3. Calculate the gradient of L with respect to the adjacency matrix, select the value of the adjacency matrix that maximizes the absolute value of the gradient, invert one value of the adjacency matrix so as to maximize L, and obtain a poison graph PG = {A', X} containing the poison edges. 4. Repeat steps 2 and 3 on PG a set number of times to obtain the final PG = {A',X}.
[0021] [How to remove poisonous edges] The poison edge removal device 1 of this embodiment removes the poison edges from the poison graph PG that contains the poison edges created in this way, and creates a clean graph G clean Output.
[0022] FIG. 1 is a diagram showing the functional configuration of a poison edge removal device 1 in this embodiment. The poison edge removal device 1 is an information processing device (computer) such as a server or a personal computer that is equipped with a control unit 10, a storage unit 20, and various input / output interfaces.
[0023] The control unit 10 is a part that controls the entire poison edge removal device 1, and realizes each function in this embodiment by appropriately reading and executing various programs stored in the storage unit 20. The control unit 10 may be a CPU.
[0024] The storage unit 20 is a storage area for various programs for causing the hardware group to function as the poison edge removal device 1, various data, and the like, and may be a ROM, a RAM, a flash memory, a hard disk drive (HDD), or the like. Specifically, the storage unit 20 stores a program (poison edge removal program) for causing the control unit 10 to execute each function of this embodiment, as well as parameters of a target unsupervised contrastive learning model, graph data, and the like.
[0025] The control unit 10 includes a graph learning unit 11, an expression acquisition unit 12, a gradient calculation unit 13, an adjacency matrix conversion unit 14, and an output unit 15. The poisonous edge removal device 1 operates these functional units to output a clean graph in which poisonous edges have been removed from the graph to be processed.
[0026] Graph learning unit 11 learns a graph consisting of an adjacency matrix indicating edges and feature quantities of nodes using an unsupervised graph contrastive learning model, and optimizes an encoding function for acquiring an embedding representation of a node.
[0027] The representation acquisition unit 12 generates a plurality of extended graphs by performing a data extension operation on the graph, and acquires an embedded representation for each node of the extended graphs using the encoding function optimized by the graph learning unit 11. At this time, the expression acquisition unit 12 may generate two types of graph sets by performing a data augmentation operation on the graphs, following the usual procedure of contrastive learning.
[0028] The gradient calculation unit 13 sums up gradients related to the adjacency matrix for an objective function related to the distance from the center of gravity of the embedded representation calculated for each of the multiple extended graphs. When two types of graph sets are generated in the expression acquisition unit 12, the gradient calculation unit 13 sums up the gradients of the two types of graph sets.
[0029] The adjacency matrix conversion unit 14 preferentially selects one element of the adjacency matrix having a large (maximum) absolute value of the gradient calculated by the gradient calculation unit 13, and inverts the value so as to maximize the objective function.
[0030] Output unit 15 repeats the processes of graph learning unit 11, expression acquisition unit 12, gradient calculation unit 13, and adjacency matrix conversion unit 14 a predetermined number of times, and outputs the converted graph.
[0031] FIG. 2 is a flowchart showing the procedure of the poison edge removal method in this embodiment. In step S1, the graph learning unit 11 inputs a poison graph PG={A',X} that contains poison edges, and trains it using an unsupervised graph contrastive learning model to obtain an encoding function f(·) with optimized parameters. Here, A∈{0,1} N×N , X∈R N×F where N and F are the number of nodes in the graph and the number of dimensions of the features of each node, respectively.
[0032] In step S2, the expression acquisition unit 12 performs two types of data expansion operations M times each to generate two types of graph sets PG1 k =(A1 k ,X1 k ) and PG2 k =(A2 k ,X2 k ), where 1≦k≦M.
[0033] In step S3, the expression acquisition unit 12 uses the encoding function f(·) and the projection function g(·) to obtain PG1 k and PG2 k The embedding representation of a node in e1 k =g{f(A1 k ,X1 k )} and e2 k =g{f(A2 k ,X2 k )}, respectively.
[0034] In step S4, the gradient calculation unit 13 calculates e1 k ={e 1,i k |1≦i≦N} and e2 k ={e 2,i k Center of gravity g1 in |1≦i≦N} k and g2 k are calculated respectively.
[0035] In step S5, the gradient calculation unit 13 calculates the objective function as follows:
number
[0036] In step S6, the gradient calculation unit 13 calculates PG1 k and PG2 k Adjacency matrix A1 in k and A2 k The gradient of L' with respect to Δ1 k , Δ2 k are calculated as follows, respectively:
number
[0037] In step S7, the adjacency matrix transformation unit 14 calculates the overall gradient Δ=Σ k=1 M (Δ1 k +Δ1 k ), and then select one element of A' corresponding to the edge with the largest absolute value of the gradient. Then, invert the value (0 or 1) to maximize L', generate a new adjacency matrix A', and obtain a new graph PG' = {A',X}.
[0038] In step S8, the control unit 10 repeats the processes from steps S1 to S7 σ times. That is, if the number of times is less than σ, the process returns to step S1.
[0039] In step S9, the output unit 15 outputs the graph G after the poison edge removal process. clean Output.
[0040] This algorithm can be formulated as the following optimization problem.
number
[0041] According to this embodiment, the poison edge removal device 1 removes edges that contribute to a poisoning attack from a poison graph used in a poisoning attack against unsupervised graph comparison learning, thereby removing the influence of the poison graph. Attackers modify the adjacency matrix little by little when creating a poison graph, and focusing on the tendency that embedded representations of nodes affected by poisonous edges tend to be distributed near the center of gravity of the entire embedded representation, the poison edge removal device 1 modifies the adjacency matrix little by little so that the embedded representation of the node moves away from the center of gravity. Therefore, since the poison edge removal device 1 performs an adjacency matrix modification process that utilizes characteristics regarding the distribution of the embedded representation of nodes in the poison graph, it becomes possible to prevent poisoning attacks against unsupervised graph comparative learning without using labeled data.
[0042] Even if a learning method that is resistant to attacks is proposed, such a learning method proposes a new objective function assuming that the data contains poisonous data. Therefore, an attacker can use the countermeasure learning method to launch a new attack. In contrast, the poisonous edge removal device 1 removes poisonous data from the graph used for learning as a pre-processing step for learning, and is therefore resistant to attacks that utilize learning techniques.
[0043] Furthermore, the poison edge removal device 1 can easily generate clean graphs by utilizing existing procedures by generating two types of graph sets using the data augmentation process used in contrastive learning.
[0044] In addition, since the embedding representation of nodes using unsupervised graph contrast learning is a common element in all contrast learning methods, it is expected to be effective in preventing the effects of poisoning attacks, regardless of which contrast learning method an attacker uses to create poison data.
[0045] In addition, according to this embodiment, for example, poisoning attacks against unsupervised graph comparison learning can be prevented without using labeled data, making it possible to contribute to Goal 9 of the United Nations-led Sustainable Development Goals (SDGs), which is to "build resilient infrastructure, promote sustainable industrialization and foster innovation."
[0046] Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Furthermore, the effects described in the above-described embodiments are merely a list of the most preferable effects resulting from the present invention, and the effects of the present invention are not limited to those described in the embodiments.
[0047] The poison edge removal method by the poison edge removal device 1 is realized by software. When realized by software, the programs constituting this software are installed in an information processing device (computer). These programs may be recorded on removable media such as CD-ROMs and distributed to users, or may be distributed by being downloaded to the user's computer via a network. Furthermore, these programs may be provided to the user's computer as a Web service via a network without being downloaded. [Explanation of symbols]
[0048] 1. Poison Edge Removal Device 10 Control section 11 Graph Learning Unit 12 Expression acquisition part 13 Gradient Calculation Unit 14 Adjacency matrix transformation unit 15 Output section 20 Memory section
Claims
1. a graph learning unit that learns a graph consisting of an adjacency matrix indicating edges and feature quantities of nodes using an unsupervised graph contrastive learning model and optimizes an encoding function for acquiring embedding representations of the nodes; a representation acquisition unit that generates a plurality of extended graphs by performing a data extension operation on the graph, and acquires an embedding representation of each node of the extended graphs using the encoding function; a gradient calculation unit that sums gradients of the adjacency matrix for an objective function related to a distance from a center of gravity of the embedded representation calculated for each of the multiple extended graphs; an adjacency matrix transformation unit that preferentially selects one element of the adjacency matrix having a large absolute value of the gradient, and inverts the value so as to maximize the objective function; A poison edge removal device comprising: an output unit that repeats the processing of the graph learning unit, the expression acquisition unit, the gradient calculation unit, and the adjacency matrix conversion unit a predetermined number of times, and outputs a converted graph.
2. the expression acquisition unit generates two types of graph sets by performing a data augmentation operation on the graph; The poisonous edge removal device according to claim 1 , wherein the gradient calculation unit sums up the gradients of the two types of graph sets.
3. A graph learning step of learning a graph consisting of an adjacency matrix indicating edges and feature quantities of nodes using an unsupervised graph contrastive learning model and optimizing an encoding function for acquiring embedding representations of nodes; a representation acquisition step of generating a plurality of extended graphs by performing a data extension operation on the graph, and acquiring an embedding representation of each of the nodes of the extended graphs using the encoding function; a gradient calculation step of summing gradients of the adjacency matrix for an objective function related to a distance from a center of gravity of the embedded representation calculated for each of the multiple extended graphs; an adjacency matrix transformation step of preferentially selecting one element of the adjacency matrix having a large absolute value of the gradient and inverting the value so as to maximize the objective function; The poison edge removal method is executed by a computer, the poison edge removal method including: repeating the processes of the graph learning step, the expression acquisition step, the gradient calculation step, and the adjacency matrix transformation step a predetermined number of times; and outputting the transformed graph.
4. 3. A poison edge removal program for causing a computer to function as the poison edge removal device according to claim 1.
Citation Information
Patent Citations
Trusted graph data node classification method, system, computer device and application
US20220222536A1
Training graph neural networks using a de-noising objective
WO2022248735A1
