Graph information calculation device, graph information calculation method, and graph information calculation program

The graph information calculation device enhances feature extraction by calculating neighborhood and path structures within graphs and converting them into vectors, effectively distinguishing between graphs with different topologies and extracting more subdivided feature quantities.

JP7666085B2Active Publication Date: 2025-04-22NEC CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021063869
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-04-05
Publication Date
2025-04-22
Estimated Expiration
2041-04-05

Smart Images

  • Figure 0007666085000001
    Figure 0007666085000001
  • Figure 0007666085000002
    Figure 0007666085000002
  • Figure 0007666085000003
    Figure 0007666085000003
Patent Text Reader

Abstract

To extract more subdivided feature amounts from different graphs.SOLUTION: A graph information calculation apparatus (2) includes: a neighborhood information calculation section (21) that receives a graph as input, calculates a neighborhood structure of a vertex constituting the graph, and calculates a first set having a vertex constituting the calculated neighborhood structure as an element; a path information calculation section (22) that receives the graph as the input, calculates a path having a vertex constituting the graph as an end point, and calculates a second set having a vertex constituting the calculated path as an element; and a vector computation section (23) that receives the first set and the second set as the input and converts the first set and the second set into a vector.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a graph information calculation device, a graph information calculation method, and a graph information calculation program. [Background technology]

[0002] Information on molecular compounds, ICT (Information and Communication Technology) systems, social networks, and the like may be expressed as graphs. When performing tasks such as regression and classification on such information represented by graphs, a feature extraction process may be performed as a preprocessing step to extract features expressed as vectors or the like from the graph. This feature extraction process requires that features different from those extracted from a graph having a certain structure be extracted from a graph having a different structure. Therefore, the accuracy of this feature extraction process determines the success or failure of subsequent tasks such as regression and classification.

[0003] In the following description, a graph is represented as a graph in which each vertex and each edge has a vector, and the vectors attached to the vertices and edges are called attribute vectors. Each component of the attribute vector is a real value.

[0004] One of the representative techniques used for graph feature extraction processing is the graph neural network (GNN) model. One processing unit of this GNN model consists of two processes. One process is called vertex aggregation processing, which is performed at each vertex in the graph. Hereinafter, the vertex where the vertex aggregation processing is performed is called the base point. In the vertex aggregation processing, at each base point, vertices connected to the base point by edges are collected, and a calculation is performed on the set of attribute vectors of the collected vertices. This calculation is realized, for example, by calculating the average or sum of the attribute vectors, or the maximum or minimum value of each component of the attribute vector. The other process is called conversion processing, which converts the attribute vector obtained in the previous vertex aggregation processing into a vector that may have a different dimension, and replaces the converted vector as the attribute vector of the vertex on the graph.

[0005] The GNN model updates the attribute vectors of each vertex on the graph by repeating a process of vertex aggregation and conversion as one processing unit for the input graph, converts the attribute vectors of all updated vertices into a single vector, and outputs the converted vector as a feature of the input graph.

[0006] The GNN model is proposed, for example, in Non-Patent Document 1 and Non-Patent Document 2. Non-Patent Document 1 proposes a method for classifying the vertices of a graph or the graph itself by using a GNN model for semi-supervised learning. Non-Patent Document 1 also proposes a method for aggregating the vertices of a GNN model by using the adjacency matrix of the graph.

[0007] Non-Patent Document 2 systematically organizes various GNN model forms. The GN (Graph Network) block in Non-Patent Document 2 represents one processing unit of the above-mentioned GNN model, and the conversion processing therein is realized by linear conversion or a multilayer perceptron model. [Prior art documents] [Non-patent literature]

[0008] [Non-Patent Document 1] TN Kipf and M. Welling, “Semi-supervised classification with graph convolutional networks”, At ICLR 2017. [Non-Patent Document 2] Peter W. Battaglia et al., “Relational inductive biases, deep learning, and graph networks”, arXiv:1806.01261v3, 17 Oct 2018. Summary of the Invention [Problem to be solved by the invention]

[0009] The GNN model proposed in Non-Patent Documents 1 and 2 updates the attribute vectors of the vertices that make up the graph by repeating the vertex aggregation process and the conversion process a prescribed number of times. At this time, when the number of iterations is N, the vertices collected by the vertex aggregation process for each vertex of the graph are all vertices located in an area of ​​N hops or less from the base point that is the target of the vertex aggregation process.

