Next Article in Journal
Fixed-Time Leader-Following Consensus Tracking Control for Nonliear Multi-Agent Systems under Jointly Connected Graph
Previous Article in Journal
Penalty Virtual Element Method for the 3D Incompressible Flow on Polyhedron Mesh
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Link Prediction in Complex Networks Using Recursive Feature Elimination and Stacking Ensemble Learning

1
School of Mathematics and Physics, North China Electric Power University, Baoding 071003, China
2
Hebei Key Laboratory of Physics and Energy Technology, North China Electric Power University, Baoding 071000, China
3
School of Control and Computer Engineering, North China Electric Power University, Baoding 071003, China
*
Author to whom correspondence should be addressed.
Entropy 2022, 24(8), 1124; https://doi.org/10.3390/e24081124
Submission received: 12 July 2022 / Revised: 11 August 2022 / Accepted: 12 August 2022 / Published: 15 August 2022
(This article belongs to the Topic Complex Systems and Artificial Intelligence)

Abstract

:
Link prediction is an important task in the field of network analysis and modeling, and predicts missing links in current networks and new links in future networks. In order to improve the performance of link prediction, we integrate global, local, and quasi-local topological information of networks. Here, a novel stacking ensemble framework is proposed for link prediction in this paper. Our approach employs random forest-based recursive feature elimination to select relevant structural features associated with networks and constructs a two-level stacking ensemble model involving various machine learning methods for link prediction. The lower level is composed of three base classifiers, i.e., logistic regression, gradient boosting decision tree, and XGBoost, and their outputs are then integrated with an XGBoost model in the upper level. Extensive experiments were conducted on six networks. Comparison results show that the proposed method can obtain better prediction results and applicability robustness.

1. Introduction

Complex networks can be used to model various real-world complex systems such as social, biological and information systems, where nodes denote different individuals or entities in the system, and links or edges indicate the relations or interaction between nodes [1]. Great efforts have been devoted to analyze the network topologies, and predict links among nodes in order to better understand the evolution of networks. A challenging issue in complex network analysis is link prediction, which aims to reveal potential links or forecast future relations based on the known information of nodes and network structure [2,3].
A large number of methods have been proposed to solve the link prediction problem [4,5,6,7], which are mainly divided into similarity-based methods and learning-based methods. Similarity-based methods are the most common, and especially structural similarity, due to simple and efficient computation, and universal applicability to networks with similar structures. These methos hold the view that the probability of link existence between two nodes is proportional to their topological similarity. In terms of the topological information range used in similarity calculation, these methods can be grouped into three categories: local similarity methods, global similarity methods, and quasi-local similarity methods. Local similarity methods explore local information of the disconnected nodes such as common neighbors and node degree, and include Common Neighbors (CNs) [8], Jaccard coefficient (JC) [9], Preferential Attachment (PA) [10], the Adamic–Adar (AA) index [11], Resource Allocation (RA) [12], Cosine similarity, and the Salton index (SI) [13]. These methods achieve good results in many cases due to lower computational complexity and simple implementation [14]. Global similarity methods utilize the topological information of the whole network for link prediction. Klein et al. [15] introduced average commuting time (ACT) as a novel distance function, and considered that the node similarity is related to average commuting time. Brin et al. [16] presented the random walk with restart (RWR) index, an extended application of the PageRank algorithm, to improve the search efficiency of large-scale Web search engines. Jeh et al. [17] estimated the similarity score by considering recursively the similarity of neighboring nodes, and defined the SimRank index. These methods incur a higher computational cost to learn the global information from the known networks, and thus are infeasible for large networks. Quasi-local similarity methods have been introduced as trade-offs between local and global approaches, with the aim of extracting the same amount of topological information of networks as global methods and having the computing efficiency of local methods. Examples of such methods include local path (LP) [18], local random walk (LRW) [19], and superposed random walk (SRW) [19], whose results are a balance of prediction accuracy and computational complexity.
Learning-based methods, by comparison, predict the link likelihood of node pairs on the basis of machine learning algorithms. Specially, link prediction is treated as a binary classification problem, in which a prediction model is built by learning the topological features extracted from the observed network structure. Wu et al. [20] employed the AdaBoost algorithm to integrate CN, JC, AA, and RWR to predict links on two networks. Li et al. [21] aggregated logistic regression and XGBoost to learn four similarity indices to predict missing links. Ma et al. [22] used logistic regression to determine the weights of different similarity indices, and then predicted the connection probabilities of missing links. The ordered weighted averaging operator [23] and Choquet fuzzy integral [24] were utilized to fuse similarity indices. Furthermore, network embedding [25] and deep neural networks [26] were used to improve the performance of link prediction in complex networks. Learning-based methods usually perform better than similarity-based methods, but consume more resources in the training process of the prediction model [27].
Generally, different networks have their own structural features and one similarity index can only exploit some structural features of networks. One or several fixed similarity indices are applied to predict links on all networks, which may degrade the prediction performance. To this end, we incorporate the inherent topological features into link prediction for different networks. In this paper, a novel link prediction method is proposed, which combines random forest-based recursive feature elimination and stacking ensemble learning for link prediction, named RF-RFE-SELLP. The main contributions are three-fold. First, recursive feature elimination in random forest is employed to effectively select representative and relevant structural features associated with the networks. Second, a stacking ensemble framework is presented to combine the advantages of different machine learning methods to enhance the prediction results of the model. Considering better generalization performance and discrepancy of models, three models, i.e., logistic regression (LR), gradient boosting decision tree (GBDT), and XGBoost, are selected as the base models and XGBoost is employed as the top-level model. Third, extensive experiments on a variety of networks were carried out, showing that the proposed RF-RFE-SELLP method obtains better prediction results and applicability robustness than other comparison methods.
The remainder of this paper is organized as follows. Section 2 introduces the problem description, similarity indices, and datasets. The proposed method is presented in Section 3. Extensive experimental results are shown and analyzed in Section 4. Finally, Section 5 concludes this paper.

