A federated learning method with drift correction and convergence acceleration
By decomposing and updating drift variables, the local objective function in federated learning and adding global parameter correction terms are solved, and the poor model performance and slow convergence speed caused by client drift are achieved, achieving more efficient model training and lower communication overhead.
Patent Information
- Application Number
- CN202311170375.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2043-09-11
AI Technical Summary
The existing federated learning methods have poor model performance, slow convergence speed, and are less robust in low-engagement data heterogeneous scenarios, resulting in performance losses.
The local objective function is corrected by decomposing the drift variable into local drift variables and global drift variables, and updating and using them respectively, adding global parameter correction terms to accelerate model convergence and reduce communication overhead.
More accurate model corrections are achieved, model performance and convergence speed are improved, communication overhead is reduced, and good robustness is maintained in data heterogeneous scenarios.
Smart Images

Figure CN117217329B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of application of federated learning technology and relates to a federated learning method with drift correction and convergence acceleration. Background Art
[0002] As privacy and security issues in artificial intelligence become increasingly serious, Federated Learning (FL) has gradually become a compelling machine learning method. As an emerging distributed machine learning framework, each child node of FL (called a client) only communicates with a central node (called a server), with the goal of using the private data of the client nodes to collaboratively train a global model. The most attractive feature of FL is that the client's local data will not be leaked, and only the necessary model parameters are transmitted between the client and the server, thereby achieving privacy protection for client data in the training mode.
[0003] However, unlike traditional distributed learning, FL, which focuses on data privacy and security, cannot actively divide and shuffle all data like distributed systems to ensure efficient and stable training. Therefore, the distributed data set faced by FL is non-iid. Due to user preferences and usage habits, the local data distribution of clients in the FL system will be completely different. When a training method similar to FedAvg is adopted, the local training of the client will make the model move towards the local optimal solution; when the server aggregates the local model, the global model will make the model tend to the global optimal solution. This phenomenon is called client drift. Due to the existence of client drift, FL training causes the gradient of the model to decrease in the direction of the compromise between the local objective function and the global objective function, resulting in poor performance of the global model and slow convergence. In addition, due to factors such as the client's network connection, computing memory, and device power, the subset of active clients participating in training each time only accounts for a small part of all clients, and this partial participation feature exacerbates the performance loss of the FL model due to client drift.
[0004] Existing FL methods for solving client drift have the following problems: (1) Incomplete consideration of drift variables makes it impossible to obtain a more accurate correction model, resulting in poor model performance and slow convergence; (2) Additional variables need to be transmitted between the central server and the client to correct the model, resulting in an increase in overall communication volume; (3) The model has low robustness in difficult data heterogeneous scenarios with a large number of clients with low participation, resulting in serious performance loss.
[0005] Due to the above problems, the existing federated learning methods have not yet achieved the best results in addressing the client drift challenges brought about by data heterogeneity FL, and there is still a lot of room for performance improvement. How to alleviate and improve the adverse effects of client drift on global model training still has great research value. Summary of the invention
[0006] In view of the above technical problems, the present invention proposes a drift-corrected federated learning method to accelerate model convergence and reduce communication costs. First, the present invention decomposes the drift variable into local drift variables and global drift variables, updates them respectively, and then uses them to correct the local objective function. In addition, the present invention adds a global parameter correction term to the local objective function to accelerate the convergence of the model and reduce communication overhead. To achieve the above purpose, the technical solution adopted by the present invention is:
[0007] Step 1: Build a typical federated learning system consisting of a central server and N clients:
[0008] Step 101: A client intending to participate in federated training initiates registration with a central server, and the central server allocates storage space for the client to store model parameters;
[0009] Step 102: In the tth communication round, the central server selects a subset of active clients S with probability ε t , and the global model w t Send to S t All S clients in the
[0010] Step 2: The selected client trains the model using local data, updates the local drift variables and global drift variables after training, and uploads the trained model parameters to the central server:
[0011] Step 201: local client i∈S t The model is updated locally K times using stochastic gradient descent, namely:
[0012]
[0013]
[0014] in, is the local loss function, is the classic cross entropy loss, and are local drift variables and global drift variables, respectively, α and β are the proximal terms of drift variables and global parameter modifiers <w i ,w t -w t-1> is the weight coefficient, η is the learning rate;
[0015] Step 202: After training, the client performs local drift variable and the global drift variable To update, follow these steps:
[0016]
[0017]
[0018] Where t′ is the number of communication rounds when the client last participated in training, and λ is the weight coefficient when updating the global drift variable;
[0019] Step 203: The client updates the local model Upload to the central server;
[0020] Step 3: The central server uses the drift variables on the server side to perform federated aggregation on the updated local model parameters, and sends the aggregated updated local model to the active client for the next round of local training;
[0021] Step 301: The central server averages the received local models, that is:
[0022]
[0023] Step 302: The central server uses the average model parameters Update the drift variable on the server side, that is:
[0024]
[0025] Among them, h t is the drift variable on the server side in the tth communication round;
[0026] Step 303: The central server updates the global model using the drift variables on the server side, and sends the updated global model to the active client subset S t+1 ,Right now:
[0027]
[0028] Step 4: After the central server and the client communicate for T rounds, the final model is output:
[0029] Step 401: After the central server and the client communicate for T rounds, the local model parameters of all clients stored on the central server are used to calculate the final model w of this training. * ,Right now:
[0030]
[0031] The federated learning method with drift correction and convergence acceleration provided by the present invention has the following characteristics compared with the prior art:
[0032] (1) Since the present invention obtains more accurate correction model parameters by defining local drift variables and global drift variables, the influence of client drift on the global model is reduced, and the performance of the model is greatly improved;
[0033] (2) The present invention adds a global parameter correction term to the local objective function to accelerate the convergence of the model, and only transmits the model parameters without transmitting additional variables to correct the model, thereby greatly reducing the communication overhead of the method;
[0034] (3) The federated learning method proposed in the present invention has strong robustness in the face of difficult data heterogeneous scenarios with a large number of clients with low participation, and can still maintain good model performance and convergence speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a flowchart of the present invention;
[0036] Figure 2 is a system architecture diagram of the present invention; DETAILED DESCRIPTION
[0037] The method of the present invention is further described in detail below in conjunction with the accompanying drawings and the implementation of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0038] Figure 1 It shows a flowchart of a federated learning method with drift correction and convergence acceleration.
[0039] Figure 2 It shows a system architecture diagram of a federated learning method with drift correction and convergence acceleration.
[0040] To facilitate understanding of the embodiments of the present invention, the rationality and effectiveness of the present invention are described below with reference to the accompanying drawings, including the following specific steps:
[0041] Step 1: Build a typical federated learning system consisting of a central server and N = 500 clients:
[0042] Step 101: A client intending to participate in federated training initiates registration with a central server, and the central server allocates storage space for the client to store model parameters;
[0043] Step 102: In the tth communication round, the central server selects a subset of active clients S with probability ε=5% t , and the global model w t Send to S t All S in the 25 clients;
[0044] Step 2: The selected client trains the model using local data, updates the local drift variables and global drift variables after training, and uploads the trained model parameters to the central server:
[0045] Step 201: Local client i∈S t The model is updated locally K = 5 times using stochastic gradient descent, namely:
[0046]
[0047]
[0048] in, is the local loss function, f i (w i t ) is the classic cross entropy loss, and are local drift variables and global drift variables, α=0.01 and β=0.1 are the proximal terms of drift variables, respectively. and global parameter modifiers <w i ,w t -w t-1 > is the weight coefficient, η = 0.1 is the learning rate;
[0049] Step 202: After training, the client performs local drift variable and the global drift variable To update, follow these steps:
[0050]
[0051]
[0052] Where t′ is the number of communication rounds when the client last participated in training, and λ=0.97 is the weight coefficient when updating the global drift variable;
[0053] Step 203: The client updates the local model Upload to the central server;
[0054] Step 3: The central server uses the drift variables on the server side to perform federated aggregation on the updated local model parameters, and sends the aggregated updated local model to the active client for the next round of local training;
[0055] Step 301: The central server averages the received local models, that is:
[0056]
[0057] Step 302: The central server uses the average model parameters Update the drift variable on the server side, that is:
[0058]
[0059] Among them, h t is the drift variable on the server side in the tth communication round;
[0060] Step 303: The central server updates the global model using the drift variables on the server side, and sends the updated global model to the active client subset S t+1 ,Right now:
[0061]
[0062] Step 4: After the central server and the client communicate for T = 1000 rounds, the final model is output:
[0063] Step 401: After the central server and the client communicate for T = 1000 rounds, the local model parameters of all clients stored on the central server are used to calculate the final model w of this training. * ,Right now:
[0064] .
Claims
1. A federated learning method with drift correction and convergence acceleration, characterized in that: The following steps are involved: Step 1: Build a typical federated learning system consisting of a central server and N clients: Step 101: A client intending to participate in federated training initiates registration with a central server, and the central server allocates storage space for the client to store model parameters; Step 102: In the tth communication round, the central server selects a subset of active clients S with probability ε t , and the global model w t Send to S t All S clients in the Step 2: The selected client trains the model using local data, updates the local drift variables and global drift variables after training, and uploads the trained model parameters to the central server: Step 201: Local client i∈S t The model is updated locally K times using stochastic gradient descent, namely: in, is the local loss function, is the classic cross entropy loss, and are local drift variables and global drift variables, respectively, α and β are the proximal terms of drift variables and global parameter modifiers The weight coefficient, η is the learning rate; Step 202: After training, the client performs local drift variable and the global drift variable To update, follow these steps: Where t′ is the number of communication rounds when the client last participated in training, and λ is the weight coefficient when updating the global drift variable; Step 203: The client updates the local model Upload to the central server; Step 3: The central server uses the drift variables on the server side to perform federated aggregation on the updated local model parameters, and sends the aggregated updated local model to the active client for the next round of local training; Step 301: The central server averages the received local models, that is: Step 302: The central server uses the average model parameters Update the drift variable on the server side, that is: Among them, h t is the drift variable on the server side in the tth communication round; Step 303: The central server updates the global model using the drift variables on the server side, and sends the updated global model to the active client subset S t+1 ,Right now: Step 4: After the central server and the client communicate for T rounds, the final model is output: Step 401: After the central server and the client communicate for T rounds, the local model parameters of all clients stored on the central server are used to calculate the final model w of this training. * ,Right now: .
Citation Information
Patent Citations
Federal learning model training method and device, equipment and storage medium
CN115660115A
Heterogeneous data-oriented local differential privacy federal learning training method and system
CN115935411A