Node vector calculation method, node vector calculation device, and program

The method addresses the inefficiencies of existing graph embedding techniques by clustering nodes and calculating cluster vectors, reducing memory and computational demands, enabling efficient node vector calculation in large-scale graphs while maintaining effective representation.

WO2024195124A1PCT designated stage expired Publication Date: 2024-09-26NT T INC

Patent Information

Application Number
PCT/JP2023/011570
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

Existing graph embedding techniques, such as NetMF, require significant memory and computational resources when dealing with large-scale graphs, making them inefficient for calculating node vectors.

Method used

A method involving clustering processing to classify nodes, calculating cluster vectors, and then determining node vectors based on these clusters, reducing memory and computational requirements by using singular value decomposition on inter-cluster similarity matrices.

Benefits of technology

This approach significantly reduces memory and computational needs, allowing for efficient node vector calculation in large-scale graphs while maintaining effective representation of node characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023011570_26092024_PF_FP
    Figure JP2023011570_26092024_PF_FP
Patent Text Reader

Abstract

A node vector calculation method comprising: a clustering processing step for clustering graph data that indicates the relationship between nodes and edges included in a graph and thereby classifying the nodes into clusters, and for outputting cluster data indicating the classification results; a cluster vector calculation step for calculating, on the basis of the graph data, the cluster data, and a predetermined node vector length, cluster vectors representing the degrees of similarity between the clusters; and a node vector calculation step for calculating a node vector corresponding to each of the nodes on the basis of the graph data and the cluster vectors.
Need to check novelty before this filing date? Find Prior Art

Description

Node vector calculation method, node vector calculation device and program

[0001] The present invention relates to a node vector calculation method, a node vector calculation device, and a program.

[0002] In recent years, interest in graph analysis has grown. Graph embedding technology converts each node in a given graph into a vector of a specific length that reflects the graph's structure. The nodes in a graph are generally represented in formats such as adjacency lists or adjacency matrices. However, even if graph data represented in these formats were directly input into a classifier such as a support vector machine, it would be impossible to obtain classification results based on the individual characteristics of the nodes. In contrast, by representing nodes as vectors and providing these vectors to a classifier, it becomes possible to obtain classification results based on the individual characteristics of the nodes.

[0003] In other words, by representing nodes as vectors, it becomes possible to use classifiers in graph analysis. This makes graph embedding technology an important technology in graph analysis, as it allows for the diversification of graph analysis methods and reduces the time and costs required for graph analysis.

[0004] A representative graph embedding technique is a method called NetMF, disclosed in Non-Patent Document 1. This method calculates the similarity between nodes by random walk, and then uses singular value decomposition to decompose the similarity matrix between the nodes, thereby calculating an embedding vector matrix, i.e., a vector corresponding to each node.

[0005] The NetMF technique will be described below with reference to mathematical expressions. Assume that a graph G expressed by the following formula (1) is given as a graph to be embedded.

[0006]

[0007] The symbol V in blackboard bold shown in the following equation (2) on the right side of equation (1) is a symbol indicating a set of n nodes v, and in the following text, this symbol will be referred to as ``set V.''

[0008]

[0009] The symbol E in blackboard bold shown in the following equation (3) on the right side of equation (1) is a symbol indicating a set of m edges, and hereinafter in this text, this symbol will be referred to as "set E".

[0010]

[0011] That is, a graph G is a graph whose structure is specified by a set of nodes V and a set of edges E. Given a graph G represented by Equation (1) and a dimension d, NetMF calculates a vector x v In the following, when x is a vector or a matrix, it is written in bold in the formula, as in the symbol shown in the following formula (4), and is referred to as "vector x" or "matrix x" in the text.

[0012]

[0013] NetMF is a vector x that captures the structure of the graph G. v Calculate such a vector x v In order to calculate this, NetMF calculates an n×n high-order inter-node similarity matrix M shown in the following equation (5).

[0014]

[0015] In equation (5), log(·) is a function that calculates the logarithm of each element of a matrix. The matrix M′ shown in equation (5) is calculated by the following equation (6).

[0016]

[0017] In equation (6), vol(G) is the value of the volume of graph G calculated by the following equation (7), in other words, a value indicating the sum of the weights of the edges included in graph G. Note that in equation (7), A[i, j] is the element in the i-th row and j-th column of the adjacency matrix A of graph G.

[0018]

[0019] In equation (6), b is the negative sampling value and T is the window size. The matrix D is a vector 1 n is a vector of length n whose elements are all 1, then the adjacency matrix A and the vector 1 n is a diagonal matrix calculated by the following equation (8) based on

[0020]

[0021] In NetMF, singular value decomposition of the similarity matrix M is performed, and the left singular vectors corresponding to the first d singular values ​​obtained by the singular value decomposition are defined as the vector x v Let's say.

[0022] Jiezhong Qiu, Yuxiao Dong, Hao Ma, Jian Li, Kuansan Wang, and Jie Tang, “Network Embedding as Matrix Factorization: Unifying DeepWalk, LINE, PTE, and node2vec”, WSDM 2018: Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining, February 2018.

[0023] However, in the above-mentioned NetMF, when the number of nodes is n, the number of nodes is O(n 2 ) memory capacity is required, and furthermore, it takes O(n 3 ) is required. Therefore, when NetMF is applied to a large-scale graph, there is a problem that a large amount of memory and a large amount of calculation are required.

[0024] In view of the above circumstances, an object of the present invention is to provide a technique that can reduce the amount of memory and calculation required when calculating vectors of nodes included in a graph.

[0025] One aspect of the present invention is a node vector calculation method including: a clustering processing step of classifying the nodes into clusters by clustering graph data indicating the relationships between nodes and edges included in a graph, and outputting cluster data indicating the classification results; a cluster vector calculation step of calculating cluster vectors that express the similarity between the clusters based on the graph data, the cluster data, and a predetermined length of a node vector; and a node vector calculation step of calculating the node vector corresponding to each of the nodes based on the graph data and the cluster vector.

[0026] One aspect of the present invention is a node vector calculation device that includes a clustering processing unit that classifies the nodes into clusters by clustering graph data that indicates the relationships between nodes and edges included in a graph and outputs cluster data that indicates the classification results; a cluster vector calculation unit that calculates cluster vectors that express the similarity between the clusters based on the graph data, the cluster data, and a predetermined length of a node vector; and a node vector calculation unit that calculates the node vectors corresponding to each of the nodes based on the graph data and the cluster vectors.

[0027] One aspect of the present invention is a program for causing a computer to execute the above-described node vector calculation method.

[0028] According to this invention, it is possible to reduce the amount of memory and the amount of calculation required when calculating vectors of nodes included in a graph.