2. Preliminaries

2.1. Problem Description

Consider an undirected and unweighted network G V , E , where V and E denote the sets of nodes and links, respectively. As is usual, self-loops and multiple links are not allowed. For a network with N nodes, A = a i j N × N represents the adjacency matrix. Let S be the universal set of all N N 1 2 possible links, and S E be the set of nonexistent links. For each nonexistent link e v i , v j S E , v i , v j V , the similarity score is evaluated to quantify the link existence likelihood according to a defined similarity index. Generally, the link set E can be randomly divided into two parts: training set E T and test set E P , where E = E T E P , E T E P = . The training set E T is utilized to compute the similarity index to obtain the similarity score of the test set E P . Link prediction methods exploit the known topological information to predict the missing or unknown links in the network. It can be deemed to be a binary classification problem, where the class label is determined by the existence of links. If there is a direct connection between two nodes, the label is 1; otherwise, the label is 0. In this way, each link is assigned a label, and then the topological features of each link are extracted from the network information by computing the similarity indices. The goal of link prediction is to utilize these extracted topological features to forecast the links in the network G.

2.2. Similarity Indices

Let Γ v i denote the neighbor set of node v i , and k v i denote its degree. Several similarity indices are introduced as follows.
(i) Common Neighbor (CN) index [8]: the CN index emphasizes that a pair of nodes with more common neighbors are more likely to be connected:
S C N v i , v j = Γ v i Γ v j
(ii) Preferential Attachment (PA) index [10]: the PA index assumes that the connection probability of a pair of nodes is proportional to the product of their degree:
S P A v i , v j = k v i k v j
(iii) Adamic–Adar (AA) index [11]: the AA index assigns more weights to the common neighbor nodes with a low degree:
S A A v i , v j = v l Γ v i Γ v j 1 l g k v l .
(iv) Leicht–Holme–Newman (LHN) index [28]: a pair of nodes with more common neighbors has high similarity, and the product of two node degrees is proportional to the mean of a common neighbor’s number:
S L H N v i , v j = Γ v i Γ v j k v i × k v j
(v) Resource Allocation (RA) index [12]: the proposal of RA index was inspired by the process of network resource allocation. Some resources are passed by node v i to v j , and their common neighbor is the transmission medium. The number of resources received by v j is defined as the similarity:
S R A v i , v j = v l Γ v i Γ v j 1 k v l .
(vi) Average Commute Time (ACT) index [15]: the ACT index assumes that the smaller the average commute time of two nodes, the closer the two nodes. Denote m x , y as the average number of steps that a random walker starting from node v i to reach node v j . The average commute time is then described as:
n i , j = m i , j + m j , i
By solving the pseudoinverse of the Laplacian matrix L+, we can obtain:
n i , j = M l i i + + l j j + 2 l i j +
and then the similarity is defined as:
S A C T v i , v j = 1 l i i + + l j j + 2 l i j +
where l i j + represents the corresponding element in the matrix L + .
(vii) Matrix Forest Index (MFI) index [29]: the MFI index is based on matrix-forest theory and expressed as:
S M F I v i , v j = 1 + α L 1 , α > 0
where L is the Laplacian matrix.
(viii) Random Walk with Restart (RWR) index [16]: the RWR index assumes that the random walker returns to the starting point with a certain probability 1 − c, and P is the transition probability matrix. The probability vector of arriving at each node v i of the network at time t + 1 is:
π v i t + 1 = c P T π v i t + 1 c e v i
where e v i represents the starting point, and the similarity index is defined as:
S R W R v i , v j = π v i v j + π v j v i
where π v i v j represents the probability from node v i to node v j .
(ix) SimRank index [17]: the SimRank index states that two nodes are similar if they are connected to similar nodes:
S S i m R a n k v i , v j = C v l Γ v i v l Γ v j s v l v l S i m R a n k k v i k v j
where the attenuation parameter s v i v i = 1 , and C 0 , 1 .
(x) Local Path (LP) index [18]: the LP index considers local paths on the basis of the CN index, and attains a balance between the precision and computational complexity:
S L P v i , v j = A 2 v i , v j + α A 3 v i , v j
where A 2 v i , v j and A 3 v i , v j are the number of different paths with the length 2 and 3, respectively, and α is the free parameter α = 0.001 .
(xi) Local Random Walk (LRW) index [19]: the random walker starts from node v i at time t, and π v i v j t is the probability that the walker just goes to node v j at time t + 1:
π v i t + 1 = P T π v i t , t 0
The initial resource of node v i is q v i , and the LRW index at time step t is defined as:
S L R W t = q v i π v i v j t + q v j π v j v i t
(xii) Superposed Random Walk (SRW) index [19]: on the basis of the LRW index, the value of the SRW index can be acquired by summing the results of step t and the previous step:
S S R W t = τ = 1 t S L R W τ = τ = 1 t q v i π v i v j τ + q v j π v j v i τ

2.3. Dataset Description

