Fair incentive method based on dynamic federal learning

By designing a training contract algorithm and reputation value mapping mechanism based on a multi-dimensional bidding mechanism, combining similarity smoothing metrics and greedy selection algorithms, the client set is dynamically adjusted, and the negative impact of heterogeneous client data on the performance of the global model in federated learning is solved, fair incentives and security are achieved, and the robustness and sustainability of the model are improved.

CN120450084APending Publication Date: 2025-08-08SHANXI MERCURY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510560769.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In a federated learning environment, how to ensure fairness while reducing the negative impact of heterogeneous client data on global model performance, prevent malicious attacks, and improve the robustness and sustainability of the model.

Method used

A training contract algorithm based on a multi-dimensional bidding mechanism is designed, a reputation value mapping mechanism and training value coefficient are introduced, a similarity smoothing measurement mechanism and a greedy selection client adaptive adjustment algorithm are adopted, and a client collection is dynamically adjusted to ensure fair incentives and security.

Benefits of technology

It realizes fair screening of high-quality clients under limited budgets, prevents malicious attacks, improves the accuracy and robustness of the global model, and ensures the sustainability of the federated learning ecosystem.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120450084A_ABST
    Figure CN120450084A_ABST
Patent Text Reader

Abstract

The invention discloses a fair incentive method based on dynamic federated learning, and belongs to the technical field of federated learning. Aiming at the problem of how to reduce the negative influence of heterogeneous client data on the performance of a federal global model while ensuring the fairness of a federal learning environment, a training contract algorithm based on a multi-dimensional bidding mechanism is designed, so that an illegal client is prevented from generating a contract for the federal global model. A similarity smoothness measurement mechanism based on model parameters is put forward to fairly measure contribution of clients, a concept of training value coefficients is put forward, an exclusive training value coefficient is created for each client by means of a reputation value mapping mechanism, and the value and necessity of the clients in subsequent learning are measured. And distribution and efficient utilization of resources in a subsequent learning process are promoted. A client self-adaptive adjustment algorithm based on greedy selection is provided, the algorithm fuses a greedy thought and a feedback control mechanism, a fair and efficient motivation target is achieved, and sustainability and robustness of federal learning ecology are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of federated learning, and specifically relates to a fair incentive method based on dynamic federated learning. Background Art

[0002] Federated learning (FL) is a groundbreaking machine learning paradigm for learning a shared global model from multiple, disconnected clients without sharing individual data. Distributed clients train machine learning models based on private data and simply send model updates to a central server, collaboratively training a global federated model (e.g., FedAvg). This decentralized model training, adhering to the principles of centralized collection and data minimization, prevents users from directly exposing their private data to businesses or other participants, effectively reducing the privacy risks and communication overhead associated with traditional centralized machine learning. However, given the multi-party nature of a federated learning environment, building an efficient and fair collaborative training model within a limited learning budget is complex. For example, the heterogeneity of client data directly impacts the quality of the final global model, and the fairness of the federated learning environment directly determines the sustainability of federated model training. Therefore, how to ensure fairness in a federated learning environment while mitigating the negative impact of heterogeneous client data on the performance of the federated global model (such as loss of model accuracy and reduced generalization) has become a pressing issue in current federated learning architectures.

[0003] To address the issue of client data heterogeneity, current federated learning solutions focus on client selection, such as crowdsourcing models, reputation-based blockchain-based value assessment, and reverse auction mechanisms based on bid-first. Crowdsourcing models and bid-first mechanisms tend to include as many clients as possible during the federated learning training process, ensuring that a sufficient number of clients ensures that the model training process does not experience interruptions or fluctuations due to insufficient client numbers. However, this can lead to the aggregation of low-quality clients (e.g., those with excessive data noise or too many missing values), which can harm the overall model. Conversely, while clients with high reputations can ensure their own data quality, high reputations are often associated with high economic costs or resource investment. This makes it difficult to select a sufficient number of high-reputation clients in budget-constrained federated learning environments, making it difficult to effectively ensure the generalization and robustness of the overall model. Furthermore, federated learning involves a multi-client collaborative learning model, and client contributions are constrained by factors such as data size, data quality, and communication overhead. Generally speaking, clients with larger data sizes and richer data types have a more significant impact on the performance of the learning model. However, some clients may engage in "free-rider" attacks. During collaborative model training, they merely extract value from the model without effectively updating model parameters or contributing data themselves, thereby reaping the benefits of others' training. Furthermore, there are also malicious attacks against models, such as data poisoning, where clients intentionally tamper with or inject erroneous data to disrupt the model's normal learning process, causing it to misdirect and produce incorrect results. This can negatively impact the entire learning process, undermining the model's accuracy and reliability. Therefore, within a given budget, a secure federated learning ecosystem that can screen suitable clients, fairly reflect each client's contributions, and maintain security is crucial to ensuring the robustness and sustainability of federated learning.

