Deep Belief Network Based Wireless Sensor Network Connectivity Analysis

—Wireless sensor networks (WSNs) are widely used in various ﬁelds, and their deployment is critical to ensure area coverage and full network connectivity to achieve the maximum network lifetime. In this study, we present a mixed-integer programming (MIP) model that deeply investigates deployment parameters to optimize lifetime and analyze network connectivity. We further analyze the obtained results using Deep Belief Network (DBN) and Deep Neural Network (DNN) algorithms to achieve higher accuracy rates. Our evaluation shows that the DBN outperforms the DNN with an accuracy rate of 81.2%, precision of 81.2%, recall of 99.1%, and an F1-Score of 0.78. We also utilize two different datasets to justify the efﬁciency of the DBN in this research. The ﬁndings of this study emphasize the validity of our DBN algorithm and encourage further research into lifetime optimization and connectivity analysis in WSNs.


I. INTRODUCTION
W IRELESS sensor networks (WSNs) are networks of dedicated sensors distributed in space that monitor physical conditions in a given environment, and collect and transmit the data they gather to a central base station. With the increasing use of WSNs, research into the deployment of sensor nodes has become more intense in recent years. The main goals of sensor node deployment are to achieve the best possible network lifetime and the widest possible coverage area at the lowest cost possible. For that reason. in the planning phase of a WSN deployment, the aim is to maximize network lifetime while achieving planned coverage within the designated budget.
Wireless sensor networks (WSNs) rely on a sparse placement of sensor nodes on a large scale to monitor physical conditions and transmit data to a central base station. Ensuring connectivity among these nodes is crucial for accurate data collection. To address this issue, several studies have been conducted in recent years. Sheikh-Hosseini and Hashemi, AYHAN AKBAS is with the Department of Computer Engineering, Engineering Faculty, Abdullah Gul University, Kayseri, Turkey e-mail: (ayhan.akbas@agu.edu.tr) ID https://orcid.org/0000-0002-6425-104X SELİM BUYRUKOGLU is with the Department of Computer Engineering, Engineering Faculty, Cankiri Karatekin University, Cankiri, Turkey email: (sbuyrukoglu@karatekin.edu.tr) ID https://orcid.org/0000-0001-7844-3168 for instance, studied node connectivity and different coverage types in WSN deployments [1]. They proposed a new model that optimizes node placement to cover all targets with the required number of nodes while maximizing lifetime and coverage using genetic algorithms. Another study by Senouci and Mellouk [2] investigated optimal plan strategies for WSN topologies to achieve optimal network connectivity, sensing coverage quality, reliability, and lifetime with minimal cost. They developed a probabilistic-based communication cost model and demonstrated that their deployment approach can meet the needs of real-world fusion-based WSNs with predictable performance. Aitsaadi et al. [3] also addressed the deployment problem of WSNs with the objective of achieving the best network topology with minimal deployment cost while ensuring network connectivity and optimal network lifetime. They proposed a Tabu search metaheuristic and multiobjective deployment algorithm for their solution. Sengupta et al. [4] investigated the optimal trade-offs among coverage, lifetime, energy consumption, and connectivity using a multiobjective evolutionary algorithm-based model that outperforms single-objective node deployment schemes. Sevgi and Kocyigit [5] proposed a novel framework for the optimal deployment of WSNs from the connectivity perspective, particularly for random deployments. Overall, these studies contribute to the understanding and optimization of WSN deployments for connectivity, coverage, reliability, and lifetime, opening avenues for further research in the field [6], [7].
Although several studies have investigated connectivity issues in wireless sensor networks (WSNs), these studies have mostly utilized multilayer perceptron (MLP) and backpropagation (BP) [8] to address the problem. Notably, there is a lack of research that has employed Deep Belief Networks to address WSN connectivity issues. Given the need for enhanced performance and robust classification in WSNs, exploring the potential of DBN becomes imperative. DBN's superiority lies in its efficient utilization of hidden layers, yielding substantial performance gains when compared to Multilayer perceptron models. Furthermore, DBN exhibits specific robustness in classification tasks, effortlessly handling variations in topology, internode distances, transmission power levels and other crucial channel parameters. Therefore, incorporating DBN into the realm of WSN research can significantly contribute to overcoming connectivity challenges and advancing the capabilities of wireless sensor networks.

A. Wsn Model Overview
The WSN is modelled as a square topology ( Fig.1) network consisting of a sink node in the center and sensor nodes around it. Sensor nodes in the network either transfer the data they collect directly to the sink node (single-hop) or relay it over other nodes (multi-hop). The 60-second round time is shared by all nodes in equal time slots, and each node transmits data in its own time slot. In each round, each node transmits its generated packet data in its own time slot. Internode transmission is performed by handshake, and every packet sent is confirmed with an ACK message, confirming that the transmission was successful. In the optimization, the maximum network lifetime is set as the objective in the linear programming. In the design of the model, it is assumed that the nodes are stationary, and all have clock synchronization with the sink node. Furthermore, we assume that the sink node's energy resources are limitless. All topology and route information is provided at the sink node. Furthermore, we assume that the data packets cannot be fragmented or aggregated.

B. Link Layer Model
In this study, the log-normal shadowing model [10] is assumed and a two-way handshaking link layer data transmission model is used, which is the extended version of the study by Akbas et. al. [11]. The MIP Model has been coded in GAMS [9] and MATLAB [12], and verified with real-world data.

C. Linear Programming Model
Each data transfer between nodes can be considered as an energy expenditure. Each bit of data sent is an energy cost that reduces the lifetime of the node. Therefore, calculating the maximum network time for the WSN can be considered as a graph flow problem to be solved. In complex integer programming, we calculate the maximum network lifetime by defining the flow constraints on the network and modelling the flow on the WSN. The constraints we used in the model are: • Balanced flow constraint states that for each node, the sum of the data produced in a node and the data coming from outside the node is equal to the amount of data sent from the node. • The channel bandwidth constraint limits the channel bandwidth required to perform communication operations at each node. • The interference matrix guarantees that the total duration of inbound data streams, outbound data streams, and interference streams is limited by the total network lifetime time. • The non-negative constraint ensures that no data stream can be negative, i.e., all flows have to reach the sink node.
III. PROPOSED APPROACH This section presents the proposed WSN classification approach, including four phases, which are data creation (Fig.3), data cleaning and preprocessing, deep learning models, and evaluation metrics. The proposed model diagram is depicted in Fig.2.

A. Data Creation
Three different datasets were created and used in this study to reveal the efficiency of the deep neural network (DNN) and deep belief networks (DBNs) in the use of variety of datasets. The rest of this section explains the details of three different datasets.
We have created and used 3 sets of data as given in Fig. 3, which are:

B. Deep Learning Models
In this study, Deep Belief Networks (DBNs) and Deep Neural Network (DNN) algorithms were used in this study. The dataset was split into training (80% -941 for train) and testset (20% -236 for test) based on the hold out method for datasets I and II. Also, dataset III has 39375 samples, which were split into training (80% -31500 for training) and testset (20%-7875 for testing). Ten-fold cross-validation was used in the training process of the employed DBNs and DNN while the test set (unseen data) was used to obtain the evaluation performance of the employed models. In other words, nested cross-validation was used in this study. The rest of this section covers the models' background and creation process.

1) Deep Neural Network (DNN):
The structure of artificial neural networks (ANN) consists of input, hidden, and output layers. If the structure of an ANN consists of more than one hidden layer, it is considered a deep neural network (DNN) [13]. The structure of the created DNN is presented in Fig. 4. As it can be seen from Fig. 4, one input, two hidden layers, and one output layer were used in the judgement of WSNs' connectivity. Three nodes for input layers were used, while one node was used in the created DNN. Also, six and three neurons in the hidden layers were used as a result of attempting to use the various numbers of neurons in the hidden layers. Sigmoid was used as an activation function in the deep neural network model. The structure of a deep belief network (DBN) includes a sequence of restricted Boltzmann machines (RBMs), and they are connected sequentially [14]. Understanding RBMs is crucial for a thorough knowledge of DBNs. Thus, the rest of this section explains the RBMs and DBNs, respectively. The structure of an RBM consists of two units, which are the visible and hidden units [15]. Also, these two units are fully connected with both forward and backward connections. In an RBM structure, observable data is represented in one layer of visible units, while the hidden unit is used in terms of capturing dependencies of the visible units. Fig. 5 illustrates the structure of the employed RBMs. In an RBM, the weights related to each neuron are randomly initialized, and then the weights in a layer are updated based on the conditions of the visible and hidden units in the other layer. This is repeated until the system is sampling from its equilibrium distribution.
Deep Belief Networks (DBNs) are made up of multiple RBMs and a classifier [16]. A DBN can be considered a stacked model because it uses more than one RBM in its creation. Fig. 6 depicts the DBN architecture that was used. It   contains three RBMs and a Sigmoid classifier. In the creation of the employed DBN structure, two and four RBMs were used, except for the three RBMs to obtain the optimum number of RBMs. In the end, the best performance was obtained through the use of three RBMs.

C. Scoring Metrics
The following scoring parameters are used in the evaluation of the employed deep belief networks (DBNs) and deep neural networks (DNNs). Formulas for the used scoring parameters are presented below [17]. The definition of TP, FP, TN, and FN is presented in Table I.

A. Evaluation Of The Models
Table II presents the evaluation results of the employed deep neural networks (DNNs) and deep belief networks (DBNs) using Dataset I. Detailed information about the dataset was given in Sec. III-A. As it can be seen from Table II, DBNs provided better performance in terms of accuracy (81.2%), precision (81.2%), recall (100%), F1-score (72.8%), and Jaccard (81.2%). Even if the used DBNs provided better performance in the classification of fully-connectedness state analysis, the differences between the DBNs and DNN in terms of scoring metrics are not large.

B. Evaluation Of The Models With Different Datasets
To reveal the efficiency of the employed DBNs in the prediction of whether a given WSN is fully connected, two different datasets were also created. Detailed information about these two datasets (Dataset II and III) was given in Section III-A.
The efficiency of DBNs is compared with that of DNNs in the prediction of the fully-connectedness of WSN based on datasets II and III. In other words, DBNs have the ability to provide more accurate performance than DNNs. On the other hand, the overall prediction performance of DBNs for dataset III is considerably worse than the prediction performance of DBNs for dataset II. Moreover, the overall performance of DNN for Dataset III is also worse than the prediction performance of DNN for Dataset III.
It should be highlighted that, the number of features in datasets II and III is different. Initially, DNN was created based on Dataset II. Then, the created DNN was also used in the prediction of the connection state of the WSN network. using Dataset III. Due to the different number of features in the dataset, the number of neurons in the hidden layers was arranged to create an optimal DNN structure for Dataset III. As a result, the arranged DNN structure provides better performance than the previous DNN structure created for Database II. Table III shows the scoring performance of the arranged DNN.

C. General Discussion
The computational complexity of NNs rises exponentially with node count. Therefore, this turns into a challenging problem to resolve for constrained WSN devices and new computational methods are required to be employed and implemented. Though there are specialized libraries for use with limited capability and computing platforms [18]. Although there are specialized libraries for use with limited capabilities and computing platforms [18], the training phase of machine learning algorithms constitutes the dominant part of the high computational cost. Once the training is complete, the testing stage is a quick process that generally produces the desired results quickly and at a lower computational cost.
We've used NN models up to 121 nodes, beyond which a reasonable amount of time is not possible. For this reason, relatively small-sized WSNs were chosen. Nevertheless, increasing the number of nodes within the WSN does not endanger the forecast performance of the NN model, as the outcome. Consequently, it's possible to assume that the parameters of the more extensive networks can also be forecasted likewise. New optimization methods might be suggested to be able to analyze larger topologies in future studies. As highlighted in Section I, to the best of the authors' knowledge, there is no research that has investigated the WSN connectivity. Thus, this study revealed that DBNs can be used in the connectivity prediction for a WSN with given parameters.

V. CONCLUSION
A WSN needs to be fully connected so as to collect and transmit the data to the sink node. As a node fails or dies, WSN connectivity may be questioned as to whether it operates properly. In this regard, it is critical to justify a given topology in relation to WSN connectivity.In this sense, the prediction of WSN connectivity plays a key role in determining if WSN is still connected or disconnected. With the motivation that connectivity estimation can be achieved with higher accuracy and precision at a lower computational complexity, we suggested a hybrid solution based on Deep Belief Networks. Algorithms with deep architectures mostly have advantages compared to single-based algorithms in terms of robust results and higher accuracy. Therefore, Deep Belief Networks (DBNs) and Deep Neural Network (DNN) classification algorithms were employed in this study.Three different datasets were used to compare the scoring performance of these algorithms. DBNs provided better scoring values in the classification of WSN connectivity decisions than DNNs (see Table II and III) in the use of these three datasets. The findings reflect the importance of DBN compared to DNN in the classification of WSN lifetimes. As a further study, a hybrid deep neural network can be developed to predict WSN connectivity.