To evaluate the effectiveness of the proposed RF-RFE-SELLP model, we performed massive experiments on six real-world networks from different fields. The basic statistics of these networks are summarized in Table 1 and a brief description is provided.
C. elegans [30]: The Caenorhabditis elegans network consists of 297 neurons and 2148 connections.
Vicker [31]: the Vicker dataset is a social network between seventh grade students in a school in Victoria, Australia., which consists of 29 students and 376 links.
Email [32]: the E-mail network has 1133 users and 5451 communications between the members of University at Rovira i Virgili.
NS [33]: the NetScience dataset is a co-authorship network consisting of 1589 scientists and 2742 co-authorships.
SciMet [34]: the SciMet dataset is a network of articles from or cited by Scientometrics that includes 3084 articles and 10,399 links.
Router [35]: the Router dataset is an internet router hierarchical network containing 5022 routers and 6258 links.

3. Proposed Framework: RF-RFE-SELLP

In this section, the proposed RF-RFE-SELLP model is presented in detail, including model structure and algorithm procedure.

3.1. Motivation

Twelve similarity indices are introduced in Section 2.2, among which each index exploits one or two structural features of networks [36]. The fusion of these indices can incorporate multiple structural features to improve prediction performance. However, different networks have different inner structural features.
To validate this fact, a series of experiments was constructed on the six networks described above. For each network, the matching score [22] of one similarity index is computed:
σ = E E ˜ E
where E ˜ denotes the set of top E ranked links predicted by the predefined index. The larger the value of σ , the better the accuracy of the index. In this work, the PA index and the LP index are employed to illustrate that one similarity index plays different roles in different networks. The matching scores of the two indices, σ P A and σ L P , respectively, are calculated according to Equation (17), and the difference between them is defined as:
Δ σ = σ L P σ P A
The values of Δ σ for the six networks are shown in Figure 1. It can be observed that for NS and Vicker networks, the role of the PA index is superior to that of the LP index; that is, the structural features induced by the PA index can better represent this network. For the Email and SciMet networks, the role of the LP index is greater than that of the PA index, which indicates that LP feature is more representative on these networks. For the remaining two networks, there is little difference between the two indices. Therefore, it is unwise to use structural features of one similarity index for link prediction in all networks. Due to different contributions of each index to different networks, it is essential to select suitable features of networks to improve the prediction accuracy.

3.2. Random Forest-Based Recursive Feature Elimination for Feature Selection

In random forest (RF), feature selection can be performed in a very simple way by the removal of features with low importance. However, RF can only provide the ranking of importance for each feature, but cannot determine the effective features and the number of features in the optimal feature set. In order to choose the relevant features for building the classification model, we recursively remove the features with lower importance to obtain smaller feature subsets, estimate the discriminative abilities of features of the subsets, and select those features with greatest discriminative power to enhance the prediction performance.
For m features of x 1 ,   x 2 ,   ,   x m , the variable importance measure (VIM) is computed to evaluate the importance of each feature, and can be derived from the Gini index. The Gini index can be defined as follows:
G I t = c = 1 C c c p t c p t c = 1 c = 1 C p t c 2
where C represents the number of categories, and p t c indicates the proportion of samples that belongs to category c for node t. The VIM of feature x j in node t is:
V I M j t n o d e = G I m G I l G I r
where G I l and G I r represent the Gini index of left and right child branches, respectively. The VIM of feature x j in the i-th decision tree is:
V I M j i t r e e = t T V I M j t
where T is the node set of feature x j in the i-th decision tree. The VIM of feature x j in RF is:
V I M j R F = i = 1 n V I M i j
where n is the number of trees in RF. The importance score of feature x j is defined by normalizing the V I M j :
V I M j = V I M j i = 1 12 V I M i
The higher the value of V I M j , the greater the importance of feature x j on RF for classification.
Furthermore, recursive feature elimination (RFE) [37] is utilized to repeatedly remove the feature with the lowest VIM to obtain a new feature subset until only one feature remains in the feature set. We estimate the discriminative abilities of features in the subsets and then select the optimal features. To find the optimal number of features, k-fold cross-validation is employed to score different feature subsets and select the best scoring set of features. The cross-validation score (CVS) is used to evaluate the discrimination of each feature subset, defined as:
CVS = k = 1 K P k K
where p k is the classification accuracy on the k-th cross validation subset. The feature subset with the highest CVS is chosen as the optimal one. The proposed RF-RFE method aims to eliminate irrelevant features and redundant features to represent the original features with as few features as possible in order to improve the generalization ability of the classification model. In this work, k is set as 5, and the simulation is conducted 20 times.

3.3. Stacking Ensemble Learning for Link Prediction