[0010] However, in the GNN model proposed in Non-Patent Documents 1 and 2, when vertex aggregation and conversion processes are performed on each of multiple graphs to update the attribute vectors of the vertices, the sets of attribute vectors of all vertices constituting the graphs may match between the graphs, and the features output from the GNN model may match. This is because the sets of vertices located in an area of ​​N hops or less, which are collected by the vertex aggregation process, match between the graphs.

[0011] FIG. 1 is a diagram for explaining the problem of the present disclosure. FIG. 1 shows two graphs with different topologies, in which the sets of vertices collected in the vertex aggregation process match between the graphs when N=1. In FIG. 1, each of the figures enclosed by the rounded rectangles 11 and 12 shown by the dashed lines represents one graph. The circles, triangles, squares, and hexagons in each of the graphs 11 and 12 all represent the vertices of the graph, and the line segments between the vertices represent the edges. In addition, the letters x, y, z, and w assigned to each vertex each represent an attribute vector, and different letters represent different attribute vectors.

[0012] Here, suppose that the targets of the vertex aggregation process in graphs 11 and 12 are vertices 111 and 121, respectively. In this case, the vertices collected in the vertex aggregation process for vertex 111 are vertices 112, 113, and 114, and the attribute vectors of vertices 112, 113, and 114 are w, z, and w, respectively. On the other hand, the vertices collected in the vertex aggregation process for vertex 121 are vertices 122, 123, and 124, and the attribute vectors of vertices 122, 123, and 124 are w, z, and w, respectively. Therefore, although the two graphs shown in FIG. 1 have different topologies, the sets of vertex attribute vectors collected in the vertex aggregation process for vertices 111 and 121 match.

[0013] Here, one vertex was selected from each of graphs 11 and 12, and it was confirmed that the sets of attribute vectors collected in the process of the vertex aggregation process for each of the selected vertices match, but the same can be said for other vertices. In other words, in the one-to-one mapping between the vertex sets of graphs 11 and 12, there exists a one-to-one mapping between the vertex sets of graphs 11 and 12 such that the sets of attribute vectors collected in the vertex aggregation process for each of the vertices that are mapped to each other in the one-to-one mapping match.

[0014] Therefore, when the graphs 11 and 12 shown in FIG. 1 are given as inputs to a GNN model, the GNN model will output the same feature quantity, which is a problem.

[0015] In addition, in Fig. 1, when N = 1, the feature amounts extracted from the two graphs are the same, but when N = 2, the feature amounts extracted from the two graphs may differ. Therefore, it is believed that the above-mentioned problem can be solved by increasing the number of iterations of the vertex aggregation process and the transformation process.

[0016] However, this number of iterations is a fixed value when learning and inferencing the GNN model. Therefore, the number of iterations required to capture the features output from the GNN model may differ depending on the graph, and in that case, the problem of the set of attribute vectors of the vertices used in the vertex aggregation process matching as described above may occur. Therefore, the method of increasing the number of iterations is not appropriate as a solution to the above problem.

[0017] Therefore, an object of the present disclosure is to provide a graph information calculation device, a graph information calculation method, and a graph information calculation program that can solve the above-mentioned problems and extract more detailed feature amounts from different graphs. [Means for solving the problem]

[0018] A graph information calculation device according to one aspect includes: a neighborhood information calculation unit that receives a graph as an input, calculates a neighborhood structure of vertices that configure the graph, and calculates a first set having vertices that configure the calculated neighborhood structure as elements; a path information calculation unit that receives the graph as an input, calculates paths having vertices constituting the graph as end points, and calculates a second set having the vertices constituting the calculated paths as elements; a vector operation unit that receives the first set and the second set as input and converts the first set and the second set into vectors; Equipped with.

[0019] A graph information calculation method according to one aspect includes the steps of: A graph information calculation method performed by a graph information calculation device, receiving as input a graph; calculating a neighborhood structure of vertices constituting the graph, and calculating a first set having vertices constituting the calculated neighborhood structure as elements; calculating paths having vertices constituting the graph as end points, and calculating a second set having the vertices constituting the calculated paths as elements; converting the first set and the second set into vectors; Includes.