[0029] 1 is a block diagram showing the configuration of a node vector calculation device of a first embodiment; FIG. 2 is a flowchart showing the flow of processing by the node vector calculation device of the first embodiment; FIG. 3 is a flowchart showing a subroutine of first cluster vector calculation processing performed by a cluster vector calculation unit of the first embodiment; FIG. 4 is a flowchart showing a subroutine of second cluster vector calculation processing performed by a cluster vector calculation unit of the first embodiment; FIG. 5 is a block diagram showing the configuration of a node vector calculation device of a second embodiment; FIG. 6 is a flowchart showing a subroutine of third cluster vector calculation processing performed by a cluster vector calculation unit of the second embodiment.

[0030] (First Embodiment) Hereinafter, an embodiment of the present invention will be described with reference to the drawings. Fig. 1 is a block diagram showing the configuration of a node vector calculation device 1 according to the first embodiment. The node vector calculation device 1 includes a clustering processing unit 11, a cluster vector calculation unit 12, and a node vector calculation unit 13.

[0031] The clustering processing unit 11 classifies the nodes into clusters by clustering graph data indicating the relationships between nodes and edges included in graph G, and outputs cluster data indicating the classification results. Here, graph G is a graph whose structure is specified by the set V of nodes and the set E of edges indicated by the above-mentioned formula (1), and is assumed here to be, for example, a weighted undirected graph. Here, graph data indicating the relationships between nodes and edges included in graph G is assumed here to be, for example, data in which the relationships between nodes and edges are indicated in the form of an adjacency list including information on the weights between nodes.

[0032] The cluster vector calculation unit 12 calculates a cluster vector R that represents the similarity between clusters in the graph G based on the graph data, the cluster data, and a predetermined length d of the node vector. i The node vector calculation unit 13 normalizes the graph data so that the sum of the column direction components becomes 1 when expressed as an adjacency matrix, and calculates the normalized graph data and the cluster vector R i Based on the above, a node vector corresponding to each of the nodes included in the graph G is calculated.

[0033] 2 is a flowchart showing the flow of processing by the node vector calculation device 1. The clustering processing unit 11 imports graph data of a graph G provided from the outside (S1). The clustering processing unit 11 performs clustering on the imported graph data of the graph G using the IncMod method described in the following reference document:

[0034] [Reference: H. Shiokawa, Y. Fujiwara, and M. Onizuka, “Fast algorithm for modularity-based graph clustering”, AAAI 2013: Twenty-Seventh AAAI Conference on Artificial Intelligence, July 2013, Vol.27. No.1, Pages 1170-1176.]

[0035] The IncMod method is a method that can perform clustering processing faster and more effectively than other graph clustering methods. The clustering processing unit 11 classifies nodes included in graph data into clusters by clustering and generates cluster data that indicates the classification results.

[0036] The cluster data generated by the clustering processing unit 11 includes data indicating which cluster a node belongs to, data indicating which clusters an edge exists between, and the number of clusters p indicating how many clusters the node has been classified into. Note that the number of clusters p is not a predetermined value, but a value obtained by the clustering processing unit 11 performing clustering on the imported graph data. When the graph data to be clustered is replaced, the clustering processing unit 11 calculates the number of clusters p corresponding to the replaced graph data.

[0037] The clustering processing unit 11 outputs the graph data of graph G and the cluster data to the cluster vector calculation unit 12 (S2). The cluster vector calculation unit 12 takes in the graph data of graph G and the cluster data output by the clustering processing unit 11. The cluster vector calculation unit 12 takes in the length d of the node vector given from outside. The length d of the node vector is predetermined, for example, by the user of the node vector calculation device 1 (S3).

[0038] The cluster vector calculation unit 12 determines whether the length d of the imported node vector is greater than the number p of clusters included in the cluster data (S4). If the cluster vector calculation unit 12 determines that the length d of the node vector is not greater than the number p of clusters, that is, that the length d of the node vector is equal to or less than the number p of clusters (S4, No), the cluster vector calculation unit 12 starts the subroutine of the first cluster vector calculation process shown in FIG. 3 (S5).

[0039] (Subroutine of First Cluster Vector Calculation Process in First Embodiment) The cluster vector calculation unit 12 generates an adjacency matrix A from the graph data of the imported graph G in the form of an adjacency list (Sa1).

[0040] The cluster vector calculation unit 12 generates a counter i and a counter j in an internal storage area, and initializes the counter i and the counter j to "1".

[0041] Based on the generated adjacency matrix A and the cluster data, the cluster vector calculation unit 12 calculates the similarity S[i, j], which is an element of the inter-cluster similarity matrix S, whose number of rows and columns is the number of clusters p, using the following equation (9) (Sa2).

[0042]

[0043] On the right side of formula (9), the symbol C in blackboard bold in formula (10) with "i" added indicates a set of nodes included in each of the i-th clusters among the p clusters. In the following text, this symbol will be referred to as "set C i " should be written as ".

[0044]

[0045] Similarly, set C j is a set of nodes included in the j-th cluster among p clusters. In the following, when referring to the i-th cluster among p clusters, we will refer to cluster c i When the j-th cluster is indicated, hereafter, cluster c j That's what they say.

[0046] Set V is a set of nodes, similar to set V shown in formula (1). v and w are symbols indicating nodes. v, w∈Set V, and v∈Set C i and w∈set C j The second term vol[G] on the right side of the formula (9) is a value indicating the sum of the weights of the edges included in the graph G, as shown in the above formula (7). Therefore, the part of the second term on the right side of the formula (9) expressed by the following formula (11) is i This indicates the weight ratio of the edge connecting to

[0047]

[0048] Therefore, the second term on the right side of equation (9), i.e., the following equation (12), is j From cluster c i This indicates the expected value of the sum of the weights of the edges connecting to

[0049]

[0050] In other words, Equation (12) is the cluster c when the graph G is assumed to be a random graph. j From cluster c i On the other hand, the first term on the right side of equation (9), i.e., the following equation (13), represents the sum of the weights of the edges connecting to the cluster c in the graph G. j From cluster c i is the sum of the weights of the edges that actually connect to

[0051]

[0052] Therefore, the right-hand side of equation (9) is the cluster c in graph G. j From cluster c iThe sum of the weights of the edges connecting to cluster c in the random graph j From cluster c i This is the formula for calculating the difference between the sum of the weights of the edges connected to

[0053] The cluster vector calculation unit 12 keeps the value of counter i fixed and increments the value of counter j by 1. Each time the cluster vector calculation unit 12 increments the value of counter j by 1, it performs the process of Sa2, and repeats the process of Sa2 p times until the value of counter j becomes p (loop La2s to La2e).

[0054] The cluster vector calculation unit 12 initializes the value of counter j to 1 and increments the value of counter i by 1 each time the processing of loop La2s to La2e is completed. Each time the value of counter i is incremented by 1, the cluster vector calculation unit 12 performs the processing of loop La2s to La2e, and repeats the processing of loop La2s to La2e p times until the value of counter i becomes p (loop La1s to La1e). When loop La1s to La1e is completed, p × p similarities S[i, j] are obtained. The cluster vector calculation unit 12 generates an inter-cluster similarity matrix S of size p × p, with each calculated similarity S[i, j] as the element in the i-th row and j-th column (Sa3).

