PU-DetNet: Deep Unfolding Aided Smart Sensing Framework for Cognitive Radio

Spectrum sensing in cognitive radio (CR) paradigm can be broadly categorized as analytical-based and data-driven approaches. The former is sensitive to model inaccuracies in evolving network environment, while the latter (machine learning (ML)/deep learning (DL) based approach) suffers from high computational cost. For devices with low computational abilities, such approaches could be rendered less useful. In this context, we propose a deep unfolding architecture namely the Primary User-Detection Network (PU-DetNet) that harvests the strength of both: analytical and data-driven approaches. In particular, a technique is described that reduces computation in terms of inference time and the number of floating point operations (FLOPs). It involves binding the loss function such that each layer of the proposed architecture possesses its own loss function whose aggregate is optimized during training. Compared to the state-of-the-art, experimental results demonstrate that at SNR $= -10$ dB, the probability of detection is significantly improved as compared to the long short term memory (LSTM) scheme (between 39% and 56%), convolutional neural network (CNN) scheme (between 45% and 84%), and artificial neural network (ANN) scheme (between 53% and 128%) over empirical, 5G new radio, DeepSig, satellite communications, and radar datasets. The accuracy of proposed scheme also outperforms other existing schemes in terms of the F1-score. Additionally, inference time reduces by 91.69%, 90.90%, and 93.15%, while FLOPs reduces by 62.50%, 56.25%, 64.70% w.r.t. LSTM, CNN and ANN schemes, respectively. Moreover, the proposed scheme also shows improvement in throughput by 56.39%, 51.23%, and 69.52% as compared to LSTM, CNN and ANN schemes respectively, at SNR $= -6$ dB.

generally trained, tested and deployed on an environment 92 powered by a computationally equipped graphics processing 93 unit (GPU). The time taken to produce outputs completely 94 depends upon the specifications and robustness of the hard-95 ware. This implies that devices with lesser efficiency and 96 capacity are bound to face difficulties in deploying ML/DL 97 frameworks effectively. Especially for network architectures 98 where it is envisaged that there would be massive devices 99 with low computational abilities, for instance machine-type 100 communications, low cost sensors, and edge devices (also 101 included in the 3rd generation partnership project (3GPP) 102 release-14 and to its subsequent versions [32]), the implemen-103 tation and usage of a conventional ML/DL framework could 104 be rendered less useful [33]. 105 To overcome the aforementioned shortcomings of both: the 106 analytical and data-driven approaches, the concept of deep 107 unfolding was introduced in [34] which aims at simultane-108 ously harvesting the strength of both the approaches. Given 109 an analytical-based approach, one unfolds the iterations of 110 a derived algorithm into a layer-wise structure analogous to 111 an ML/DL architecture such that each iteration is consid-112 ered a layer and an algorithm is called a network [35]. This 113 approach combines the expressive power of a conventional 114 deep network with the explainability of an analytical-based 115 approach [36], [37]. There have been few recent works in the 116 literature which have utilized deep unfolding techniques. For 117 instance, the work in [38] proposed to compute the bit error 118 rate for MIMO systems using alternating direction method 119 of multipliers (ADMM) unfolding, while [33] attempted 120 via iterative algorithm induced deep unfolding. Moreover, 121 MIMO detection using deep unfolding technique was studied 122 in [39]. The work in [40] focused on the deep unfolding 123 for compressive sensing. A comprehensive survey of deep 124 unfolding for wireless communications can be found in [41]. 125 As far as spectrum sensing is concerned, the detection 126 performance needs to be accurate as well as computationally 127 efficient. Inspired by the fact that the future wireless networks 128 is envisaged to have massive machine-type communications, 129 as included in 3GPP release-14 and its subsequent versions; 130 the aforementioned shortcomings of the data-driven approach 131 would further add challenges in sensing for devices with low 132 computational abilities. In this context, the key objective of 133 this work is to design a deep unfolding aided smart sensing 134 framework, which to the best of the authors' knowledge is 135 yet to be reported in the literature. A deep unfolding scheme 136 alongside the architectural innovations presented performs 137 spectrum sensing in a computationally inexpensive manner 138 while also yielding promising results, especially in the low 139 SNR regime. The key contributions of this work can be summarized as: 142 • Firstly, we propose a novel architecture namely the pri-143 mary user detection network (PU-DetNet), where the 144 approach is to iteratively reduce the error between esti-145 mation (classification) and ground truth by unfolding 146 Section VI concludes this work.

191
The i th data sample is denoted as (·) i and the truth label  The binary hypothesis can be written as:  Fig. 1 shows the generic deep unfolding framework and 212 the paper flow. Given an analytical-based approach, one 213 unfolds the iterations of a derived algorithm into a layer-wise 214 structure analogous to an ML/DL architecture such that each 215 iteration of an algorithm is computed by a different layer 216 in the unfolded architecture [35]. To form such a model, 217 an iterative algorithm is derived and trainable parameters are 218 identified which form the basis of the learning architecture. 219 Instead of optimizing a generic neural network, we untie 220 the trainable parameters of the model across layers to create 221 a more flexible network. The resulting architecture can be 222 trained discriminatively to obtain accurate inference within 223 a fixed network size. This approach combines the expressive 224 power of a conventional DL method with the explainability 225 of an analytical-based approach.

227
The variables used in this paper are listed in Table 1. The 228 objective is to derive an expression that aims at iteratively 229 VOLUME 10, 2022 reducing the error of estimation. 1 The error is estimated and 230 reduced in an iterative manner. Mathematically, it can be 231 expressed as:

233
where y k is the estimation in the k th iteration, y k−1 is the 234 estimation in the (k − 1) th iteration with respect to the whole 235 signal dataset, δ k is a tunable scaling parameter, e k is the 236 error observed in the k th iteration, and [·] is a non linear 237 projection operator. To define the error e k in (2), we first 238 define the error for a single data sample: where e ik is the error of k th iteration on i th data sample, y t i is 241 the i th true label, x i is i th the data sample and θ T k represents 242 the trainable parameters during the k th iteration. For the entire 243 dataset, the vectorized form can be expressed as:

245
where e k , y t are the vector forms of their respective variables 246 and X represents the entire dataset. However, the estimated 247 error e k is imperfect as its value depends upon the size of the 248 dataset. Hence, the error is further normalized as:

250
where n is the number of total samples in the dataset. On sub-251 stituting (5) in (2), we obtain:  given as: . 280 When such k iterations are unfolded, a DL architecture 281 with k layers analogous to conventional deep network is 282 formed, along with the explainability of an analytical based 283 approach. Moreover, every layer has a unique set of trainable 284 weights and biases. Fig. 3 describes the structural relation-285 ship between the input nodes, the hidden nodes, and the 286 output nodes of a single layer of PU-DetNet. In particular, 287 Fig. 3(a) describes the process of obtaining the propagation 288 vector v k of a given layer, while Fig. 3(b) describes how a 289 layer computes y k . As seen in both figures, the input sequence 290 of nodes receives as its input the spectrum dataset (x), the 291 predicted output provided by the previous layer (y k−1 ), and 292 the propagation vector of the previous layer (v k−1 ). The archi-293 tecture uses a sequence of hidden nodes z k with parameters 294 W 1k , b 1k to expand upon the knowledge provided by the input 295 nodes. Furthermore, the propagation vector v k is obtained 296 that passes on the inference obtained from layer k to layer 297 k + 1. After obtaining v k , the architecture obtains the layer's 298 estimated output y k . From Fig. 2 and Fig. 3, it can be noted 299 that the intermediate outputs of each layer v k and y k are 300 obtained via different sets of weights and biases: (W 2k , b 2k ) 301 and (W 3k , b 3k ), respectively. The output y k of the k th layer is 302 also used to calculate the loss value of layer k which further 303 contributes to the aggregate loss function as described in the 304 following subsection.
where y t n is the ground truth of n th data sample and P(y n ) k is 316 the probability of y n being true, i.e., the estimated output of 317 the k th layer of architecture.

318
During the training part, learning architectures calculate 319 the loss function of a specific portion of the dataset at once.

320
In case of batch gradient descent, the architecture calculates 321 the loss value for the entire dataset as follows: Unlike neural networks where the loss function is calculated 325 using the output of just the final layer, PU-DetNet is designed 326 such that it accounts for the loss of every single layer during 327 the training process. Therefore, we use the following loss 328 function which combines the losses of all layers as follows: 329 The proposed PU-DetNet architecture aims to learn the 332 underlying structure of the PU detection problem in 333 VOLUME 10, 2022 for i ← 1 to data_size do 5: X Energies ← Append(Energy(X Noisy , i, data_size)) 6: labels ← Append (1) 7: X Energies ← Append(Energy(AWGN, i, data_size)) 8: labels ← Append(0) 9: end for 10: end for 11: return X Energies , labels a computationally efficient manner, without compromising 334 the accuracy. Hence, the architecture is designed to be deep 335 in layers, such that it can capture the complicated patterns 336 of a highly noisy dataset, i.e., even at low SNR regimes. One conventional design of the loss function is described in (14). 350 The effect of binding the loss function of each layer is that 351 the every layer is constrained to be optimized and be equally   We divide the processed data into train (X train , y train ) and 379 test (X test , y test ) datasets. The parameters of the architecture 380 are randomly initialized and updated iteratively. The detailed 381 process of training the PU-DetNet architecture is described 382 in Algorithm 2. The function EstimateOutput() is based on 383 equations (7) -(11), while the function CalculateBinded-384 Loss() is based on (14). The function UpdateParameters() 385 is an optimization function and in the case of PU-DetNet, 386 it is chosen to be Adam Optimizer [44] due to its lower 387 computational cost and lower dependence on hyperparameter 388 tuning. 389 2) TESTING PHASE 390 The optimal parameters obtained after the process of training 391 the model collectively represent the final architecture which 392 is ready to be tested. While testing, the number of correct 393 and incorrect estimations (classifications) are recorded and 394 the performance metrics probability of detection (P d ) and 395 probability of false alarm (P f ) are calculated. The detailed 396 process of testing the PU-DetNet architecture is described 397 in Algorithm 3.

398
To evaluate the ability of the proposed PU-DetNet archi-399 tecture to detect the PU signal correctly, we compute the 400 performance metrics P d and P f as:      Table 3. 425 This dataset contains more than 1,000,000 samples per band. 426 The detection of 5G signals is relevant in spectrum sharing 428 scenarios such as those enabled by the 5G NR -unlicensed 429 technology, where the presence of 5G NR waveforms in 430 unlicensed bands needs to be detected. We used MATLAB 431 5G toolbox in generating 5G waveforms which are compliant 432 with 3GPP Release 15 [46]. Test models from the waveform 433 generator were used to obtain signal data from four different 434 configurations, each having a different set of parameters as 435 shown in Table 4. This dataset contains 153,600 samples for 436 each configuration. The publicly available DeepSig dataset [47] (RADIOML 439 2016.10A) contains signal data consisting of 11 modulations 440 (8 digital, 3 analog). This dataset was first released at the 441 6th annual GNU radio conference and is useful in the con-442 text of this work to assess the performance of the proposed 443 PU-DetNet scheme with commonly used signal modulations. 444 While typically used for modulation classification, we utilize 445 VOLUME 10, 2022 To obtain the dataset, an end-to-end DVB-S2 simulation with 464 RF impairments and corrections was used. The parameters 465 of the configuration are described in Table 5. This dataset 466 contains 800,000 samples.

483
In this section, we describe the experiments comparing the

A. MODEL EVALUATION
In learning architectures, performance is often evaluated  Table 7. 523 Table 7 shows the value of P d obtained from a model where   layers i.e., in the last layers. As the number of training layers 544 decrease, the overfitting decreases and the optimum shifts 545 towards higher number of testing layers. The training layers 546 that form a backward feedback system with the aid of loss 547 binding are not observed to be necessary in making a decision 548 regarding the presence of PU. Thus, the layers succeeding 549 the layer that was used while testing were discarded and a 550 computationally efficient system was formed. 551 Fig. 6 shows the plot of accuracy v/s epochs for the 552 PU-DetNet architecture in classifying correctly over the train 553 and test data. An observation from this figure can be made 554 that the accuracies remain at 50% till around 350 epochs. 555 It can be inferred that the model does not learn much about 556 the underlying structure of the data and hence displays a 557 random behaviour on these binary labelled data. However, 558 after around 350 epochs the accuracies spike and the model 559 starts learning the underlying structure of the dataset as the 560 training accuracy immediately rises up to 85% and the test 561 accuracy rises up to 65%. With increasing epochs, the gap 562 VOLUME 10, 2022   between train and test accuracy slowly decreases as they con-  followed by the fully connected (FC) layer. The number of 578 Kernels (n ker ) considered was 3 with shape (s ker ) of each 579 kernel as 4 (can also be viewed as 4 × 1 due to 1D CNN). For 580 fair evaluation and comparison, all the schemes were trained, 581 tested on same datasets (for various radio technologies as 582 discussed in Section-IV). Hyperparameters were tuned to 583 ensure optimum results as summarized in Table 8. 584 Fig. 8 shows the comparison of P d on the empirical testbed 585 dataset. An average gain of 42.04%, 57.42% and 78.03% 586 is observed at −10dB with respect to LSTM, CNN and 587 ANN schemes respectively on this dataset. Fig. 9 shows the 588 comparison with respect to the 5G simulated dataset and an 589 average gain of 47.43%, 63.74% and 86.11% is observed 590 at −10 dB with respect to LSTM, CNN and ANN schemes 591 respectively. Fig. 10 validates the PU-DetNet scheme on the 592 DeepSig dataset and an average gain of 56.03%, 84.66% and 593  128.32% is observed at -10 dB with respect to LSTM, CNN 594 and ANN schemes respectively. Fig. 11 shows the compari-   Table 9 shows the comparison of precision, recall and 616 F1 score [51] observed for the proposed scheme and the  benchmark schemes for data comprising of samples with 618 SNR = −5 dB. Values marked in boldface represent the opti-619 mal value for each set of comparison. In terms of precision 620 and recall, the proposed PU-DetNet scheme provides the best 621 accuracy in most cases; in those cases where it does not, the 622 achieved accuracy is very similar to the highest attained value. 623 F1 score is commonly used to evaluate the accuracy of an 624 algorithm and can be interpreted as a weighted average of 625 the precision and recall. It can be appreciated from the table 626 that the proposed PU-DetNet scheme outperforms the other 627 state-of-the-art sensing schemes in terms of F1 score, thus 628 highlighting its ability to provide more accurate results.

630
In addition to the detection performance, we perform the 631 computational analysis of the proposed PU-DetNet scheme 632 and the baseline models. The number of FLOPs is one of 633 the measure of computation that describes the total number 634 of instructions a processor has to execute to perform the 635 specific operation. FLOPs calculation can be done by ana-636 lyzing the structure of a model and the final value depends 637 on the hyperparameters of the model. Table 10 analyzes the 638  TABLE 9. Precision, Recall and F1 score comparison of the proposed PU-DetNet scheme with the baseline models on considered datasets for SNR = −5 dB.   Table 10.