Ensemble learning combines multiple weak supervised models to form a better supervised model. Ensemble learning methods are mainly divided into three categories: bagging, boosting, and stacking. Stacking fuses information from base models to generate a new model to obtain better classification performance than that of a single model. The base model with strong learning ability is conductive to improving the classification results. Moreover, the classification models with great differences should be selected as the base model, which can reflect the advantages of different algorithms to the greatest extent. In this paper, a stacking ensemble learning model for link prediction is proposed, named SELLP, in which three different models, i.e., XGBoost, LR, and GBDT, are selected as the base models, and XGBoost, which has better generalization performance, is employed as the top-level model. The model is shown in Figure 2.
For a network with N nodes, a dataset S is constructed containing all possible links. The dataset S is divided into a training set S T and test set S P , where S T = x i , y i , i = 1 , , N T , N T is the number of samples, x i D , and y i is the feature vector and label of the i-th sample, respectively. In the training phase, the dataset S T is randomly divided into five subsets S k T ,   k = 1 , , 5 with the same size. Let S k T = S T S k T , S k T , and S k T be the k-th training set and test set in the 5-fold cross validation, respectively. For the base model C j , j = 1 , 2 , 3 of the first layer, the training set S k T is used to train each base model C j to obtain the base model C j k ,   k = 1 , , 5 . After cross validation, 3 × 5 = 15 base models are obtained. For each sample x i in the k-th test set S k T , the prediction result of the base model C j k is y ^ j i . The probability predicted by each base model C j on the subset S k T forms a new dataset S n e w T = y ^ 1 i , y ^ 2 i , y ^ 3 i , y i , i = 1 , , N T . The newly generated dataset is then used to train the fuse model of the second layer in the SELLP model. By learning from the new dataset S n e w T , the XGBoost model can fuse the learning results of multiple base models in the first layer.
For each base model, the test data are different from the training data. All the data are utilized only once in the training phase, which can effectively prevent overfitting. Moreover, in the SELLP model, the training results of base models in the first layer are fully used in the induction process of the fusion model in the second layer. The fusion model can optimize and correct the prediction results of base models in the first layer to improve the accuracy of the SELLP model.
In the test phase, each sample in the test set S P = x l , l = 1 , , N P is fed into the base models in the first layer. For the sample x l , the base models C j k , k = 1 , , 5 , predict the classification results y ˜ j k l , respectively, and then average classification results y ˜ j l = 1 5 k = 1 5 y ˜ j k l can be obtained for each base model C j . The classification results of three base models form a data y ˜ 1 l , y ˜ 2 l , y ˜ 3 l , which is sent to the fuse model to obtain the final classification results given by the SELLP model.

3.4. RF-RFE-SELLP Algorithm

The training procedure of the proposed RF-RFE-SELLP model is summarized as follows:
Step 1: Obtain the adjacency matrix of a network and calculate the similarity scores of 12 feature indices to construct the feature vectors of links in the network.
Step 2: Estimate the VIM of features by the Gini index in random forest, then remove the feature with the lowest VIM, and calculate the corresponding CVS to obtain the optimal feature subset.
Step 3: Construct the dataset including the features and labels of all links, and divide this dataset into the training set and test set. LR, XGBoost, and GBDT are used as the base models in the first layer. Train the base models separately on the training set by 5-fold cross validation, and then obtain the classification results of each base model.
Step 4: Construct new training data from the prediction results by the base models and utilize these data to train the fuse model in the second layer. Then, the final RF-RFE-SELLP model can be obtained. The specific steps of RF-RFE-SELLP algorithm are presented in Algorithm 1.
Algorithm 1: RF-RFE-SELLP algorithm
Input: Network G = V , E  
Output: Parameters of SELLP model
1: Calculate the adjacency matrix A of network G.
2: for each v i , v j V do
3:  y n A :
4:  x n x S 1 v i , v j , , x S 12 v i , v j
5:/* y n is the label, x n is the feature vector, and x S l v i , v j is the score computed by the similarity index S l .*/
6: end for
7: for r 1 to 12 do
8: Compute the VIM of features, and remove the feature with the lowest one.
9: Update feature ranked list, and calculate the corresponding CVS.
10: end for
11: Obtain the optimal feature subset F n by comparing CVS.
12: Construct the set S including the feature subset F n and label y n , and then divide S into the training set S T and test set S P .
13: for k 1 to 5 do
14: for j 1 to 3 do
15: Train the base model C j k on the training set S k T .
16: Predict the probability y ^ j k on the test set S k T .
17: end for
18: end for
19: Construct the set S n e w T = y ^ 1 i , y ^ 2 i , y ^ 3 i , y i , i = 1 , , N T by the prediction results of each base model.
20: Train the fuse model of the second layer on the set S n e w T .
21: Return the parameters of RF-RFE-SELLP model.

4. Experiments

In this section, we compare the proposed RF-RFE-SELLP with similarity-based methods described in Section 2 and supervised learning-based methods, i.e., multi-layer perceptron neural networks (MLP), RF, and AdaBoost for the purpose of validating the performance of RF-RFE-SELLP.

4.1. Experimental Setting

Due to the sparsity of real networks, the training set and test set should be generated with balanced class distribution. The number of existent links is calculated, and the same number of data is randomly selected from the nonexistent links to form a new dataset D . We randomly select a certain fraction (90%) of links from D as the training set D T , and the remaining data as the test set D P .
Three supervised-learning methods, namely AdaBoost, RF and MLP, were employed to identify missing links in the following experiments. The grid search and cross validation are utilized to determine the parameters of the models. All of the link prediction methods were coded in Python 3.8 and all experiments were implemented on a computer with an Intel(R) Xeon(R) Silver 4214 CPU and 32 GB memory. All experimental results are the average results of 10 independent runs.

4.2. Evaluation Metric

In this paper, link prediction is regarded as a binary classification problem. The label of a node pair is positive if a link exists between them, and negative otherwise. Four common terms are introduced to formulate the evaluation metrics [38]. True Positive (TP) is the number of node pairs with links that are correctly recognized as positive. False Positive (FP) corresponds to the number of node pairs without links that are incorrectly labeled as positive. False Negative (FN) refers to the number of node pairs with links that are incorrectly as identified negative. True Negative (TN) is the number of node pairs without links that are correctly classified as negative.
Four evaluation metrics are employed in this work to quantify the prediction performance of algorithms, i.e., Accuracy, Precision, F1-score, and AUC. Accuracy is the proportion of all correctly classified node pairs in the set of node pairs. Precision represents the proportion of all node pairs with links in the set of node pairs classified as positive. Recall is the proportion of node pairs correctly classified as positive in the set of node pairs with links. F1-score is the harmonic average of Precision and Recall.
Accuracy = TP + TN TP + FP + TN + FN
Precision = TP TP + FP
Recall = TP TP + FN
F 1 score = 2 Precision · Recall Precision + Recall
Area under the curve (AUC) can describe the overall performance of the prediction model, given as:
AUC = S 0 n 0 n 0 + 1 / 2 n 0 n 1
where n 0 and n 1 are the numbers of positive and negative node pairs, respectively, and S 0 = r i , r i is the rank of i-th positive node pairs in the ranked list.

4.3. Performance Comparison

Figure 3 shows the CVS of selected features obtained by RF-RFE on six networks, where the abscissa indicates the number of selected features and the vertical ordinate represents the corresponding cross validation score. It can be observed that the CVS increases and gradually stabilizes as the number of selected features increases for most networks. The higher CVS indicates the higher discriminative ability of features. In this way, the optimal feature subset can be determined with fewer features and a higher CVS. Taking the Vicker network, for instance, the value of CVS increases from 73.73% to a maximum of 80.36% when the number of features increases from one to five. When the number of features is greater than five, there is a slight decrease in the CVS. This indicates that too many features do not necessarily produce higher classification accuracy. The five features are selected for the Vicker network that make significant contributions to classification results.
To investigate module-wise effectiveness of the three base models and feature selection on the overall performance, the ensemble model, i.e., SELLP (RF-RFE-SELLP without RF-RFE feature selection), and three base models, i.e., GBDT, XGBoost, and LR, are evaluated, respectively. Table 2, Table 3, Table 4 and Table 5 summarize the performance in terms of AUC, Accuracy, Precision, and F1-score of the six networks. With the same features, the ensemble model exhibits better results than the three base models in terms of the four metrics, which highlights the advantage of stacking ensemble learning. Each classification model with the selected features by RF-RFE can achieve better performance results than that with the original features, which proves the effectiveness of RF-RFE feature selection. RF-RFE can eliminate irrelevant and redundant features to represent the raw data in order to improve the generalization ability of the classification model. Moreover, the proposed RF-RFE- SELLP outperforms the comparison methods on all of the six networks. In detail, our model exhibits the highest AUC of 0.9118, Accuracy of 0.8985, Precision of 0.8743, and F1-score of 0.9156 on the Vicker network. Similar results can be observed on the other networks.
To further evaluate the performance of the proposed method, the RF-RFE-SELLP method is compared with supervised learning-based methods, i.e., AdaBoost, RF, and MLP, and similarity-based methods, i.e., CN, MFI, and SRW. Three chosen similarity-based methods belong to global similarity, local similarity, and quasi-local similarity, respectively. Figure 4, Figure 5, Figure 6 and Figure 7 illustrate the comparison results regarding AUC, Accuracy, Precision, and F1-score on the six networks, where one bar with green color indicates the best result on this network.
It can be seen that RF-RFE-SELLP outperforms all of the comparison methods in terms of the four metrics on four networks, i.e., NS, Email, SciMet, and Router. For the Vicker network, the MFI index performs best in the four metrics, whereas the SRW index achieves the best results in terms of AUC and Precision for the C. elegans network. Although some similarity indices can obtain good performance on some networks, the performance varies greatly on different networks. The Precision of the CN index is 0.9710 on the NS network and 0.5606 on the Vicker network; the F1-score of the MFI index is 0.9189 on the Vicker network, but 0.3477 on C. elegans network; and the Precision of the SRW index is 0.9973 on the C. elegans network and 0.6491 on the Vicker network. Among the three similarity indices, the CN index achieves the worst performance on Vicker, NS, SciMet, and Router networks, and the worst results are obtained by the MFI index on C. elegans and Email networks. Compared with similarity-based methods, supervised learning-based methods can obtain more stable results in most respects on most networks. MLP yields the worst results in terms of Precision and Accuracy on C. elegans, NS, Email, SciMet, and Router networks, and the worst classification model is AdaBoost for the Vicker network.
Furthermore, we performed the statistical test for the proposed RF-RFE-SELLP and six comparative methods, i.e., AdaBoost, RF, MLP, CN, MFI, and SRW, in terms of AUC, Accuracy, Precision, and F1-score on six networks. Table 6 shows the results for Accuracy on the Email network.
The F-test and t-test were performed to compare the prediction results. In the case of RF, as a result of the F-test, the obtained p-value (0.45) was greater than the significance level of 0.05, indicating there is no difference in variance between RF-RFE-SELLP and RF. Then, a two-sample assuming equal variance t-test was conducted and the obtained p-value (3.41 × 10−3) was smaller than the significance level of 0.05; that is, there is a statistically significant difference in mean Accuracy between RF-RFE-SELLP and RF. In addition, the 95% confidence interval of mean difference does not include zero. From the results, we can conclude that RF-RFE-SELLP outperforms RF in Accuracy. A similar conclusion can be obtained for AdaBoost, MLP, CN, MFI, and SRW. Moreover, the experimental results in terms of AUC, Precision, and F1-score for these methods also lead to the same conclusion.

4.4. Robustness

In order to verify the robustness of the proposed RF-RFE-SELLP to the size of the training set, we compared CN, SRW, RF, MLP, and RF-RFE-SELLP. We performed the experiments with 80% and 90% training sets. Figure 8 and Figure 9 show the variation in performance in terms of Precision and F1-score with training sets of different sizes, where one bar with blue color indicates the result with 80% training set and one with red color denotes the result with 90% training set. When we reduce the training set size from 90% to 80%, the performance degrades for all methods. However, the degradation is much smaller in the three supervised learning-based methods, i.e., RF, MLP, and RF-RFE-SELLP, compared to similarity-based methods, i.e., CN and SRW. Two indices work solely on local structural information of networks so that 10% removal of links affects their similarity scores, and the decline in F1-score is greater than that in Precision. Three supervised learning-based methods, especially RF-RFE-SELLP, select strong structural features from networks, which results in slight performance degradation.

5. Conclusions

The contributions of this paper include proposing the use of recursive feature elimination in random forest to choose representative structural features for networks, in addition to using the stacking ensemble learning method to predict the missing links. The RF-RFE-SELLP algorithm proposed in this paper is an ensemble learning framework that integrates LR, GBDT, and XGBoost models. Extensive experiments show that the performance of RF-RFE-SELLP in terms of AUC, Accuracy, Precision, and F1-score consistently exceeds that of the individual base model, and the comparison with the no feature selection method demonstrates encouraging performance in terms of these metrics. Moreover, the RF-RFE-SELLP method can achieve better performance than several supervised learning-based and similarity-based methods for most networks.

Author Contributions

Methodology, T.W. and M.J.; investigation, T.W., M.J. and X.W.; writing—original draft preparation, M.J.; writing—review and editing, T.W. and X.W.; supervision, X.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Boccaletti, S.; Latora, V.; Moreno, Y.; Chavez, M.; Hwang, D.U. Complex Networks: Structure and Dynamics. Phys. Rep. 2006, 424, 175–308. [Google Scholar] [CrossRef]
  2. Kumar, A.; Singh, S.S.; Singh, K.; Biswas, B. Link Prediction Techniques, Applications, and Performance: A Survey. Physica A 2020, 553, 124289. [Google Scholar] [CrossRef]
  3. Gou, F.; Wu, J. Triad link prediction method based on the evolutionary analysis with IoT in opportunistic social networks. Comput. Commun. 2022, 181, 143–155. [Google Scholar] [CrossRef]
  4. Zhou, T. Progresses and Challenges in Link Prediction. iScience 2021, 24, 103217. [Google Scholar] [CrossRef]
  5. Martínez, V.; Berzal, F.; Cubero, J.C. A Survey of Link Prediction in Complex Networks. ACM Comput. Surv. 2016, 49, 1–33. [Google Scholar] [CrossRef]
  6. Zhang, Q.; Tong, T.; Wu, S. Hybrid Link Prediction via Model Averaging. Physica A 2020, 556, 124772. [Google Scholar] [CrossRef]
  7. Mori, L.; O’Hara, K.; Pujol, T.A.; Ventresca, M. Examining Supervised Machine Learning Methods for Integer Link Weight Prediction Using Node Metadata. Entropy 2022, 24, 842. [Google Scholar] [CrossRef]
  8. Newman, M.E.J. Clustering and Preferential Attachment in Growing Networks. Phys. Rev. E 2001, 64, 025102. [Google Scholar] [CrossRef]
  9. Jaccard, P. Étude comparative de la distribution florale dans une portion des Alpes et des Jura. Bull. Soc. Vaudoise Sci. Nat. 1901, 37, 547–579. [Google Scholar]
  10. Barabási, A.L.; Albert, R. Emergence of Scaling in Random Networks. Science 1999, 286, 509–512. [Google Scholar] [CrossRef]
  11. Adamic, L.A.; Adar, E. Friends and Neighbors on the Web. Soc. Netw. 2003, 25, 211–230. [Google Scholar] [CrossRef]
  12. Zhou, T.; Lü, L.; Zhang, Y.C. Predicting Missing Links via Local Information. Eur. Phys. J. B 2009, 71, 623–630. [Google Scholar] [CrossRef]
  13. Salton, G.; McGill, M.J. Introduction to Modern Information Retrieval; McGraw-Hill: Auckland, New Zealand, 1983. [Google Scholar]
  14. Aziz, F.; Gul, H.; Muhammad, I.; Uddin, I. Link Prediction Using Node Information on Local Paths. Physica A 2020, 557, 124980. [Google Scholar] [CrossRef]
  15. Klein, D.J.; Randić, M. Resistance Distance. J. Math. Chem. 1993, 12, 81–95. [Google Scholar] [CrossRef]
  16. Brin, S.; Page, L. The Anatomy of a Large-scale Hypertextual Web Search Engine. Comput. Netw. ISDN Syst. 1998, 30, 107–117. [Google Scholar] [CrossRef]
  17. Jeh, G.; Widom, J. Simrank: A Measure of Structural-context Similarity. In Proceedings of the eighth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Edmonton, AB, Canada, 23–26 July 2002; pp. 538–543. [Google Scholar]
  18. Lü, L.; Jin, C.H.; Zhou, T. Similarity Index based on Local Paths for Link Prediction of Complex Networks. Phys. Rev. E 2009, 80, 046122. [Google Scholar] [CrossRef]
  19. Liu, W.; Lü, L. Link Prediction based on Local Random Walk. Euro. Lett. 2010, 89, 58007. [Google Scholar] [CrossRef]
  20. Wu, Z.; Liang, Q.; Liu, Q.; Qin, Z.G. Modified Link Prediction Algorithm based on AdaBoost. J. Commun. 2014, 35, 116. [Google Scholar]
  21. Li, K.; Tu, L.; Chai, L. Ensemble-model-based Link Prediction of Complex Networks. Comput. Netw. 2020, 166, 106978. [Google Scholar] [CrossRef]
  22. Ma, C.; Bao, Z.K.; Zhang, H.F. Improving Link Prediction in Complex Networks by Adaptively Exploiting Multiple Structural Features of Networks. Phys. Lett. A 2017, 381, 3369–3376. [Google Scholar] [CrossRef]
  23. He, Y.-L.; Liu, J.N.; Hu, Y.-X.; Wang, X.-Z. OWA Operator based Link Prediction Ensemble for Social Network. Expert Syst. Appl. 2015, 42, 21–50. [Google Scholar] [CrossRef]
  24. Yu, H.; Wang, S.; Ma, Q. Link Prediction Algorithm based on the Choquet Fuzzy Integral. J. Commun. 2016, 20, 809–824. [Google Scholar] [CrossRef]
  25. Li, X.; Wang, Z.; Zhang, Z. Complex Embedding with Type Constraints for Link Prediction. Entropy 2022, 24, 330. [Google Scholar] [CrossRef] [PubMed]
  26. Lv, H.; Zhang, B.; Hu, S.; Xu, Z. Deep Link-Prediction Based on the Local Structure of Bipartite Networks. Entropy 2022, 24, 610. [Google Scholar] [CrossRef]
  27. Zhu, Y.; Liu, S.; Li, Y.; Li, H. TLP-CCC: Temporal Link Prediction Based on Collective Community and Centrality Feature Fusion. Entropy 2022, 24, 296. [Google Scholar] [CrossRef]
  28. Leicht, E.A.; Holme, P.; Newman, M.E.J. Vertex Similarity in Networks. Phys. Rev. E 2006, 73, 026120. [Google Scholar] [CrossRef]
  29. Chebotarev, P.; Shamis, E. The Matrix-forest Theorem and Measuring Relations in Small Social Groups. arXiv 2006. [Google Scholar] [CrossRef]
  30. Watts, D.J.; Strogatz, S.H. Collective Dynamics of ‘Small-world’. Netw. Nat. 1998, 393, 440–442. [Google Scholar] [CrossRef]
  31. Vickers, M.; Chan, S. Representing Classroom Social Structure; Victoria Institute of Secondary Education: Melbourne, VIC, Australia, 1981. [Google Scholar]
  32. Guimerà, R.; Danon, L.; Díaz-Guilera, A.; Giralt, F.; Arenas, A. Self-similar community structure in a network of human interactions. Phys. Rev. E 2003, 68, 065103. [Google Scholar] [CrossRef]
  33. 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]
  34. Pajek Datasets. Available online: http://vlado.fmf.uni-lj.si/pub/networks/data/ (accessed on 6 May 2016).
  35. Spring, N.; Mahajan, R.; Wetherall, D.; Anderson, T. Measuring ISP Topologies with Rocketfuel. IEEE/ACM Trans. Netw. 2004, 12, 2–16. [Google Scholar] [CrossRef]
  36. Li, L.; Bai, S.; Leng, M.; Wang, L.; Chen, X. Finding Missing Links in Complex Networks: A multiple-attribute Decision-making Method. Complexity 2018, 2018, 3579758. [Google Scholar] [CrossRef]
  37. Huang, X.; Zhang, L.; Wang, B.; Li, F.; Zhang, Z. Feature clustering based support vector machine recursive feature elimination for gene selection. Appl. Intell. 2018, 48, 594–607. [Google Scholar] [CrossRef]
  38. Shan, N.; Li, L.; Zhang, Y.; Bai, S.; Chen, X. Supervised link prediction in multiplex networks. Knowl. Based Syst. 2020, 203, 106168. [Google Scholar] [CrossRef]
