CN115310594A - Method for improving expandability of network embedding algorithm - Google Patents

Method for improving expandability of network embedding algorithm Download PDF

Info

Publication number
CN115310594A
CN115310594A CN202210953351.9A CN202210953351A CN115310594A CN 115310594 A CN115310594 A CN 115310594A CN 202210953351 A CN202210953351 A CN 202210953351A CN 115310594 A CN115310594 A CN 115310594A
Authority
CN
China
Prior art keywords
graph
node
embedding
matrix
coarsening
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210953351.9A
Other languages
Chinese (zh)
Inventor
陈东明
谢飞
张陛圣
聂铭硕
王冬琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeastern University China
Original Assignee
Northeastern University China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northeastern University China filed Critical Northeastern University China
Priority to CN202210953351.9A priority Critical patent/CN115310594A/en
Publication of CN115310594A publication Critical patent/CN115310594A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for improving the expandability of a network embedding algorithm, which relates to the field of network representation learning; the method is suitable for large-scale graph network representation learning, the expandability of network embedding is improved and the embedding quality is improved through graph fusion, graph coarsening, graph embedding and embedding refinement operations, and the embedding result can be used for graph downstream tasks such as network role discovery, social recommendation system and social influence prediction. Labels of super nodes in the coarsest graph are obtained by calculating a label matrix of the original graph and a mapping matrix of the original graph and the coarsest graph and participate in model training as training labels of a supervised graph embedding algorithm represented by GCN, and the problem that the supervised graph embedding algorithm cannot be processed by an existing multi-layer strategy is solved. The method effectively improves the capability of processing a large-scale network by using the graph embedding algorithm, and simultaneously, the expandability of the method is verified by performing experiments on a large-scale graph data set Friendster.

Description

