Abstract
Link prediction for opportunistic sensor network has been attracting more and more attention. However, the inherent dynamic nature of opportunistic sensor network makes it a challenging issue to ensure quality of service in opportunistic sensor network. In this article, a novel deep learning framework is proposed to predict links for opportunistic sensor network. The framework stacks the conditional restricted Boltzmann machine which models time series by appending connections from the past time steps. A similarity index based on time parameters is proposed to describe similarities between nodes. Through tuning learning rate layer-adaptively, reconstruction error of restricted Boltzmann machine goes stable rapidly so that the convergence time is shortened. The framework is verified by real data from INFOCOM set and MIT set. The results show that the framework can predict links of opportunistic sensor network effectively.
Keywords
Introduction
Opportunistic sensor network (OSN) 1 is a new network evolved from the ad hoc network, which is a kind of self-organized network where the communication opportunities between nodes are generated by their movements. The data transmission of the OSN is realized by the store-carry-forward routing mechanism. This new networking mode has irreplaceable advantages in the non-fully connected networks which cannot execute the traditional multi-hop ad hoc networks protocol. Due to the easy development and low cost, OSN is widely applied in many fields such as vehicular ad hoc network, mobile date offloading, 2 information sharing, 3 and mobile computing. 4
With the appearance of critical, multimedia, and real-time applications, quality of service (QoS) 5 in OSN is becoming increasingly significant. Due to link failures, node power failures, or different power management mechanisms, the dynamic topology of OSN makes it hard for underlying networks to ensure data transmission with QoS requirements. The key to solve this problem is capturing the change rule of the network topology and optimizing the routing algorithm through prediction methods. In this article, we propose a novel link prediction model of conditional deep belief network (CDBN) which models time series from the past time steps and a time-based similarity index which can describe the dynamic characteristics of OSN. The link prediction method based on deep learning is proposed to extract the features and study the change rule of the OSN topology, which provides significant support in designing routing algorithm and meets QoS requirements in OSN.
Related work
In recent years, as one of the research directions of data mining, link prediction has been widely studied by scholars in social networks and complex networks. Liu and Wu 6 proposed an optimal probabilistic forwarding protocol to predict links. Zhou et al. 7 studied a new similarity measure which is motivated by the resource allocation process on networks. Links can be simply predicted by this context based on prediction methods except some idealized assumptions which are not suitable for real networks. Liben-Nowell and Kleinberg 8 utilized the similarity between nodes to predict links. Although the node attributes and network structure–based prediction method are efficient for static networks, it is not ideal for the dynamic OSN. By comparing several supervised machine learning algorithms, Al Hasan et al. 9 found that the support vector machine (SVM) has a better performance in link prediction. Brouard et al. 10 presented a new method for semi-supervised and transductive link prediction based on Output Kernel Regression, and the method shows that the semi-supervised learning algorithm is shown to be almost identical to the supervised learning algorithm in link prediction problems. The shallow learning algorithm is adopted in machine learning–based link prediction algorithms, which is insufficient in feature extraction for large-scale dynamic OSN.
With the concept of deep learning being put forward, neural network becomes a hot spot in the field of machine learning. 11 Deep learning shows strong ability of learning essential feature of data sets from a few samples by learning a deep nonlinear neural network. 12 In recent years, deep learning has made great achievements in image recognition, 13 speech recognition, 14 natural language processing, 15 information retrieval, and other fields.
In this article, a deep learning based on link prediction model is established at first. Second, a novel similarity index is proposed according to the dynamic characteristics of OSN. Then, we optimize the learning rate of prediction model in order to make it more efficient. Finally, the experimental results show that the proposed link prediction model can predict links in OSN effectively.
Link prediction model of OSN
Restricted Boltzmann machine
Restricted Boltzmann machine (RBM) 16 is a two-layer neural network model, which is composed of a visible layer and a hidden layer. There are several units among each layer, and the visible units represent the evaluation of objects, while the hidden units represent the state of objects. As it is shown in Figure 1, the hidden layer is h, the weight matrix is w, and the visible layer is v. The units are all connected between layers, while there are no units connected in each layer.

Restricted Boltzmann machine.
RBM defines
where
where
In all models based on RBM, the normalized factor Z makes it difficult to solve maximum likelihood value. However, gradient can be evaluated by contrastive divergence algorithm which is proposed by Hinton. 17 This approximate method makes the updating rules of gradient more simple, the parameters of the model are defined as follows
where
Conditional restricted Boltzmann machine
RBM is a model based on the static data, which is not good at dealing with dynamic and time-varying data. Palmqvist et al. 18 proposed two types of directed connections: autoregressive connections from the past N time steps and connections from the past M configurations of the visible units to the current hidden configuration. The connected weights of these directed connections turn the RBM into a conditional restricted Boltzmann machine (CRBM) (Figure 2).The model solves the problem that the traditional RBM cannot model the time series.

Conditional restricted Boltzmann machine.
M and N are adjustable parameters. In order to facilitate the discussion, we assume
The states of the hidden units are determined by the input of the current observation and the input of the past time. Given
Then, the conditional distribution of equations (3) and (4) are updated as
The contrastive divergence algorithm can also be used in CRBM to update the weight and the static biases where they have the same form as equations (5)–(7) but have a different effect because the states of the hidden units are now inuenced by the previous visible units. The gradients are now summed over all time steps
where
While learning a CRBM, there is no need to proceed sequentially through the training data sequences. The updates are only conditional on the past N time steps, not the entire sequence. As long as we isolate “chunks” of
CDBN
Deep belief network (DBN) is a deep learning neural network composed by multi-layer RBM which is proposed by Hinton. 19 In this article, the link prediction adopted in the OSN uses the same method as mentioned above. Figure 3 shows a CDBN which is stacked by several CRBMs.

Conditional deep belief network.
The steps to predict links in OSN with CDBN can be summarized as follows: first, multi-layer CRBM is used to extract intrinsic characteristics from the dynamic network according to the meeting records among the snapshots. After training the link prediction model, we connect a softmax classifier to the topmost hidden layer of the CDBN in order to verify the accuracy of the prediction model by test data set. However, there are two problems need to be taken into account:
OSN is a dynamic network with frequent changes over time, so the link prediction indexes which applied to social network are not suitable for OSN. So, we need to establish the indexes to describe the dynamic characteristics of OSN.
The learning rate is a hot spot in the research of CDBN. If the learning rate is too small, the training time will be too long. On the contrary, it would lead to the instability of the prediction model.
Link prediction index based on time parameter
In social network, Zhou et al. 7 proposed the Local Path (LP) similarity index to predict links. The index takes third-order path into account which is defined as
where
All the communication nodes must be considered in OSN but the LP index ignores the one-order path parameter, so the one-order path is added into LP index and it can be defined as
In OSN, we assume that there is a node pair (
f: frequency of contact with the target node.
With the analysis above, the time parameter TP can be defined as
It is assumed that the start time of time period T is
The weight matrix of time parameter
By substituting the adjacency matrix of the network with the time parameter matrix, the similarity index of link prediction can be described from structure and time-varying property.
Layer-adaptive learning rate
The selection of learning rate is very important in the process of CRBM training. It tends to empirically choose a smaller learning rate to ensure the stability of the system. In this article, the relation between the gradient of the single layer and the learning rate is taken into account. The gradient of the current layer and the value of the global learning rate determine the value of the current layer learning rate in the same layer. The learning rate
where
Experiments and analysis
Experimental data
This section will adopt INFOCOM05 and MIT to carry on the simulation experiment and verify the effectiveness of the CDBN model.
The reference information of the two experimental data sets is shown in Table 1 (in CRAWDAD, 20 there are more details about INFOCOM05 and MIT data sets).
Experimental data.
Experimental results and analysis
First, in this section, the tradition link prediction index and the LP similarity index based on the time are compared to validate the effectiveness of the similarity index. Then, the CDBN model is constructed to compare with the results of the link prediction with two data sets. The influence of the single-layer adaptive learning rate and the sample dimension on the prediction with the proposed CDBN is analyzed in the final.
In the experiment, the similarity index which proposed by equation (20) is compared with Common Neighbors (CN) index, 21 Adamic-Adar (AA) index, 22 LP index, 7 and the Katz index; 23 the area under the ROC curve (AUC) values of each index are shown in Table 2.
AUC of similarity indexes.
AUC: area under the curve; CN: Common Neighbors; AA: Adamic-Adar; LP: Local Path.
From Table 2, it can be drawn that the time parameter based local path (TLP) similarity index which proposed by equation (20) is more suitable for the prediction of the OSN with dynamic changes than the similarity index which is based on the structure of network.
In the first experiment, the dimension of the training sample in CDBN is set from 50 to 200 (the step length is 25). There are three hidden layer nodes and the number of the neurons in CRBM is 200, 150, and 100.The number of the historical time series is
In Figure 4, we choose 20 pairs of nodes in MIT data set and INFOCOM data set respectively and the average Accuracy of each node is obtained. Compared with Table 2, it can be obtained from the results that the CDBN can improve the prediction accuracy further on the basis of TLP index.

CDBN prediction result.
From Figure 5, when the initial learning rate is 0.01, after 20 iterations of the CRBM, the error of RBM reconstruction under the adaptive learning rate of single layer reaches a relatively stable state. But under the fixed learning rate, the number of iterations of CRBM is nearly 40. Therefore, the adaptive learning rate of the single layer can improve the rate of convergence of CRBM networks when it compares with fixed learning rate. It can also improve the computational efficiency of CDBN.

Reconstruction error of different learning rates.
In the experiment, in order to find the most suitable sample dimension of CDBN, the average accuracy of CDBN in different dimensions of the sample is obtained through calculating the 20 pairs of nodes under two data sets.
From Figure 6, when the sample dimensions are 75 or 100, CDBN will own a better average accuracy under the MIT data set and the INFOCOM data set.

Sample dimension comparison.
In this experiment, we set the sample dimension to 75 for INFOCOM data set and 100 for MIT data set. The parameters of CDBN are the same as the first experiment. With the optimal parameters, we calculate the average AUC of 20 pairs of nodes in INFOCOM data set and MIT data set, respectively.
From Table 3, it can be seen that the average AUCs of CDBN with different similarity indexes are significantly improved when compared with the static similarity indexes in Table 2.
AUC of CDBN with different similarity indexes.
AUC: area under the curve; CN: Common Neighbors; AA: Adamic-Adar; LP: Local Path; CDBN: conditional deep belief network.
Conclusion
In this article, a CDBN model based on the deep learning is proposed to achieve the link prediction of OSNs. By combining the CDBN with proposed similarity index, the change law of OSN can be captured accurately while improving the QoS in OSN.
The experimental results show that the links in OSN can be predicted better with the help of our time-based similarity index and the prediction model of CDBN.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported in part by grants from the National Natural Science Foundation of China (nos 61262020, 61363015, 61501218, and 61501217).