[0055] Cluster c in the random graph j From cluster c i cluster c in graph G than the connection to j From cluster c i In other words, if the sum of the edge weights obtained by equation (13) is greater than the sum of the edge weights obtained by equation (12), the similarity S[i, j] will be a positive value. j From cluster c i cluster c in the random graph rather than j From cluster c iIf the connections to are better than to, the similarity S[i,j] will be negative. Therefore, the inter-cluster similarity matrix S of size p×p, with p×p similarities S[i,j] as elements, effectively represents the structural similarity in the graph G.

[0056] The cluster vector calculation unit 12 performs singular value decomposition of the generated inter-cluster similarity matrix S with a rank d, where the rank value is equal to the length d of the node vector, to convert the inter-cluster similarity matrix S into three matrices shown on the right side of the following equation (14): an orthogonal matrix U having left singular vectors as elements, a diagonal matrix Σ, and a transposed matrix V of the orthogonal matrix V having right singular vectors as elements. T The matrix is ​​decomposed into the above (Sa4).

[0057]

[0058] The cluster vector calculation unit 12 calculates the cluster vector matrix R using the orthogonal matrix U and the diagonal matrix Σ according to the following equation (15) (Sa5).

[0059]

[0060] As described above, the cluster vector calculation unit 12 calculates the cluster vector matrix R by performing singular value decomposition of rank d, so the cluster vector matrix R is a matrix of size p×d. In the cluster vector matrix R calculated by the cluster vector calculation unit 12, the i-th row vector will be referred to as the "row vector R" hereinafter. i ", and the i-th column vector is called "column vector r i " Row vector R i is the cluster vector of the i-th cluster, and the row vector R i , the cluster vector R i It is also called.

[0061] The cluster vector calculation unit 12 outputs the calculated cluster vector matrix R and the adjacency matrix A generated in the process of Sa1 to the node vector calculation unit 13 (Sa6), and ends the process of the subroutine.

[0062] On the other hand, in the processing of S4 in FIG. 2, if the cluster vector calculation unit 12 determines that the length d of the node vector is greater than the number of clusters p (S4, Yes), it starts the subroutine of the second cluster vector calculation processing shown in FIG. 4 (S6).

[0063] 4, the processes from Sb1 to Sb3 are the same as the processes from Sa1 to Sa3 shown in Fig. 3, and are performed by the cluster vector calculation unit 12. The cluster vector calculation unit 12 performs singular value decomposition of the inter-cluster similarity matrix S generated in the process of Sb3, using rank p, where the rank value is equal to the number of clusters p, to obtain the inter-cluster similarity matrix S as shown in the above formula (14), which is composed of three matrices, namely, an orthogonal matrix U, a diagonal matrix Σ, and a transposed matrix V of the orthogonal matrix V. T (Sb4)

[0064] In the process of Sb3, the inter-cluster similarity matrix S generated by the cluster vector calculation unit 12 is a matrix of size p×p, and in the process of Sb4, the cluster vector calculation unit 12 performs singular value decomposition of rank p. Therefore, when the cluster vector matrix R is calculated by the formula (15) used in the first cluster vector calculation process, the cluster vector matrix R becomes a matrix of size p×p, and the cluster vector R i The length of the cluster vector R is p. When the subroutine for the second cluster vector calculation process is performed, p<d holds, so the length of the cluster vector R is p. i The length p of the cluster vector R is shorter than the length d of the node vector. i Therefore, even if a node vector with a large number of dimensions is calculated, many of the node vectors will be 0. Therefore, the cluster vector R i It becomes difficult to effectively calculate the node vector from

[0065] In order to avoid a situation where a vector with a large number of dimensions is calculated from a vector with a small number of dimensions, the subroutine for the second cluster vector calculation process calculates the cluster vector R by the following procedure. iThe cluster vector calculation unit 12 generates a sparse matrix E (hereinafter referred to as a first sparse matrix E) of size p×d in the following procedure. The i-th column vector of the first sparse matrix E is converted into the column vector e i In this case, the cluster vector calculation unit 12 calculates the column vector e i Element e of i [j] is calculated by the following equation (16).

[0066]

[0067] The meaning of the right side of equation (16) is that the three values ​​shown on the right side are selected with the probability values ​​written to the right of each of the three values.

[0068] The cluster vector calculation unit 12 determines the number of non-zero elements, and calculates e only for the non-zero elements from equation (16). i [j] is calculated to generate a first sparse matrix E of size p × d. Since the expected value of the number of non-zero elements in the first sparse matrix E is d log(p), the first sparse matrix E can be calculated with a computational complexity of O(d log(p)) (Sb5).

[0069] The cluster vector calculation unit 12 calculates the cluster vector matrix R by the following equation (17) (Sb6).

[0070]

[0071] Since the first sparse matrix E has a size of p×d, as shown in equation (17), a low-dimensional p×p matrix UΣ 1/2 By applying a first sparse matrix E of p×d to 1/2 can be mapped to a high-dimensional space. As a result, the cluster vector matrix R has a size of p×d. Therefore, the cluster vector R, which is a row vector of the cluster vector matrix R, i The length of p is d, which is longer than p, and matches the length d of the node vector.

[0072] The cluster vector calculation unit 12 outputs the calculated cluster vector matrix R and the adjacency matrix A generated in the processing of Sb1 to the node vector calculation unit 13 (Sb7), and ends the processing of the subroutine.

[0073] 2, the node vector calculation unit 13 receives the cluster vector matrix R and the adjacency matrix A output by the cluster vector calculation unit 12. The node vector calculation unit 13 applies normalization to the received adjacency matrix A so that the sum of the columns becomes 1, and calculates a matrix W from the adjacency matrix A (S7).

[0074] The node vector calculation unit 13 calculates p row vectors from the imported cluster vector matrix R, i.e., the cluster vector R i The node vector calculation unit 13 reads out the p cluster vectors R (i=1 to p) for each node v shown in the adjacency matrix A, that is, for each node v in the graph G. i Using the calculated matrix W, the node vector x of the node v is calculated by the following equation (18): v is calculated (S8).

[0075]

[0076] Note that W[v, w] shown in equation (18) is the weight of the edge connecting node w to node v shown in matrix W. In equation (18), w∈Set C, which is an operator for W[v, w], j The sum of the edge weights for each node to the cluster is calculated by the operation using Σ with the subscript . The sum of the edge weights for each node to the cluster can be said to be the degree of association between the node and the cluster calculated from the edge weights. Therefore, equation (18) is the degree of association between the node and the cluster calculated from the edge weights, with p cluster vectors R i and calculate the sum of them to obtain the node vector x of node v. v When the node vector calculation unit 13 performs the calculation of equation (18) for all nodes v in the graph G (loops L1s to L1e), it calculates the node vector x corresponding to all the calculated nodes v. vand terminate the process.