Method for improving expandability of network embedding algorithm
Technical Field
The invention belongs to the field of network representation learning, and relates to a method for improving the expandability of a network embedding algorithm.
Background
In recent years, network embedding has attracted great attention because it is widely applied to a series of tasks such as network role discovery, social recommendation system, and social influence prediction. Although these new embedding methods tend to have obvious advantages over the traditional methods, the current graph embedding methods still have some drawbacks in terms of accuracy and scalability.
On one hand, random walk-based embedding algorithms such as deep walk and node2vec only carry out network embedding based on the topological structure of the network under the condition that the node attribute characteristics are not included, and therefore the embedding capability of the deep walk and node2vec is greatly limited. Subsequently, based on the concept that node embedding is smooth across the entire graph, a graph convolution network GCN has emerged, which, although simplifying graph convolution at each layer with topology and node feature information, may be affected by high frequency noise in the initial node features, which affects the embedding quality.
On the other hand, most embedding algorithms are computationally expensive and are typically memory intensive and difficult to scale to large network datasets (e.g., networks with over 100 million nodes). For almost all network embedding algorithms, how to apply the embedding algorithms under large-scale networks such as real social networks, communication networks or citation networks is always a key problem. The Graph Neural Network (GNN) is no exception, and it is difficult to extend the graph neural network because in the case of large data volume, many core computation steps require a considerable time overhead, for example, graphcage needs to collectively aggregate feature information from neighborhoods, and when there are multiple superimposed GNN layers, the final embedding vector of one node involves computing a large number of intermediate embedding from its neighboring nodes, which not only results in a drastic increase in the computation amount between nodes, but also results in a high memory usage rate for storing intermediate results. This occurs because the network is not common euclidean data, the neighborhood structure of each node is not the same, and therefore it cannot be directly applied to batch processing, and the laplacian of the graph is difficult to compute when there are millions of nodes and edges. It can be said that scalability will determine whether the network embedding algorithm can be applied to large networks in the real world.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a method for improving the expandability of a network embedding algorithm, which is suitable for large-scale graph network representation learning, improves the expandability of network embedding and improves the embedding quality through graph fusion, graph coarsening, graph embedding and embedding refinement operations, and the embedding result can be used for graph downstream tasks such as network role discovery, social recommendation system, social influence prediction and the like.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a method for improving the expandability of a network embedding algorithm comprises the steps of graph fusion, graph coarsening, graph embedding and embedding refinement, and comprises the following steps:
step 1: for an original graph
Figure BDA0003790237280000021
The original graph is an undirected graph, the node characteristic matrix of the undirected graph is converted into a characteristic graph and is fused with the original topology of the original graph, and A is calculated fusion =f(A topo And X), wherein,
Figure BDA0003790237280000022
represented as a contiguous matrix of the array of pixels,
Figure BDA0003790237280000023
is represented as a matrix of node characteristics,
Figure BDA0003790237280000024
representing weighted graphs
Figure BDA0003790237280000025
The adjacency matrix of (a);
and 2, step: using hybrid coarsening to transform an original graph
Figure BDA0003790237280000026
Coarsening to
Figure BDA0003790237280000027
Is a graph which is subjected to first coarsening,
Figure BDA0003790237280000028
is the final coarsest graph after m coarsening;
and step 3: in the coarsest figure
Figure BDA0003790237280000029
Executing a graph embedding method g (-) to obtain an embedding result epsilon;
and 4, step 4: obtaining an original graph according to the embedding result epsilon obtained in the step 3
Figure BDA00037902372800000210
Is embedded in 0
The step 1 specifically comprises the following steps:
step 1.1: original graph for | V | nodes
Figure BDA00037902372800000211
Its adjacency matrix is expressed as
Figure BDA00037902372800000212
Its node feature matrix is
Figure BDA00037902372800000213
Wherein K represents the dimension of the feature vector of the corresponding node;
step 1.2: generating a k nearest neighbor graph according to the L2-norm between the attribute vectors of each node pair by using a local spectral clustering algorithm, and converting the original graph into a new graph
Figure BDA00037902372800000222
Is converted into a node feature map
Figure BDA00037902372800000214
Wherein the L2-norm is the Euclidean distance;
step 1.3: from the original graph
Figure BDA00037902372800000215
The cosine similarity between the attribute vectors of any two nodes assigns a weight to each edge of the k-nearest neighbor graph, i.e.
Figure BDA00037902372800000216
Wherein, X i,: And X j,: Is the attribute vector for nodes i and j;
step 1.4: combining the topological graph and the attribute graph, and constructing a fusion graph through weighting, wherein the fusion graph is shown as a formula (1):
A fusion =A topo +βA feat (1)
wherein beta is used to balance topology information and node characteristic information during the fusion process,
Figure BDA00037902372800000217
representing weighted graphs
Figure BDA00037902372800000218
Of a contiguous matrix of feat Is a node characteristic matrix of the k nearest neighbor graph.
The generation of the k nearest neighbor graph in the step 1.2 specifically includes the following steps:
step 1.2.1: taking a random graph signal x as a random vector, and representing by combining a linear combination of a feature vector u of a graph Laplacian;
step 1.2.2: filtering out a high-frequency component of a random graph signal x by adopting a low-pass graph filter, wherein the high-frequency component of the random graph signal x is a feature vector corresponding to a high feature value of a graph Laplacian operator, and obtaining a smooth vector by applying a smoothing function to the random graph signal x
Figure BDA00037902372800000219
As shown in formula (2):
Figure BDA00037902372800000220
step 1.2.3: solving linear equations with Gauss-Seidel iteration
Figure BDA00037902372800000221
Obtaining T initial random vectors T = (x: (x)) 1 ),...,x (t) ) Wherein
Figure BDA0003790237280000031
representing the original picture
Figure BDA0003790237280000032
A laplacian matrix of;
step 1.2.4: embedding each node into a T-dimensional space based on an initial random vector T, and calculating low-dimensional embedded vectors of a node p and a node q
Figure BDA0003790237280000033
And
Figure BDA0003790237280000034
similarity, if the similarity meets a similarity threshold, the node p and the node q are similar nodes;
the node similarity is determined by the spectrum node affinity of adjacent nodes p and q, and is shown in formula (3):
Figure BDA0003790237280000035
wherein:
Figure BDA0003790237280000036
wherein, a p,q For the spectral node affinities of neighboring nodes p and q,
Figure BDA0003790237280000037
embedding vectors for the kth low dimension of node p
Figure BDA0003790237280000038
Figure BDA0003790237280000039
Embedding vectors for the kth low dimension of node q
Figure BDA00037902372800000310
The similarity threshold is set to be greater than 60%;
step 1.2.5: iterating the step 1.2.1 to the step 1.2.4, and further aggregating the aggregated node set as a super node until the original graph is obtained
Figure BDA00037902372800000311
And if the node similarity between any two nodes does not meet the similarity threshold, determining a final node cluster, selecting the first k nearest neighbors in each cluster, and constructing a k nearest neighbor graph.
The step 2 is a graph coarsening method, which specifically comprises the following steps:
step 2.1: inputting an original graph
Figure BDA00037902372800000312
And setting the total coarsening layer number m, wherein i is more than or equal to 0 and less than or equal to m-1;
step 2.2: by projecting a matrix M i,i+1 Coarsening information is stored for coarsening a plurality of nodes into supernodes in a hybrid coarsening, wherein,
Figure BDA00037902372800000313
step 2.3: graph built at i +1 level by matrix operation
Figure BDA00037902372800000314
Adjacent matrix A of i+1 Calculating A i+1 =M i,i+ 1 T A i M i,i+1 Wherein M is i,i+1 Is derived from
Figure BDA00037902372800000315
To
Figure BDA00037902372800000316
A mapping matrix of i Is composed of
Figure BDA00037902372800000317
The adjacency matrix of (a);
step 2.4: calculate the map at the i-1 level
Figure BDA00037902372800000318
Second-order neighbor coarsening mapping matrix of (1)
Figure BDA00037902372800000319
Mark matrix
Figure BDA00037902372800000320
Initializing a node for storing a first-order neighbor coarsening map
Figure BDA00037902372800000321
Pair V in ascending order of node degree i-1 Sorting is carried out;
step 2.5: if v and u are not marked and u is a neighbor node of v, finding a first-order coarsening node u of v according to the information interaction probability t i,j
Figure BDA00037902372800000322
Finally marking the node u and the node v;
step 2.6: based on
Figure BDA00037902372800000323
And
Figure BDA00037902372800000324
calculating a mapping matrix M by matrix operation i-1,i I.e. if it is to
Figure BDA00037902372800000325
The nodes a, b and c in the node B are coarsened into
Figure BDA00037902372800000326
D, then the matrix M is mapped i-1,i The value of the row a, the row d, the column b, the row c and the column d in the table is 1, otherwise, the value is 0; at M i-1,i Each column in the column represents a super node in the next layer of graph, the node value of the coarse super node in the column is 1, and the others are 0;
step 2.7: is calculated to obtain
Figure BDA0003790237280000041
Adjacent matrix A of i As shown in formula (5):
A i =M i-1,i T A i-1 M i-1,i (5)
wherein, M i-1,i To be driven from
Figure BDA0003790237280000042
To
Figure BDA0003790237280000043
A mapping matrix of i-1 Is composed of
Figure BDA0003790237280000044
The adjacency matrix of (a);
step 2.8: repeating the step 2.5 to the step 2.7, and traversing all the nodes after the ascending sequence;
step 2.9: repeating the step 2.1 to the step 2.8 until the total coarsening layer number m is reached;
step 2.10: obtaining i is more than or equal to 0 and less than or equal to m-1 times of coarsening
Figure BDA0003790237280000045
And M i,i+1
The information interaction probability t in the step 2.5 i,j Measuring the similarity between the nodes and determining whether to combine the nodes, comprising the following steps:
step 2.5.1: traverse the original graph
Figure BDA0003790237280000046
All node pairs in;
step 2.5.2: for the original picture
Figure BDA0003790237280000047
Carrying out second-order neighbor coarsening, and merging two nodes with the same neighbor node set;
step 2.5.3: traversing the coarsened graph of the second-order neighbor;
step 2.5.4: calculating the information interaction probability t between node pairs i,j As shown in formula (6):
Figure BDA0003790237280000048
wherein,
Figure BDA0003790237280000049
is the weight of the edge between node i and node j, d i Degree of node i, d j Degree of node j;
step 2.5.5: first order neighbor coarsening is performed on the graph, and the graph is not coarsened and t i,j The largest neighbor node will merge.
The step 3 is graph embedding, and specifically comprises the following steps:
step 3.1: in the coarsest figure
Figure BDA00037902372800000410
Upper application graph embedding g (·);
step 3.2: if the graph embedding method g (-) is an unsupervised embedding method, the coarsest graph and the original graph are expanded
Figure BDA00037902372800000411
The corresponding relation between the node labels and the characteristics;
step 3.3: if graph embedding method g (-) is a supervised embedding method, no extension is needed.
The graph embedding method g (-) in the step 3.2 is an unsupervised embedding method, and specifically comprises the following steps:
step 3.2.1: according to the original diagram
Figure BDA00037902372800000412
And constructing an original graph by using Lb node labels
Figure BDA00037902372800000413
Tag matrix of
Figure BDA00037902372800000414
Each row of the matrix is a label vector in the form of one-hot node;
step 3.2.2: constructing an original graph
Figure BDA00037902372800000415
Mapping matrix M to the coarsest graph 0,i I.e. M 0,i =M 0,1 M 1,2 …M i,i-1 M 0,i ;M 0,i The rows in the matrix are in a one-hot form, and the columns are coarsened nodes;
step 3.2.3: by the label matrix Lb 0 Obtaining labels of the coarsened nodes, taking mode of each column of labels as the labels of the coarsened nodes to obtain a label matrix
Figure BDA00037902372800000416
Step 3.2.4: original graph
Figure BDA0003790237280000051
Node attribute feature F 0 Original picture
Figure BDA0003790237280000052
Feature mapping matrix M to the coarsest graph 0,i (ii) a First to M 0,i Normalization is carried out, and then a characteristic matrix of the coarsest graph is obtained through matrix operation
Figure BDA0003790237280000053
The step 4 specifically comprises the following steps:
step 4.1: using a local refinement process driven by gihonov regularization, node embedding on the graph is smoothed by minimizing the formula, as shown in equation (7):
Figure BDA0003790237280000054
wherein L is i Is a normalized laplacian matrix of the signal,
Figure BDA0003790237280000055
for embedding for smoothing the i-th layer,. Epsilon i Embedding for the ith layer;
and 4.2: taking the derivative of the objective function in the equation in step 4.1 equal to 0, as shown in equation (8):
Figure BDA0003790237280000056
wherein epsilon i For the embedding of the ith layer, I is the identity matrix, L i Is a normalized laplacian matrix of the signal,
Figure BDA0003790237280000057
embedding for smoothing the ith layer;
step 4.3: the mapped embedded matrix is smoothed using a low-pass filter, as shown in equation (9):
Figure BDA0003790237280000058
wherein,
Figure BDA0003790237280000059
a degree matrix is normalized twice for the ith layer,
Figure BDA00037902372800000510
the normalized adjacency matrix for the ith layer,
Figure BDA00037902372800000511
to be driven from
Figure BDA00037902372800000512
To
Figure BDA00037902372800000513
Projection matrix of epsilon i+1 Embedding the (i + 1) th layer;
step 4.4: the original map is obtained by iterating step 4.2
Figure BDA00037902372800000514
Is embedded in 0
Adopt the produced beneficial effect of above-mentioned technical scheme to lie in:
1. the invention provides a method for improving the expandability of a network embedding algorithm. And carrying out graph coarsening by using a mixed coarsening strategy based on second-order neighbor coarsening and first-order neighbor coarsening, and carrying out embedding refinement by using an effective graph filter after calculating and embedding on the coarsest graph. And a large number of experiments prove that the algorithm has more advanced performance compared with other multi-layer strategies.
2. The labels of the super nodes in the coarsest graph are obtained through the calculated label matrix of the original graph and the mapping matrix of the original graph and the coarsest graph, and the labels are used as training labels of a supervised graph embedding algorithm represented by GCN to participate in model training, so that the problem that the supervised graph embedding algorithm cannot be processed by the existing multilayer strategy is solved.
3. The expandability of the graph embedding algorithm is improved. The strategy is irrelevant to the bottom map embedding algorithm, and the capacity of the map embedding algorithm for processing a large-scale network is improved. Finally, the expandability of the strategy is proved by performing real verification on a large-scale graph data set Friendster.
Drawings
FIG. 1 is a schematic diagram of a method for improving the scalability of a network embedding algorithm according to the present invention;
FIG. 2 is a schematic diagram of a hybrid coarsening strategy in a graph coarsening stage of the present invention;
FIG. 3 is a schematic diagram of Micro-F1 values under different coarsening layers after the invention combines the baseline algorithm embedded by various graphs;
FIG. 4 is a comparison graph of CPU time at different coarseness layers after the invention incorporates the baseline algorithm embedded by each type of graph;
FIG. 5 is a schematic diagram of the Micro-F1 values under different coarsening layers for the scalability experiment on a large-scale network according to the present invention;
FIG. 6 is a graph of node number and edge number changes in a coarsened graph, obtained from a scalability experiment on a large-scale network according to the present invention;
FIG. 7 is a system use diagram of a prototype system developed in the present invention;
FIG. 8 is a schematic diagram of system functional modules of a prototype system developed in the present invention;
FIG. 9 is a timing diagram of a model training lifecycle of a prototype system developed in the present invention;
FIG. 10 is a timing diagram of a data set upload for a prototype system developed in the present invention;
FIG. 11 is a data set upload interface screenshot of a prototype system developed in the present invention;
FIG. 12 is a static web data source introduction interface screenshot of a prototype system developed in the present invention;
FIG. 13 is a static network data detail introduction interface screenshot of a prototype system developed in the present invention;
FIG. 14 is a screenshot of a model training module interface of a prototype system developed in the present invention;
FIG. 15 is a screenshot of a node classification task result interface of the prototype system developed in the present invention;
FIG. 16 is a resource occupancy interface screenshot of the current server of the prototype system developed in the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
The embodiment provides a method for improving the extensibility of a network embedding algorithm, as shown in fig. 1, which includes the following steps:
step 1: for an original graph
Figure BDA0003790237280000061
The original graph is an undirected graph, the node characteristic matrix of the undirected graph is converted into a characteristic graph and is fused with the original topology of the original graph to calculate A fusion =f(A topo And X), wherein,
Figure BDA0003790237280000062
represented as a contiguous matrix of the array of pixels,
Figure BDA0003790237280000063
represented as a matrix of the characteristics of the nodes,
Figure BDA0003790237280000064
representing weighted graphs
Figure BDA0003790237280000065
The adjacency matrix of (a); the method specifically comprises the following steps:
step 1.1: original graph for | V | nodes
Figure BDA0003790237280000066
Its adjacency matrix is expressed as
Figure BDA0003790237280000067
Its node feature matrix is
Figure BDA0003790237280000068
Wherein K represents the dimension of the feature vector of the corresponding node;
step 1.2: generating a k nearest neighbor graph according to the L2-norm between the attribute vectors of each node pair by using a local spectral clustering algorithm, and converting the original graph into a new graph
Figure BDA0003790237280000069
Is converted into a node feature map
Figure BDA00037902372800000610
Wherein the L2-norm is the Euclidean distance;
the generation of the k nearest neighbor graph in the step 1.2 specifically includes the following steps:
step 1.2.1: taking a random graph signal x as a random vector, and representing by combining a linear combination of a feature vector u of a graph Laplacian;
step 1.2.2: filtering out a high-frequency component of a random graph signal x by adopting a low-pass graph filter, wherein the high-frequency component of the random graph signal x is a feature vector corresponding to a high feature value of a graph Laplacian operator, and obtaining a smooth vector by applying a smoothing function to the random graph signal x
Figure BDA0003790237280000071
As shown in formula (1):
Figure BDA0003790237280000072
step 1.2.3: solving a system of linear equations using Gauss-Seidel iterations
Figure BDA0003790237280000073
To obtain T initial random vectors T = (x) (1) ,...,x (t) ) Wherein
Figure BDA0003790237280000074
representing the original picture
Figure BDA0003790237280000075
A laplacian matrix of;
step 1.2.4: embedding each node into a T-dimensional space based on an initial random vector T, and calculating low-dimensional embedded vectors of a node p and a node q
Figure BDA0003790237280000076
And
Figure BDA0003790237280000077
similarity, if the similarity meets a similarity threshold, the node p and the node q are similar nodes, and the node similarity is determined by the spectrum node affinity of the adjacent nodes p and q, as shown in formula (2);
Figure BDA0003790237280000078
wherein:
Figure BDA0003790237280000079
wherein, a p,q For the spectral node affinities of neighboring nodes p and q,
Figure BDA00037902372800000710
embedding vectors for the kth low dimension of node p
Figure BDA00037902372800000711
Figure BDA00037902372800000712
Embedding vectors for the kth low dimension of node q
Figure BDA00037902372800000713
The similarity threshold is set to be greater than 60%;
step 1.2.5: iterating the step 1.2.1 to the step 1.2.4, and further aggregating the aggregated node set as a super node until the original graph is obtained
Figure BDA00037902372800000714
Determining a final node cluster if no node similarity between any two nodes meets a similarity threshold, selecting the first k nearest neighbors in each cluster, and constructing a k nearest neighbor graph;
step 1.3: according to the original diagram
Figure BDA00037902372800000715
The cosine similarity between the attribute vectors of any two nodes assigns a weight to each edge of the k-nearest neighbor graph, i.e.
Figure BDA00037902372800000716
Wherein X i,: And X j,: Is the attribute vector for nodes i and j;
step 1.4: combining the topological graph and the attribute graph, and constructing a fusion graph through weighting, wherein the formula (4) is as follows:
A fusion =A topo +βA feat (4)
wherein beta is used for balancing topology structure information and node characteristic information in the fusion process,
Figure BDA00037902372800000717
representing weighted graphs
Figure BDA00037902372800000718
Of a neighboring matrix of feat A node feature matrix of the k nearest neighbor graph is obtained;
step 2: using hybrid coarsening to transform an original graph
Figure BDA00037902372800000719
Coarsening to
Figure BDA00037902372800000720
Is a graph which is subjected to the coarsening for the first time,
Figure BDA00037902372800000721
is the final coarsest graph after m coarsening;
in this embodiment, the original graph is coarsened by a hybrid coarsening strategy
Figure BDA0003790237280000081
Iteratively coarsening into smaller graphs; the two-stage neighbor coarsening strategy can effectively coarsen the graph and simultaneously reserve the global structure; as shown in fig. 2;
second-order neighbor coarsening; because the nodes sharing similar adjacent nodes have higher second-order similarity, two nodes with the same neighbor node set are merged; as shown in FIG. 2, node v 1 ,v 2 And v 3 Will be merged since they are both connected to node v 4 And has a common neighbor set v 4 V node 5 Unlike their neighbor set;
first-order neighbor coarsening; after the second-order coarsening, a plurality of non-coarsened and adjacent nodes still exist, and the nodes also have high probability to carry out information exchange so as to have similar characteristics, so that the strategy measures whether two non-coarsened adjacent nodes should be merged or not through the information exchange probability; if at node v i Of neighbors, slave node v i To node v j Information propagation probability of
Figure BDA0003790237280000082
Maximum, then node v j Is node v i Most probabilistically spread the information, but this does not mean that node v is j Also most probable to node v i Information is propagated; the strategy uses the information interaction probability t i,j The similarity of the two nodes is measured, and is shown in a formula (5); not coarsened and t i,j The largest neighbor node will be merged; as shown in FIG. 2, after the second order folding, the weights
Figure BDA0003790237280000083
Degree of node d 7 =4,d 8 =2,d 9 =2, so t 7,8 =1/8 and t 8,9 =1/4, therefore node v 8 And v 9 Will be merged;
Figure BDA0003790237280000084
the method specifically comprises the following steps:
step 2.1: inputting an original graph
Figure BDA0003790237280000085
And setting the total coarsening layer number m, wherein i is more than or equal to 0 and less than or equal to m-1;
step 2.2: by projecting a matrix M i,i+1 Saving coarsening information for coarsening a plurality of nodes into supernodes in the hybrid coarsening, wherein,
Figure BDA0003790237280000086
step 2.3: constructing graphs at the i +1 level by matrix operations
Figure BDA0003790237280000087
Adjacent matrix A of i+1 Calculating A i+1 =M i,i+ 1 T A i M i,i+1 Wherein M is i,i+1 To be driven from
Figure BDA0003790237280000088
To
Figure BDA0003790237280000089
Of a mapping matrix of i Is shown as a drawing
Figure BDA00037902372800000810
The adjacency matrix of (a);
step 2.4: calculate the map at the i-1 level
Figure BDA00037902372800000811
Second-order neighbor coarsening mapping matrix of (1)
Figure BDA00037902372800000812
Mark matrix
Figure BDA00037902372800000813
Initializing a node for storing a first-order neighbor coarsening mapping
Figure BDA00037902372800000814
Pair V in ascending order of node degree i-1 Sorting is carried out;
step 2.5: if v and u are not marked and u is a neighbor node of v, finding a first-order coarsening node u of v according to the information interaction probability t i,j
Figure BDA00037902372800000815
Finally marking the node u and the node v;
the information interaction probability t in the step 2.5 i,j Measuring between nodesSimilarity, whether to merge nodes is determined, and the method comprises the following steps:
step 2.5.1: traverse the original graph
Figure BDA00037902372800000816
All node pairs in;
step 2.5.2: to the picture
Figure BDA00037902372800000817
Performing second-order neighbor coarsening, and merging two nodes with the same neighbor node set;
step 2.5.3: traversing the coarsened graph of the second-order neighbor;
step 2.5.4: calculating information interaction probability t between node pairs i,j As shown in formula (6):
Figure BDA0003790237280000091
wherein,
Figure BDA0003790237280000092
is the weight of the edge between node i and node j, d i Degree of node i, d j Degree of node j;
step 2.5.5: first order neighbor coarsening is performed on the graph, and the graph is not coarsened and t i,j The largest neighbor node will be merged;
step 2.6: based on
Figure BDA0003790237280000093
And
Figure BDA0003790237280000094
calculating mapping matrix M by matrix operation i-1,i I.e. if it is to
Figure BDA0003790237280000095
The nodes a, b and c in the network are coarsened into
Figure BDA0003790237280000096
D, then the matrix M is mapped i-1,i The value of the row a, the row d, the row b, the row c and the column d is 1, otherwise, the value is 0; at M i-1,i Each column in the column represents a super node in the next layer of graph, the node value of the coarse super node in the column is 1, and the others are 0;
step 2.7: is calculated to obtain
Figure BDA0003790237280000097
Adjacent matrix A of i As shown in formula (7):
A i =M i-1,i T A i-1 M i-1,i (7)
wherein M is i-1,i To be driven from
Figure BDA0003790237280000098
To
Figure BDA0003790237280000099
A mapping matrix of i-1 Is shown as a drawing
Figure BDA00037902372800000910
The adjacency matrix of (a);
step 2.8: repeating the step 2.5 to the step 2.7, and traversing all the nodes after the ascending sequence;
step 2.9: repeating the step 2.1 to the step 2.8 until the total coarsening layer number m is reached;
step 2.10: obtaining i is more than or equal to 0 and less than or equal to m-1 times of coarsening
Figure BDA00037902372800000911
And M i,i+1
And step 3: in the coarsest figure
Figure BDA00037902372800000912
Executing a graph embedding method g (-) to obtain an embedding result epsilon;
the method specifically comprises the following steps:
step 3.1: in the coarsest figure
Figure BDA00037902372800000913
Upper application graph embedding g (·);
step 3.2: if the graph embedding method g (-) is an unsupervised embedding method, the corresponding relation of the node labels and the characteristics between the coarsest graph and the original graph is expanded;
the step 3.2 is an unsupervised embedding method for the graph embedding method g (-) and specifically comprises the following steps:
step 3.2.1: from the original graph
Figure BDA00037902372800000914
And constructing an original graph by using Lb node labels
Figure BDA00037902372800000915
Tag matrix of
Figure BDA00037902372800000916
Each row of the matrix is a label vector in the form of one-hot node;
step 3.2.2: constructing a mapping matrix M from an original image to a coarsest image 0,i I.e. M 0,i =M 0,1 M 1,2 …M i,i-1 M 0,i ;M 0,i The rows in the matrix are in a one-hot form, and the columns are coarsened nodes;
step 3.2.3: by the label matrix Lb 0 Obtaining labels of the coarsened nodes, taking mode of each column of labels as the labels of the coarsened nodes to obtain a label matrix
Figure BDA00037902372800000917
Step 3.2.4: node attribute feature F of original graph 0 Feature mapping matrix M from original graph to coarsest graph 0,i (ii) a First to M 0,i Normalization is carried out, and then a characteristic matrix of the coarsest graph is obtained through matrix operation
Figure BDA0003790237280000101
Step 3.3: if the graph embedding method g (-) is a supervised embedding method, no expansion is needed;
network embedding is carried out on the coarsest graph, so that the global structure of the original graph can be visually captured; performing m times of iterative coarsening on the graph, and performing coarseness on the coarsest graph
Figure BDA0003790237280000102
Apply graph embedding method g (·); will be provided with
Figure BDA0003790237280000103
Is represented by epsilon m Thus, therefore, it is
Figure BDA0003790237280000104
Since the invention is independent of the graph embedding method employed, any graph embedding algorithm can be used for basic embedding;
it is worth noting that the research of the original multilayer method is that the supervised embedding algorithms such as GCN and the like cannot be processed, because the corresponding relation between the node labels and the characteristics between the coarsest graph and the original graph cannot be found, the invention widens the limit through the matrix operation;
and 4, step 4: obtaining an original graph according to the embedding result epsilon obtained in the step 3
Figure BDA0003790237280000105
Is embedded in 0
The step 4 is graph thinning, namely, the embedding is thinned back to the original graph through a low-pass graph filter, and meanwhile, the smoothness of the embedding on the original graph is ensured; the method specifically comprises the following steps:
step 4.1: using a local refinement process driven by gihonov regularization, the node embedding on the graph is smoothed by a minimization formula, as shown in equation (8):
Figure BDA0003790237280000106
wherein L is i Is a normalized laplacian matrix of the signal,
Figure BDA0003790237280000107
for embedding for smoothing the i-th layer,. Epsilon i Embedding for the ith layer;
and 4.2: taking the derivative of the objective function in the equation in step 4.1 equal to 0, as shown in equation (9):
Figure BDA0003790237280000108
wherein epsilon i For the embedding of the ith layer, I is the identity matrix, L i Is a normalized laplacian matrix of the signal,
Figure BDA0003790237280000109
embedding for smoothing the ith layer;
step 4.3: the mapped embedded matrix is smoothed using a low-pass filter, as shown in equation (10):
Figure BDA00037902372800001010
wherein,
Figure BDA00037902372800001011
a degree matrix is normalized twice for the ith layer,
Figure BDA00037902372800001012
the normalized adjacency matrix for the ith layer,
Figure BDA00037902372800001013
to be driven from
Figure BDA00037902372800001014
To
Figure BDA00037902372800001015
Projection matrix of epsilon i+1 Embedding the (i + 1) th layer;
step 4.4: the embedding epsilon of the original graph is obtained by iterating step 4.2 0
To illustrate the effectiveness of the method of the invention, we performed the following experiments:
experimental analysis comparing various kinds of graph-embedded baseline algorithms, the experimental results are shown in fig. 3-4 in the accuracy and time of use under different coarsening layers, and the method comprises the following steps:
step S1: experimental selection of a Pubmed data set;
step S1.1: selecting a baseline algorithm comprising Deepwalk, node2vec, graRep and NetMF;
step S1.2: setting a hyper-parameter; all basic embedding methods, the embedding dimension d is set to 128; each node of the Deepwalk and node2vec algorithm performs 10 random walks, the walk length is 80, the window size is 10, the return parameter p =1.0 in the node2vec, and the in-out parameter q =0.5;
step S1.3: after the method and the baseline algorithm embedded in various graphs are operated, the Micro-F1 values and the time consumption under different coarsening layers are obtained; the calculation process of the Micro-F1 is as follows:
Figure BDA0003790237280000111
Figure BDA0003790237280000112
Figure BDA0003790237280000113
step S1.4: CPU time process _ time (the value of the sum of the system and user CPU time of the current process) for different algorithms, this time value is commonly used for the testing of code time, and the reported time includes all phase times of the model;
step S1.5: visualizing the Micro-F1 value and the use time, and carrying out comparative analysis;
FIG. 3 shows the embedded baseline algorithm of various graphs after the method of the invention (MLAGE) is combined with the Micro-F1 values and the time of use under different coarsening layers, where the baseline algorithm includes deep walk, node2vec, graRep and NetMF, and the experimental use is the Pubmed data set;
fig. 3 (a) shows the improvement of the embedding quality by MLAGE, the abscissa is the number of coarsening layers, the ordinate is the Micro-F1 value, and the number of layers equal to 0 represents the original embedding algorithm without MLAGE, and it can be observed that the embedding after MLAGE is always optimal in all methods; FIG. 3 (b) can see the effect of MLAGE on runtime, with the abscissa being the number of coarsening layers and the ordinate being the execution time, where CPU time is used as the execution time, and the execution time of MLAGE is the sum of CPU time at each stage; it can be seen that as the number of coarsening layers increases, the time consumption almost decreases exponentially; in general, the MLAGE is used for not only faster embedding speed, but also improving the embedding quality;
FIG. 4 is a comparison of Deepwalk, netMF and coarsened MLAGE (DW, l = 7) and MLAGE (NMF, l = 7), and it can be seen that the multilayer method adds only a small amount of graph fusion, coarsening and thinning time, which sharply reduces the embedding time, and the total time is only 1/67 and 1/373 of the original time;
experimental analysis comparing accuracy and time of other multi-layer methods under different coarsening layers, experimental results are shown in the attached table 1-table 5; the method comprises the following steps:
step S2: selecting Cora, citeser and Pubmed data sets in an experiment;
step S2.1: the method uses Deepwalk based on random walk, graRep based on matrix decomposition, DGI based on a graph neural network and GCN based on a semi-supervised embedding algorithm of the graph neural network as an embedding kernel, and the method also uses the same embedding kernel;
step S2.2: setting a hyper-parameter; the embedding dimension d except DGI is set to 128, the embedding dimension d of DGI is 512, each node of the Deepwalk algorithm carries out 10 random walks, the walk length is 80, the window size is 10, the GCN and the DGI use an early stopping strategy, the learning rates of the early stopping strategy are 0.01 and 0.001 respectively, and the epoch iteration number is set to 200; in the aspect of GraphSAGE configuration, each epoch trains a two-layer model, the learning rate is 0.00001, and the batch size is 256;
step S2.3: setting different coarsening layers; l =1, 2, 3;
step S2.4: after the Method (MLAGE) and the baseline algorithm embedded in each graph in the step S2.1 are operated, the Micro-F1 values and the time consumption under different coarsening layers are obtained;
step S2.5: acquiring CPU time (process _ time) of different algorithms, namely the value of the sum of the CPU time of a system and a user of the current process;
step S2.6: visualizing the Micro-F1 value and the use time, and carrying out comparative analysis;
compared with other multilayer methods, the MLAGE shows results of three coarsening layers in a direct push type node classification experiment, and shows results of two coarsening layers in a inductive node classification experiment; the results of various network embedding show that MLAGE is irrelevant to the bottom layer embedding method, and the accuracy and speed of embedding can be improved on various data, even the performance of the most advanced network embedding algorithm in the prior art can be improved; the experimental results are shown in the attached tables 1 to 5, wherein Gzoom represents Graphzoom multilayer method, and l represents the number of coarsening layers;
specifically, for the direct push learning task, MLAGE improved the class Micro-F1 values for deep walk by 0.025, 0.043 and 0.064 on the Cora, cineser and Pubmed datasets, respectively, while achieving up to 8.1 times the run-time reduction, see table 1; for the classification Micro-F1 values of GraRep, the values are respectively improved by 0.047, 0.036 and 0.045, and meanwhile, the maximum 5 times of CPU operation time reduction is realized, see Table 2, in addition, the acceleration effect of the multilayer method is not obvious under the condition of the original extremely short operation time through the experiment that GraRep is used as an embedded kernel on Cora and Citeser data sets; MLAGE also achieved higher accuracy than DGI, with an acceleration ratio as high as 8.4 ×, see table 3;
TABLE 1 comparative experimental results of graph embedding algorithm Deepwalk based on random walk and multi-layer method using Deepwalk as embedding kernel
Figure BDA0003790237280000131
TABLE 2 comparative experimental results of graph embedding algorithm GraRep based on matrix decomposition and a multi-layer method using GraRep as embedding kernel
Figure BDA0003790237280000132
TABLE 3 comparison of experimental results of the graph neural network based unsupervised embedding algorithm DGI and the multi-layer method using DGI as the embedding kernel
Figure BDA0003790237280000133
The MLAGE can also improve the accuracy and the expandability of the network embedding of semi-supervised learning in most cases, see Table 4, but the GCN runs too fast on a small data set, so that the speed of the small data set cannot be improved, and the experimental result on the Citeser data set shows that the MLAGE (GCN) is longer than the GCN in use, because the semi-supervised algorithm needs to spend a little time on constructing a super-node label matrix of a rough graph before calculating the embedding, the time is more at nodes, the performance is more obvious on the Citeser small-size graph data set with fewer edges, the advantage of the coarsening speed cannot be embodied due to fewer edges, the time proportion for constructing the super-node label matrix is larger due to more nodes, and finally, the result that the MLAGE (GCN) is longer than the GCN in use is caused;
TABLE 4 comparison experiment results of semi-supervised embedding algorithm GCN based on graph neural network and MLAGE with GCN as embedding kernel
Figure BDA0003790237280000141
For induction learning tasks, MLAGE performed on PPI and Citeser better than the Micro-F1 values of GraphSAGE four aggregation functions, respectively, with acceleration ratios as high as 4.0 ×, see Table 5;
TABLE 5 Induction of Micro-F1 values and CPU time for tasks, baseline is the experimental result of GraphSAGE with four different aggregation functions
Figure BDA0003790237280000142
These results indicate that a method for improving network embedding algorithm scalability (MLAGE) improves embedding speed and quality, because the embedding model is trained only for the smallest coarsened graph on the coarsest level, in addition to reducing the size of the graph, the coarsening method of MLAGE further filters out redundant information in the original graph, so that the embedding method can more intuitively capture the global structure of the original graph;
the experiment verifies the expandability on the large-scale network, and the experimental result is shown in the attached figures 5-6, and comprises the following steps:
and step S3: selecting a Friendster data set with more than 200 ten thousand nodes and more than 700 ten thousand edges for experiment;
step S3.1: the method of the invention (MLAGE) uses DeepWalk as the embedding kernel;
step S3.2: setting a hyper-parameter; the embedding dimension d is set to be 128, each node of the deep walk algorithm carries out 10 times of random walks, the walk length is 80, and the window size is 10;
step S3.3: setting different coarsening layers; l =1, 2, 3, 4, 5, 6;
step S3.4: after the method and the baseline algorithm embedded in various graphs are operated, the Micro-F1 values and the time consumption under different coarsening layers are obtained;
step S3.5: obtaining the CPU time process _ time of different algorithms;
step S3.6: obtaining the node number change of the graph and the edge number change of the graph after different coarsenings;
step S3.7: visualizing the change of the number of nodes of the graph and the change of the number of edges of the graph after the Micro-F1 value, time consumption and different coarsenings are carried out, and carrying out comparative analysis;
in the experiment, the MLAGE uses Deepwalk as an embedded kernel, as shown in FIG. 5, after 1 layer of coarsening, the Micro-F1 scores of the MLAGE and the Deepwalk are equivalent, but the CPU time is greatly accelerated, and the acceleration ratio reaches 3.2 x; fig. 6 shows the number of nodes and edges of the coarsened graph, which can clearly show the coarsening capability of MLAGE, and the number of nodes after 6 layers of coarsening is reduced to 162,604, which is only 8.0% of the number of nodes in the original graph; the number of edges is reduced to 2,636,275 which is only 35.7 percent of the number of the edges of the original graph; in addition, with the increase of the number of coarsening layers, the embedding precision of the MLAGE is only reduced elegantly, and high embedding quality is still kept in 5-layer coarsening; this shows the core advantages of MLAGE: the large-scale network is effectively coarsened by combining redundant nodes with similar information, so that the graph structure attribute which is important for a basic embedding model of a bottom layer is reserved, and when basic embedding is applied to the coarsest graph, the global structure of the graph can be visually captured, so that high-quality embedding is realized;
partial interface screenshots of system function modules of the prototype system developed in the invention are shown in fig. 7, fig. 8, fig. 9, fig. 10, fig. 11, fig. 12, fig. 13, fig. 14, fig. 15 and fig. 16, and are used for training and testing the model through a clear system page, and supporting functions of adjusting hyper-parameters, managing data sets, visualizing the training process, displaying test results in a chart and the like; the method comprises the following steps:
and step S4: constructing a prototype system; the system use diagram of the prototype system is shown in fig. 7, the system function module is shown in fig. 8, the model training life cycle timing diagram is shown in fig. 9, and the data set uploading timing diagram is shown in fig. 10;
step S4.1: uploading a data set, as shown in FIG. 11;
step S4.2: view data sets, as shown in FIGS. 12-13;
step S4.3: selecting a data set and a downstream task through a drop-down box; as shown in fig. 14;
step S4.4: the super parameters are set, and input limitation and prompt are provided for input of the super parameters, so that training collapse caused by wrong input is avoided; as shown in fig. 14;
step S4.5: clicking to start training to automatically jump to a training process page, displaying the total training progress at the top of the page, and displaying the training process below the page; a plurality of references can be provided for experiments according to the index change trend; as shown in fig. 15-16;
step S4.6: after training is finished, the automatic downloading network embedded file embed.npy is sent to the local, and a test task is executed;
step S4.7: the system will automatically download the log file of the detailed test results locally.