[0004] In addition, the contribution value of a local client is often equivalent to the value of its own data. A naive idea is to construct a measurement mechanism to evaluate the value of the client's data. However, in view of the requirement of privacy protection, the evaluation of the client's contribution to the global model should be lightweight, that is, during the evaluation process, the client's data privacy is not affected, but the importance of each client's contribution is accurately evaluated in an indirect and efficient way. A common method is to evaluate the impact of each client on the performance of the federated learning aggregation model, such as the deletion diagnosis mechanism and the Shapley value measurement mechanism. However, the above method requires full permutation calculation, which brings extremely high time complexity (O(n 2), resulting in excessively high computational costs. Secondly, while the approximate Shapley value mechanism, reputation value mechanism, and client multi-dimensional auction mechanism use low-complexity methods to measure client contribution, they cannot dynamically adjust clients based on real-time conditions during training. Instead, they can only screen clients based on fixed criteria after each round of training, resulting in frequent full retraining to achieve optimal model results. Summary of the Invention

[0005] To address the problem of how to ensure the fairness of the federated learning environment while reducing the negative impact of heterogeneous client data on the performance of the federated global model, the present invention provides a fair incentive method based on dynamic federated learning.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] A fair incentive method based on dynamic federated learning, the method comprising the following steps:

[0008] Step 1: Establish a dynamic federated learning system model consisting of a central server and clients, and perform model initialization and parameter setting;

[0009] The specific operations of step 1 are:

[0010] The model consists of a learning budget The central server and N clients are composed of, which is recorded as matrix Each row in the matrix corresponds to a client, and each client i contains three-dimensional bidding information, that is, the i-th row vector of the matrix Among them, b i Represents the bidding price of client i, i represents the reputation value of client i, ∈ i represents the training value coefficient of client i;

[0011] Dynamic federated learning tasks are carried out In a round of global iteration, when starting a federated learning task, the central server splits the task into a set of task blocks. in F(·) represents The mapping function to ε, represents the jth task block; represents the budget allocated to the jth task block; ε j represents the accuracy achieved by the federated prediction global model at the end of the jth task block;

[0012] set up represents the pre-reward of the federation to client i before the start of the j-th task block; represents the actual reward that the federation gives to client i after the jth task block is completed;

[0013] Federation target optimization condition: In the dynamic federated learning task iteration process, the federation is for each task block Filter out suitable client sets Maximize federal utility, and in addition, Fairly distribute rewards to each client Expressed as:

[0014]

[0015] in, represents the actual reward at the end of the current task block, and f(·) is the model aggregation function of the input model update; constraint (2) means that for each federated learning task block, the final reward paid by the federation does not exceed the learning budget of the current task block;

[0016] set up For client i in the task block The actual reward obtained at the end. Individual rationality conditions: Ensure that the client has sufficient motivation to participate in the federated learning process; if this condition is not met, as a rational client, it will choose to withdraw from the federated learning task, thereby affecting the sustainability of the entire federated learning ecosystem.

[0017] Assume b i 、Re i is the actual bidding price and reputation value of client i, u i is the utility function of client i, and the authenticity condition is: in, is any bid price and reputation value that client i may submit; specifically, authenticity requires that the client can only submit the real bid price b i and reputation value Re i To maximize its own utility. If the client attempts to submit a false bid price and reputation value (i.e. or ), its utility will not increase and may even decrease. This ensures the authenticity of information in the federated learning ecosystem and prevents clients from gaining benefits through improper means.

[0018] The deposit that the client needs to pay to join the dynamic federated learning task in the tth round of global iteration It is positively correlated with the round t, and the specific relationship is shown in the following formula:

[0019]

[0020] in, Indicates the round that the current communication of the federation has taken;

[0021] Then, the federation will use the reputation value of each client to and bid price Calculate the minimum number of communication rounds required for each The formula is:

[0022]

[0023] Among them, ζ represents the impact reputation value Re i and bid price b i The coefficient of the weight of the product part, τ, represents a constant term. When the client defaults, the corresponding deposit will be deducted by the federation, otherwise it will be returned.

[0024] Step 2: Design training contracts and fairness incentive mechanisms, screen clients in the system, and enhance the security of the federated learning system model environment;

[0025] The specific operations of step 2 are:

[0026] The entire federated learning communication process is divided into several task blocks Task Block The budget allocated is Federation sets federated learning expectations for each task block When the client meets the expected value of the current task block, it will receive all the rewards On the contrary, they can only obtain partial rewards based on their own contribution value. The Gompertz function is used to measure the federation's expectations. The Gompertz function is defined as follows:

[0027]

[0028] A, B, and C are parameters. Mapping the federation expected value yields the following definition:

[0029]

[0030] Where a1, a2 are parameters;

[0031] The formula for federal compensation rules is as follows:

[0032]

[0033] Among them, r j Indicates the completion of the task block Actual rewards after federal allocation, It is a task block The result, Represents the current task block The initial budget allocated is as follows:

[0034]

[0035] Introducing reputation value Re i Mapping mechanism, calculate the relative residual value of the client; first, based on the reputation value Re of each client i and bid price b i Set a unique training value coefficient ∈ for the client i , the formula is as follows:

[0036]

[0037] Among them, Re i Control the training value coefficient of client i as The speed at which α increases and decreases.

[0038] Step 3: Use similarity measurement methods and smoothing mechanisms to build a fair client contribution measurement system and design corresponding incentive mechanisms;

[0039] The specific operations of step 3 are:

[0040] In each communication round, each client submits local model parameters to the federation The federation aggregates and averages the local model parameters to obtain the global model parameter Θ t , using the cosine similarity between local model parameters and global model parameters To approximate the contribution of the client, the formula is defined as follows:

[0041]

[0042] in, represents the element-wise product of the local model parameters and the global model parameters at the corresponding position;

[0043] Taking into account the client's contribution to the federation in both past and current communications, the client's overall contribution to the federation is calculated, which is defined as follows:

[0044]

[0045] Among them, α is a parameter,

[0046] The client's reward is related to its contribution value. When the federation's contribution value meets the federation's expectations, the client can receive the corresponding reward. Otherwise, if the federation's expectations are not met, the client can only receive a partial reward. The specific reward design is as follows:

[0047]

[0048] Among them, β1, β2 are parameters used to adjust the weights of Re and b, It represents the pre-reward of the federation for client i. The formula is as follows:

[0049]

[0050] Federation for each task block Provides a client collection Make it on a limited budget Maximize the quality of the federated model and determine the reward At the same time, it is mapped to the utility u of the local client i Maximization, the formula is as follows:

[0051]

[0052] Step 4: Propose a client adaptive adjustment algorithm based on greedy selection to dynamically adjust the client set so that the result meets the expected effect of the federation;

[0053] The specific operations of step 4 are:

[0054] Based on Re i 、b i ,∈ i The clients are divided into cost-effective CE clients and high-quality HQ clients. First, based on Calculate the estimated value of each client, and then sort the clients according to the estimated value. The formula is as follows:

[0055]

[0056] PreV1≥PreV2≥…≥PreV n (18)

[0057] For reputation values above the average, The order of the clients is: Then, sort the remaining clients to get:

[0058] Then with task blocks Initial budget Based on the benchmark, choose the cost-effective CE client and high-quality HQ client, budget The formula for selecting clients belonging to these two types is as follows:

[0059]

[0060] in, Indicates the budget required to select a cost-effective client. The budget required to select high-quality clients is therefore At the beginning, the client's choice is expressed as follows:

[0061]

[0062] Among them, C j Indicates the number of selected cost-effective clients; H j Indicates the number of high-quality clients selected;

[0063] So, in the task block Client Collection The number of clients k j k j =C j +H j , federation based on each task block The result value at the end and expected ε j The difference between the two is used to dynamically adjust the ratio of cost-effective CE clients and high-quality HQ clients in the client set. The federation allocates budgets based on the current ratio of cost-effective CE clients to high-quality HQ clients. The formula is as follows:

[0064]

[0065] In addition, by combining the client's contribution value To adjust the client's reputation value Re i , the client's contribution value hours, the Federation reduces the reputation i On the contrary, if the reputation value is increased, as the reputation value of client i decreases, the utility u of client i i As the reputation value increases, its utility increases. As the reputation value of client i increases, the probability of client i being included in the next task block increases. The formula is as follows:

[0066]

[0067] Compared with the prior art, the present invention has the following advantages:

[0068] The present invention proposes a fair incentive method based on dynamic federated learning, named FRM-DFed (Fairness Reward Mechanism for Dynamic Federated Learning). This method avoids illegal clients from coveting the federated model by designing a training contract algorithm based on a multi-dimensional bidding mechanism. Furthermore, in order to accurately measure the contribution of the client, FRM-DFed proposes a similarity smoothing measurement mechanism (CSEMA) based on model parameters to fairly measure the contribution of the client. At the same time, the key concept of "training value coefficient" is innovatively proposed, and with the help of the "reputation value" mapping mechanism, an exclusive "training value coefficient" (TVC) is created for each client, so as to accurately measure the value and necessity of the client in subsequent learning, and promote the allocation and efficient utilization of resources in the subsequent learning process. Subsequently, a client adaptive adjustment algorithm based on greedy selection (GRAFC) is proposed. This algorithm combines the greedy idea with the feedback control mechanism. The greedy algorithm intelligently screens clients based on the ratio of their bid price to their reputation value, ensuring the number of clients to increase data diversity and ensure training continuity; the feedback control mechanism dynamically adjusts the client set based on the federation's accurate assessment of client value, effectively blocking the aggregation of low-quality clients and actively encouraging high-quality clients to participate deeply. In a secure federated learning environment, it achieves the incentive goal of both fairness and efficiency, ensuring the sustainability and robustness of the federated learning ecosystem. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 This is the FRM-DFed system model diagram;