[0020] A graph information calculation program according to one aspect includes: On the computer, A procedure that takes a graph as input; calculating a neighborhood structure of vertices constituting the graph, and calculating a first set having vertices constituting the calculated neighborhood structure as elements; calculating a path having a vertex constituting the graph as an end point, and calculating a second set having the vertices constituting the calculated path as elements; converting the first set and the second set into vectors; Execute the command. Effect of the Invention

[0021] According to the above-described aspects, it is possible to provide a graph information calculation device, a graph information calculation method, and a graph information calculation program capable of extracting finer feature amounts from different graphs. [Brief description of the drawings]

[0022] [Figure 1] FIG. 1 is a diagram illustrating a problem to be solved by the present disclosure. [Diagram 2] 1 is a block diagram showing an example of a configuration of a graph information calculation device according to an embodiment; [Diagram 3] 10A to 10C are diagrams for explaining an example of processing by a neighborhood information calculation unit according to the embodiment; [Figure 4] 11A and 11B are diagrams for explaining an example of processing by a path information calculation unit according to the embodiment; [Diagram 5]10A to 10C are diagrams for explaining an example of processing by a vector calculation unit according to the embodiment; [Figure 6] 11 is a flowchart illustrating an example of a process performed by the graph information calculation device according to the embodiment. [Figure 7] 11A to 11C are diagrams illustrating the effects of the embodiment. [Figure 8] FIG. 2 is a block diagram showing an example of a hardware configuration of a computer that realizes the graph information calculation device according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0023] Hereinafter, an embodiment of the present disclosure will be described with reference to the drawings. Note that the following description and drawings are omitted and simplified as appropriate for clarity of explanation. In addition, in each of the following drawings, the same elements are given the same reference numerals, and duplicate explanations are omitted as necessary.

[0024] <Configuration of the embodiment> First, the configuration of the graph information calculation device according to the present embodiment will be described. 2 is a block diagram showing an example of the configuration of the graph information calculation device 2 according to the present embodiment. As shown in FIG. 2, the graph information calculation device 2 according to the present embodiment includes a neighborhood information calculation unit 21, a path information calculation unit 22, and a vector operation unit 23.

[0025] The neighborhood information calculation unit 21 receives a graph as an input, calculates the neighborhood structure of the vertices that make up the input graph, and calculates a vertex set that is a set (first set) having the vertices that make up the neighborhood structure as elements. The neighborhood structure calculated by the neighborhood information calculation unit 21 is a subset of the vertex set and edge set that make up the graph, and the vertices and edges that belong to the subset are determined depending on whether a specific condition is satisfied.

[0026] The path information calculation unit 22 receives a graph as an input, calculates paths having vertices constituting the input graph as their endpoints, and calculates a set (a second set) having the vertices constituting the path as elements. Note that the set calculated by the path information calculation unit 22 may also be a set having edges constituting the path as further elements. Here, the "vertices" constituting the graph may be called "nodes," and the "line segments (edges)" may be called "edges" (the same applies hereinafter in the present application).

[0027] The vector calculation unit 23 receives as input the vertex set calculated by the neighborhood information calculation unit 21 and the set calculated by the path information calculation unit 22, converts the two input sets into vectors, and outputs the converted vectors.

[0028] <Operation of the embodiment> The operations of the neighborhood information calculation unit 21, the path information calculation unit 22, and the vector operation unit 23 will be described in more detail below.

[0029] The neighborhood information calculation unit 21 receives a graph as an input, calculates the neighborhood structure of each vertex constituting the input graph, and calculates a vertex set having the vertices constituting the neighborhood structure as elements.

[0030] Fig. 3 is a diagram for explaining a schematic example of processing by neighborhood information calculation unit 21. In Fig. 3, the input graph is graph 11 in Fig. 1, and the processing target of neighborhood information calculation unit 21 is vertex v. Moreover, rectangle 31 indicated by dashed lines represents the neighborhood structure of vertex v, and rectangle 32 indicated by dashed lines represents a vertex set having the vertices constituting neighborhood structure 31 as elements.

