Motivation-driven and model compression cost-aware federated learning method and system
By optimizing client selection and model compression rate through the reverse auction method and Markov decision process, and combining it with the VCG payment mechanism, the problems of client selfishness and limited resources in federated learning are solved, minimizing training costs and improving efficiency while ensuring global model accuracy.
Patent Information
- Application Number
- CN202411912172.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing federated learning suffers from client selfishness and limited resources, resulting in excessive energy consumption for computing and transmission, and making it difficult to minimize training costs while ensuring global model accuracy.
The reverse auction method is used to design the incentive mechanism. By optimizing client selection, local training rounds and model compression rate, the Actor network is improved by combining the Markov decision process and long short-term memory mechanism. The VCG payment mechanism is used to ensure individual rationality and authenticity, and a mixed integer nonlinear programming problem is constructed to minimize the BS cost.
It effectively optimizes the federated learning process and reduces the cost of BS, while ensuring the accuracy of the global model and the rationality and authenticity of the client, and improving the efficiency of federated learning.
Smart Images

Figure CN119849661B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile communication technology, and in particular to an incentive-driven and model compression cost-aware federated learning method and system. Background Art
[0002] With the rapid development of the Internet of Things (IoT) and edge AI, billions of smart devices are deployed at the edge of the network, continuously generating massive amounts of data. This massive amount of data from smart devices provides valuable insights for training machine learning models, opening up opportunities for the application of learning-based intelligent services (e.g., e-healthcare, smart driving, etc.). However, traditional centralized machine learning frameworks require clients to provide their local data to a central server for model training, which poses significant privacy risks. With the continuous improvement of client storage and computing power, storing data and training models locally at the edge of the network has become a reality. Therefore, there is an urgent need for an efficient distributed machine learning approach that protects client privacy.
[0003] Federated learning, a promising distributed learning paradigm, can effectively protect client data privacy in mobile edge networks. Despite its significant advantages, obtaining the desired global model at a low training cost remains challenging. First, selfish and rational clients are unwilling to expend their resources to participate in federated learning without appropriate compensation. Second, the following characteristics of clients in mobile edge networks can reduce the efficiency of federated learning, leading to excessive computational and transmission energy consumption: 1) Heterogeneity: Clients are typically equipped with different types of computing chips, resulting in significant variations in capabilities. Underperforming clients may become laggards. Furthermore, clients in different regions have different local data. 2) Resource constraints: Compared to resource-rich base stations, clients typically have limited resources. 3) Dynamicity: Clients may generate different local tasks at different times, requiring different resources. Consequently, the resources available to clients for federated learning frequently change. Based on this analysis, a technique is needed to minimize training costs while ensuring global model accuracy. Summary of the Invention
[0004] The purpose of the present invention is to provide an incentive-driven and model compression cost-aware federated learning method and system to solve the practical problems existing in the above-mentioned prior art.
[0005] To achieve the above objectives, the present invention provides an incentive-driven and model compression cost-aware federated learning method, comprising:
[0006] An incentive-driven and model compression cost-aware federated learning method, characterized in that the method comprises the following steps:
[0007] Obtain the total latency and total energy consumption of the client participating in federated learning;
[0008] According to the reverse auction method, the reward and global loss constraint required by the client are obtained through the total delay and total energy consumption, and an optimization target is determined to establish an optimization objective function;
[0009] Determine the optimal strategy for the optimization objective function, including client selection decisions, local training rounds and model compression rate setting decisions, and determine the client's reward based on the VCG payment mechanism.
[0010] Furthermore, obtaining the total delay and total energy consumption of the client participating in federated learning includes: obtaining the channel transmission rate between the client and the BS based on the client's performance parameters, local data, and the signal-to-noise ratio between the client and the BS, determining the client's local training rounds, obtaining the client's computing delay and computing energy consumption, and determining the client's model compression rate to obtain the compressed model parameters and the client's transmission delay and transmission energy consumption to obtain the total delay and total energy consumption of the client's federated learning.
[0011] Furthermore, the performance parameters of the client include: computing resources, available bandwidth, local data volume, bid price and compressed model parameter data size.
[0012] Furthermore, the reverse auction method includes:
[0013] The BS acts as an auctioneer and the client acts as a bidder. The BS publishes federated learning tasks and auction rules to the clients within the communication coverage area.
[0014] At the beginning of each round of federated learning, clients willing to participate in federated learning submit bidding information, including bid price, local data volume, computing resources, and available bandwidth;
[0015] Based on the collected bidding information, BS selects the appropriate client and sets the appropriate local training rounds and model compression rate for it;
[0016] After the training task is completed, BS pays rewards to each client participating in federated learning.
[0017] Furthermore, the client participating in the bidding has at least two characteristics: unit energy consumption bidding price q n , the real price per unit energy consumption v n , and q n Not equal to v n .
[0018] Furthermore, the optimization objective function is expressed as:
[0019]
[0020] Where: z n,g is the client selection decision, ξ n,g is the local training round, ρ n,g is the model compression ratio, R n,g The reward that client n hopes to obtain by participating in a round of federated learning;
[0021] Among them, R n,g =E n,g q n , E n,g is the total energy consumption of the client in the g-th round of federated learning, q n is the bidding price per unit energy consumption.
[0022] Furthermore, by using the Markov decision process to define the state space, action space and reward function, and using the long short-term memory mechanism to improve the SAC actor network, the optimal strategy of the optimization function is obtained.
[0023] Furthermore, the state space is where Q and Represent the client's bid price and local data volume respectively; Indicates the computing resources of the client in the g-th round of federated learning; represents the bandwidth of the client in the g-th round of federated learning; ε g represents the energy consumption of the client in the g-th round of federated learning; the action space is That is, the agent is in state s g The optimal strategy found under represents the client selection decision, Φ g represents the local training round, Represents the model compression rate; the reward function is r g =-Ψ-ζ, ζ represents the penalty term to prevent the agent from making illegal actions.
[0024] Furthermore, an incentive-driven and model compression cost-aware federated learning system is provided, the system comprising:
[0025] The acquisition unit is used to obtain the total latency and total energy consumption of the client participating in federated learning;
[0026] a model building unit, configured to obtain the reward and global loss constraint required by the client through the total delay and total energy consumption according to a reverse auction method and determine an optimization target to establish an optimization objective function;
[0027] A decision unit is configured to determine an optimal strategy for the optimization objective function, wherein the optimal strategy includes client selection decisions, local training round and model compression rate setting decisions, and determines the client's reward based on the VCG payment mechanism.
[0028] Furthermore, an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of an incentive-driven and model compression cost-aware federated learning method as described in any one of the above items are implemented.
[0029] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0030] The present invention not only considers the federated learning client selection, local training rounds and model compression rate settings, as well as individual rationality in heterogeneous, resource-limited and dynamic mobile edge networks, but also considers the latency threshold of local model training and the accuracy constraint of the global model. It jointly optimizes the client selection, local training rounds and model compression rate in federated learning, uses a reverse auction to design an incentive mechanism, and models the corresponding problem as a mixed integer nonlinear programming problem from an economic perspective, aiming to ensure the accuracy of the global model while minimizing the cost of the BS. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0032] Figure 1 A schematic diagram of an incentive-driven and model compression cost-aware federated learning method provided by an embodiment of the present invention;
[0033] Figure 2 A schematic diagram of a scenario for federated learning training in a mobile edge network provided by an embodiment of the present invention;
[0034] Figure 3 A schematic diagram of the structure of the SACEM algorithm provided in an embodiment of the present invention;
[0035] Figure 4 A graph showing the changes in test accuracy and number of convergence rounds at different compression rates on the Fashion MNIST dataset provided by an embodiment of the present invention;
[0036] Figure 5 Convergence analysis diagram of the SACEM algorithm and the Vanilla SAC algorithm provided in the embodiments of the present invention;
[0037] Figure 6-1A graph showing the cost variation of achieving different test accuracies for the FashionMNIST dataset provided by an embodiment of the present invention;
[0038] Figure 6-2 A graph showing the cost variation of achieving different test accuracies for BS on the Cifar-10 dataset provided by an embodiment of the present invention;
[0039] Figure 7 Individual rational proof diagram of the client provided by the embodiment of the present invention;
[0040] Figure 8 Authenticity certification diagram of the client provided by the embodiment of the present invention;
[0041] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0043] English meaning:
[0044] Federated Learning
[0045] Incentive-driven and model compression Cost-Aware Federated Learning: Incentive-driven and model compression cost-aware federated learning CAFL
[0046] Base Station: BS
[0047] Mixed-Integer Non-Linear Programming: Mixed Integer Nonlinear Programming MINLP
[0048] Non-deterministic Polynomial hard: Non-deterministic polynomial hard problem NP-hard
[0049] Markov Decision Process: Markov Decision Process MDP
[0050] Long Short-Term Memory: Long Short-Term Memory LSTM
[0051] To solve the problems in the prior art, the embodiments of the present application adopt a reverse auction method for incentive design, with the BS as the auctioneer and the client as the bidder. The present application optimizes the local training rounds and model compression rate for different clients while designing the incentive mechanism. In addition, the process of client selection, local training and model compression is modeled as a MINLP problem. To solve this optimization problem, the Actor network of SAC is improved using LSTM, and an improved SAC-based client selection and model compression algorithm (SACEM) is proposed to obtain the optimal solution. In addition, a VCG (Vickrey-Clarke-Groves) based standard payment rule is proposed to pay fees to the clients participating in federated learning.
[0052] Figure 1 The cost-aware federated learning method provided by the embodiments of the present application for incentive-driven and model compression is shown in the figure. It includes the following steps:
[0053] Step S1, obtaining the total delay and total energy consumption of the client participating in federated learning; by understanding the total delay and total energy consumption of the client participating in federated learning, the delay threshold of local model training and the accuracy constraint of global model can be fully considered, and the client selection in federated learning is jointly optimized.
[0054] Step S2, according to the reverse auction method, the total delay and total energy consumption are used to obtain the reward required by the client and the global loss constraint and determine the optimization target, so as to establish an optimization objective function. Through the incentive mechanism of the reverse auction method, and from the economic point of view, the corresponding problem is modeled as a mixed integer nonlinear programming problem, aiming to minimize the cost of the BS while ensuring the accuracy of the global model.
[0055] Step S3, determining the optimal strategy of the optimization objective function, the optimal strategy including client selection decision, local training round and model compression rate setting decision, and determining the reward of the client based on the VCG payment mechanism. To ensure the individual rationality and authenticity of the client.
[0056] An incentive-driven and model compression cost-aware federated learning method described in an embodiment of the present invention preferably obtains the total delay and total energy consumption of the client participating in federated learning, including: obtaining the channel transmission rate between the client and the BS based on the client's performance parameters, local data, and the signal-to-noise ratio between the client and the BS, determining the client's local training rounds, obtaining the client's calculation delay and calculation energy consumption, and determining the client model compression rate, obtaining the compressed model parameters and the client's transmission delay and transmission energy consumption to obtain the total delay and total energy consumption of the client's federated learning.
[0057] In an incentive-driven and model compression cost-aware federated learning method described in an embodiment of the present invention, preferably, the performance parameters of the client include: computing resources, available bandwidth, local data volume, bid price and compressed model parameter data size.
[0058] In an incentive-driven and model compression cost-aware federated learning method according to an embodiment of the present invention, preferably, the reverse auction method includes:
[0059] The BS acts as an auctioneer and the client acts as a bidder. The BS publishes federated learning tasks and auction rules to the clients within the communication coverage area.
[0060] At the beginning of each round of federated learning, clients willing to participate in federated learning submit bidding information, including bid price, local data volume, computing resources, and available bandwidth;
[0061] Based on the collected bidding information, BS selects the appropriate client and sets the appropriate local training rounds and model compression rate for it;
[0062] After the training task is completed, BS pays rewards to each client participating in federated learning.
[0063] In an incentive-driven and model compression cost-aware federated learning method according to an embodiment of the present invention, preferably, the client participating in the bidding has at least two characteristics: the unit energy consumption bidding price q n , the real price per unit energy consumption v n , and q n Not equal to v n .
[0064] In the incentive-driven and model compression cost-aware federated learning method described in an embodiment of the present invention, preferably, the optimization objective function is expressed as:
[0065]
[0066] Where: z n,g is the client selection decision, ξ n,g is the local training round, ρn,g is the model compression ratio, R n,g The reward that client n hopes to obtain by participating in a round of federated learning;
[0067] Among them, R n,g =E n,g q n , E n,g is the total energy consumption of the client in the g-th round of federated learning, q n is the bidding price per unit energy consumption.
[0068] The optimization objective function must meet the following constraints:
[0069] 1) The number of local training rounds is greater than 0 and less than the maximum value
[0070] 2) The model compression rate is greater than or equal to 0 and less than the maximum value ρ max ;
[0071] 3) The client's local calculation delay must not exceed the maximum tolerable delay T max ;
[0072] 4) The global model loss must not exceed θ.
[0073] The incentive-driven and model compression cost-aware federated learning method described in an embodiment of the present invention preferably defines the state space, action space and reward function by using a Markov decision process, and uses a long short-term memory mechanism to improve the Actor network of SAC to obtain the optimal strategy of the optimization function.
[0074] An incentive-driven and model compression cost-aware federated learning method according to an embodiment of the present invention, preferably, the state space is where Q and Represent the client's bid price and local data volume respectively; Indicates the computing resources of the client in the g-th round of federated learning; represents the bandwidth of the client in the g-th round of federated learning; ε g represents the energy consumption of the client in the g-th round of federated learning; the action space is That is, the agent is in state s g The optimal strategy found under represents the client selection decision, Φ g represents the local training round, Represents the model compression rate; the reward function is r g =-Ψ-ζ, ζ represents the penalty term to prevent the agent from making illegal actions.
[0075] A specific embodiment of the present invention includes an incentive-driven and model compression cost-aware federated learning system, the system comprising:
[0076] The acquisition unit is used to obtain the total latency and total energy consumption of the client participating in federated learning;
[0077] a model building unit, configured to obtain the reward and global loss constraint required by the client through the total delay and total energy consumption according to a reverse auction method and determine an optimization target to establish an optimization objective function;
[0078] A decision unit is configured to determine an optimal strategy for the optimization objective function, wherein the optimal strategy includes client selection decisions, local training round and model compression rate setting decisions, and determines the client's reward based on the VCG payment mechanism.
[0079] Figure 2 A schematic diagram of a mobile edge network system scenario provided by an embodiment of the present invention, such as Figure 2 As shown, this embodiment considers a federated learning framework including a set of clients and a base station BS with an edge server. The client set is represented as Each client has a local dataset D n The set of client-side local training rounds for federated learning is defined as The performance parameters of each client can be represented by a triple {|D n |,f n,g ,B n,g}, where |D n | represents the local data volume of client n, f n,g represents the computing resources (i.e., CPU frequency) of client n in the g-th round of federated learning, B n,g represents the available bandwidth of client n in the g-th round of federated learning.
[0080] In each round of federated learning, the global model (i.e. in is the vector symbol, H is the dimension size) is distributed to the selected client. Local model The loss function for the local data of client n is defined as:
[0081]
[0082] where f n (ω n,g ; χ n,g ) indicates that client n is in data x n,g Federated learning obtains the optimal global model ω by minimizing the global loss function * , can be expressed as:
[0083]
[0084] in Represents the set of clients selected in the g-th round of federated learning.
[0085] During local training, each selected client uses gradient descent to update the local model parameters on its local dataset. The process of client n updating the local model parameters can be expressed as:
[0086]
[0087] where ω n,i,g represents the local model parameters of client n in the i-th local update, Represents the learning rate.
[0088] In the process of transmitting model parameters, model compression is a common solution to reduce communication overhead. Among the existing model compression methods, Topk is currently the most widely used compression operator. Without sacrificing model convergence, only 0.5% of the communication time is needed to compress local model parameters to a larger sparsity level, so the compression time can be ignored. Specifically, for the model Given a parameter 1≤k≤H, the TopK(ω) of the jth parameter can be expressed as:
[0089]
[0090] where j∈[k+1,H].
[0091] The compression ratio of TopK can be expressed as Where H and k represent the number of original model parameters and compressed model parameters respectively. At the same time, we use ρ n,g ∈[0,ρ max ] represents the compression ratio of client n in the g-th round of federated learning, where ρ max Indicates the maximum compression ratio allowed.
[0092] W represents the difference between the local model and the global model, and its absolute value is used to quantify its importance. The client then compresses the W with a smaller absolute value according to the compression ratio and uploads the W with a larger absolute value to the BS, which can be calculated as:
[0093] W=ω n,g -ω g , (5)
[0094] According to equations (4) and (5), the important model parameters after compression can be obtained This will consume less energy than uploading all local model parameters. Finally, the BS aggregates the important parameters uploaded by the clients to obtain the parameters ω for the next round of global model training g+1 :
[0095]
[0096] In federated learning, the selected clients use local data to train local models for model updates. Therefore, the computational latency of the local training of client n is defined as:
[0097]
[0098] where ∈ denotes the CPU cycles required to process one unit of training data.
[0099] In an embodiment, the communication between the BS and the clients adopts orthogonal frequency division multiple access technology. Since the bandwidth and transmission power of the BS are higher than those of the clients, the transmission latency can be ignored when the clients download the global model from the BS. Subsequently, the channel transmission rate between client n and the BS is:
[0100]
[0101] where λ n denotes the channel gain between client n and the BS. P n denotes the transmission power of client n, and σ 2 denotes the Gaussian noise of the channel.
[0102] The transmission latency of the important parameters uploaded by client n to the BS is calculated as:
[0103]
[0104] where h n,g = (1 - p n,g )H denotes the data size of the model parameters uploaded from client n. Therefore, the total latency of client n in the gth round of federated learning is:
[0105]
[0106] where ξ n,g is the number of local training rounds of client n in the gth round of federated learning.
[0107] Therefore, the energy consumption of client n also includes two parts of local training and wireless transmission, which can be respectively represented as:
[0108]
[0109]
[0110] in represents the computing power of client n, and o represents the client CPU capacitance coefficient.
[0111] The total energy consumption of client n in the g-th round of federated learning is expressed as:
[0112]
[0113] Due to selfishness and rationality, clients will not be willing to assist in training the global model for free. All have the following properties: 1) Unit energy consumption bidding price q n ,q n is the return per unit energy consumption that client n expects to obtain by assisting BS in federated learning. 2) The actual price per unit energy consumption v n , v n is the actual price of energy consumed by client n to assist BS in federated learning. n is the private information of client n, which cannot be obtained by anyone, including BS. In addition, clients are selfish and rational, and their actual price v n may not be equal to the bid price q n .
[0114] Then, the reward R that client n hopes to obtain by participating in a round of federated learning is n,g for:
[0115] R n,g =E n,g q n . (14)
[0116] In this invention, the optimization goal is to ensure the accuracy of the global model while selecting z by jointly optimizing the client. n,g , local training round ξ n,g and model compression ratio ρ n,g To minimize the cost of BS. n,g ∈{0,1} represents the client selection decision, z n,g =1 means the client is selected, otherwise, z n,g = 0. At the same time ξ n,g Constraints need to be met:
[0117]
[0118] in is the floor function, T max is the maximum tolerable delay.
[0119] Therefore, the above optimization problem can be formulated as the target optimization function:
[0120]
[0121] In the above formula, (16a) represents the binary variable indicating whether client n is selected. (16b) represents the range used to determine the model compression rate. (16c) represents the local training delay of the client. The maximum tolerable delay cannot be exceeded, (16d) ensures the accuracy of the global model, where θ represents the convergence threshold of the global loss function.
[0122] The optimization problem in the formulation involves both integer and continuous variables. In addition, the optimization objective function (16) and the global loss constraint are nonlinear. Therefore, the formulated optimization problem is an NP-hard MINLP problem.
[0123] To prove that the formulated problem is NP-hard, we first transform the minimization problem into its inverse maximization form. We then discuss a specific instance of client selection, number of local training rounds, and model compression rate setting in a single federated learning round. We assume that the local training rounds and model compression rate setting are fixed and can satisfy the maximum tolerable delay constraint. Therefore, the problem is reformulated as maximizing the inverse of the training cost through optimal client selection. We then reduce the well-known NP-hard 0-1 knapsack problem to this specific instance. Since the specific instance of the formulated problem is NP-hard, we can infer that the client selection, local training rounds, and model compression rate setting problems in the entire federated learning process are also NP-hard.
[0124] Since traditional heuristic algorithms cannot effectively find the optimal solution to the optimization problem in polynomial time, the optimization problem is transformed into a Markov decision process (MDP) and the following is proposed: Figure 3 The SACEM algorithm shown solves this problem.
[0125] 1. The three key elements of MDP need to be defined as follows:
[0126] State space: The state space is in and Represent the client's bid price and local data volume respectively; Indicates the computing resources of the client in the g-th round of federated learning; represents the bandwidth of the client in the g-th round of federated learning; ε g represents the energy consumption of the client in the g-th round of federated learning;
[0127] Action Space: The action space is defined as in represents the client selection decision, Φg represents the local training round, Indicates the model compression ratio;
[0128] Reward: Reward is an indicator that guides the agent to perform actions. The goal of this paper is to minimize the total cost of BS in the entire federated learning. Therefore, the reward function is defined as r g =-Ψ-ζ, ζ represents the penalty term to prevent the agent from making illegal actions.
[0129] 2. Algorithm design: For a given federated learning task, federated learning is based on the current state s g The action a that maximizes the policy value π(a|s) g To obtain the optimal client, local training rounds and evaluation rewards, continuous actions need to be discretized. The present invention adopts an action quantization method based on threshold and integer mapping to obtain discrete actions {z n,g ,ξ n,g In addition, LSTM is added to the Actor network to obtain the time series of actions.
[0130] 1) Action quantization: Assume that the continuous actions generated by the agent are The corresponding discrete action is z, and the discrete action set is Λ z .
[0131] Specifically, each discrete action is mapped to the corresponding continuous interval, and the calculation formula is:
[0132]
[0133] in represents the size of the interval for discretization of continuous actions, |Λ z | is the number of discrete actions.
[0134] 2) Neural Network Design: Fully connected networks are generally used to construct the actor and critic networks of SAC. However, fully connected networks cannot fully utilize hidden information or features in the data. Furthermore, states containing historical information increase the input space, complicating SAC's ability to learn the optimal policy. Therefore, we use a recurrent neural network (LSTM) with a memory mechanism to improve the actor network. LSTM has been widely used to predict future changes in time series by capturing the temporal dependencies between sequence states. Specifically, an LSTM layer consisting of hidden neurons is placed between the hidden and output layers, dynamically recording the complete history of observations and actions.
[0135] 3) Algorithm Details: SACEM incorporates an entropy regularization term into its optimization objective function to improve exploration capabilities. To continuously explore new strategies and avoid being trapped in local optima, SACEM adds entropy in addition to the expected reward to its optimization objective function. Entropy can capture the randomness of strategies, meaning that strategies with higher entropy values will perform high-reward actions with greater randomness. Therefore, the entropy regularization objective can be written as follows:
[0136]
[0137] Among them, the discount factor Used to distinguish the importance of rewards. φ represents the temperature parameter. The policy entropy term that measures the randomness of the policy It can be expressed as:
[0138]
[0139] Among them, π(a g |s g ) indicates that the agent is in state s g The strategy for the actions to be taken next.
[0140] Payment rules: Due to selfishness and rationality, each client desires compensation that is higher than the actual cost. Therefore, it is necessary to design a payment rule to ensure reasonable rewards. This paper designs a VCG-based payment mechanism that incentivizes clients to participate in federated learning while ensuring individual rationality and authenticity.
[0141] In the g-th round of federated learning, the optimal cost of BS can be expressed as:
[0142]
[0143] The optimal cost of the BS without considering the contribution of client n can be expressed as:
[0144]
[0145] The payment actually received by client n is expressed as:
[0146]
[0147] in represents the optimal cost of the BS without considering the participation of client n. Therefore, the benefit of client n is:
[0148] u n =p n -V n , (twenty three)
[0149] in Indicates the actual total cost of client n.
[0150] Simulation experiments show that the CAFL method proposed in this invention can significantly reduce BS costs compared to other benchmark methods in different scenarios. The following is a verification of the technical effect of the above technical solution with specific experimental data:
[0151] In the experiment, we consider a BS and 20 clients. The dataset size for each client is set to [500, 2500], and the batch size for local training is 32. The client bandwidth range is [1, 5] MHz. The client computing frequency range is [1, 3] GHz. The client bid price range is [0.1, 1] RMB. The maximum tolerable delay is 5 seconds. θ = 0.01, P n =0.1W,σ 2 =10 -9 ,λ=10 -7 .
[0152] The present invention conducts experiments on the real-world datasets Fashion MNIST and CIFAR-10, and trains the AlexNet model on the FashionMNIST dataset and the ResNet18 model on the CIFAR-10 dataset.
[0153] The present invention compares the performance of the proposed CAFL method with some other benchmark methods in different scenarios:
[0154] 1) Incentive-driven and Quality-aware Federated Learning (IQFL): In IQFL, BS is based on q n / (d n Loss n ) value, greedily select the client with low price and high quality and upload the entire model, where d n is the amount of local data on the client, Loss n It is the sum of the changes in the loss function of the client in the historical rounds of federated learning.
[0155] 2) Cost-aware and Vanilla SAC Federated Learning (CVFL): CVFL adopts Vanilla SAC, does not add LSTM to improve the Actor network, and uploads the compressed model to the BS.
[0156] 3) Incentive-driven and Greedy Federated Learning (IGFL) IGFL only considers the client’s bid, ignores the heterogeneity of client resources and capabilities, and uploads the entire model to the BS.
[0157] 4) Incentive-driven and Random Federated Learning (CAFL): In IRFL, without considering other factors, clients are randomly selected to participate in federated learning and the entire model is uploaded to the BS.
[0158] like Figure 4 The blue line shows the accuracy results when the compression rate changes from 0 to 0.9 under the same number of federated learning rounds, and the red bar shows the number of federated learning rounds required to achieve convergence when the compression rate changes from 0 to 0.9. It can be observed that appropriate pruning does not have a negative impact on the performance of federated learning. However, too high a compression rate will reduce the model accuracy and increase the number of training rounds required for convergence. In order to prevent excessive compression rate from reducing the efficiency of federated learning, the maximum compression rate ρ is set to 0. max Set to 0.7.
[0159] like Figure 5 As shown in Figure 2, the cumulative reward increases and converges with increasing training epochs. This demonstrates that the client can learn an effective federated learning strategy. However, compared to Vanilla SAC, SACEM has a faster convergence speed and better convergence performance. This is because LSTM is able to capture and fully utilize the hidden information in historical observations and actions.
[0160] Figure 6-1 and Figure 6-2 The cost variation of BS achieving different test accuracies is shown. Compared with the other four baselines, the proposed CAFL performs well. The main reason is that CAFL focuses on the entire federated learning process and selects the appropriate federated learning strategy from a long-term perspective. Compared with CAFL, CVFL shows slightly worse performance in capturing hidden information from historical observations and actions, resulting in higher costs in most cases. IQFL ignores the impact of local training and model upload on the cost of federated learning. IGFL greedily selects clients with lower prices and ignores the heterogeneity of clients, thereby reducing the efficiency of federated learning. In addition, the random selection nature of IRFL leads to excessively high cost of federated learning.
[0161] Figure 7The proposed payment mechanism demonstrates the individual rationality of the participants. It can be observed that in federated learning, each client receives a reward greater than its true cost. This means that when each client's bid price is true, the payment it receives exceeds its actual cost. Therefore, the proposed payment mechanism can ensure the individual rationality of the participating clients in federated learning.
[0162] Figure 8 Verify the authenticity of the proposed payment mechanism. It can be observed that if the true cost of a selected client is higher than its bid price, the client will be reluctant to participate in federated learning. Additionally, if the client's bid price is too high, the BS will not select the client for federated learning. Therefore, the proposed payment mechanism can guarantee the authenticity of the client.
[0163] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0164] (1) The present invention not only considers the client selection, local training rounds and model compression rate settings, and individual rationality of federated learning in heterogeneous, resource-limited and dynamic mobile edge networks, but also considers the latency threshold of local model training and the accuracy constraint of the global model. It jointly optimizes the client selection, local training rounds and model compression rate in federated learning, uses a reverse auction to design an incentive mechanism, and models the corresponding problem as a mixed integer nonlinear programming problem from an economic perspective, aiming to ensure the accuracy of the global model while minimizing the cost of the BS.
[0165] (2) In order to solve this constrained optimization problem, a SACEM method is proposed. By transforming the problem into a Markov decision process, defining the state space, action space and reward function, and using LSTM to improve the Actor network, the joint optimal strategy of client selection, local training rounds and model compression rate setting is obtained.
[0166] (3) In order to ensure the individual rationality and authenticity of the client, a payment scheme based on VCG is proposed.
[0167] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, centralized on a single computing device, or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
Claims
1. An incentive-driven and model compression cost-aware federated learning method, characterized by: The method comprises the following steps: Obtain the total latency and total energy consumption of the client participating in federated learning; According to the reverse auction method, the reward and global loss constraint required by the client are obtained through the total delay and total energy consumption, and an optimization target is determined to establish an optimization objective function; Determine the optimal strategy for optimizing the objective function, including client selection decisions, local training rounds, and model compression rate setting decisions, and determine the client's reward based on the VCG payment mechanism; The reverse auction method includes: The BS acts as an auctioneer and the client acts as a bidder. The BS publishes federated learning tasks and auction rules to the clients within the communication coverage area. At the beginning of each round of federated learning, clients willing to participate in federated learning submit bidding information, including bid price, local data volume, computing resources, and available bandwidth; Based on the collected bidding information, BS selects the appropriate client and sets the appropriate local training rounds and model compression rate for it; After the training task is completed, BS pays rewards to each client participating in federated learning; Wherein, the optimization objective function is expressed as: , in: is the client selection decision, is the local training round, is the model compression ratio, For the client The rewards you hope to receive by participating in a round of federated learning; in, , The client is in The total energy consumption in a round of federated learning, is the bidding price per unit energy consumption; The optimal strategy for optimizing the objective function is obtained by using the Markov decision process to define the state space, action space, and reward function and improving the Actor network of SAC using the long short-term memory mechanism. The state space is ,in and Represent the client's bid price and local data volume respectively; Indicates that the client is Computing resources for federated learning; Indicates that the client is The bandwidth of federated learning rounds; Indicates that the client is The energy consumption of the federated learning round is , that is, the agent is in state The optimal strategy found under Represents the client selection decision, represents the local training round, represents the model compression rate; the reward function is , Represents the penalty term that prevents the agent from making illegal actions.
2. The incentive-driven and model compression cost-aware federated learning method according to claim 1, characterized in that: Obtaining the total delay and total energy consumption of the client participating in federated learning includes: obtaining the channel transmission rate between the client and the BS based on the client's performance parameters, local data, and the signal-to-noise ratio between the client and the BS, determining the client's local training rounds, obtaining the client's computing delay and computing energy consumption, and determining the client's model compression rate to obtain the compressed model parameters and the client's transmission delay and transmission energy consumption to obtain the total delay and total energy consumption of the client's federated learning.
3. The incentive-driven and model compression cost-aware federated learning method according to claim 2, characterized in that: The performance parameters of the client include: computing resources, available bandwidth, local data volume, bid price and compressed model parameter data size.
4. The incentive-driven and model compression cost-aware federated learning method according to claim 1, characterized in that: The client participating in the bidding has at least two characteristics: unit energy consumption bidding price , the real price per unit of energy consumption ,and Not equal to .
5. An incentive-driven and model compression cost-aware federated learning system, based on the incentive-driven and model compression cost-aware federated learning method according to any one of claims 1 to 4, characterized in that: The system comprises: The acquisition unit is used to obtain the total latency and total energy consumption of the client participating in federated learning; a model building unit, configured to obtain the reward and global loss constraint required by the client through the total delay and total energy consumption according to a reverse auction method and determine an optimization target to establish an optimization objective function; A decision unit is configured to determine an optimal strategy for the optimization objective function, wherein the optimal strategy includes client selection decisions, local training round and model compression rate setting decisions, and determines the client's reward based on the VCG payment mechanism.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the incentive-driven and model compression cost-aware federated learning method as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Vehicle selection and resource optimization method and system for Internet of Vehicles federated learning
CN118333191A
Agent policy learning method with privacy protection in mobile edge computing
WO2024254892A1