Claims (10)

1. A method for improving expandability of a network embedding algorithm is characterized in that: the method comprises the following steps:
step 1: for an original graph
Figure FDA0003790237270000011
The original graph is an undirected graph, the node characteristic matrix of the undirected graph is converted into a characteristic graph and is fused with the original topology of the original graph, and A is calculated fusion =f(A topo And X), wherein,
Figure FDA0003790237270000012
represented as a contiguous matrix of the array of pixels,
Figure FDA0003790237270000013
represented as a matrix of the characteristics of the nodes,
Figure FDA0003790237270000014
representing weighted graphs
Figure FDA0003790237270000015
The adjacency matrix of (a);
step 2: using hybrid coarsening to transform an original graph
Figure FDA0003790237270000016
Coarsening to
Figure FDA0003790237270000017
Figure FDA0003790237270000018
Is a graph which is subjected to first coarsening,
Figure FDA0003790237270000019
after m times of coarseningThe final coarsest graph;
and step 3: in the coarsest figure
Figure FDA00037902372700000110
Executing a graph embedding method g (-) to obtain an embedding result epsilon;
and 4, step 4: obtaining an original graph according to the embedding result epsilon obtained in the step 3
Figure FDA00037902372700000111
Is embedded in 0
2. The method for improving scalability of network embedding algorithms according to claim 1, wherein: the step 1 specifically comprises the following steps:
step 1.1: original graph for | V | nodes
Figure FDA00037902372700000112
Its adjacency matrix is expressed as
Figure FDA00037902372700000113
Its node feature matrix is
Figure FDA00037902372700000114
Wherein K represents the dimension of the feature vector of the corresponding node;
step 1.2: generating a k nearest neighbor graph according to the L2-norm between the attribute vectors of each node pair by using a local spectral clustering algorithm, and converting the original graph into a new graph
Figure FDA00037902372700000115
Is converted into a node feature map
Figure FDA00037902372700000116
Wherein the L2-norm is the Euclidean distance;
step 1.3: according to the original diagram
Figure FDA00037902372700000117
The cosine similarity between the attribute vectors of any two nodes assigns a weight to each edge of the k nearest neighbor graph, i.e. each edge is weighted
Figure FDA00037902372700000118
Wherein, X i,: And X j,: Is the attribute vector for nodes i and j;
step 1.4: combining the topological graph and the attribute graph, and constructing a fusion graph through weighting, wherein the fusion graph is shown as a formula (1):
A fusion =A topo +βA feat (1)
wherein beta is used for balancing topology structure information and node characteristic information in the fusion process,
Figure FDA00037902372700000119
representing weighted graphs
Figure FDA00037902372700000120
Of a neighboring matrix of feat Is a node characteristic matrix of the k nearest neighbor graph.
3. The method for improving scalability of network embedding algorithms according to claim 2, wherein: the generation of the k-nearest neighbor graph in the step 1.2 specifically comprises the following steps:
step 1.2.1: taking a random graph signal x as a random vector, and representing by combining a linear combination of feature vectors u of a graph Laplacian operator;
step 1.2.2: filtering out a high-frequency component of a random graph signal x by adopting a low-pass graph filter, wherein the high-frequency component of the random graph signal x is a feature vector corresponding to a high feature value of a graph Laplacian operator, and obtaining a smooth vector by applying a smoothing function to the random graph signal x
Figure FDA0003790237270000021
As shown in formula (2):
Figure FDA0003790237270000022
step 1.2.3: solving linear equations with Gauss-Seidel iteration
Figure FDA0003790237270000023
T initial random vectors T = (x) are obtained (1) ,...,x (t) ) Wherein, in the process,
Figure FDA0003790237270000024
representing the original picture
Figure FDA0003790237270000025
A laplacian matrix of;
step 1.2.4: embedding each node into a T-dimensional space based on an initial random vector T, and calculating low-dimensional embedded vectors of a node p and a node q
Figure FDA0003790237270000026
And
Figure FDA0003790237270000027
similarity, if the similarity meets a similarity threshold, the node p and the node q are similar nodes;
step 1.2.5: iterating the step 1.2.1 to the step 1.2.4, and further aggregating the aggregated node set as a super node until the original graph y 0 And if the node similarity between any two nodes does not meet the similarity threshold, determining a final node cluster, selecting the first k nearest neighbors in each cluster, and constructing a k nearest neighbor graph.
4. The method for improving scalability of network embedding algorithms according to claim 3, wherein: the node similarity is determined by the spectrum node affinity of adjacent nodes p and q, and is shown in formula (3):
Figure FDA0003790237270000028
wherein:
Figure FDA0003790237270000029
wherein, a p,q For the spectral node affinities of neighboring nodes p and q,
Figure FDA00037902372700000210
embedding vectors for the kth low dimension of node p
Figure FDA00037902372700000211
Figure FDA00037902372700000212
Embedding vectors for the kth low dimension of node q
Figure FDA00037902372700000213
5. The method for improving scalability of network embedding algorithms according to claim 4, wherein: the similarity threshold is set to be greater than 60%.
6. The method for improving scalability of network embedding algorithms according to claim 1, wherein: the step 2 is a graph coarsening method, which specifically comprises the following steps:
step 2.1: inputting an original graph
Figure FDA00037902372700000214
And setting the total coarsening layer number m, wherein i is more than or equal to 0 and less than or equal to m-1;
step 2.2: by projecting a matrix M i,i+1 Coarsening information is stored for coarsening a plurality of nodes into supernodes in a hybrid coarsening, wherein,
Figure FDA00037902372700000215
step 2.3: constructing graphs at the i +1 level by matrix operations
Figure FDA00037902372700000216
Adjacent matrix A of i+1 Calculating A i+1 =M i,i+1 T A i M i,i+1 Wherein M is i,i+1 To be driven from
Figure FDA00037902372700000217
To
Figure FDA00037902372700000218
Of a mapping matrix of i Is composed of
Figure FDA00037902372700000219
The adjacency matrix of (a);
step 2.4: calculate the map at the i-1 level
Figure FDA0003790237270000031
Second-order neighbor coarsening mapping matrix of (1)
Figure FDA0003790237270000032
Mark matrix
Figure FDA0003790237270000033
Initializing a node for storing a first-order neighbor coarsening map
Figure FDA0003790237270000034
Pair V in ascending order of node degree i-1 Sorting is carried out;
step 2.5: if v and u are not marked and u is a neighbor node of v, finding a first-order coarsening node u of v according to the information interaction probability t i,j
Figure FDA0003790237270000035
Finally marking the node u and the node v;
step 2.6: based on
Figure FDA0003790237270000036
And
Figure FDA0003790237270000037
calculating a mapping matrix M by matrix operation i-1,i I.e. if it is to
Figure FDA0003790237270000038
The nodes a, b and c in the network are coarsened into
Figure FDA0003790237270000039
D, then the matrix M is mapped i-1,i The value of the row a, the row d, the column b, the row c and the column d in the table is 1, otherwise, the value is 0; at M i-1,i Each column in the column represents a super node in the next layer of graph, the node value of the coarse super node in the column is 1, and the others are 0;
step 2.7: is calculated to obtain
Figure FDA00037902372700000310
Adjacent matrix A of i As shown in formula (5):
A i =M i-1,i T A i-1 M i-1,i (5)
wherein, M i-1,i To be driven from
Figure FDA00037902372700000311
To
Figure FDA00037902372700000312
A mapping matrix of i-1 Is composed of
Figure FDA00037902372700000313
The adjacency matrix of (a);
step 2.8: repeating the steps 2.5 to 2.7, and traversing all the nodes after the ascending sequence;
step 2.9: repeating the step 2.1 to the step 2.8 until the total coarsening layer number m is reached;
step 2.10: obtaining i is more than or equal to 0 and less than or equal to m-1 times of coarsening
Figure FDA00037902372700000314
And M i,i+1
7. The method for improving scalability of network embedding algorithms according to claim 6, wherein: the information interaction probability t in the step 2.5 i,j Measuring the similarity between the nodes and determining whether to merge the nodes, comprising the following steps:
step 2.5.1: traverse the original graph
Figure FDA00037902372700000315
All node pairs in;
step 2.5.2: for the original picture
Figure FDA00037902372700000316
Performing second-order neighbor coarsening, and merging two nodes with the same neighbor node set;
step 2.5.3: traversing the coarsened graph of the second-order neighbor;
step 2.5.4: calculating information interaction probability t between node pairs i,j As shown in formula (6):
Figure FDA00037902372700000317
wherein,
Figure FDA00037902372700000318
is the weight of the edge between node i and node j, d i Degree of node i, d j Degree of node j;
step 2.5.5: first order neighbor coarsening is performed on the graph, and the graph is not coarsened and t i,j The largest neighbor node will merge.
8. The method for improving scalability of network embedding algorithms according to claim 1, wherein: the step 3 is graph embedding, and specifically comprises the following steps:
step 3.1: in the coarsest figure
Figure FDA0003790237270000041
Upper application graph embedding g (·);
step 3.2: if the graph embedding method g (-) is an unsupervised embedding method, the coarsest graph and the original graph are expanded
Figure FDA0003790237270000042
The corresponding relation between node labels and characteristics;
step 3.3: if graph embedding method g (-) is a supervised embedding method, no extension is needed.
9. The method for improving scalability of network embedding algorithms according to claim 8, wherein: the graph embedding method g (-) in the step 3.2 is an unsupervised embedding method, and specifically comprises the following steps:
step 3.2.1: according to the original diagram
Figure FDA0003790237270000043
And constructing an original graph by Lb node labels
Figure FDA0003790237270000044
Tag matrix of
Figure FDA0003790237270000045
Each row of the matrix is a label vector in the form of one-hot node;
step 3.2.2: constructing an original graph
Figure FDA0003790237270000046
To the coarsestMapping matrix M of the graph 0,i I.e. M 0,i =M 0,1 M 1,2 …M i,i-1 M 0,i ;M 0,i The rows in the matrix are in a one-hot form, and the columns are coarsened nodes;
step 3.2.3: through the label matrix Lb 0 Obtaining labels of the coarsened nodes, taking mode of each column of labels as the labels of the coarsened nodes to obtain a label matrix
Figure FDA0003790237270000047
Step 3.2.4: original graph
Figure FDA0003790237270000048
Node attribute feature F 0 Original picture
Figure FDA0003790237270000049
Feature mapping matrix M to the coarsest graph 0,i (ii) a First to M 0,i Normalization is carried out, and then a characteristic matrix of the coarsest graph is obtained through matrix operation
Figure FDA00037902372700000410
10. The method for improving scalability of network embedding algorithms according to claim 1, wherein: the step 4 specifically comprises the following steps:
step 4.1: using a local refinement process driven by gihonov regularization, node embedding on the graph is smoothed by minimizing the formula, as shown in equation (7):
Figure FDA00037902372700000411
wherein L is i Is a normalized laplacian matrix of the signal,
Figure FDA00037902372700000412
for embedding for smoothing the i-th layer,. Epsilon i Embedding for the ith layer;
step 4.2: taking the derivative of the objective function in the equation in step 4.1 equal to 0, as shown in equation (8):
Figure FDA00037902372700000413
wherein epsilon i For the embedding of the ith layer, I is the identity matrix, L i Is a normalized laplacian matrix of the signal,
Figure FDA00037902372700000414
embedding for smoothing the ith layer;
step 4.3: the mapped embedded matrix is smoothed using a low-pass filter, as shown in equation (9):
Figure FDA00037902372700000415
wherein,
Figure FDA0003790237270000051
a degree matrix is normalized twice for the ith layer,
Figure FDA0003790237270000052
the normalized adjacency matrix for the ith layer,
Figure FDA0003790237270000053
to be driven from
Figure FDA0003790237270000054
To
Figure FDA0003790237270000055
Projection matrix of epsilon i+1 Embedding the (i + 1) th layer;
step 4.4:obtaining the original map by iterating step 4.2
Figure FDA0003790237270000056
Is embedded in 0
CN202210953351.9A 2022-08-10 2022-08-10 Method for improving expandability of network embedding algorithm Pending CN115310594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210953351.9A CN115310594A (en) 2022-08-10 2022-08-10 Method for improving expandability of network embedding algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210953351.9A CN115310594A (en) 2022-08-10 2022-08-10 Method for improving expandability of network embedding algorithm