[0070] Figure 2 Comparison chart of model accuracy under different incentive mechanisms;

[0071] Figure 3 Schematic diagram of total utility in different scenarios. DETAILED DESCRIPTION

[0072] To gain a deeper understanding of the present invention, we will provide a comprehensive and detailed description thereof. However, the present invention has various implementations and is not limited to the specific examples listed herein. These examples are presented to enhance a comprehensive understanding of the present disclosure.

[0073] A fair incentive method based on dynamic federated learning, the method comprising the following steps:

[0074] Step 1: Establish a dynamic federated learning system model consisting of a central server and clients, initialize the model and set parameters, and design a training contract.

[0075] The specific operations of step 1 are:

[0076] The model consists of a learning budget of The central server and N clients are composed of, which is recorded as matrix Each row in the matrix corresponds to a client, and each client i contains three-dimensional bidding information, that is, the i-th row vector of the matrix Among them, b i Represents the bidding price of client i, i represents the reputation value of client i, ∈ i represents the training value coefficient of client i;

[0077] Dynamic federated learning tasks are carried out In a round of global iteration, when starting a federated learning task, the central server splits the task into a set of task blocks. in F(·) represents The mapping function to ε, represents the jth task block; represents the budget allocated to the j-th task block; ε j represents the accuracy achieved by the federated prediction global model at the end of the jth task block;

[0078] set up represents the pre-reward of the federation to client i before the start of the j-th task block; represents the actual reward that the federation gives to client i after the jth task block is completed;

[0079] Federation target optimization condition: In the dynamic federated learning task iteration process, the federation is for each task block Filter out suitable client sets Maximize federal utility, and in addition, Fairly distribute rewards to each client Expressed as:

[0080]

[0081] in, is the set of clients included in the federation under the current task block, represents the actual reward at the end of the current task block, and f(·) is the model aggregation function of the input model update; constraint (2) means that for each federated learning task block, the final reward paid by the federation does not exceed the learning budget of the current task block;

[0082] set up For client i in the task block The actual reward obtained at the end. Individual rationality conditions: Ensure that the client has sufficient motivation to participate in the federated learning process; if this condition is not met, as a rational client, it will choose to withdraw from the federated learning task, thereby affecting the sustainability of the entire federated learning ecosystem.

[0083] Assume b i 、Re i is the actual bidding price and reputation value of client i, u i is the utility function of client i, and the authenticity condition is: in, is any bid price and reputation value that client i may submit; specifically, authenticity requires that the client can only submit the real bid price b i and reputation value Re i To maximize its own utility. If the client attempts to submit a false bid price and reputation value (i.e. or ), its utility will not increase and may even decrease. This ensures the authenticity of information in the federated learning ecosystem and prevents clients from gaining benefits through improper means.

[0084] During the training process, in order to prevent malicious clients from illegally profiting in the federation, each client needs to pay a deposit to the federation. In order to prevent malicious withdrawal of clients, the federation sets a minimum communication round for each client. In addition, given the fact that the accuracy of the model in federated learning increases nonlinearly with the number of global communication rounds, a round-based dynamic deposit adjustment mechanism needs to be established to ensure the symmetry of the contribution-benefit ratio of each participant during the dynamic training process. Specifically, the deposit that the client needs to pay to join the dynamic federated learning task in the tth round of global iteration is It is positively correlated with the round t, and the specific relationship is shown in the following formula:

[0085]

[0086] in, Indicates the round that the current communication of the federation has taken;

[0087] Then, the federation will use the reputation value of each client to and bid price Calculate the minimum number of communication rounds required for each The formula is:

[0088]

[0089] Among them, ζ represents the impact reputation value Re i and bid price b i The coefficient of the weight of the product part, τ, represents a constant term. When the client defaults, the corresponding deposit will be deducted by the federation, otherwise it will be returned.

[0090] Algorithm 1 shows the process of training contracts to maintain the security and fairness of the federated ecosystem. First, the federation determines the minimum number of communication rounds for each client. (Lines 2-4), and select the appropriate client set based on the client's multi-dimensional bidding information (Line 5). Then, the federated learning task is formally executed (Lines 6-21) until the iteration round reaches the upper limit. To address the "threat of unfairness during training," the federation calculates and collects a deposit from each client. And record the global iteration round when the client first participates in the federated learning task Then update the federal budget (Lines 7-11). Due to the dynamic environment, there is a time difference when the client joins the federated learning task, which will lead to an imbalance between benefits and risks. Therefore, in order to ensure the fairness of the federated environment, the federation requires the client to pay a deposit of Will follow The training contract will increase with the increase of (line 9). For the withdrawal of the client, whether legal or illegal, the training contract will take appropriate countermeasures (lines 12-19). Specifically, if the client withdraws maliciously, that is, it constitutes a "client's malicious withdrawal threat midway", then the federation will deduct its rewards and deposits (lines 14-16). Otherwise, it will receive corresponding rewards (lines 18-19). In addition, if the client's contribution value is If it is 0 (line 14), it constitutes a "threat of client "free riding" to steal results". In this case, the federation will also punish it.

[0091]

[0092] Step 2: Design training contracts and fairness incentive mechanisms, screen clients in the system, and enhance the security of the federated learning system model environment;

[0093] The specific operations of step 2 are:

[0094] The entire federated learning communication process is divided into several task blocks Task Block The allocated budget is Federation sets federated learning expectations for each task block The client can only obtain the full reward if it meets the expected value of the current task block. Conversely, a federation can only receive a portion of its rewards based on its own contribution. This paper uses the Gompertz function to measure the federation's expectations. The Gompertz function exhibits significant nonlinear properties in simulating growth and has extensive applications in describing complex systems. These properties make it a suitable tool for effectively measuring changes in expectations within a federation. The Gompertz function is defined as follows:

[0095]

[0096] Where A, B, and C are parameters, and the federation expected value is mapped to the following definition:

[0097]

[0098] Among them, a1, a2 are parameters, j represents the current task block

[0099] The formula for federal compensation rules is as follows:

[0100]

[0101] Among them, r j Indicates the completion of the task block Actual rewards after federal allocation, It is a task block The result, Represents the current task block The initial budget formula for the allocation is as follows:

[0102]

[0103] Introducing reputation value Re i Mapping mechanism, calculate the relative residual value of the client; first, based on the reputation value Re of each client i and bid price b i Set a unique training value coefficient ∈ for the client i , in order to prevent overfitting and maintain the generalization ability of the global model, these coefficients will decrease as the number of communications increases, as shown in the following formula:

[0104]

[0105] Among them, Re i Control the training value coefficient of client i as The speed of decrease as the value of

[0106] Step 3: Use similarity measurement methods and smoothing mechanisms to build a fair client contribution measurement system and design corresponding incentive mechanisms;

[0107] The specific operations of step 3 are:

[0108] In each communication round, each client submits local model parameters to the federation The federation aggregates and averages the local model parameters to obtain the global model parameter Θ t , using the cosine similarity between local model parameters and global model parameters To approximate the contribution of the client, the formula is defined as follows:

[0109]

[0110] in, represents the element-wise product of the local model parameters and the global model parameters at the corresponding position;

[0111] However, in order to reduce the subjectivity of this measurement method, we further integrate the prior knowledge, namely the client's reputation value Re i By using a variation of the exponential moving average (EMA) formula, this paper comprehensively considers the client's contribution to the federation in both past and current communications, and derives the client's total contribution to the federation, which is defined as follows:

[0112]

[0113] Among them, α is a parameter,

[0114] The client's reward is related to its contribution value. When the federation's contribution value meets the federation's expectations, the client can receive the corresponding reward. Otherwise, if the federation's expectations are not met, the client can only receive a partial reward. The specific reward design is as follows:

[0115]

[0116] Among them, β1, β2 are parameters used to adjust the weights of Re and b, It represents the pre-reward of the federation for client i. The formula is as follows:

[0117]

[0118] Although the training contract provides certain norms and guarantees for federated learning, in this dynamic environment, timely providing a more suitable and efficient client set for the iterative tasks of the federated global model is the key to maintaining the sustainable development of the federated ecosystem. The goal of this adaptive dynamic adjustment is to Provides a client collection Make it on a limited budget Maximize the quality of the federated model and determine the reward At the same time, it is mapped to the utility u of the local client i Maximization is as follows:

[0119]

[0120] Step 4: Propose a client adaptive adjustment algorithm based on greedy selection to dynamically adjust the client set so that the result meets the expected effect of the federation;

[0121] The specific operations of step 4 are:

[0122] Based on Re i 、b i ,∈ i The clients are divided into cost-effective CE clients and high-quality HQ clients. First, based on Calculate the estimated value of each client, and then sort the clients according to the estimated value. The formula is as follows:

[0123]

[0124] PreV1≥PreV2≥…≥PreV n (18)

[0125] High-quality clients refer to those clients with high-quality data, usually assumed to have higher Re i The client with a reputation value higher than the average value means that the data quality is better. Therefore, this paper first analyzes the client with a reputation value higher than the average value, that is, The order of the clients is: Then, sort the remaining clients to get:

[0126] Then with task blocks Initial budget Based on the benchmark, choose the cost-effective CE client and high-quality HQ client, budget The formula for selecting clients belonging to these two types is as follows:

[0127]

[0128] in, Indicates the budget required to select a cost-effective client. The budget required to select high-quality clients is therefore At the beginning, the client's choice is expressed as follows:

[0129]

[0130] Among them, C jIndicates the number of selected cost-effective clients; H j Indicates the number of high-quality clients selected;

[0131] So, in the task block Client Collection The number of clients k j k j =C j +H j , federation based on each task block The result value at the end and expected ε j The difference between the two, dynamically adjust the ratio of cost-effective CE clients and high-quality HQ clients in the client set, aiming to To achieve the above goals, this paper proposes the GRAFC algorithm, as shown in Algorithm 2:

[0132]

[0133]

[0134] Specifically, when It is believed that the client set lacks high-quality clients, and the federation improves the quality of training data by increasing HQ clients and reducing CE clients to address this problem. Assuming the model quality meets the expected standards, we increase the number of CE clients while reducing the number of HQ clients to prevent the trained model from over-representing a particular client and lacking generalization. In other words, the federation allocates the budget based on the ratio of the current cost-effective CE clients to high-quality HQ clients. The formula is as follows:

[0135]

[0136] In addition, by combining the client's contribution value To adjust the client's reputation value Re i , the client's contribution value hours, the Federation will reduce the reputation i On the contrary, the reputation value will increase. As the reputation value of client i decreases, the utility u of client i i As the reputation value increases, its utility will increase. As the reputation value of client i increases, the probability of client i being included in the next task block will also increase. The formula is as follows:

[0137]

[0138] Dataset: The present invention uses a total of three datasets to simulate three prediction tasks. Specifically, the present invention uses two well-studied image datasets, including MNIST, FMNIST, and CIFAR-10 for image prediction. MNIST is a dataset of handwritten 0-9 digits, containing 60,000 training samples and 10,000 test samples. FMNIST (Fashion-MNIST) is an image dataset containing images from 10 fashion categories, similar to MNIST. Each category consists of 60,000 training samples and 10,000 test samples. The CIFAR-10 dataset consists of 50,000 training images and 10,000 test images from 10 categories. For these two datasets, the present invention will sample some test data accordingly for evaluation, and the specific information is shown in Table 1:

[0139] Table 1 Experimental dataset

[0140]

[0141]

[0142] Model: We use the seven most commonly used learning models to evaluate the performance of FRM-DFed, including CNN, RNN, LeNet, VGG, GoogleNet, and ResNet.

[0143] Experimental implementation: First, the performance of the incentive mechanism of FRM-DFed is studied. The experimental settings in Table 2 are used, including the learning budget Reputation value Re, bid price b, and contribution value measurement parameter α. Re and b are random numbers between 0 and 1.

[0144] Table 2 Experimental parameter settings

[0145]

[0146] The present invention conducts experiments according to the experimental setting of setting I in Table 2, and simulates the situation where reputation value reflects data quality by adding noise to the data sets with different reputation values.

[0147] Performance of FRM-DFed: The present invention runs 6 different learning tasks. Specifically, CNN and RNN models are trained using MNIST. GoogleNet and VGG models are trained using CIFAR-10, while LeNet and ResNet models are trained using FMNIST. The parameters are set as follows: a1=3, a2=0.3; b1=1.5, b2=1.5. In addition, for fair comparison, all benchmarks (including FRM-DFed) use the federated averaging algorithm for model aggregation. After 50 rounds of communication, the present invention is Figure 2 The average accuracy results of the learned models are plotted in .

[0148] observe Figure 2 We found that FRM-DFed demonstrated excellent performance across all learned models, with only a negligible drop in accuracy compared to the ideal dataset results. However, FRM-DFed achieved significant improvements over the other two mechanisms. For example, when evaluating CNN models, the greedy selection and bid-first mechanisms achieved only 76% and 66% accuracy, respectively. In contrast, FRM-DFed achieved 95% accuracy, a significant improvement.

[0149] Security performance of FRM-DFed: To verify the security of FRM-DFed, we compared it with the classic FedAvg algorithm and set up four threat scenarios for verification. Six models were trained using their respective datasets, and each model was trained using 10 clients in the following four scenarios: a) Clean dataset: All clients have the original, unaltered training dataset for normal model training. The data samples are evenly distributed among the clients. b) Noisy dataset: Random noise is added to the data of 10 clients based on the client's reputation value. The noise intensity decreases as the reputation value increases. c) Mislabeled client: Among the selected clients, 70% of the data labels are correct, while the remaining 30% are incorrect. A total of 10 clients were selected for training. d) Attack client: In each iteration, a fixed client among the 10 clients submits an incorrect update, while the other clients train normally.

