A federated learning contribution evaluation and benefit allocation system and method
By evaluating client contributions in a dual-dimensional manner within federated learning and combining approximate Shapley values and the minimum kernel method, the problem of individual fairness and federation stability is solved, achieving fair and stable payout distribution and model convergence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-21
- Publication Date
- 2026-04-10
AI Technical Summary
In federated learning, existing technologies struggle to balance individual fairness with alliance stability, resulting in insufficient long-term stability and fairness in cooperation, especially in large-scale scenarios where there are risks of 'splits' and 'free-riders'.
By evaluating client contributions in both gradient space and data space, an approximate Shapley value is dynamically calculated and combined with an approximate minimum kernel method to generate the final aggregate weights, ensuring individual fairness and alliance stability.
It achieves a fair and stable distribution of benefits in federated learning, prevents "free-riding" and "splits", accelerates model convergence, and ensures high performance of the global model and a fair and stable distribution of client contributions.
Smart Images

Figure CN121562857B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a federated learning contribution evaluation and benefit distribution system and method, belonging to the technical field of federated learning, cooperative game theory and privacy computing. BACKGROUND
[0002] In typical horizontal or vertical federated learning scenarios, multiple data holders share a global model through collaborative training. However, due to significant differences in local data volume, data quality, feature distribution, computing and communication costs of each participant, how to quantify the true contribution of each participant and return the benefits in the form of model performance improvement, monetary rewards or computing power points in a fair manner becomes a key problem to ensure the sustainability and enthusiasm of cooperation. Therefore, designing a contribution evaluation and benefit distribution mechanism that takes into account both "individual fairness" and "alliance stability" is crucial for the large-scale commercialization and sustainability of federated learning.
[0003] Under the framework of cooperative game theory, existing technologies mainly use two types of classic solution concepts to allocate federated learning contributions. One is the Shapley value method, which is based on the weighted average of marginal contributions and satisfies properties such as symmetry, reasonableness, zero contribution, and additivity, providing each participant with a unique and "individually fair" share of benefits. However, the Shapley value only guarantees individual rationality, not the higher benefits of any sub-alliance than those obtained by individual action, leading to the risk of "splitting" or "free-rider alliance" dissolving the federation, thereby affecting the long-term stability of cooperation.
[0004] The other method is the core of the minimum. The core of the minimum finds a solution that "minimizes the maximum loss value" among all possible benefit allocations by solving a linear program, ensuring that any sub-alliance has no economic incentive to exit or betray, thereby ensuring the overall stability of the federation. However, the core of the minimum usually gives a benefit interval or a set of multiple solutions, lacking fine adjustment of individual participant contributions, and its allocation results may differ greatly from intuitive fairness, thereby reducing the willingness of high-quality data providers to participate and affecting the vitality of the federation.
[0005] In addition, the Shapley value and the core of the minimum are often used independently in existing technologies, lacking a shared computing path between the two, resulting in repeated sampling, communication and storage overhead, making it difficult to efficiently apply to large-scale federated learning scenarios. Therefore, there is an urgent need for a contribution evaluation and benefit distribution method that can integrate the advantages of the Shapley value and the core of the minimum, while taking into account individual fairness and alliance stability, to support the long-term healthy operation of large-scale federated learning. SUMMARY
[0006] The technical problem solved by this invention is as follows: This invention provides a federated learning contribution evaluation and benefit distribution system and method. During the training process of federated learning, this invention dynamically and efficiently evaluates the true contribution of each client and calculates an approximate Shapley value based on this contribution value to ensure individual fairness. At the same time, it introduces the least kernel method to constrain or adjust the benefit distribution to ensure the stability of the federated cooperation alliance and avoid the risks of "free-riding" and "splits". This invention quantifies the value of client contributions more comprehensively through dual evaluation in gradient space and data space.
[0007] The technical solution of this invention is: a method for evaluating and allocating benefits from federated learning contributions, the method comprising:
[0008] S1: Design a federated learning framework for multi-party joint training of the global model;
[0009] S2: In each training round, the client not only performs local model updates, but also calculates its own contribution in the gradient space and data space in parallel, and then fuses the evaluation results of the two dimensions to obtain the fused contribution value of the client in the two dimensions; in the gradient space, the client evaluates the difference between its local gradient direction and the aggregated gradient direction of other clients after excluding itself; in the data space, the client measures the error of the aggregated model after excluding itself on its local data.
[0010] S3: Accumulate or smooth and normalize the calculated fusion contribution values of the two-dimensional clients to form an approximate Shapley value for each client in this round;
[0011] S4: Introducing the approximate minimum kernel method, in each training round, the approximate minimum kernel value is calculated and weighted together with the approximate Shapley value calculated in S3 to generate the final aggregate weight; then, the server will use the final aggregate weight to perform weighted aggregation on all locally updated models uploaded by clients, thereby updating the global model;
[0012] S5: Repeat steps S2 to S4 throughout the federated learning process until the global model reaches the preset convergence condition or completes all communication rounds; finally, output a stable and converged global model and the final contribution allocation ratio of each client.
[0013] Further, S1 includes:
[0014] S11: Identify the clients participating in training: First, identify and register all clients that will participate in federated learning. Each client owns and manages its own private local dataset. ;
[0015] S12: Initialize the global model on the server. The server creates and initializes a global model. It is then distributed to all registered clients as the starting point for local training;
[0016] S13: Set the key parameters required for training, including the total number of communication rounds. Global learning rate and local training steps ;
[0017] S14: Initially set the contribution weights of each client to provide an initial weight basis for the first round of model aggregation in federated learning. Before the first round of training begins, set an initial aggregation weight for each client. The initial aggregation weight is either equally distributed or based on the proportion of client data volume. distribute.
[0018] Further, S2 includes:
[0019] S21: Local Model Training and Gradient Calculation
[0020] In each round In the middle, the client Received the current global model distributed by the server. Then, in the local dataset Execution Local training is performed to calculate the local model update direction. The calculation formula is: ;in, To update model parameters locally, These are the initially received model parameters;
[0021] S22: Gradient space contribution evaluation:
[0022] Client Estimate or receive an aggregate gradient from the server. And calculate its gradient space contribution. The calculation formula is: ;in, It is a vector and The included angle between them, and , Represents the 2-norm;
[0023] S23: Data Spatial Contribution Assessment:
[0024] Client Estimate or receive an aggregate model from the server and in its local dataset The error of the aggregation model is calculated on the test set and used as a contribution to the data space. The calculation formula is: ;
[0025] in, To exclude clients The subsequent aggregation model In the client Local dataset The loss value calculated above, For the current global model In the client Local dataset The loss value calculated above;
[0026] S24: Multi-dimensional contribution fusion:
[0027] Contribution to gradient space and data space contribution A weighted linear combination is performed to obtain the total fusion contribution value of the two-dimensional clients. The calculation formula is: ;in, These are the weight parameters.
[0028] Further, S3 includes:
[0029] S31: Accumulate or smooth the fusion contribution value of the dual-dimensional client;
[0030] The cumulative processing refers to simply accumulating the client's contribution value across all historical rounds. Cumulative contribution value ;
[0031] The smoothing process refers to using the exponential moving average technique to smooth the contribution value. ;in, It is a smoothing factor;
[0032] S32: Normalization process;
[0033] Contribution value after accumulation or smoothing Standardization is performed to obtain an approximate Shapley value. ;
[0034] The calculation formula is: ;
[0035] in, For the client In the round Contribution value after accumulation or smoothing or , or , The total number of clients participating in federated learning. Indicating in round The fusion contribution value of the client j1.
[0036] Further, S4 includes:
[0037] S41: Calculate the approximate minimum kernel value: Obtain the approximate minimum kernel characteristic weights that reflect the stability considerations of the alliance by solving the approximate linear programming problem. Its constraints include:
[0038] (1) No deviation condition: for all non-empty alliances in the federation , , For non-empty alliance Potential benefits It is a minimization objective, representing the maximum allowable loss or deviation. The total number of clients participating in federated learning;
[0039] (2) Efficiency condition: The sum of the revenues of all clients equals the total revenue of the entire alliance: ,in, For the total revenue of the entire alliance;
[0040] (3) Non-negativity condition: The revenue distribution for each client must be non-negative. ;
[0041] S42: Final aggregation weight generation;
[0042] Approximate Shapley value With approximate minimum kernel characteristic weights Dynamic weighted aggregation is performed to generate the final aggregation weights for global model aggregation. The calculation formula is: ;
[0043] in, This is a balancing factor, a parameter used to adjust the priority between individual fairness and alliance stability;
[0044] S43: Aggregation of the global model;
[0045] The server utilizes the final aggregate weight. Update model parameters locally uploaded by all clients Perform weighted aggregation and update the global model. ;
[0046] The calculation formula is: .
[0047] Further, S5 includes:
[0048] S51: Continue the iterative loop: Repeat steps S2 to S4;
[0049] S52: The convergence condition and termination: The iterative cycle of the entire federated learning will continue until the preset termination condition is met; the preset total number of communication rounds is reached, the global model reaches the preset convergence condition, or the contribution distribution ratio of each client tends to stabilize.
[0050] S53: Final Output: When the federated learning process terminates, outputs a stable and converged global model and the final contribution distribution ratio of each client.
[0051] The present invention also provides a federated learning contribution evaluation and benefit allocation system, the system comprising: a module for executing the federated learning contribution evaluation and benefit allocation method described above.
[0052] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the aforementioned method for evaluating federated learning contributions and allocating benefits.
[0053] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned method for evaluating federated learning contributions and allocating benefits.
[0054] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for evaluating federated learning contributions and allocating benefits.
[0055] The beneficial effects of this invention are:
[0056] 1. This invention can generate a dynamic and comprehensive contribution metric for each client, which not only takes into account the technical aspects of model optimization, but also takes into account the actual heterogeneity of data distribution, providing data support for fairer and more effective federated learning collaboration.
[0057] 2. This invention transforms the multi-dimensional contribution estimates of each client into a set of dynamically changing approximate Shapley values; these values not only quantify the expected marginal contribution of each client to the federated learning task, but also lay the foundation for fusion with the approximate minimum kernel value, jointly determining the final model aggregation weights;
[0058] 3. This invention not only solves the shortcomings of Shapley value in terms of federation stability, but also provides a dynamic, efficient and computationally collaborative mechanism to ensure the long-term stability of federated learning cooperation and provide a solid game theory foundation for large-scale multi-party collaboration.
[0059] 4. Through iterative loop design, this invention not only ensures the effective training and convergence of the global model, but more importantly, it continuously adjusts the "voice" of the clients throughout the process to ensure that the fairness needs of individual clients and the long-term stability needs of the entire federated cooperation are met.
[0060] 5. This invention innovatively integrates multi-dimensional contribution assessment, Shapley value, and minimum kernel method to simultaneously ensure individual fairness and alliance stability; it comprehensively quantifies the actual contribution of clients, effectively avoids "free-riding," proactively ensures the stability of federated cooperation, prevents clients from leaving due to unreasonable benefit distribution, accelerates model convergence speed, and efficiently outputs a high-performance global model and a fair and stable contribution distribution ratio. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in this invention and the prior art, the accompanying drawings used in the description of the embodiments and the prior art will be briefly described below. Obviously, these drawings are only some embodiments of this invention, and those skilled in the art can derive other related drawings based on these drawings without creative effort.
[0062] Figure 1 This is a flowchart illustrating a fair and stable method for distributing the benefits of federated learning provided by the present invention.
[0063] Figure 2 This is a module connection diagram of a fair and stable federated learning benefit distribution method provided by the present invention. Detailed Implementation
[0064] Example 1: As Figure 1 As shown, this invention provides a method for evaluating contributions and allocating benefits in federated learning. In a federated learning environment, this invention integrates gradient space and data space contribution evaluations to approximate the Shapley value and introduces an approximate minimum kernel method to achieve fair and stable client benefit allocation. The method includes:
[0065] S1: Before starting federated learning, design a federated learning framework for multi-party joint training of the global model, perform basic configuration of the entire system, including clarifying each client participating in training, initializing the global model parameters on the server, setting the key parameters required for training, and initially setting the contribution weights of the clients.
[0066] Further, S1 includes:
[0067] S11: Identify the clients participating in training: First, identify and register all clients that will participate in federated learning. Each client (Typically representing a data holding organization or individual) each owns and manages its private, local datasets. These datasets are the cornerstone of federated learning, and the core principle is that the raw data never leaves the client's local machine, thus strictly protecting data privacy.
[0068] S12: Initialize the global model on the server. The server (or central coordinator) creates and initializes a global model. This initial model can begin with random assignment or be based on a baseline model obtained from some pre-trained task; once initialization is complete, the server will use this model. Distribute to all registered clients as the starting point for local training;
[0069] S13: Set key parameters required for training: This involves establishing a series of global and local control variables, including the total number of communication rounds, to guide the iteration and optimization of the entire federated training process. Global learning rate and local training steps ;
[0070] Total number of communication rounds ( ): Defines the upper limit on the number of loops for model interaction and aggregation between the server and client; global learning rate ( ): Controls the step size of gradient descent when the client performs model optimization locally, affecting the convergence speed and stability of the model; number of local training steps ( ): Specifies the number of iterations each client uses to update the model using its local data after receiving the global model; this parameter can be set uniformly for all clients, or it can be customized according to the client's computing power or data characteristics;
[0071] S14: Initially set the contribution weights for each client to provide an initial weighting basis for the first round of model aggregation in federated learning. Specifically, before the first round of training begins, an initial aggregation weight can be set for each client. This initial aggregation weight can be equally distributed (e.g., all clients have a weight of 1 / N) or based on the proportion of client data volume in traditional federated learning practices. The initial aggregation weights will be dynamically adjusted in subsequent training rounds according to the multi-dimensional contribution evaluation method proposed in this invention, so as to more accurately reflect the actual value of each client.
[0072] By meticulously completing these initializations and parameter settings, the federated learning system establishes a solid foundation, providing a clear framework and environment for subsequent iterative training, intelligent contribution evaluation, and benefit distribution.
[0073] S2: In each training round, the client not only performs local model updates, but also calculates its own contribution in the gradient space and data space in parallel. The evaluation results of the two dimensions are then fused to obtain the fused contribution value of the client in the two dimensions, which more comprehensively quantifies the true value of each client. In the gradient space, the client evaluates the difference between its local gradient direction and the aggregated gradient direction of other clients after excluding itself. In the data space, the client measures the error of the aggregated model after excluding itself on its local data.
[0074] Further, S2 includes:
[0075] S21: Local Model Training and Gradient Calculation
[0076] In each round In the middle, the client Received the current global model distributed by the server. Then, in the local dataset Execution The process involves local training (usually gradient descent); after training, the client calculates its local model update direction. This is typically represented as locally updating model parameters. With the model parameters it initially received The difference between them; the calculation formula is: ;in, To update model parameters locally, These are the initially received model parameters; This reflects the client's expected update direction for model parameters on local data;
[0077] S22: Gradient space contribution evaluation:
[0078] Gradient space contribution evaluation refers to measuring the fit or uniqueness of client i's local update direction with other client aggregation directions; specifically:
[0079] Client Estimate or receive an aggregate gradient from the server. This aggregated gradient simulates the average optimization direction of other clients if client i did not participate in this round of aggregation; subsequently, the client calculates its gradient space contribution. By calculating the local model update direction on the client With aggregate gradient The angular distance between them is used for quantification; the calculation formula is: ;in, It is a vector and The angle between them can be calculated. and The dot product and norm are calculated using the following formulas: , Denotes the 2-norm; if the angle If it is close to 0 (in the same direction), then A value close to 0 indicates that the client's update direction is highly similar to the mainstream direction, providing less new information; conversely, if the angle... The larger the value, the better. The larger the value, the more valuable the client is for exploring new solutions for the model;
[0080] S23: Data Spatial Contribution Assessment:
[0081] Data space contribution assessment refers to measuring the client's contribution. The uniqueness of local data distribution and its importance to the generalization ability of the global model. Specifically: Client Estimate or receive an aggregate model from the server This model parameter simulates what would happen if the client... The client's contribution was not included in the global model update, nor in the model state jointly trained by other clients; subsequently, the client updated its local dataset. The aggregation model is computed on the test set. Error, as a contribution to the data space The calculation formula is: ;
[0082] in, To exclude clients The subsequent aggregation model In the client Local dataset The loss value calculated above, For the current global model In the client Local dataset The loss value calculated above;
[0083] Contribution to the data space If there is no client The contribution of the aggregation model to its local data (loss value) Compared to the current model (loss value) In terms of clients, the more changes there are, the more complex the client's situation becomes. The more unique and important the local data, the greater its contribution to the data space. The larger it is, the more likely it is to be. This implies to the client... It provides unique and valuable data information, which is crucial for improving the model's generalization ability on a wider range of data. Conversely, if the client is excluded... If the performance of the later model on its data does not change significantly, it indicates that its data distribution is close to the coverage of the existing model, or its contribution has little impact on the global model.
[0084] S24: Multi-dimensional contribution fusion:
[0085] Multi-dimensional contribution fusion refers to the fusion of gradient space contributions. and data space contribution The evaluation results from these two dimensions are combined, assigning different weights to the gradient space contribution and the data space contribution, and then linearly combining them; a weight parameter is introduced. This determines the contribution of the gradient and the contribution of the data; specifically:
[0086] Contribution to gradient space and data space contribution A weighted linear combination is performed to obtain the total fusion contribution value of the two-dimensional clients. The calculation formula is: ;in, These are the weight parameters.
[0087] Through these steps, the present invention can generate a dynamic and comprehensive contribution metric for each client, which not only takes into account the technical aspects of model optimization, but also the actual heterogeneity of data distribution, providing data support for fairer and more effective federated learning collaboration.
[0088] S3: Accumulate or smooth and normalize the calculated fusion contribution values of the two-dimensional clients to form an approximate Shapley value for each client in this round;
[0089] In S3, the multi-dimensional client contribution estimates calculated in the aforementioned steps will be accumulated, smoothed, and normalized to form the aggregate weight of each client in this round. These dynamically generated aggregate weights essentially constitute an approximate representation of the Shapley value, which reflects the client's expected marginal contribution to the global model update.
[0090] Further, S3 includes:
[0091] S31: Accumulate or smooth the fusion contribution value of the dual-dimensional client;
[0092] The cumulative processing refers to simply accumulating the client's contribution value across all historical rounds. This allows the client's historical contributions to continue to influence its current weight, accumulating the contribution value. ; This indicates the kth round up to the current round. Rounds;
[0093] The smoothing process refers to using an exponential moving average technique to smooth out contributions from earlier periods to avoid excessive weighting or to better reflect recent client performance. This smoothing process ensures that contributions from the most recent round have a greater impact on the current weighting, thus improving the smoothed contribution value. ;in, It can be initialized to Or a preset value. As a smoothing factor, it controls the degree of influence of the current round's contribution on the final result; a larger smoothing factor... This approach assigns greater weight to current contributions, placing more emphasis on the client's recent activity and effectiveness.
[0094] S32: Normalization process;
[0095] Contribution value after accumulation or smoothing Standardization is performed to ensure that the sum of the approximate Shapley values across all clients is 1. This allows these values to be directly used as weights for global model aggregation, yielding the approximate Shapley value. ;
[0096] The calculation formula is: ;
[0097] in, For the client In the round Contribution value after accumulation or smoothing or , or , The total number of clients participating in federated learning. Indicating in round The fusion contribution value of the client j1.
[0098] Normalization ensures that the contribution weights of all clients are comparable globally, and that their sum is fixed, thus meeting the basic requirements of aggregate weights. The weights are approximate Shapley values.
[0099] Through the steps described above, the system can transform the multi-dimensional contribution estimates of each client into a set of dynamically changing approximate Shapley values. These values not only quantify the expected marginal contribution of each client to the federated learning task, but also lay the foundation for subsequent fusion with the approximate minimum kernel value in S4, jointly determining the final model aggregation weights.
[0100] S4: To ensure the long-term stability of federated cooperation, an approximate minimum kernel method is introduced. In each training round, the approximate minimum kernel value is calculated and weighted together with the approximate Shapley value calculated in S3 to generate the final aggregate weights. Subsequently, the server uses these final aggregate weights, which combine fairness and stability assessments, to weight and aggregate all locally updated models uploaded by clients, thereby updating the global model. This fusion mechanism not only checks the stability of the benefit distribution but also proactively adjusts the aggregate weights to meet the no-deviation condition of the approximate minimum kernel, thus preventing clients from leaving or forming "free-rider" alliances due to benefit motives.
[0101] Further, S4 includes:
[0102] S41: Calculate the approximate minimum kernel value, aiming to find a revenue distribution scheme that minimizes the losses of all possible sub-alliances: by solving an approximate linear programming problem, obtain the approximate minimum kernel characteristic weights that reflect the stability considerations of the alliance. The minimum kernel defines a stable set of payoffs where no sub-coalition can gain a higher payoff by leaving the cooperative and acting independently. However, in real-world federated learning scenarios, a strictly minimum kernel may not exist or may be computationally too expensive. Therefore, this invention computes an approximate minimum kernel, i.e., a payoff distribution that is as close as possible to the stability condition.
[0103] Its constraints include:
[0104] (1) No deviation condition: for all non-empty alliances in the federation , The total gains of all members of a non-empty sub-alliance should not be less than the potential gains that the sub-alliance could have obtained by acting alone. At the same time, it allows for a minimum deviation, that is, minimizing the target. ;
[0105] in, It represents any single client among all participating clients in the federated learning system; Indicates the number of communication rounds In, allocated to the client The approximate minimum kernel weight represents the client's stability considerations. The share of the total value of the alliance that should be obtained. This represents the approximate minimum kernel weight sum of all clients belonging to a specific sub-federation S. This sum is related to the potential value that the sub-federation may obtain. Compare these to check the stability of the alliance. It is the minimization objective, representing the maximum allowable loss or deviation. If This indicates the existence of a strictly minimal kernel solution; typically, in approximate calculations, , For non-empty alliance Potential benefits The total number of clients participating in federated learning;
[0106] (2) Efficiency condition: The sum of the revenues of all clients equals the total revenue of the entire alliance: ,in, For the total revenue of the entire alliance;
[0107] (3) Non-negativity condition: The revenue distribution for each client must be non-negative. ;
[0108] S42: Final aggregation weight generation;
[0109] This refers to individual fairness (the approximate Shapley value obtained through S32). (reflection) and alliance stability (approximate minimum kernel characteristic weights calculated via S41) This involves dynamically weighting and combining weights to generate the final weights used for global model aggregation; this weighted fusion fully considers and balances the two key objectives of individual fairness and alliance stability; specifically:
[0110] Approximate Shapley value With approximate minimum kernel characteristic weights Dynamic weighted aggregation is performed to generate the final aggregation weights for global model aggregation. The calculation formula is: ;
[0111] in, This is a balancing factor, a parameter used to adjust the priority between individual fairness and alliance stability;
[0112] When aggregation is based entirely on approximate Shapley values, individual fairness is prioritized; when... At this time, aggregation is based entirely on the approximate minimum kernel value, prioritizing alliance stability. The parameters are dynamically adjusted based on the training process (e.g., prioritizing stability in the early stages of training and performance and fairness in the later stages) or the federation state (e.g., dynamically reducing α to increase the weight of stability when a potential risk of federation split is detected).
[0113] S43: Aggregation of the global model;
[0114] The server utilizes the final aggregate weight. Update model parameters locally uploaded by all clients Perform weighted aggregation and update the global model. ;
[0115] The calculation formula is: .
[0116] Weighted aggregation ensures that clients who contribute more to the global model and are more important to the stability of the alliance have a greater say in model updates, thereby enabling the global model to learn the unique and valuable information of each client more effectively, while maintaining the long-term nature of the cooperation.
[0117] Through these meticulous steps, this invention not only addresses the shortcomings of Shapley values in terms of federation stability, but also provides a dynamic, efficient, and computationally collaborative mechanism that ensures the long-term stability and robustness of federated learning cooperation, providing a solid game-theoretic foundation for large-scale multi-party collaboration.
[0118] S5: Throughout the federated learning process, steps S2 to S4 are repeated, in which the client continuously evaluates the contribution, calculates the approximate Shapley value, calculates the approximate minimum kernel value, and performs weight fusion to guide model aggregation. This iterative cycle will continue until the global model reaches the preset convergence condition or completes all communication rounds. Finally, a stable and converged global model and the final contribution allocation ratio of each client are output.
[0119] Further, S5 includes:
[0120] S51: Continue the iterative loop: Repeat steps S2 to S4;
[0121] S52: The convergence condition and termination: The iterative cycle of the entire federated learning will continue until the preset termination condition is met; the preset total number of communication rounds is reached, the global model reaches the preset convergence condition, or the contribution distribution ratio of each client tends to stabilize.
[0122] S53: Final Output: When the federated learning process terminates, outputs a stable and converged global model and the final contribution distribution ratio of each client.
[0123] The output is a stable and convergent global model, which is the main achievement of federated learning—a model with good generalization ability trained with collaborative data from multiple parties; it also outputs the final contribution distribution ratio of each client. These ratios (or their historical averages / cumulative values) reflect each client's actual contribution throughout the federated learning process and their share of the final benefits, taking into account fairness and stability. These ratios can be used for actual benefit allocation, incentive design, or trust assessment.
[0124] Through the iterative loop design of S5, the method of this invention not only ensures the effective training and convergence of the global model, but more importantly, it continuously adjusts the voice of the clients throughout the process to ensure that the fairness needs of individual clients and the long-term stability needs of the entire federated cooperation are met.
[0125] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the aforementioned method for evaluating federated learning contributions and allocating benefits.
[0126] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned method for evaluating federated learning contributions and allocating benefits.
[0127] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method for evaluating federated learning contributions and allocating benefits.
[0128] Through this embodiment, the method of the present invention demonstrates significant advantages in federated learning for financial credit risk control:
[0129] 1. By carefully evaluating and assigning greater weight to high-value contributors, the model of this invention can effectively integrate the unique customer data patterns of various banks, thereby constructing a more comprehensive and robust credit risk assessment model and reducing the bad debt rate.
[0130] 2: Each bank can clearly understand its true value in the optimization of the corresponding model of this invention (whether by providing unique data or by collaborating with mainstream approaches), thereby ensuring that its contributions are fairly rewarded and enhancing its enthusiasm for participation.
[0131] 3. By proactively detecting and correcting potential unstable profit distributions, the method of this invention effectively prevents banks from withdrawing from the alliance due to feeling that their interests have been harmed or exploited, thus ensuring the sustainability of multi-party cooperation in a highly competitive financial industry.
[0132] 4. All sensitive customer data is always kept locally at each bank, and only model updates and a small amount of assessment statistics are exchanged, which fully complies with strict data privacy regulations such as GDPR and CCPA and the data security requirements of the financial industry.
[0133] 5. The method of this invention provides a feasible path for financial institutions to collaborate on risk models without sharing original data, which helps to improve the risk management level of the entire industry.
[0134] Table 1 compares the method of the present invention with traditional profit distribution methods.
[0135] Method Advantages Disadvantages Shapley value method Guarantee individual fairness; has a solid theoretical foundation in cooperative game theory, ensuring that each participant's marginal contribution is fairly compensated. The complexity of calculating Shapley value is high, which is not practical for large-scale federated learning. Shapley value allocation may not be in the core of the alliance, i.e., it cannot guarantee that all sub-alliances are satisfied, which may lead to member withdrawal. Although theoretically fair, without additional constraints, it may not effectively curb the "free-rider" behavior in practice. Minimum core method Guarantee alliance stability; ensure that no sub-alliance can obtain higher income by withdrawing from cooperation, effectively preventing alliance disintegration. The minimum core may be a set rather than a single allocation, and in some cases, to ensure alliance stability, the contribution of individual members may not be fully reflected, leading to seemingly unfair allocation. The method of the present invention Balances individual fairness and alliance stability; considers both the contribution quality of clients to the model and the stabilizing effect on the alliance; better adapts to complex and dynamic federated learning environments, preventing "free riding" and "splitting"; provides all participants with the benefits and behavioral motivation for continuous cooperation; through precise weight allocation, the model can effectively integrate high-quality and unique contributions. Compared to a single method, Shapley value and approximate minimum core need to be calculated and fused simultaneously. A suitable fusion balance factor needs to be selected, which requires tuning. The implementation logic is more complex than a single method.
[0136] Example 2: This embodiment of the invention also provides a federated learning contribution evaluation and benefit distribution system, the system comprising:
[0137] Design module: Used to design federated learning frameworks for multi-party joint training of global models;
[0138] The fusion contribution value acquisition module is used to ensure that in each training round, the client not only performs local model updates but also calculates its own contributions in the gradient space and data space in parallel. The evaluation results of the two dimensions are then fused to obtain the fusion contribution value of the client in the two dimensions. In the gradient space, the client evaluates the difference between its local gradient direction and the aggregated gradient direction of other clients after excluding itself. In the data space, the client measures the error of the aggregated model after excluding itself on its local data.
[0139] The approximate Shapley value acquisition module is used to accumulate, smooth, or normalize the calculated fusion contribution values of the two-dimensional clients to form the approximate Shapley value for each client in this round.
[0140] The aggregate weight acquisition module and the global model aggregation module are used to introduce the approximate minimum kernel method. In each round of training, the approximate minimum kernel value is calculated and weighted together with the calculated approximate Shapley value to generate the final aggregate weight. Subsequently, the server will use the final aggregate weight to perform weighted aggregation on all locally updated models uploaded by clients, thereby updating the global model.
[0141] Iterative training and result output module: This module is used to repeatedly execute steps S2 to S4 throughout the federated learning process until the global model reaches the preset convergence condition or completes all communication rounds. Finally, it outputs a stable and converged global model and the final contribution allocation ratio of each client.
[0142] Example 3: As Figure 2As shown, this embodiment of the invention also provides a federated learning contribution evaluation and benefit allocation system, the system comprising:
[0143] The federated learning system initialization and configuration module is responsible for setting up the foundation of the entire collaborative environment before the federated learning task begins. It determines who (clients) will participate, which model will be jointly trained, and how the entire training process will proceed (e.g., training epochs, learning rate, local training steps, etc.). It also sets initial contribution weights for the first model aggregation, laying the foundation for subsequent dynamic adjustments.
[0144] Multi-dimensional contribution evaluation module: In each round of training, it evaluates the unique contribution of each client in parallel and dynamically from two key dimensions: gradient space and data space. The gradient space evaluates the fit or correctness of its model update direction with the main force, while the data space measures the importance of its data to the model's generalization ability. Finally, these multi-dimensional evaluation results are fused to generate the client's original contribution estimate.
[0145] Individual Fairness Weight Generation Module: Based on the multi-dimensional contributions evaluated by the multi-dimensional contribution assessment module, this module aims to generate weights that reflect individual fairness. By accumulating or smoothing the client's historical contributions and normalizing them, it ultimately forms an approximate Shapley value. These values quantify each client's expected marginal contribution to the global model update, ensuring that the efforts of each participant are fairly reflected.
[0146] The Alliance Stability Guarantee and Global Model Aggregation Module introduces an approximate minimum kernel method to calculate weights reflecting alliance stability. Subsequently, it weights and combines the approximate Shapley value (fairness) generated by the individual fairness weight generation module with the approximate minimum kernel value (stability) to generate the final global model aggregation weights. Most importantly, this module uses these combined weights to weight and aggregate the local models uploaded by clients, thereby updating the global model and proactively adjusting it to meet stability conditions, preventing alliance members from leaving or "free-riding" due to unequal benefits.
[0147] The iterative training and output module is the execution controller for the entire federated learning process. It is responsible for continuously driving the operation of the multi-dimensional contribution evaluation module, the individual fairness weight generation module, and the federation stability guarantee and global model aggregation module, ensuring the dynamic adjustment of the model iterative optimization and contribution allocation mechanism. It is also responsible for monitoring the convergence status of the entire process and terminating training when preset conditions are reached (such as the upper limit of training rounds or model performance convergence). Finally, it outputs a stable and high-performance global model, as well as the final contribution allocation ratio of each client in the entire collaboration process.
[0148] Example 4:Figure 1 As shown, this embodiment of the invention uses the application of a federated learning contribution assessment and benefit allocation method in credit risk assessment as an example:
[0149] A group of five independent banks (clients) This is a federated learning consortium comprised of banks. Each bank possesses a large amount of private data, including customer credit history and transaction behavior. This data is crucial for building accurate credit risk assessment models. However, due to strict financial regulations and data privacy laws, raw customer data must never leave the banks' premises. The core objective of this consortium is to jointly train a high-precision credit risk assessment AI model. Simultaneously, this invention strives to ensure that each bank's true contribution is fairly evaluated and that the consortium's cooperation can continue stably and sustainably in the long term, preventing any member from withdrawing due to feeling disadvantaged.
[0150] The present invention discloses a method for evaluating and allocating benefits from federated learning contributions, implemented through the following detailed steps:
[0151] Step 1: Perform system initialization and basic configuration;
[0152] Step 11, Five banks ( Join the federated learning platform via an encrypted connection;
[0153] Step 12: The central server (operated by the consortium or a neutral third party) initializes a standard deep learning model architecture (ResNet-50) as the initial global model. And securely distribute it to all clients;
[0154] Step 13: Set training parameters, including the total number of communication rounds. Set to 100; global learning rate Set to 0.01; number of local training steps per round. The initial aggregation weight is set to 5, and each client trains on the local dataset for 5 epochs. At the beginning of the first round of training, all clients are given the same initial aggregation weight, which is 0.2 for each client.
[0155] Step 2: The client performs local training. After training, the contribution is evaluated from multiple dimensions; based on the... Take a wheel as an example;
[0156] Step 21: Calculate the training and update direction of the local model; Client Receive the current global model ; Utilizing its local private dataset Perform 5 steps of gradient descent training to obtain locally updated model parameters. Local dataset Includes anonymized customer characteristics and loan default labels; calculates the local model update direction. This represents the client. The desired direction for optimizing model parameters on local data;
[0157] Step 22: Perform gradient space contribution evaluation. The server sends data to the client. Provide a way to exclude itself from updating (i.e., exclude the client). The direction of the aggregated model update after ")" is the aggregated gradient. This aggregated gradient vector is assumed to be based on the client. The weighted average result of local updates from other clients when they do not participate in aggregation. Calculate its local model update direction The direction of aggregation after excluding itself is... Angle between Calculate the gradient space contribution. For example: if of and The included angle is very small, which is This indicates Its update direction aligns with mainstream optimization trends, providing stable and collaborative optimization information. ;if of and The included angle is large, for This may indicate Their customer base is unique, and their data allows for significant adjustments to the model based on specific risk patterns. ;
[0158] Step 23: Conduct a data space contribution assessment. The server sends a message to the client. Provide a way to exclude itself from updating (i.e., exclude the client). Aggregation model after ")" The parameters. Client On its local test set, compute this model excluding its own parameters. Losses in credit risk assessment tasks and the current global model loss Calculate the spatial contribution of the data: For example: if exist Data loss ratio exist The data loss is much greater. If it is 0.35, then it means Having unique or scarce customer group characteristics (e.g., specific region, age group, or credit history patterns) is crucial for improving the model's ability to generalize to a broader customer base. Conversely, if... The customer data characteristics are similar to those already well covered by existing models. It will be relatively small.
[0159] Step 24, the calculations of each client and Uploaded to the server. The server then performs a weighted average to merge the two data points to generate the client application. Contribution value in the current round For example, let's set the gradient contribution weight to 0.4 and the data contribution weight to 0.6: .
[0160] Step 3: Calculate the approximate Shapley value based on the gradient space contribution and the data space contribution.
[0161] Step 31: Smooth the contribution values for each client. Perform exponential shift smoothing, for example, by using a smoothing factor. This is to reflect the client's recent and continuous contributions.
[0162]
[0163] Step 32: Normalize the smoothed contribution values to obtain the approximate Shapley value for each client in the current round. These values reflect the expected marginal contribution share of each bank to the update of the global credit model under the principle of fairness.
[0164]
[0165] For example, the calculations in this round yielded .
[0166] Step 4: Introducing the approximate minimum kernel method, in each training round, the approximate minimum kernel value is calculated and weighted together with the approximate Shapley value calculated in Step 3 to generate the final aggregate weight; subsequently, the server will use the final aggregate weight to perform weighted aggregation on all locally updated models uploaded by clients, thereby updating the global model; the fusion approximate minimum kernel method of this invention ensures the stability of the alliance and model aggregation.
[0167] Step 41: Calculate the approximate minimum kernel value. The server runs a linear programming algorithm to solve for a set of approximate minimum kernel weights. This solution process aims to find an allocation scheme such that no bank or bank sub-alliance can gain more benefits by leaving the alliance, thus ensuring the stability of the alliance. Because it is an approximate solution, it can efficiently provide results in each iteration. The calculation yields... The calculation results indicate that there may be some client-side issues. Higher than ,For example This may be because The existence of a sub-alliance is crucial for maintaining the stability of a key sub-alliance, requiring a higher share to prevent its exit even if its short-term fair contribution is relatively low.
[0168] Step 42: Final aggregation weight generation and global model update. The server sets a balancing factor. Weights used to balance the approximate Shapley and approximate minimum kernel. Calculate the final weights used for model aggregation. The server accepts locally updated model parameters uploaded by all banks. ,use Update model parameters locally uploaded by all clients Perform weighted aggregation and update the global model. This generates a new global credit risk assessment model; among which, .
[0169] Step 5: Continuously iterate and converge federated learning.
[0170] Step 51: Iterate through the global credit risk assessment model, i.e., the global model. The data is securely distributed to various banks as the starting point for the next round of training. The system continuously repeats the process from Step 2 to Step 4, dynamically evaluating contributions, adjusting weights, and updating the model.
[0171] Step 52: The training process continues until the following conditions are met: the maximum value is reached; the prediction performance (e.g., AUC score) of the global credit risk assessment model on an independent, never-before-seen test set improves by less than 0.001 for 5 consecutive rounds, indicating that the model has fully converged; the change in the final aggregate weights of each bank between consecutive rounds is less than a certain preset small threshold, indicating that the contribution allocation mechanism has become stable.
[0172] Step 53: When training terminates, the system outputs the final optimized and stable credit risk assessment model. Simultaneously, it generates a detailed report containing each bank's average or cumulative final contribution allocation throughout the federated learning process. These proportions can serve as proof of a bank's contribution to the consortium and can be used for subsequent cost sharing, revenue sharing (e.g., based on bad debt reductions resulting from model improvements), or contribution ratings within the industry.
[0173] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A method for evaluating contributions and distributing benefits in federated learning, characterized in that: The method includes: S1: Design a federated learning framework for multi-party joint training of the global model; S2: In each training round, the client not only performs local model updates, but also calculates its own contribution in the gradient space and data space in parallel, and then fuses the evaluation results of the two dimensions to obtain the fused contribution value of the client in the two dimensions; in the gradient space, the client evaluates the difference between its local gradient direction and the aggregated gradient direction of other clients after excluding itself; in the data space, the client measures the error of the aggregated model after excluding itself on its local data. S3: Accumulate or smooth the calculated fusion contribution values of the two-dimensional clients and then normalize them to form the approximate Shapley value of each client in this round; S4: Introducing the approximate minimum kernel method, in each training round, the approximate minimum kernel value is calculated and weighted together with the approximate Shapley value calculated in S3 to generate the final aggregate weight; then, the server will use the final aggregate weight to perform weighted aggregation on all locally updated models uploaded by clients, thereby updating the global model; S5: Repeat steps S2 to S4 throughout the federated learning process until the global model reaches the preset convergence condition or completes all communication rounds; finally, output a stable and converged global model and the final contribution allocation ratio of each client. S2 includes: S21: Local Model Training and Gradient Calculation In each round In the middle, the client Received the current global model distributed by the server. Then, in the local dataset Execution Local training is performed to calculate the local model update direction. The calculation formula is: ;in, To update model parameters locally, These are the initially received model parameters; S22: Gradient space contribution evaluation: Client Estimate or receive an aggregate gradient from the server. And calculate its gradient space contribution. The calculation formula is: ;in, It is a vector and The included angle between them, and , Represents the 2-norm; S23: Data Spatial Contribution Assessment: Client Estimate or receive an aggregate model from the server and in its local dataset The error of the aggregation model is calculated on the test set and used as a contribution to the data space. The calculation formula is: ; in, To exclude clients The subsequent aggregation model In the client Local dataset The loss value calculated above, For the current global model In the client Local dataset The loss value calculated above; S24: Multi-dimensional contribution fusion: Contribution to gradient space and data space contribution A weighted linear combination is performed to obtain the total fusion contribution value of the two-dimensional clients. The calculation formula is: ;in, These are the weight parameters.
2. The method for evaluating and distributing the contribution of federated learning according to claim 1, characterized in that: S1 includes: S11: Identify the clients participating in training: First, identify and register all clients that will participate in federated learning. Each client owns and manages its own private local dataset. ; S12: Initialize the global model on the server. The server creates and initializes a global model. It is then distributed to all registered clients as the starting point for local training; S13: Set the key parameters required for training, including the total number of communication rounds. Global learning rate and local training steps ; S14: Initially set the contribution weights of each client to provide an initial weight basis for the first round of model aggregation in federated learning. Before the first round of training begins, set an initial aggregation weight for each client. The initial aggregation weight is either equally distributed or based on the proportion of client data volume. distribute.
3. The method for evaluating and distributing the contribution of federated learning according to claim 1, characterized in that: S3 includes: S31: Accumulate or smooth the fusion contribution value of the dual-dimensional client; The cumulative processing refers to simply accumulating the client's contribution value across all historical rounds. Cumulative contribution value ; The smoothing process refers to using the exponential moving average technique to smooth the contribution value. ;in, It is a smoothing factor; S32: Normalization process; Contribution value after accumulation or smoothing Standardization is performed to obtain an approximate Shapley value. ; The calculation formula is: ; in, For the client In the round Contribution value after accumulation or smoothing or , or , The total number of clients participating in federated learning. Indicating in round The fusion contribution value of the client j1.
4. The method for evaluating and distributing the contribution of federated learning according to claim 1, characterized in that: S4 includes: S41: Calculate the approximate minimum kernel value: Obtain the approximate minimum kernel characteristic weights that reflect the stability considerations of the alliance by solving the approximate linear programming problem. Its constraints include: (1) No deviation condition: for all non-empty alliances in the federation , , For non-empty alliance Potential benefits It is a minimization objective, representing the maximum allowable loss or deviation. The total number of clients participating in federated learning; (2) Efficiency condition: The sum of the revenues of all clients equals the total revenue of the entire alliance: ,in, For the total revenue of the entire alliance; (3) Non-negativity condition: The revenue distribution for each client must be non-negative. ; S42: Final aggregation weight generation; Approximate Shapley value With approximate minimum kernel characteristic weights Dynamic weighted aggregation is performed to generate the final aggregation weights for global model aggregation. The calculation formula is: ; in, This is a balancing factor, a parameter used to adjust the priority between individual fairness and alliance stability; S43: Aggregation of the global model; The server utilizes the final aggregate weight. Update model parameters locally uploaded by all clients Perform weighted aggregation and update the global model. ; The calculation formula is: .
5. The method for evaluating and distributing the contribution of federated learning according to claim 1, characterized in that: S5 includes: S51: Continue the iterative loop: Repeat steps S2 to S4; S52: The convergence condition and termination: The iterative cycle of the entire federated learning will continue until the preset termination condition is met; the preset total number of communication rounds is reached, the global model reaches the preset convergence condition, or the contribution distribution ratio of each client tends to stabilize. S53: Final Output: When the federated learning process terminates, outputs a stable and converged global model and the final contribution distribution ratio of each client.
6. A system for evaluating and distributing the benefits of federated learning contributions, characterized in that, The system includes a module for performing a federated learning contribution assessment and benefit allocation method as described in any one of claims 1 to 5.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the program, it implements a method for evaluating and distributing the contribution of federated learning as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a method for evaluating and distributing benefits in federated learning as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements a method for evaluating and distributing benefits in federated learning as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-subject benefit distribution method for integrated energy system and application of multi-subject benefit distribution method
CN115730747A
Federal learning method and device, electronic equipment and storage medium
CN117494845A