Publications (1)

Publication Number Publication Date
CN115310594A true CN115310594A (en) 2022-11-08

Family

ID=83861325

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210953351.9A Pending CN115310594A (en) 2022-08-10 2022-08-10 Method for improving expandability of network embedding algorithm

Country Status (1)

Country Link
CN (1) CN115310594A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858874A (en) * 2022-12-29 2023-03-28 山东启光信息科技有限责任公司 Node2vector algorithm based on algebraic method
CN117194721A (en) * 2023-08-22 2023-12-08 黑龙江工程学院 Method and device for generating graph data and computer equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858874A (en) * 2022-12-29 2023-03-28 山东启光信息科技有限责任公司 Node2vector algorithm based on algebraic method
CN117194721A (en) * 2023-08-22 2023-12-08 黑龙江工程学院 Method and device for generating graph data and computer equipment
CN117194721B (en) * 2023-08-22 2024-07-02 黑龙江工程学院 Method and device for generating graph data and computer equipment

Similar Documents

Publication Publication Date Title
Milano et al. Primal-dual mesh convolutional neural networks
CN111882040B (en) Convolutional neural network compression method based on channel number search
CN115310594A (en) Method for improving expandability of network embedding algorithm
Malone et al. Data mining using rule extraction from Kohonen self-organising maps
CN109389151B (en) Knowledge graph processing method and device based on semi-supervised embedded representation model
Yang et al. Object matching with hierarchical skeletons
CN112436992B (en) Virtual network mapping method and device based on graph convolution network
CN116151319A (en) Method and device for searching neural network integration model and electronic equipment
Blot et al. Shade: Information-based regularization for deep learning
CN114723037A (en) Heterogeneous graph neural network computing method for aggregating high-order neighbor nodes
CN112364747A (en) Target detection method under limited sample
Lai et al. Mixed attention network for hyperspectral image denoising
CN110135428A (en) Image segmentation processing method and device
CN108805280A (en) A kind of method and apparatus of image retrieval
CN112699957B (en) Image classification optimization method based on DARTS
Heinrich et al. Is bigger always better? Lessons learnt from the evolution of deep learning architectures for image classification
Han et al. GA-GWNN: Detecting anomalies of online learners by granular computing and graph wavelet convolutional neural network
WO2024011475A1 (en) Method and apparatus for graph neural architecture search under distribution shift
Shavit et al. From Xception to NEXcepTion: New Design Decisions and Neural Architecture Search
CN108898227A (en) Learning rate calculation method and device, disaggregated model calculation method and device
CN115019342A (en) Endangered animal target detection method based on class relation reasoning
CN115222011A (en) Neural network architecture searching method and electronic equipment
CN111368109B (en) Remote sensing image retrieval method, remote sensing image retrieval device, computer readable storage medium and computer readable storage device
CN110879952B (en) Video frame sequence processing method and device
CN114494753A (en) Clustering method, clustering device, electronic equipment and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination