Link prediction method, system and equipment for multi-layer network
Through Node2Vec odd random walk algorithm and Wasserstein distance calculation, the problem of multi-layer network link prediction is solved, and the accurate link prediction of multi-layer network is realized, which is suitable for many types of networks. network.
Patent Information
- Application Number
- CN202411341860.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The existing multi-layer network link prediction methods rely on a single global or local network feature, resulting in bias in inter- and intra-layer similarity measurements, lack of universality, and difficult to scale to different types of networks.
Node2Vec partial random walk algorithm is used to represent nodes as low-dimensional continuous vectors. The context neighbor distribution of nodes is calculated by Wasserstein distance, and the unbiased measurement of intra-layer and inter-layer similarity is achieved, and multiple combinations are made by combining in-layer and inter-layer similarity. Layer network link prediction.
It realizes unbiased prediction of multi-layer network links, can balance global and local characteristics, improve the accuracy and applicability of link prediction, and is suitable for many types of networks.
Smart Images

Figure CN119211045A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and more specifically, to a link prediction method, system, and device for a multi-layer network. Background Art
[0002] Research on multi-layer network link prediction has important theoretical and practical significance. In most complex systems, the same node often has multiple functions and attributes, and can participate in many different types of interactions, connections and effects, forming a multi-layer network. Compared with single-layer networks, multi-layer networks can more comprehensively portray real complex systems. Studies have shown that the formation and evolution of the network topology structure of a certain layer in a multi-layer network will be affected by the network topology structure of other layers. Therefore, how to use the topological structure characteristics of multi-layer networks and consider the influence of inter-layer characteristics on the basis of paying attention to the characteristics within the network layer to improve the performance of link prediction in multi-layer networks is a problem worth studying at present.
[0003] The link prediction technology of single-layer network has been relatively mature and has been widely used in many fields. However, there is still a lot of room for exploration in the research of link prediction of multi-layer network. At present, most of the methods for link prediction of multi-layer network are extensions based on single-layer methods. In addition, there are also methods based on model building and methods based on machine learning. Among them, the extension based on single-layer method mainly finds out the importance of auxiliary layer to target layer through the association between auxiliary layer and target layer, and then predicts the link of target layer by combining the intra-layer features of auxiliary layer, the inter-layer association between auxiliary layer and target layer, and the intra-layer features of target layer; while the method based on model building uses random block model, GCN-GAN model, etc. to model the affiliation of each node in different layers, so as to predict the intra-layer and inter-layer links; the method based on machine learning focuses on feature extraction. On the basis of extracting the inter-layer features and intra-layer features of auxiliary layer and the intra-layer features of target layer, it uses machine learning algorithms such as naive Bayes, logistic regression, decision tree to classify the existence of link or not, so as to complete the link prediction.
[0004] However, there is still a lack of algorithm design dedicated to multi-layer network link prediction. Even the application of methods based on model building and machine learning in the field of link prediction has just started. The established models and extracted features are subject to strong human intervention, and it is still worth further study to improve their applicability in practical applications. At the same time, most predictions and analyses still tend to be social networks, with fewer data sets analyzed, relatively simple samples, strong specificity, and weak scalability. The proposed methods are difficult to extend to other networks. Patent document CN116743620A, aimed at the cold start problem of social software, proposes a link prediction method for social multiplexing networks, which outputs the link labels of the auxiliary layer network topology by fusing the fused link information of the multi-layer network topology, but this method mainly focuses on the characteristics of social temporal networks and lacks universal value. Summary of the invention
[0005] In view of the defects of the prior art, the purpose of this application is to provide a link prediction method, system and device for a multi-layer network, aiming to solve the problem of deviation in measuring the similarity between layers of a multi-layer network and the similarity within the node layer by relying on a single network indicator such as a global network feature or a local network feature.
[0006] To achieve the above objectives, in a first aspect, the present application provides a link prediction method for a multi-layer network, wherein the multi-layer network includes a target layer and at least one auxiliary layer, and the target layer and the auxiliary layer have the same node set, and the method includes:
[0007] Represent each node in the target layer and each auxiliary layer as a low-dimensional continuous vector;
[0008] Based on the low-dimensional continuous vector of each node in the target layer, the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer is determined to calculate the first-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer is determined to calculate the second-layer Wasserstein distance of each node; the first-layer Wasserstein distance and the second-layer Wasserstein distance of each node are symmetrically averaged to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer;
[0009] Determine the Wasserstein distance between any two nodes in the target layer based on the probability distribution of the first context neighbor vector of each node in the target layer, determine the Wasserstein distance between any two nodes in the auxiliary layer based on the probability distribution of the fourth context neighbor vector of each node in the auxiliary layer, and determine the intra-layer similarity between any two nodes in the corresponding layer according to the Wasserstein distance between any two nodes in the target layer or the auxiliary layer;
[0010] Link prediction is performed on the multi-layer network according to the intra-layer similarity of any two nodes in each layer and the inter-layer similarity between each auxiliary layer and the target layer.
[0011] It should be noted that for the similarity between layers of a multi-layer network, existing studies have used local network features, such as degree correlation coefficient, average neighbor overlap and other indicators to measure, or global network features, such as average node importance correlation (betweenness centrality) and other indicators. However, on the one hand, degree correlation coefficient, average neighbor overlap, etc. cannot fully reflect the local network characteristics of the node, and average node betweenness centrality, etc. cannot fully reflect the global network characteristics of the node, which will cause measurement deviation; on the other hand, only using local network features or global network features will also cause feature deviation. The present application can achieve a balance between global and local features by representing each node as a low-dimensional continuous vector, and then calculate the Wasserstein distance between nodes through the probability distribution of the node's neighbor vector, which can unbiasedly calculate the similarity of the nodes and achieve unbiased prediction of multi-layer network links.
[0012] Specifically, the above-mentioned multi-layer network link prediction method can be applied to multi-layer social network link prediction, multi-layer protein interaction network link prediction, multi-layer transportation network link prediction, etc.
[0013] In an optional example, each node in the target layer and each auxiliary layer is represented as a low-dimensional continuous vector based on the Node2Vec biased random walk sampling algorithm.
[0014] It can be understood that, through the Node2Vec biased random walk algorithm, for each node, a low-dimensional vector representation is performed based on each network layer of the multi-layer network, and a biased random walk is used to obtain the contextual neighbor distribution of the node in each network layer, thereby realizing a low-dimensional continuous vector representation of the contextual neighbor distribution of the node in each network layer. By representing the node with a low-dimensional continuous vector, on the one hand, the network characteristics of the node can be retained, and on the other hand, the distribution of the node neighbors can be represented by a probability distribution in a low-dimensional continuous space to achieve an unbiased measure of the node context similarity.
[0015] In an optional example, based on the low-dimensional continuous vector of each node in the target layer, determining the first context neighbor vector probability distribution and the second context neighbor vector probability distribution of each node in the target layer and the auxiliary layer includes:
[0016] Based on the Node2Vec biased random walk sampling algorithm, a biased random walk is performed on each node on the target layer or auxiliary layer to obtain the contextual neighbor distribution of each node on the target layer or auxiliary layer;
[0017] Determine the probability distribution of the first context neighbor vector of each node in the target layer by combining the low-dimensional continuous vector of each node in the target layer and the proportion of the number of occurrences of each node in the context neighbor distribution of each node in the target layer;
[0018] Determine the probability distribution of the second context neighbor vector of each node in the auxiliary layer by combining the low-dimensional continuous vector of each node in the target layer and the proportion of the number of occurrences of each node in the context neighbor distribution of each node in the auxiliary layer; and / or
[0019] Based on the low-dimensional continuous vector of each node in the auxiliary layer, the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer are determined respectively, including:
[0020] Based on the Node2Vec biased random walk sampling algorithm, a biased random walk is performed on each node on the target layer or auxiliary layer to obtain the contextual neighbor distribution of each node on the target layer or auxiliary layer;
[0021] Determine the probability distribution of the third context neighbor vector of each node in the target layer by combining the low-dimensional continuous vector of each node in the auxiliary layer and the proportion of the number of occurrences of each node in the context neighbor distribution of each node in the target layer;
[0022] The probability distribution of the fourth context neighbor vector of each node in the auxiliary layer is determined by combining the low-dimensional continuous vector of each node in the auxiliary layer and the proportion of the occurrence of each node in the context neighbor distribution of each node in the auxiliary layer.
[0023] In an optional example, the first inter-layer Wasserstein distance is determined by the following steps:
[0024] Determine an embedding vector at a corresponding layer for each node that appears in the first context neighbor vector probability distribution and the second context neighbor vector probability distribution;
[0025] Determine the first inter-layer Wasserstein distance by combining the difference in the proportion of occurrences of each node between the first context neighbor vector probability distribution and the second context neighbor vector probability distribution, and the distance between the embedding vectors of nodes with different proportions of occurrences; and / or
[0026] The second inter-layer Wasserstein distance is determined by the following steps:
[0027] Determine an embedding vector of each node appearing in the third context neighbor vector probability distribution and the fourth context neighbor vector probability distribution at the corresponding layer;
[0028] Determine the second inter-layer Wasserstein distance by combining the difference in the proportion of occurrences of each node between the third context neighbor vector probability distribution and the fourth context neighbor vector probability distribution, and the distance between the embedding vectors of nodes with different proportions of occurrences; and / or
[0029] The Wasserstein distance between any two nodes in the target layer or auxiliary layer is determined by the following steps:
[0030] Determine an embedding vector of each node in the target layer that appears in the probability distribution of the first context neighbor vector of each node in the target layer;
[0031] Determine the Wasserstein distance between any two nodes in the target layer by combining the difference in the proportion of occurrences of each node between the probability distributions of the first context neighbor vectors of any two nodes in the target layer and the distance between the embedding vectors of nodes with different proportions of occurrences;
[0032] Determine an embedding vector of each node in the auxiliary layer that appears in the probability distribution of the fourth context neighbor vector of each node in the auxiliary layer;
[0033] The Wasserstein distance between any two nodes in the auxiliary layer is determined by combining the difference in the proportion of occurrence of each node between the probability distributions of the fourth context neighbor vectors of any two nodes in the auxiliary layer and the distance between the embedding vectors of nodes with different proportions of occurrence.
[0034] In an optional example, the intra-layer similarity of any two nodes is determined by the following steps:
[0035] Determine the maximum and minimum Wasserstein distances between any two nodes in the target layer or auxiliary layer;
[0036] Combined with the maximum and minimum values of the Wasserstein distance in the target layer or the auxiliary layer, the Wasserstein distance between any two nodes in the corresponding layer is standardized to obtain the intra-layer similarity of any two nodes in the target layer or the auxiliary layer.
[0037] In an optional example, the inter-layer similarity is determined by the following steps:
[0038] Determine the maximum and minimum values of the first-layer Wasserstein distance or the second-layer Wasserstein distance of all nodes;
[0039] Combining the maximum and minimum values of the first-layer Wasserstein distances, the first-layer Wasserstein distances of each node are normalized to obtain the first-layer similarity of each node;
[0040] Combining the maximum and minimum values of the second-layer Wasserstein distance, the second-layer Wasserstein distance of each node is standardized to obtain the second-layer similarity of each node;
[0041] The first-layer similarity and the second-layer similarity of each node between the target layer and the auxiliary layer are summed and averaged to obtain the inter-layer similarity between the corresponding auxiliary layer and the target layer.
[0042] In an optional example, the standardization is specifically: the ratio of the difference between the corresponding maximum value and the minimum value after subtracting the corresponding minimum value from the Wasserstein distance;
[0043] Subtract the normalized value from 1 to obtain the corresponding similarity.
[0044] In an optional example, performing link prediction on the multi-layer network includes:
[0045] Predicting the probability of any two nodes forming an edge in the target layer based on the intra-layer similarity of any two nodes in the target layer, the intra-layer similarity of any two nodes in the auxiliary layer and the product of the inter-layer similarity between the auxiliary layer and the target layer, and the preset intra-layer and inter-layer similarity adjustment parameters;
[0046] Determine the ranking of the probability of forming an edge between any two nodes in the target layer; and use the node pairs with the highest ranking as the link prediction result.
[0047] In a second aspect, the present application provides a link prediction system for a multi-layer network, wherein the multi-layer network includes a target layer and at least one auxiliary layer, wherein the target layer and the auxiliary layer have the same node set, and the system includes:
[0048] A low-dimensional vector representation module, used to represent each node in the target layer and each auxiliary layer as a low-dimensional continuous vector;
[0049] An inter-layer similarity determination module is used to determine the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer based on the low-dimensional continuous vector of each node in the target layer, so as to calculate the first inter-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, determine the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer respectively, so as to calculate the second inter-layer Wasserstein distance of each node; symmetrically average the first inter-layer Wasserstein distance and the second inter-layer Wasserstein distance of each node to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer;
[0050] The intra-layer similarity determination module is used to determine the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer based on the low-dimensional continuous vector of each node in the target layer, so as to calculate the first inter-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, respectively determine the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer to calculate the second inter-layer Wasserstein distance of each node; symmetrically average the first inter-layer Wasserstein distance and the second inter-layer Wasserstein distance of each node to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer;
[0051] The link prediction module is used to perform link prediction on the multi-layer network according to the intra-layer similarity of any two nodes in each layer and the inter-layer similarity between each auxiliary layer and the target layer.
[0052] In a third aspect, the present application provides an electronic device comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory, wherein when the programs stored in the memory are executed, the processor is used to execute the method described in the first aspect or any optional example of the first aspect.
[0053] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method described in the first aspect or any optional example of the first aspect.
[0054] In a fifth aspect, the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method described in the first aspect or any optional example of the first aspect.
[0055] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0056] In general, the above technical solutions conceived by the present application have at least the following beneficial effects compared with the prior art:
[0057] The present application provides a link prediction method, system and device for a multi-layer network. Through the Node2Vec biased random walk sampling algorithm, a low-dimensional vector representation is performed for each node based on each network layer of the multi-layer network, and a biased random walk is used to obtain the context neighbor distribution of the node in each network layer, thereby realizing a low-dimensional continuous vector representation of the context neighbor distribution of the node in each network layer. Based on the low-dimensional continuous vector representation of the context neighbor distribution of the node in each layer of the network, the present application uses the Wasserstein distance to unbiasedly calculate the distance between the context neighbor vector distributions of the node pair, the intra-layer distance of each network layer, and further calculates the intra-layer similarity of the node pair in each network layer. For the inter-layer similarity between the target layer and a certain auxiliary layer, combined with the context neighbors of the node in the target layer and the auxiliary layer, the Node2Vec biased random walk sampling algorithm is used based on the low-dimensional continuous vector representation of the target layer network and the low-dimensional continuous vector representation based on the auxiliary layer network, and the Wasserstein distance is further used to calculate the distance based on the context neighbor distribution of the target layer and the distance based on the context neighbor distribution of the auxiliary layer vector, forming a symmetrical inter-layer distance, and calculating the inter-layer similarity.
[0058] This application is based on each layer of the network, and uses Node2Vec to represent the nodes with low-dimensional continuous vectors. Then, the node context is sampled through the Node2Vec biased random walk sampling algorithm, and the node context probability distribution is represented by a low-dimensional continuous vector. The node inter-layer similarity and intra-layer similarity are calculated based on the Wasserstein distance. The Node2Vec biased random walk can achieve a balance between global network characteristics and local network characteristics, and realize unbiased measurement of the global network characteristics and local network characteristics of the nodes. Through symmetric processing, it can achieve accurate characterization of the similarity between layers of multi-layer complex networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 is a flow chart of a link prediction method for a multi-layer network provided in an embodiment of the present application;
[0060] Figure 2 is a flow chart of inter-layer similarity calculation provided by an embodiment of the present application;
[0061] Figure 3 is a comparison chart of the accuracy of the method of the present application and the existing method provided in the embodiment of the present application;
[0062] Figure 4 It is a comparison chart of the F1 index of the method of the present application and the existing method provided in the embodiment of the present application;
[0063] Figure 5 This is a diagram of the link prediction system architecture of a multi-layer network provided in an embodiment of the present application;
[0064] Figure 6 This is an electronic device architecture diagram provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0066] The term "and / or" in this article is a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The symbol " / " in this article indicates that the associated objects are in an or relationship, for example, A / B means A or B.
[0067] The terms "first" and "second" in the specification and claims herein are used to distinguish different objects rather than to describe a specific order of objects. For example, the first inter-layer Wasserstein distance and the second inter-layer Wasserstein distance are used to distinguish different inter-layer Wasserstein distances rather than to describe a specific order of inter-layer Wasserstein distances.
[0068] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0069] First, the technical terms involved in the embodiments of the present application are introduced.
[0070] (1) Wasserstein distance
[0071] Wasserstein distance refers to the minimum cost required to transition from one probability distribution to another probability distribution in terms of the probability movement distance.
[0072] (2) Multi-layer network
[0073] In a multi-layer network, the target layer usually refers to the network layer where we want to predict the link, while the auxiliary layer refers to other network layers that may provide useful information for predicting the link of the target layer. In the study of multi-layer network link prediction, researchers usually consider how to use the information of the auxiliary layer to improve the accuracy of the prediction of the target layer link. This is because in a multi-layer network, there may be some correlation between the nodes and edges between different layers, and the information in the auxiliary layer can serve as an additional feature or data source to help us better understand and predict the link formation in the target layer.
[0074] (3) Link Prediction
[0075] Link prediction refers to predicting new links that may appear in the network in the future or identifying links that are missing in the current network but potentially exist.
[0076] Next, the technical solutions provided in the embodiments of the present application are introduced.
[0077] The present application proposes a link prediction method, system and device for a multi-layer network. For a multi-layer network, the inter-layer features of the network auxiliary layer are combined with the intra-layer features of the network auxiliary layer and the network target layer, and the link prediction is performed on the network target layer. Firstly, the Node2Vec biased random walk sampling algorithm (hereinafter referred to as the Node2Vec algorithm) is used to represent each node with a low-dimensional continuous vector based on the topological structure of each layer of the network. Secondly, based on each layer of the network, a biased random walk is performed for each node to obtain the context neighbor distribution of each node in each layer of the network. Again, the low-dimensional continuous vector representation of the node in each layer of the network and the context node distribution of the node in each layer of the network are combined to obtain the low-dimensional continuous vector distribution of the context node distribution of each node pair in the layer. The distance of the context vector distribution of the node pair is calculated using the Wasserstein distance, and the intra-layer similarity of the node pair is calculated. Then, the distance of the context vector distribution of the node in the target layer and the auxiliary layer is calculated using the Wasserstein distance, and the average value of the distance of the context node distribution of all nodes in the target layer and the auxiliary layer is further calculated, and the inter-layer similarity of the target layer and each auxiliary layer is calculated. Finally, based on the intra-layer similarity of the target layer, the intra-auxiliary layer similarity, and the inter-layer similarity of the target layer and the auxiliary layer of the node pair, multi-layer network link prediction is performed.
[0078] Figure 1 is a flow chart of a link prediction method for a multi-layer network provided in an embodiment of the present application; the multi-layer network includes a target layer and at least one auxiliary layer, and the target layer and the auxiliary layer have the same node set, such as Figure 1 As shown, the following steps are included:
[0079] Step S101, representing each node in the target layer and each auxiliary layer as a low-dimensional continuous vector;
[0080] Step S102, based on the low-dimensional continuous vector of each node in the target layer, determine the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer to calculate the first inter-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, determine the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer to calculate the second inter-layer Wasserstein distance of each node; symmetrically average the first inter-layer Wasserstein distance and the second inter-layer Wasserstein distance of each node to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer;
[0081] Step S103, determining the Wasserstein distance between any two nodes in the target layer based on the probability distribution of the first context neighbor vector of each node in the target layer, determining the Wasserstein distance between any two nodes in the auxiliary layer based on the probability distribution of the fourth context neighbor vector of each node in the auxiliary layer, and determining the intra-layer similarity between any two nodes in the corresponding layer according to the Wasserstein distance between any two nodes in the target layer or the auxiliary layer;
[0082] Step S104, performing link prediction on the multi-layer network according to the intra-layer similarity of any two nodes in each layer and the inter-layer similarity between each auxiliary layer and the target layer.
[0083] In a specific embodiment, the present application first proposes a mathematical symbolic representation of a multi-layer network with the same nodes, and then describes the technology proposed in this application from three parts: inter-layer similarity measurement, intra-layer node similarity measurement, and link prediction. Finally, the data source selected to verify this technology is described in detail.
[0084] 1. Multi-layer network representation
[0085] The technical solution proposed in this application is applied to a multi-layer network with the same nodes. The edges between nodes in each layer of the network represent different association relationships. The multi-layer network is defined as There are N layers in total, assuming that G T =(V T ,E T ) is the target layer; the remaining layers are auxiliary layers and can be used with G A =(V A ,E A ) means that A=1,2,…N-1. At the same time, V=(v1,v2…v n) represents the set of nodes on the network (the same in each layer), that is, |V T |=|V A |; and E T and E A Represent the target layer G T and auxiliary layer G A The collection of middle edges.
[0086] 2. Low-dimensional continuous vector representation of nodes based on Node2Vec
[0087] In order to achieve a comprehensive and fine-grained representation of node context distribution, this application adopts the Node2Vec algorithm to embed each node into a low-dimensional continuous vector space based on the network topology characteristics of each layer. The Node2Vec algorithm takes into account the following two phenomena in the network structure: homogeneity and structural similarity. Through semi-supervised network learning, the Node2Vec algorithm can obtain the optimal parameters p and q, so that the sampling strategy achieves the best balance, thereby comprehensively considering the structural information existing in the network.
[0088] 3. Intra-layer node similarity measurement based on Wasserstein distance
[0089] As a method to measure the distance between two probability distributions, Wasserstein distance can provide a means for quantifying the similarity of node neighbor distribution for this application. This application measures the distance between nodes i and j by measuring the Wasserstein distance between the vector distributions of the contextual neighbor distributions of node pair (i, j) at a specific network layer. The contextual neighbor distribution of node i at a specific network layer can be obtained by a biased random walk of Node2Vec, which constitutes a second-order Markov chain, where the transition probability p i→j (t) depends only on the node i visited at the current time t and the nodes visited at the previous time step t-1. By adjusting the parameter value, it is possible to balance local and global search in the network, thereby balancing the consideration of low-order and high-order neighbors.
[0090] For example, in this application, at the target layer G T Perform five steps of biased random walks on node pairs i and j to obtain their contextual neighbor distributions: Each node i is based on the target layer G T The Node2Vec algorithm can be used to represent it as a low-dimensional continuous vector Based on any auxiliary layer G A , using the Node2Vec algorithm to represent it as a low-dimensional continuous vector At the same time, nodes i and j are in the target layer G T The contextual neighbor distribution in the target layer G TThe vector probability distribution representations are and Assume that based on the target layer G T The embedding vectors of nodes a, b and c Then G T superior and The Wasserstein distance between
[0091] Based on the target layer GT, the minimum and maximum Wasserstein distances of any node pair in the vector space are MinD VecGT and MaxD VecGT , this application normalizes the Wasserstein distance of the node pair (i, j) based on the above minimum and maximum Wasserstein distances, and defines the target layer G T The intra-layer similarity of the previous node pair (i, j) as follows:
[0092]
[0093] 4. Inter-layer similarity based on symmetric average Wasserstein distance
[0094] like Figure 2 As shown, for any node i, let The target layer G T The context neighbors of the node, Represents an auxiliary layer G A As mentioned above, using the Node2Vec algorithm, based on the target layer G T , The node α in can be represented as a low-dimensional continuous vector Similarly, based on the auxiliary layer G A , The node α in can be represented as a low-dimensional continuous vector Therefore, based on G T Vector representation is performed by T Execute Node2Vec biased random walk sampling on it, and you can get The vector probability distribution representation is denoted as Similarly, based on G T Vector representation is performed by A By performing Node2Vec biased random walk sampling on the The vector probability distribution representation is denoted as Based on G A Vector representation is performed by TExecute Node2Vec biased random walk sampling on it, and you can get The vector probability distribution representation is denoted as Similarly, based on G A Vector representation is performed by A By performing Node2Vec biased random walk sampling on the The vector probability distribution representation is denoted as Finally, this application calculates and as well as and The normalized Wasserstein distance between Similarity between the second layer
[0095]
[0096] Therefore, G T and G A The inter-layer similarity for:
[0097]
[0098] 5. Link Prediction Framework
[0099] Based on the obtained G T and G A Similarity between layers and G T and G A The intra-layer node similarity between nodes i and j and Then the probability of these two nodes forming an edge is:
[0100]
[0101] Among them, α is the adjustment parameter of the similarity between layers within the layer. A Similarity between nodes i and j The higher the G A With G T The greater the similarity, the higher the target layer G T The possibility of forming this connection is high.
[0102] Furthermore, after determining the probability of any two nodes forming an edge connection in the target layer, all probabilities are sorted; and the node pairs with the highest ranking are used as link prediction results.
[0103] Specifically, multi-layer network link prediction can be used to predict multi-layer social networks (the same group of nodes in QQ network, WeChat network, Weibo network, etc.), inter-city transportation networks (aviation, high-speed rail, ordinary trains, etc.) or social support networks (social support network, information support network, emotional support network), etc. For example, in a multi-layer social network, the WeChat network can be used as the target layer, the QQ network and Weibo network can be used as auxiliary layers, and the intra-layer similarity and inter-network layer similarity between node pairs can be calculated, and the QQ network and Weibo network features can be used to assist the WeChat network link prediction.
[0104] Figure 3 and Figure 4 This is a comparison chart of the accuracy and F1 index of the method of the present application (abbreviated as PLRWD) provided in the embodiment of the present application and the existing benchmark models CMIS, LPGRI, LPIDE, LPIS, and MLRW; Figure 3 and Figure 4 The horizontal axis in the figure represents the number of node pairs recommended by link prediction. It can be seen that the accuracy and F1 index of the method provided by the present application are the largest when recommending links in multi-layer networks, and the recommendation effect is the best. The method provided by the present application can achieve unbiased measurement of the global network characteristics and local network characteristics of nodes, and through symmetric processing, it can achieve accurate characterization of the similarities between layers of multi-layer complex networks.
[0105] Figure 5 is a link prediction system architecture diagram of a multi-layer network provided in an embodiment of the present application; Figure 5 As shown, including:
[0106] A low-dimensional vector representation module 510, used to represent each node in the target layer and each auxiliary layer as a low-dimensional continuous vector;
[0107] The inter-layer similarity determination module 520 is used to determine the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer based on the low-dimensional continuous vector of each node in the target layer, so as to calculate the first inter-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, determine the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer respectively, so as to calculate the second inter-layer Wasserstein distance of each node; symmetrically average the first inter-layer Wasserstein distance and the second inter-layer Wasserstein distance of each node to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer;
[0108] The intra-layer similarity determination module 550 is used to determine the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer based on the low-dimensional continuous vector of each node in the target layer, so as to calculate the first inter-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, determine the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer respectively, so as to calculate the second inter-layer Wasserstein distance of each node; symmetrically average the first inter-layer Wasserstein distance and the second inter-layer Wasserstein distance of each node to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer;
[0109] The link prediction module 540 is used to perform link prediction on the multi-layer network according to the intra-layer similarity of any two nodes in each layer and the inter-layer similarity between each auxiliary layer and the target layer.
[0110] It should be understood that the above-mentioned system is used to execute the methods in the above-mentioned embodiments. The implementation principles and technical effects of the corresponding program modules in the system are similar to those described in the above-mentioned methods. The working process of the system can refer to the corresponding process in the above-mentioned method and will not be repeated here.
[0111] Based on the method in the above embodiment, the embodiment of the present application provides an electronic device, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 660, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other via the communication bus 660. The processor 610 may call the logic instructions in the memory 630 to execute the method in the above embodiment.
[0112] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0113] Based on the method in the above embodiment, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a processor, the processor executes the method in the above embodiment.
[0114] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.
[0115] It is understandable that the processor in the embodiment of the present application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor.
[0116] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0117] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions may be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.
[0118] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.
[0119] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A link prediction method for a multi-layer network, wherein the multi-layer network comprises a target layer and at least one auxiliary layer, wherein the target layer and the auxiliary layer have the same node set, characterized in that: Methods include: Represent each node in the target layer and each auxiliary layer as a low-dimensional continuous vector; Based on the low-dimensional continuous vector of each node in the target layer, the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer is determined to calculate the first-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer is determined to calculate the second-layer Wasserstein distance of each node; the first-layer Wasserstein distance and the second-layer Wasserstein distance of each node are symmetrically averaged to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer; Determine the Wasserstein distance between any two nodes in the target layer based on the probability distribution of the first context neighbor vector of each node in the target layer, determine the Wasserstein distance between any two nodes in the auxiliary layer based on the probability distribution of the fourth context neighbor vector of each node in the auxiliary layer, and determine the intra-layer similarity between any two nodes in the corresponding layer according to the Wasserstein distance between any two nodes in the target layer or the auxiliary layer; Link prediction is performed on the multi-layer network according to the intra-layer similarity of any two nodes in each layer and the inter-layer similarity between each auxiliary layer and the target layer.
2. The method according to claim 1, characterized in that Based on the Node2Vec biased random walk sampling algorithm, each node in the target layer and each auxiliary layer is represented as a low-dimensional continuous vector.
3. The method according to claim 1, characterized in that Based on the low-dimensional continuous vector of each node in the target layer, determining the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer, including: Based on the Node2Vec biased random walk sampling algorithm, a biased random walk is performed on each node on the target layer or auxiliary layer to obtain the contextual neighbor distribution of each node on the target layer or auxiliary layer; Determine the probability distribution of the first context neighbor vector of each node in the target layer by combining the low-dimensional continuous vector of each node in the target layer and the proportion of the number of occurrences of each node in the context neighbor distribution of each node in the target layer; Determine the probability distribution of the second context neighbor vector of each node in the auxiliary layer by combining the low-dimensional continuous vector of each node in the target layer and the proportion of the number of occurrences of each node in the context neighbor distribution of each node in the auxiliary layer; and / or Based on the low-dimensional continuous vector of each node in the auxiliary layer, the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer are determined respectively, including: Based on the Node2Vec biased random walk sampling algorithm, a biased random walk is performed on each node on the target layer or auxiliary layer to obtain the contextual neighbor distribution of each node on the target layer or auxiliary layer; Determine the probability distribution of the third context neighbor vector of each node in the target layer by combining the low-dimensional continuous vector of each node in the auxiliary layer and the proportion of the number of occurrences of each node in the context neighbor distribution of each node in the target layer; The probability distribution of the fourth context neighbor vector of each node in the auxiliary layer is determined by combining the low-dimensional continuous vector of each node in the auxiliary layer and the proportion of the occurrence of each node in the context neighbor distribution of each node in the auxiliary layer.
4. The method according to claim 1, characterized in that The first inter-layer Wasserstein distance is determined by the following steps: Determine an embedding vector at a corresponding layer for each node that appears in the first context neighbor vector probability distribution and the second context neighbor vector probability distribution; Determine the first inter-layer Wasserstein distance by combining the difference in the proportion of occurrences of each node between the first context neighbor vector probability distribution and the second context neighbor vector probability distribution, and the distance between the embedding vectors of nodes with different proportions of occurrences; and / or The second inter-layer Wasserstein distance is determined by the following steps: Determine an embedding vector of each node appearing in the third context neighbor vector probability distribution and the fourth context neighbor vector probability distribution at the corresponding layer; Determine the second inter-layer Wasserstein distance by combining the difference in the proportion of occurrences of each node between the third context neighbor vector probability distribution and the fourth context neighbor vector probability distribution, and the distance between the embedding vectors of nodes with different proportions of occurrences; and / or The Wasserstein distance between any two nodes in the target layer or auxiliary layer is determined by the following steps: Determine an embedding vector of each node in the target layer that appears in the probability distribution of the first context neighbor vector of each node in the target layer; Determine the Wasserstein distance between any two nodes in the target layer by combining the difference in the proportion of occurrences of each node between the probability distributions of the first context neighbor vectors of any two nodes in the target layer and the distance between the embedding vectors of nodes with different proportions of occurrences; Determine an embedding vector of each node in the auxiliary layer that appears in the probability distribution of the fourth context neighbor vector of each node in the auxiliary layer; The Wasserstein distance between any two nodes in the auxiliary layer is determined by combining the difference in the proportion of occurrence of each node between the probability distributions of the fourth context neighbor vectors of any two nodes in the auxiliary layer and the distance between the embedding vectors of nodes with different proportions of occurrence.
5. The method according to claim 1, characterized in that The intra-layer similarity of any two nodes is determined by the following steps: Determine the maximum and minimum Wasserstein distances between any two nodes in the target layer or auxiliary layer; Combined with the maximum and minimum values of the Wasserstein distance in the target layer or the auxiliary layer, the Wasserstein distance between any two nodes in the corresponding layer is standardized to obtain the intra-layer similarity of any two nodes in the target layer or the auxiliary layer.
6. The method according to claim 1, characterized in that The inter-layer similarity is determined by the following steps: Determine the maximum and minimum values of the first-layer Wasserstein distance or the second-layer Wasserstein distance of all nodes; Combining the maximum and minimum values of the first-layer Wasserstein distances, the first-layer Wasserstein distances of each node are normalized to obtain the first-layer similarity of each node; Combining the maximum and minimum values of the second-layer Wasserstein distance, the second-layer Wasserstein distance of each node is standardized to obtain the second-layer similarity of each node; The first-layer similarity and the second-layer similarity of each node between the target layer and the auxiliary layer are summed and averaged to obtain the inter-layer similarity between the corresponding auxiliary layer and the target layer.
7. The method according to claim 5 or 6, characterized in that: The standardization is specifically: the ratio of the difference between the corresponding maximum value and the minimum value after subtracting the corresponding minimum value from the Wasserstein distance; Subtract the normalized value from 1 to obtain the corresponding similarity.
8. The method according to claim 1, characterized in that Performing link prediction on the multi-layer network includes: Predicting the probability of any two nodes forming an edge in the target layer based on the intra-layer similarity of any two nodes in the target layer, the intra-layer similarity of any two nodes in the auxiliary layer and the product of the inter-layer similarity between the auxiliary layer and the target layer, and the preset intra-layer and inter-layer similarity adjustment parameters; Determine the ranking of the probability of forming an edge between any two nodes in the target layer; and use the node pairs with the highest ranking as the link prediction result.
9. A link prediction system for a multi-layer network, the multi-layer network comprising a target layer and at least one auxiliary layer, the target layer and the auxiliary layer having the same node set, characterized in that the system include: A low-dimensional vector representation module, used to represent each node in the target layer and each auxiliary layer as a low-dimensional continuous vector; An inter-layer similarity determination module is used to determine the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer based on the low-dimensional continuous vector of each node in the target layer, so as to calculate the first inter-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, determine the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer respectively, so as to calculate the second inter-layer Wasserstein distance of each node; symmetrically average the first inter-layer Wasserstein distance and the second inter-layer Wasserstein distance of each node to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer; The intra-layer similarity determination module is used to determine the probability distribution of the first context neighbor vector and the second context neighbor vector of each node in the target layer and the auxiliary layer based on the low-dimensional continuous vector of each node in the target layer, so as to calculate the first inter-layer Wasserstein distance of each node; based on the low-dimensional continuous vector of each node in the auxiliary layer, respectively determine the probability distribution of the third context neighbor vector and the fourth context neighbor vector of each node in the target layer and the auxiliary layer to calculate the second inter-layer Wasserstein distance of each node; symmetrically average the first inter-layer Wasserstein distance and the second inter-layer Wasserstein distance of each node to determine the inter-layer similarity between the corresponding auxiliary layer and the target layer; The link prediction module is used to perform link prediction on the multi-layer network according to the intra-layer similarity of any two nodes in each layer and the inter-layer similarity between each auxiliary layer and the target layer.
10. An electronic device, characterized in that: include: at least one memory for storing a computer program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Attribute heterogeneous network embedding method, device, equipment and medium
CN112953825A
Anchor link prediction method and system for cross-network digital forensics, and storage medium
CN118349748A
Heterogeneous network graph link prediction method for movie recommendation system
CN118606493A
Trusted graph data node classification method, system, computer device and application
US20220222536A1
