Gradient and precision adaptive weighted federated learning fairness optimization method and system

By introducing adaptive weights and quantization precision adjustment methods in federated learning, the problems of uneven client performance and high communication overhead are solved, thereby improving the fairness of model aggregation and training efficiency.

CN122264035APending Publication Date: 2026-06-23NANJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610501423.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-16
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing federated learning methods tend to favor some clients during model aggregation, leading to uneven model performance among clients. At the same time, frequent transmission of model parameters results in high communication overhead and reduces training efficiency.

Method used

An adaptive weighting mechanism for gradients and accuracy is introduced. The aggregation weights of the client are dynamically adjusted by calculating the client's training accuracy and participation frequency. The quantization accuracy is also adaptively adjusted according to changes in global loss, and differentiated local quantization accuracy is allocated to optimize model aggregation and communication strategies.

Benefits of technology

It improves fairness in the model aggregation process, reduces communication overhead, and enhances the overall training and communication efficiency of the federated learning system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122264035A_ABST
    Figure CN122264035A_ABST
Patent Text Reader

Abstract

The application discloses a gradient and precision self-adaptive weighted federated learning fairness optimization method and system. In view of the problems of uneven model performance distribution among clients and large communication overhead of traditional federated learning in a heterogeneous environment, an information amount weighting mechanism is constructed based on the training accuracy and participation frequency of the clients on the server side, the aggregation weight of the clients is dynamically determined, the aggregation weight is used for weighted aggregation of the client gradient, the adaptive weighting of the client gradient is realized, and the performance fairness is improved. Meanwhile, the global quantization precision is adaptively adjusted according to the global loss change in the training process, and the corresponding local quantization precision is distributed according to the client aggregation weight, so that the communication overhead is reduced under the premise of ensuring the model performance. The application realizes the joint optimization of federated learning fairness and communication compression, can effectively alleviate the uneven performance problem among the clients, and improves the communication efficiency of the federated learning system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of federated learning technology, specifically to a method and system for optimizing fairness in federated learning through gradient and accuracy adaptive weighting. Background Technology

[0002] With the development of artificial intelligence, the Internet of Things, and edge computing technologies, large amounts of data are being stored in various terminal devices. Traditional centralized machine learning typically requires uploading data to a central server for unified training, which not only incurs significant communication overhead but may also lead to issues such as data privacy breaches.

[0003] To address the issues of data privacy and data sharing inherent in traditional centralized machine learning, federated learning, as a distributed machine learning framework, has been proposed. Federated learning allows multiple clients to jointly train a model without sharing the original data. The basic process is as follows: the server first initializes a global model and distributes it to multiple clients. Each client trains its model using its local data and generates model gradients. The updated model gradients are then uploaded to the server, which aggregates the gradients from different clients to obtain a new global model, which then proceeds to the next round of training. In this way, federated learning can achieve multi-party joint model training while protecting user data privacy.

[0004] However, in practical applications, due to the differences in data size, data quality, and data distribution among different clients, traditional federated learning methods typically weight the model gradient based on the client's data size during model aggregation. This can easily lead to a global model bias towards clients with larger data volumes, resulting in significant differences in model performance among different clients and making it difficult to guarantee performance fairness among clients.

[0005] Furthermore, during federated learning training, frequent transmission of model parameters or gradients is required between the client and the server. When the model is large or the number of participating clients is high, the repeated transmission of a large number of parameters leads to high communication overhead, thereby increasing the network burden on the system and reducing training efficiency. Therefore, how to reduce communication overhead while ensuring model performance and further improving performance fairness among clients has become an urgent problem to be solved in the current round of federated learning technology. Summary of the Invention

[0006] The purpose of this invention is to provide a method, apparatus, and system for optimizing fairness in federated learning by adaptive weighting of gradient and accuracy. This addresses the problems of existing federated learning methods, such as bias towards certain clients during model aggregation, resulting in unbalanced model performance among clients, and high communication overhead caused by frequent transmission of model parameters. The invention aims to improve model fairness while reducing communication overhead and enhancing the overall training efficiency of the federated learning system.

[0007] To achieve the above-mentioned objective, this invention provides a gradient and accuracy adaptive weighted federated learning fairness optimization method, the method comprising the following steps:

[0008] In the At the start of a round of federated training, the server sends the current global model parameters to the clients participating in the training. ;

[0009] For any client k, based on the global model parameters Local training is performed using local data to obtain the local model gradient. The training statistics, including training accuracy, are calculated and uploaded to the server. Client participation frequency and training loss ;

[0010] The server calculates the aggregate weight of client k based on the training statistics uploaded by client k. ;

[0011] The server calculates the training loss and aggregated weights uploaded by each client. Global weighted loss during round training According to the global weighted loss Adaptive adjustment of global quantization precision based on changes ;

[0012] The server aggregates weights from each client and calculates global quantization precision. Assign local quantization precision to each client;

[0013] Client k is determined based on the assigned local quantization precision. gradient of the local model Quantization is performed to obtain the gradient of the quantized model. and the gradient of the quantized model Uploaded to the server;

[0014] The server performs weighted aggregation of the quantized model gradients of each client based on the aggregated weights of each client, resulting in the updated global model parameters. They will then proceed to the next round of federal training.

[0015] As one implementation, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described gradient and accuracy adaptive weighted federated learning fairness optimization method.

[0016] As one implementation method, the present invention provides a gradient and accuracy adaptive weighted federated learning fairness optimization system, comprising multiple clients and servers.

[0017] The server is used to initialize global model parameters, send global model parameters to the client in each training round; receive training statistics, local model gradients, and quantized model gradients uploaded by the client, calculate client aggregate weights based on the training statistics uploaded by the client; calculate global weighted loss based on the training loss uploaded by each client and the client aggregate weights, and adaptively adjust global quantization precision according to changes in global loss during training; allocate local quantization precision to the client, and perform weighted aggregation of the quantized model gradients uploaded by the client based on the client aggregate weights to update the global model parameters;

[0018] The client is used to receive global model parameters sent by the server, train the model using local data to obtain local model gradients, calculate training statistics and upload them to the server. The training statistics include training accuracy, client participation frequency and training loss. The client also quantizes the local model gradients according to the local quantization precision allocated by the server and uploads them to the server.

[0019] As one implementation method, the present invention provides a gradient and accuracy adaptive weighted federated learning fairness optimization system, comprising: a server and several clients communicating with it, wherein the server is configured with:

[0020] The model initialization and distribution module is used to initialize global model parameters and distribute the current global model parameters to the clients participating in training at the start of the current round of federated training.

[0021] The weight calculation module is used to calculate the aggregate weight of each client in the current round of training based on the training statistics uploaded by each client.

[0022] The global quantization adjustment module is used to calculate the global weighted loss based on the training loss uploaded by each client and the client aggregate weights, and to adjust the global quantization accuracy according to the changing trend of the global weighted loss.

[0023] The local quantization allocation module is used to allocate local quantization precision to each client based on the client's aggregated weights and the global quantization precision.

[0024] The model aggregation module is used to perform weighted aggregation of the quantized model gradients based on the client-side aggregation weights in order to update the global model parameters;

[0025] The client configuration includes:

[0026] The local training module is used to train the model using local data based on the global model parameters issued by the server, obtain the local model gradient and upload it to the server, calculate training statistics and upload them to the server. The training statistics include training accuracy, client participation frequency and training loss.

[0027] The model gradient quantization module is used by the client to quantize the local model gradient according to the allocated local quantization precision to obtain the quantized model gradient.

[0028] Beneficial effects:

[0029] Compared to existing technologies, this invention introduces an adaptive weighting mechanism during gradient aggregation, enabling the contribution of each client's gradient updates to the global model update to dynamically adjust with the training state, rather than always participating in aggregation at a fixed ratio. This approach improves the flexibility and targeting of gradient aggregation, avoiding the problem of some clients dominating the global model for a long time when using traditional fixed weighting or weighting only based on data size. This makes the global model more balanced, thereby helping to alleviate performance differences between clients in heterogeneous data environments and improving fairness in the federated learning process.

[0030] Simultaneously, this invention adaptively determines the global quantization precision for each training round by considering the changes in global loss during the training process. Based on this, it further assigns local quantization precision matching the aggregated weights of each client in the current round. Through this design, lower quantization precision is used in the early stages of training to reduce communication overhead, while higher quantization precision is used during the model's gradual convergence phase to ensure the quality of model updates.

[0031] Therefore, this invention achieves synergistic optimization of model aggregation strategy and communication compression strategy by adaptively adjusting the gradient contribution of the client and adaptively allocating the quantization accuracy. This not only improves the performance imbalance between clients in federated learning, but also enhances the communication efficiency and overall training efficiency during the system training process. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of a gradient and accuracy adaptive weighted federated learning fairness optimization system structure provided in an embodiment of the present invention;

[0033] Figure 2This is a schematic diagram of a gradient and accuracy adaptive weighted federated learning fairness optimization method provided in an embodiment of the present invention. Detailed Implementation

[0034] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the scope of protection of the present invention. For those skilled in the art, various modifications or equivalent substitutions can be made to the technical solution of the present invention, and all such modifications or substitutions should fall within the scope of protection of the present invention.

[0035] like Figure 1 The distributed federated learning system shown includes a server and multiple clients (client 0, client 1, ..., client n) that communicate with it. The server sends the global model to the clients, calculates the client weights, calculates the client quantization accuracy and sends it to the clients. The clients perform local training based on the global model parameters and send the training statistics and quantized model gradients to the server. The server finally completes model aggregation.

[0036] like Figure 2 As shown, the gradient and accuracy adaptive weighted federated learning fairness optimization method of this invention includes the following steps:

[0037] (1) Model initialization and distribution: The server initializes the global model parameters. In the When a round of federated training begins, the server will set the current global model parameters. Distribute to clients participating in the training;

[0038] (2) Local training and calculation of statistics on the client: For any client k, the client receives the current global model parameters Then, the model is trained locally using the local dataset to obtain the client's k at the 1st rank. Local model gradients during round training And upload it to the server;

[0039] During local training, client k calculates training statistics and uploads them to the server after local training is complete; these training statistics include training accuracy. Client participation frequency and training loss ;

[0040] (3) The server calculates the client aggregate weight: The server receives the training statistics uploaded by client k, and calculates the weight of client k in the first position based on the training statistics. Aggregated weights in round training ;

[0041] Specifically, the server first trains the client k to achieve the desired accuracy. and client participation frequency Normalization is performed to obtain the client-side k-normalized training accuracy. and normalized client participation frequency The client information content is calculated based on the normalization results, thereby determining the client aggregation weight. ;

[0042] The above client-side k-normalized training accuracy and normalized client participation frequency The calculation methods are as follows:

[0043]

[0044] in, This represents the training accuracy of client i. Let i be the frequency of client participation. This indicates the number of clients participating in the current round of training.

[0045] The aforementioned client-side information includes training accuracy information. Information content related to participation frequency The calculation methods are as follows:

[0046]

[0047] in, It is a very small constant used to avoid numerical problems in logarithmic operations.

[0048] The above client k is in the first... Aggregated weights in round training The calculation method is as follows:

[0049]

[0050] in, These are weight parameters used to balance training accuracy and participation frequency. .

[0051] (4) Server adaptively adjusts global quantization accuracy: The server adjusts the global quantization accuracy based on the training loss uploaded by client k. and client-side aggregate weight Calculate the first Global weighted loss during round training The calculation method is as follows:

[0052]

[0053] in This indicates the number of clients participating in the current training round, calculated by the server based on a globally weighted loss. Adaptive adjustment of global quantization accuracy based on changing trends This is to determine the quantization precision used in the current round of training.

[0054] Furthermore, to reduce the impact of loss fluctuations during training on quantization accuracy adjustment, the global weighted loss is adjusted. Smoothing is performed to obtain the smoothing loss. The calculation method is as follows:

[0055]

[0056] in, A preset threshold is used to distinguish between the initial training phase and subsequent training phases. This represents the smoothing loss during the (t-1)th round of training.

[0057] Furthermore, based on smoothing loss Adaptive adjustment of global quantization accuracy based on changing trends The calculation method is as follows:

[0058]

[0059] in, Indicates the minimum quantization precision. Indicates the maximum quantization precision. denoted as the global quantization accuracy in the (t-1)th round of training.

[0060] (5) Server allocates local quantization precision to the client: after determining the global quantization precision Then, the server determines the client's actions based on the client's actions in the specified timeframe. In each round of training, the aggregated weights are assigned corresponding local quantization precision to each client, so that different clients use different quantization precision to quantize the gradient of their local model in the same round of training.

[0061] Taking client k as an example, its local quantization accuracy in the t-th training round is... Based on its aggregation weight To optimize the allocation, while satisfying the quantization error constraint, the objective is to minimize the sum of quantization accuracies across all clients. The calculation method is as follows:

[0062]

[0063] in, Indicates that client k is at the th... Aggregated weights in round training The normalization coefficient is calculated as follows:

[0064]

[0065] in, This indicates the number of clients participating in the current round of training. Indicates that client j is at the 1st rank. Aggregated weights in round training Indicates that client j is at the 1st rank. Local model gradients during training rounds Indicates the global quantization precision.

[0066] (6) Client-side quantization model gradient: The client quantizes the local quantization precision allocated by the server. gradient of the local model Quantization is performed to obtain the gradient of the quantized model. The quantized model gradient is then uploaded to the server.

[0067] (7) Server aggregates and updates the global model: The server receives the quantized model gradients uploaded by each client. Then, aggregate weights based on client data. The gradients of the quantized model are weighted and aggregated to update the global model parameters. The update method is as follows:

[0068]

[0069] in, This indicates the number of clients participating in the current training round. Updated global model parameters. It will continue to be distributed to each client node in the next round of federated training.

[0070] This invention introduces an information weighting mechanism based on training accuracy and client participation frequency during the model aggregation phase. This allows the model aggregation process to comprehensively consider the training status of different clients, thereby improving the performance fairness of the federated learning model across different clients to some extent. Simultaneously, by adaptively adjusting the quantization precision according to changes in global loss during training and assigning differentiated local quantization precision to different clients, the communication overhead caused by model parameter transmission is effectively reduced while ensuring model accuracy, thus improving the training and communication efficiency of the federated learning system.

[0071] The technical solutions disclosed in this invention can be implemented through hardware, computer software, or a combination of hardware and computer software. To facilitate the complete implementation of this invention by those skilled in the art, the following will focus on describing various preferred hardware implementation methods. The hardware architecture described herein is adaptable to the operation, data interaction, and instruction execution of the core functional logic of this invention, constituting the hardware foundation for the practical application of the technical solutions of this invention.

[0072] When implemented in software, the corresponding functional algorithms and control programs of this invention can be stored in a readable storage medium and loaded and run by general-purpose computing hardware. When implemented using a combination of software and hardware, dedicated hardware is responsible for low-level hardware interactions such as signal acquisition and physical driving, while embedded software / host computer software is responsible for logical operations, instruction scheduling, and data processing. The following describes several feasible hardware embodiments of this invention in conjunction with different hardware structures and hardware selection schemes.

[0073] As one implementation, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described gradient and accuracy adaptive weighted federated learning fairness optimization method.

[0074] As one implementation method, the present invention provides a gradient and accuracy adaptive weighted federated learning fairness optimization system, including multiple client nodes and a server.

[0075] The server initializes global model parameters and distributes them to client nodes in each training round; it receives training statistics, local model gradients, and quantized model gradients uploaded by clients, calculates client aggregation weights based on client training statistics, calculates global weighted loss based on training loss uploaded by each client and client aggregation weights, and adaptively adjusts global quantization precision according to changes in global loss during training; it allocates local quantization precision to clients and performs weighted aggregation of quantized model gradients uploaded by clients based on client aggregation weights to update global model parameters.

[0076] The client node is used to receive global model parameters sent by the server, train the model using local data and generate local model gradients, calculate training statistics and upload them to the server. The training statistics include training accuracy, client participation frequency and training loss. The local model gradient is quantized according to the local quantization precision allocated by the server and uploaded to the server to participate in the aggregation and update of the global model.

[0077] As one implementation method, the present invention provides a gradient and accuracy adaptive weighted federated learning fairness optimization system, comprising: a server and several clients communicating with it, wherein the server is configured with:

[0078] The model initialization and distribution module is used to initialize global model parameters. In the At the start of each round of federated training, the current global model parameters are... Distribute to clients participating in the training;

[0079] The weight calculation module is used to calculate the weights of each client based on the training statistics uploaded by the client. Aggregated weights in round training, for example, calculating the weights of client k in the first round based on the training statistics uploaded by any client k. Aggregated weights in round training ;

[0080] The global quantization adjustment module is used to calculate the global weighted loss based on the training loss uploaded by each client and the client-aggregated weights, and to adjust the global quantization accuracy according to the changing trend of the global weighted loss. ;

[0081] The local quantization allocation module is used to allocate local quantization precision to each client based on the aggregated weights of each client and the global quantization precision, for example, based on the aggregated weights of client k. and global quantization accuracy Assign it local quantization precision ;

[0082] The model aggregation module is used to perform weighted aggregation of the quantized model gradients based on the aggregation weights of each client, in order to update the global model parameters. ;

[0083] For any client k, the following configuration is given on client k:

[0084] The local training module is used to train models based on global model parameters distributed by the server. Train using local data to obtain the local model gradient. It also calculates training statistics, including training accuracy. Client participation frequency and training loss ;

[0085] The model gradient quantization module is used by the client to determine the local quantization precision assigned. gradient of the local model Quantization processing is performed to obtain the gradient of the quantization model. .

[0086] The methods for obtaining the variables involved in this embodiment are the same as those described in the gradient and accuracy adaptive weighted federated learning fairness optimization method of this invention, and will not be repeated here.

[0087] Without departing from the core technical concept and protection scope disclosed in this invention, those skilled in the art can make equivalent substitutions, structural modifications, parameter adjustments, combination reuses, or partial improvements to the technical features in the specific embodiments of this invention. The specific embodiments listed in this specification are only used to illustrate the technical solutions of this invention and are not intended to limit the protection scope of this invention. All variations, equivalent technical solutions, and derived adaptation structures based on the technical essence of this invention and falling within the protection boundaries defined by the claims of this invention are covered within the protection scope of this invention.

Claims

1. A gradient and accuracy adaptive weighted federated learning fairness optimization method, characterized in that, The method includes the following steps: In the At the start of a round of federated training, the server sends the current global model parameters to the clients participating in the training. ; For any client k, based on the global model parameters Local training is performed using local data to obtain the local model gradient. The training statistics, including training accuracy, are calculated and uploaded to the server. Client participation frequency and training loss ; The server calculates the aggregate weight of client k based on the training statistics uploaded by client k. ; The server calculates the training loss and aggregated weights uploaded by each client. Global weighted loss during round training According to the global weighted loss Adaptive adjustment of global quantization precision based on changes ; The server aggregates weights from each client and calculates global quantization precision. Assign local quantization precision to each client; Client k is determined based on the assigned local quantization precision. gradient of the local model Quantization is performed to obtain the gradient of the quantized model. and the gradient of the quantized model Uploaded to the server; The server performs weighted aggregation of the quantized model gradients of each client based on the aggregated weights of each client, resulting in the updated global model parameters. They will then proceed to the next round of federal training.