[0150] Table 3 shows the average model accuracy after several rounds of communication, revealing two key observations. First, FRM-DFed outperforms the FedAvg algorithm in almost all scenarios, across all models and datasets. Second, the FedAvg algorithm's model aggregation performance can significantly degrade when the learning quality of the model update is reduced. In contrast, FRM-DFed demonstrates robust performance in all scenarios. Taking the LeNet learning model as an example, the FedAvg algorithm's model accuracy drops from 92.21% in the clean dataset scenario to 15.57% in the attack dataset scenario. Meanwhile, FRM-DFed's accuracy only drops from 93.55% to 79.25%. Similar observations are observed for other learning models in different scenarios.

[0151] Table 3 Model aggregation results in different scenarios

[0152]

[0153] Fairness and utility maximization performance of FRM-DFed: This paper evaluates the fairness of FRM-DFed through contribution metrics and explores the impact of data quality on contribution value. Specifically, this paper uses the FedAvg algorithm for model aggregation and compares the performance of FRM-DFed with the greedy selection mechanism. Using the experimental setting II in Table 1, this paper fixes the reputation value Re of each client between [0,1], the amount of data for each client is 600, and 5 local epochs are performed each iteration. As the reputation value increases, the random noise added to the data decreases, which is close to the data quality distribution in the real world. In addition, the learning budget during communication It is set to 5, with a total of 30 rounds of communication. The task block is divided into 5 segments, and the client needs to be reselected every 6 communications. Table 4 shows the contribution, bidding price, reputation value and other related information of different clients during the training of the CNN model. Observations show that: First, in terms of fairness, FRM-DFed can fairly measure the contribution of the client, that is, the reputation value is proportional to the contribution value. Similar to the situation in real life, clients with higher data quality tend to contribute more to the convergence of the global model, and thus have higher contribution values, such as Client57, Client88, and Client44. Conversely, clients with lower data quality contribute less, such as Client45 and Client10. In addition, the training value coefficient This reflects that the probability of clients with poor data quality entering the next task block is reduced.

[0154] Table 4 Client multi-dimensional bidding information

[0155]

[0156] We further study the utility maximization by adopting the experimental setting III in Table 1. We increase the learning budget to add more clients. When , FRM-DFed can screen out 21 clients, greedy selection can screen out 24 clients, and bidding priority can screen out 47 clients. Each client processes 600 data points. The communication round is set to 30, and the task block is still 5. The final utility comparison of the three is as follows: Figure 3 shown.

[0157] Observation results show that FRM-DFed consistently outperforms the greedy selection mechanism and the bid-first mechanism in all settings.

[0158] Any matters not described in detail in this specification are prior art known to those skilled in the art. Although the above description of the present invention is based on specific embodiments to facilitate understanding of the present invention by those skilled in the art, it should be understood that the present invention is not limited to the scope of the specific embodiments. As long as various modifications are within the spirit and scope of the present invention as defined and determined by the appended claims, such modifications will be obvious to those skilled in the art, and all inventions and creations utilizing the concepts of the present invention are protected.

Claims

1. A fair incentive method based on dynamic federated learning, characterized by: The method comprises the following steps: Step 1: Establish a dynamic federated learning system model consisting of a central server and clients, and perform model initialization and parameter setting; Step 2: Design training contracts and fairness incentive mechanisms, screen clients in the system, and enhance the security of the federated learning system model environment; Step 3: Use similarity measurement methods and smoothing mechanisms to build a fair client contribution measurement system and design corresponding incentive mechanisms; Step 4: Propose a client adaptive adjustment algorithm based on greedy selection to dynamically adjust the client set so that the result meets the expected effect of the federation.