[0077] (Effects of the First Embodiment) The NetMF disclosed in Non-Patent Document 1 calculates a node vector using a similarity matrix between nodes. In contrast, the node vector calculation device 1 of the first embodiment calculates a node vector using an inter-cluster similarity matrix S indicating the similarity between clusters. More specifically, the node vector calculation device 1 performs singular value decomposition on the inter-cluster similarity matrix S to calculate a cluster vector R, which is a vector that represents the similarity between clusters. i Calculate the calculated cluster vector R i The node vector is calculated using

[0078] As shown in the above reference, the number of nodes v, that is, the number of clusters, is very small. Therefore, the inter-cluster similarity matrix S is a matrix with a smaller size than the inter-node similarity matrix, and the node vector calculation device 1 of the first embodiment can calculate the node vector x with a smaller memory amount and a smaller amount of calculation compared to NetMF. v The effects of the node vector calculation device 1 of the first embodiment will be described in further detail below.

[0079] (Regarding the validity of the second cluster vector calculation process) The node vector calculation device 1 of the first embodiment performs the first cluster vector calculation process and the second cluster vector calculation process. As described above, the first cluster vector calculation process performs singular value decomposition on the inter-cluster similarity matrix S, and calculates the cluster vector R using the result of the singular value decomposition. i Therefore, the cluster vector R obtained by the first cluster vector calculation process is i can be said to simply indicate the characteristics of the clusters in the graph G. In contrast, the second cluster vector calculation process uses the first sparse matrix E to calculate the cluster vector R i Therefore, the cluster vector R obtained by the second cluster vector calculation process is i is the cluster vector R obtained by the first cluster vector calculation process.i , the influence of the first sparse matrix E is added.

[0080] Therefore, the cluster vector R obtained by the second cluster vector calculation process i The quality of the cluster vector R obtained by the first cluster vector calculation process is i To verify whether the quality is equivalent to that of the above, we define the following Lemma 1.

[0081] [Lemma 1] If E(·) is a function for calculating an expected value, then when i≠j, the following equation (19) holds.

[0082]

[0083] In addition, in equation (19), the vector r i and vector r j are the i-th column vector and the j-th column vector of the cluster vector matrix R, respectively, as described above.

[0084] <Proof of Lemma 1> When the matrix U′ is defined by the following equation (20), in the second cluster vector calculation process, the column vector r i There exists a relationship of the following equation (21).

[0085]

[0086]

[0087] In equation (21), the column vector e i As described above, is the i-th column vector of the first sparse matrix E. From the relationship in equation (21), the following equation (22) can be derived.

[0088]

[0089] In equation (22), U′[·,·] is an element of matrix U′. When i≠j, from equation (16), 2(log(p)) 2 / (2 pages) 2 With the probability of 2 / (2 pages) 2The probability obtained by subtracting the two probabilities from 1 is given by the following equation (25).

[0090]

[0091]

[0092]

[0093] Therefore, the following equation (26) holds true.

[0094]

[0095] Therefore, when i≠j, the following equation (27) holds.

[0096]

[0097] From equations (22) and (27), equation (19) is derived, and therefore Lemma 1 holds. Lemma 1 indicates that the column vectors of the cluster vector matrix R calculated in the second cluster vector calculation process are expected to be orthogonal to one another. To show the degree of certainty that this orthogonality holds, the following Lemma 2 is defined.

[0098] [Lemma 2] If V(·) is a function for calculating a variance value, then when i≠j, the following equation (28) holds.

[0099]

[0100] <Proof of Lemma 2> By applying V(•) for calculating the variance value to equation (22), the following equation (29) can be derived.

[0101]

[0102] When i≠j, the equation can be expanded as in the following equation (30).

[0103]

[0104] From equation (16), the probability of log(p) / p becomes equation (31) below, and the probability obtained by subtracting the probability from 1 becomes equation (32) below.

[0105]

[0106]

[0107] Therefore, from equations (31) and (32), the following equation (33) holds when i≠j.

[0108]

[0109] In addition to i≠j, the second term on the right side of equation (30) satisfies the condition shown in the following equation (34).

[0110]

[0111] Therefore, from equation (16), 8(log(p)) 4 / (2 pages) 4 With the probability of 8(log(p)), the following equation (35) is obtained. 4 / (2 pages) 4 The probability obtained by subtracting the two probabilities from 1 is given by the following equation (37).

[0112]

[0113]

[0114]

[0115] Therefore, the following equation (38) holds true.

[0116]

[0117] Therefore, the expected value of the left side of equation (30) can be expressed as the following equation (39) from equations (33) and (38).

[0118]

[0119] Therefore, from equations (27), (29) and (39), when i≠j, the following equation (40) holds.

[0120]

[0121] Therefore, Lemma 2 holds. As described above, the variance value indicated by equation (28) of Lemma 2 is a variance value indicating the likelihood that the column vectors of the cluster vector matrix R obtained in the second cluster vector calculation process are orthogonal. The variance value indicated by equation (28) is a variance value that does not include the elements of the first sparse matrix E, and is a variance value determined only by the matrix U' defined in equation (20). The matrix U' is the cluster vector matrix R obtained in the first cluster vector calculation process. Therefore, the likelihood that the column vectors of the cluster vector matrix R obtained in the second cluster vector calculation process are orthogonal is the same as the likelihood that the column vectors of the cluster vector matrix R obtained in the first cluster vector calculation process that does not use the first sparse matrix are orthogonal.

[0122] The fact that the column vectors of the cluster vector matrix R are orthogonal to each other means that even a node vector with a small number of dimensions can effectively represent each node. In the second cluster vector calculation process, the cluster vector matrix R is calculated by further applying the first sparse matrix E to the orthogonal matrix U obtained by singular value decomposition of the inter-cluster similarity matrix S and the square root of the diagonal matrix Σ.

[0123] However, in the second cluster vector calculation process, the first sparse matrix E is calculated based on the formula (16) e i Because the matrix has [j] as an element, even if the cluster vector matrix R is calculated by applying the first sparse matrix E, it is possible to obtain a cluster vector matrix R whose column vectors are orthogonal with the same degree of certainty as in the first cluster vector calculation process that does not use the first sparse matrix E. By using this cluster vector matrix R, it is possible to obtain a node vector with a small number of dimensions that effectively represents each node in the second cluster vector calculation process with the same quality as in the first cluster vector calculation process.

[0124] (Calculation Amount and Memory Amount of the Node Vector Calculation Device of the First Embodiment) In order to indicate the calculation amount and memory amount of the first cluster vector calculation process, the following Lemma 3 is defined.

[0125] [Lemma 3] The first cluster vector calculation process requires O(p 3 ) and O(p 2 ) amount of memory required.