Figure 1. Difference in matching scores between the LP index and the PA index.
Figure 1. Difference in matching scores between the LP index and the PA index.
Entropy 24 01124 g001
Figure 2. SELLP model.
Figure 2. SELLP model.
Entropy 24 01124 g002
Figure 3. The CVS of selected features.
Figure 3. The CVS of selected features.
Entropy 24 01124 g003
Figure 4. AUC results of all comparative methods on six networks. The best performance is emphasized in green for each network.
Figure 4. AUC results of all comparative methods on six networks. The best performance is emphasized in green for each network.
Entropy 24 01124 g004
Figure 5. Accuracy results of all comparative methods on six networks. The best performance is emphasized in green for each network.
Figure 5. Accuracy results of all comparative methods on six networks. The best performance is emphasized in green for each network.
Entropy 24 01124 g005
Figure 6. Precision results of all comparative methods on six networks. The best performance is emphasized in green for each network.
Figure 6. Precision results of all comparative methods on six networks. The best performance is emphasized in green for each network.
Entropy 24 01124 g006
Figure 7. F1-score results of all comparative methods on six networks. The best performance is emphasized in green for each network.
Figure 7. F1-score results of all comparative methods on six networks. The best performance is emphasized in green for each network.
Entropy 24 01124 g007
Figure 8. Precision results with different training set sizes.
Figure 8. Precision results with different training set sizes.
Entropy 24 01124 g008
Figure 9. F1-score results with different training set sizes.
Figure 9. F1-score results with different training set sizes.
Entropy 24 01124 g009
Table 1. Basic statistics of six networks. Notation: N is the number of nodes, M is the number of links, C is the clustering coefficient, R is the assortative coefficient, and H is the degree heterogeneity.
Table 1. Basic statistics of six networks. Notation: N is the number of nodes, M is the number of links, C is the clustering coefficient, R is the assortative coefficient, and H is the degree heterogeneity.
NetworksNMCRH
C. elegans29721480.308−0.1631.800
Vicker293760.733−0.1570.982
Email113354510.2540.0781.942
NS158927420.7910.4622.011
SciMet308410,3990.175−0.0332.78
Router502262580.033−0.1385.503
Table 2. AUC results of the base and ensemble models on six networks.
Table 2. AUC results of the base and ensemble models on six networks.
Results Based on the Original Features
MethodsVickerC. elegansNSEmailSciMetRouter
SELLP0.82900.92360.95380.94240.93780.9604
GBDT0.77500.90790.94610.93080.91380.9477
XGBoost0.76040.90850.94570.94600.92680.9531
LR0.73180.86310.93650.92630.89670.9287
Results based on the selected features using RF-RFE
MethodsVickerC. elegansNSEmailSciMetRouter
RF-RFE -SELLP0.91180.95250.99490.97470.97640.9884
RF-RFE-GBDT0.86630.94190.97470.94760.94380.9680
RF-RFE-XGBoost0.80590.92780.97860.95210.95630.9769
RF-RFE-LR0.82630.91210.96270.94970.94320.9581
Table 3. Accuracy results of the base and ensemble models on six networks.
Table 3. Accuracy results of the base and ensemble models on six networks.
Results Based on the Original Features
MethodsVickerC. elegansNSEmailSciMetRouter
SELLP0.82600.92460.95360.95240.94470.9600
GBDT0.76810.90930.92450.94340.92370.9276
XGBoost0.78260.90300.94530.94610.92790.9492
LR0.76810.88130.93530.93610.90190.9248
Results based on the selected features using RF-RFE
MethodsVickerC. elegansNSEmailSciMetRouter
RF-RFE-SELLP0.89850.95340.99450.97470.97640.9884
RF-RFE-GBDT0.84050.93690.97450.96110.95370.9780
RF-RFE-XGBoost0.84050.93550.98540.96060.95720.9768
RF-RFE-LR0.81150.90810.97260.95920.93280.9492
Table 4. Precision results of the base and ensemble models on six networks.
Table 4. Precision results of the base and ensemble models on six networks.
Results Based on the Original Features
MethodsVickerC. elegansNSEmailSciMetRouter
SELLP0.82460.92940.95450.94880.94810.9652
GBDT0.78680.89190.93090.93750.91000.9474
XGBoost0.78220.90970.94550.94190.93100.9523
LR0.77910.86960.93700.92210.90980.9259
Results based on the selected features using RF-RFE
MethodsVickerC. elegansNSEmailSciMetRouter
RF-RFE-SELLP0.87430.96700.99270.97940.98530.9913
RF-RFE-GBDT0.86140.93200.97270.95480.95100.9789
RF-RFE-XGBoost0.83670.94690.98450.95920.95240.9744
RF-RFE-LR0.81890.89340.97810.94810.94280.9576
Table 5. F1-score results of the base and ensemble models on six networks.
Table 5. F1-score results of the base and ensemble models on six networks.
Results based on the original features
MethodsVickerC. elegansNSEmailSciMetRouter
SELLP0.85710.92130.95360.94210.93740.9601
GBDT0.80480.90590.94570.93040.91360.9478
XGBoost0.83140.90660.94550.94570.92650.9533
LR0.82600.85520.93630.92570.89600.9290
Results based on the selected features using RF-RFE
MethodsVickerC. elegansNSEmailSciMetRouter
RF-RFE-SELLP0.91560.95010.99450.97440.97620.9885
RF-RFE-GBDT0.86070.93800.97450.94730.94360.9682
RF-RFE-XGBoost0.88170.92610.97850.95120.95590.9769
RF-RFE-LR0.83950.91090.96240.94860.94290.9584
Table 6. Statistical test for RF-RFE-SELLP vs. AdaBoost, RF, MLP, CN, MFI, and SRW in mean Accuracy on the Email network.
Table 6. Statistical test for RF-RFE-SELLP vs. AdaBoost, RF, MLP, CN, MFI, and SRW in mean Accuracy on the Email network.
AdaBoostRFMLPCNMFISRW
p-value (F-test)0.480.450.110.020.140.19
p-value (t-test)4.95 × 10−53.41 × 10−31.25 × 10−43.14 × 10−74.56 × 10−96.09 × 10−9
Mean Accuracy0.93410.94610.92490.62270.54410.8161
Mean Accuracy of RF-RFE-SELLP0.97480.97480.97480.97480.97480.9748
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wang, T.; Jiao, M.; Wang, X. Link Prediction in Complex Networks Using Recursive Feature Elimination and Stacking Ensemble Learning. Entropy 2022, 24, 1124. https://doi.org/10.3390/e24081124

AMA Style

Wang T, Jiao M, Wang X. Link Prediction in Complex Networks Using Recursive Feature Elimination and Stacking Ensemble Learning. Entropy. 2022; 24(8):1124. https://doi.org/10.3390/e24081124

Chicago/Turabian Style

Wang, Tao, Mengyu Jiao, and Xiaoxia Wang. 2022. "Link Prediction in Complex Networks Using Recursive Feature Elimination and Stacking Ensemble Learning" Entropy 24, no. 8: 1124. https://doi.org/10.3390/e24081124

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop