{'fraction_non_alphanumeric': 0.03831460674157303, 'fraction_numerical': 0.007865168539325843, 'mean_word_length': 4.296340374888426, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
PHY-Fed: An Information-Theoretic Secure Aggregation in Federated Learning in Wireless Communications

Federated learning (FL) is a type of distributed machine learning at the wireless edge that preserves the privacy of clients' data from adversaries and even the central server. Existing federated learning approaches either use (i) secure multiparty computation (SMC) which is vulnerable to inference or (ii) differential privacy which may decrease the test accuracy given a large number of parties with relatively small amounts of data each. To tackle the problem with the existing methods in the literature, In this paper, we introduce PHY-Fed, a new framework that secures federated algorithms from an information-theoretic point of view.


I. INTRODUCTION
In traditional machine learning (ML) schemes, data is centrally trained by one organization running the learning algorithm. Federated Learning (FL) is a recent technique in distributed machine learning (ML) that trains an algorithm locally at decentralized clients. This method has two major benefits, namely (i) accessing to larger data provided by different clients, and (ii) utilizing the computing power of all the clients to train a general model [1], [2], [3], [4], [5], [6], [7], [6], [8]. In addition, in FL the clients collaboratively train models without the sharing of raw data. This is because clients often cannot share data due to some restrictions or competition between them. To satisfy this condition, clients only exchange model parameters in lieu of the raw information. Training will be completed when the model parameters converge after enough number of iterations. At each iteration, the updated parameters calculated by the clients will be transmitted to a central server, called Parameter Server (PS) hereafter, for aggregation [7]. The PS is assumed to be honest-but-curious, i.e., it is curious in interpreting the data of individuals, however, it is honest in operations. The privacy in FL needs to meet two conditions: • Condition I: the server remains oblivious to the messages of all the clients, while it can interpret/use the aggregated messages.
• Condition II: each client is oblivious to the messages sent by the other clients, and therefore maintaining the privacy of clients' data from being eavesdropped by malicious adversaries.
Two commonly methods used in FL that satisfy Conditions I and II are Cryptographic methods and Differential privacy. In the following, these two methods and their associated problems are briefly discussed, and the proposed approach for data aggregation presented in this paper is introduced.
Cryptographic methods: In this type of technique, different users encrypt their local messages prior to sending it to the PS which ensures that the PS does not know the data on each device. Then, the PS operates on the encrypted messages, and finally decrypts the aggregated model to get the final result. There are two commonly used methods in this category, namely homomorphic encryption [9] and secure multiparty computation (SMC) [10]. Nevertheless, there are two major issues with this type of secrecy: • (i) Most commonly used encryption methods rely on the computational hardness of some mathematical problems. Nevertheless, due to continual advances in computer technology, and discovery of new computational techniques such as Quantum computing, eavesdroppers are becoming more equipped and intelligent, and thus long term effectiveness of such traditional techniques is questionable. • (ii) To preserve the privacy, such systems suffer from the exceedingly high computation overhead (otherwise breaking such schemes would become easy for adversaries).
Differential privacy: While satisfying the conditions in (), this technique guarantees that one single update does not have much influence on the output of PS model [11]. To be more specific, the inclusion of a single instance in the training dataset makes only negligible changes to the algorithm's final output. Also, by means of injecting artificial noises to the uploaded parameters by the users, this method provides the model with protection against the inference attack. However, it leads to low accuracy when there is a large number of clients with relatively small amounts of data each.
To overcome these challenges, in this paper we propose a secure data aggregation algorithm exploiting Physical Layer Security (PLS) for FL models. Note that both Cryptographic methods and Differential privacy-which are applied at the third or higher layers of communication protocols-are independent from our algorithm, and therefore they could be integrated with our proposed method. Most PLS schemes are based on the idea of utilizing intrinsic randomness in wireless channels. This randomness is used to establish a common value between two legitimate nodes. As this randomness only depends on the characteristics of the channel between the two parties, an adversary will be oblivious to this randomness. It is shown that this randomness could be exploited to secure wireless communications from an information-theoretic per-arXiv:2210.16917v1 [cs.IT] 30 Oct 2022 spective.
To obtain a common random value by both parties, channel reciprocity is one of the main principles used in this realm. This feature implies that the transmitted signal from nodes A and B experiences almost the same fading in the links A → B and B → A. Therefore, the phase change exerted over signals transmitted in the links A → B and B → A are the same.
II. SYSTEM MODEL ML algorithms often entail minimization of the empirical loss function of the form F (θ) = 1 where θ ∈ C d are model parameters to be optimized, u i for 1 ≤ i ≤ D are the training data samples, and f (.) is the loss function that depends on the ML model. Iterative Stochastic Gradient Descent (SGD) is often adopted to minimize the function F (θ), where the model parameters at iteration t, denoted by θ t , are updated as θ t+1 = θ t − η t g(θ) while satisfying E{g(θ)} = ∇F (θ), where η t is the learning rate. On the other hand, in distributed SGD (DSGD), clients train data samples in parallel while keeping a globally consistent parameter vector θ t . To shed more light, in each iteration, client s computes a gradient vector based on the global parameter vector with respect to its local dataset, and sends back the result to the PS, so that PS updates the global parameter vector as follows where S is the number of clients; and also, g s (θ t ) 1 |χs| ui∈χs ∇f (θ t , u i ) is the gradient estimate of Client s obtained from the global parameter θ t and its local dataset χ s . Iterations are carried out until a certain convergence criterion is met.
As seen, parallelism enjoys exploiting the computing power of S workers, however, it brings up the issue of preserving privacy of the clients. Equation (1) shows that PS requires only the gradient estimate of Client s, i.e., g s (θ t ), to update the global parameter for the model. Although g s (θ t ) contains less information than the C s 's raw data, PS can use only the updated parameters to infer some information about χ s [12]. Thus, Client's gradient estimates must be securely aggregated at the PS such that Conditions I and II are satisfied. In the following, by using the phase reciprocity of wireless channels, a secure algorithm for aggregating g s (θ t ) at PS is presented. First, in Section III, the phase reciprocity and its masking capability is explained; then in Section III the algorithm is elaborated.

III. MASKING THE CONTENT OF GRADIENT VECTOR
In wireless channels, the distribution of the phase is uniform in [0, 2π) [13]. Consider two clients C i and C j in the distributed FL model. We denote the channel phase exerted in the links C i → C j and C j → C i by φ ij and φ ji , respectively. Then, if C k is another clients whose position is λ/2 aprart from C j , then φ ik and φ ij are independent, where λ is the radio wavelength. Therefore, in our case, all the φ ij for i = j are independent and identically distributed ( Group ℬ Fig. 1. This figure shows how clients 1 and l + 1, as two candidates from groups A and B, find Φ t 1 and Φ t l+1 , respectively. Client 1 We use this property to design an information-theoretic secure algorithm for FL. As discussed in Section II, at each iteration, clients need to send their updated gradient vector to PS. For this purpose, we assume that the clients modulate their local gradient updates by using QPSK modulation (they can use any other type of PSK modulation, but for the sake of simplicity, we use QPSK). Therefore, the gradient vector must be first quantized to a desired level of accuracy, and converted to a binary string. Assume, this results in representing g s (θ t ) by L bits. In addition, to combat the effect of channel noise and other imperfections typical in wireless transmission, the L bits representing the gradient vector should undergo FEC, adding r bits of channel coding redundancy to the original L bits. Therefore, L + r = 2m QPSK symbols are required to send the gradient vector to PS. We denote the modulated gradient vector by MOD(g s (θ t )) = ν t s . In the following, we elaborate on how the content of QPSK symbols could be completely masked.
First, consider the following theorem proved in [14].
Theorem 1. Assume that angle x is uniformly distributed in [0, 2π), and y is another random angle, independent of x, distributed in [0, 2π) with certain Probability Distribution Function (PDF). Then modulo-2π addition of x and y is also uniformly distributed in [0, 2π).
Based on Theorem 1, if a client rotates QPSK constellation point X by a random variable Φ uniformly distributed in [0, 2π), the resulted QPSK symbol will be also uniformly distributed in [0, 2π), and therefore carrying no information about its summands. Note that rotating in this manner is equivalent to modulo-2π addition of X and Φ: Y = X⊕Φ. Any other clients who observes Y , cannot extract any information about X, leading to I(X; Based on this observation and phase reciprocity in wireless channels, in the following Section, we will present a secure algorithm for FL models where in the privacy requirements are satisfied.  Fig. 2. At each iteration t, the clients are divided into two groups, namely A and B. The clients in group A rotates their QPSK constellations clockwise by their respective secret phases. On the other hand, the clients in group B rotates their QPSK constellations counter-clockwise by their respective secret phases. Once the data from both groups are aggregated at PS, the random phases added by the clients are removed.

IV. A SECURE ALGORITHM FOR AGGREGATION IN FL
In the first phase of our proposed algorithm for data aggregation in PS, the clients are randomly divided into two groups, namely group A and B, such that in each group there is at least two clients. We use G(C i ) = A to indicate that C i is a member of group A. At each iteration t, clients in A, mask the content of MOD(g s (θ t )) = ν t s by rotating the constellations counter clock-wise with the phase i is equal to the sum of phases of the channels between a client and the clients in the other group, see Fig. 1). On the other hand, clients in B, rotate their QPSK constellation points clock-wise by Then all clients send their encrypted messages to PS., i.e., client i in group A transmits E ⊕ ( ν t i ) and client j in group B transmits E ( ν t j ). The Algorithm 1 explains the procedure systematically.
Algorithm 1 Two-group structure Input: The number of clients, namely S 1: Each client generates random variable 2: Randomly divide the clients into two groups, namely A and B ; 3: if there is a group with less that two clients then for i = 1,...,S in parallel do do 8: 10: if i ≤ l then 11: Proof. Consider two clients C i and C j . Then, during the coherence time of the channel, the channel reciprocity implies that φ ij = φ ji [13], i.e., the transmitted signals in the links C i → C j and C j → C i will experience almost the same fading in the phase.
What aggregates at the PS is Therefore, PS found the average of updated parameters.
Theorem 3. Algorithm 1 satisfies the privacy requirement for FL.
Proof. First, we show that each client is oblivious to the transmitted data of the other clients. First note that based on Theorem 1, the value Φ t i for all 1 ≤ i ≤ S is uniformly distributed in [0, 2π). On the other Without loss of generality, we consider a client in group A. Then Second, we show that the PS is oblivious to the data transmitted by all clients.
Handling client dropouts: When the number of clients is large, the probability that some clients drop out during the training process is high; because a client may become temporarily unavailable due to some reasons such as broken network connections. In this case, PS cannot find decode the aggregated model, because the summation of masked phases will not be equal to zero. In the following, Algorithm 1 is slightly modified so that the PS can accomplish aggregation in case of user drop-out.
When client C i drops out, a simple remedy is that the PS asks the remaining clients to send him the phases that contributes to make Φ t i . To this end, if C i ∈ A, PS would ask the clients in B to share the channel phases between themselves and C i , and therefore PS would find Φ t i by summing up these phases. Finally, PS subtracts Φ t i from the aggregated model. However, there is still a problem associated with this remedy. To shed more light, consider a scenario where C i transmits his data with some delay to PS. Then, PS presumes that C i has dropped, and therefore asks the clients in the other group to reveal their contributions in making Φ t i . However, right after recovering Φ t i , PS will receive the delayed data from C i . Now, the PS is capable of unmasking the content of constellation points transmitted by C i by de-rotating his constellation points by the secret phase Φ t i . Therefore, the algorithm requires rectification to handle the dropped users.
To this aim, each client masks the content of its gradient update by two random phases. The first phase, which is called private random phase hereafter, is a random variable uniformly distributed in [0, 2π), denoted by u i ; and the second phase is Φ t i obtained as discussed in Algorithm 1. A client C i ∈ A mask the content of ν t i as follows and similarly, a client C j ∈ B masks the content of ν t i as To find the aggregate of the user models, the PS asks for either (i) the shares of public random phase Φ t i belonging to the dropped clients, or (i) secret random phase u i associated with the surviving clients (Note that PS does not ask for both Φ t i and u i , since in that case it can unmask the constellations' contents). Once the server collects this information, it performs the following calculation over the aggregated model where A s(d) and B s(d) denoted the surviving (dropped) clients in group A and B, respectively. Note that (12) is obtained from the same calculations as in (2)- (8). Thus, PS found the aggregated model. Algorithm 2 illustrates the steps systematically. Algorithm 2 satisfies the Conditions I and II, and furthermore can handle the dropped users. Nevertheless, the number of communications between clients needed to establish the mask phases is O((N/2) 2 ). Furthermore, if C i drops, PS needs to establish on the average O(N/2) communications with the clients in the other group to reconstruct C i 's random mask. This communication overhead severely limits the network size for real-world applications. In the following Section, Algorithm 2 is rectified so that its communication overhead is significantly decreased. Algorithm 2 Two-group structure with secret/public phases Input: The number of clients, namely S 1: Randomly divide the clients into two groups, namely A and B ; 2: if there is a group with less that two clients then 3: Return to Step 1 4: else 5: Label the clients in the first group by {1, 2, ..., l}, and those in the second group by {l + 1, l + 2, ..., S}; 6: for i = 1,...,S in parallel do do 7: if i ≤ l then 10: The clients are divided into K groups, namely {A 1 , A 2 , ..., A K }, such that the number of clients in each group is 2L, and thus N = (K)(2L) (if N = K2L + r then we make the last group with 2L + r clients instead. This does not make any changes to the proposed algorithm, specifically when the number of clients N is large enough). In the next step, the clients in each group are divided into two subgroups with each having L clients. Denote by A ⊕ i and A i the two subgroups in group A i . In order for clients to mask their gradient update constellation points, an approach similar to Algorithm 2 is performed in each of the K groups separately. To elucidate, consider the first group A 1 . Then a client C i ∈ A ⊕ 1 calculates Φ t i = j∈A 1 φ t ij , that is the summation of channel phases between C i and the clients in the other subgroup of A 1 . This procedure is depicted in Fig.  ??. Once the secret masks are achieved, the same procedure as Algorithm 2 is carried out by clients and PS.
In each group, the number of communications between clients needed to establish the mask phases is L 2 , and as there are K groups, the total number of communications becomes KL 2 = N 2L L 2 = N L 2 . Remark 1. On the one hand, if K increases, then communication overhead N L 2 decreases (as N = (K)(2L) is constant). On the other hand, in order to maintain the security of the clients, L cannot be less than 2. Furthermore, if L = 2, then upon dropping out a client, L becomes equal to 1 which infringes the security of the model. Therefore, there is a tradeoff between the communication overhead and the ability of the protocol to handle the dropped clients while maintaining the privacy.