A federated learning incentive mechanism method considering multi-server competition
Patent Information
- Application Number
- CN202310321545.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-03-29
AI Technical Summary
这将使得用户很难确定自己的数据集适合哪个发布联邦学习的公司,可能导致自己的数据集价值被低估,利益降低
[0038](1)本发明对联邦学习多服务器场景设计激励机制,解决了多服务器之间竞争用户的问题。
Smart Images

Figure CN116416039B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and in particular to a federated learning incentive mechanism method that takes into account multi-server competition. Background Technology
[0002] In recent years, with the rise of Mobile Edge Computing (MEC) technology, mobile devices can be equipped with powerful computing and storage capabilities, enabling local computation and model training. MEC has also driven research into federated learning, which allows a community of computing-capable nodes to collaboratively build a global learning model without compromising user privacy. Specifically, federated learning is a distributed learning framework in which all nodes independently train on local data based on a global model, only submitting model updates to a parameter server for aggregation. This approach achieves distributed model updates, protecting privacy while improving the quality of the global model.
[0003] The aforementioned federated learning systems largely rely on the quality of local model updates on the user's end. However, they all operate on the common assumption that federated learning requires sufficient user participation. Without adequate compensation, users may be unwilling to participate and share their model updates. In reality, participating in federated learning tasks incurs system costs. For example, when users participate in federated learning tasks, they inevitably consume their device resources, including computation, communication, and battery power. Furthermore, federated learning frameworks also face security issues. For instance, researchers have shown that important information about the training data can be inferred from intermediate gradients. Additionally, a curious parameter server can learn private information about a user's training data through a generative adversarial network. Therefore, users are less willing to participate in federated learning tasks unless they receive sufficient rewards. In conclusion, designing an effective incentive mechanism is crucial for federated learning systems.
[0004] Currently, research on federated learning incentive mechanisms mainly focuses on scenarios where a single parameter server selects users for training. However, the actual application scenarios of federated learning are much richer. Although there is currently relatively little commercially available federated learning software, Google and Apple have already applied federated learning to their products. In the future, as federated learning systems develop and mature, more applications will emerge. This will make it difficult for users to determine which company publishing federated learning datasets is suitable for their datasets, potentially leading to an undervaluation of their datasets and reduced profits. Simultaneously, these companies will also face the challenge of acquiring user datasets that are more suitable for them. Therefore, to better facilitate both users and federated learning companies, it is essential to launch a platform for companies and users to join and manage. This would allow federated learning companies to select users more rationally, while users can maximize their own benefits. Based on the interests of both parties, establishing such a platform will become the future trend.
[0005] Therefore, there is a need to provide a federated learning incentive mechanism system that takes into account competition among multiple servers, and to adaptively set prices for users and federated learning servers to maximize their benefits. Summary of the Invention
[0006] In order to overcome the above-mentioned shortcomings and deficiencies of the prior art, the purpose of this invention is to provide a federated learning incentive mechanism method that considers multi-server competition.
[0007] The objective of this invention is achieved through the following technical solution:
[0008] A federated learning incentive mechanism considering multi-server contention includes:
[0009] All parameter servers are initialized, a global model for federated learning is established, and the network structure is defined. The parameter servers announce the auction rules and publish the training tasks for federated learning to users.
[0010] Users submit their bids for the federated learning training tasks published on various servers, based on their own conditions.
[0011] After receiving the user's bid, the parameter server determines the winning set and the reward to be paid by the user who participated in the training, based on the adaptive multi-item auction algorithm.
[0012] Training is performed according to federated learning steps. The parameter server distributes the global model to users in the winning set. Users train locally and upload parameter updates to the parameter server.
[0013] After training is complete, the parameter server will aggregate the parameters uploaded by users to update the parameters of the global model. The parameter server will also pay the users who participated in the training accordingly to recognize their efforts and contributions.
[0014] Furthermore, the network structure adopts LeNet.
[0015] Furthermore, a synchronous federated learning strategy is adopted, specifically, the training of the parameter server is synchronous.
[0016] Furthermore, the user's bid is specifically calculated as follows: the energy consumption generated by the user's participation in the training tasks of each parameter server is calculated using the user's data sample size, and the energy consumption is used as the low price of the user's auction.
[0017] Furthermore, the adaptive multi-item auction algorithm is specifically as follows:
[0018] First, the server initializes. Each server has an evaluation metric for each user, namely the user's cumulative training quality. Next, during user initialization, each user reports their initial price, which represents the energy consumed during their training. Each user has a current price. User's initial revenue Winner server w n Empty;
[0019] For each user, and for each server, when that server is not the winning server for that user, calculate the revenue they would gain if they recruited that user. Sort, if Then bids are made to users sequentially, with each bid being the user's initial price plus an increment ∈, i.e. Until the budget runs out.
[0020] Each user calculates their earnings. The server with the highest earnings is selected as the temporary winner, and that user's earnings are published. This is for use in subsequent auctions of servers.
[0021] Repeat the above process until the termination condition is met.
[0022] Termination condition: The algorithm terminates when the winner server for all users remains unchanged in the last two rounds, meaning no user is bid up again.
[0023] Users perform federated learning training tasks for their winning servers.
[0024] Furthermore, the parameter server also includes a test dataset. Before model aggregation, the parameter server tests the local model parameters uploaded by each user. The test set used is a small portion of data randomly extracted from the entire test dataset, and the loss generated during the testing process is recorded.
[0025] After model aggregation, the global model is tested on the entire test dataset, and the loss generated during the testing process is recorded.
[0026] Furthermore, user training quality metrics are defined as follows:
[0027] Assume at t s At time t, the loss value of the global model of parameter server m on the test set is loss. m (t s Each user's model parameters are tested using a randomly assigned test dataset, and the resulting loss value is the loss. n,m (t test We will improve the user training quality. Defined as
[0028]
[0029]
[0030] in v and are weight parameters;
[0031] This is related to the training quality of historical users. The corresponding weights are Where 0 < ρ ≤ 1 is the forgetting factor;
[0032] In t k+1 The estimated user training quality for this iteration is:
[0033]
[0034] Based on the estimated value, determine the compensation that the user needs to pay.
[0035] Furthermore, it also includes the assumption that users have limited computing power and can only participate in the federated learning training task of one parameter server at a time in each round.
[0036] Furthermore, an exponential forgetting function is used to allocate weights.
[0037] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0038] (1) This invention designs an incentive mechanism for federated learning multi-server scenarios, which solves the problem of competition for users among multiple servers.
[0039] (2) Compared with other incentive mechanisms, this invention enables users to adaptively set prices while protecting user privacy, thereby maximizing the benefits for both users and the server.
[0040] (3) The method of the present invention has a wide range of applications in federated learning incentive mechanisms. It is simple to operate, highly adaptable, and has broad application prospects. Attached Figure Description
[0041] Figure 1 This is a structural diagram of the present invention;
[0042] Figure 2 This is a flowchart of the auction algorithm of the present invention. Detailed Implementation
[0043] The present invention will be further described in detail below with reference to the embodiments, but the implementation of the present invention is not limited thereto.
[0044] Example
[0045] like Figure 1 and Figure 2As shown, a federated learning incentive mechanism considering multi-server competition includes:
[0046] S1 initializes all parameter servers, establishes a global model for federated learning, defines the network structure, announces the auction rules, and publishes the training task for federated learning to users.
[0047] Consider a server with M parameters, denoted as... Consider N users, denoted as This paper employs a synchronous federated learning strategy, meaning the training of the parameter servers is synchronous. In each round of training, each parameter server has a certain budget B. m The total cost of hiring users cannot exceed the budget. The parameter server issues federated learning tasks to users, hiring them to perform training. Users possess the samples required by the parameter server, denoted as . This represents the sample size required by user n and parameter server m. The parameter server will announce the auction rules and issue the federated learning training task to the user.
[0048] Furthermore: The global model is a model that aggregates all local models uploaded by users.
[0049] Furthermore, in this embodiment, the network structure is preferably LeNet.
[0050] S2 users submit their bids for the federated learning training tasks published on various servers, based on their own conditions.
[0051] The conditions themselves include computing resources, data resources, and energy consumption.
[0052] Users can submit their own bids for the federated learning training tasks published by each server, ensuring that they participate in the training based on their own resources and capabilities.
[0053] Furthermore, the energy consumption of each user's data sample size in participating in the server training tasks for each parameter is calculated. Energy consumption is used as the low price for user auctions.
[0054] After receiving the user's bid, the S3 parameter server determines the winning set and the reward to be paid by the user who participated in the training, based on the adaptive multi-item auction algorithm.
[0055] We assume that users have limited computing power and can only participate in the federated learning training task of one parameter server at a time in each round. In this way, we can ensure that users participating in the training have sufficient motivation and resources, while also ensuring training efficiency and data privacy protection.
[0056] In this embodiment, a test dataset is added to the user dataset, and after each round of training, users upload their updated model parameters to the parameter server. At this point, before aggregating all model update parameters, the parameter server tests the model parameters uploaded by all users individually, that is, allocating a certain size test dataset to each user and ensuring that the test dataset covers all labels. Although this increases overhead, this small increase in cost is acceptable. In this way, the user training quality metrics we obtain are more comparable because they are evaluated based on the same dataset. Assume that in t... s At time t, the loss value of the global model of parameter server m on the test set is loss. m (t s Each user's model parameters are tested using a randomly assigned test dataset, and the resulting loss value is the loss. n,m (t test We will improve user training quality. Defined as
[0057]
[0058]
[0059] in v and are weight parameters.
[0060] We use an exponential forgetting function to assign weights, which gives greater weight to the most recent model quality record and less weight to older model quality records. The latest model quality has a weight of 1, and the weights of other model quality records are determined by their relative position to the latest model quality. This is in contrast to historical user training quality. The corresponding weights are Where 0 < ρ ≤ 1 is the forgetting factor. Therefore, for t k+1 The estimated user training quality for this iteration is:
[0061]
[0062] according to Figure 2 In the auction algorithm, we obtain the set of winning users for each server. and reward list The reward list corresponds to the rewards each user receives after completing the federated learning task.
[0063] Furthermore, the specific process of the adaptive multi-item auction algorithm is as follows:
[0064] First, the server initializes. Each server has an evaluation metric for each user, namely the user's cumulative training quality. Next, during user initialization, each user reports their initial price, which represents the energy consumed during their training. Each user has a current price. User's initial revenue Winner server w n Empty;
[0065] For each user, and for each server, when that server is not the winning server for that user, calculate the revenue they would gain if they recruited that user. Sort, if Then bids are made to users sequentially, with each bid being the user's initial price plus an increment ∈, i.e. Until the budget runs out.
[0066] Each user calculates their earnings. The server with the highest earnings is selected as the temporary winner, and that user's earnings are published. This is for use in subsequent auctions of servers.
[0067] Repeat the above process until the termination condition is met.
[0068] Termination condition: The algorithm terminates when the winner server for all users remains unchanged in the last two rounds, meaning no user is bid up again.
[0069] Users perform federated learning training tasks for their winning servers.
[0070] S4 is trained according to the federated learning steps. The parameter server distributes the global model to users in the winning set, and users train locally and upload parameter updates to the parameter server.
[0071] (1) System initialization and device selection: In federated learning, the server first sets the learning parameters for the task it will train, such as the learning rate and the number of communication rounds. Then, the user participates in the federated learning of the winning server determined in the above steps.
[0072] (2) Distributed local training and update: After completing the training configuration, the server will initialize a new model w. G This data is then transmitted to the users to begin distributed training. Each user n will use their own dataset D. n To train a local model, and by minimizing the loss function F(w) n To calculate and update w n :
[0073]
[0074] The definition of the loss function differs across different federated learning algorithms. For example, when using a linear regression federated learning model, the loss function is defined differently for input-output pairs. The loss function F can be defined as:
[0075] Next, each user n calculates their update w. n Uploaded to the server for aggregation.
[0076] (3) Model Aggregation and Download: After collecting model updates from all local clients, the server aggregates them and calculates a new version of the global model. The new model parameter vector is considered a new version of the global model. This is typically achieved by averaging or weighted averaging the model parameters across all clients.
[0077]
[0078] After training, the parameter server will aggregate the parameters uploaded by users to update the global model parameters. The parameter server will also pay the users who participated in the training (determined by the auction algorithm in S3) to recognize their efforts and contributions.
[0079] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the embodiments described above. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A federated learning incentive mechanism method considering multi-server competition, characterized in that, include: All parameter servers are initialized, a global model for federated learning is established, and the network structure is defined. The parameter servers announce the auction rules and publish the training tasks for federated learning to users. Users submit their bids for the federated learning training tasks published on various servers, based on their own conditions. After receiving the user's bid, the parameter server determines the winning set and the reward to be paid by the user who participated in the training, based on the adaptive multi-item auction algorithm. Training is performed according to federated learning steps. The parameter server distributes the global model to users in the winning set. Users train locally and upload parameter updates to the parameter server. After training is completed, the parameter server will aggregate the parameters uploaded by users to update the parameters of the global model. The parameter server will also pay the users who participated in the training accordingly to recognize their efforts and contributions. The adaptive multi-item auction algorithm is as follows: First, the server initializes. Each server has an evaluation metric for each user, namely the user's cumulative training quality. Secondly, user initialization involves each user reporting their initial price, which represents the energy consumed during training. Each user has a current price. Initial revenue for users Winner's Server Empty; For each user, and for each server, when that server is not the winning server for that user, calculate the revenue they would gain if they recruited that user. Sort them if Then, bids are offered to users in turn, with each bid being the user's initial price plus an increment. Right now until the budget runs out; Each user calculates their earnings. The server with the highest earnings is selected as the temporary winner, and that user's earnings are published. This is to provide servers for bidding in subsequent auctions; Repeat the above process until the termination condition is met; Termination condition: The algorithm terminates when the winner server for all users remains unchanged in the last two rounds, meaning no user is bid up again. Users perform federated learning training tasks for their winning servers.
2. The federated learning incentive mechanism method according to claim 1, characterized in that, The network structure used is LeNet.
3. The federated learning incentive mechanism method according to claim 1, characterized in that, A synchronous federated learning strategy is adopted, specifically, the training of the parameter server is synchronous.
4. The federated learning incentive mechanism method according to claim 1, characterized in that, The user's bid is specifically calculated as follows: the energy consumption generated by the user's participation in the training tasks of each parameter server is calculated using the user's data sample size, and the energy consumption is used as the low price of the user's auction.
5. The federated learning incentive mechanism method according to claim 1, characterized in that, The parameter server also includes a test dataset. Before model aggregation, the parameter server tests the local model parameters uploaded by each user. The test set used is a small portion of data randomly extracted from the entire test dataset, and the loss generated during the testing process is recorded. After model aggregation, the global model is tested on the entire test dataset, and the loss generated during the testing process is recorded.
6. The federated learning incentive mechanism method according to claim 5, characterized in that, Define user training quality metrics as follows: Assuming in At time t, the loss value of the global model of parameter server m on the test set is... The model parameters for each user are tested using a randomly assigned test dataset, and the resulting loss value is... We will improve user training quality Defined as in and These are weight parameters; This is related to the training quality of historical users. The corresponding weights are ,in It is a forgetting factor; exist The estimated user training quality for this iteration is: Based on the estimated value, determine the compensation that the user needs to pay.
7. The federated learning incentive mechanism method according to claim 1, characterized in that, It also includes the assumption that users have limited computing power and can only participate in the federated learning training task of one parameter server at a time in each round.
8. The federated learning incentive mechanism method according to claim 5, characterized in that, The weights are assigned using an exponential forgetting function.