[0126] <Proof of Lemma 3> In the first cluster vector calculation process, the amount of calculation of the inter-cluster similarity matrix S is O(p 2 ) The computational complexity of the singular value decomposition of the inter-cluster similarity matrix S is O(p 3 ) The amount of calculation required to calculate the cluster vector matrix R using equation (15) is O(pd). The amount of memory required to store the inter-cluster similarity matrix S is O(p 2 ) The memory capacity required to store the cluster vector matrix R is O(pd). When the first cluster vector calculation process is performed, p≧d. Therefore, the calculation capacity in the first cluster vector calculation process is O(p 3 ), and the memory requirement is O(p 2 ), and Lemma 3 holds.

[0127] To indicate the amount of calculation and memory required for the second cluster vector calculation process, the following Lemma 4 is defined.

[0128] [Lemma 4] The second cluster vector calculation process takes O(d log(p) + p 3 ) and a memory capacity of O(pd).

[0129] <Proof of Lemma 4> The computational complexity of the inter-cluster similarity matrix S is O(p 2 ) The computational complexity of the singular value decomposition of the inter-cluster similarity matrix S is O(p 3 ) The computational complexity of the first sparse matrix E is O(d log(p)). i Since the number of non-zero elements of is log(p), the amount of calculation required to calculate equation (17) is O(p 2The memory requirements for storing the inter-cluster similarity matrix S, the first sparse matrix E, and the cluster vector matrix R are O(p 2 ), O(d·log(p)), O(pd).

[0130] When the second cluster vector calculation process is performed, p<d. Therefore, the amount of calculation for the second cluster vector calculation process is O(d log(p)+p 3 ), the memory requirement is O(pd), and Lemma 4 holds.

[0131] In order to indicate the amount of calculation and the amount of memory required by the node vector calculation device 1 of the first embodiment, the following Theorem 1 is defined.

[0132] [Theorem 1] When p ≥ d, the computational complexity is O(m + p 3 ), and the memory requirement is O(nd+p 2 + m), and the amount of calculation when p<d is O(m+d log(p)+p 3 ), and the memory amount becomes O(nd+m).

[0133] <Proof of Theorem 1> According to the above reference, the calculation amount of clustering using the IncMod method by the clustering processing unit 11 is O(m), and the memory amount is O(m). When p≧d, as in Lemma 3, i The amount of computation required to calculate 3 ), and the memory amount is (p 2 ) When p<d, as per Lemma 4, the cluster vector R i The amount of calculation required to calculate is O(d log(p) + p 3 ) and the memory amount is (pd).

[0134] The cluster vector R i from the node vector x v The computational complexity required to calculate v The memory required to store the above is O(nd). Therefore, when p≧d, the computational complexity is O(m+p 3 ), and the memory requirement is O(nd+p 2+ m), and if p<d, the computational complexity is O(m+d log(p)+p 3 ), the memory amount becomes O(nd+m), and Theorem 1 holds.

[0135] Therefore, the node vector calculation device 1 of the first embodiment has a calculation amount of O(n 3 ), the memory requirement is O(n 2 ) can calculate a node vector with a smaller amount of calculation and memory than NetMF. That is, the node vector calculation device 1 of the first embodiment makes it possible to reduce the amount of memory and calculation when calculating the vector of a node v included in the graph G.

[0136] 5 is a block diagram showing the configuration of a node vector calculation device 1a according to a second embodiment. In the second embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and only the different components will be described below. The node vector calculation device 1a includes a clustering processing unit 11, a cluster vector calculation unit 12a, and a node vector calculation unit 13.

[0137] The cluster vector calculation unit 12a, like the cluster vector calculation unit 12 of the first embodiment, calculates a cluster vector R that represents the similarity between clusters of the graph G based on the graph data, the cluster data, and the length d of a predetermined node vector. i As described above, the cluster vector calculation unit 12 of the first embodiment calculates O(p 3 ) and to store the inter-cluster similarity matrix S, the computational complexity is O(p 2 ) amount of memory required.

[0138] Therefore, as the number of clusters p increases, the amount of calculation and memory required for the first cluster vector calculation process increases. In order to suppress this increase in the amount of calculation and memory, the cluster vector calculation unit 12a performs a third cluster vector calculation process instead of the first cluster vector calculation process.

[0139] (Processing by the node vector calculation device of the second embodiment) The node vector calculation device 1a performs the same processing as that performed by the node vector calculation device 1 of the first embodiment shown in Fig. 2, except that the cluster vector calculation unit 12 is replaced with a cluster vector calculation unit 12a, and in the processing of S5, the subroutine for the first cluster vector calculation processing is replaced with the subroutine for the third cluster vector calculation processing shown in Fig. 6. The third cluster vector calculation processing will be described below.

[0140] (Subroutine of the third cluster vector calculation process of the first embodiment) The cluster vector calculation unit 12a generates an adjacency matrix A from the graph data in the adjacency list format of the graph G imported in the process of S3 (Sc1). The cluster vector calculation unit 12a generates a sparse matrix B (hereinafter referred to as the second sparse matrix B) of size p × d in the following procedure. The i-th row vector of the second sparse matrix is ​​converted into the row vector b i In this case, the cluster vector calculation unit 12a calculates the row vector b i Element b of i [j] is calculated by the following equation (41).

[0141]

[0142] The meaning of the right side of the formula (41) is that the three values ​​shown on the right side are selected with the probability values ​​written to the right of each of the three values. The cluster vector calculation unit 12a determines the number of non-zero elements, and calculates b only for the non-zero elements from the formula (41). i [j] is calculated to generate a second sparse matrix B of size p × d. Since the expected value of the number of non-zero elements in the second sparse matrix B is p log(d), the second sparse matrix B can be calculated with a computational complexity of O(p log(d)) (Sc2).

[0143] The cluster vector calculation unit 12a generates a counter i and a counter j in an internal storage area and initializes the counter i and the counter j to 1. Based on the generated adjacency matrix A and the cluster data, the cluster vector calculation unit 12a calculates the similarity S[i, j], which is an element of the inter-cluster similarity matrix S, using equation (9).

[0144] The cluster vector calculation unit 12a increments the value of the counter j by 1 while keeping the value of the counter i fixed. Each time the value of the counter j is incremented by 1, the cluster vector calculation unit 12a calculates the similarity S[i, j], and repeats this process until the value of the counter j reaches p. As a result, the row vector s of the inter-cluster similarity matrix S when i=1 is calculated. 1 is obtained (Sc3) (loop Lc2s to Lc2e).

[0145] The cluster vector calculation unit 12a calculates a row vector s of size 1×p. 1 The row vector s′ is obtained by applying the operation of the following equation (42) to a second sparse matrix B of size p×d to the 1 is calculated (Sc4).

[0146]

[0147] Each time the process of Sc4 is completed, the cluster vector calculation unit 12a initializes the value of counter j to 1 and increments the value of counter i by 1. Each time the cluster vector calculation unit 12a increments the value of counter i by 1, it performs the processes of loops Lc2s to Lc2e and Sc4, and repeats the processes of loops Lc2s to Lc2e and Sc4 p times until the value of counter i reaches p (loops Lc1s to Lc1e).

