A Secrecy Transmission Protocol with Energy Harvesting for Federated Learning

In federated learning (FL), model parameters of deep learning are communicated between clients and the central server. To better train deep learning models, the spectrum resource and transmission security need to be guaranteed. Toward this end, we propose a secrecy transmission protocol based on energy harvesting and jammer selection for FL, in which the secondary transmitters can harvest energy from the primary source. Specifically, a secondary transmitter STi is first selected, which can offer the best transmission performance for the secondary users to access the primary frequency spectrum. Then, another secondary transmitter STn, which has the best channel for eavesdropping, is also chosen as a friendly jammer to provide secrecy service. Furthermore, we use outage probability (OP) and intercept probability (IP) as metrics to evaluate performance. Meanwhile, we also derive closed-form expressions of OP and IP of primary users and OP of secondary users for the proposed protocol, respectively. We also conduct a theoretical analysis of the optimal secondary transmission selection (OSTS) protocol. Finally, the performance of the proposed protocol is validated through numerical experiments. The results show that the secrecy performance of the proposed protocol is better than the OSTS and OCJS, respectively.


Introduction
In modern artificial intelligence, federated learning (FL) [1] is one of the most dominant collaborative training paradigms. Compared to traditional and centralized training methods, FL can mitigate the privacy leakage risk of data since the model parameters of clients are only transmitted to a central server in the training process. Most of the modern information and communication technologies [2] can satisfy the transmission of model parameters in the fifth generation (5G) networks [3]. Nevertheless, spectrum resource is essential for the transmission of model parameters in FL. Meanwhile, most of the spectrum resources are assigned by the government. Therefore, the spectrum resource is scarce for transmitting large amounts of information. For this reason, cognitive radio (CR) [4] is a promising technique to raise spectrum efficiency [5]. By integrating the advantages of Internet of Things (IoT) and CR, Cognitive Internet of Things (CIoT) becomes a prevalent network pattern. In CIoT, secondary users (SUs) can transmit information opportunistically without affecting legitimate users [6]. Moreover, resource utilization can be improved through intelligent cooperation [7].
However, active transmissions between clients and the central server in the framework of FL are vulnerable to eavesdropping by illegal users due to the essential nature of broadcast communication and dynamic spectrum access in CIoT. Thereby, how to ensure the transmission security and resist malicious intrusion [8] is a crucial problem in FL. To mitigate this problem, the physical-layer security (PLS) technology is an important Table 1. Summary of some related works.

Methods
Major Domain Metrics Technique Main Contributions [15] PLS perfect secrecy capacity algebraic Riccati equation The perfect secrecy capacity of multi antenna MIMO channel is calculated.
[21] PLS secrecy outage probability friendly jammer, AN Legitimate users achieved better secrecy performance.
[32] PLS, CR throughput CSS According to the appropriate K value, an optimal CSS strategy is developed to maximize throughput. [33] PLS, EH, CR secrecy outage probability (SOP) relay, jammer It deduced the exact and asymptotic expressions of SOP. [34] PLS, EH, CR OP, IP SRT The results revealed that there is a constraint relationship between reliability and safety.  The mainly contributions of this paper are summarized as follows: • We propose a secrecy transmission protocol based on Energy Harvesting (EH) and jammer selection to improve the PLS of PUs for FL, where the AN is transmitted by a cooperative jammer to obstruct eavesdroppers. Moreover, the influence of the basic power of the secondary transmitter on EH and the primary users is considered. In addition, the secondary outage performance is enhanced due to cooperation compensation and multi-user diversity gain. • A dual secondary transmitter selection scheme is proposed to determine the secondary signal transmitter and friendly jammer. The ST that can offer the smallest OP is selected to transmit model parameters. Thus, the secondary transmission performance is enhanced by the ST selection. Another ST that can provide the smallest intercept probability (IP) is selected to transmit AN. Therefore, the primary security performance is enhanced by the friendly jammer selection. • To compare the proposed protocol with optimal secondary transmission selection (OSTS) protocol, we derived the closed-form expressions of OP and IP of PUs and OP of SUs over Rayleigh fading channel for the above two protocols, respectively. • The simulation results show that our protocol achieves better security performance than the OSTS and Optimal Cooperative Jammer Selection (OCJS) methods. Moreover, the secondary outage probabilities of the proposed scheme are lower than the OSTS and OCJS in high primary SNR, respectively. Furthermore, we improve the confidentiality of PUs and explore the influence of different parameters on the security performance.
The remainder of the paper is summarized as follows. An Energy-Harvesting Cognitive underlay system model and OSTS model is presented in Section 2. Section 3 presents OP and IP analysis for the cooperation transmission protocol. The OP and IP are analyzed for the OSTS model in Section 4. The numerical results of the performance comparison between the two methods are shown in Section 5. Finally, Section 6 contains the summary. Notations: and |h PB | 2 mean the channel coefficients from PS→PD, PS→E, PS→ST n , ST n →E, ST i →E, PS→ST i , ST i →PD, ST i →SB, and PS→SB, respectively. All channels in this paper are considered to experience quasi-static Rayleigh fading, and the channel gain coefficient |h ν | 2 is regarded as an independently exponentially distributed random variable with a mean of σ 2 v . Namely, the Probability Density Function (PDF) of |h ν | 2 is expressed as follows: where ν ∈ {PE, PS n , S n E, S i E, PS i , S i D, S i , PB}. R P and R S mean the minimum data rates of PUs and SUs, respectively. P P and P S i represent the transmit powers of PS and ST i , respectively. We assume that the received noises of all receivers are zero-mean Additive White Gaussian Noises (AWGNs) with a variance of N 0 . Pr{X} and E[X] mean the probability and expected value of an event X.

The Energy-Harvesting Cognitive Underlay System Model
We consider an Energy-Harvesting Cognitive underlay system model, which is comprised of a primary pair (PS-PD), an eavesdropper (E), a secondary base station (SB) and K secondary transmitters (ST i , where i ∈ O = {1, 2, . . . , K}). The model is shown in Figure 2. In this model, secondary users can simultaneously access the licensed band with the primary system as along as the QoS of primary user is able to guarantee. Because of the battery-limited nature of ST i , the EH technology is utilized to extend the network lifetime. The eavesdropper is very interested in the primary information. Thus, it tries to overhear and tap the active transmissions of the PS all the time. Moreover, the model can be applied to device-to-device (D2D) communication scenarios, and D2D users equipped with energy harvesters can play as the friendly jammers.
In the proposed protocol, one secondary transmitter denoted by ST i , which can provide the best secondary outage performance, is selected to deliver secondary signals. Another secondary transmitter denoted by ST n , which can provided the best primary intercept performance, is selected to transmit AN, where i, n ∈ O and i = n. The AN is produced by pseudo-random sequences known to PD and SB but unknown to E. Thus, AN makes no difference to PD and SB but causes serious influence to E. The signal transmission power at ST i is determined by the combination of the harvesting energy, initial energy, and interference threshold. For the selfishness of ST, however, the signal transmission power at ST n is just determined by the harvesting energy. The detailed transmission mechanism and secondary transmitter selection scheme are introduced in the next subsection.

Information Transmission
In this paper, the message transmission mechanism of the primary system is the same as that in traditional underlay cognitive networks, i.e., the primary data are continuously transmitted over the entire time slot. Moreover, the time slot receiver protocol for EH and information transmission at ST i is employed, which is also used in [36]. Specifically, the total communication time slot consists of two segments: ST i collects energy from PS in the front segment denoted as µT and transmits secondary information or artificial noise in the back segment denoted as (1 − µ)T, where 0 ≤ µ ≤ 1 represents the slot split ratio and T represents the total length of each time slot. According to [37], the gathering energy at ST i in the front segment slot can be presented as follows: where 0 ≤ η ≤ 1 means the energy transfer efficiency. Meanwhile, a collection of working secondary transmitters that meet the interference threshold is expressed as Q [38]. When Q = ∅, only PS transmits the signals; the secondary transmission is interrupted. Thus, the received signals at PD and E are expressed as in (3) and (4), respectively. The instantaneous capacities of the PS→PD link and the PS→E link are expressed as in (5) and (6), respectively.
It assumes that the initial energy owned by ST i can be expressed as E 0 = P 0 T, where P 0 is the basic transmission power. On the one hand, the transmitted power at ST i in the (1 − µ)T segment slot depends on the combination of the harvesting energy and initial energy. On the other hand, the interference to PD caused by ST i must be lower than the maximum tolerable interference level that is denoted by I in the underlay cognitive model. Thus, the transmitted power at ST i in the (1 − µ)T segment slot can be expressed as When Q = ∅, PS transmits the primary signals. Meanwhile, in the back segment slot, secondary signals are transmitted by ST i to SB and an artificial noise is delivered by ST n . Therefore, the received signals at PD, SB, and E are expressed as where P S n is the transmitted power at ST n . Because the energy at ST n is limited and the AN makes no difference to PD, P S n can be set to indicate the AN, the PUs' message symbol, and the SUs' message symbol, respectively. Moreover, n P (t), n S (t), and n E (t) indicate noises at PD, SB, and E, respectively. Moreover, According to the above conditions, the instantaneous capacities of the PS→PD link, the ST i →SB link, and the PS→E link transmission can be obtained by (11)-(13), respectively.
During the back segment slot, the optimal secondary signal transmitter ST i * and the optimal friendly jammer ST n * are selected due to the multi-user scheduling scheme. For optimal secondary reliable transmission performance, the optimal secondary signal transmitter ST i * can be selected via the ST i →SB link, i.e., Because the dual secondary transmitter selection is used, the optimal secondary signal transmitter cannot be played as the optimal friendly jammer, then i, n ∈ O and i = n. For optimal primary security performance, the optimal friendly jammer ST n * can be selected via the ST n →E link, i.e., n * = arg max n * ∈O,n * =i * |h S n E | 2 .

The Optimal Secondary Transmission Selection Model
For comparison, we take the OSTS cognitive underlay model in [38] as the benchmark and further consider the battery-limited condition. The OSTS model consists of a primary pair (PS-PD), an eavesdropper (E), a secondary base station (SB) and K secondary trans-mitters (ST i , i = 1, . . . , K). The protocol also utilizes the friendly jamming technology to transmit AN and secondary signals by selecting an ST. There, the interference threshold for SUs is relaxed. Specifically, to linearly combine the AN with the secondary signal, the transmission power of ST i is divided into ξ and 1 − ξ, where 0 ≤ ξ ≤ 1 means the power distribution factor. Then, the combined signal can be expressed as . Furthermore, the energy-harvesting technology is not considered in the model, while security-reliability trade-off can be employed according to [34]. Since the interference caused by ST i must be lower than a threshold settled by the primary system in cognitive underlay models, the transmitted power at ST i is limited to P 0 for the battery-limited condition; then, the transmitted power at ST i can be expressed as When only PS transmits the signals, the STs do not work (namely, Q OSTS = ∅). The signals at PD and E are like (3) and (4), respectively. The instantaneous capacities of the PS→PD link and the PS→E link transmission can be expressed as in (17) and (18), respectively.
When Q OSTS = ∅, the secondary signal and primary signal coexist in the licensed spectrum in the OSTS model. The received signals at PD, SB, and E are expressed as (19)-(21), respectively.
Thus, the instantaneous capacities of the PS→PD link, the ST i →SB link, and the PS→E link transmission can be written as (22)-(24), respectively.
As is well known, multi-user diversity technology can effectively improve the performance of communication systems. Similar to [36], a security-reliability trade-off can be used to enhance the security performance of the OSTS model. Furthermore, the selection criteria for ST i * , which may share PUs' spectrum for transmitting secondary signals, can be shown as

The OP and IP Analysis for the Cooperation Transmission and Energy-Harvesting Protocol
As described in [39,40], OP and IP are two vital parameters to judge the reliability and secrecy of information transmission in communication. Therefore, we analyze these two parameters in detail.

The Primary OP Analysis
As described in [38], when Q = ∅, we denote Q = Q l . In that case, both PS and ST i transmit signals, where ST i ∈ Q l and l=1, 2, . . . , 2 K − 1. The amount of elements in the col- Ψ P is defined as the transmission outage event of a primary system. We know that the event Ψ P is considered to happen when C P2 < R P . The OP of PUs can be given by After that, Pr{Q = ∅} can be shown as where C P2 is given by (11). According to the results given by (A1)-(A3) in Appendix A, the final expression of Pr{Q = ∅} is Moreover, Pr{Ψ P |Q = ∅} and Pr{Q = Q l } can be calculated by (29) and (30), respectively.
According to the definition of the collection Q l , we can know that Pr{Ψ P |Q = Q l } = 0. Thus, the OP of PUs is derived by substituting (28)- (30) and substituting Pr{Ψ P |Q = Q l }=0 into (26). Here, Ch 1 and Ch 2 are calculated by (A2) and (A3), respectively.

The Secondary OP Analysis Based on Optimal Selection Strategy
As described in [38], Ψ S is defined as the transmission outage event of a secondary system. The event Ψ S is indicated to happen when C S i < R P . In addition, the event Ψ S will happen when all STs do not work, i.e., Q = ∅ or the QoS of secondary users is not satisfied (Q = ∅). In the proposed protocol based on an optimal selection strategy, an optimal ST i is selected to transmit the secondary information, which can provide the best secondary transmission performance. The secondary outage probability of the proposed protocol based on optimal selection strategy can be written as Furthermore, Pr{Ψ S |Q = Q l } can be calculated as According to the results given by (A4)-(A6) in Appendix A, the final expression of We know that Pr{Ψ S |Q = ∅} = 1. The OP of SUs in our protocol based on the optimal selection strategy for ST i * can be obtained by substituting (28)- (33), and Pr{Ψ S |Q = ∅} = 1 into (31). Here, Ch 1-Ch 4 are calculated by (A2)-(A6), respectively.

The Primary IP Analysis Based on Optimal Selection Strategy
According to [38], Ψ int denotes the transmission intercept event of PUs. Furthermore, Ψ int is implied to occur when R P < C E2 . When Q = ∅, the event Ψ int may happen. Since i, n ∈ O and i = n, the number of secondary transmitters selected at this condition is K − 1. Let M = K − 1, where Q l ∪ Q l ={ST 1 , ST 2 , . . . , ST M }. Hence, the primary intercept probability of the proposed protocol based on the optimal selection strategy can be written as Next, Pr{Ψ int |Q = ∅} can be shown as As described in (15), ST n * , which has the best channel state conditions to E, is selected to transmit artificial noises to interfere with eavesdropping. Thus, Pr{Ψ int |Q = Q l } can be derived as To sum up, the IP of PUs based on the optimal selection strategy for ST n * can be obtained by substituting (28)

The OP and IP Analysis for the Battery-Limited OSTS Protocol
In the battery-limited OSTS protocol, the security-reliability trade-off is presented to enhance the primary security performance. Specifically, ST i * , which has the best channel state conditions to SB, is selected for transmitting secondary data. Similar to the probability analysis of the proposed protocol, the OP of PUs and SUs, the IP of PUs are calculated by (37)-(39), respectively.
Pr Ψ P |Q OSTS = ∅ = Pr log 2 Pr where ρ P = 2 R P − 1 and C OSTS P2 are given by (22). According to the results given by (A9)-(A11) in Appendix A, the final expression of Pr Q OSTS = ∅ is According to (41) and (42), we have In addition, Pr Ψ S |Q OSTS = Q l can be written as follows: where ρ S = 2 R S − 1. Considering Y 1 = h S i 2 h S i D 2 and using the PDF of Y 1 , which is calculated in Appendix B, Ch9 and Ch10 can be derived as (A12) and (A13), respectively. Furthermore, Pr Ψ int |Q OSTS = ∅ can be derived as Following (25), the Pr Ψ int |Q OSTS = Q l can be written as (46), whileCh11 and Ch12 can be derived as (A14) and (A15), respectively.

Numerical Results
This section gives the simulation results of the comparison between the proposed protocol and the battery-limited OSTS and OCJS protocols [38]. We not only evaluate the confidentiality performance but also pay attention to the transmission performance. To repay the friendly jammer, PUs relax the interference threshold, which leads to reducing the R P . Therefore, we set the rate of the PUs of the battery-limited OSTS, OCJS and the proposed model to R P = 0.5 Bit/s/Hz. We assume that R S = 0.5 Bit/s/Hz, K = 3, η = 0.7, µ = 0.5, T = 1 s, ξ = 0.5, I = P P (r 2 = 10 log(I/N 0 )), r 3 = 10 log(P 0 /N 0 ) = 5 dB and the channel coefficients σ 2 P , σ 2 SD , σ 2 PB , σ 2 PE , σ 2 PS i and σ 2 PS n are normalized to 1, σ 2 S n E = 3, σ 2 S i E = 1.5 and σ 2 S i = 4 in our experiments. Figure 3 displays the OPs of PUs or SUs versus r 1 (r 1 = 10 log(P P /N 0 )) of the OSTS and OCJS models as well as the proposed model with different values of K. In order to analyze the gain caused by the increase of K value, we can set that K = 3, 4, and all transmission performances are ameliorated with the increase of K as a result of the multiuser diversity gain. The primary transmission performance improved with the increase of r 1 in the three models. This is because primary users can obtain more primary information in the high SNR. However, the OSTS and OCJS schemes can offer a lower outage probability than the proposed scheme. This is because the proposed scheme uses the EH technology of time allocation, which causes the instantaneous capacity of the PS → PD link to become smaller and does not meet the minimum transmission rate of the primary system, resulting in transmission interruption. In addition, with the increase of SNR, the OPs of SUs of three models first decline and then raise. The declining trend is due to the increase of interference threshold (r 2 = 10 log(I/N 0 )) as the SNR of the primary network (r 1 = 10 log(P P /N 0 )) increases, so that the power of the secondary transmitter increases and more information can be transmitted. In addition, the raising trend is because the interference at secondary users also increases when r 1 is too large. Furthermore, due to the EH technology, the power of STs becomes larger, and the proposed scheme can achieve better secondary transmission performance under the condition of high SNR.   Figure 4, the PUs' confidentiality performance is ameliorated in three models with the increase of the number of STs. The confidentiality performance of the proposed model is better than that of the battery-limited OSTS and OCJS models. In addition, the IPs of PUs decline with the raise of r 1 in the proposed model. This is because the ST i can transmit AN to prevent eavesdropping and the ST n has the best channel to E; then, ST n can also increase interference with the eavesdropper. The short increasing trend is due to the lower power and poor performance of STs in the small value range of r 1 , and the interference to E is decreased. However, in the battery-limited OSTS and OCJS models, the confidentiality performance of the PUs increases as the r 1 increases. This is because the eavesdropper can obtain more primary information by a higher value of r 1 and ST i has only a small part of power to transmit AN. This is the cause of the security performance deteriorating sharply. These phenomena are also shown in Figures 5-7.  S i E . Since the interference channel gain of σ 2 S i E is greater than the channel gain of σ 2 PE and smaller than the channel gain of σ 2 S n E , therefore, the channel coefficient σ 2 S i E is equal to 1, 1.5 or 2. As described in Figure 5, the proposed model is able to offer better confidentiality performance in the same channel coefficient compared to [38]. Moreover, the confidentiality performance is ameliorated obviously in two models as the value of σ 2 S i E becomes larger. This is because the ST i →E link has better channel condition in a larger σ 2 S i E value. In other words, the ST i transmits more interference to the eavesdropper as the value of σ 2 S i E increases. In the proposed model, both ST n and ST i interfere with the E. Nevertheless, the interference to E from ST i is worse than that from ST n . Hence, the PUs' secrecy performance is improved slightly. Moreover, the battery-limited OSTS and OCJS models interfere with E only from ST i . However, the OCJS method selects the secondary transmitter that can provide the optimal intercept probability to E, so the security performance of OCJS is better than that of OSTS.    Figure 6 illustrates the IPs of PUs versus r 1 in the three models with different η. The energy transfer efficiency η is equal to 0.6, 0.7 or 0.8, where the specific values set is referred to [30,41]. The confidentiality performance is ameliorated in the proposed model as η is raised. This is because the larger value of η means more energy can be used for the artificial noise transmission. Namely, STs transmit more interference to the eavesdropper as the value of η increases. Nonetheless, the primary security performance remains unchanged in the battery-limited OSTS and OCJS models. This is because energy harvesting is not considered in the OSTS and OCJS models. Then, the change of energy transfer efficiency η has no effect on the intercept probability. Figure 7 illustrates the IPs of PUs versus r 1 in the three models with different values of σ 2 PE . The channel coefficient σ 2 PE equals to 1.2, 1 or 0.8. According to Figure 7, the confidentiality performance deteriorated with the increase of channel coefficient σ 2 PE in the same model. This is because the PS→E link has better channel conditions in a lager σ 2 PE value. In other words, the eavesdropper can obtain more primary information via a larger σ 2 PE value. Furthermore, the proposed model also can provide the better primary confidentiality performance compared to [38].

Conclusions
The paper investigated the PLS of the underlying model of cognitive Internet of Things. We proposed an ST cooperative jammer selection transmission and energy-harvesting protocol to safeguard PUs and prevent eavesdropping. We also conducted a detailed theoretical study on the performance for the proposed protocol and the battery-limited OSTS protocol. The closed-form expressions of OP and IP of the above two models in Rayleigh fading channels were derived. Moreover, we also considered the OCJS model for further comparison in the experimental part. The final numerical results illustrate that the proposed protocol has better secrecy performance than the battery-limited OSTS and OCJS models due to ST selection transmission and energy harvesting. In addition, the proposed scheme achieves better secondary transmission performance under the condition of high primary SNR. In addition, multi-user diversity technology can be also used to improve system performance. Furthermore, we also analyzed other parameters that influence the system performance to provide a better understanding of the secrecy of the cognitive IoT with EH.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
From (27), by using (7) and letting ∆ P = 2 (27) is rewritten as Here, h PS i 2 , |h P | 2 , and h S i D 2 are independently and exponentially distributed random variables with parameters 1 σ PS i 2 , 1 σ P 2 , and 1 σ S i D 2 , respectively. Let X 1 = h PS i 2 , X 2 = |h P | 2 , and X 3 = h S i D 2 , and their PDFs are given by (1). Thus, Ch1 can be derived as Meanwhile, Ch2 can be derived as where x n n·n! , x < 0, γ is the Euler's constant.
From (30), by using (7) and letting can be rewritten as Here, |h PB | 2 and h S i 2 are independently and exponentially distributed random variables with parameters 1 σ PB 2 and 1 σ S i 2 , respectively. Let X 4 = |h PB | 2 and X 5 = h S i 2 ; their PDFs are given by (1). Let Y 1 = X 5 /X 3 ; the PDF of variable Y 1 is derived in Appendix B from (A16). By using f Y 1 (y 1 ), Ch3 can be derived as In addition, Ch4 can be derived as From (36), let X 6 = |h PE | 2 , X 7 = h S i E 2 , X 8 = |h S n E | 2 , X 9 = |h PS n | 2 , and the PDF of variable Y 2 is derived in Appendix B from (A16) to (A17). By using f Y 2 (y 2 ), Ch5 and Ch6 can be derived as (A7) and (A8), respectively.