[0031] 3, neighborhood information calculation unit 21 receives graph 11 of FIG 1 as input, and calculates neighborhood structure 31 composed of vertex v and vertices adjacent to vertex v via edges. Then, neighborhood information calculation unit 21 calculates vertex set 32 ​​whose elements are vertices that compose neighborhood structure 31 and that are adjacent to vertex v via edges.

[0032] The neighborhood structure 31 may be a partial structure of a graph that is uniquely determined for each vertex, and may be, for example, a partial structure composed of vertices located in an area N hops or less from a vertex. Alternatively, the neighborhood structure 31 may be a partial structure that is determined in advance as a neighborhood structure for each type of vertex in the graph. Furthermore, the vertex set 32 ​​may include a base point (vertex v in the example of FIG. 1) on which the processing of the neighborhood information calculation unit 21 is performed.

[0033] The path information calculation unit 22 receives a graph as input, and for each vertex constituting the input graph, calculates a path having the vertex as an end point and the path information of the path. Here, a path is a sequence of vertices in a graph, and adjacent vertices in the sequence are adjacent to each other by an edge in the graph. Also, path information is a set having the vertices constituting the path as elements.

[0034] Fig. 4 is a diagram for explaining a schematic example of processing by the path information calculation unit 22. In Fig. 4, the input graph is the graph 11 in Fig. 1, and the processing target of the path information calculation unit 22 is the vertex v.

[0035] 4, the path information calculation unit 22 calculates a path 41 having a vertex v as an end point. Then, the path information calculation unit 22 calculates, from the calculated path 41, path information representing a set 42 having the vertices constituting the path 41 as elements.

[0036] The path information calculation unit 22 may calculate multiple paths for one vertex and calculate path information representing a set having the vertices of the multiple paths as elements. The path may be a sequence that satisfies the definition of a path, and the type of path is not limited. The path may be a path calculated by the shortest route or a random walk. Moreover, the set 42 may be a set having the edges that make up the path 41 as further elements, or may be the path information itself.

[0037] The vector calculation unit 23 receives as input, for each vertex constituting the graph, the vertex set of that vertex calculated by the neighborhood information calculation unit 21 and the vertex set calculated by the path information calculation unit 22, and converts these two sets into vectors by performing calculations on the vectors of the elements of these two sets.

[0038] Fig. 5 is a diagram for explaining a schematic example of processing by vector calculation unit 23. In Fig. 5, the processing target of vector calculation unit 23 is vertex v (see Figs. 3 and 4). Also, dashed rectangle 32 represents a vertex set calculated for vertex v by neighborhood information calculation unit 21, and dashed rectangle 42 represents a set calculated for vertex v by path information calculation unit 22.

[0039] 5, the vector calculation unit 23 performs calculations on the vectors included in the elements that make up the vertex set 32 ​​and the set 42. Through this calculation, the vector calculation unit 23 converts the vertex set 32 ​​and the set 42 into a vector 51, and outputs the converted vector 51.

[0040] This operation may be any operation that converts a set of vectors into a vector, and may be, for example, a linear conversion or a conversion using a multi-perceptron model.

[0041] Also, the vector operation unit 23 may divide the vertex set 32 ​​and the set 42 into subsets, perform different operations on each subset, and output the respective operation results. For example, the vector operation unit 23 may perform an operation to multiply the number of elements in the set 42 or its reciprocal by the vector provided at each vertex of the vertex set 32, and then perform the conversion.

[0042] The neighborhood information calculation unit 21, the path information calculation unit 22, and the vector calculation unit 23 are realized by, for example, a CPU (Central Processing Unit) of a computer that operates according to a graph information calculation program. In this case, the CPU reads the graph information calculation program from a program recording medium such as a program storage device of the computer, and operates as the neighborhood information calculation unit 21, the path information calculation unit 22, and the vector calculation unit 23 according to the graph information calculation program.

[0043] Next, the process performed by the graph information calculation device 2 according to this embodiment will be described. 6 is a flowchart for explaining an example of the progress of processing by the graph information calculation device 2 according to this embodiment. Note that in the following explanation, the explanation of the matters that have already been explained will be omitted as appropriate.