[0148] When the loop Lc1s to Lc1e is completed, p row vectors s of size 1×p are generated. i p row vectors s′ of size 1×d calculated by applying the second sparse matrix B to each of (i=1 to p) i The cluster vector calculation unit 12a calculates p row vectors s' (i=1 to p) in the order of row numbers, where i is the value of the row.i are arranged to generate a matrix S' of size p×d (Sc5).

[0149] The cluster vector calculation unit 12a performs singular value decomposition of rank d on the generated matrix S', and divides the matrix S' into three matrices shown on the right side of the following equation (43): an orthogonal matrix U having left singular vectors as elements, a diagonal matrix Σ, and a transposed matrix V of the orthogonal matrix V having right singular vectors as elements. T Then, the matrix is ​​decomposed into the following (Sc6).

[0150]

[0151] The cluster vector calculation unit 12a calculates the cluster vector matrix R according to equation (15) using the orthogonal matrix U and the diagonal matrix Σ (Sc7). The cluster vector calculation unit 12a outputs the calculated cluster vector matrix R and the adjacency matrix A generated in the processing of Sc1 to the node vector calculation unit 13 (Sc8), and ends the processing of the subroutine.

[0152] (Effects of the Second Embodiment) The node vector calculation device 1a of the second embodiment, like the node vector calculation device 1 of the first embodiment, calculates a node vector using an inter-cluster similarity matrix S indicating the similarity between clusters, which is a matrix smaller in size than the inter-node similarity matrix used in NetMF. Therefore, like the node vector calculation device 1 of the first embodiment, the node vector calculation device 1a of the second embodiment also calculates the node vector x with a smaller memory amount and a smaller amount of calculation than NetMF. v The effects of the node vector calculation device 1a of the second embodiment will be described in further detail below.

[0153] (Regarding the validity of the third cluster vector calculation process) In the third cluster vector calculation process, the matrix S', the inter-cluster similarity matrix S, and the second sparse matrix B have the relationship shown in the following equation (44).

[0154]

[0155] Here, the following equation (45) is defined as an equation relating the inter-cluster similarity matrix S and the second sparse matrix B.

[0156]

[0157] The matrix on the right side of equation (45) will be referred to as matrix S. When matrix S is expressed using matrix S', and matrix S' is further substituted into the right side of equation (43), the following equation (46) is obtained.

[0158]

[0159] By applying the substitution shown in the following equation (47) to the rightmost equation of equation (46), the matrix S can be expressed as the following equation (48).

[0160]

[0161]

[0162] Equation (48) is an equation showing that matrix S~ is decomposed into three matrices by singular value decomposition of matrix S~. Incidentally, the orthogonal matrix U and diagonal matrix Σ having elements that are left singular vectors obtained by this matrix decomposition are identical to the orthogonal matrix U and diagonal matrix Σ having elements that are left singular vectors obtained by singular value decomposition of matrix S' shown in equation (43). In other words, whether singular value decomposition is performed on matrix S' defined by equation (44) or on matrix S~ defined by equation (45), the orthogonal matrix U and diagonal matrix Σ having elements that are left singular vectors obtained by the respective singular value decompositions are identical between matrix S' and matrix S~.

[0163] Here, to show the relationship between the inter-cluster similarity matrix S and the matrix S, the following Lemma 5 is defined.

[0164] [Lemma 5] For the matrix S, the following equation (49) holds.

[0165]

[0166] <Proof of Lemma 5> From equation (46), S~[i,j], which is an element of the matrix S~, can be expressed as the following equation (50).

[0167]

[0168] In equation (50), the vector s i is the i-th row vector of the inter-cluster similarity matrix S as described above, matrix B is the second sparse matrix B, and vector b j is the j-th row vector of the second sparse matrix B. When j′=j, the following equation (51) holds.

[0169]

[0170] From equation (41), the probability of log(d) / d is given by equation (52) below, and the probability obtained by subtracting the probability from 1 is given by equation (53) below.

[0171]

[0172]

[0173] Therefore, when j'=j, the following equation (54) holds.

[0174]

[0175] When j′≠j, from equation (41), 2(log(d)) 2 / (2d) 2 With the probability of 2(log(d)), the following equation (55) is obtained. 2 / (2d) 2 The probability is given by the following equation (56), and the probability obtained by subtracting the two probabilities from 1 is given by the following equation (57).

[0176]

[0177]

[0178]

[0179] As a result, the following equation (58) is obtained.

[0180]

[0181] Therefore, when j'≠j, the following equation (59) holds.

[0182]

[0183] Therefore, from equations (50), (54), and (59), the following equation (60) is established.

[0184]

[0185] Therefore, Lemma 5 holds. Lemma 5 shows that matrix S~ effectively approximates matrix S. To show how likely this approximation is, we define the following Lemma 6.

[0186] [Lemma 6] For the matrix S, the following equation (61) holds.

[0187]

[0188] By applying V(·) for calculating the variance value to equation (50), the following equation (62) can be derived.

[0189]

[0190] When j'=j, the equation can be expanded as in the following equation (63).

[0191]

[0192] From equation (41), the probability of log(d) / d becomes equation (64) below, and the probability obtained by subtracting the probability from 1 becomes equation (65) below.

[0193]

[0194]

[0195] Therefore, the following equation (66) holds true.

[0196]

[0197] The second term on the right side of equation (63) has the condition k'<k. Therefore, from equation (41), (log(d)) 2 / d 2 The probability obtained by subtracting the probability from 1 is given by the following equation (68).

[0198]

[0199]

[0200] Therefore, the following equation (69) holds true.

[0201]

[0202] Therefore, the following equation (70) holds true.

[0203]

[0204] Therefore, when j′=j, applying E(·), which calculates the expected value, to equation (63), and then applying equations (66) and (70), the following equation (71) is established.

[0205]

[0206] Therefore, when j'=j, the following equation (72) is established from equation (54) and equation (71).

[0207]

[0208] When j'≠j, the equation can be expanded as in the following equation (73).

[0209]

[0210] From equation (41), (log(d)) 2 / d 2 The probability obtained by subtracting the probability from 1 is given by the following equation (75).

[0211]

[0212]

[0213] Therefore, equation (76) holds.

[0214]

[0215] The second term on the right side of equation (73) has the condition k'<k. Therefore, from equation (41), 8(log(d)) 4 / (2d) 4 With a probability of 8(log(d)), the following equation (77) is obtained. 4 / (2d) 4 The probability is given by the following equation (78), and the probability obtained by subtracting the two probabilities from 1 is given by the following equation (79).

[0216]

[0217]

[0218]

[0219] Therefore, the following equation (80) holds true.

[0220]

[0221] Therefore, when j′≠j, applying E(·) for calculating the expected value to equation (73) and then equation (76) and equation (80) yields the following equation (81).

[0222]

