A method for optimizing power allocation and device scheduling of wireless federated learning
By constructing a channel state information matrix and using graph neural networks to optimize device selection and power allocation in wireless federated learning, the problems of device energy limitations and channel interference are solved, thereby improving training efficiency and stability.
Patent Information
- Application Number
- CN202510003987.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-01-02
AI Technical Summary
Wireless federated learning suffers from device energy constraints and channel interference. Existing optimization methods fail to effectively balance device performance, energy consumption, and channel interference, resulting in low training efficiency.
By constructing a channel state information matrix, calculating the device utility function and power allocation objective function, and combining graph neural networks and device selection objective function, power allocation and device scheduling are dynamically adjusted to optimize device selection and power allocation in wireless federated learning.
It improves the training efficiency and stability of wireless federated learning while taking into account device channel interference and energy consumption, and adapts to changes in different communication environments.
Smart Images

Figure CN120018289B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of wireless federated learning optimization, and in particular to a method for optimizing power allocation and device scheduling of wireless federated learning. BACKGROUND
[0002] Wireless federated learning enables mobile devices to collaboratively learn a machine learning model without sharing their sensitive raw data, thus transforming centralized training into distributed training. After using wireless federated learning, distributed data stakeholders (e.g., mobile devices) only need to upload their updated local models to the central server periodically without uploading their potentially private raw data, thus greatly reducing the risk of privacy leakage. Although wireless federated learning can solve the problems of data silos and privacy, it faces many challenges in wireless networks, as follows: 1) lossy communication: when training FL algorithms on wireless networks, users have to transmit training parameters through wireless links. Due to the limitations of inter-channel interference and the inherent unreliability of wireless links, model transmission errors or failure to upload may be caused, thus introducing training errors and possibly causing the performance of the global model to decrease. 2) hardware limitations: the hardware capabilities of wireless devices are usually limited, and the lack of device computing power can limit the training efficiency of the model. In addition, the limited battery energy of the device limits its participation in the rounds of FL. Since a certain amount of energy is consumed for each round of training, limited energy budget may cause the device to be unable to continuously participate in training, thus affecting the convergence speed and final performance of the global model. In view of the above two problems, the existing optimization of wireless federated learning efficiency mainly considers the energy limitation of mobile devices and the scarcity of wireless resources. Since mobile devices are usually powered by batteries, their limited energy directly affects the number of rounds they participate in FL, and since wireless communication resources are tight, only a limited number of devices can participate in each round of training, which makes the base station (BS) need to strategically select a subset of devices to participate in training in each round. Most client selection algorithms mainly focus on optimizing the performance of the global FL model by selecting clients with more data samples or smaller losses, and these algorithms often aim to improve model accuracy; for energy efficiency in wireless federated learning, resource allocation is mainly optimized by modeling, but most of them only focus on one aspect of performance optimization or energy management of the FL model, and often ignore the trade-off between the two factors; although current optimization methods combine device scheduling and wireless resource allocation, most of them assume that the model transmits data on an ideal orthogonal channel, and do not consider inter-channel interference. This assumption usually leads to the optimization algorithm allocating the maximum transmission power within the limit range for each device. However, in actual wireless communication scenarios, due to the existence of inter-channel interference, such power allocation algorithm may cause the error rate of wireless transmission to rise.
[0003] Therefore, providing a wireless federated learning efficiency optimization method capable of balancing device performance, device energy consumption, and interference between channels is a technical problem to be solved. SUMMARY
[0004] The present application aims to overcome the defects of the prior art and provides a method for optimizing power allocation and device scheduling in wireless federated learning, which comprehensively considers the channel interference between devices and the actual needs of devices to achieve more accurate and efficient power allocation. At the same time, a real-time client scheduling algorithm is used to realize energy efficiency in two stages of wireless communication and device calculation.
[0005] The object of the present application can be achieved by the following technical solutions:
[0006] The present application provides a method for optimizing power allocation and device scheduling in wireless federated learning. Before each round of local training in wireless federated learning, steps S1-S6 are performed to select devices participating in the round of wireless federated learning training and allocate power to the selected devices. The selected devices perform local training based on the aggregated model parameters distributed by the base station in this round, and send the trained model parameters to the base station. The base station aggregates the received model parameters as the to-be-distributed model parameters for the next round, realizing federated learning,
[0007] S1, based on the channel gain and the channel interference coefficient between devices, a channel state information matrix is constructed, and the utility function of each device is calculated;
[0008] S2, a power allocation objective function is constructed, and based on the channel state information matrix and the power allocation objective function, a first power allocation vector and a first device selection vector are obtained;
[0009] S3, based on the first device selection vector, the utility function of the corresponding device is updated, and a device selection objective function is constructed;
[0010] S4, based on the device selection objective function, the first device selection vector is corrected to obtain a second device selection vector;
[0011] S5, based on the channel state information matrix, the second device selection vector and the power allocation objective function, a second power allocation vector is obtained;
[0012] S6, based on the second device selection vector, devices participating in the round of wireless federated learning training are selected, and based on the second power allocation vector, power is allocated to the selected devices.
[0013] As a preferred technical solution, the method for constructing the channel state information matrix is:
[0014] The channel gain of each device and the channel interference coefficient between each two devices are calculated.
[0015] Based on the channel gain and the channel interference coefficient, the channel state information matrix element, i.e. H n,n = a n , H n,m = b n,m , n≠m, wherein N represents the total number of devices; n and m represent the nth or the mth device, n = 1, 2, … N, m = 1, 2, … N; H n,n represents the element of the nth row and the nth column in the channel state information matrix; H n,m represents the element of the nth row and the mth column in the channel state information matrix; a n represents the channel gain of the device n; b n,m represents the channel interference coefficient between the device n and the device m.
[0016] As a preferred technical solution, the calculation method of the utility function is: obtaining a local data set of the device, and calculating the utility function based on the local data set, and the expression is: U(n, t) = a n,t D n , wherein U(n, t) represents the utility function of the device n in the tth round of wireless federated learning; a n,t ∈ {0, 1, when a n,t = 1, it represents that the device n is selected in the tth round of wireless federated learning; when a n,t = 0, it represents that the device n is not selected in the tth round of wireless federated learning; D n represents the local data set of the device n.
[0017] As a preferred technical solution, the expression of the power allocation target function is:
[0018]
[0019] , wherein N0 represents the number of devices participating in power allocation; μ n represents the energy efficiency weight of wireless transmission of the device n; represents the wireless transmission energy efficiency of the device n in each federated learning round; represents the device index set; p min represents the minimum value of the device transmission power; p max represents the maximum value of the device transmission power; p n (H represents the transmission power of the device n in the device corresponding to the channel state information matrix; represents the transmission time of the device n in the device corresponding to the channel state information matrix; represents the limit transmission time; PER n represents the packet error rate of device n in the device corresponding to the channel state information matrix; q0 represents the limited packet error rate of device n in the sub-matrix corresponding to the device;
[0020] As a preferred technical solution, the method for obtaining the first power allocation vector comprises:
[0021] Based on the channel state information matrix, a graph is constructed, wherein the nodes of the graph are devices, and the edges are channel connections between devices;
[0022] Based on the graph, a non-local dependence relationship between nodes is obtained, and an attention mechanism is used to assign different weights to each node to generate an intermediate graph;
[0023] Based on the intermediate graph, the information of adjacent nodes of each node is aggregated, and the feature information of each node is updated;
[0024] Based on the updated feature information, a convolution operation is performed to extract features, and the first power allocation vector is generated by combining the feature extraction result and the power allocation objective function.
[0025] As a preferred technical solution, the method for obtaining the first device selection vector comprises:
[0026] Based on the first power allocation vector, the transmission power of each device is obtained, and the transmission time and the transmission packet error rate of each device are calculated, and the expression is:
[0027]
[0028] Wherein, SINR n,t represents the interference plus noise ratio of device n to the base station signal in the tth round of wireless federated learning; a n represents the signal gain of device n; p n,t represents the power of device n in the tth round of wireless federated learning, which is obtained by the first power allocation vector p t ; m represents the mth device; b n,m represents the channel interference coefficient between device m and device n; p m,t represents the power of device m in the tth round of wireless federated learning, which is obtained by the first power allocation vector p t ; represents the transmission time; B represents the communication bandwidth; M represents the size of the data packet transmitted by the device to the base station; PER n,t (p t , H) represents the transmission packet error rate of device n in the tth round of wireless federated learning; c represents the waterfall threshold, which is a preset constant;
[0029] Select devices meeting the screening condition based on the transmission power, transmission time and transmission packet error rate to generate a first device selection vector.
[0030] As a preferred technical solution, the method for updating the utility function of the corresponding device based on the first device selection vector is:
[0031]
[0032] wherein U'(n,t) is the updated utility function, Scale(·) represents the ratio of the current energy of the device n in the device corresponding to the first device selection vector to the required energy; T represents the total number of rounds of wireless federated learning; t represents the tth round of wireless federated learning; represents the energy consumption of the calculation phase of the tth round of wireless federated learning; represents the energy consumption of the calculation phase of the tth round of wireless federated learning; represents the energy consumption of the wireless transmission of the tth round of wireless federated learning.
[0033] As a preferred technical solution, the expression of the device selection target function is:
[0034]
[0035]
[0036] wherein A represents a device selection matrix, which is obtained from the first device selection vector; represents the energy efficiency of the calculation phase of the tth round of wireless federated learning; a n,t ∈{0,1, when a n,t =1 represents that the device n is selected in the tth round of wireless federated learning, and when a n,t =0 represents that the device n is not selected in the tth round of wireless federated learning; D n represents the local data set of the device n; represents the device index; represents the round index of wireless federated learning; N0 represents the maximum number of selected devices in each round of wireless federated learning; U'(n,t) represents the updated utility function; η represents a hyperparameter; represents the time of the calculation of the device n in the tth round of wireless federated learning; represents the limited calculation time of the device.
[0037] As a preferred technical solution, the method for obtaining the second device selection vector is: based on the device selection target function, a standard branch and bound method is used to solve in the device set corresponding to the first device selection vector to generate the second device selection vector.
[0038] As a preferred technical solution, the method for obtaining the second power allocation vector is:
[0039] Based on the second device selection vector, the matrix elements meeting the conditions in the channel state information matrix are screened to construct a sub-matrix;
[0040] Based on the sub-matrix and the power allocation target function, a second power allocation vector is obtained.
[0041] Compared with the prior art, the present application has the following advantages:
[0042] 1) Compared with the existing power allocation algorithm, the present application considers the interference between device channels, defines a federated learning utility function of the device, reasonably schedules the device with high energy consumption to the later stage of federated learning, and models and constrains important restriction conditions in the wireless federated learning power allocation problem, including transmission power limitation, transmission time limitation and transmission packet error limitation, and preliminarily screens the devices meeting the conditions according to the restriction conditions; then a device selection target function is constructed, and the device selection is corrected to ensure that the devices most suitable for the current round of training are screened out; finally, the power of each device is redistributed according to the corrected device selection, so as to maximize the transmission benefit, not only realizing the optimization of the device wireless communication efficiency and the device calculation efficiency in the wireless federated learning, but also guaranteeing the stability and efficiency of the transmission.
[0043] 2) The present application can quickly respond to channel condition changes by real-time acquisition and update of channel communication state information, and can dynamically adjust the power allocation and device scheduling strategy in a self-adaptive manner in a timely manner according to the changed channel communication state information, so as to adapt to different wireless federated learning communication environments. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 It is a structure schematic diagram of the wireless federated learning system in the embodiments of the present application.
[0045] Figure 2 It is a flowchart of the method of the present application. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.
[0047] Unless otherwise defined, technical terms or scientific terms used in the present application shall have the ordinary meaning of a person skilled in the art to which the present application pertains. The terms "a", "an", "one", "this" and like terms used in the present application do not denote a quantity limitation, but can denote a single or a plurality of objects. The terms "comprise", "include", "have" and any variations thereof used in the present application are intended to cover a non-exclusive inclusion; for example, a process, method, system, product or device that comprises a list of steps or modules (units) is not limited to the listed steps or units, but can further include other steps or units not listed or can further include other steps or units inherent to such process, method, product or device. The terms "connect", "connected", "coupled" and like terms used in the present application are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The term "plurality" in the present application means two or more. The term "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, "A and / or B" can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects. The terms "first", "second", "third" and the like in the present application are only to distinguish similar objects, and do not represent a specific order of the objects.
[0048] A wireless federated learning system in a 500m x 500m area is selected, and the framework is as shown in Figure 1 The detailed system includes a base station equipped with 10 antennas and 16 mobile devices, the base station is located in the center of the area, and the devices are randomly placed. Each device has a local data set D n , where n represents the nth device and n ∈ [1, 16; The 16 devices in the base station plan to participate in wireless federated learning (FL), and the process is as follows: first, at the beginning of each round of FL, the base station needs to select multiple devices to participate in this round of training and pass the global model to the selected devices, then the selected devices use the local data set D n to train the global model, so as to realize the mapping. After the training is completed, the device uploads its local model to the base station through the wireless network, and the base station performs model aggregation. The global model update form is:
[0049]
[0050] , where a n,t ∈ {0, 1, when a n,t = 1, it means that device n is selected in the tth round of wireless federated learning, when a n,t = 0, it means that device n is not selected in the tth round of wireless federated learning; D n represents the local data set of device n; w n,tdenotes the local model of device n in the tth round of wireless federated learning.
[0051] In order to make the wireless signal transmission in the above process and the calculation of the device in the local training most efficient, the energy efficiency of the device in each round of calculation stage and the energy efficiency of the wireless transmission stage are optimized, and the objective function and constraint are constructed as shown in P1:
[0052]
[0053] wherein A=(a n,t )∈R N×T denotes the device selection matrix, N=16 denotes the number of devices, and T=30 denotes the number of rounds of wireless federated learning; denotes the energy consumption of the tth round of wireless federated learning calculation; denotes the energy consumption of the wireless transmission stage in the tth round of wireless federated learning; denotes the device index; denotes the round index; N0denotes the maximum number of devices that can participate in training in each round of training; U(n,t)denotes the utility function of device n in the tth round of wireless federated learning; and ηdenotes a hyperparameter; denotes the time of the tth round of wireless federated learning calculation of device n; denotes the time limit of the tth round of wireless federated learning calculation; p min denotes the minimum transmission power of the device, and in the present embodiment, p min =10 -6 W; p m2x denotes the maximum transmission power of the device, and in the present embodiment, p max =0.1W; denotes the transmission time of device n in the device corresponding to the channel state information matrix; denotes the limit transmission time; denotes the packet error rate of device n in the device corresponding to the channel state information matrix H; q0denotes the limit packet error rate of device n in the device corresponding to the sub-matrix; E n denotes the energy of the device, and denotes the total energy available for FL.
[0054] Specifically, the calculation formula of the energy consumption of the tth round of wireless federated learning is:
[0055]
[0056] δ n denotes the energy coefficient of device n; ε n denotes the number of CPU cycles required by device n to process each bit of sample data; ω n denotes the number of bits of each data sample; D n denotes the local data of device n; f ndenotes the CPU frequency of device n; and since the performance of FL is affected by the data sample size of the selected device, the utility function of device n in the t-th round is introduced as U(n, t) = a n,t D n According to the utility function, the calculation formula of energy consumption of the t-th round of wireless federated learning at this time is:
[0057]
[0058] The channel state information matrix is: H ∈ R N×N , and H n,n = α n , H n,m = β n,m , n ≠ m, N denotes the total number of devices; n and m denote the n-th or m-th device, n = 1, 2, … N, m = 1, 2, … N; H n,n denotes the element in the n-th row and n-th column of the channel state information matrix; H n,m denotes the element in the n-th row and m-th column of the channel state information matrix; α n denotes the channel gain of device n; β n,m denotes the channel interference coefficient between device n and device m. Wherein,
[0059]
[0060] h n denotes the channel from device n to the base station; denotes the variance of the additive Gaussian distributed noise.
[0061] The calculation formula of transmission time and transmission packet error rate is:
[0062]
[0063] SINR n,t denotes the interference plus noise ratio of device n in the t-th round of wireless federated learning with the base station signal; α n denotes the signal gain of device n; p n,t denotes the power of device n in the t-th round of wireless federated learning obtained by the first power allocation vector p t ; m denotes the m-th device; β n,m denotes the channel interference coefficient between device m and device n; p m,t denotes the power of device m in the t-th round of wireless federated learning obtained by the first power allocation vector p t ; denotes the transmission time; B denotes the communication bandwidth; M denotes the size of the data packet transmitted by the device to the base station; PER n,t (P tH) represents the transmission packet error rate of device n in the tth round of wireless federated learning; c represents a waterfall threshold, which is a preset constant.
[0064] The expression of the energy efficiency of the wireless transmission phase in the tth round is:
[0065]
[0066] represents the energy of the wireless transmission phase of device n; μ n represents the energy efficiency weight of the wireless transmission of each device.
[0067] Since there is a long-term constraint condition in the optimization problem, the resource allocation between different rounds becomes coupled, resulting in an increase in the complexity of solving the problem as the number of rounds T increases. In order to solve this problem, the optimization problem of P1 in the present application is converted into two optimization problems of P11 and P12 by using a greedy strategy, and the optimization objective is re-expressed as maximizing the total energy benefit of FL in each round.
[0068] P11 is a power allocation objective function, and the expression is:
[0069]
[0070] N0 represents the number of devices participating in power allocation; μ n represents the energy efficiency weight of the wireless transmission of device n; represents the wireless transmission energy efficiency of device n in each federated learning round; represents a device index set; P min represents the minimum value of the transmission power of the device; p max represents the maximum value of the transmission power of the device; p n (H represents the transmission power of device n in the device corresponding to the channel state information matrix; represents the transmission time of device n in the device corresponding to the channel state information matrix; represents the limit transmission time; represents the packet error rate of device n in the device corresponding to the channel state information matrix; PER0 represents the limit packet error rate of device n in the device corresponding to the sub-matrix.
[0071] P12 is a device selection objective function, and the expression is:
[0072]
[0073]
[0074] A represents a device selection matrix, which is obtained from the first device selection vector; Energy efficiency of the computation phase of the t-th round of wireless federated learning; a n,t ∈{0, 1, when a n,t = 1 indicates that device n is selected in the t-th round of wireless federated learning, a n,t = 0 indicates that device n is not selected in the t-th round of wireless federated learning; D n represents the local data set of device n; represents the device index; represents the wireless federated learning round index; N0represents the maximum number of selected devices per round of wireless federated learning; U'(n, t) represents the updated utility function; η represents the hyperparameter; represents the time of device n for the t-th round of wireless federated learning computation; represents the limit computation time of the device.
[0075] Based on the above conditions, steps S1-S6 are performed before each round of local training of wireless federated learning to select devices participating in the round of wireless federated learning training and allocate power to the selected devices. The selected devices perform local training based on the aggregated model parameters distributed by the base station in this round, and send the trained model parameters to the base station. The base station aggregates the received model parameters as the to-be-distributed model parameters of the next round, implements federated learning, and the process is as shown in Figure 2 The detailed steps include:
[0076] S1, obtain the channel state information matrix, and calculate the utility function of each device.
[0077] S2, obtain the power allocation objective function, based on the channel state information matrix H and the power allocation objective function S1, obtain the first power allocation vector and the first device selection vector.
[0078] Due to the non-convex nature of the problem and the infinite dimensionality of the power allocation function p(H, it is extremely challenging to directly solve S1, therefore, a graph neural network PAGNN is introduced to parameterize the power allocation function, thereby reducing the dimensionality of the subproblem S1, and through the Lagrangian dual learning framework, the original optimization problem is converted into an unconstrained problem, and finally the gradient descent method is used for model training to obtain the optimal power allocation. The specific steps are as follows:
[0079] S21, construct a graph based on the channel state information matrix H, wherein the nodes of the graph are devices, and the edges are the channel connections between devices.
[0080] S22, use a graph attention network (GAT) with a feature dimension of eight and eight attention heads to obtain the non-local dependency relationship between the nodes in the graph, and use the attention mechanism to assign different weights to each node, so as to better handle the complex interaction between nodes and generate an intermediate graph.
[0081] S23, set the feature dimensions of the four-layer graph convolutional network (GCN) to {32, 64, 16, 4}, the intermediate activation function to ELU and the last layer activation function to sigmoid, and the learning rate to 5×10 -4 , the graph convolutional network (GCN) is used to aggregate the information of each node’s neighboring nodes based on the intermediate graph and update the feature information of each node.
[0082] S24 . Perform feature extraction using a convolution operation based on the updated feature information, and generate a first power allocation vector by combining the result of the feature extraction and the power allocation objective function.
[0083] S25. Obtain the transmit power of each device based on the first power allocation vector, and calculate the transmission time and transmission packet error rate of each device.
[0084] S26, based on the transmission power, transmission time and transmission packet error rate, with the constraints in the power allocation objective function S1 as the screening conditions, select the devices that meet the screening conditions, and exclude those that cannot complete the training in time or lack sufficient energy to complete the current FL round, as well as those with poor wireless channels or strong interference to other channels, i.e., p n <p min device, generating a first device selection vector; wherein, the transmission limit time is 0.3s, and the transmission limit packet error rate is 10%.
[0085] S3. Taking into account the long-term energy constraints of the device, update the utility function of the corresponding device based on the current energy of the device, the energy consumption of this round, and the first device selection vector. Based on the updated utility function, obtain the device selection objective function S2. The expression for updating the utility function of the corresponding device is:
[0086]
[0087] Among them, U′(n,t) is the updated utility function, Scale(·) represents the current energy of device n in the device corresponding to the first device selection vector. The ratio of the required energy is scaled to the range of [0.5, 1]. T represents the total number of rounds of wireless federated learning. t represents the tth round of wireless federated learning. represents the energy consumption of the t-th round of wireless federated learning computation phase; represents the energy consumption of wireless transmission in the tth round of wireless federated learning.
[0088] There are several key purposes for updating the utility function, including:
[0089] 1) The devices with high energy consumption in each round usually process larger amount of data, which makes them more likely to fail to participate in the whole FL process, and allocating more data for training in the later stage of FL can enhance the final performance of the FL model. Therefore, the updated utility function can appropriately delay the participation of such devices in the FL process, ensuring the quality of the final FL model. 2) The utility function update can ensure the balance of energy consumption among devices, promote the inclusion of different data sets, and enhance the generalization ability of the model in FL.
[0090] S4, based on the device selection objective function S2, using the standard branch and bound method to solve in the device set corresponding to the first device selection vector, generating a second device selection vector.
[0091] S5, based on the channel state information matrix, the second device selection vector and the power allocation objective function, obtaining a second power allocation vector.
[0092] S51, based on the second device selection vector, screening the matrix elements that meet the conditions in the channel state information matrix to construct a submatrix H';
[0093] S52, inputting the submatrix H' into the PAGNN to output the second power allocation vector.
[0094] S6, based on the second device selection vector, selecting devices participating in the current round of wireless federal learning training, and based on the second power allocation vector, allocating power to the selected devices.
[0095] That is, in the present wireless federal learning system, for the federal learning (FL) task, a single-layer feedforward neural network with hyperbolic tangent activation and cross-entropy loss is used, which is trained on the MNIST dataset for multi-classification task. The number of data samples at each mobile device is sampled from a uniform distribution U(100, 1000). The batch size of local training is 16, and the optimizer is Adam. In each global iteration, the device performs a single local training using its own device data. At the beginning of each FL iteration, channel realizations are randomly drawn from the test set to simulate dynamic wireless environments, and then the channel information is input into the PAGNN model as the input of the PAGNN model, and the PAGNN model outputs the power allocation vector at this time as the power pre-allocation value. Based on the power pre-allocation result and other information of the device (remaining energy, device state, number of data samples, etc.), the device selection algorithm is executed, and the device scheduling algorithm outputs the devices participating in the training in this round. Finally, the channel state information matrix corresponding to the devices in this round is input into the model to obtain the final power allocation value. The selected devices use the power for wireless transmission of model data.
[0096] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements shall be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for optimizing power allocation and device scheduling for wireless federated learning, characterized in that: The base station and the plurality of devices perform wireless federated learning, wherein steps S1-S6 are performed before each round of local training of the wireless federated learning, the devices participating in the training of the round of wireless federated learning are selected, and power is allocated to the selected devices, the selected devices perform local training of the round based on the aggregated model parameters distributed by the base station, and send the trained model parameters to the base station, the base station aggregates the received model parameters to serve as model parameters to be distributed in the next round, thereby implementing federated learning, S1, constructing a channel state information matrix based on channel gains and channel interference coefficients between devices, and calculating an utility function of each device; S2, constructing a power allocation objective function, obtaining a first power allocation vector and a first device selection vector based on the channel state information matrix and the power allocation objective function, and obtaining the first device selection vector by: obtaining the transmission time and the transmission packet error rate of each device based on the first power allocation vector, and the expression is: , , , in, represents the interference plus noise ratio of device n to the base station signal in the tth round of wireless federated learning; represents the signal gain of device n; The power of device n in the tth round of wireless federated learning is determined by the first power allocation vector Get; m represents the mth device; represents the channel interference coefficient between device m and device n; The power of device m in the tth round of wireless federated learning is determined by the first power allocation vector Get; Indicates the transmission time; Indicates the communication bandwidth; Indicates the size of the data packet transmitted by the device to the base station; represents the transmission packet error rate of device n in the tth round of wireless federated learning; Indicates the waterfall threshold, which is a preset constant; selecting devices that meet the screening conditions based on the transmission power, the transmission time and the transmission packet error rate, and generating the first device selection vector with the power allocation objective function as the screening condition; S3, updating the utility function of the corresponding device based on the first device selection vector, and constructing a device selection objective function; S4, correcting the first device selection vector based on the device selection objective function to obtain a second device selection vector; S5, obtaining a second power allocation vector based on the channel state information matrix, the second device selection vector and the power allocation objective function; S6, selecting devices participating in the training of the round of wireless federated learning based on the second device selection vector, and allocating power to the selected devices based on the second power allocation vector.
2. The method of claim 1, wherein, The method for constructing the channel state information matrix is: calculating the channel gain of each device and the channel interference coefficient between each two devices; Based on the channel gain and the channel interference coefficient, a channel state information matrix element is given, i.e. , where N represents the total number of devices; n and m represent the nth or the mth device, n = 1, 2, … N, m = 1, 2, … N; represents the element of the nth row and the nth column in the channel state information matrix; represents the element of the nth row and the mth column in the channel state information matrix; represents the channel gain of the device n; represents the channel interference coefficient between the device n and the device m.
3. The method of claim 1, wherein, The calculation method of the utility function is: obtaining a local data set of the device, calculating the utility function based on the local data set, and the expression is: wherein, represents the utility function of the device n in the tth round of wireless federated learning; represents that the device n is selected in the tth round of wireless federated learning when represents that the device n is selected in the tth round of wireless federated learning when represents that the device n is not selected in the tth round of wireless federated learning when represents the local data set of the device n.
4. The method of claim 1, wherein, The expression of the power allocation objective function is: , , , , wherein, denotes the number of devices participating in power allocation; denotes the energy efficiency weight of wireless transmission of device n; denotes the energy efficiency of wireless transmission of device n per federated learning round; denotes the set of device indices; denotes the minimum value of device transmit power; denotes the maximum value of device transmit power; denotes the transmit power of device n among devices corresponding to a channel state information matrix; denotes the transmission time of device n among devices corresponding to a channel state information matrix; denotes the limit transmission time; denotes the packet error rate of device n among devices corresponding to a channel state information matrix; denotes the limit packet error rate of device n among devices corresponding to a sub-matrix.
5. The method of claim 4, wherein, The method for obtaining the first power allocation vector is: constructing a graph based on the channel state information matrix, wherein the nodes of the graph are devices, and the edges are channel connections between devices; obtaining a non-local dependency relationship between nodes based on the graph and assigning different weights to each node using an attention mechanism to generate an intermediate graph; updating the feature information of each node based on the information of adjacent nodes of each node in the intermediate graph; performing feature extraction using convolution operation based on the updated feature information, combining the result of the feature extraction with the power allocation objective function, and generating the first power allocation vector.
6. The method of claim 1, wherein, The method for updating the utility function of the corresponding device based on the first device selection vector is: , wherein, is the updated utility function, denotes the current energy of device n in the devices corresponding to the first device selection vector to the required energy; denotes the total rounds of wireless federated learning; denotes the t-th round of wireless federated learning; denotes the energy consumption of the computation phase of the t-th round of wireless federated learning; denotes the energy consumption of the wireless transmission of the t-th round of wireless federated learning.
7. The method of claim 1, wherein, The expression of the device selection objective function is: , , , , , in, represents the device selection matrix, obtained by the first device selection vector; represents the energy efficiency of the computation phase of the tth round of wireless federated learning; ,when When , it means that device n is selected in the tth round of wireless federated learning. When , it means that device n is not selected in the tth round of wireless federated learning; Represents the local dataset of device n; Indicates the device index; Indicates the wireless federated learning round index; Indicates the maximum number of devices selected in each round of wireless federated learning; represents the updated utility function; represents a hyperparameter; Indicates the time of the tth round of wireless federated learning calculation for device n; Indicates the device's limited computing time.
8. The method of claim 1, wherein, The method for obtaining the second device selection vector is to solve the device set corresponding to the first device selection vector based on the device selection objective function using a standard branch and bound method to generate the second device selection vector.
9. The method of claim 1, wherein, The method for obtaining the second power allocation vector is: Based on the second device selection vector, filtering the matrix elements meeting the condition in the channel state information matrix to construct a sub-matrix; Based on the sub-matrix and a power allocation target function, a second power allocation vector is obtained.
Citation Information
Patent Citations
Resource allocation method and system for multitask federated learning in 5G network
CN113900796A
Federal learning method based on partial customer participation and power constraint
CN115549962A