[0044] 6, first, a graph is input to the neighborhood information calculation unit 21 and the path information calculation unit 22 (step S1). Next, the neighborhood information calculation unit 21 calculates a neighborhood structure of the vertices that make up the graph input in step S1, and calculates a vertex set that has the vertices that make up the neighborhood structure as elements (step S2). Next, the path information calculation unit 22 calculates paths having the vertices constituting the graph input in step S1 as end points, and calculates sets having the vertices constituting the paths as elements (step S3).

[0045] Next, the vector operation unit 23 receives the vertex set calculated in step S2 and the set calculated in step S3 as inputs. Then, the vector operation unit 23 converts these two sets into vectors by performing an operation on the vectors included in the elements of these two sets (step S4). Thereafter, the vector calculation unit 23 outputs the vector obtained by the conversion in step S4 (step S5).

[0046] <Effects of the embodiment> As described above, according to the graph information calculation device 2 according to the present embodiment, by providing the path information calculation unit 22, it becomes possible to increase the amount of input information to the vector calculation unit 23. This makes it possible to extract more detailed feature amounts from the input graph.

[0047] The effects of this embodiment will be described in more detail below. Fig. 7 is a diagram for explaining the effect of this embodiment. Fig. 7 shows that the sets calculated by the neighborhood information calculation unit 21 and the path information calculation unit 22 are different in two graphs. 7, each of the diagrams enclosed by solid-line rectangles 71 and 72 represents one graph. Moreover, the graphs 71 and 72 are the same as the graphs 11 and 12 in FIG.

[0048] In graph 71, 711 represents the neighborhood structure calculated by neighborhood information calculation unit 21, and 713 represents a vertex set calculated from neighborhood structure 711. On the other hand, in graph 72, 721 represents the neighborhood structure calculated by neighborhood information calculation unit 21, and 723 represents a vertex set calculated from neighborhood structure 721. Here, vertex set 713 for graph 71 and vertex set 723 for graph 72 match as sets.

[0049] In graph 71, 712 represents a path calculated by path information calculation unit 22, and 714 represents a set of vertices that make up path 712. On the other hand, in graph 72, 722 represents a path calculated by path information calculation unit 22, and 724 represents a set of vertices that make up path 722. Here, set 714 for graph 71 and set 724 for graph 72 are different sets.

[0050] Moreover, the union set obtained by merging vertex set 713 and set 714 is a vertex set calculated by neighborhood information calculation unit 21 and path information calculation unit 22 from input graph 71. Moreover, the union set obtained by merging vertex set 723 and set 724 is a vertex set calculated by neighborhood information calculation unit 21 and path information calculation unit 22 from input graph 72. Here, the union set for graph 71 and the union set for graph 72 are different sets.

[0051] As described above, according to the graph information calculation device 2 of this embodiment, by providing the path information calculation unit 22, it becomes possible to distinguish between vertices that could not be distinguished by the neighborhood information calculation unit 21 alone. Therefore, the input information to the vector calculation unit 23 is increased in a form that makes it possible to distinguish between vertices, and as a result, it becomes possible to produce differences in the feature amounts extracted from the graph. This makes it possible to extract more detailed feature amounts from the input graph.

[0052] <Hardware configuration of the graph information calculation device according to the embodiment> Next, a configuration of a computer that realizes the graph information calculation device 2 according to this embodiment will be described. 8 is a block diagram showing an example of a hardware configuration of a computer 800 that realizes the graph information calculation device 2 according to this embodiment. As shown in FIG. 8, the computer 800 includes a CPU 801, a main storage device 802, an auxiliary storage device 803, an interface 804, and an input device 805.

[0053] The graph information calculation device 2 according to this embodiment is implemented in a computer 800. The operation of the graph information calculation device 2 is stored in the auxiliary storage device 803 in the form of a graph information calculation program. The CPU 801 reads out the graph information calculation program from the auxiliary storage device 803, loads it in the main storage device 802, and executes the processes described in the above embodiments according to the graph information calculation program.

[0054] The auxiliary storage device 803 is an example of a non-transient tangible medium. Other examples of non-transient tangible media include a magnetic disk, a magneto-optical disk, a CD-ROM (Compact Disk Read Only Memory), a DVD-ROM (Digital Versatile Disk Read Only Memory), and a semiconductor memory connected via an interface 804. In addition, when the graph information calculation program is distributed to the computer 800 via a communication line, the computer 800 that receives the program may load the graph information calculation program into the main storage device 802 and execute the above-mentioned processing.