[0223] As a result, when j'≠j, the following equation (82) holds from equation (59) and equation (81).

[0224]

[0225] Therefore, the following equation (83) is established from equation (62), equation (72) when j'=j, and equation (82) when j'≠j.

[0226]

[0227] Therefore, Lemma 6 holds. Matrix S~ is a matrix that approximates matrix S with the degree of certainty indicated by Lemma 6. Therefore, the result of singular value decomposition of matrix S~ approximates the result of singular value decomposition of matrix S. As described above, the orthogonal matrix U and diagonal matrix Σ, whose elements are left singular vectors obtained by singular value decomposition of matrix S~, are identical to the orthogonal matrix U and diagonal matrix Σ, whose elements are left singular vectors obtained by singular value decomposition of matrix S'. Therefore, the orthogonal matrix U and diagonal matrix Σ, whose elements are left singular vectors obtained by singular value decomposition of matrix S', approximate the orthogonal matrix U and diagonal matrix Σ, whose elements are left singular vectors obtained by singular value decomposition of matrix S, with the certainty of equation (61).

[0228] In the first cluster vector calculation process and the third cluster vector calculation process, the cluster vector matrix R is calculated using an orthogonal matrix U having left singular vectors as elements and a diagonal matrix Σ, as shown in equation (15). Therefore, in the third cluster vector calculation process, the cluster vector matrix R calculated by the cluster vector calculation unit 12a is a matrix that approximates the cluster vector R calculated by the cluster vector calculation unit 12 in the first cluster vector calculation process.

[0229] (Calculation Amount and Memory Amount of the Node Vector Calculation Device of the Second Embodiment) In order to indicate the calculation amount and memory amount of the third cluster vector calculation process, the following Lemma 7 is defined.

[0230] [Lemma 7] The third cluster vector calculation process requires O(p 2 +pd 2 ) and a memory capacity of O(pd).

[0231] <Proof of Lemma 7> The row vector b of the second sparse matrix B i Since the second sparse matrix B has non-zero elements of lod(d), the computational complexity of O(p log(d)) is required to calculate the second sparse matrix B. i The total amount of calculation for the cluster similarity matrix S is the same as the amount of calculation for the cluster similarity matrix S, so it is O(p 2 ) Since each column of the second sparse matrix B has a non-zero element of log(d), the computational complexity of O(p log(d)) is required to calculate the matrix S' using equation (44). The computational complexity of the singular value decomposition of the matrix S' is O(p log(d)). 2 ) Calculating the cluster vector R using equation (15) requires a computational complexity of O(pd).

[0232] Row vector s of the inter-cluster similarity matrix S i The memory capacity required to store the second sparse matrix B, the matrix S', and the cluster vector matrix R is O(pd). As a result, the calculation amount in the third cluster vector calculation process is O(p 2 +pd 2), the memory requirement is O(pd), and Lemma 7 holds.

[0233] In order to indicate the amount of calculation and the amount of memory required by the node vector calculation device 1a of the second embodiment, the following Theorem 2 is defined.

[0234] [Theorem 2] When p ≥ d, the computational complexity is O(m + p 2 +pd 2 ), the memory requirement is O(nd+m), and the calculation requirement when p<d is O(m+d·log(p)+p 3 ), and the memory amount becomes O(nd+m).

[0235] <Proof of Theorem 2> In the case of p<d, as shown in the proof of Theorem 1, the computational complexity is O(m+d·log(p)+p 3 ) and the memory requirement is O(nd+m). When p≧d, as per Lemma 7, the cluster vector R i The amount of computation required to calculate 2 +pd 2 ) and the memory amount is (pd).

[0236] As shown in the proof of Theorem 1, the calculation amount of the clustering using the IncMod method by the clustering processing unit 11 is O(m), and the memory amount is O(m). i from the node vector x v The computational complexity required to calculate v The memory required to store the above is O(nd). Therefore, when p≧d, the computational complexity is O(m+p 2 +pd 2 ), the memory amount becomes O(nd+m), and theorem 2 holds.

[0237] Therefore, the node vector calculation device 1a of the second embodiment has a calculation amount of O(n 3 ), the memory requirement is O(n 2) can calculate a node vector with a smaller amount of calculation and memory than NetMF. That is, the node vector calculation device 1a of the second embodiment makes it possible to reduce the amount of memory and calculation when calculating the vector of a node v included in the graph G.

[0238] In the third cluster vector calculation process performed by the node vector calculation device 1a of the second embodiment, the inter-cluster similarity matrix S is not generated, and the row vector s of the inter-cluster similarity matrix S is calculated. i Each time a second sparse matrix of size p×d is used to calculate a row vector s of size 1×p, i Let s′ be a row vector of size 1×d. i In the third cluster vector calculation process, the row vector s' is converted into i Since a matrix S' of size p×d is generated from the first cluster vector calculation process, a memory capacity of O(pd) is required to store the matrix S'. However, since the inter-cluster similarity matrix S is not generated, a memory capacity of O(p 2 ) is not required. Furthermore, in the third cluster vector calculation process, singular value decomposition is performed on the matrix S′ of size p×d, which makes it possible to calculate the cluster vector matrix R with a smaller amount of calculation than when singular value decomposition is performed on the inter-cluster similarity matrix S of size p×p.

[0239] In summary, the amount of calculation in the first cluster vector calculation process is O(p 3 ), and the memory requirement is O(p 2 ), whereas the amount of calculation in the third cluster vector calculation process is O(p 2 +pd 2 ), and the memory amount is O(pd). Therefore, when p≧d, the more the number of clusters p increases, the more the node vector calculation device 1a of the second embodiment can calculate the node vector x with a smaller amount of calculation and a smaller amount of memory than the node vector calculation device 1 of the first embodiment. v It becomes possible to calculate

[0240] (Regarding other configuration examples of each embodiment) In the above first and second embodiments, graph G is, for example, a weighted undirected graph, but it may also be an unweighted undirected graph, a weighted directed graph, or an unweighted directed graph.

[0241] In the first and second embodiments described above, the graph data of graph G is, for example, data in the format of an adjacency list, but it may also be data in the format of an adjacency matrix. If the graph data of graph G is data in the format of an adjacency matrix, the cluster vector calculation units 12 and 12a do not need to perform the processes Sa1, Sb1, and Sc1 that generate the adjacency matrix A from the graph data.

[0242] In the first and second embodiments, the cluster vector calculation units 12 and 12a perform processes Sa1, Sb1, and Sc1 to generate an adjacency matrix A from graph data. However, generating the adjacency matrix A requires memory space for storing the adjacency matrix A. To reduce this memory space, the cluster vector calculation units 12 and 12a may perform the following process without performing processes Sa1, Sb1, and Sc1. For example, in the repeated processes Sa2, Sb2, and Sc3, the cluster vector calculation units 12 and 12a may read only A[i, j], which is required to calculate the similarity S[i, j] to be calculated in each of the repeated processes, from the imported graph data in the form of an adjacency list. In this case, in the processes Sa6, Sb7, and Sc7, the cluster vector calculation units 12 and 12a output the graph data in the form of an adjacency list received from the clustering processing unit 11 to the node vector calculation unit 13 instead of the adjacency matrix A.

