Graph information processing device, method, and program
The graph information processing device addresses cold-start and popularity bias in GNN-based recommendation systems by dynamically adjusting local and global message processing based on learning and inference modes, enhancing recommendation accuracy and reducing overfitting.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- KK TOSHIBA
- Filing Date
- 2025-01-16
- Publication Date
- 2026-07-29
AI Technical Summary
Existing recommendation systems using Graph Neural Networks (GNNs) face issues such as the cold-start problem and popularity bias, where less frequently purchased items are less likely to be recommended, and frequently purchased items dominate recommendations, while adding a Global Attention term can lead to overfitting and performance degradation.
A graph information processing device that includes an acquisition unit, calculation units for local and global messages, a mixing unit, a switch unit, and an update unit, which adjusts weights based on learning or inference modes to improve performance by selectively updating node information.
The device enhances recommendation system performance by mitigating cold-start and popularity bias issues while reducing overfitting, improving accuracy and adaptability to different scenarios.
Smart Images

Figure 2026122712000001_ABST
Abstract
Description
[Technical Field]
[0001] Embodiments of the present invention relate to a graph information processing device, method, and program. [Background technology]
[0002] Purchase data can be treated as graph data, where users and items are represented as nodes, and purchase relationships between users and items, as well as co-purchase relationships between items, are represented as edges. In particular, recommendation systems that recommend items to users using graph analysis techniques such as Graph Neural Networks (GNNs) for bipartite graphs that focus on purchase relationships between users and items are attracting attention.
[0003] Recommendation system technology using GNNs incorporates high-dimensional relationships based on edges between users and items, extracting characteristics of both users and items. However, because this recommendation system technology recommends items to users based on past purchase history, it may encounter problems such as the cold-start problem, where items not frequently purchased by other users are less likely to be recommended, and popularity bias, where only items frequently purchased by other users tend to be recommended.
[0004] One method to mitigate the above problem is to add a Global Attention term to each graph convolutional layer of a GNN that performs processing multiple times using graph convolutional layers that aggregate node information based on edges (hereinafter referred to as the conventional method). The Global Attention term consists of a key matrix, a query matrix, and a value matrix, and is calculated, for example, by multiplying the Attention Weight (which is the product of the query matrix and key matrix normalized by the Softmax function) with the value matrix. In this case, one convolutional layer of a GNN that takes the Global Attention term into account can be modeled as shown in equation (1) below.
[0005]
number
[0006] In equation (1), the first term is a general graph convolutional network (GCN) term that aggregates node information based on edges, and the second term is a global attention term. Specifically, E is a matrix in which node information (vectors) are arranged, and E l This shows the query matrix and the value matrix, E lT represents the key matrix. Here, the superscript l (L) indicates the i-th layer of the graph convolution layer, and the superscript T indicates the transpose. Therefore, E l is the information matrix of the i-th layer node. β represents the coefficient of the Global Attention term, M represents the adjacency matrix that expresses the edge connection relationships between nodes, and σ represents the Softmax function.
[0007] According to equation (1), the conventional method mixes the information from the GCN term and the Global Attention term in the i-th layer and uses it as node information for the next (i+1)th layer. Furthermore, in the conventional method, the Global Attention term in a GNN can be interpreted as calculating an Attention Weight between a target node and the nodes in the graph, and aggregating the node information to the target node according to the calculated Attention Weight. Therefore, in the conventional method, by making the coefficient of the Global Attention term negative, the similarity between nodes can be reduced and the classification performance of nodes can be improved.
[0008] Furthermore, the Global Attention term in conventional methods can also be viewed as a pseudo-edge, with the Attention Weight being treated as a pseudo-edge. When considering the application of conventional methods to recommendation system technology, these pseudo-edges can become pseudo-purchase relationships. Therefore, it is expected that this approach can be used to artificially reduce and add purchases for items with high or low purchase history, thereby mitigating problems such as the cold-start problem and popularity bias.
[0009] On the other hand, with conventional methods, adding a Global Attention term can lead to an increase in the learnable weight matrix of the GNN and further learning of similarities between nodes, potentially causing overfitting of the training data. Therefore, a decrease in performance is a concern with conventional methods. [Prior art documents] [Non-patent literature]
[0010] [Non-Patent Document 1] Xiaojun Guo et al., “ContraNorm: A Contrastive Learning Perspective on Oversmoothing and Beyond”, 2023. [Overview of the project] [Problems that the invention aims to solve]
[0011] The problem that this invention aims to solve is to provide a graph information processing device, method, and program that can improve performance. [Means for solving the problem]
[0012] A graph information processing apparatus according to an embodiment includes an acquisition unit, a first calculation unit, a second calculation unit, a mixing unit, a switch unit, an update unit, and an output control unit. The acquisition unit acquires processing mode information including a learning mode or an inference mode, and graph data. The first calculation unit calculates a local message obtained by aggregating a plurality of node information, which is information of a plurality of nodes, based on a connection relationship between a plurality of nodes in the graph data. The second calculation unit calculates a global message obtained by adding a plurality of node information based on a similarity between a plurality of nodes. The mixing unit mixes the local message and the global message based on a weight of a weighted average to update a plurality of node information. The switch unit does not output a flag when the processing mode information is the learning mode, and outputs a flag when the processing mode information is the inference mode. The update unit updates a weight according to the presence or absence of an input of the flag. The output control unit outputs the updated plurality of node information.
Brief Description of Drawings
[0013] [Figure 1] A block diagram illustrating the configuration of a graph information processing apparatus according to a first embodiment. [Figure 2] A diagram showing a specific example of graph data in the first embodiment. [[ID=】] [Figure 3] A flowchart illustrating the operation of a graph information processing apparatus according to a first embodiment. [Figure 4] A block diagram illustrating the configuration of a graph feature extraction unit in a modification of the first embodiment. [Figure 5] A diagram showing a specific example of graph data in the second embodiment. [Figure 6] A block diagram illustrating the configuration of a graph information processing apparatus according to a third embodiment. [Figure 7] A flowchart illustrating the operation of a graph information processing apparatus according to a third embodiment. [Figure 8] A diagram showing a specific example of graph data in the third embodiment. [Figure 9] A block diagram illustrating the configuration of a graph information processing apparatus according to a fourth embodiment. [Figure 10] A flowchart illustrating the operation of a graph information processing device according to the fourth embodiment. [Figure 11] A table showing evaluation scores for multiple datasets using multiple inference methods, including the inference method of the embodiment. [Figure 12] A block diagram illustrating the hardware configuration of a computer according to one embodiment. [Modes for carrying out the invention]
[0014] The following describes an embodiment of the graph information processing device with reference to the drawings. The graph data handled by the graph information processing device is data that represents a graph structure. A graph structure represents the relationships between multiple users, objects, etc., using a combination of nodes and edges. Nodes are vertices in the graph structure. Edges are the connections between nodes.
[0015] Specific examples of graph data include: (1) purchase data with users and items as nodes and purchase relationships between users and items, and co-selling relationships between items as edges; (2) social network data with users as nodes and friendship relationships between users as edges; (3) molecular structure data with atoms as nodes and connection relationships between atoms as edges; (4) supply chain data with companies as nodes and transaction relationships between companies as edges; (5) electrical circuit data with circuit elements as nodes and connection relationships between circuit elements as edges; and (6) citation relationship data with papers and web pages as nodes and citation relationships between papers and web pages as edges. The following embodiment will describe an example using (1) purchase data.
[0016] Furthermore, the graph information processing device will use a machine learning model (a machine learning model) that learns from this graph data. As a machine learning method, for example, a GNN, a type of deep neural network (DNN), will be used. In other words, the machine learning model in this embodiment is a GNN model.
[0017] (First embodiment) Figure 1 is a block diagram illustrating the configuration of a graph information processing device according to the first embodiment. As illustrated in Figure 1, the graph information processing device 10 according to the first embodiment includes an acquisition unit 110, a graph feature extraction unit 120 (extraction unit), a switch unit 130, a weighting update unit 140 (update unit), and an output control unit 150. The graph feature extraction unit 120 also includes a local message calculation unit 121 (first calculation unit), a global message calculation unit 122 (second calculation unit), and a message mixing unit 123 (mixing unit).
[0018] The acquisition unit 110 acquires processing mode information and graph data. The processing mode information is information that determines the processing mode of the graph information processing device 10. The processing mode information includes either a learning mode or an inference mode. The learning mode indicates a state in which the values of the learnable weight matrix in each part of the graph feature extraction unit 120 are updated. The inference mode indicates a state in which the values of the learnable weight matrix in each part of the graph feature extraction unit 120 are not updated. The graph data consists of, for example, two or more nodes and one or more edges. The acquisition unit 110 outputs the processing mode information to the switch unit 130 and the graph data to the local message calculation unit 121 and the global message calculation unit 122.
[0019] Each node may have attribute information such as labels, categories, and parameters as initial values. Each node may also have information about its order in graph theory, i.e., the number of edges connected to it, as an initial value. Furthermore, the attribute information of each node may be quantified by an embedding vector obtained by calculating node information based on the co-occurrence relationships of nodes included in a path obtained by randomly walking nodes based on edges, such as in Deepwalk and node2vec.
[0020] The various pieces of information possessed by the nodes described above may be collectively referred to as "node information." Alternatively, the node information of multiple nodes included in the graph data may be collectively referred to as "multiple node information." Furthermore, node information may also include learnable weights.
[0021] The graph data acquired by the acquisition unit 110 may contain initialized node information for multiple nodes. The initialization method may be a uniform random number generator or a general method such as Xavier's.
[0022] Figure 2 shows a specific example of graph data in the first embodiment. For example, as shown in Figure 2, the graph data GD1 in the first embodiment represents the relationship between users N11, N12, N13 and items N21, N22, N23, N24, N25 using edges E1, E2, E3, E4, E5, E6, and E7.
[0023] Edges E1, E2, and E3 connect user N11 to items N21, N23, and N24, respectively. Edges E4 and E5 connect user N12 to items N22 and N25, respectively. Edges E6 and E7 connect user N13 to items N23 and N24, respectively.
[0024] The local message calculation unit 121 receives graph data from the acquisition unit 110. Based on the connection relationships between multiple nodes in the graph data, the local message calculation unit 121 calculates a local message that aggregates the information of multiple nodes. The local message calculation unit 121 outputs the calculated local message to the message mixing unit 123. Note that the information of multiple nodes may be processed by normalization, the tanh function, or the Softmax function when calculating the local message. In addition, multiple of these processes may be combined. Furthermore, feature transformation may be performed before and after processing using a learnable weight matrix.
[0025] Specifically, the local message calculation unit 121 aggregates information from multiple nodes using, for example, one of the following equations (2) to (4), and calculates a local message.
[0026]
number
[0027]
number
[0028]
number
[0029] Equation (2) is LightGCN. u This indicates the local message of the target node u. Also, e i This indicates the information of source node i (node information), and N u and N i |*| represents the set of nodes connected to the target node u and the source node i, respectively (node set), and |*| represents the number of nodes included in the node set. According to equation (2), the aggregation method used is the mean, which is the average value of the number of neighboring nodes of the target node u and the source node i.
[0030] Other aggregation methods may include the maximum value (max) in equation (3) or the sum (sum) in equation (4). Alternatively, instead of the LightGCN described above, a graph neural network with a message-passing mechanism that performs aggregation calculations of multiple node information based on other edges (e.g., GCN, NGCF (Neural Graph Collaborative Filtering), or MPNNs (Message Passing Neural Networks)) may be used. Furthermore, the above graph neural networks may include learnable weights.
[0031] Local messages may be processed by normalization, the tanh function, or the Softmax function. Furthermore, a combination of these processes may be used. Feature transformations may also be performed before and after processing using a learnable weight matrix.
[0032] The global message calculation unit 122 receives graph data from the acquisition unit 110. The global message calculation unit 122 calculates a global message by summing up the information of multiple nodes based on the similarity between multiple nodes in the graph data. The global message calculation unit 122 outputs the calculated global message to the message mixing unit 123. Note that the information of multiple nodes may be processed by normalization, the tanh function, or the Softmax function when calculating the global message. In addition, multiple of these processes may be combined. Furthermore, feature transformation may be performed before and after processing using a learnable weight matrix.
[0033] Specifically, the global message calculation unit 122 calculates the global message using, for example, the Global Attention method shown in equation (5) below.
[0034]
number
[0035] In equation (5), A represents a matrix of global messages of the nodes, and E represents a matrix of node information (query matrix and value matrix), and E T σ represents the key matrix, and σ represents the Softmax function.
[0036] Furthermore, the order of operations in equation (5) may be changed. For example, the global message calculation unit 122 may calculate the global message using the following equation (6).
[0037]
number
[0038] Equation (5) above shows that the dot product of the query matrix and the key matrix is calculated, and then the Softmax function is applied in the node dimension direction. On the other hand, equation (6) shows that the dot product of the key matrix and the value matrix is calculated, and then the Softmax function is applied in the feature dimension direction. As a result, the process in equation (6) can reduce the computational complexity compared to the process in equation (5).
[0039] Note that the attention mechanism used to calculate the global message may be a method other than the Global Attention described above. For example, the attention mechanism may be Additive Attention, Dot-product Attention, or Linear Attention. Additive Attention is a method that concatenates the query matrix and the key matrix and calculates the attention weight using FFN and the Softmax function. Dot-product Attention is a method that calculates the product of the query matrix and the key matrix and calculates the attention weight using the Softmax function. Linear Attention is a method that first calculates the product of the key matrix and the value matrix, and then calculates the product with the query matrix. Dot-product Attention and Linear Attention correspond to equations (5) and (6), respectively. Note that σ in equations (5) and (6), etc., may be normalized or the tanh function used instead of the Softmax function.
[0040] The message mixing unit 123 receives weight information from the weight update unit 140, local messages from the local message calculation unit 121, and global messages from the global message calculation unit 122. The weight information is the weight information for weighted average. The message mixing unit 123 mixes the local messages and the global messages based on the weights of the weighted average, and updates a plurality of node information. The message mixing unit 123 outputs the weight information, the local messages, and the global messages to the weight update unit 140, and outputs the updated plurality of node information to the weight update unit 140 and the output control unit 150. Incidentally, the weights of the weighted average used in the message mixing unit 123 may be referred to as "the weights of the message mixing unit 123".
[0041] Specifically, the message mixing unit 123 calculates node information using, for example, the following formula (6).
[0042]
Equation
[0043] In Equation (7), e u represents the information of the target node u (node information), a u represents the global message of the target node u, and α represents the weight coefficient of the weighted average. Here, the message mixing unit 123 may set the initial value of the weight of the weighted average to a negative value. Also, the weight of the weighted average may be a learnable weight.
[0044] Incidentally, at least one of the local messages, the global messages, and the plurality of node information may be feature-transformed by a learnable weight matrix either before or after the processing of the message mixing unit 123. Also, at least one of the local messages, the global messages, and the plurality of node information may be processed by an activation function such as the ReLU and tanh functions.
[0045] The switch unit 130 receives processing mode information from the acquisition unit 110. The switch unit 130 determines whether or not to output an update flag based on the processing mode information. If the processing mode information is learning mode, the switch unit 130 does not output an update flag to the weighted update unit 140, and if the processing mode information is inference mode, it outputs an update flag to the weighted update unit 140.
[0046] The weighted update unit 140 receives weight information, local messages, global messages, and updated node information from the message mixing unit 123, and receives an update flag from the switch unit 130. The weighted update unit 140 does not update the weights of the message mixing unit 123 if the update flag is not input. On the other hand, if the update flag is input, the weighted update unit 140 updates the weights of the message mixing unit 123 under predetermined conditions. The predetermined conditions are, for example, to reduce the absolute value of the weights (updating them to values closer to zero than before). The weight update is performed, for example, by actually evaluating the performance using the input information (e.g., weight information, local messages, global messages, and updated node information) and determining the weighted average weight that maximizes performance. The weighted update unit 140 updates the weights of the message mixing unit 123 by outputting the weight information to the message mixing unit 123.
[0047] Specifically, when the weighting update unit 140 updates the weights of the message mixing unit 123 (i.e., when it is desired to operate in inference mode), the weight coefficient α test Weight information including is output to the message mixing unit 123. As a result, the message mixing unit 123 outputs the weight coefficient α, which is the initial value set in the learning mode operation. train However, the weight coefficient α of the inference mode test It will be changed to this.
[0048] Here, the weight coefficient α train and weight coefficient α test The relationship may be set such that it satisfies the following equation (8).
[0049]
number
[0050] According to equation (8) above, the weight coefficient α of the inference mode test This is the weight coefficient α of the learning mode. train It is a value that is greater than (i.e., the initial value) and less than or equal to zero.
[0051] The output control unit 150 receives updated node information from the message mixing unit 123. The output control unit 150 outputs the updated node information to an external device. The external device may be a display device such as a display, or a server on a network.
[0052] The configuration of the graph information processing device 10 according to the first embodiment has been described above. Next, the operation of the graph information processing device 10 according to the first embodiment will be explained using the flowchart in Figure 3.
[0053] Figure 3 is a flowchart illustrating the operation of the graph information processing device according to the first embodiment. The processing in the flowchart of Figure 3 begins, for example, when a data processing program is selected by the user and the data processing program is executed by the processor.
[0054] (Step S101) The acquisition unit 110 acquires processing mode information and graph data.
[0055] (Step S102) The graph information processing device 10 determines whether the processing mode information is in learning mode or not. If it is determined that the processing mode is in learning mode, the process proceeds to step S103. If it is determined that the processing mode is not in learning mode (i.e., if it is determined that the processing mode is in inference mode), the process proceeds to step S106.
[0056] (Step S103) The local message calculation unit 121 calculates local messages based on graph data.
[0057] (Step S104) The global message calculation unit 122 calculates the global message based on the graph data.
[0058] (Step S105) The message mixing unit 123 mixes local messages and global messages based on the initial values of the weighted average weights and updates the node information. After step S105, the process proceeds to step S111.
[0059] (Step S106) The switch unit 130 outputs an update flag.
[0060] (Step S107) The weighting update unit 140 updates the weighted average weights.
[0061] (Step S108) The local message calculation unit 121 calculates local messages based on graph data.
[0062] (Step S109) The global message calculation unit 122 calculates the global message based on the graph data.
[0063] (Step S110) The message mixing unit 123 mixes local messages and global messages based on the updated weighted average weights and updates the node information.
[0064] (Step S111) The output control unit 150 outputs node information. After step S111, the flowchart in Figure 3 ends.
[0065] As described above, the graph information processing device according to the first embodiment acquires processing mode information including a learning mode or an inference mode and graph data, calculates a local message which aggregates the information of multiple nodes based on the connection relationships between multiple nodes of the graph data, calculates a global message which is the sum of the information of multiple nodes based on the similarity between multiple nodes, mixes the local message and the global message based on the weighted average weights, updates the information of multiple nodes, does not output a flag when the processing mode information is in learning mode, outputs a flag when the processing mode information is inference mode, updates the weights according to whether or not the flag is input, and outputs the updated information of multiple nodes.
[0066] Therefore, the graph information processing device according to the first embodiment can improve performance by switching the weights of the weighted average when mixing local messages and global messages between the learning mode and the inference mode.
[0067] (Modified version of the first embodiment) In the first embodiment, a configuration was described in which the graph feature extraction unit performs a series of processes once: the calculation of local messages by the local message calculation unit, the calculation of global messages by the global message calculation unit, and the updating of multiple node information by the message mixing unit. On the other hand, a modification of the first embodiment will describe a configuration in which these series of processes are performed multiple times.
[0068] Figure 4 is a block diagram illustrating the configuration of the graph feature extraction unit in a modified example of the first embodiment. As illustrated in Figure 4, the graph feature extraction unit 120A in the modified example of the first embodiment comprises a local message calculation unit 121-1, a global message calculation unit 122-1, a message mixing unit 123-1, ..., a local message calculation unit 121-N, a global message calculation unit 122-N, and a message mixing unit 123-N. Here, N is an integer of 2 or more.
[0069] For example, the message mixing unit 123-i (N>i≧1) receives the i-th local message from the local message calculation unit 121-i and the i-th global message from the global message calculation unit 122-i. The message mixing unit 123-i mixes the i-th local message and the i-th global message and updates the multiple node information to the i-th multiple node information. The message mixing unit 123-i then outputs the i-th multiple node information to the local message calculation unit 121-(i+1) and the global message calculation unit 122-(i+1). In other words, the graph feature extraction unit 120A repeats the series of processes of calculating local messages, calculating global messages, and updating multiple node information N times.
[0070] In a modified version of the first embodiment, the output control unit may output updated node information by performing a predetermined process on at least one of the node information of the graph data acquired at the time of acquisition, and the node information of each of the multiple processes performed multiple times. The predetermined process is concatenation, maximum value, sum, or average value.
[0071] As described above, the graph information processing device according to a modified version of the first embodiment acquires processing mode information including a learning mode or an inference mode and graph data, calculates a local message which aggregates the information of multiple nodes based on the connection relationships between multiple nodes of the graph data, calculates a global message which is the sum of the information of multiple nodes based on the similarity between multiple nodes, mixes the local message and the global message based on the weighted average weights, updates the information of multiple nodes, does not output a flag when the processing mode information is in learning mode, outputs a flag when the processing mode information is inference mode, updates the weights according to whether or not the flag is input, and outputs the updated information of multiple nodes.
[0072] Furthermore, the graph information processing device according to a modified version of the first embodiment performs a series of processes multiple times, including the calculation of local messages, the calculation of global messages, and the updating of multiple node information. It then performs a predetermined process on at least one of the multiple node information of the graph data acquired and the multiple node information of each of the processes performed multiple times, and outputs the updated multiple node information.
[0073] Therefore, the graph information processing device according to the modified version of the first embodiment can improve performance by performing a series of processes, including the calculation of local messages, the calculation of global messages, and the updating of information for multiple nodes, multiple times.
[0074] (Second embodiment) In the first embodiment, even when the category of a node was known, as in the bipartite graph of user items illustrated in Figure 2, the global message was calculated without distinguishing between them. As a result, the first embodiment had the problem of aggregating node information even between nodes that did not need to aggregate node information. Therefore, in the second embodiment, Global Attention is calculated between groups (inter) or within groups (intra) using graph data classified into multiple groups.
[0075] Figure 5 shows a specific example of graph data in the second embodiment. For example, as shown in Figure 5, the graph data GD2 in the second embodiment represents the relationship between users N11, N12, N13 and items N21, N22, N23, N24, N25 using edges E1, E2, E3, E4, E5, E6, and E7. Furthermore, the graph data GD2 classifies users N11, N12, N13 into group GR1 and items N21, N22, N23, N24, N25 into group GR2. Note that the connection relationships of the edges are the same as those of the graph data GD1 in Figure 2, so the explanation is omitted.
[0076] The difference between the first and second embodiments lies in the processing of graph data classified into multiple groups in the global message calculation unit. Therefore, the processing in the global message calculation unit will be described below.
[0077] In the second embodiment, the global message calculation unit calculates a global message by summing up information from multiple nodes based on the similarity normalized for each of the multiple groups between the multiple nodes. Specifically, in the second embodiment, the global message calculation unit calculates a global message by summing up information from multiple nodes based on the similarity normalized for each of the multiple groups between a first node in the graph data and a second node belonging to one of the multiple groups. Here, the first node and the second node may belong to different groups or to the same group.
[0078] More specifically, the global message calculation unit in the second embodiment calculates global messages using, for example, the Global Attention method shown in equations (9) and (10) below. Equation (9) calculates intergroup global messages, and equation (10) calculates intragroup global messages.
[0079]
number
[0080]
number
[0081] In equations (9) and (10), U represents all users and I represents all items. Therefore, A U This shows a matrix of global messages from all user nodes, E U This shows a matrix containing information on all user nodes, E IThis represents a matrix containing information on all item nodes. Furthermore, the σ (e.g., the Softmax function) calculation can be performed for multiple groups. Also, the calculation of global messages using equations (9) and (10) does not necessarily have to be performed between all groups or within all groups. Note that instead of the Softmax function, normalization or the tanh function may be used for σ in equations (9) and (10).
[0082] In the second embodiment, the global message calculation unit comprises multiple A U After calculating, the maximum value, sum, or average value may be calculated. In addition, the global message calculation unit in the second embodiment is a matrix A which contains the global messages of all item nodes. I The same calculation applies to this as described above. Furthermore, the order of operations in equations (9) and (10) may be reversed. This is similar to the transformation from equation (5) to equation (6).
[0083] As described above, the graph information processing device according to the second embodiment acquires processing mode information including a learning mode or an inference mode and graph data, calculates a local message which aggregates the information of multiple nodes based on the connection relationships between multiple nodes of the graph data, calculates a global message which is the sum of the information of multiple nodes based on the similarity between multiple nodes, mixes the local message and the global message based on the weighted average weights, updates the information of multiple nodes, does not output a flag when the processing mode information is in learning mode, outputs a flag when the processing mode information is inference mode, updates the weights according to whether or not the flag is input, and outputs the updated information of multiple nodes.
[0084] Furthermore, the graph information processing device according to the second embodiment calculates a global message by summing up the information of multiple nodes based on the normalized similarity for each of the multiple groups between the multiple nodes.
[0085] Therefore, the graph information processing device according to the second embodiment can eliminate the aggregation of unnecessary information between nodes by calculating a global message considering multiple groups in the graph data.
[0086] (Third embodiment) In the second embodiment, Global Attention was calculated using graph data classified into a predetermined number of groups. However, the optimal group may change during training. As a result, the first embodiment had the problem of not being able to cope with changes in the group during training. Therefore, in the third embodiment, a group detection unit is added that classifies multiple nodes into multiple groups using group detection flags.
[0087] Figure 6 is a block diagram illustrating the configuration of a graph information processing device according to the third embodiment. As illustrated in Figure 6, the graph information processing device 20 according to the third embodiment includes an acquisition unit 210, a graph feature extraction unit 220, a switch unit 230, a weighting update unit 240 (update unit), an output control unit 250, and a group detection unit 260 (detection unit). The graph feature extraction unit 220 also includes a local message calculation unit 221 (first calculation unit), a global message calculation unit 222 (second calculation unit), and a message mixing unit 223 (mixing unit). The following description will focus on the third embodiment, and other aspects will be omitted as they are the same as those of the graph information processing device 10 according to the first embodiment.
[0088] The acquisition unit 210 acquires processing mode information and graph data, and also acquires a group detection flag at any time. The acquisition unit 210 outputs the graph data and group detection flag to the group detection unit 260.
[0089] The group detection unit 260 receives graph data and group detection flags from the acquisition unit 210 and updated node information from the message mixing unit 223. Based on the node information and the connection relationships between the nodes in the graph data, the group detection unit 260 classifies the nodes into multiple groups. The group detection unit 260 outputs the information classifying the nodes into multiple groups (group information) to the global message calculation unit 222.
[0090] Specifically, the group detection unit 260 classifies multiple nodes into multiple groups using a predetermined clustering method. The predetermined clustering method is, for example, k-means or spectral clustering. Also, if the graph data is a bipartite graph and each of the multiple nodes is categorized, the group detection unit 260 may classify the nodes by replacing each category with a group.
[0091] The group detection unit 260 may classify multiple nodes into multiple groups based on multiple node information of the graph data (for example, initial node information before updates) and connection information between multiple nodes of the graph data.
[0092] When the global message calculation unit 222 receives group information from the group detection unit 260, it calculates a global message by summing up the information of multiple nodes based on the normalized similarity for each of the multiple groups between multiple nodes. Here, for any group G1 and group G2 among the multiple classified groups, all nodes within group G1 are set to G1 update And all nodes within group G2 are G2 update In this case, the global message calculation unit 222 calculates the global message using, for example, the Global Attention method shown in (11) below. Note that equation (11) calculates the inter-group global message.
[0093]
number
[0094] Note that the calculation of intra-global messages within a group by the global message calculation unit 222, and the calculation of a matrix containing the global messages of all item nodes, can be the same as in the second embodiment, so the explanation is omitted. Also, the order of operations in equation (11) may be changed. This is similar to the transformation from equation (5) to equation (6).
[0095] The configuration of the graph information processing device 20 according to the third embodiment has been described above. Next, the operation of the graph information processing device 20 according to the third embodiment will be explained using the flowchart in Figure 7.
[0096] Figure 7 is a flowchart illustrating the operation of the graph information processing device according to the third embodiment. The processing in the flowchart of Figure 7 starts, for example, when a group detection flag is input during the execution of the data processing program in the first embodiment.
[0097] (Step S201) The acquisition unit 210 acquires the group detection flag.
[0098] (Step S202) The group detection unit 260 classifies nodes into groups based on graph data and node information.
[0099] (Step S203) The group detection unit 260 outputs the group information to the global message calculation unit 222. After step S203, the flowchart in Figure 7 ends.
[0100] Figure 8 shows a specific example of graph data in the third embodiment. For example, as shown in Figure 8, the graph data GD3 in the third embodiment represents the relationship between users N11, N12, N13 and items N21, N22, N23, N24, N25 using edges E1, E2, E3, E4, E5, E6, and E7. Furthermore, the graph data GD3 classifies users N11 and N12 into group GR11, user N13 into group GR12, items N21 and N22 into group GR21, and items N23, 24, and 25 into group GR22. Note that the connection relationships of the edges are the same as those of the graph data GD1 in Figure 2, so the explanation is omitted. In addition, the graph data GD3 can be considered as an example of unclassified graph data being classified into groups by the group detection unit 260. Furthermore, the graph data GD3 may also include information for group GR1, which is a grouping of the graph data GD2 in Figure 5, including groups GR11 and GR12, and information for group GR2, which is a grouping of groups GR21 and GR22.
[0101] As described above, the graph information processing device according to the third embodiment acquires processing mode information including a learning mode or an inference mode and graph data, calculates a local message which aggregates the information of multiple nodes based on the connection relationships between multiple nodes of the graph data, calculates a global message which is the sum of the information of multiple nodes based on the similarity between multiple nodes, mixes the local message and the global message based on the weighted average weights, updates the information of multiple nodes, does not output a flag when the processing mode information is in learning mode, outputs a flag when the processing mode information is inference mode, updates the weights according to whether or not the flag is input, and outputs the updated information of multiple nodes.
[0102] Furthermore, the graph information processing device according to the third embodiment further acquires a group detection flag, and if a group detection flag is acquired, it classifies the multiple nodes into multiple groups based on the graph data or the information of multiple nodes and their connection relationships.
[0103] Therefore, the graph information processing device according to the third embodiment can respond to changes in the groups being learned by classifying multiple nodes of graph data into multiple groups at any given time, and is expected to have the effect of updating the grouping of multiple nodes.
[0104] (Fourth embodiment) In the first to third embodiments, node information was calculated by focusing on the relationships between nodes in graph data. On the other hand, in the fourth embodiment, a recommendation task (link prediction) is performed as an inference mode process.
[0105] Figure 9 is a block diagram illustrating the configuration of a graph information processing device according to the fourth embodiment. As illustrated in Figure 9, the graph information processing device 30 according to the fourth embodiment includes an acquisition unit 310, a graph feature extraction unit 320 (extraction unit), a switch unit 330, a weighting update unit 340 (update unit), an output control unit 350, and a link prediction unit 370 (prediction unit). The graph feature extraction unit 320 also includes a local message calculation unit 321 (first calculation unit), a global message calculation unit 322 (second calculation unit), and a message mixing unit 323 (mixing unit). The following description will focus on the fourth embodiment, and other aspects will be omitted as they are the same as those of the graph information processing device 10 according to the first embodiment.
[0106] The link prediction unit 370 receives updated node information from the message mixing unit 323. Based on the updated nodes, the link prediction unit 370 calculates the similarity between the nodes. The similarity calculation is performed using, for example, the dot product and cosine similarity. The link prediction unit 370 outputs the similarity between the nodes as similarity information to the output control unit 350.
[0107] The output control unit 350 receives similarity information from the link prediction unit 370. The output control unit 350 outputs the similarity information to an external device. The external device may be a display device such as a display, or a server on a network.
[0108] The configuration of the graph information processing device 30 according to the fourth embodiment has been described above. Next, the operation of the graph information processing device 30 according to the fourth embodiment will be explained using the flowchart in Figure 10.
[0109] Figure 10 is a flowchart illustrating the operation of the graph information processing device according to the fourth embodiment. The process in the flowchart of Figure 10 is a replacement of part of the process in the flowchart of Figure 3. Specifically, after steps S105 and S110 in the flowchart of Figure 3, the process proceeds to step S301 in the flowchart of Figure 10.
[0110] (Step S301) The link prediction unit 370 calculates the similarity between nodes in the graph data based on the node information.
[0111] (Step S302) The output control unit 350 outputs similarity information. After step S302, the flowchart in Figure 10 ends.
[0112] As described above, the graph information processing device according to the fourth embodiment acquires processing mode information including a learning mode or an inference mode and graph data, calculates a local message which aggregates the information of multiple nodes based on the connection relationships between multiple nodes of the graph data, calculates a global message which is the sum of the information of multiple nodes based on the similarity between multiple nodes, mixes the local message and the global message based on the weighted average weights, updates the information of multiple nodes, does not output a flag when the processing mode information is in learning mode, outputs a flag when the processing mode information is inference mode, updates the weights according to whether or not the flag is input, and outputs the updated information of multiple nodes.
[0113] Furthermore, the graph information processing device according to the fourth embodiment calculates the similarity between multiple nodes based on the updated node information and outputs the calculated similarity between multiple nodes.
[0114] Therefore, the graph information processing device according to the fourth embodiment can perform link prediction as an inference mode process.
[0115] (Fifth embodiment) In the first embodiment, the weighted average weights of the message mixing unit were updated by the weighted update unit. For example, if the weights of the weighted average are zero, it is possible to update the node information without performing global message calculations by the global message calculation unit. However, the first embodiment had the problem that it was not possible to avoid calculations in the global message calculation unit. Therefore, in the fifth embodiment, the switch unit outputs a stop flag to stop calculations in the global message calculation unit. Note that the configuration of the graph information processing device according to the fifth embodiment is substantially the same as the configuration of the graph information processing device according to the first embodiment, so the following explanation will use the parts of the graph information processing device 10 in Figure 1.
[0116] The acquisition unit 110 acquires processing mode information and graph data, and also acquires stop information at any arbitrary timing. The acquisition unit 110 outputs the stop information to the switch unit 130.
[0117] The switch unit 130 receives stop information from the acquisition unit 110. The switch unit 130 determines the output of a stop flag based on the stop information. If the switch unit 130 receives stop information and the processing mode is inference mode, it outputs a stop flag to the global message calculation unit 122 and the weighting update unit 140.
[0118] The global message calculation unit 122 receives a stop flag from the switch unit 130. When the stop flag is received, the global message calculation unit 122 stops the global message calculation process. As a result, the global message calculation unit 122 does not output the global message to the message mixing unit 123.
[0119] The weighting update unit 140 receives a stop flag from the switch unit 130. When the stop flag is received, the weighting update unit 140 updates the weight of the message mixing unit 123 to zero. The weighting update unit 140 updates the weight of the message mixing unit 123 to zero by outputting weight information of zero to the message mixing unit 123.
[0120] Specifically, when the weight update unit 140 updates the weights of the message mixing unit 123 to zero (i.e., when operating in inference mode and not calculating global messages), it outputs weight information with a weight coefficient of zero to the message mixing unit 123. As a result, the message mixing unit 123 receives the weight coefficient α, which is the initial value set in learning mode. train This is changed to zero. As the weight of the message mixing unit 123 becomes zero, the node information output from the message mixing unit 123 becomes the following equation (12).
[0121]
number
[0122] As described above, the graph information processing device according to the fifth embodiment acquires processing mode information including a learning mode or an inference mode and graph data, calculates a local message which aggregates the information of multiple nodes based on the connection relationships between multiple nodes of the graph data, calculates a global message which is the sum of the information of multiple nodes based on the similarity between multiple nodes, mixes the local message and the global message based on the weighted average weights, updates the information of multiple nodes, does not output a flag when the processing mode information is in learning mode, outputs a flag when the processing mode information is inference mode, updates the weights according to whether or not the flag is input, and outputs the updated information of multiple nodes.
[0123] Furthermore, the graph information processing device according to the fifth embodiment further acquires stop information, and if stop information is acquired and the device is in inference mode, it outputs a stop flag, stops the calculation of global messages when the stop flag is output, updates the weights to zero when the stop flag is output, and updates the information of multiple nodes using only local messages when the calculation of global messages is stopped.
[0124] Therefore, the graph information processing device according to the fifth embodiment can be expected to improve computational efficiency by omitting the calculation of global messages in processing by inference mode.
[0125] (Evaluation results) Figure 11 is a table showing the evaluation scores of multiple datasets using multiple inference methods, including the inference method of the embodiment. As shown in Figure 11, Table 1100 shows the relationship between five inference methods and three datasets.
[0126] The five inference methods are (1) LightGCN+SSM(sampled softmax), (2) Light GCN+SSM+Dropout [0.1], (3) α train =α test (4)α test =0.00(Dropout), and (5)α test (Highest performance). Of these, inference methods (3) to (5) are based on the above embodiment.
[0127] The three datasets are related to location-based social networking services (SNS) (e.g., Gowalla Dataset), restaurant reviews (e.g., Yelp Dataset), and online book purchases (e.g., Amazon-Book Dataset).
[0128] The evaluation score is calculated by determining the dot product between the user and the item, and then calculating the recall rate for the top 20 ranked items predicted for each user. According to Table 1100, the evaluation scores for each of the inference methods (3) to (5) based on the embodiment are higher than the evaluation scores for the existing inference methods (1) and (2). In particular, the evaluation score is significantly higher for online book purchases.
[0129] From the above, it can be seen that the inference method of the embodiment is expected to show improved performance compared to existing inference methods.
[0130] (Hardware configuration) Figure 12 is a block diagram illustrating the hardware configuration of a computer according to one embodiment. The computer 1200 includes, as hardware, a CPU (Central Processing Unit) 1210, RAM (Random Access Memory) 1220, program memory 1230, auxiliary storage device 1240, and input / output interface 1250. The CPU 1210 communicates with the RAM 1220, program memory 1230, auxiliary storage device 1240, and input / output interface 1250 via a bus 1260.
[0131] The CPU 1210 is an example of a general-purpose processor. The RAM 1220 is used by the CPU 1210 as working memory. The RAM 1220 includes volatile memory such as SDRAM (Synchronous Dynamic Random Access Memory). The program memory 1230 stores various programs, including data processing programs. As the program memory 1230, for example, ROM (Read-Only Memory), part of the auxiliary storage device 1240, or a combination thereof is used. The auxiliary storage device 1240 stores data non-temporarily. The auxiliary storage device 1240 includes non-volatile memory such as an HDD or SSD.
[0132] The input / output interface 1250 is an interface for connecting to or communicating with other devices. The input / output interface 1250 is used, for example, to connect or communicate between the acquisition units 110, 210, and 310 shown in Figures 1, 6, and 9, respectively, and external devices (e.g., input / output devices and server devices), and between the output control units 150, 250, and 350, respectively, and external devices.
[0133] Each program stored in program memory 1230 includes a computer-executable instruction. When a program (computer-executable instruction) is executed by the CPU 1210, it causes the CPU 1210 to perform a predetermined process. For example, when a data processing program is executed by the CPU 1210, it causes the CPU 1210 to perform a series of processes described with respect to the parts in Figures 1, 6, and 9.
[0134] The program may be provided to the computer 1200 in a state where it is stored on a computer-readable storage medium. In this case, for example, the computer 1200 further includes a drive (not shown) for reading data from the storage medium and retrieving the program from the storage medium. Examples of storage mediums include magnetic disks, optical disks (CD-ROM, CD-R, DVD-ROM, DVD-R, etc.), magneto-optical disks (MO, etc.), and semiconductor memory. Alternatively, the program may be stored on a server on a communication network, and the computer 1200 may download the program from the server using the input / output interface 1250.
[0135] The processing described in the embodiments is not limited to being performed by a general-purpose hardware processor such as a CPU 1210 executing a program, but may also be performed by a dedicated hardware processor such as an ASIC (Application Specific Integrated Circuit). The term "processing circuit (processing unit)" includes at least one general-purpose hardware processor, at least one dedicated hardware processor, or a combination of at least one general-purpose hardware processor and at least one dedicated hardware processor. In the example shown in Figure 12, the CPU 1210, RAM 1220, and program memory 1230 correspond to the processing circuit.
[0136] The flowcharts described above are just examples. The order of the steps in these flowcharts can be changed as much as possible, and other steps can be added.
[0137] According to each of the above embodiments, performance can be improved.
[0138] While several embodiments of the present invention have been described, these embodiments are presented as examples only and are not intended to limit the scope of the invention. These novel embodiments can be carried out in a variety of other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their variations are included in the scope and spirit of the invention, as well as in the claims of the invention and its equivalents. [Explanation of Symbols]
[0139] 10, 20, 30…Graph information processing unit; 110, 210, 310…Acquisition unit; 120, 120A, 220, 320…Graph feature extraction unit; 121, 121-1, 121-N, 221, 321…Local message calculation unit; 122, 122-1, 122-N, 222, 322…Global message calculation unit; 123, 123-1, 123-N, 223, 323…Message mixing unit; 130, 230, 330…Switching unit; 140, 240, 340…Update unit; 150, 250, 350…Output control Unit, 260...Group detection unit, 370...Link prediction unit, 1100...Table, 1200...Computer, 1230...Program memory, 1240...Auxiliary storage device, 1250...Input / output interface, 1260...Bus, E1, E2, E3, E4, E5, E6, E7...Edge, GD1, GD2, GD3...Graph data, GR1, GR2, GR11, GR12, GR21, GR22...Group, N11, N12, N13...User, N21, N22, N23, N24, N25...Item.
Claims
1. An acquisition unit that acquires processing mode information, including learning mode or inference mode, and graph data, A first calculation unit calculates a local message which aggregates node information, which is information about the multiple nodes, based on the connection relationships between multiple nodes in the graph data, A second calculation unit calculates a global message by summing the node information based on the similarity between the plurality of nodes, A mixing unit that mixes the local messages and the global messages based on the weighted average weights and updates the information of the plurality of nodes, A switch unit that does not output a flag when the processing mode information is the learning mode, and outputs a flag when the processing mode information is the inference mode, An update unit that updates the weight according to whether or not the aforementioned flag is input, An output control unit that outputs the updated node information of the plurality of nodes and A graph information processing device equipped with the following:
2. The update unit does not update the weight if the flag is not entered. The mixing unit mixes the local message and the global message, with the weight for the global message set to a negative initial value. The graph information processing device according to claim 1.
3. The update unit updates the weight when the flag is input. The mixing unit mixes the local message and the global message, setting the weight for the global message to a value between the initial value and zero. The graph information processing apparatus according to claim 2.
4. The graph data is obtained by classifying the multiple nodes into multiple groups. The second calculation unit calculates the global message by summing the node information for each of the multiple groups based on the normalized similarity between the multiple nodes. The graph information processing device according to claim 1.
5. The acquisition unit further acquires a group detection flag, When the group detection flag is obtained, the detection unit classifies the multiple nodes into multiple groups based on the graph data or the information of the multiple nodes and the connection relationships. It further possesses, The graph information processing device according to claim 1.
6. The second calculation unit calculates the global message by summing the node information for each of the multiple groups based on the normalized similarity between the multiple nodes. The graph information processing device according to claim 5.
7. Prediction unit calculates the similarity between the multiple nodes based on the updated information of the multiple nodes. It further comprises, The output control unit outputs the calculated similarity between the plurality of nodes. The graph information processing device according to claim 1.
8. The acquisition unit further acquires stop information, The switch unit, upon acquiring the stop information and in the inference mode, outputs a stop flag. The second calculation unit stops calculating the global message when the stop flag is output. The update unit updates the weight to zero when the stop flag is output. The mixing unit updates the information of the multiple nodes using only the local messages when the calculation of the global message is stopped. The graph information processing device according to claim 1.
9. The update unit does not update the weight if the flag is not output. The mixing unit mixes the local message and the global message, with the weight for the global message set as a negative initial value. The graph information processing apparatus according to claim 8.
10. The graph data acquired has initialized node information of the plurality of nodes, The graph information processing device according to claim 1.
11. The initialization method is a uniform random number generator or a Xavier generator. The graph information processing device according to claim 10.
12. The aforementioned node information is a learnable weight. The graph information processing device according to claim 1.
13. The first computing unit aggregates the information of the multiple nodes using a graph neural network having a message passing mechanism. The graph information processing device according to claim 1.
14. The aforementioned graph neural network is a GCN (Graph Convolution Network), LightGCN, NGCF (Neural Graph Collaborative Filtering), or MPNNs (Message Passing Neural Networks). The graph information processing device according to claim 13.
15. The second calculation unit calculates the global message using an attention mechanism consisting of a key matrix, a query matrix, and a value matrix. The graph information processing device according to claim 1.
16. The attention mechanism is an Additional Attention, a Dot-product Attention, or a Linear Attention. The graph information processing device according to claim 15.
17. The series of processes, including the calculation of the local message by the first calculation unit, the calculation of the global message by the second calculation unit, and the updating of the information of the multiple nodes by the mixing unit, are performed multiple times. The output control unit performs a predetermined process on at least one of the node information of the graph data acquired and the node information of each of the multiple processes performed, and outputs the updated node information. The graph information processing device according to claim 1.
18. The predetermined processing is concatenation, maximum value, sum, or average value. The graph information processing device according to claim 17.
19. The detection unit classifies the plurality of nodes into a plurality of groups using a predetermined clustering method. The graph information processing device according to claim 5.
20. The predetermined clustering method is k-means or spectral clustering. The graph information processing device according to claim 19.
21. Computers This involves obtaining processing mode information, including learning mode or inference mode, and graph data. Based on the connection relationships between multiple nodes in the graph data, a local message is calculated by aggregating the information of multiple nodes, which is the information of multiple nodes. Based on the similarity between the aforementioned multiple nodes, a global message is calculated by summing the information of the aforementioned multiple nodes. The local message and the global message are mixed based on the weighted average weights, and the information of the multiple nodes is updated. If the processing mode information is the learning mode, the flag is not output, and if the processing mode information is the inference mode, the flag is output. The weight is updated depending on whether the aforementioned flag is entered, Outputting the updated node information mentioned above A graph information processing method comprising the following:
22. Computers, A means for acquiring processing mode information, including a learning mode or inference mode, and graph data, A means for calculating a local message which aggregates node information, which is information about the multiple nodes, based on the connection relationships between multiple nodes in the graph data, A means for calculating a global message by summing the node information based on the similarity between the plurality of nodes, A means for mixing the local message and the global message based on the weighted average weights and updating the information of the plurality of nodes, A means that does not output a flag when the processing mode information is the learning mode, and outputs a flag when the processing mode information is the inference mode, Means for updating the weight according to whether or not the aforementioned flag is input, means for outputting the updated information of the multiple nodes A program that makes something function as such.