[0055] In addition, a part or all of each component of the graph information calculation device 2 according to this embodiment may be realized by a general-purpose or dedicated circuit, a processor, or a combination of these. In addition, these circuits, etc. may be configured by a single chip, or may be configured by multiple chips connected via a bus. In addition, a part or all of each component may be realized by a combination of the above-mentioned circuits, etc. and a program.

[0056] In addition, when a part or all of the components of the graph information calculation device 2 according to the present embodiment are realized by a plurality of information processing devices, circuits, etc., the plurality of information processing devices, circuits, etc. may be centrally arranged or distributed. For example, the information processing devices, circuits, etc. may be realized as a client-server system, a cloud computing system, etc., in a form in which each is connected via a communication network.

[0057] The above explanation makes it clear that the present disclosure has industrial applicability, and the present disclosure can be applied, for example, in the following cases. When extracting features from graphs representing molecular compounds in the pharmaceutical industry When extracting features from graphs representing social networks or IT (Internet Technology) / communication NW (Network) systems

[0058] Although the present disclosure has been described above with reference to the embodiments, the present disclosure is not limited to the above-described embodiments. Various modifications that can be understood by a person skilled in the art can be made to the configuration and details of the present disclosure within the scope of the present disclosure. [Explanation of symbols]

[0059] 2. Graph information calculation device 21 Neighborhood information calculation unit 22 Path information calculation unit 23 Vector Calculation Section 800 Computers 801 CPU 802 Main storage 803 Auxiliary storage 804 Interface 805 Input Devices

Claims

1. a neighborhood information calculation unit that receives a graph as an input, calculates a neighborhood structure of vertices that configure the graph, and calculates a first set having vertices that configure the calculated neighborhood structure as elements; a path information calculation unit that receives the graph as an input, calculates a path in which vertices adjacent to each other by an edge in the graph are adjacent to each other, the path being a sequence of vertices having vertices constituting the graph as end points, and calculates a second set having the vertices constituting the calculated path as elements; a vector operation unit that receives the first set and the second set as input and converts the first set and the second set into vectors; A graph information calculation device comprising:

2. The vector calculation unit includes: converting the first set and the second set into vectors by performing an operation on the vectors included in the elements of the first set and the elements of the second set; The graph information calculation device according to claim 1 .

3. The vector calculation unit includes: converting the first set and the second set into vectors by multiplying the vectors at the vertices that are elements of the first set by the number of elements of the second set; The graph information calculation device according to claim 2 .

4. The vector calculation unit includes: converting the first set and the second set into vectors by multiplying the vectors at the vertices that are elements of the first set by the reciprocal of the number of elements of the second set; The graph information calculation device according to claim 2 .

5. The path information calculation unit calculating the second set having the edges constituting the calculated path as further elements; The graph information calculation device according to claim 1 .

6. A graph information calculation method performed by a graph information calculation device, receiving as input a graph; calculating a neighborhood structure of vertices constituting the graph, and calculating a first set having vertices constituting the calculated neighborhood structure as elements; calculating a path in which vertices adjacent to each other by an edge in the graph are adjacent to each other in a sequence of vertices having vertices constituting the graph as end points, and calculating a second set having the vertices constituting the calculated path as elements; converting the first set and the second set into vectors; A graph information calculation method comprising:

7. On the computer, A procedure that takes a graph as input; calculating a neighborhood structure of vertices constituting the graph, and calculating a first set having vertices constituting the calculated neighborhood structure as elements; calculating a path in which vertices adjacent to each other via an edge in the graph are adjacent to each other, the path being a string of vertices having vertices constituting the graph as end points, and calculating a second set having the vertices constituting the calculated path as elements; converting the first set and the second set into vectors; A graph information calculation program for executing the above.

Citation Information

Patent Citations

  • Training device, method for training, prediction device, method for prediction, and program

    JP2020068000A

  • JPP7371439B

  • JPP7581704B

  • Systems and methods for spatial graph convolutions with applications to drug discovery and molecular simulation

    WO2019173401A1