[0243] When the cluster vector calculation units 12 and 12a output graph data in the adjacency list format, the node vector calculation unit 13 may perform one of the following two processes. As a first process, the node vector calculation unit 13 may generate an adjacency matrix A from the graph data in the adjacency list format and then normalize it to generate the matrix W. On the other hand, as a second process, the node vector calculation unit 13 may not generate the adjacency matrix A from the graph data in the adjacency list format, but may normalize the graph data in the adjacency list format so that the sum of the column components becomes 1 if the adjacency matrix A is generated. In this case, the node vector calculation unit 13 calculates the node vector x v When calculating (18), the elements W[v, w] of the matrix W required for the calculation of equation (18) are read from the graph data in the form of a normalized adjacency list. In this way, the amount of memory required to store the matrix W can be reduced.

[0244] In the first and second embodiments described above, the node vector calculation unit 13 performs normalization in the process of S7, but the graph data of the graph G taken in by the clustering processing unit 11 may be graph data that has been normalized in advance in the process of S7. In this case, the node vector calculation unit 13 does not need to perform the process of S7.

[0245] The node vector calculation device 1, 1a in the above-described embodiments may be implemented by a computer. In this case, a program for implementing this function may be recorded on a computer-readable recording medium, and the program may be loaded into a computer system and executed. Note that the term "computer system" as used herein includes hardware such as an OS and peripheral devices. Furthermore, "computer-readable recording medium" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, as well as storage devices such as hard disks built into computer systems. Furthermore, "computer-readable recording medium" may also include devices that dynamically store programs for a short period of time, such as communication lines used when transmitting programs via networks such as the Internet or telephone lines, or devices that store programs for a fixed period of time, such as volatile memory within the computer system that serves as the server or client. The program may be designed to implement some of the above-described functions, or may be capable of implementing the above-described functions in combination with programs already stored in the computer system, or may be implemented using a programmable logic device such as an FPGA (Field Programmable Gate Array).

[0246] Although an embodiment of the present invention has been described above in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and includes designs within the scope of the gist of the present invention.

[0247] It can be applied to graph embedding techniques.

[0248] 1...node vector calculation device, 11...clustering processing unit, 12...cluster vector calculation unit, 13...node vector calculation unit

Claims

1. A node vector calculation method comprising: a clustering processing step of classifying the nodes into clusters by clustering graph data indicating the relationships between nodes and edges included in a graph, and outputting cluster data indicating the classification results; a cluster vector calculation step of calculating cluster vectors expressing the similarity between the clusters based on the graph data, the cluster data, and a predetermined length of a node vector; and a node vector calculation step of calculating the node vectors corresponding to each of the nodes based on the graph data and the cluster vectors.

2. The node vector calculation method according to claim 1, wherein the cluster vector calculation step calculates a sum of edge weights between the clusters for each of the clusters based on the graph data and the cluster data, calculates an expectation of the sum of edge weights between the clusters based on the graph data and the cluster data, calculates a value indicating the difference between the sum of edge weights and the expected value of the sum of edge weights for each of the clusters, and calculates the cluster vector by performing singular value decomposition on a matrix generated from the values ​​indicating the difference for each of the clusters, with either the length of the node vector or the number of clusters indicated in the cluster data being a rank value.

3. The node vector calculation method according to claim 2, wherein the cluster vector calculation step, if the length of the node vector is equal to or less than the number of clusters, generates an inter-cluster similarity matrix whose elements have values ​​indicating the differences between the clusters and whose number of rows and columns are both equal to the number of clusters, performs singular value decomposition on the generated inter-cluster similarity matrix using the length of the node vector as the rank value, calculates an orthogonal matrix and a diagonal matrix whose elements are left singular vectors, and defines each of the row vectors of the cluster vector matrix calculated using the orthogonal matrix and the diagonal matrix as the cluster vector.

4. The node vector calculation method according to claim 2, wherein the cluster vector calculation step, when a length of the node vector is greater than the number of clusters, generates an inter-cluster similarity matrix whose elements have values ​​indicating the differences between the clusters and whose number of rows and columns are both equal to the number of clusters; performs singular value decomposition on the generated inter-cluster similarity matrix using the number of clusters as the rank value to calculate an orthogonal matrix and a diagonal matrix whose elements are left singular vectors; generates a first sparse matrix whose number of rows is the number of clusters and whose number of columns is the length of the node vector and whose elements are calculated based on the number of clusters; and defines each of the row vectors of a cluster vector matrix calculated using the orthogonal matrix, the diagonal matrix, and the first sparse matrix as the cluster vector.

5. The node vector calculation method according to claim 2, wherein the cluster vector calculation step comprises: if the length of the node vector is equal to or less than the number of clusters, generating a second sparse matrix whose number of rows is the number of clusters, whose number of columns is the length of the node vector, and whose elements are calculated based on the length of the node vector; generating each of row vectors forming an inter-cluster similarity matrix, the number of rows and the number of columns of which are both the number of clusters, and whose elements have values ​​indicating the differences between the clusters, from the values ​​indicating the differences between the clusters; calculating a row vector in which the number of columns has been shortened to the length of the node vector by applying the second sparse matrix to each of the row vectors forming the inter-cluster similarity matrix; generating a matrix in which the number of rows is the number of clusters and the number of columns is the length of the node vector from the shortened row vectors in a number equal to the number of clusters; performing singular value decomposition on the generated matrix using the length of the node vector as the value of the rank, and calculating an orthogonal matrix and a diagonal matrix in which left singular vectors are elements; and setting each of the row vectors of the cluster vector matrix calculated using the orthogonal matrix and the diagonal matrix as the cluster vector.

6. The node vector calculation method according to claim 1, wherein the node vector calculation step normalizes the graph data so that when the graph is represented as an adjacency matrix, the sum of column-wise components becomes 1, and calculates the node vectors corresponding to each of the nodes based on the normalized graph data and the cluster vectors.

7. A node vector calculation device comprising: a clustering processing unit that classifies the nodes into clusters by clustering graph data indicating the relationships between nodes and edges included in a graph, and outputs cluster data indicating the classification results; a cluster vector calculation unit that calculates a cluster vector expressing a similarity between the clusters based on the graph data, the cluster data, and a predetermined length of a node vector; and a node vector calculation unit that calculates the node vector corresponding to each of the nodes based on the graph data and the cluster vector.

8. A program for causing a computer to execute the node vector calculation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system for obtaining influence degree of events on objects

    CN111738532A

  • Retrieval device, retrieval method, and retrieval program

    JP2015232782A

Cited By

  • Power distribution network medium and low voltage topology model generation method based on spectral clustering and related device

    CN119518766A