Method for optimizing power distribution and equipment scheduling of wireless federated learning
By constructing a channel state information matrix and computing device utility function, combining graph neural network and convolution operation, power allocation and device scheduling in wireless federated learning are optimized, and the problems of channel interference and hardware limitation are solved, and efficient and stable wireless transmission and training efficiency are improved.
Patent Information
- Application Number
- CN202510003987.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-01-02
AI Technical Summary
Wireless federated learning faces problems such as channel interference and hardware limitations in wireless networks. The existing optimization methods fail to effectively balance equipment performance, energy consumption and channel interference, resulting in an increase in transmission error rate and low training efficiency.
By constructing a channel state information matrix, the utility function of the device is calculated, and based on this, the power allocation objective function and device selection objective function are constructed, and feature extraction is performed using graph neural network and convolution operations, and the success rate allocation vector and device selection vector are generated to achieve accurate and efficient power allocation and device scheduling.
It realizes more accurate and efficient power distribution in wireless federated learning, reduces transmission error rate, improves training efficiency and final performance of the model, and ensures the stability and efficiency of transmission.
Smart Images

Figure CN120018289A_ABST
Abstract
Description
Technical Field
[0001] The present invention 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 Art
[0002] Wireless federated learning enables mobile devices to collaboratively learn machine learning models without sharing their sensitive raw data, thus transforming centralized training into distributed training. After using wireless federated learning, distributed data stakeholders (such as mobile devices) only need to upload their updated local models to the central server regularly without uploading their potentially private raw data, which greatly reduces the risk of privacy leakage. Although wireless federated learning can solve data silos and privacy issues, it faces many challenges in wireless networks, as follows: 1) Lossy communication: When training FL algorithms on wireless networks, users must transmit training parameters over wireless links. Due to the limitations of inter-channel interference and the inherent unreliability of wireless links, model transmission errors or inability to upload will occur, thereby introducing training errors and may also cause performance degradation of the global model. 2) Hardware limitations: The hardware capabilities of wireless devices are usually limited, and insufficient computing power of the device may limit the training efficiency of the model. In addition, the battery energy of the device is limited, which limits the number of rounds it participates in FL. Since each round of training consumes a certain amount of energy, the limited energy budget may cause the device to be unable to continuously participate in training, which in turn affects 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. Due to the shortage of wireless communication resources, only a limited number of devices can participate in each round of training, which requires the base station (BS) to strategically select a subset of devices to participate in training in each round. Most client selection algorithms focus on optimizing the performance of the global FL model by selecting clients with more data samples or smaller losses. These algorithms often aim to improve model accuracy. For energy efficiency in wireless federated learning, resource allocation is mainly optimized through modeling, but most of them only focus on one aspect of performance optimization or energy consumption management of the FL model, and often ignore the trade-off between these two factors. Although there are currently existing optimization methods that combine device scheduling and wireless resource allocation, most of them assume that the model transmits data on ideal orthogonal channels and does not consider interference between channels. This assumption usually leads to the optimization algorithm allocating the maximum transmission power within a limited range to each device. However, in actual wireless communication scenarios, due to the existence of interference between channels, such a power allocation algorithm may lead to an increase in the error rate of wireless transmission.
[0003] Therefore, providing a wireless federated learning efficiency optimization method that can balance device performance, device energy consumption, and interference between channels is a technical problem that needs to be solved. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a method for optimizing power allocation and device scheduling of wireless federated learning. It comprehensively considers the channel interference between devices and the actual needs of the devices to achieve more accurate and efficient power allocation. At the same time, it uses a real-time client scheduling algorithm to achieve energy efficiency in the two stages of wireless communication and device calculation.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] The present invention provides a method for optimizing power allocation and device scheduling of wireless federated learning. Before each round of local training of wireless federated learning, steps S1-S6 are executed to select devices participating in the current round of wireless federated learning training and allocate power to the selected devices. The selected devices perform local training of the current 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 as the model parameters to be distributed in the next round, thereby realizing federated learning.
[0007] S1. Construct a channel state information matrix based on the channel gain and the channel interference coefficient between devices, and calculate the utility function of each device;
[0008] S2. Construct a power allocation objective function, and obtain a first power allocation vector and a first device selection vector based on the channel state information matrix and the power allocation objective function;
[0009] S3. Update the utility function of the corresponding device based on the first device selection vector and construct a device selection objective function;
[0010] S4, modifying the first device selection vector based on the device selection objective function to obtain a second device selection vector;
[0011] S5. Acquire a second power allocation vector based on the channel state information matrix, the second device selection vector and the power allocation objective function;
[0012] S6. Select a device participating in this round of wireless federated learning training based on the second device selection vector, and allocate power to the selected device based on the second power allocation vector.
[0013] As a preferred technical solution, the method for constructing the channel state information matrix is:
[0014] Calculate the channel gain of each device and the channel interference coefficient between every two devices;
[0015] Based on the channel gain and channel interference coefficient, the channel state information matrix element is assigned, that is, H n,n =α n , H n,m =β n,m ,n≠m, where N represents the total number of devices; n and m represent the nth or mth device, n=1,2,…N, m=1,2,…N; H n,n represents the element in the nth row and nth column of the channel state information matrix; H n,m Represents the element in the nth row and mth column of the channel state information matrix; α n represents the channel gain of device n; β n,m represents the channel interference coefficient between device n and device m.
[0016] As a preferred technical solution, the method for calculating the utility function is: obtaining a local data set of the device, and calculating the utility function based on the local data set, and its expression is: U(n,t)=a n,t D n , where U(n,t) represents the utility function of device n in the tth round of wireless federated learning; a n,t ∈{0,1, when a n,t =1 indicates that device n is selected in the tth round of wireless federated learning. n,t = 0, it means that device n is not selected in the tth round of wireless federated learning; D n Represents the local dataset of device n.
[0017] As a preferred technical solution, the expression of the power allocation objective function is:
[0018]
[0019] Where N0 represents the number of devices involved in power allocation; μ n represents the energy efficiency weight of wireless transmission of device n; represents the wireless transmission energy efficiency of each federated learning round of device n; Represents a device index set; p min Indicates the minimum value of the device's transmit power; p max Indicates the maximum transmit 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; Indicates limited transmission time; represents the packet error rate of device n in the devices corresponding to the channel state information matrix; q0 represents the limited packet error rate of device n in the devices corresponding to the sub-matrix;
[0020] As a preferred technical solution, the method for obtaining the first power allocation vector is:
[0021] 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 the devices;
[0022] Based on the graph, non-local dependencies between nodes are obtained and different weights are assigned to each node using an attention mechanism to generate an intermediate graph;
[0023] Based on the intermediate graph, aggregate the information of the adjacent nodes of each node and update the feature information of each node;
[0024] Based on the updated feature information, feature extraction is performed using a convolution operation, and a first power allocation vector is generated by combining the result of the feature extraction with the power allocation objective function.
[0025] As a preferred technical solution, the method for obtaining the first device selection vector is:
[0026] Based on the first power allocation vector, the transmission power of each device is obtained, and the transmission time and transmission packet error rate of each device are calculated, and the expression is:
[0027]
[0028] Among them, 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; α n represents the signal gain of device n; p n,t The power of device n in the tth round of wireless federated learning is determined by the first power allocation vector p t Get; m represents the mth device; β n,m represents the channel interference coefficient between device m and device n; p m,t The power of device m in the tth round of wireless federated learning is determined by the first power allocation vector p t Get; represents the transmission time; B represents the communication bandwidth; M represents the size of the data packet transmitted from 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] Based on the transmission power, transmission time and transmission packet error rate, the power allocation objective function constraint is used as a screening condition, and a device that meets the screening condition is selected 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] 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 to the total number of rounds of wireless federated learning. 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 tth round of wireless federated learning calculation phase; It represents the energy consumption of wireless transmission in the tth round of wireless federated learning.
[0033] As a preferred technical solution, the expression of the equipment selection objective function is:
[0034]
[0035]
[0036] Wherein, A represents a device selection matrix, which is obtained by the first device selection vector; represents the energy efficiency of the computation phase of the tth round of wireless federated learning; a n,t ∈{0,1, when a n,t =1 indicates that device n is selected in the tth round of wireless federated learning. 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; Indicates the device index; represents the wireless federated learning round index; N0 represents the maximum number of devices selected in each round of wireless federated learning; U′(n,t) represents the updated utility function; η represents the hyperparameter; It represents the time when device n performs the calculation in the tth round of wireless federated learning; Indicates the limited computing 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 objective function, a standard branch and bound method is used to solve 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, selecting matrix elements that meet the conditions in the channel state information matrix to construct a sub-matrix;
[0040] Based on the sub-matrix and the power allocation objective function, a second power allocation vector is obtained.
[0041] Compared with the prior art, the present invention has the following advantages:
[0042] 1) Compared with the existing power allocation algorithm, the present invention takes into account the interference effect between device channels, and reasonably schedules high-energy-consuming devices to the later stage of federated learning by defining the device's federated learning utility function. It also models and constrains the important constraints in the wireless federated learning power allocation problem, including transmission power limit, transmission time limit, and transmission packet error limit. It preliminarily screens qualified devices according to the constraints. It then constructs the device selection objective function and performs device selection correction to ensure that the most suitable device for training in the current round is selected. Finally, it reallocates the power of each device according to the corrected device selection to maximize the transmission benefit, which not only optimizes the wireless communication efficiency and device computing efficiency of devices in wireless federated learning, but also ensures the stability and efficiency of transmission.
[0043] 2) The present invention can quickly respond to changes in channel conditions by collecting and updating channel communication status information in real time, and can adaptively and dynamically adjust power allocation and device scheduling strategies based on the changed channel communication status information in a timely manner, and can adapt to different wireless federated learning communication environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a schematic diagram of the structure of an infinite federated learning system in an embodiment of the present invention;
[0045] Figure 2 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0047] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0048] A wireless federated learning system located in an area of 500m×500m is selected, and its framework is as follows Figure 1 As shown in the figure, the detailed system consists of 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 dataset D n , where n represents the nth device and n∈[1,16; the 16 devices in the current base station plan to participate in wireless federated learning (FL). 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, in order to achieve mapping. After the training is completed, the device uploads its local model to the base station via the wireless network, and the base station performs model aggregation. The global model is updated in the form of:
[0049]
[0050] Among them, a n,t ∈{0,1, when a n,t =1 indicates that device n is selected in the tth round of wireless federated learning. 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,tRepresents the local model of device n in the tth round of wireless federated learning.
[0051] In order to maximize the computational efficiency of wireless signal transmission and local training of the device in the above process, the energy efficiency of each round of computing and wireless transmission of the device is optimized, and the objective function and constraints are constructed as shown in formula P1:
[0052]
[0053] Among them, A=(a n,t )∈R N×T represents the device selection matrix, N = 16 represents the number of devices, and T = 30 represents infinite federated learning rounds; represents the computing energy consumption of wireless federated learning in the tth round; represents the energy consumption of the wireless transmission stage in the tth round of wireless federated learning; Indicates the device index; represents the round index; N0 represents the maximum number of devices that can participate in each round of training; U(n,t) represents the utility function of device n in the tth round of wireless federated learning; η represents a hyperparameter; Indicates the time of the tth round of wireless federated learning calculation of device n; represents the time limit of the tth round of wireless federated learning calculation; p min Indicates the minimum transmission power of the device. In this embodiment, p min =10 -6 W;p m2x Indicates the maximum transmission power of the device. In this embodiment, p max =0.1W; represents the transmission time of device n in the device corresponding to the channel state information matrix; Indicates limited transmission time; represents the packet error rate of device n in the device corresponding to the channel state information matrix H; q0 represents the limited packet error rate of device n in the device corresponding to the sub-matrix; E n Represents the device energy, which indicates the total energy available for FL.
[0054] Specifically, the calculation formula for the energy consumption of the tth round of wireless federated learning is:
[0055]
[0056] δ n represents the energy coefficient of device n; ε n Indicates the number of CPU cycles required for device n to process each bit of sample data; ω n The number of bits representing each data sample; D n Represents the local data of device n; f nrepresents 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 introducing device n in the tth round is U(n,t)=a n,t D n , according to the utility function, the calculation formula for the energy consumption of the tth round of wireless federated learning 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 represents the total number of devices; n and m represent the nth or mth device, n=1,2,…N, m=1,2,…N; H n,n represents the element in the nth row and nth column of the channel state information matrix; H n,m Represents the element in the nth row and mth column of the channel state information matrix; α n represents the channel gain of device n; β n,m represents the channel interference coefficient between device n and device m.
[0059]
[0060] h n represents the channel from device n to the base station; Represents the variance of the additive Gaussian noise.
[0061] The calculation formula for transmission time and transmission packet error rate is:
[0062]
[0063] 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; α n represents the signal gain of device n; p n,t The power of device n in the tth round of wireless federated learning is determined by the first power allocation vector p t Get; m represents the mth device; β n,m represents the channel interference coefficient between device m and device n; p m,t The power of device m in the tth round of wireless federated learning is determined by the first power allocation vector p t Get; represents the transmission time; B represents the communication bandwidth; M represents the size of the data packet transmitted from 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.
[0064] The expression of energy efficiency of the wireless transmission phase in round t is:
[0065]
[0066] represents the energy of device n in the wireless transmission stage; μ n Represents the energy efficiency weight of each device's wireless transmission.
[0067] Due to the existence of long-term constraints in the optimization problem, resource allocation between different rounds becomes coupled with each other, resulting in the complexity of solving the problem increasing with the number of rounds T. To solve this problem, the greedy strategy is adopted in the present invention to convert the P1 optimization problem into two optimization problems of P11 and P12, and the optimization objective is restated as maximizing the total energy benefit of each round of FL.
[0068] Among them, P11 is the power allocation objective function, and its expression is:
[0069]
[0070] Where N0 represents the number of devices involved in power allocation; μ n represents the energy efficiency weight of wireless transmission of device n; represents the wireless transmission energy efficiency of each federated learning round of device n; Represents a device index set; P min Indicates the minimum value of the device's transmit power; p max Indicates the maximum transmit 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; Indicates limited transmission time; represents the packet error rate of device n in the devices corresponding to the channel state information matrix; PER0 represents the limited packet error rate of device n in the devices corresponding to the sub-matrix.
[0071] P12 is the device selection objective function, and its expression is:
[0072]
[0073]
[0074] Wherein, A represents a device selection matrix, which is obtained by the first device selection vector; represents the energy efficiency of the computation phase of the tth round of wireless federated learning; a n,t ∈{0,1, when a n,t =1 means that device n is selected in the tth round of wireless federated learning, 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; Indicates the device index; represents the wireless federated learning round index; N0 represents the maximum number of devices selected in each round of wireless federated learning; U′(n,t) represents the updated utility function; η represents the hyperparameter; Indicates the time of the tth round of wireless federated learning calculation of device n; Indicates the limited computing time of the device.
[0075] Based on the above conditions, before each round of local training of wireless federated learning, steps S1-S6 are executed to select devices participating in this round of wireless federated learning training and allocate power to the selected devices. The selected devices perform local training of this 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 as the model parameters to be distributed in the next round to realize federated learning. The process is as follows: Figure 2 As shown, the detailed steps include:
[0076] S1. Obtain the channel state information matrix and calculate the utility function of each device.
[0077] S2. Obtain a power allocation objective function, and based on the channel state information matrix H and the power allocation objective function S1, obtain a first power allocation vector and a 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 very challenging to directly solve S1. Therefore, a graph neural network PAGNN is introduced to parameterize the power allocation function, thereby reducing the dimension of the sub-problem S1. The original optimization problem is transformed into an unrestricted problem through the Lagrangian dual learning framework. Finally, the gradient descent method is used to train the model 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, where the nodes of the graph are devices and the edges are channel connections between the devices.
[0080] S22. Use a graph attention network (GAT) with a feature dimension of eight and eight attention heads to obtain the non-local dependencies between nodes in the graph, and use the attention mechanism to assign different weights to each node, so as to better handle the complex interactions 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 transmission 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, the constraints in the power allocation objective function S1 are used as screening conditions to select devices that meet the screening conditions, and exclude those devices 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, generates 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, based on the current energy of the device, the energy consumption of this round and the first device selection vector, the utility function of the corresponding device is updated, and based on the updated utility function, the device selection objective function S2 is obtained. 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 tth round of wireless federated learning calculation phase; It 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) Devices with high energy consumption per round usually process a larger amount of data, which makes them more likely to be unable to participate in the entire FL process, and allocating more data for training in the later stages 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 to ensure the quality of the final FL model. 2) The utility function update can ensure the balance of energy consumption between 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, a standard branch and bound method is used to solve the device set corresponding to the first device selection vector to generate a second device selection vector.
[0091] S5. Obtain a second power allocation vector based on the channel state information matrix, the second device selection vector, and the power allocation objective function.
[0092] S51, based on the second device selection vector, select the matrix elements that meet the conditions in the channel state information matrix to construct a submatrix H′;
[0093] S52: Input the sub-matrix H′ into the PAGNN, and output a second power allocation vector.
[0094] S6. Select a device participating in this round of wireless federated learning training based on the second device selection vector, and allocate power to the selected device based on the second power allocation vector.
[0095] That is, in this wireless federated learning system, for the federated learning (FL) task, a single-layer feedforward neural network with hyperbolic tangent activation and cross entropy loss is used, and the network is trained on the MNIST dataset for multi-classification tasks. The number of data samples at each mobile device is sampled from the 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 with its own device data. At the beginning of each FL iteration, a channel realization is randomly selected from the test set to simulate a dynamic wireless environment, and then the channel information is used 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 current information of the device (remaining energy, device status, 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 device in this round is used to input the model to obtain the final power allocation value. The selected device uses this power for wireless transmission of model data.
[0096] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on 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 multiple devices perform wireless federated learning, wherein before each round of local training of wireless federated learning, steps S1-S6 are executed to select devices participating in this round of wireless federated learning training and allocate power to the selected devices. The selected devices perform local training of this 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 as the model parameters to be distributed in the next round, thereby realizing federated learning. S1. Construct a channel state information matrix based on the channel gain and the channel interference coefficient between devices, and calculate the utility function of each device; S2. Construct a power allocation objective function, and obtain a first power allocation vector and a first device selection vector based on the channel state information matrix and the power allocation objective function; S3. Update the utility function of the corresponding device based on the first device selection vector and construct a device selection objective function; S4, modifying the first device selection vector based on the device selection objective function to obtain a second device selection vector; S5. Acquire a second power allocation vector based on the channel state information matrix, the second device selection vector and the power allocation objective function; S6. Select a device participating in this round of wireless federated learning training based on the second device selection vector, and allocate power to the selected device based on the second power allocation vector.
2. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 1, characterized in that: The method for constructing the channel state information matrix is: Calculate the channel gain of each device and the channel interference coefficient between every two devices; Based on the channel gain and channel interference coefficient, the channel state information matrix element is assigned, that is, H n,n =α n , H n,m =β n,m ,n≠m, where N represents the total number of devices; n and m represent the nth or mth device, n=1,2,…N, m=1,2,…N; H n,n represents the element in the nth row and nth column of the channel state information matrix; H n,m Represents the element in the nth row and mth column of the channel state information matrix; α n represents the channel gain of device n; β n,m represents the channel interference coefficient between device n and device m.
3. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 1, characterized in that: The utility function is calculated by 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 , where U(n,t) represents the utility function of device n in the tth round of wireless federated learning; a n,t ∈{0,1}, when a n,t =1 indicates that device n is selected in the tth round of wireless federated learning. n,t = 0, it means that device n is not selected in the tth round of wireless federated learning; D n Represents the local dataset of device n.
4. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 1, characterized in that: The expression of the power allocation objective function is: Where N0 represents the number of devices involved in power allocation; μ n represents the energy efficiency weight of wireless transmission of device n; represents the wireless transmission energy efficiency of each federated learning round of device n; Represents a device index set; p min Indicates the minimum value of the device's transmit power; p max Indicates the maximum transmit power of the device; p n (H) represents the transmit 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; Indicates limited transmission time; represents the packet error rate of device n in the devices corresponding to the channel state information matrix; q0 represents the limited packet error rate of device n in the devices corresponding to the sub-matrix.
5. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 4, characterized in that: 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 the devices; Based on the graph, non-local dependencies between nodes are obtained and different weights are assigned to each node using an attention mechanism to generate an intermediate graph; Based on the intermediate graph, aggregate the information of the adjacent nodes of each node and update the feature information of each node; Based on the updated feature information, feature extraction is performed using a convolution operation, and a first power allocation vector is generated by combining the result of the feature extraction with the power allocation objective function.
6. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 5, characterized in that: The method for obtaining the first device selection vector is: Based on the first power allocation vector, the transmission power of each device is obtained, and the transmission time and transmission packet error rate of each device are calculated, and the expression is: Among them, 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; α n represents the signal gain of device n; p n,t The power of device n in the tth round of wireless federated learning is determined by the first power allocation vector p t Get; m represents the mth device; β n,m represents the channel interference coefficient between device m and device n; p m,t The power of device m in the tth round of wireless federated learning is determined by the first power allocation vector p t Get; represents the transmission time; B represents the communication bandwidth; M represents the size of the data packet transmitted from 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; Based on the transmission power, transmission time and transmission packet error rate, the power allocation objective function constraint is used as a screening condition, and a device that meets the screening condition is selected to generate a first device selection vector.
7. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 1, characterized in that: The method for updating the utility function of the corresponding device based on the first device selection vector is: 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 to the total number of rounds of wireless federated learning. The ratio of the required energy to the total number of rounds of wireless federated learning to the required energy. The ratio of the required energy ... represents the energy consumption of the tth round of wireless federated learning calculation phase; It represents the energy consumption of wireless transmission in the tth round of wireless federated learning.
8. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 1, characterized in that: The expression of the device selection objective function is: Wherein, A represents a device selection matrix, which is obtained by the first device selection vector; represents the energy efficiency of the computation phase of the tth round of wireless federated learning; a n,t ∈{0,1}, when a n,t =1 means that device n is selected in the tth round of wireless federated learning, 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; Indicates the device index; represents the wireless federated learning round index; N0 represents the maximum number of devices selected in each round of wireless federated learning; U′(n,t) represents the updated utility function; η represents the hyperparameter; Indicates the time of the tth round of wireless federated learning calculation of device n; Indicates the limited computing time of the device.
9. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 1, characterized in that: The method for obtaining the second device selection vector is: based on the device selection objective function, a standard branch and bound method is used to solve the device set corresponding to the first device selection vector to generate the second device selection vector.
10. The method for optimizing power allocation and device scheduling of wireless federated learning according to claim 1, characterized in that: The method for obtaining the second power allocation vector is: Based on the second device selection vector, selecting matrix elements that meet the conditions in the channel state information matrix to construct a sub-matrix; Based on the sub-matrix and the power allocation objective 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
Machine learning model training method and apparatus
US20240265311A1