Clustering federated learning-oriented intra-and-intra-cluster aggregation period construction method and system and storage medium thereof
By dynamically adjusting the intra-cluster and inter-cluster model aggregation cycles in clustered federated learning, the problems of resource consumption and low communication efficiency in the traditional centralized federated learning architecture are solved, and a more efficient federated learning process is achieved.
Patent Information
- Application Number
- CN202410349095.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-26
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-03-26
AI Technical Summary
The traditional centralized federated learning architecture has shortcomings in resource consumption and communication efficiency, especially when the clients are not independent and identically distributed, resulting in limited training efficiency and convergence speed, and high communication costs.
The method of constructing the aggregation period inside and outside the cluster for clustered federated learning is adopted. By dynamically adjusting the model aggregation period within and between clusters, only cluster heads are selected to communicate directly with the central server, thereby reducing the number of inter-cluster communications, improving communication robustness and improving communication efficiency. Reduce energy consumption.
It effectively reduces global communication energy consumption and delay, improves the efficiency of federated learning, accelerates model convergence, and reduces resource consumption.
Smart Images

Figure CN118586513A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of device clustering and resource scheduling for wireless federated learning, and in particular relates to a method, system and storage medium for constructing intra-cluster and extra-cluster aggregation periods for clustered federated learning. Background Art
[0002] With the improvement of computer computing power, machine learning, as a technology for analyzing and processing massive data, has been widely used in human society. The integration of deep learning-based technologies with industrial artificial intelligence has attracted widespread attention to solve data-driven industrial problems in applications such as smart car networking, smart grids, and smart manufacturing. However, the development of machine learning technology faces two major challenges: privacy data leakage and data "islands". At the same time, developing and training high-quality learning models requires collecting a large amount of data on different IoT devices or industrial nodes for centralized learning, and aggregating data on a central server will incur huge communication costs. Federated learning is a potential distributed machine learning method in which a central server and multiple data-holding clients collaborate to train a common machine learning model without exchanging data. Only model parameters are shared and updated using an iterative gradient descent algorithm. Therefore, it is possible to learn from private customer data while protecting customer privacy. In addition, federated learning can achieve mutual benefits for all participating clients because the performance of the learning model can be significantly improved by aggregating the private data of all participants to train the algorithm using a larger data set.
[0003] The traditional centralized federated learning architecture still uses a single central server for global aggregation and multiple rounds of local model update and upload. The global resource consumption depends on the communication energy consumption of client local training and multiple rounds of model upload. At the same time, the impact of the degree of non-independent and identically distributed of the client on the training efficiency and convergence speed indirectly determines the number of times the client needs to communicate and transmit the model and conduct local training. The resource scheduling scheme based on clustered federated learning aims to reduce the number of inter-cluster communication aggregations by setting multiple clusters and corresponding cluster heads to perform local averaging before global aggregation of the model. Based on the similarity between the data distribution of the defined clusters and the global data distribution, the mathematical relationship between the inter-cluster model communication aggregation period and the intra-cluster model communication aggregation period is dynamically adjusted. Since the local communication bandwidth is usually much higher than the wide area network bandwidth, this method can alleviate network congestion, improve the communication robustness of the client, and reduce the overall inlet traffic of the server, thereby improving the efficiency of federated learning, accelerating model convergence, and reducing global energy consumption and latency. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method, system and storage medium for constructing intra-cluster and extra-cluster aggregation cycles for clustered federated learning. The influencing factors between the inter-cluster and intra-cluster aggregation effects are sought through derivation and analysis of relevant iterative formulas, and the number of intra-cluster and inter-cluster communications is dynamically adjusted based on this, aiming to achieve the goal of reducing resource consumption.
[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions:
[0006] In a first aspect, the present invention provides a method for constructing cluster-inside and cluster-outside aggregation cycles for cluster federated learning, comprising the following steps:
[0007] All clients in each disjoint cluster receive the global model corresponding to a training round sent by the central server, and use the local data set to iteratively train and update the global model in the client to obtain the local model;
[0008] At each preset aggregation iteration cycle I, each cluster head collects the local models of all clients in its cluster for intra-cluster aggregation and sends the obtained intra-cluster aggregated model to the clients in the cluster to repeat the training update;
[0009] At each preset aggregation iteration period G, each cluster head uploads the latest intra-cluster aggregation model to the central server for inter-cluster aggregation, and sends the global model obtained after inter-cluster aggregation to all clients in each cluster;
[0010] A new round of intra-cluster and inter-cluster training updates is repeated until the global model reaches the predetermined training accuracy.
[0011] Furthermore, the method further comprises the following steps:
[0012] A system model consisting of a single central server and multiple clients is constructed, where the client set is represented as {1,2,...,u,...,U}, and the model parameters w are parameterized by collaborative training; all clients are divided into N disjoint clusters {C 1 ,C 2 ,...,C i ,...,C N}, and the corresponding cluster heads in each cluster are {ch 1 ,ch 2 ,...,ch i ,...,ch N}, the number of clients in each cluster satisfies: Client u = has a local dataset Among them, |D u | is the size of the data set of client u=.
[0013] Furthermore, in the process of iteratively training and updating the global model using the local data set in the client to obtain the local model, the client u=uses the stochastic gradient descent method to update the local model The formula is:
[0014]
[0015] in, is the local model corresponding to the training round t, γ is the federated learning rate, is the local stochastic gradient of client u, Indicates that it comes from the client u = local data set D u A random sample of data.
[0016] Furthermore, the client performs intra-cluster model aggregation in the local iteration round t∈{I,2I,3I,...}, and the local models from all clients in the cluster are locally averaged and then aggregated at the cluster head ch i The intra-cluster aggregation result completed above is expressed as:
[0017]
[0018] In the formula, is the cluster head ch in the iteration round t∈{I,2I,3I,...} i Parameters of the intra-cluster aggregation model.
[0019] Furthermore, the client performs inter-cluster model aggregation in the local iteration round t∈{G,2G,3G,...}, and the intra-cluster aggregation models from all clusters are globally averaged. The inter-cluster aggregation result completed on the central server is expressed by the formula:
[0020]
[0021] In the formula, are the global model parameters obtained by the central server through inter-cluster aggregation at t∈{G,2G,3G,…}.
[0022] Furthermore, a method for determining a preset aggregation iteration period conversion relationship between intra-cluster model aggregation and inter-cluster model aggregation using a known and fixed clustering method includes the following steps:
[0023] Step 2-1): For a fixed clustering method and considering the loss function to be non-convex, the convergence conclusion is as follows:
[0024]
[0025] Where T is the global training iteration round, T≥1, E||·|| is the expected function, is the gradient of the global loss function, f 0 is the initial global loss function, f * is the optimal global loss function, and the learning rate γ satisfies L is the Lipschitz constant, satisfying in Respectively represent the local loss function gradient values of client u under models w and w′;
[0026] σ 2 is the client gradient variance threshold, satisfying in is the local stochastic gradient of client u=, Represents the local data set D from client u u A random sample of data;
[0027] ò 2 is the global divergence threshold, satisfying in Represent the loss function gradient of cluster i and the global loss function respectively; is the intra-cluster divergence threshold of cluster i, satisfying:
[0028]
[0029] Step 2-2): When the global training reaches the preset convergence accuracy and the total number of training times T does not change, if G'>G, then That is, the number of inter-cluster aggregations decreases by x, and the number of intra-cluster aggregations increases by y; at this time make Then G'=αG, ensuring that after the aggregation period is changed to G', I', the global training is still close to the global convergence accuracy under the initial period G, I;
[0030] Step 2-3): Order 12γ 2 L 2 =C,4γ 2 L 2 =D, The above settings are all constants. By moving and eliminating the terms in the transformation relationship in step 2-2, we can get:
[0031]
[0032] Since the left side of the above formula is a constant, let:
[0033] We get a quadratic function about I′:
[0034]
[0035] Solving the above equation and discarding the negative and taking the positive, we can get the transformation relationship between the aggregation period of the intra-cluster model and the aggregation period of the inter-cluster model:
[0036]
[0037] In the second aspect, the present invention provides an intra-cluster aggregation cycle system for cluster federated learning, wherein the system is composed of a single central server and multiple clients, wherein the client set is represented as {1,2,...,u,...,U}, and the model parameter w is parameterized by collaborative training; all clients are divided into N disjoint clusters {C 1 ,C 2 ,...,C i ,...,C N}, and the corresponding cluster heads in each cluster are {ch 1 ,ch 2 ,...,ch i ,...,ch N}, the number of clients in each cluster satisfies: Client u = has a local dataset Among them, |D u | is the size of the data set of client u=.
[0038] The central server is used to send the global model corresponding to a training round to each client in each cluster; and receive the latest cluster aggregation model uploaded by each cluster head to perform inter-cluster aggregation, and send the global model obtained after inter-cluster aggregation to all clients in each cluster;
[0039] The cluster head is used to aggregate the local models of all clients in the cluster collected by it and send the obtained cluster aggregation model to the clients in the cluster to repeat the training update at each preset aggregation iteration period I; and upload the latest cluster aggregation model to the central server for inter-cluster aggregation at each preset aggregation iteration period G;
[0040] The client is used to receive the global model transmitted by the central server, and use the local data set to iteratively train and update the global model to obtain a local model.
[0041] Furthermore, client u= updates the local model using stochastic gradient descent The formula is:
[0042]
[0043] in, is the local model corresponding to the training round t, γ is the federated learning rate, is the local stochastic gradient of client u=, Indicates that it comes from the client u = local data set D u A random sample of data;
[0044] At the cluster head i The intra-cluster aggregation result completed above is expressed as:
[0045]
[0046] In the formula, is the cluster head ch in the iteration round t∈{I,2I,3I,...} i Parameters of the intra-cluster aggregation model;
[0047] The inter-cluster aggregation result completed on the central server is expressed as follows:
[0048]
[0049] In the formula, are the global model parameters obtained by the central server through inter-cluster aggregation at t∈{G,2G,3G,…}.
[0050] In a third aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the method for constructing intra-cluster and extra-cluster aggregation periods for clustered federated learning described in any one of the first aspects are implemented.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] The present invention provides a method, system and storage medium for constructing intra-cluster and extra-cluster aggregation cycles for clustered federated learning. The method adopted is different from the federated learning framework of direct communication between a single central server and multiple clients considered in most previous studies. Taking into account the complexity of wireless networks and transmissions as well as communication cost issues, the learning architecture of clustered federation is focused on, and only the cluster head is selected to communicate directly with the central server.
[0053] The method of the present invention takes into account the high cost of inter-cluster communication aggregation under the clustered federated learning architecture. By considering the period setting of intra-cluster and inter-cluster model aggregation, the training period relationship between intra-cluster model aggregation and inter-cluster communication aggregation is dynamically adjusted, aiming to reduce the global communication energy consumption and improve the efficiency of federated learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A diagram of a system model of intra-cluster and extra-cluster aggregation cycles for cluster federated learning provided in an embodiment of the present invention.
[0055] Figure 2 An overall flow chart of a method for constructing intra-cluster and extra-cluster aggregation cycles for cluster federated learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0057] like Figure 2 As shown, an embodiment of the present invention provides a method for constructing cluster-inside and cluster-outside aggregation cycles for cluster federated learning, including the following steps:
[0058] Step S1: All clients in each disjoint cluster receive the global model corresponding to a training round sent by the central server, and use the local data set to iteratively train and update the global model in the client to obtain the local model; wherein, the central server directly broadcasts to all clients, including the cluster head.
[0059] Step S2: At each preset aggregation iteration cycle I, each cluster head collects the local models of all clients in its cluster for intra-cluster aggregation and sends the obtained intra-cluster aggregation model to the clients in the cluster to repeat the training update.
[0060] Step S3: After each preset aggregation iteration period G, each cluster head uploads the latest intra-cluster aggregation model to the central server for inter-cluster aggregation, and sends the global model obtained after inter-cluster aggregation to all clients in each cluster.
[0061] Step S4: repeat the above steps S1 to S3: perform a new round of intra-cluster and inter-cluster training updates until the global model reaches a predetermined training accuracy.
[0062] In the case of clustering clients in clustered federated learning, each client in the cluster needs to upload the training model to the cluster head after local update iteration, and after completing local intra-cluster aggregation at the cluster head, send it to the clients in the cluster for a new round of local update or upload it to the central server to complete inter-cluster aggregation to obtain a new global model, and send it to all clients for a new round of training iteration. Considering that the communication cost of inter-cluster aggregation is higher than that of intra-cluster aggregation, the present invention derives and analyzes the influencing factors between inter-cluster and intra-cluster aggregation effects through relevant iterative formulas, and dynamically adjusts the number of intra-cluster communications based on this, aiming to achieve the goal of reducing resource consumption.
[0063] Since the communication cost of inter-cluster model aggregation is higher than that of intra-cluster model aggregation, the influencing factors between the inter-cluster and intra-cluster model aggregation cycles are analyzed through the derivation of relevant iterative formulas. Based on this, the communication cycles of inter-cluster and intra-cluster model aggregation are dynamically adjusted to reduce the number of communications between cluster heads and central servers and increase the number of communications between cluster heads and intra-cluster clients. This achieves the goal of reducing communication costs.
[0064] The embodiment of the present invention provides a cluster-based federated learning-oriented intra-cluster aggregation cycle design method, wherein a system is composed of a single central server and multiple clients, the client set is represented by {1,2,...,u,...,U}, and the parameterized model parameter w is trained collaboratively. All clients are divided into N disjoint clusters {C 1 ,C 2 ,...,C i ,...,C N}, the corresponding cluster heads are {ch 1 ,ch 2 ,...,ch i ,...,ch N}, the number of clients in each cluster satisfies Client u = has a local dataset Where |D u | is the size of the dataset of client u.
[0065] The specific steps are as follows:
[0066] Step 1: In training round t, the central server will use the global model w t Sent to all clients in all clusters, client u = uses the local data set to train and update the global model to obtain the local model
[0067] Step 2: Design the aggregation iteration cycle within each cluster to be I. After I rounds of local iterative training and updating, the client u∈C i Upload the local model to the cluster head ch i , cluster head ch i Collect the local models of all clients in the cluster for intra-cluster aggregation;
[0068] Step 3: Design the inter-cluster aggregation iteration cycle as G, cluster head ch i Send the intra-cluster aggregation model to the intra-cluster clients and repeat step 2. After G rounds, upload the latest intra-cluster aggregation model to the central server for inter-cluster aggregation, and obtain a new global model to send to all clients.
[0069] Step 4: Repeat steps 1, 2, and 3 to perform a new round of global training until the global model reaches the predetermined training accuracy.
[0070] In step 1 of this embodiment, during the local iterative training, the client u= updates the local model using the stochastic gradient descent method:
[0071]
[0072] Among them, γ is the federated learning rate, is the local stochastic gradient of client u=, Indicates that it comes from the client u = local data set D u A random sample of data.
[0073] In step 2 of this embodiment, the client performs in-cluster model aggregation at the local iteration t∈{I,2I,3I,...}, and the local models from all clients in the cluster are locally averaged. i The above intra-cluster aggregation results are:
[0074]
[0075] in, When t∈{I,2I,3I,...}, the cluster head ch i After that, the cluster head broadcasts the cluster aggregation model to the clients in the cluster and continues the local training.
[0076] In step 3 of this embodiment, the client performs inter-cluster model aggregation during local iteration t∈{G,2G,3G,...}, and the intra-cluster aggregation models from all clusters are globally averaged. The inter-cluster aggregation result calculated on the central server is:
[0077]
[0078] in, The global model parameters obtained by the central server through inter-cluster aggregation at t∈{G,2G,3G,...} are then sent to all clients for a new round of training iterations.
[0079] It is assumed that all clients perform synchronous updates, so federated learning is performed both at the intra-cluster level and the inter-cluster level.
[0080] In this embodiment, the clustering method is known and fixed, and the training cycle conversion relationship between the intra-cluster model aggregation and the inter-cluster model aggregation is achieved through the following steps:
[0081] Step 2-1): For a fixed clustering method and considering the loss function to be non-convex, the convergence conclusion is as follows:
[0082]
[0083] Where T is the global training iteration round, T≥1, E||·|| is the expected function, is the gradient of the global loss function, f 0 is the initial global loss function, f * is the optimal global loss function, and the learning rate γ satisfies L is the Lipschitz constant, satisfying in They represent the local loss function gradient values of client u under models w and w′, respectively, where w′ also represents the global model and can be the same as or different from w;
[0084] σ 2 is the client gradient variance threshold, satisfying in is the local stochastic gradient of client u=, Represents the local data set D from client u u A random sample of data;
[0085] ò 2 is the global divergence threshold, satisfying where ▽f i (w) and ▽f(w) represent the gradient of the loss function of cluster i and the global loss function respectively; is the intra-cluster divergence threshold of cluster i, satisfying
[0086] Step 2-2): When the global training reaches the preset convergence accuracy and the total number of training times T does not change, if G'>G, then That is, the number of inter-cluster aggregations decreases by x, and the number of intra-cluster aggregations increases by y. make Then G'=αG. To ensure that the global training still approaches the global convergence accuracy of the initial period G and I after the aggregation period is changed to G' and I', the above formula can be rearranged to obtain:
[0087]
[0088] Step 2-3): Order 12γ 2 L 2 =C,4γ 2 L 2 =D, Substituting into the above formula and transposing the terms, we can get:
[0089]
[0090] Step 2-4): Multiply both sides of the equation by get
[0091]
[0092] Step 2-5): Since the left side of the above equation is a constant, let:
[0093] Get a quadratic function about I':
[0094]
[0095] Solving the above formula yields:
[0096]
[0097] Discard the negative and take the positive, and we get:
[0098]
[0099] The above formula reflects the transformation relationship between the aggregation period of the intra-cluster model and the aggregation period of the inter-cluster model.
[0100] The embodiment of the present invention provides a cluster-inside and cluster-outside aggregation period system for cluster federated learning, wherein the system is composed of a single central server and multiple clients, wherein the client set is represented as {1,2,...,u,...,U}, and the model parameter w is parameterized by collaborative training; all clients are divided into N disjoint clusters {C 1 ,C 2 ,...,C i ,...,C N}, and the corresponding cluster heads in each cluster are {ch 1 ,ch 2 ,...,ch i ,...,ch N}, the number of clients in each cluster satisfies: Client u = has a local dataset Among them, |D u | is the size of the data set of client u=.
[0101] The central server is used to send the global model corresponding to a training round to each client in each cluster; and receive the latest cluster aggregation model uploaded by each cluster head to perform inter-cluster aggregation, and send the global model obtained after inter-cluster aggregation to all clients in each cluster;
[0102] The cluster head is used to aggregate the local models of all clients in the cluster collected by it and send the obtained cluster aggregation model to the clients in the cluster to repeat the training update at each preset aggregation iteration period I; and upload the latest cluster aggregation model to the central server for inter-cluster aggregation at each preset aggregation iteration period G;
[0103] The client is used to receive the global model transmitted by the cluster head, and use the local data set to iteratively train and update the global model to obtain a local model.
[0104] Where client u = Update the local model using stochastic gradient descent The formula is:
[0105]
[0106] in, is the local model corresponding to the training round t, γ is the federated learning rate, is the local stochastic gradient of client u, Indicates that it comes from the client u = local data set D u A random sample of data;
[0107] At the cluster head i The intra-cluster aggregation result completed above is expressed as:
[0108]
[0109] In the formula, is the cluster head ch in the iteration round t∈{I,2I,3I,...} i Parameters of the intra-cluster aggregation model;
[0110] The inter-cluster aggregation result completed on the central server is expressed as follows:
[0111]
[0112] In the formula, are the global model parameters obtained by the central server through inter-cluster aggregation at t∈{G,2G,3G,…}.
[0113] In addition, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the method for constructing the intra-cluster and extra-cluster aggregation periods for cluster federated learning are implemented.
[0114] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for constructing intra-cluster and extra-cluster aggregation cycles for cluster federated learning, characterized in that: The steps include: All clients in each disjoint cluster receive the global model corresponding to a training round sent by the central server, and use the local data set to iteratively train and update the global model in the client to obtain the local model; At each preset aggregation iteration cycle I, each cluster head collects the local models of all clients in its cluster for intra-cluster aggregation and sends the obtained intra-cluster aggregated model to the clients in the cluster to repeat the training update; At each preset aggregation iteration period G, each cluster head uploads the latest intra-cluster aggregation model to the central server for inter-cluster aggregation, and sends the global model obtained after inter-cluster aggregation to all clients in each cluster; A new round of intra-cluster and inter-cluster training updates is repeated until the global model reaches the predetermined training accuracy.
2. The method for constructing intra-cluster and extra-cluster aggregation cycles for cluster federated learning according to claim 1, characterized in that: The following steps are also included: A system model consisting of a single central server and multiple clients is constructed, where the client set is represented as {1,2,...,u,...,U}, and the model parameter w is parameterized by collaborative training; all clients are divided into N disjoint clusters {C1,C2,...,C i ,...,C N }, and the corresponding cluster heads in each cluster are {ch1,ch2,...,ch i ,...,ch N }, the number of clients in each cluster satisfies: Client u = has a local dataset Among them, |D u | is the size of the data set of client u=.
3. The method for constructing cluster-inside and cluster-outside aggregation periods for cluster federated learning according to claim 2, characterized in that: In the process of iteratively training and updating the global model using the local data set in the client to obtain the local model, the client u = uses the stochastic gradient descent method to update the local model The formula is: in, is the local model corresponding to the training round t, γ is the federated learning rate, is the local stochastic gradient of client u=, Indicates that it comes from the client u = local data set D u A random sample of data.
4. The method for constructing intra-cluster and extra-cluster aggregation cycles for cluster federated learning according to claim 3, characterized in that: The client performs intra-cluster model aggregation in the local iteration round t∈{I,2I,3I,...}, and the local models from all clients in the cluster are locally averaged and then aggregated at the cluster head ch i The intra-cluster aggregation result completed above is expressed as: In the formula, is the cluster head ch in the iteration round t∈{I,2I,3I,...} i The intra-cluster aggregation model parameters of .
5. The method for constructing cluster-inside and cluster-outside aggregation cycles for cluster federated learning according to claim 4 is characterized in that ,The client performs inter-cluster model aggregation in the local iteration round t∈{G,2G,3G,...}, and the intra-cluster aggregation models from all clusters are globally averaged. The inter-cluster aggregation result completed on the central server is expressed by the formula: In the formula, are the global model parameters obtained by the central server through inter-cluster aggregation at t∈{G,2G,3G,…}.
6. The method for constructing cluster-inside and cluster-outside aggregation cycles for cluster federated learning according to claim 5 is characterized in that ,The method for determining the preset aggregation iteration cycle transformation relationship between the intra-cluster model aggregation and the inter-cluster model aggregation using a known and fixed clustering method includes the following steps: Step 2-1): For a fixed clustering method and considering the loss function to be non-convex, the convergence conclusion is as follows: Where T is the global training iteration round, T≥1, E||·|| is the expected function, is the gradient of the global loss function, f 0 is the initial global loss function, f * is the optimal global loss function, and the learning rate γ satisfies L is the Lipschitz constant, satisfying in Respectively represent the local loss function gradient values of client u under models w and w′; σ 2 is the client gradient variance threshold, satisfying in is the local stochastic gradient of client u=, Represents the local data set D from client u u A random sample of data; ò 2 is the global divergence threshold, satisfying in Represent the loss function gradient of cluster i and the global loss function respectively; is the intra-cluster divergence threshold of cluster i, satisfying Step 2-2): When the global training reaches the preset convergence accuracy and the total number of training times T does not change, if G'>G, then That is, the number of inter-cluster aggregations decreases by x, and the number of intra-cluster aggregations increases by y; at this time make Then G'=αG, ensuring that after the aggregation period is changed to G', I', the global training is still close to the global convergence accuracy under the initial period G, I; Step 2-3): Order 12γ 2 L 2 =C,4γ 2 L 2 =D, The above settings are all constants. By moving and eliminating the terms in the transformation relationship in step 2-2, we can get: Since the left side of the above formula is a constant, let: Get the quadratic function of I: Solving the above equation and discarding the negative and taking the positive, we can get the transformation relationship between the aggregation period of the intra-cluster model and the aggregation period of the inter-cluster model:
7. A cluster-inside and cluster-outside aggregation cycle system for cluster federated learning, characterized in that: The system consists of a single central server and multiple clients, where the client set is represented by {1,2,...,u,...,U}, and the model parameter w is parameterized by collaborative training; all clients are divided into N non-overlapping clusters {C1,C2,...,C i ,...,C N }, and the corresponding cluster heads in each cluster are {ch1,ch2,...,ch i ,...,ch N }, the number of clients in each cluster satisfies: Client u = has a local dataset Among them, |D u | is the size of the data set of client u=; The central server is used to send the global model corresponding to a training round to each client in each cluster; and receive the latest cluster aggregation model uploaded by each cluster head to perform inter-cluster aggregation, and send the global model obtained after inter-cluster aggregation to all clients in each cluster; The cluster head is used to aggregate the local models of all clients in the cluster collected by it and send the obtained cluster aggregation model to the clients in the cluster to repeat the training update at each preset aggregation iteration period I; and upload the latest cluster aggregation model to the central server for inter-cluster aggregation at each preset aggregation iteration period G; The client is used to receive the global model transmitted by the central server, and use the local data set to iteratively train and update the global model to obtain a local model.
8. The intra-cluster and extra-cluster aggregation periodic system for cluster federated learning according to claim 7, characterized in that: Client u = Update the local model using stochastic gradient descent The formula is: in, is the local model corresponding to the training round t, γ is the federated learning rate, is the local stochastic gradient of client u=, Indicates that it comes from the client u = local data set D u A random sample of data; At the cluster head i The intra-cluster aggregation result completed above is expressed as: In the formula, is the cluster head ch in the iteration round t∈{I,2I,3I,...} i Parameters of the intra-cluster aggregation model; The inter-cluster aggregation result completed on the central server is expressed as follows: In the formula, are the global model parameters obtained by the central server through inter-cluster aggregation at t∈{G,2G,3G,…}.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the method for constructing intra-cluster and extra-cluster aggregation periods for cluster federated learning according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Unmanned aerial vehicle small base station cluster RAN slicing method based on hierarchical federated learning
CN114997737A
Federal learning aggregation optimization system and method for power data sharing
CN115358487A
Traffic data enhancement method and device based on federal generative adversarial network
CN115883016A
Clustering data sharing method and device based on federated learning system and storage medium
CN116233954A
Cited By
Distributed meter identification method and system
CN120434535A
A distributed meter identification method and system
CN120434535B
Federal learning model training method based on distributed random convex difference optimization
CN121787516A
A federated learning model training method based on distributed stochastic convex difference optimization
CN121787516B
