Abstract
Link prediction is a fundamental problem for graphs, which can reveal the potential relationships between users. Graph embedding can easily encode graph structural relations, and heterogeneous attribute features in a continuous vector space, which is effective in link prediction. However, graph embedding methods for large-scale graphs suffer high computation and space costs, and sampling enclosing subgraphs is a practical yet efficient way to obtain the most features at the least cost. Nevertheless, the existing sampling techniques may lose essential features when the random sampling number of nodes is not large, as node features are assumed to follow a uniform distribution. In this paper, we propose a novel large-scale graph sampling strategy for link prediction named Weighted Sampling Enclosing subgraphs-based Link prediction (WSEL) to resolve this issue, which maximumly preserves the structural and attribute features of enclosing subgraphs with less sampling. More specifically, we first extract the feature importance of each node in an enclosing subgraph and then take the node importance as node weight. Then, random walk node sequences are obtained by multiple weighted random walks from a target pair of nodes, generating a weighted sampling of enclosing subgraphs. By leveraging the weighted sampling enclosing subgraphs, WSEL can scale to larger graphs with much less overhead while maintaining some essential information of the original graph. Experiments on real-world datasets demonstrate that our model can scale to larger graphs while maintaining competitive link prediction performance under substantially reduced computational cost.
1. Introduction
Graph embedding (GE) aims to map a graph into a low-dimensional vector space, which includes node embedding, edge embedding, subgraph embedding and whole graph embedding. Graph embedding has been proved extremely useful in link prediction [1,2]. Link prediction quantifies the likelihood of an interaction between a pair of nodes (e.g., biological structure prediction [3], social and item recommendations [4], etc.). A number of link prediction models [5,6,7] have been proposed by leveraging their structure and attribute information and other heterogeneous information of nodes in graphs. In recent years, GNNs [8,9] have been a widely accepted method for learning graph node embedding to tackle link prediction problems. The early GNNs focused on shallow encoders have been proposed using random walk-based methods, which are faster and more effective, including DeepWalk [10], Node2Vec [1], LINE [11], and SDNE [12]. More recently, deep learning and attention mechanisms have been used to generate graph embeddings [13,14]. They extract structure, text, topic and other heterogeneous feature information more effectively and extend the expressive power of GNNs for all downstream tasks of link prediction, node classification, and graph classification.
Subgraph-based embedding methods extract the enclosing subgraph features around the two target nodes (shown in Figure 1) and generate node embeddings of the enclosing subgraph, which improve GNNs and provide state-of-the-art solutions [2]. In a Scale-free Network (e.g., social networks and citation networks), it is intuitive that all nodes naturally prefer to interact with similar and powerful nodes. It will naturally form congregational communities of various topics with a few highly connected central nodes (e.g., celebrities), which hold together numerous small nodes. For the central nodes, the enclosing subgraph size grows exponentially with the increase in hop k. Even the central nodes possess very large enclosing subgraphs, even for a small hop k. However, the lack of scalability of the enclosing subgraph embedding models prevents them from being applied to large-scale graphs. The main reason is the high computation and space overheads in extracting, preprocessing, and learning (large-scale) enclosing subgraphs for any pair of target nodes.
Figure 1.
1-hop and 2-hop enclosing subgraph instances. (a) The 2-hop enclosing subgraph instance. (b) The original graph. (c) The 1-hop enclosing subgraph instance. , two target nodes.
To tackle the above-identified scalability issue, we make the following contributions:
- (1)
- We demonstrate the importance of sampling-enclosed subgraphs in large-scale graphs.
- (2)
- We propose an enclosing subgraph embedding model WSEL to solve the computational and memory bottleneck of large-scale enclosing subgraphs by sparse enclosing subgraphs with minimum feature losses. Within the model, we also design an algorithm WRWS to maximally extract the enclosing subgraph’s topological features and attribute features and generate initial node embeddings.
- (3)
- We conduct extensive experiments in nine real-world graphs. Experimental results prove the effectiveness and efficiency of the proposed WSEL algorithm and WSEL model.
The rest of the paper is organized as follows: Section 2 discusses several related works. We provide some definitions and problem formulation in Section 3. Section 4 presents in detail our proposed WSEL model and WRWS algorithm. We then show experimental results in Section 5 before concluding the paper in Section 7.
2. Related Work
In recent years, graph neural networks [9,14] have been the popular and powerful graph node embedding model, such as GNNs [8], GAE [15], GAT [16], GIN [17], LinkGNN [5], DyGCN [13]. Scale-free Graphs are a type of complex network whose degree distribution follows a power law, meaning that nodes and edges are incrementally added over time, and newly introduced nodes preferentially connect to already well-connected nodes. A large proportion of real-world networks observed in social, technological, and biological systems exhibit scale-free or approximately scale-free properties. As the scale of the real-world graphs becomes large, traditional graph neural networks struggle to cope, leading to the emergence of the combination of GNN and sampling techniques models designed for large-scale graphs. GraphSAGE [18] is an inductive graph representation learning framework that generates node embeddings by sampling and aggregating features from a node’s local neighborhood. ClusterGCN [19] is a scalable embedding learning framework that improves training efficiency by partitioning large graphs into clusters and performing mini-batch training within each cluster while preserving local structural information. GraphSAINT [20] is a scalable graph embedding learning framework that performs stochastic subgraph sampling to enable efficient and unbiased mini-batch training on large graphs. There are also lots of large-scale graph neural network models based on sampling and subgraph partitioning techniques, such as FastGCN [21], LayerGCN [22], ScaLe [23], FedAIS [24], and LPNL [25]. When performing random sampling to reduce graph size, these models typically assume that all nodes are equal and independent or simply consider degree attributes of nodes, without taking the structural features of graphs into account. However, this assumption does not correspond to reality in the Scale-free Graph. Therefore, these may discard task-relevant structural information, such as losing the vital nodes or preserving some insignificant nodes, so the embedding effect is not ideal after dimensionality reduction. In this paper, we use a large-scale graph node scoring algorithm to preprocess graph nodes in advance and sample them purposefully, preserving the original graph’s features to the maximum extent. This enables the efficient construction of sparse yet informative enclosing subgraphs, allowing WSEL to achieve a better balance between scalability and predictive performance. Then, the sampling graph is further processed by GNNs.
3. Problem Definition
In this section, we formally present the necessary definitions and formulate the link prediction problem addressed in this work.
Definition 1
(Attributed Graph). An attributed graph is denoted as
where represents the set of nodes, is the total number of nodes in G, is the set of edges between the nodes, and X is a set of attributes of nodes in G.
Definition 2
(Neighborhood and Degree). For a node , its neighborhood is defined as
The degree of node v is given by
where means the number of neighborhood of node v.
Definition 3
(k-hops Enclosing subgraph). Given a target node pair , k-hops node set starting at μ or ν is defined as
where denotes the shortest-path distance between two nodes, means starting at node μ or node ν, is a k-hops node union set starting at μ and ν.
The k-hops enclosing subgraph is defined as
where is the set of edges between the nodes, = , , …, is a weighted vector consisting of the weights of all nodes in the graph , is the total number of nodes in .
Definition 4
(Sampling-path). Given a k-hops enclosing subgraph , starting at node μ or ν, a k-steps sampling-path is an alternate sequence of node and edge with a depth-first visiting k-steps, depicted as , which is formal defined as
where means the path sampling starting at node μ or ν, , , .
The elements of consist of a node set and an edge set , which can be expressed as follows:
where is a quantity of sampling paths starting at target node μ, and is a quantity of sampling paths starting at target node ν. The total quantity of sampling paths is
The elements of all sampling-paths is represented as
Definition 5
(Sampling enclosing subgraph). Given a k-hops enclosing subgraph , a sampling enclosing subgraph is defined as
where and .
Definition 6
(Node double radius). For a node , its double radius is defined as
where is a shortest-path distance pair between node u and the two target nodes μ or ν.
Definition 7
(Problem Statement (Link Prediction)). Given an attributed graph and a node pair , the goal is to learn a mapping function
which estimates the probability of an edge existing between a pair of target nodes μ and ν by learning node features, such as structure, attribute and the double-radius label of nodes to two target nodes (refer to Definition 6, Equation (7)).
If there are more similar graph-structure features, node-attribute features, and node double-radius label features around the target nodes μ and ν, then there is a higher probability that an edge exists between μ and ν. If the intersection contains more nodes, and there exist more edges of where , then there is a higher existence probability of an edge between μ and ν.
4. Our Approach
In this section, we first introduce the framework of the proposed model and then introduces each component step by step.
4.1. Framework of the Proposed Model
The framework of the proposed model WSEL (Weighted Sampling Enclosing subgraphs-based Link prediction for Large-scale graph) is shown in Figure 2. WSEL consists of two components: The generation algorithm of weighted random walks-based sampling and enclosing subgraph embeddings (WRWS) and enclosing subgraphs features the learning algorithm from subgraph labels, embeddings and attributes for link prediction (SEAL). Initially, an algorithm of WeightRank is proposed to capture the importance of each node in an enclosing subgraph , which is taken as each node weight (Section 4.2). Then, we calculate the sampling quantity and transition probability (Section 4.3) based on weights of nodes in the enclosing subgraph . The first component WRWS extracts sampling enclosing subgraphs and generates the initial node embeddings (Section 4.4). The second component SEAL catches features of sampling enclosing subgraphs based on enclosing subgraphs labels, initial node embeddings and attributes of nodes for link prediction (Section 4.5).
Figure 2.
Overview of the framework of model WSEL. (a) The input graph . (b) Enclosing subgraph extraction around target node pairs (). (c) Computation of node weight vectors using the proposed WeightRank algorithm. (d) Weighted random walks–based enclosing subgraphs sampling (WRWS) guided by node importance. (e) Link prediction performed by SEAL based on the sampled enclosing subgraphs, node embeddings, and node attributes.
4.2. WeightRank
In order to obtain the weighted vector (refer to Definition 3), we update the PageRank [26,27] algorithm named WeightRank. The time complexity of WeightRank is and the space complexity is , where denotes the number of nodes, denotes the number of edges, and T is the number of iterations. The algorithm of WeightRank generates the importance of each node in . We take the importance of each node as node weights, and all the node importances of the compose the weighted vector = (, , …, ), where represents a node weight, and is the number of nodes in . Before iterative calculation of , WeightRank needs to prepare an adjacent matrix of the enclosing subgraph .
Adjacent Matrix. In order to obtain the adjacent matrix A of , each element of the A is defined as follows:
where are any two nodes in graph . means there is a self-connected edge. From Equation (1), = 0 denotes that nodes and are not directly connected and = 1 means that nodes , and are neighbors. So the adjacent matrix A reflects the neighbor’s relationship among nodes. The matrix A is symmetric because the edges in the graph are all undirected.
Node Weight. The vector = (, , …, ) is iteratively computed using Equation (2) as follows:
where = denotes a hyperparametric constant and p = 2 is a parameter of the L2-normalization. We initialize for the first iteration. The n and denote two adjacent iterations. means to regularize each value of a vector based on p-norm regularization at each iteration (the default p = 2).
As shown in Equation (2), each iteration has two computation processes. The first computation process is to calculate the weight of node for the current iteration, shown as follows:
where is the adjacent-node set of node , , is the degree of node , and is the weight of node at the previous iteration.
After finishing the first iteration computation process, the next computation process is to normalize the node weight for the current iteration. Each iteration is a 1-order aggregate operation from the weights of adjacent nodes. That is to say, the of is replaced by aggregating . After a number of iterations, the weight of each node will continue to change due to the continuous addition of new value to , and the sum of the node weights of the graph will keep changing. According to Equation (2), the difference in node weights between successive iterations may not readily stabilize, which can hinder convergence. Therefore, we normalize the of every node after each iteration by
In this way, the node weight obtained from Equation (2) will eventually converge.
4.3. Sampling Trees, Sampling Quantity and Transition Probability
Sampling Trees. Before discussing the sampling quantity, we first define the concepts of sampling trees. A sampling tree can be constructed as follows, with an example shown in Figure 3:
- First, we define a sampling tree as whose root node ( or ) is denoted as . h is the height of .
- Given a target node (), one of the target nodes () is chosen as a parent node and set as a grandpa node = .
- We take the neighbors of the node as the child nodes of , except for the grandpa node , where the grandpa node is the parent of the node .
- h is the current height of the sampling tree .If (refer to Definition 3),then = (save as grandpa node );= (child nodes of the old parent node are taken as the new parent nodes);Go back to step 3 to process for another iteration.Otherwise, the iteration terminates.
Figure 3.
Sampling trees.
Sampling Quantities. The quantity of sampling paths (abbr. sampling quantity) denotes the number of paths from the root node () to the leaf node in a sampling tree (refer to Definition 4 and Section 4.3—Sampling Trees). The sampling quantity starting at target nodes or can be expressed as follows.
where represents the starting node of the sampling path, which is or , indicates the root-node weights of a , is an amplification coefficient, k is a hop distance for sampling a k-hops enclosing subgraph, and means upwards to the nearest integer.
The reason why we use the multiple of as the sampling quantity is that the weight of a sampling path starting node () is obtained by multiple-iteration aggregating neighbor-node weights in a sampling tree according to Equation (2), so the weight of () can reflect the importance of . The sampling quantity is also positively correlated with the size of the k-hops sampling enclosing subgraph, so we acquire the sampling quantity by the weight multiple of node (). Taking Figure 4 as an example, we compute the sampling quantity of each sampling enclosing subgraph as follows:
= ·, · = {·, ·.
If = 9, the sampling quantity of each sampling tree is calculated as
when k = 1, then
{, } = {, } = {5, 3}. = + = 8.
when k = 2, then
{, } = {, } = {9, 6}. = + = 15.
Figure 4.
1-hop and 2-hop sampling enclosing subgraph instance (k = 1, = 8 and k = 2, = 15).
Transition Probability of Random Walks. A transition probability matrix consists of the transition probabilities between every two nodes of an enclosing subgraph . When random walks travel to a node , the transition probability to is defined as follows:
where (refer to Definition 2) denotes the neighbors of node , and (refer to Equation (2)) is the weight of node ∈.
Starting at the target node , for example, when random walks travel to a node , as shown in Figure 3a Tree() and Figure 4b, the neighbors of node are = {,,} except for the grandpa node (refer to Section 4.3—Sampling Trees for the definition of grandpa node), and the probabilities of transition to the subsequent nodes are computed as follows:
= = = = 0.064,
= = = 0.064,
= = 0.183, = = 0.277.
4.4. WRWS
Given the sampling quantity and the transition probability, the algorithm of the weighted random walks-based sampling enclosing subgraphs embedding generation (WRWS) is presented in Algorithm 1.
Algorithm 1 has four parameters , = + , and k. is a large-scale graph. = + is the sum of sampling quantities starting at target nodes and . is a transition probability matrix among nodes of enclosing subgraphs. k is a hyperparameter of a k-hops enclosing subgraph, which indicates the order of neighbors of a node to target node or . Shown in Algorithm 1, the algorithm of WRWS outputs (line 19 of Algorithm 1), which is an initial weighted embedding-set of nodes and is input to SEAL (shown in Section 4.5). The is generated by the model Node2Vec [1] (line 19), which is a classic graph embedding model based solely on graph structure for a large-scale graph. Line 3 calculates the sampling quantity according to Equation (5), i.e., the number of sampled paths. Line 4 is used to compute a transition probability matrix according to Equation (6). The first loop (line 5) selects one of the target nodes or , from which we sample paths starting at. We save the selected target node in , and its sampling quantity is . The second loop (line 6) traverses every sampling quantity (refer to Equation (5)) in the sampling trees . In lines 7 and 8, we take the node () as the first node of each sampling path and the left node of the first sampling edge (shown in line 12). The third loop (line 10) is used to sample paths of length k according to the transition probability matrix (refer to Equation (6)). In line 11, we select a neighbor node of node as the right node of each sampling edge according to . In lines 12 to 15, we append the sampling edge to , set the old left node as the grandpa node (line 14), and set the right node of the current sampling edge as the new left node of the next sampling edge. In line 19, the sampling path set is fed to Node2Vec to obtain the initial node embedding , which will be given to SEAL.
Taking G (shown in Figure 4) as an example, the path set obtained by Algorithm 1 can form the sampling enclosing subgraph (k = 1) or (k = 2). The node might not be sampled because of the low transition probability to when k = 1. For the same reason, the nodes and might also not be sampled when k = 2.
| Algorithm 1: WRWS |
Input: : a large-scale graph; = + : sampling quantities including of tree and of tree ; : a transition probability matrix; k: a hyper parameter of a k-hops enclosing subgraph; Output: represents a node embedding set of a sampling enclosing subgraph, which is an input parameter of SEAL;
|
4.5. SEAL
SEAL [2] is a variant of GNNs [8], which is used to jointly learn from three types of features, including the enclosing subgraph, node embeddings and node attributes. The initial node embeddings of the sampling enclosing subgraph generated by the WRWS (shown in Algorithm 1) are input into SEAL. Then SEAL learns node embeddings of an enclosing subgraph for link prediction. SEAL takes as input, where A is the adjacency matrix of the sampling enclosing subgraph and X is a node information matrix. SEAL learns node embeddings for link prediction in three steps: (1) node information matrix generating, (2) node embedding learning by GNNs, (3) link prediction of the enclosing subgraph.
Node Information Matrix Generating. A node information matrix X is a node’s feature vector, which is composed of node labels, initial node embeddings and node attributes.
Node labels are calculated by the algorithm of Double-Radius Node Labeling (DRNL), which labels every node of by the function as follows:
where we assign = 1 and = 1. and (refer to Definition 3) are the hop distances of to and , respectively. means to return the smallest of the two values. and denotes upwards to the nearest integer. (d/2) and (d%2) are the integer and decimal parts of d divided by 2, respectively. After acquiring the node labels of , we construct label vectors of nodes by using their one-hot encoding vectors.
The initial node embeddings, generated by WRWS (refer to Algorithm 1), have bad generalization performance in our experiments because we only sample a set of positive links in the enclosing subgraph . In order to improve the performance of link prediction, we further sample a set of negative links (refer to Definition 5). We input the to the [1] and generate the initial node embeddings.
Link Prediction of Enclosing Subgraph. We concatenate the node label vector, initial node embedding and attribute vector of each node in the node information matrix X. Taking as input, the GNN can simultaneously learn from all three types of features, where A is the adjacency matrix of . This model learning from three types of features of labels, embeddings and attributes of nodes is SEAL, which is used for link prediction of target nodes .
5. Experiments
In this section, we describe our datasets, and baseline models and present the experimental results to demonstrate the performance of WSEL model in link prediction tasks, which demonstrates that the WSEL model can improve the scalability of enclosing subgraph–based methods. The source code and datasets can be obtained from https://github.com/swurise/wsel (accessed on 7 January 2026).
5.1. Datasets
In Table 1, we consider the following real-world graph datasets. USAir [28] is a network of American airlines. C. elegans [29] is the neural network of Caenorhabditis elegans. Router [30] is an Internet at the router level. Power [31] is an electrical grid of the western United States. Yeast [32] is a network of protein interactions. Ecoli [33] is a pairwise reaction network of metabolites in Escherichia Coli. PB [34] is a network of American political blogs. Cora [35] is a classification citation network of research papers constructed by McCallum et al. CiteSeer [36], similar to Cora, is a network of citing and cited information between papers.
Table 1.
Statistics of the experimented datasets.
5.2. Baselines
To validate the performance of our approach, we employ eight state-of-the-art network embedding methods as baselines to compare with our WSEL model: Common Neighbors (CN), Adamic-Adar (A-A), GCN, GraphSAGE, Graph Isomorphism Network (GIN), Matrix Factorization (MF), Node2vec and SEAL. CN calculates and obtains the common one-hop neighbors of both target nodes and further speculates the potential relationship between the two nodes. A-A [37] is devised by Lada A. Adamic and Eytan Adar to characterize individual information on Internet in order to analyze social network structure. The representative application of A-A is the mining of correlations between groups of people. GCN [38] is a scalable method for semi-supervised learning on graph-structured data that learns hidden layer representations by encoding both local graph structure and features of nodes. GraphSAGE [18] fetches structural and textual features of large graphs to generate low-dimensional node embeddings efficiently. GIN [17] is a theoretical framework for analyzing the expressive power of GNNs to capture different graph structures. MF [39] characterizes both items and users by factor vectors inferred from item rating patterns. High correspondence between item and user factors leads to a recommendation, which analyzes patterns of user interest in products to provide personalized recommendations. Node2vec [1] maps nodes to a low-dimensional space by learning continuous node feature representations in networks, which maximizes the likelihood of preserving network neighborhoods of nodes. SEAL [2] learns a heuristic function mapping the subgraph patterns to link existence by extracting a local subgraph around each target link from a given network.
5.3. Evaluation Metrics and Parameter Settings
In Table 1, we consider nine real-world graph datasets: USAir, C.elegans, NS, Router, Power, Yeast, Ecoli, PB, Cora and CiteSeer. We randomly split the existing edges from each dataset into an 85% training set, a 10% testing set, and a 5% validation set. We randomly generate the same number of negative samples (nonexistent edges) of positive samples (i.e., a 1:1 ratio for positive and negative samples). We take a standard evaluation metric, AUC scores (area under the ROC curve) [40], as evaluation metrics to measure the link prediction performance. AUC represents the probability that nodes in a random unobserved link are more similar than those in a random nonexistent link. In the iterative calculation of node weight, we set the exit condition = . When calculating the sampling quantity, we set the hop distance as k = 3 and the amplification coefficient as = 9. We run all the models six times and report the averaged performance in Table 2.
Table 2.
Comparison with the AUC values.
5.4. Experimental Results
For experiments, we evaluate the effectiveness and efficiency of our WSEL on nine real-world graph datasets for the link prediction task.
Table 2 reports the average AUC for nine datasets and nine link prediction models, in which the larger the value of AUC, the better the link prediction performance. In all datasets, enclosing-subgraph-based models SEAL and WSEL are superior to other baseline models. In addition, WSEL gives very comparable results to SEAL or even better than SEAL in datasets of Yeast and Cora. In order to meet the needs of large-scale graph applications, we achieve this performance on the basis of using the algorithm WRWS by orders of magnitude less resource consumption. competitive link prediction performance under substantially reduced computational cost. In general, in Table 2, it can be seen that the AUC values of WSEL differ only marginally from those of SEAL in most cases and are higher than other baseline models, which indicates that the method of weighted sampling enclosing subgraphs embedding can preserve most task-relevant structural and attribute features while substantially reducing computational overhead.
5.5. Parameter Sensitivity Analysis and Ablation Study
In this section, we further perform parameter sensitivity analysis and ablation study. Due to space limitations, we only take the datasets of USAir and E. coli as examples to conduct consumption analyses of time and cuda memory. To demonstrate the effectiveness of the proposed method, we take SEAL as the baseline to conduct comparative experiments under different parameter settings, with and without the WRWS module. Similarly, due to space limitations and our focus on the core research problem, this work does not include a more extensive comparison with a wider range of state-of-the-art alternative scalable graph embedding methods, which will be considered an important direction for future work.
Shown in Figure 5 and Figure 6, the results illustrate how the hop distance k and the amplification coefficient affect the performance of link prediction and the consumption of computation time and CUDA’s memory. The change in AUC, computation time and CUDA’s memory of all datasets are qualitatively similar, where the increase in the AUC, computation time and CUDA’s memory along with the values of k and . When the hop distance k is less than 3, the 2-hop or 1-hop, the link prediction effectiveness of target node pairs is not ideal enough, and the consumption of computation time and CUDA’s memory are relatively small. The reason is that the enclosing subgraph around target nodes is not large enough. When k is higher than 5, the enclosing subgraph will also be large-scale with higher computation and memory costs during training, but the performance improvement is not apparent, as shown in Figure 5 and Figure 6. When the amplification coefficient is less than 7, the performance is not good enough because of the poor sampling quantities. For the same reason, if the amplification coefficient is higher than 9, the scale of sampling enclosing subgraphs will gradually increase, which will cost large computational and memory resources with the small increments of AUC values. So, we need to strike a balance between the sampling quantity and AUC, which helps to improve AUC values using appropriate sampling, computation and memory costs. In general, the chosen values of and k represent a practical trade-off according to the server’s capacity. The amplification coefficient , together with k, determines the sampling quantity (i.e., the sampling budget or the number of sampled edges). The size of subsampled graphs also increases as the sampling quantity grows. Experiments conducted on AUCs and consumption of time and cuda memory indicate a positive scaling relationship with respect to the sampling quantity.
Figure 5.
Results of parameter sensitivity and ablation analysis on the consumption of time and cuda memory (Along with the increase in amplification coefficient , the consumption of time and cuda memory is analyzed for each hop k).
Figure 6.
Results of parameter sensitivity and ablation analysis on AUCs (Along with the increase in amplification coefficient , the AUCs are analyzed for each hop k).
We conducted an ablation study in this section. Since the added module can exhibit multiple configuration states depending on the hop distance (k) and the amplification coefficient (), comparing any single configuration state (represented by the markers on the curves, shown in Figure 5 and Figure 6 with the state in which the sampling module is removed (represented by the thick horizontal black line) is inherently unconvincing. For these reasons, we are compelled to combine the parameter sensitivity analysis and the ablation study into an integrated experiment. Shown in each subfigure of Figure 5 and Figure 6, the thick horizontal black lines indicate the AUCs and the resource consumptions of the server separately obtained when the entire dataset is sampled; in other words, they represent the AUCs and the resource consumptions of the server achieved without considering the WRWS module. Even when k = 7 and = 15 take their maximum values in the figure, it can be seen from Figure 5 and Figure 6 that the AUC exceeds the horizontal black line in most cases; moreover, when the time consumption is lower than that of the horizontal black line shown in Figure 5, the CUDA memory consumption is significantly lower than the horizontal black line.
6. Limitations and Discussion
Despite its effectiveness, WSEL has several limitations. First, the benefits of weighted sampling are more pronounced in Scale-free Graphs, which follow a highly power-law distribution, as nodes of these graphs exhibit a natural tendency to form connections with highly central nodes whose importance can be effectively captured. But in graphs with relatively uniform degree distributions, the advantage over uniform sampling may be marginal, as the structural heterogeneity is limited. Second, the performance of WSEL is sensitive to sampling-related hyperparameters, such as the sampling quantity and walk length, which may require tuning for different datasets. Our experiments indicate that inappropriate parameter choices can lead to either insufficient coverage of important nodes or excessive computational cost, highlighting the need for careful tuning depending on dataset characteristics. Third, although WSEL reduces the computational overhead of enclosing subgraph-based methods, it still relies on node-weighted vector computing and weighted sampling, which may face challenges on extremely large graphs. Finally, while the method demonstrates strong link prediction performance in the evaluated datasets, its effectiveness in graphs with weak community structure or highly homogeneous attributes, such as random graphs, remains to be explored, suggesting potential directions for future improvement and scalability optimization. Finally, although the method shows strong link prediction performance on the evaluated datasets, its effectiveness in graphs with weak community structure or highly homogeneous attributes (e.g., random graphs) remains unexplored, suggesting potential directions for future improvements and scalability optimization.
7. Conclusions and Future Work
This paper has presented a practical enclosing subgraph embedding model WSEL, which can solve large-scale graphs’ computing and memory bottlenecks. WSEL utilizes weighted sampling to obtain a sparse enclosing subgraph while preserving most task-relevant structural and attribute information, making it especially suitable for scenarios in which sampling is unavoidable. In WSEL, we obtain sampling enclosing subgraphs by weighted random walks and generate the initial node embeddings for the sampling enclosing subgraphs. To obtain the initial node embeddings, we have designed a WRWS algorithm to generate sampling enclosing subgraphs. The WRWS can ensure that the important structural features of nodes are effectively extracted when the sample size is not saturated. Eventually, the SEAL model conducts link prediction for target node pairs by integrating the features of subgraph labels, initial node embeddings and attributes. Experimental results in nine real-world graphs have shown the efficiency and effectiveness of weighted sampling enclosing subgraphs embedded in link prediction. In the future, we plan to further validate the performance of the WSEL model on some relatively larger-scale datasets.
Funding
This research was funded by the Science and Technology Research Program of Chongqing Municipal Education Commission, grant number KJZD-K202403103, and the Science and Technology Research Program of Chongqing Municipal Education Commission, grant number KJQN202303114.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The original data and code presented in the study are openly available in GitHub at https://github.com/swurise/wsel (accessed on 7 January 2026).
Conflicts of Interest
The author declares no conflicts of interest.
References
- Grover, A.; Leskovec, J. Node2vec: Scalable Feature Learning for Networks. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; Volume 2016, pp. 855–864. [Google Scholar]
- Zhang, M.; Chen, Y. Link Prediction based on Graph Neural Networks. In Proceedings of the NIPS’18: 32nd International Conference on Neural Information Processing Systems, New Orleans, LA, USA, 10–16 December 2018; pp. 5171–5181. [Google Scholar]
- Yuki Ito, T.Y. Prediction of the hydration structures at the protein-protein Interface of dimers using deep learning. Chem. Phys. Lett. 2025, 878, 142372. [Google Scholar] [CrossRef] [Scilit]
- Hoon Park, J.J.J. HeteLFX: Heterogeneous recommendation with latent feature extraction. Electron. Commer. Res. Appl. 2024, 67, 101419. [Google Scholar] [CrossRef] [Scilit]
- Cai, L.; Li, J.; Wang, J.; Ji, S. Line Graph Neural Networks for Link Prediction. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 44, 5103–5113. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cai, L.; Ji, S. A multi-scale approach for graph link prediction. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; Volume 34, pp. 3308–3315. [Google Scholar]
- Kumar, A.; Singh, S.S.; Singh, K.; Biswas, B. Link prediction techniques, applications, and performance: A survey. Phys. A Stat. Mech. Appl. 2021, 553, 124289. [Google Scholar] [CrossRef] [Scilit]
- Scarselli, F.; Gori, M.; Tsoi, A.C.; Hagenbuchner, M.; Monfardini, G. The Graph Neural Network Model. IEEE Trans. Neural Netw. 2009, 20, 61–80. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Gkarmpounis, G.; Vranis, C.; Vretos, N.; Daras, P. Survey on Graph Neural Networks. IEEE Access 2024, 12, 128816–128832. [Google Scholar] [CrossRef] [Scilit]
- Perozzi, B.; Al-Rfou, R.; Skiena, S. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, New York, NY, USA, 24–27 August 2014; pp. 701–710. [Google Scholar]
- Tang, J.; Qu, M.; Wang, M.; Zhang, M.; Yan, J.; Mei, Q. Line: Large-scale information network embedding. In Proceedings of the 24th International Conference on World Wide Web, Florence, Italy, 18–22 May 2015; pp. 1067–1077. [Google Scholar]
- Wang, D.; Cui, P.; Zhu, W. Structural deep network embedding. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 1225–1234. [Google Scholar]
- Cui, Z.; Li, Z.; Wu, S.; Zhang, X.; Liu, Q.; Wang, L.; Ai, M. DyGCN: Efficient Dynamic Graph Embedding With Graph Convolutional Network. IEEE Trans. Neural Netw. Learn. Syst. 2024, 35, 4635–4646. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Sun, C.; Li, C.; Lin, X.; Zheng, T.; Meng, F.; Rui, X.; Wang, Z. Attention-based graph neural networks: A survey. Artif. Intell. Rev. 2023, 56, 2263–2310. [Google Scholar] [CrossRef] [Scilit]
- Kipf, T.N.; Welling, M. Variational Graph Auto-Encoders. In Proceedings of the NIPS Workshop on Bayesian Deep Learning, Barcelona, Spain, 10 December 2016. [Google Scholar]
- Veličković, P.; Cucurull, G.; Casanova, A.; Romero, A.; Liò, P.; Bengio, Y. Graph Attention Networks. In Proceedings of the International Conference on Learning Representations (ICLR), Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Xu, K.; Hu, W.; Leskovec, J.; Jegelka, S. How Powerful are Graph Neural Networks? In Proceedings of the ICLR2019, New Orleans, LA, USA, 6–9 May 2019; pp. 1–17. [Google Scholar]
- Leskovec, W.L.H.; Ying, R.; Leskovec, J. Inductive Representation Learning on Large Graphs. In Proceedings of the NIPS 2017, Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
- Chiang, W.L.; Liu, X.; Si, S.; Li, Y.; Bengio, S.; Hsieh, C.J. Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks. In Proceedings of the ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), Anchorage, AK, USA, 4–8 August 2019. [Google Scholar]
- Zeng, H.; Zhou, H.; Srivastava, A.; Kannan, R.; Prasanna, V. GraphSAINT: Graph Sampling Based Inductive Learning Method. In Proceedings of the International Conference on Learning Representations (ICLR), Addis Ababa, Ethiopia, 30 April 2020. [Google Scholar]
- Chen, J.; Ma, T.; Xiao, C. FastGCN: Fast Learning with Graph Convolutional Networks via Importance Sampling. In Proceedings of the ICLR 2018, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Zou, D.; Hu, Z.; Wang, Y.; Jiang, S.; Sun, Y.; Gu, Q. Layer-Dependent Importance Sampling for Training Deep and Large Graph Convolutional Networks. In Proceedings of the NeurIPS 2019, Vancouver, BC, Canada, 8–14 December 2019. [Google Scholar]
- Louis, P.; Jacob, S.A.; Salehi-Abari, A. Sampling Enclosing Subgraphs for Link Prediction. In Proceedings of the CIKM ’22: Proceedings of the 31st ACM International Conference on Information & Knowledge Management, Atlanta, GA, USA, 17–22 October 2022; pp. 4269–4273. [Google Scholar]
- Li, A.; Chen, Y.; Ren, C.; Wang, W.; Hu, M.; Li, T.; Yu, H.; Chen, Q. Federated Graph Learning with Adaptive Importance-based Sampling. arXiv 2024, arXiv:2409.14655. [Google Scholar] [CrossRef] [Scilit]
- Bi, B.; Liu, S.; Wang, Y.; Mei, L.; Cheng, X. LPNL: Scalable Link Prediction with Large Language Models. In Proceedings of the Findings of the Association for Computational Linguistics: ACL 2024, Bangkok, Thailand, 11–16 August 2024; pp. 3615–3625. [Google Scholar]
- Haveliwala, T.H. Topic-sensitive pagerank: A context-sensitive ranking algorithm for web search. IEEE Trans. Knowl. Data Eng. 2003, 15, 784–796. [Google Scholar] [CrossRef] [Scilit]
- Page, L.; Brin, S.; Motwani, R.; Winograd, T. The PageRank Citation Ranking: Bringing Order to the Web; Stanford Digital Libraries Working Paper; Stanford University: Stanford, CA, USA, 1998. [Google Scholar]
- Batagelj, V.; Mrvar, A. Pajek Datasets. Available online: https://github.com/swurise/wsel (accessed on 1 January 2026).
- White, J.G.; Southgate, E.; Thomson, J.N.; Brenner, S. The structure of the nervous system of the nematode Caenorhabditis elegans. Philos. Trans. R. Soc. London. Ser. B Biol. Sci. 1986, 314, 1–340. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Spring, N.; Mahajan, R.; Wetherall, D. Measuring isp topologies with rocketfuel. IEEE/ACM Trans. Netw. 2004, 12, 2–16. [Google Scholar] [CrossRef] [Scilit]
- Watts, D.J.; Strogatz, S.H. Collective dynamics of ‘small-world’ network. Nature 1998, 393, 440–442. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Von Mering, C.; Krause, R.; Snel, B.; Cornell, M.; Oliver, S.G.; Fields, S.; Bork, P. Comparative assessment of large-scale data sets of protein–protein interactions. Nature 2002, 417, 399–403. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, M.; Cui, Z.; Jiang, S.; Chen, Y. Beyond link prediction: Predicting hyperlinks in adjacency space. Proc. Aaai Conf. Artif. Intell. 2018, 32, 4430–4437. [Google Scholar] [CrossRef] [Scilit]
- Ackland, R. Mapping the U.S. Political Blogosphere: Are Conservative Bloggers More Prominent? In Proceedings of the BlogTalk Downunder 2005 Conference, Sydney, Australia, 19–22 May 2005; pp. 1–12. [Google Scholar]
- McCallum, A.; Nigam, K.; Rennie, J.; Seymore, K. Automating the Construction of Internet Portals with Machine Learning. Inf. Retr. J. 2000, 3, 127–163. [Google Scholar] [CrossRef] [Scilit]
- Lawrence, C.G.; Bollacker, K.; Lawrence, S. CiteSeer: An Automatic Citation Indexing System. In Proceedings of the DL ’98: Proceedings of the third ACM Conference on Digital Libraries, Pittsburgh, PA, USA, 23–26 June 1998; pp. 89–98. [Google Scholar]
- Adamic, L.A.; Adar, E. Friends and Neighbors on the Web. Soc. Netw. 2003, 25, 211–230. [Google Scholar] [CrossRef] [Scilit]
- Kipf, T.N.; Welling, M. Semi-Supervised Classification with Graph Convolutional Networks. In Proceedings of the ICLR2017, Toulon, France, 24–26 April 2017. [Google Scholar]
- Yehuda Koren, R.B.; Volinsky, C. Matrix factorization techniques for recommender systems. Computer 2009, 42, 30–37. [Google Scholar] [CrossRef] [Scilit]
- Hanley, J.A.; Mcneil, B.J. The meaning and use of the area under a receiver operating characteristic (ROC) curve. Radiology 1982, 143, 29–36. [Google Scholar] [CrossRef] [Scilit] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.







