Method for jointly optimizing quantization level and client selection in federated learning network
By configuring energy harvesting modules for clients and optimizing quantification levels and client selection, the problem of limited energy resources in wireless networks was solved, achieving efficient data uploading and improved accuracy, while optimizing energy utilization and client selection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG GONGSHANG UNIVERSITY
- Filing Date
- 2023-04-11
- Publication Date
- 2026-05-12
AI Technical Summary
In wireless networks deploying federated learning, the question arises of how clients can provide high energy consumption for model uploading and local computation, especially how to optimize quantization levels and client selection when energy resources are limited.
To configure an energy harvesting module for the client, a method for jointly optimizing the quantization level and client selection is designed. By constructing a federated learning network model carrying the energy harvesting module, the training loss problem is equivalently replaced by the expected distance problem. The differential weights are quantized using a generalized quantization method to optimize the quantization level and client selection, which is transformed into a non-convex mixed-integer nonlinear optimization problem. Finally, it is transformed into a convex optimization problem for solution.
The system optimizes client selection, quantization level, and energy consumption, improves the accuracy of the data upload process, solves the problem of limited power supply for devices in traditional networks, and enhances the system's energy utilization efficiency and data upload accuracy.
Smart Images

Figure CN116471612B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication, and more particularly to the design of a wireless federated learning system with an energy harvesting module. Background Technology
[0002] Federated learning networks, with their low privacy risks and low transmission costs, combined with energy harvesting technology, are a current research hotspot in the field of wireless communications. The rapid increase in processor computing power and the explosive growth of mobile data mean that clients and servers need better information processing capabilities; the limited nature of wireless resources necessitates improved resource allocation capabilities.
[0003] Scheduling schemes are an important research direction in federated learning. During the training phase, rationally allocating bandwidth and energy resources among clients helps reduce communication rounds and improve communication quality. Quantization techniques can significantly reduce the cost of wireless resources. Compared to schemes without quantization, a well-designed quantization scheme can largely maintain the same convergence speed. If the model weights themselves are transitive, the quantization level should increase at a logarithmic rate. However, if transitive weight differencing is used instead, the quantization level can remain unchanged.
[0004] Introducing an energy harvesting module into a federated learning network removes the constraint of wired power supply from client devices. The introduction of the energy harvesting module alters the resource allocation mechanism, thus the parameters of each round in the system are related to the energy state and energy arrival characteristics. Changes in the energy state have a significant impact on client scheduling and quantization level. In this invention, we allow the independent selection of the quantization level for each round of federated learning based on the current energy reserves and reveal the impact of the quantization level on the convergence speed. Summary of the Invention
[0005] The purpose of this invention is to address the problem of how clients can provide high energy consumption for model uploading and local computation in wireless networks deploying federated learning. This invention configures an energy harvesting module for the client, utilizes the acquired energy to schedule the client for local computation to obtain weight vectors, and employs generalized quantization to quantize and upload the weight vectors. Considering the finite nature of energy, a federated learning wireless network system with an energy harvesting module is designed, and a method for jointly optimizing the quantization level and client selection within this system is proposed.
[0006] The technical solution adopted in this invention is as follows:
[0007] A method for jointly optimizing quantization level and client selection in an energy-harvesting federated learning network includes the following steps:
[0008] Step 1: Construct a federated learning network model carrying an energy harvesting module;
[0009] Step 2: Replace the training loss problem of federated learning networks with the expected distance problem between the current and optimal weight models;
[0010] Step 3: Considering the impact of the weight vector on the quantization level, perform weight difference processing on the local weight vector, and use the generalized quantization method to quantize the difference weights, and explore the impact of weight difference on the optimal quantization rate.
[0011] Step 4: For the (t+1)th round of model update, select K clients for training. Based on the quantization algorithm, differentially quantize the updated local weight vector to obtain the new round of global weight vector.
[0012] Step 5: Under the constraint of minimizing energy causality, optimize the quantization level and client selection to construct a non-convex mixed-integer nonlinear optimization problem;
[0013] Step 6: Finally, transform it into a convex optimization problem, which can be solved using the MINLP solver.
[0014] Furthermore, based on the above technical solution, each step can be implemented in the following specific ways.
[0015] The method for constructing the federated learning network model carrying the energy harvesting module in step 1 is as follows:
[0016]
[0017] in, This represents the global loss function in federated learning. Indicates the number of clients. Indicates the client The loss function.
[0018] Furthermore, in step 2, the problem of training loss in federated learning networks is equivalently replaced by the problem of the expected distance between the current and optimal weight models as follows:
[0019]
[0020] in This represents the loss after T rounds of global training. This represents the optimal loss under global weights. This represents the global weight after T rounds. Let L represent the optimal global weights, and L represent the rate of change of the loss function. This represents the expected value between the global weights and the optimal weights after T rounds of training.
[0021] Furthermore, step 3 employs a generalized quantization method to quantize the differential weights and explores the impact of the differential weights on the quantization level and the impact of the quantization level on the convergence speed as follows:
[0022] 3.a) This method satisfies unbiasedness, and the quantization error, bounded by the number of bits B, satisfies two conditions:
[0023]
[0024] in Indicates the quantization method, The function representing the number of quantization bits is a decreasing convex function.
[0025] 3.b) Based on loss function L-smooth, - Strong convexity, unbiased and bounded stochastic gradients on the client side, yielding:
[0026]
[0027] in, , Indicates the first Round learning rate, E represents the selected number of local iterations in the client-side algorithm, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. Indicates the degree of heterogeneity of the dataset. Indicates the first +1 round weight vector Let T represent the globally optimal weight vector, T represent the number of global iterations during training, and M represent the number of clients selected in the t-th iteration. Indicates the first A function of the number of bits for time quantization;
[0028] Among them, "loss function" L-smooth, "Strong convexity" specifically refers to the loss function. The rate of change is L and the degree of bending is "The client-side stochastic gradient is unbiased and bounded" means that the expected value of the client-side k stochastic gradient in each round is equal to the true gradient and the variance of the stochastic gradient is bounded.
[0029] 3.c) For the t-th round, we set the learning rate to... The boundary conditions for quantized federated learning then satisfy:
[0030] in, , E represents the selected number of local iterations in the client-side algorithm, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. Indicates the degree of heterogeneity of the dataset. This represents the loss after T rounds of global training. This represents the weight vector for round T. This represents the optimal loss under global weights.
[0031] If the weights are differentially quantized, federated learning can cover... The globally optimal rate is obtained, and as long as the assumption in 3.b) is satisfied, the quantization level of different rounds can be arbitrarily selected.
[0032] This is a common expression used in the industry, which actually means , represents the gradient descent convergence error, and "optimal rate" means that the gradient descent convergence error can decrease at the globally optimal rate.
[0033] To elaborate further, step 4 updates the weight vector as follows:
[0034] 4.a) Initialize client selection, using Indicates customer engagement. This indicates that customers are selected in round t. Training is then performed. Since only K clients are selected in each round, we must have:
[0035]
[0036] Furthermore, to ensure unbiased selection, each client is set to participate in the same number of training iterations, i.e.:
[0037] .
[0038] 4.b) The central parameter server broadcasts the information to the selected client in this round, and the client performs a partial update.
[0039] 4.c) After E local iterations, the local client has a new weight vector. Using the same quantization level for all clients, the server aggregates the received local weight differences to generate a new weight vector:
[0040]
[0041] in Indicates the first The weight vector of the wheel, Indicates the first The weight vector of the k-th client in the training round. The set of clients selected in round t+1. This indicates the quantification method. This is a standard expression of quantitative methods within this industry.
[0042] To elaborate further, step 5 refactors the MINLP problem:
[0043]
[0044] in, , where i is the iteration variable, representing the iteration order. from Multiply the terms up to T; L represents the rate of change of the loss function. The curve represents the curvature of the loss function, E represents the selected number of client-side local iterations, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. Indicates the degree of heterogeneity of the dataset. Indicates the first Learning rate of the round, This represents the number of quantization bits for the weight in round T.
[0045] because and It is invariant, therefore the problem can be transformed into a non-convex MINLP problem, that is:
[0046]
[0047] in, Indicates customer engagement. This indicates that customers are selected in round t. Conduct training. A function representing the number of quantization bits. This represents the length of the weight vector. This represents the number of quantized bits for the weights in round t. This represents the number of bits quantized by client m in round t. Indicates the upload time. This indicates the bandwidth allocated to each user. Represents the client in round t. Channel gain between the central parameter server and the central parameter server This represents the power spectral density of the noise in the network. This represents the energy consumed by the client during the t-th round of training. This represents the energy consumed by client m in one round of operation. This represents the energy collected in round t.
[0048] Furthermore, step 6 transforms the non-convex MINLP problem into a convex optimization problem. By solving the convex optimization problem, a solution is found to jointly optimize the quantization level and client scheduling:
[0049]
[0050] in, Indicates customer engagement. This indicates that customers are selected in round t. Conduct training. A function representing the number of quantization bits. This represents the length of the weight vector. This represents the number of quantized bits for the weights in round t. This represents the number of bits quantized by client m in round t. This represents the quantization level of client m when it is selected in round t. , Indicates the upload time. This indicates the bandwidth allocated to each user. Represents the client in round t. Channel gain between the central parameter server and the central parameter server This represents the power spectral density of the noise in the network. This represents the energy consumed by the client during the t-th round of training. This represents the energy consumed by client m in one round of operation. This represents the energy collected in round t.
[0051] The beneficial effects of this invention are as follows: The method for jointly optimizing quantization level and client scheduling in an energy-harvesting federated learning network proposed in this invention can optimize the selected clients, quantization level, and energy consumed by each selected client in each round. It solves the problem of devices being limited by finite power supplies in traditional networks. Furthermore, the optimization method proposed for this network improves the accuracy of data upload. Attached Figure Description
[0052] Figure 1 The training loss of the algorithm proposed in this invention is compared with that of the polling algorithm and the myopia algorithm on the MINIST dataset, which is not independent and identically distributed.
[0053] Figure 2 The accuracy of the algorithm proposed in this invention is compared with that of the polling algorithm and the myopia algorithm on the MINIST dataset, which is not independent and identically distributed.
[0054] Figure 3The training loss of the algorithm proposed in this invention is compared with that of the polling algorithm and the myopia algorithm on the CIFAR-10 dataset which is not independent and identically distributed.
[0055] Figure 4 The test accuracy of the algorithm proposed in this invention is compared with that of the polling algorithm and the myopia algorithm on the CIFAR-10 dataset, which is not independent and identically distributed. Detailed Implementation
[0056] This invention provides a method for jointly optimizing the selection of quantization levels and clients in a federated learning network, comprising the following steps:
[0057] 1) The method for constructing a federated learning network model carrying an energy harvesting module is as follows:
[0058]
[0059] in, This represents the global loss function in federated learning. Indicates the number of clients. Indicates the client The loss function.
[0060] 2) The method to equate the training loss problem of federated learning networks to the expected distance problem between the current and optimal weight models is as follows:
[0061]
[0062] in This represents the loss after T rounds of global training. This represents the optimal loss under global weights. This represents the global weight after T rounds. This represents the optimal global weight.
[0063] 3) Considering the impact of the weight vector on the quantization level, the local weight vector is processed by weight difference, and the difference weight is quantized using the generalized quantization method. The impact of weight difference on the optimal quantization rate is also explored.
[0064] 3.a) This method satisfies two conditions: unbiasedness and quantization error is a function of the number of bits B.
[0065]
[0066] in Indicates the quantization method, The function representing the number of quantization bits is a decreasing convex function.
[0067] 3.b) Based on loss function L-smooth, - Strong convexity, unbiased and bounded stochastic gradients on the client side, can be obtained
[0068]
[0069] in, , Indicates the first Round learning rate,
[0070] E represents the selected number of local iterations in the client-side algorithm, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. This indicates the degree of heterogeneity of the dataset.
[0071] 3.c) For the t-th round, we set the learning rate to... The boundary conditions for quantized federated learning then satisfy:
[0072]
[0073] in, E represents the selected number of local iterations in the client-side algorithm, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. This indicates the degree of heterogeneity of the dataset.
[0074] If the weights are differentially quantized, federated learning can cover... The globally optimal rate is obtained, and as long as the assumption in 3.b) is satisfied, the quantization level of different rounds can be arbitrarily selected.
[0075] 4) For the (t+1)th round of model update, select K clients for training, and based on the quantization algorithm, differentially quantize the updated local weight vector to obtain the new round of global weight vector;
[0076] 4.a) Initialize client selection, using Indicates customer engagement. This indicates that customers are selected in round t. Training is then performed. Since only K clients are selected in each round, we must have:
[0077]
[0078] Furthermore, to ensure unbiased selection, each client is set to participate in the same number of training iterations, i.e.:
[0079] .
[0080] 4.b) The central parameter server broadcasts the information to the selected client in this round, and the client performs a partial update.
[0081] 4.c) After E local iterations, the local client has a new weight vector. Using the same quantization level for all clients, the server aggregates the received local weight differences to generate a new weight vector:
[0082]
[0083] in Indicates the first The weight vector of the wheel, Indicates the first The weight vector of the k-th client in the training round. The set of clients selected in round t+1. This indicates quantification.
[0084] 5) Under the constraint of minimizing energy causality, optimize the quantization level and client selection to construct a non-convex mixed-integer nonlinear optimization problem:
[0085]
[0086] in , where i is the iteration variable, representing the iteration order. from Multiply the terms up to T; L represents the rate of change of the loss function. The curve represents the curvature of the loss function, E represents the selected number of client-side local iterations, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. Indicates the degree of heterogeneity of the dataset. Indicates the first Learning rate of the round, This represents the number of quantization bits for the weight in round T.
[0087] because and It is invariant, therefore the problem can be transformed into a non-convex MINLP problem, that is:
[0088]
[0089] in, Indicates customer engagement. This indicates that customers are selected in round t. Conduct training. A function representing the number of quantization bits. This represents the length of the weight vector. This represents the number of quantized bits for the weights in round t. This represents the number of bits that client m attempts to use for each weight in round t. Indicates the upload time. This indicates the bandwidth allocated to each user. Represents the client in round t. Channel gain between the central parameter server and the central parameter server This represents the power spectral density of the noise in the network. This represents the energy consumed by the client during the t-th round of training. This represents the energy consumed by client m in one round of operation. This represents the energy collected in round t.
[0090] 6) Finally, it is transformed into a convex optimization problem, which can be solved using solvers such as MINLP. The non-convex MINLP problem is transformed into a convex optimization problem. By solving the convex optimization problem, a solution to the joint optimization quantization level and client scheduling problem is found as follows:
[0091]
[0092] in, Indicates customer engagement. This indicates that customers are selected in round t. Conduct training. A function representing the number of quantization bits. This represents the length of the weight vector. This represents the number of quantized bits for the weights in round t. This represents the number of bits quantized by client m in round t. This represents the quantization level of client m when it is selected in round t. It is the upper limit of the number of quantization bits. Indicates the upload time. This indicates the bandwidth allocated to each user. Represents the client in round t. Channel gain between the central parameter server and the central parameter server This represents the power spectral density of the noise in the network. This represents the energy consumed by the client during the t-th round of training. This represents the energy consumed by client m in one round of operation. This represents the energy collected in round t.
[0093] Appendix Figures 1 to 4 The patented method in this invention refers to the method used in this invention.
[0094] Considering the heterogeneity of data in real-world scenarios, this algorithm uses non-independent and identically distributed data from the MINIST dataset. Figure 1 This paper compares the training loss of the proposed algorithm with that of the polling algorithm and the myopia algorithm on the MINIST dataset, which is not independent and identically distributed. Figure 2 This paper compares the test accuracy of the proposed algorithm with that of the polling algorithm and the myopia algorithm on the MINIST dataset, which is not independent and identically distributed. Due to the high heterogeneity of the data distribution, the entire training process is slightly unstable, exhibiting sawtooth-like fluctuations. Figure 1 and Figure 2 As can be seen, compared to the polling algorithm, this invention exhibits lower training loss and higher testing accuracy. This is because the invention includes an energy harvesting module for the client, ensuring sufficient energy for the quantization process. The myopia algorithm, compared to this algorithm, performs worse. This algorithm, while ensuring scheduling fairness, optimizes energy utilization to the maximum extent, enabling the system to employ a higher quantization level, thereby reducing training loss and improving testing accuracy.
[0095] In addition, this algorithm also uses non-independent and identically distributed data from the CIFAR-10 dataset. Figure 3 A comparison of the training loss of the proposed algorithm with the polling algorithm and the myopia algorithm on the non-independent and identically distributed CIFAR-10 dataset is presented. Figure 4 This paper compares the test accuracy of the proposed algorithm with the polling algorithm and the myopia algorithm on the CIFAR-10 dataset, which is not independent and identically distributed. Regarding quantization level, the polling algorithm performs worse than this algorithm due to its lower quantization level. In terms of client scheduling, the myopia algorithm exhibits the worst performance due to significant training bias caused by unfair client selection. Compared to the polling algorithm and the myopia algorithm, the proposed algorithm shows better performance.
Claims
1. A method for jointly optimizing quantization level and client selection in an energy-harvesting federated learning network, characterized in that, Includes the following steps: Step 1: Construct a federated learning network model carrying an energy harvesting module; Step 2: Replace the training loss problem of federated learning networks with the expected distance problem between the current and optimal weight models; Step 3: Perform weight difference processing on the local weight vector, quantize the difference weights using the generalized quantization method, and explore the impact of weight difference on the optimal quantization rate; Step 4: For the (t+1)th round of model update, select K clients for training. Based on the quantization algorithm, differentially quantize the updated local weight vector to obtain the new round of global weight vector. Step 5: Under the constraint of minimizing energy causality, optimize the quantization level and client selection to construct a non-convex mixed-integer nonlinear optimization problem; Step 6: Finally, transform it into a convex optimization problem, which can be solved using the MINLP solver. In step 3, based on the loss function L-smooth, - Strong convexity, unbiased and bounded stochastic gradients on the client side, yielding: ; in, , Indicates the first Round learning rate, E represents the number of local iterations for the selected client, K represents the number of clients in each round, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. Indicates the degree of heterogeneity of the dataset. Indicates the first Weight vector for +1 round, Let T represent the globally optimal weight vector, T represent the number of global iterations during training, and M represent the number of clients selected in the t-th iteration. Indicates the first A function of the number of bits for time quantization; Where "loss function" L-smooth, "Strong convexity" specifically refers to the loss function. The rate of change is L and the degree of bending is "The client-side stochastic gradient is unbiased and bounded" means that the expected value of the client-side stochastic gradient k in each round is equal to the true gradient and the variance of the stochastic gradient is bounded. In step 3, for the t-th round, we set the learning rate to... Then the boundary of quantified federated learning satisfies: ; in E represents the selected number of local iterations in the client-side algorithm, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. Indicates the degree of heterogeneity of the dataset. This represents the loss after T rounds of global training. This represents the optimal loss under global weights; If the weights are differentially quantized, federated learning can cover... The globally optimal rate, provided that the loss function is satisfied. L-smooth, - Strong convexity, unbiased and bounded stochastic gradients on the client side, and the quantization level can be arbitrarily selected for different rounds; In step 5, the MINLP problem is reconstructed as follows: ; in , where i is the iteration variable, representing the iteration order. from Multiply the terms up to T; L represents the rate of change of the loss function. The curve represents the curvature of the loss function, E represents the selected number of client-side local iterations, and H represents the upper bound of the client-side stochastic gradient descent. This represents the upper bound of the client-side stochastic gradient variance. Indicates the degree of heterogeneity of the dataset. Indicates the first Learning rate of the round, This represents the number of quantization bits for the weight in round T; because and It is invariant, therefore the problem can be transformed into a non-convex MINLP problem, that is: ; in, Indicates customer engagement. This indicates that customers are selected in round t. Conduct training, A function representing the number of quantization bits. This represents the length of the weight vector. This represents the number of quantized bits for the weights in round t. This represents the number of bits quantized by client m in round t. Indicates the upload time. This indicates the bandwidth allocated to each user. Represents the client in round t. Channel gain between the central parameter server and the central parameter server This represents the power spectral density of the noise in the network. This represents the energy consumed by the client during the t-th round of training. This represents the energy consumed by client m in one round of operation. This represents the energy collected in round t; in step 1, the federated learning network model is constructed: ; in, This represents the global loss function in federated learning. Let represent the average loss of the m-th client; in step 2, the federated learning network training loss problem is equivalent to the expected distance problem between the current and optimal weight models as follows: ; in This represents the loss after T rounds of global training. This represents the optimal loss under global weights. Let L represent the weight vector in round T, and let L represent the rate of change of the loss function. This represents the expected value between the global weights and the optimal weights after T rounds of training.
2. The method for jointly optimizing the quantization level and client selection in an energy-harvesting federated learning network according to claim 1, characterized in that, In step 3, the differential weights are quantized using a generalized quantization method. This method satisfies unbiasedness, and the quantization error, bounded by the number of bits B, satisfies two conditions: ; in Indicates the quantization method, The function representing the number of quantization bits is a decreasing convex function.
3. The method for jointly optimizing the quantization level and client selection in an energy-harvesting federated learning network according to claim 1, characterized in that, In step 4, the weight vector is updated as follows: Initialize client selection, Indicates customer engagement. This indicates that the client is selected in round t. To perform training; since only K clients are selected in each round, we must have: ; Furthermore, to ensure unbiased selection, each client is set to participate in the same number of training iterations, i.e.: 。 4. The method for jointly optimizing the quantization level and client selection in an energy-harvesting federated learning network according to claim 3, characterized in that, In step 4, the central parameter server broadcasts to the selected clients in this round, and the clients perform partial updates.
5. The method for jointly optimizing the quantization level and client selection in an energy-harvesting federated learning network according to claim 4, characterized in that, In step 4, after E local iterations, the local client has a new weight vector. Using the same quantization level for all clients, the server aggregates the received local weight differences to generate a new weight vector. ; in Indicates the first The weight vector of the wheel, Indicates the first The weight vector of the k-th client in the training round. Let represent the set of clients selected in round t+1. This indicates the quantification method.
6. The method for jointly optimizing the quantization level and client selection in an energy-harvesting federated learning network according to claim 1, characterized in that, In step 6, the non-convex MINLP problem is transformed into a convex optimization problem. By solving the convex optimization problem, a solution is found to jointly optimize the quantization level and client scheduling. ; in, Indicates customer engagement. This indicates that customers are selected in round t. Conduct training, A function representing the number of quantization bits. This represents the length of the weight vector. This represents the number of quantized bits for the weights in round t. This represents the number of bits that client m attempts to use for each weight in round t. This represents the quantization level of client m when it is selected in round t. It is the upper limit of the number of quantization bits. Indicates the upload time. This indicates the bandwidth allocated to each user. Represents the client in round t. Channel gain between the central parameter server and the central parameter server This represents the power spectral density of the noise in the network. This represents the energy consumed by the client during the t-th round of training. This represents the energy consumed by client m in one round of operation. This represents the energy collected in round t.