Federated learning client optimization scheduling method based on three-dimensional grid
Through the client optimization scheduling method based on three-dimensional grid, the heterogeneity problem in federated learning is solved, the training speed and model accuracy are improved, and more efficient training performance is achieved.
Patent Information
- Application Number
- CN202311331106.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2043-10-13
AI Technical Summary
There are problems in federated learning, resource heterogeneity, data distribution heterogeneity and data quantity heterogeneity, resulting in decreased training performance and reduced accuracy. The existing methods have failed to effectively solve the problem of data quantity heterogeneity.
The client optimization scheduling method of a three-dimensional grid is used to define three-dimensional coordinates through the client's training speed, training data volume and training data mean square variance, divide grid cells, and random selection of clients and distribution of model parameters based on these dimensions to realize the aggregation of the global model.
The training speed and model accuracy of federated learning are improved, and through refined management of clients, balancing the impact of heterogeneity, the training efficiency and model performance are improved.
Smart Images

Figure CN117217299B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of edge computing and distributed machine learning, and in particular to a three-dimensional grid-based federated learning client optimization scheduling method. Background Art
[0002] With the rapid development of the Internet of Things (IoT) and mobile edge computing technologies, more and more smart devices (such as high-performance sensors and smart mobile terminals) are connected to the Internet. These devices generate massive amounts of data daily, which is of great significance for training machine learning models. In traditional machine learning models, all data is collected on a central server for centralized training. However, due to limited network bandwidth and privacy protection issues, collecting local data from smart devices and centralizing training is not feasible. To this end, a new distributed machine learning framework, federated learning, has emerged. In federated learning, a central server coordinates multiple devices (clients) to train and share models using their own local datasets. The central server then aggregates local models from the clients to train a global model, thus avoiding the privacy risks and data leakage issues associated with uploading local data.
[0003] However, compared to centralized training, federated learning still faces many new challenges. Due to significant differences in system resources, data distribution, and data volume among participating clients, the entire federated learning system is heterogeneous, which impacts the training performance of federated learning. Generally speaking, heterogeneity in federated learning can be categorized into resource heterogeneity and data heterogeneity, which can be further categorized into data distribution heterogeneity and data volume heterogeneity. First, resource heterogeneity refers to the fact that different clients have varying computing and communication resources, resulting in varying local training speeds and communication latency. In federated learning, the training time for each round is determined by the slowest client, also known as the "straggler problem." Furthermore, data distribution heterogeneity refers to the fact that each client's local data follows a different distribution, resulting in the non-independent and identically distributed (Non-IID) problem. This increases the number of training rounds required for federated learning models and reduces accuracy. Finally, data volume heterogeneity, caused by varying amounts of local data among different clients, can significantly impact model training time and accuracy. Chai et al. proposed a time-stratified federated learning method. This method divides all customers into multiple tiers based on the duration of each training round and selects customers within the same tier in each training round to mitigate the "straggler problem." Furthermore, this method adjusts the selection of customers in each tier based on the model's training accuracy to mitigate data distribution heterogeneity. However, this method does not consider the three aforementioned heterogeneities as a whole, particularly the heterogeneity of data volume.
[0004] In view of this, it is necessary to design a three-dimensional grid-based federated learning client optimization scheduling method to solve the above problems. Summary of the Invention
[0005] The purpose of the present invention is to provide a three-dimensional grid-based federated learning client optimization scheduling method, which comprehensively considers the heterogeneity in federated learning and improves the training performance of federated learning.
[0006] To achieve the above-mentioned object, the present invention provides a method for optimizing and scheduling federated learning clients based on a three-dimensional grid, comprising the following steps:
[0007] S1, defines the three-dimensional coordinates based on the training speed, training data volume and training data mean square error of client i, and divides the space into three-dimensional grid units;
[0008] S2, assigning the client i to a corresponding grid unit according to its three-dimensional attributes;
[0009] S3, in each round of training, the central server determines the grid unit according to the set three-dimensional subscript probability and selects the corresponding client i from it until the number of the client i reaches the requirement of each round of training;
[0010] S4, the central server distributes the global model parameters to the selected client i for local training;
[0011] S5, the trained model parameters and model accuracy data are aggregated by the central server to update the global model;
[0012] S6, repeat S1-S5 until the model reaches the training accuracy.
[0013] As a further improvement of the present invention, S1 includes the following steps:
[0014] S11, assume that the entire federated learning framework consists of one central server and N clients, where N ranges from 100 to 9999999; the central server schedules the clients to train a neural network model in a distributed manner, and let c be the proportion of clients to be selected in each round of training; wherein c is used to represent the proportion of clients to be selected for training;
[0015] S12, define the three-dimensional coordinates x, y, z, and set the maximum training speed, training data volume, and training data mean square error to be x respectively. max ,y max and z max ; respectively, at intervals Divide the x, y, z space into L x ×L y ×L z Three-dimensional grid cells, each grid cell is represented by Cell(l x ,l y ,l z ) indicates that, where l x ∈[1,L x ], l y ∈[1,L y ], l z ∈[1,L z ];
[0016] Wherein, x, y, and z represent the training speed, training data volume, and training data mean square error of the client i, respectively; the training speed is the inverse of the time required for the client i to complete a round of local model training and upload the model parameters to the central server; the training data volume is the number of samples in the local data set of the client i; the training data variance refers to the mean square error of the sample category distribution in the local data set of the client i; Δx is used to represent the interval of training speed, Δy is used to represent the interval of training data volume, Δz is used to represent the interval of training data mean square error, and Cell(l x ,l y ,l z ) is used to represent a grid unit; the L x 、the L y 、the L z They are used to represent the number of grid divisions in the x, y, and z dimensions respectively; x 、The l y 、The l z They are used to represent the subscripts of the grid cells in the x, y, and z dimensions respectively.
[0017] As a further improvement of the present invention, the specific S2 is: suppose the training speed, training data volume, and training data mean square error of the client i are x respectively. i ,y i , z i ; N represents the number of clients, ranging from 100 to 9999999, and the central server is based on its (x i ,y i ,z i ) three-dimensional coordinate values assign all the clients i to corresponding three-dimensional network units;
[0018] Among them, the x i It is used to represent the training speed of the client i, the y i is used to represent the amount of training data for the client i, the z i It is used to represent the mean square error of the training data of the client i.
[0019] As a further improvement of the present invention, S3 includes the following steps:
[0020] The S3 comprises the following steps:
[0021] S31, the central server randomly initializes the global model;
[0022] S32, initialize the selected client set S to be empty. For each round of federated learning, the central server requires the selection of The client i participates in model training;
[0023] Wherein, the S is used to represent a set.
[0024] As a further improvement of the present invention, the S32 includes the following steps:
[0025] S321, with probability Select the grid cell subscript l in the x dimension x , probability The expression is:
[0026]
[0027] S322, with probability Select the grid cell subscript l in the y dimension y , probability The expression is:
[0028]
[0029] S323, with probability Select the grid cell subscript l in the z dimension z , probability The expression is:
[0030]
[0031] S324, from the grid cell Cell(l x ,l y ,l z ) any one of which does not exceed clients that are not in set S and add them to set S;
[0032] S325, if Then continue to execute step S321, otherwise go to step S4;
[0033] Among them, the described described The subscript l is used to indicate the selected grid cell in the x, y, and z dimensions respectively. x 、l y 、l z probability.
[0034] As a further improvement of the present invention, S4 is specifically that the central server distributes the parameters of the global model to each client i in the set S for local model training, and after training, uploads the local model parameters and the model accuracy to the central server.
[0035] As a further improvement of the present invention, S5 is specifically that the central server averages and aggregates the local model parameters and the model accuracy uploaded by the client i, and uses the aggregated model parameters and the model accuracy as the parameters and accuracy of the global model.
[0036] The beneficial effects of the present invention are as follows: The present invention's three-dimensional grid-based client optimization scheduling method for federated learning first manages clients based on their training speed, training data volume, and training data mean square error (MSE). This method comprehensively considers the impact of various heterogeneities in federated learning on training performance, enabling refined client scheduling. Secondly, client scheduling is performed based on the three-dimensional grid, with different selection probabilities applied to clients in different grids. This allows efficient clients to participate more in training, thereby improving the training speed and model accuracy of federated learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is a flowchart of the three-dimensional grid-based federated learning client optimization scheduling method of the present invention. DETAILED DESCRIPTION
[0038] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] It should also be noted here that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions of the present invention are shown in the drawings, while other details that are not closely related to the present invention are omitted.
[0040] See also Figure 1 The present invention provides a method for optimizing and scheduling a federated learning client based on a three-dimensional grid, comprising the following steps:
[0041] Step 1 (i.e., S11): Assume that the entire federated learning framework consists of a central server and N clients. The central server schedules the clients and trains a neural network model in a distributed manner. Let c be the proportion of clients that need to be selected in each round of training.
[0042] Step 2 (i.e. S12): Define the three-dimensional coordinates x, y, and z to represent the client's training speed, training data volume, and training data mean square error, respectively. The training speed is the inverse of the time required for the client to complete a round of local model training and upload the model parameters to the central server; the training data volume is the number of samples in the client's local data set; and the training data variance refers to the mean square error of the sample category distribution in the client's local data set. Let the maximum training speed, training data volume, and training data mean square error be x, respectively. max ,y max and zmax . Divide the x, y, z space into L x ×L y ×L z Three-dimensional grid cells, each grid cell is represented by Cell(l x ,l y ,l z ) indicates that, where l x ∈[1,L x ], l y ∈[1,L y ], l z ∈[1,L z ];
[0043] Step 3 (i.e. S2): Assume that the training speed, training data volume, and training data mean square error of client i are x i ,y i , z i ; The central server uses its (x i ,y i ,z i ) The three-dimensional coordinate values assign all clients to corresponding three-dimensional network units;
[0044] Step 4 (i.e. S31): the central server randomly initializes the global model;
[0045] Step 5 (i.e. S32): Initialize the selected client set S to be empty. For each round of federated learning, the central server requires the selection of Each client participates in model training. The specific steps are as follows:
[0046] Step 5-1 (ie S321): Probability Select the grid cell subscript l in the x dimension x ,in:
[0047]
[0048] Step 5-2 (ie S322): Based on the probability Select the grid cell subscript l in the y dimension y ,in:
[0049]
[0050] Step 5-3 (ie S323): Probability Select the grid cell subscript l in the z dimension z ,in:
[0051]
[0052] Step 5-4 (ie S324): From the grid cell Cell(l x ,l y ,l z ) any one of which does not exceed clients that are not in set S and add them to set S;
[0053] Step 5-5 (ie S325): If Then continue to step 5-1, otherwise go to step 6;
[0054] Step 6 (i.e., S4): The central server distributes the parameters of the global model to each client in S for local model training. After training, the local model parameters and model accuracy are uploaded to the central server.
[0055] Step 7 (i.e., S5): the central server averages and aggregates the local model parameters and model accuracy uploaded by the client and uses the aggregated model parameters and model accuracy as the parameters and accuracy of the global model;
[0056] Step 8 (ie S6): Repeat steps 5 to 7 until the accuracy of the global model reaches the expected training accuracy.
[0057] In summary, the proposed method for optimizing the scheduling of federated learning clients based on a three-dimensional grid uses a three-dimensional grid based on the client's training speed, training data volume, and mean square error of the training data to schedule and manage client participation in federated learning. Compared to existing algorithms, this method comprehensively considers the various heterogeneous aspects of federated learning, thereby accelerating the training process and improving the accuracy of the trained model.
[0058] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for optimizing and scheduling federated learning clients based on a three-dimensional grid, characterized by: The steps include: S1, defines the three-dimensional coordinates based on the training speed, training data volume and training data mean square error of client i, and divides the space into three-dimensional grid units; S2, assigning the client i to a corresponding grid unit according to its three-dimensional attributes; S3, in each round of training, the central server determines the grid unit according to the set three-dimensional subscript probability and selects the corresponding client i from it until the number of the client i reaches the requirement of each round of training; The S3 comprises the following steps: S31, the central server randomly initializes the global model; S32, initialize the selected client set S to be empty. For each round of federated learning, the central server requires the selection of The client i participates in model training; Wherein, the S is used to represent a set; The S32 includes the following steps: S321, with probability Select the grid cell subscript l in the x dimension x , probability The expression is: S322, with probability Select the grid cell subscript l in the y dimension y , probability The expression is: S323, with probability Select the grid cell subscript l in the z dimension z , probability The expression is: S324, from the grid cell Cell(l x ,l y ,l z ) any one of which does not exceed clients that are not in set S and add them to set S; S325, if Then continue to execute step S321, otherwise go to step S4; Among them, the described described The subscript l is used to indicate the selected grid cell in the x, y, and z dimensions respectively. x 、l y 、l z The probability that the L x 、the L y 、the L z Used to represent the number of grid divisions in the x, y, and z dimensions respectively; S4, the central server distributes the global model parameters to the selected client i for local training; S5, the trained model parameters and model accuracy data are aggregated by the central server to update the global model; S6, repeat S1-S5 until the model reaches the training accuracy.
2. The method for optimizing and scheduling federated learning clients based on a three-dimensional grid according to claim 1, characterized in that: The S1 comprises the following steps: S11, assume that the entire federated learning framework consists of one central server and N clients, where N ranges from 100 to 9999999; the central server schedules the clients to train a neural network model in a distributed manner, and let c be the proportion of clients to be selected in each round of training; wherein c is used to represent the proportion of clients to be selected for training; S12, define the three-dimensional coordinates x, y, z, and set the maximum training speed, training data volume, and training data mean square error to be x respectively. max ,y max and z max ; respectively, at intervals Divide the x, y, z space into L x ×L y ×L z Three-dimensional grid cells, each grid cell is represented by Cell(l x ,l y ,l z ) indicates that, where l x ∈[1,L x ], l y ∈[1,L y ], l z ∈[1,L z ]; Wherein, x, y, and z represent the training speed, training data volume, and training data mean square error of the client i, respectively; the training speed is the reciprocal of the time required for the client i to complete a round of local model training and upload the model parameters to the central server; the training data volume is the number of samples in the local data set of the client i; the training data mean square error refers to the mean square error of the sample category distribution in the local data set of the client i; Δx is used to represent the interval of training speed, Δy is used to represent the interval of training data volume, Δz is used to represent the interval of training data mean square error, and the Cell(l x ,l y ,l z ) is used to represent a grid unit; the l x 、The l y 、The l z They are used to represent the subscripts of the grid cells in the x, y, and z dimensions respectively.
3. The method for optimizing and scheduling federated learning clients based on a three-dimensional grid according to claim 1, characterized in that: The specific S2 is: suppose the training speed, training data volume, and training data mean square error of the client i are x i ,y i , z i ; N represents the number of clients, ranging from 100 to 9999999, and the central server is based on its (x i ,y i, z i ) three-dimensional coordinate values assign all the clients i to corresponding three-dimensional network units; Among them, the x i It is used to represent the training speed of the client i, the y i is used to represent the amount of training data for the client i, the z i It is used to represent the mean square error of the training data of the client i.
4. The method for optimizing and scheduling federated learning clients based on a three-dimensional grid according to claim 1, characterized in that: The S4 is specifically that the central server distributes the parameters of the global model to each client i in the set S for local model training, and uploads the local model parameters and the model accuracy to the central server after training.
5. The method for optimizing and scheduling federated learning clients based on a three-dimensional grid according to claim 1, characterized in that: The S5 is specifically that the central server averages and aggregates the local model parameters and the model accuracy uploaded by the client i, and uses the aggregated model parameters and the model accuracy as the parameters and accuracy of the global model.
Citation Information
Patent Citations
Robustness federated learning algorithm based on partial parameter aggregation
CN113221105A
Backdoor attack defense method in federated learning based on multi-dimensional index dynamic identification
CN116150745A