2. The federated learning method according to claim 1, characterized in that... The server calculates the aggregate weight of client k based on the training statistics uploaded by client k. This includes the following steps: Training accuracy for client k and frequency of participation Normalization was performed separately to obtain the normalized accuracy. and normalized participation frequency ; Based on the normalized accuracy and normalized participation frequency Calculate the information content of client k, and determine the aggregation weight of client k based on the information content. .

3. The federated learning method according to claim 2, characterized in that, The information contained in client k includes training accuracy information. and the amount of information about participation frequency The calculation formula is as follows: in, It is a very small constant used to avoid numerical problems in logarithmic operations.

4. The federated learning method according to claim 3, characterized in that, Client k in the th Aggregated weights in round training The calculation formula is as follows: in, These are weight parameters used to balance training accuracy and participation frequency. .

5. The federated learning method according to claim 1, characterized in that, The server calculates the first step based on the training loss uploaded by each client and the client aggregate weight. Global weighted loss during round training The calculation formula is as follows: in, This indicates the number of clients participating in the current round of training.

6. The federated learning method according to claim 5, characterized in that, The server is based on global weighted loss. Adaptive adjustment of global quantization precision based on changes It includes the following steps: Global weighted loss Perform smoothing to obtain the smoothed loss in the t-th training round. The calculation formula is as follows: in, A preset threshold is used to distinguish between the initial training phase and subsequent training phases. The smoothing loss is used in the (t-1)th round of training. Based on smoothing loss Adaptive adjustment of global quantization accuracy based on changing trends The calculation formula is as follows: in, Indicates the minimum quantization precision. Indicates the maximum quantization precision. Let be the global quantization precision for the (t-1)th round.

7. The federated learning method according to claim 6, characterized in that, The global model parameters are updated in the following way: in, This indicates the number of clients participating in the current round of training. Indicates that client k is at the th... Aggregated weights in round training This represents the quantized model gradient uploaded by client k in the t-th round of training.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the gradient and accuracy adaptive weighted federated learning fairness optimization method as described in any one of claims 1 to 7.

9. A gradient and accuracy adaptive weighted federated learning fairness optimization system, comprising multiple clients and servers, characterized in that, The server is used to initialize global model parameters, send global model parameters to the client in each round of training, receive training statistics, local model gradients and quantized model gradients uploaded by the client, and calculate client aggregate weights based on the training statistics uploaded by the client. The global weighted loss is calculated based on the training loss uploaded by each client and the client aggregate weights, and the global quantization precision is adaptively adjusted according to the changes in the global weighted loss during training; local quantization precision is assigned to each client, and the quantized model gradients uploaded by the clients are weighted and aggregated according to the client aggregate weights to update the global model parameters; The client is used to receive global model parameters sent by the server, train the model using local data to obtain local model gradients and upload them to the server, calculate training statistics and upload them to the server, the training statistics include training accuracy, client participation frequency and training loss; and quantize the local model gradients according to the local quantization precision allocated by the server and upload them to the server.

10. A gradient and accuracy adaptive weighted federated learning fairness optimization system, comprising: The server and multiple clients are characterized by the following configuration on the server side: The model initialization and distribution module is used to initialize global model parameters and distribute the current global model parameters to the clients participating in training at the start of the current round of federated training. The weight calculation module is used to calculate the aggregate weight of each client in the current round of training based on the training statistics uploaded by each client. The global quantization adjustment module is used to calculate the global weighted loss based on the training loss uploaded by each client and the client aggregate weights, and to adjust the global quantization accuracy according to the changing trend of the global weighted loss. The local quantization allocation module is used to allocate local quantization precision to each client based on the client's aggregated weights and the global quantization precision. The model aggregation module is used to perform weighted aggregation of the gradients of each client-side quantized model based on the client-side aggregation weights in order to update the global model parameters; Any client configuration includes: The local training module is used to train the model using local data based on the global model parameters issued by the server, obtain the local model gradient and upload it to the server, calculate training statistics and upload them to the server. The training statistics include training accuracy, client participation frequency and training loss. The model gradient quantization module is used by the client to quantize the local model gradient according to the allocated local quantization precision to obtain the quantized model gradient.