2. A fair incentive method based on dynamic federated learning according to claim 1, characterized in that: The specific operations of step 1 are: The model consists of a learning budget The central server and N clients are composed of, which is recorded as matrix Each row in the matrix corresponds to a client, and each client i contains three-dimensional bidding information, that is, the i-th row vector of the matrix Among them, b i Represents the bidding price of client i, i Represents the reputation value of client i, ∈ i represents the training value coefficient of client i; Dynamic federated learning tasks are carried out In a round of global iteration, when starting a federated learning task, the central server splits the task into a set of task blocks. in F(·) represents The mapping function to ε, represents the jth task block; represents the budget allocated to the jth task block; ε j represents the accuracy achieved by the federated prediction global model at the end of the jth task block; set up represents the pre-reward of the federation to client i before the start of the j-th task block; represents the actual reward that the federation gives to client i after the jth task block is completed; Federation target optimization condition: In the dynamic federated learning task iteration process, the federation is for each task block Filter out suitable client sets Maximize federal utility, and in addition, Fairly distribute rewards to each client Expressed as: in, represents the actual reward at the end of the current task block, and f(·) is the model aggregation function of the input model update; constraint (2) means that for each federated learning task block, the final reward paid by the federation does not exceed the learning budget of the current task block; set up For client i in the task block The actual reward obtained at the end, Ensure that clients have sufficient incentives to participate in the federated learning process; Assume b i 、Re i is the actual bidding price and reputation value of client i, u i is the utility function of client i, and the authenticity condition is: in, Any bid price and reputation value that client i may submit; The deposit that the client needs to pay to join the dynamic federated learning task in the tth round of global iteration It is positively correlated with the round t, and the specific relationship is shown in the following formula: in, Indicates the round that the current communication of the federation has taken; Then, the federation will use the reputation value of each client to and bid price Calculate the minimum number of communication rounds required for each The formula is: Among them, ζ represents the impact reputation value Re i and bid price b i The coefficient of the weight of the product part, τ, represents a constant term. When the client defaults, the corresponding deposit will be deducted by the federation, otherwise it will be returned.

3. A fair incentive method based on dynamic federated learning according to claim 2, characterized in that: The specific operations of step 2 are: The entire federated learning communication process is divided into several task blocks Task Block The allocated budget is Federation sets federated learning expectations for each task block When the client meets the expected value of the current task block, it will receive all the rewards On the contrary, they can only obtain partial rewards based on their own contribution value. The Gompertz function is used to measure the federation's expectations. The Gompertz function is defined as follows: Where A, B, and C are parameters, and the federation expected value is mapped to the following definition: Among them, a1, a2 are parameters; The formula for federal compensation rules is as follows: Among them, r j Indicates the completion of the task block Actual rewards after federal allocation, It is a task block The result, Represents the current task block The initial budget allocated is as follows: Introducing reputation value Re i Mapping mechanism, calculate the relative residual value of the client; first, based on the reputation value Re of each client i and bid price b i Set a unique training value coefficient ∈ for the client i , the formula is as follows: Among them, Re i Control the training value coefficient of client i as The speed at which α increases and decreases.

4. A fair incentive method based on dynamic federated learning according to claim 3, characterized in that: The specific operations of step 3 are: In each communication round, each client submits local model parameters to the federation The federation aggregates and averages the local model parameters to obtain the global model parameter Θ t , using the cosine similarity between local model parameters and global model parameters To approximate the contribution of the client, the formula is defined as follows: in, represents the element-wise product of the local model parameters and the global model parameters at the corresponding position; Taking into account the client's contribution to the federation in both past and current communications, the client's overall contribution to the federation is calculated, which is defined as follows: Among them, α is a parameter, The client's reward is related to its contribution value. When the federation's contribution value meets the federation's expectations, the client can receive the corresponding reward. Otherwise, if the federation's expectations are not met, the client can only receive a partial reward. The specific reward design is as follows: Among them, β1, β2 are parameters used to adjust the weights of Re and b, It represents the pre-reward of the federation for client i. The formula is as follows: Federation for each task block Provides a client collection Make it on a limited budget Maximize the quality of the federated model and determine the reward At the same time, it is mapped to the utility u of the local client i Maximization, the formula is as follows:

5. A fair incentive method based on dynamic federated learning according to claim 4, characterized in that: The specific operations of step 4 are: Based on Re i 、b i ,∈ i The clients are divided into cost-effective CE clients and high-quality HQ clients. First, based on Calculate the estimated value of each client, and then sort the clients according to the estimated value. The formula is as follows: PreV1≥PreV2≥…≥PreV n (18) For reputation values above the average, The order of the clients is: Then, sort the remaining clients to get: Then with task blocks Initial budget Based on the benchmark, choose the cost-effective CE client and high-quality HQ client, budget The formula for selecting clients belonging to these two types is as follows: in, Indicates the budget required to select a cost-effective client. The budget required to select high-quality clients is therefore At the beginning, the client's choice is expressed as follows: Among them, C j Indicates the number of selected cost-effective clients; H j Indicates the number of high-quality clients selected; So, in the task block Client Collection The number of clients k j k j =C j +H j , federation based on each task block The result value at the end and expected ε j The difference between the two is used to dynamically adjust the ratio of cost-effective CE clients and high-quality HQ clients in the client set. The federation allocates budgets based on the current ratio of cost-effective CE clients to high-quality HQ clients. The formula is as follows: In addition, by combining the client's contribution value To adjust the client's reputation value Re i , the client's contribution value hours, the Federation reduces the reputation of Re i On the contrary, if the reputation value is increased, as the reputation value of client i decreases, the utility u of client i i As the reputation value increases, its utility increases. As the reputation value of client i increases, the probability of client i being included in the next task block increases. The formula is as follows: