A cluster division method, terminal and edge server of dynamic federated learning

CN117436547BActive Publication Date: 2026-10-16UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311542722.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2026-10-16
Estimated Expiration
2043-11-20

AI Technical Summary

Technical Problem

然而,忽略了无线资源以及无线链路传输模型的不稳定因素,以及动态变化的无线环境对集群划分的影响

Benefits of technology

[0029]This invention provides a dynamic federated learning cluster partitioning method. To mitigate the impact of lagging performers, and considering the heterogeneous and limited network resources (including computing and wireless communication resources) and the dynamically changing wireless environment, a lagging performer-aware federated learning cluster partitioning scheme is designed. Specifically, the training time of terminals is evaluated based on computing and wireless resource availability. Terminals with similar training times are dynamically partitioned into multiple clusters using a balanced iterative reduction and clustering algorithm, and a terminal is dynamically selected as the cluster head during the partitioning process. Unlike the traditional federated learning training process, the cluster head first performs synchronous aggregation on the local models of each terminal within the cluster to obtain a cluster model, and then sends the cluster model to the edge server. Upon receiving any cluster model, the edge server performs an asynchronous global aggregation to obtain a global model, and then sends the global model obtained from the asynchronous global aggregation back to the corresponding cluster head, which then distributes it to the terminals within the cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117436547B_ABST
    Figure CN117436547B_ABST
Patent Text Reader

Abstract

The application discloses a cluster division method, a terminal and an edge server for dynamic federated learning, and relates to the technical field of federated learning.The technical scheme is as follows: in the order of the training time of each local model of the terminal, the cluster division parameters of the terminal are input in sequence, the terminals with similar training time are dynamically divided into multiple clusters according to the cluster division parameters, and the terminal with the minimum training time in the cluster is selected as the cluster head of the cluster; the cluster head performs local model aggregation training of all terminals in the same cluster, obtains a cluster model when the aggregation training is completed, and sends the cluster model to an edge server; the cluster head of each cluster receives a global model sent by the edge server, and sends the global model to the terminals in the cluster, and the terminals perform local model updating in the r+1th communication round according to the global model; wherein the global model is obtained by performing asynchronous aggregation on the cluster model sent by any one cluster by the edge server.
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, and more specifically, to a method for cluster partitioning, a terminal, and an edge server for dynamic federated learning. Background Technology

[0002] Federated Learning (FL) is widely used in wireless networks due to its advantages such as facilitating collaborative training of machine learning models and protecting user privacy and data security. However, due to the heterogeneity of multidimensional resources (e.g., computing and communication resources) in wireless networks, the learning efficiency and performance of user equipment (UEs) participating in Federated Learning (FL) training can vary, resulting in laggards. Laggards are terminals that are relatively slow in updating and / or transmitting their local models during the training process. For federated learning mechanisms with laggards, both learning efficiency and performance will be significantly limited. On the one hand, the heterogeneity of computing resources used to update local models widens the performance gap between terminals (e.g., model training time). On the other hand, terminals frequently communicate with edge servers to transmit local / global models in heterogeneous wireless environments, where fragile wireless links limit the transmission time of local / global models. Nevertheless, laggards play a crucial role in the training process of federated learning because they are often abundant in wireless networks and may contain local data / information different from that of other terminals. Therefore, it is necessary to explore a sustainable approach to reduce or mitigate the impact of lagging learners while ensuring learning efficiency and performance.

[0003] To reduce or mitigate the impact of lagging devices while ensuring learning efficiency and performance, several existing technologies have proposed various solutions to reduce the lagging effect, as follows: Solution 1 mitigates the lagging effect by limiting the synchronous triggering mechanism based on model staleness, proposing a semi-asynchronous cluster federated learning framework based on model difference awareness. Solution 2 limits the participation of some slow-training devices in model training, proposing a time-sensitive federated learning framework to minimize overall runtime, reduce the impact of the lagging effect, and collaboratively train shared machine learning models with ideal accuracy. Solution 3 alleviates the lagging effect by reducing the computational tasks undertaken by lagging devices, proposing a deep reinforcement learning method to learn network conditions and terminal computing power, and adaptively allocate training intensity to terminals. However, in Solutions 1-3, limiting terminal participation in global aggregation discards some lagging models and ignores the limited resources in the wireless access network, which severely reduces learning efficiency. To effectively address the lagging problem caused by limited resources in wireless networks and heterogeneous client computing power, Solution 4 constructs an efficient cluster topology and designs an efficient hierarchical aggregation method for training, effectively improving convergence speed and reducing network traffic. However, it ignores the instability of wireless resources and wireless link transmission models, as well as the impact of the dynamically changing wireless environment on cluster partitioning.

[0004] Therefore, how to mitigate the laggard effect caused by the heterogeneity of network resources (including computing resources and wireless communication resources), and how to mitigate the impact of dynamic changes in the wireless environment, so as to improve the accuracy and convergence time of federated learning during the training process, are urgent problems to be solved. Summary of the Invention

[0005] The purpose of this application is to provide a cluster partitioning method, terminal, and edge server for dynamic federated learning. This invention solves the laggard effect caused by the heterogeneity of network resources (including computing resources and wireless communication resources), and also addresses how to mitigate the impact of dynamic changes in the wireless environment, thereby improving the accuracy of federated learning during training and reducing the convergence time during training.

[0006] The above-mentioned technical objective of this application is achieved through the following technical solution:

[0007] In a first aspect, the present invention provides a cluster partitioning method for dynamic federated learning, applied to a terminal, the method comprising:

[0008] According to the training time of the local model of each terminal in the r-th communication round, the cluster partitioning parameters of the terminals are input sequentially. Based on the cluster partitioning parameters, terminals with similar training times are dynamically divided into multiple clusters, and the terminal with the shortest training time in the cluster is selected as the cluster head. The cluster partitioning parameters are three-dimensional vectors of cluster feature trees determined by estimating the training time based on balanced iterative reduction and clustering algorithms. The three-dimensional vectors of cluster feature trees include the cluster head, the average difference of training time of the cluster, and the maximum difference in training time between terminals in the same cluster, where r is a positive integer.

[0009] Based on the cluster header, perform local model aggregation training on all terminals within the same cluster. When the aggregation training is completed, obtain the cluster model and send the cluster model to the edge server.

[0010] Each cluster's cluster header receives the global model from the edge server and sends the global model to the terminals within the cluster. The terminals then perform local model updates in the (r+1)th communication round based on the global model. The global model is obtained by the edge server performing an asynchronous aggregation on each cluster model received from any cluster.

[0011] In one implementation, the training time of the local model for each terminal in the r-th communication round is calculated based on the update time and transmission time of the local model for each terminal in a single communication round.

[0012] In one implementation, the mathematical expression for the cluster head is: Where, n u This represents the number of terminals in the u-th cluster. Let i represent a three-dimensional vector, where i represents the i-th terminal in cluster u;

[0013] The mathematical expression for the average training time difference of the cluster is: in, A three-dimensional vector representing the cluster head;

[0014] The mathematical expression for the maximum difference in training time between terminals within the same cluster is: Where j represents the j-th terminal in cluster u.

[0015] In one implementation, terminals with similar training times are dynamically assigned to multiple clusters based on the cluster partitioning parameters, including:

[0016] Step a: Determine the order of the terminals based on their training time, and take the terminal with the shortest training time in the order as the starting point and make it the cluster head of the first cluster.

[0017] Step b: For a terminal to be partitioned, if the maximum difference in training time between the terminals adjacent to the terminal to be partitioned, determined according to the arrangement order, is less than the threshold, and the difference between the number of terminals and the total number of clusters U is less than or equal to the branching factor, then the terminal to be partitioned is partitioned into the cluster to which the adjacent terminals belong, and the minimum training time of the current terminal in the cluster is re-determined. The terminal with the minimum training time is taken as the cluster head of the cluster to which it belongs. Otherwise, a new cluster is created with the terminal to be partitioned as the cluster head, and the terminal to be partitioned is taken as the cluster head of the new cluster.

[0018] Step c, repeat step b, and after all the total number N terminals in a wireless network environment have been input, obtain the cluster partitioning result.

[0019] In one implementation, the expression for performing local model aggregation training on all terminals within the same cluster based on the cluster header is:

[0020] H min <<h<<H max Where η represents the step size, t represents the training time index, r represents the communication round index, and H min and H max These represent the minimum number of local iterations and the maximum number of local iterations, respectively. This represents the local model of the nth terminal in the (h-1)th local iteration during the r-th communication round. This represents the gradient of the local loss function.

[0021] A second aspect of the present invention provides a cluster partitioning method for dynamic federated learning, applied to edge servers, the method comprising:

[0022] The system receives a cluster model sent by a terminal acting as the cluster head. The determination of the cluster head involves: sequentially inputting cluster partitioning parameters for each terminal according to the training time of its local model in the r-th communication round; dynamically dividing terminals with similar training times into multiple clusters based on these parameters; and selecting the terminal with the shortest training time in each cluster as the cluster head. The cluster partitioning parameters are a three-dimensional vector of a cluster feature tree determined by estimating training time using a balanced iterative reduction and clustering algorithm. This three-dimensional vector includes the cluster head, the average difference in training time between clusters, and the maximum difference in training time between terminals within the same cluster, where r is a positive integer. The cluster model is obtained by the cluster head performing aggregated training of the local models of all terminals within the same cluster.

[0023] For any cluster model received from any cluster, perform an asynchronous aggregation to obtain a global model, and then distribute the global model to the cluster header of each cluster.

[0024] In one implementation, the mathematical expression for performing an asynchronous aggregation once on the cluster model that receives a message from any cluster is: ω T =(1-α) t )ω T-1 +α t ω u,r , where α t ∈(0,1) represents the mixture hyperparameter, ω T ω represents the global model generated by the T-th round of asynchronous aggregation. T-1 ω represents the global model generated by the (T-1)th round of asynchronous aggregation. u,r This represents the cluster model of cluster u at the r-th cluster iteration.

[0025] In one implementation, the formula for calculating the hybrid hyperparameters is: Where N represents the total number of terminals in a wireless network environment, and U represents the total number of clusters.

[0026] A third aspect of the present invention provides a terminal comprising a processor and a memory, the memory storing at least one instruction which is loaded and executed by the processor to perform an operation as provided in the first aspect of the present invention for a dynamic federated learning cluster partitioning method.

[0027] A fourth aspect of the invention also provides an edge server comprising a processor and a memory, the memory storing at least one instruction loaded and executed by the processor to perform operations as provided in the second aspect of the invention for a dynamic federated learning cluster partitioning method.

[0028] Compared with the prior art, this application has the following beneficial effects:

[0029] This invention provides a dynamic federated learning cluster partitioning method. To mitigate the impact of lagging performers, and considering the heterogeneous and limited network resources (including computing and wireless communication resources) and the dynamically changing wireless environment, a lagging performer-aware federated learning cluster partitioning scheme is designed. Specifically, the training time of terminals is evaluated based on computing and wireless resource availability. Terminals with similar training times are dynamically partitioned into multiple clusters using a balanced iterative reduction and clustering algorithm, and a terminal is dynamically selected as the cluster head during the partitioning process. Unlike the traditional federated learning training process, the cluster head first performs synchronous aggregation on the local models of each terminal within the cluster to obtain a cluster model, and then sends the cluster model to the edge server. Upon receiving any cluster model, the edge server performs an asynchronous global aggregation to obtain a global model, and then sends the global model obtained from the asynchronous global aggregation back to the corresponding cluster head, which then distributes it to the terminals within the cluster. Attached Figure Description

[0030] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0031] Figure 1 A flowchart illustrating a cluster partitioning method for dynamic federated learning according to an embodiment of the present invention is shown.

[0032] Figure 2 A schematic diagram of the architecture of a federated learning-enabled wireless access network provided by existing technology is shown.

[0033] Figure 3 This diagram illustrates the architecture of a fallback-aware federated learning cluster partitioning scheme according to an embodiment of the present invention.

[0034] Figure 4 A comparison chart of test accuracy and training iterations (MNIST dataset) of an embodiment of the present invention is shown;

[0035] Figure 5 A comparison chart showing the relationship between the test loss value and the number of training iterations (MNIST dataset) of an embodiment of the present invention is shown;

[0036] Figure 6 A comparison chart showing the relationship between test accuracy and training iterations (CIFAR 10 dataset) in an embodiment of the present invention is shown;

[0037] Figure 7 A comparison chart showing the relationship between the test loss value and the number of training iterations (CIFAR 10 dataset) of an embodiment of the present invention is shown;

[0038] Figure 8A comparison chart of training times (MNIST dataset) according to an embodiment of the present invention is shown;

[0039] Figure 9 A comparison chart of training times (CIFAR 10 dataset) for embodiments of the present invention is shown.

[0040] Figure 10 This illustration shows another flowchart of a cluster partitioning method for dynamic federated learning according to an embodiment of the present invention. Detailed Implementation

[0041] In the following, the terms “comprising” or “may include” as used in the various embodiments of this application indicate the presence of the claimed function, operation, or element, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms “comprising,” “having,” and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or the possibility of adding one or more combinations of the foregoing.

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the embodiments and accompanying drawings. The illustrative embodiments and descriptions of this application are only for explaining this application and are not intended to limit this application.

[0043] To reduce or mitigate the impact of lagging devices while ensuring learning efficiency and performance, several existing technologies have proposed various solutions to reduce the lagging effect, as follows: Solution 1 mitigates the lagging effect by limiting the synchronous triggering mechanism based on model staleness, proposing a semi-asynchronous cluster federated learning framework based on model difference awareness. Solution 2 limits the participation of some slow-training devices in model training, proposing a time-sensitive federated learning framework to minimize overall runtime, reduce the impact of the lagging effect, and collaboratively train shared machine learning models with ideal accuracy. Solution 3 alleviates the lagging effect by reducing the computational tasks undertaken by lagging devices, proposing a deep reinforcement learning method to learn network conditions and terminal computing power, and adaptively allocate training intensity to terminals. However, in Solutions 1-3, limiting terminal participation in global aggregation discards some lagging models and ignores the limited resources in the wireless access network, which severely reduces learning efficiency. To effectively address the lagging problem caused by limited resources in wireless networks and heterogeneous client computing power, Solution 4 constructs an efficient cluster topology and designs an efficient hierarchical aggregation method for training, effectively improving convergence speed and reducing network traffic. However, it ignores the instability of wireless resources and wireless link transmission models, as well as the impact of the dynamically changing wireless environment on cluster partitioning.

[0044] Therefore, how to mitigate the laggard effect caused by the heterogeneity of network resources (including computing resources and wireless communication resources), and how to mitigate the impact of dynamic changes in the wireless environment, so as to improve the accuracy and convergence time of federated learning during the training process, are urgent problems to be solved.

[0045] To mitigate the impact of laggards and considering the heterogeneous and limited nature of network resources (including computing and wireless communication resources) and the dynamically changing wireless environment, this paper proposes a laggard-aware federated learning cluster partitioning scheme. Specifically, the training time of terminals is evaluated based on computing and wireless resource availability. By improving the hierarchical structure and using a balanced iteration reduction and clustering algorithm, terminals with similar training times are dynamically partitioned into multiple clusters, with cluster heads dynamically selected during the partitioning process. Unlike the traditional federated learning training process, the cluster heads in the laggard-aware federated learning cluster partitioning scheme perform synchronous cluster aggregation before sending the cluster model to a central server. The central server receives models from any cluster and performs an asynchronous global aggregation, then sends the resulting global model back to the terminal. Numerical results demonstrate that the proposed laggard-aware federated learning cluster partitioning scheme significantly outperforms some traditional solutions in terms of accuracy and convergence time.

[0046] The following will explain and illustrate a cluster partitioning method for dynamic federated learning provided by an embodiment of the present invention. Please refer to [link / reference]. Figure 1 , Figure 1 This diagram illustrates a flowchart of a cluster partitioning method for dynamic federated learning provided by an embodiment of the present invention. Figure 1 As shown, this method is applied to a terminal and includes the following steps:

[0047] S110, according to the training time of the local model of each terminal in the r-th communication round, the cluster partitioning parameters of the terminals are input sequentially. Based on the cluster partitioning parameters, terminals with similar training times are dynamically divided into multiple clusters, and the terminal with the shortest training time in the cluster is selected as the cluster head. The cluster partitioning parameters are three-dimensional vectors of cluster feature trees determined by estimating the training time based on balanced iterative reduction and clustering algorithms. The three-dimensional vectors of the cluster feature trees include the cluster head, the average difference of training time of the cluster, and the maximum difference in training time between terminals in the same cluster, where r is a positive integer.

[0048] In this embodiment, as Figure 2 As shown, this embodiment considers a wireless network supporting federated learning, consisting of a base station (BS), an edge server associated with the base station, and N terminals, where N is a positive integer. For a specific terminal UEn∈N, it is assumed that... Denotes its dataset, where |D n | indicates the number of data samples. In the traditional federated learning paradigm, an iterative method is used to train the global model, where each iteration of the global model update is called a communication round. A communication round consists of four phases: local model update, local model transmission, global model aggregation, and global model propagation. Unlike the traditional four-phase paradigm, the communication round in a clustered wireless network adds an additional cluster phase, including cluster model aggregation and cluster model transmission. The iterative process of the communication round in a federated learning-enabled wireless edge network is briefly described below.

[0049] During the local model update phase, each terminal trains its local model based on its local dataset to find the local loss. Minimize the optimal local model in, This represents a data sample for terminal UEn, where, This represents the local model of a specific UEn in the h-th local iteration of the r-th communication round. For a specific terminal UEn, its dataset D n The loss function on is defined as:

[0050] Where, ω TThis represents the global model generated by asynchronous aggregation in the Tth round of global iteration. During local model training, each terminal executes a local learning algorithm (such as Gradient Descent (GD) and Actor-Critic (AC) algorithms) in each local iteration to gradually approach the optimal solution. This paper uses the GD algorithm to update the local model, as follows:

[0051] H min <<h<<H max (2), where η represents the step size, t represents the training time index, r represents the communication round index, and H min and H max These represent the minimum number of local iterations and the maximum number of local iterations, respectively. This represents the local model of the nth terminal in the (h-1)th local iteration during the r-th communication round. This represents the gradient of the local loss function.

[0052] After performing H local training iterations, all terminals within the cluster send their local models to the cluster head, which then performs a global aggregation based on the following formula:

[0053] Among them, Where U represents the number of clusters, n u This indicates the number of terminals in cluster u. After the cluster head completes local model aggregation, it sends the aggregated cluster model to the edge server. In the training mechanism of traditional federated learning algorithms, the edge server always aggregates the global model through synchronous aggregation, with the aggregation rule as follows:

[0054] in

[0055] In one embodiment, the training time of the local model for each terminal in the r-th communication round is calculated based on the update time and transmission time of the local model for each terminal in a single communication round.

[0056] Specifically, regarding the training time of federated learning algorithms, assuming This represents the estimated training time for the nth terminal in the rth communication round, including the local model update time. Transmission time with local model The local training time of the nth terminal in the rth communication round is represented as: The local model update time is determined by the data sample size and computational resources, while the local model transmission time is affected by the wireless channel and wireless bandwidth. To mitigate the impact of potential orders-of-magnitude differences between local model update time and local model transmission time, the training time estimation metrics are unified by normalizing both, as shown below: Among them, T max,C and T max,B These represent the threshold values ​​for local model update time and local model transmission time, respectively.

[0057] Furthermore, regarding the update time of the local model, for a specific nth terminal, assuming its computing power is used... This indicates that computing power is fixed during communication rounds. Furthermore, let s n Let represent the number of CPU cycles required to compute a data sample on a specific nth terminal. From this, the number of CPU cycles required for a specific nth terminal to update its local model once can be calculated, i.e., sn|Dn|, where s n It is a constant. Therefore, in the r-th communication round, the local model update time of a specific n-th terminal can be given by the following formula: This allows us to sort the local model update times, i.e. Where n, n'∈N.

[0058] For the transmission time of the local models, it is assumed that the size of all local models is constant, and 'a' represents the transmission amount of the local model. Furthermore, it is assumed that the transmission rate of UEn at time t is determined by... Therefore, the local model transmission time can be expressed as: in Specifically, b t n This represents the uplink bandwidth allocated by the base station to UEn when transmitting the local model at time t. The signal-to-interference-plus-noise ratio (SINR) between UEn and the base station at time t represents the signal-to-interference-plus-noise ratio.

[0059] Generally, in federated learning-enabled wireless edge networks, the primary objective is to minimize the global loss function under resource constraints, as shown below: In equation (9), (9.1)-(9.5) represent the constraints of training time, bandwidth, computing power, number of clusters, and number of local iterations, respectively. In equation (9), due to the unstable wireless environment of the wireless edge network affecting the clustering of terminals, terminals with similar training times are promptly assigned to the same cluster, requiring a dynamic clustering method. Grouping terminals with similar training times into different clusters can reduce the negative impact of lagging clusters on federated learning performance. Therefore, this embodiment designs a learning mechanism based on dynamic lag-aware clustering, called FeDSC, which adaptively clusters terminals according to the wireless channel state and terminal capacity.

[0060] The Balanced Iterative Reduction and Clustering (BIRCH) algorithm, employing hierarchical structures, can effectively adapt to dynamic wireless edge networks and laggards by efficiently constructing clustering feature (CF) tree structures. However, due to limitations in dynamic network resources and fragile wireless links, the traditional BIRCH algorithm may not be suitable for wireless edge networks. Therefore, by designing an adaptive clustering scheme based on an improved multidimensional BIRCH algorithm, a Dynamic Laggard-Aware Clustering (FeDSC) mechanism is proposed. Figure 3 As shown, FeDSC is performed in the following three stages:

[0061] The first stage involves clustering terminals based on training time estimates: First, the training time of all terminals is evaluated, and the terminals are then clustered according to their training time, i.e., U = {1, 2, ..., U}. For a specific cluster u ∈ U, it is formed by terminals with similar training time estimates T. u The terminal consists of T1 <T2<…<T u <… <T U .

[0062] Unlike traditional probability- or distance-based BIRCH algorithms, we define a three-dimensional CF vector based on cluster-time estimation, as follows:

[0063] Given the nth terminal in cluster u, denoted as i = {1,...,n} u The three-dimensional vector of the clustering feature tree of cluster u is defined as follows: in

[0064] By using CF, key partitioning information of a cluster can be exported, including cluster heads. Average training time difference of the cluster Maximum difference in training time between terminals within the same cluster For two disjoint clusters u and u' with specific clustering feature trees in three-dimensional vectors, this paper presents the CF of the cluster formed by merging the two clusters, as follows:

[0065]

[0066] S120: Perform local model aggregation training on all terminals within the same cluster based on the cluster header. When the aggregation training is completed, obtain the cluster model and send the cluster model to the edge server.

[0067] In this embodiment, the second stage is synchronous cluster aggregation: In a cluster u∈U, the terminal with the shortest training time estimate is selected as the cluster header (CH). Once the cluster header receives the local model of the slowest terminal in the cluster, the cluster header performs global aggregation of the cluster models and sends the aggregated cluster model to the edge server.

[0068] S130, the cluster header of each cluster receives the global model sent by the edge server and sends the global model to the terminal in the cluster. The terminal performs local model update in the (r+1)th communication round according to the global model; wherein the global model is obtained by the edge server performing an asynchronous aggregation on the cluster model sent by any cluster.

[0069] In this embodiment, the third stage involves asynchronous global aggregation on the edge server. In traditional federated learning, the edge server only performs global model aggregation upon receiving all models uploaded by each terminal. However, in the asynchronous global aggregation provided in this embodiment, the edge server updates the global model as soon as it receives any cluster model, regardless of whether it has received cluster models sent by all cluster headers.

[0070] The edge server sends the global model obtained after asynchronous global aggregation to its respective cluster header. Then, the cluster header distributes it to each terminal in its respective cluster. The terminal then performs local model update in the (r+1)th communication round according to the global model. This is a well-known technology in the field and will not be described in detail in this embodiment.

[0071] In some embodiments, terminals with similar training times are dynamically assigned to multiple clusters based on the cluster partitioning parameters, including:

[0072] Step a: Determine the order of the terminals based on their training time, and take the terminal with the shortest training time in the order as the starting point and make it the cluster head of the first cluster.

[0073] Step b: For a terminal to be partitioned, if the maximum difference in training time between the terminals adjacent to the terminal to be partitioned, determined according to the arrangement order, is less than the threshold, and the difference between the number of terminals and the total number of clusters U is less than or equal to the branching factor, then the terminal to be partitioned is partitioned into the cluster to which the adjacent terminals belong, and the minimum training time of the current terminal in the cluster is re-determined. The terminal with the minimum training time is taken as the cluster head of the cluster to which it belongs. Otherwise, a new cluster is created with the terminal to be partitioned as the cluster head, and the terminal to be partitioned is taken as the cluster head of the new cluster.

[0074] Step c, repeat step b, and after all the total number N terminals in a wireless network environment have been input, obtain the cluster partitioning result.

[0075] In this embodiment, the result of merging clusters is affected by two parameters: the branching factor β and the threshold. Specifically, each cluster head contains at most β terminals, where β ≤ NU. Furthermore, the maximum difference in training time between terminals within the same cluster is less than a threshold parameter. Now we will begin to partition the UE into clusters. The main steps for partitioning the terminal into clusters are as follows:

[0076] Step 1: Cluster Partitioning. First, input the 3D vectors of the cluster feature trees for each terminal in order of training time. For a specific terminal, if the maximum difference in training time between terminals within the same cluster is less than a threshold parameter... If NU ≤ β, then the terminal is assigned to cluster u. Otherwise, the terminal creates a new cluster and is treated as the cluster head. Note that if multiple clusters already exist that satisfy the condition that the maximum difference in training time between terminals within the same cluster is less than a threshold parameter... If NU≤β, then the terminal will be based on It is assigned to the optimal cluster.

[0077] Step II: Dynamic Cluster Header Selection. When a terminal is assigned to an existing cluster, the cluster's time-based training structure changes. Therefore, it is necessary to dynamically select the cluster head based on... Select a new cluster head.

[0078] Repeat the above steps until all UEs are input, and you will obtain the cluster partitioning result U = {Cluster 1,...,Clusteru,...,ClusterU}. Note that the number of clusters and the difference in training time for UEs within the same cluster are affected by... The impact. Specifically, The larger the value, the greater the difference, and the fewer the clusters. Meanwhile, for a specific cluster u, assume tu = ... This represents the time required to complete one communication round within cluster u. Therefore, t1... <t2<...<t u <... <t U .

[0079] Therefore, combining steps I-II above, clusters are reconstructed at the start of each round of communication. Once clustering is complete, terminals within the same cluster update their local models and send them to the cluster head. When the local model of the slowest terminal is received, the cluster head performs synchronous cluster model aggregation and sends the aggregated cluster model back to the associated terminal. Simultaneously, the cluster head sends the cluster model obtained from global cluster aggregation to the edge server. Once the edge server receives the cluster model, it performs asynchronous global aggregation and distributes the global model obtained from asynchronous global aggregation to each cluster head.

[0080] In some embodiments, the expression for performing local model aggregation training on all terminals within the same cluster based on the cluster header is: H min <<h<<H max Where η represents the step size, t represents the training time index, r represents the communication round index, and H min and H max These represent the minimum number of local iterations and the maximum number of local iterations, respectively. This represents the local model of the nth terminal in the (h-1)th local iteration during the r-th communication round. This represents the gradient of the local loss function.

[0081] The following will explain and illustrate a cluster partitioning method for dynamic federated learning provided by an embodiment of the present invention. Please refer to [link / reference]. Figure 10 , Figure 10 This diagram illustrates a flowchart of a cluster partitioning method for dynamic federated learning provided by an embodiment of the present invention. Figure 10 As shown, this method is applied to an edge server and includes the following steps:

[0082] S1010, Receive the cluster model sent from the terminal acting as the cluster head. Specifically, the cluster head determination process involves: inputting the cluster partitioning parameters of each terminal sequentially according to the training time of its local model in the r-th communication round; dynamically partitioning terminals with similar training times into multiple clusters based on the cluster partitioning parameters; and selecting the terminal with the shortest training time in each cluster as the cluster head. The cluster partitioning parameters are a three-dimensional vector of a clustering feature tree determined by estimating training time using a balanced iterative reduction and clustering algorithm. This three-dimensional vector includes the cluster head, the average difference in training time between clusters, and the maximum difference in training time between terminals within the same cluster, where r is a positive integer. The cluster model is obtained by the cluster head performing aggregated training of the local models of all terminals within the same cluster.

[0083] In this embodiment, the cluster division and cluster head selection in the terminal part have been clearly described above, so this embodiment will not make any further explanation.

[0084] S1020: For each cluster model received from any cluster, perform an asynchronous aggregation to obtain a global model, and then send the global model to the cluster header of each cluster.

[0085] In this embodiment, in traditional federated learning, the time for H local iterations varies for different clusters. If the edge server performs global model aggregation after receiving all cluster models, the training time will be very long. Asynchronous aggregation of cluster models can solve this problem well; that is, if the edge server receives any cluster model, it performs cluster model aggregation once based on the global model.

[0086] In wireless edge networks, due to the limitations of multidimensional resources and the introduction of laggards by heterogeneity, the synchronous global model aggregation method in Equation (4) provided above significantly slows down the convergence speed of the entire federated learning training process. Therefore, in order to reduce the negative impact of laggards, this embodiment adopts an asynchronous global model aggregation method in the clustered wireless edge network. Specifically, once the edge server receives any cluster model sent by the cluster header, it performs an asynchronous aggregation on any cluster model received from any cluster. The rules for asynchronous aggregation are as follows: ω T =(1-α) t )ω T-1 +α t ω u,r ; where α t ∈(0,1) represents the mixture hyperparameter, ω T ω represents the global model generated by the T-th round of asynchronous aggregation. T-1 ω represents the global model generated by the (T-1)th round of asynchronous aggregation. u,rLet represent the cluster model of cluster u at the r-th cluster iteration. Correspondingly, the formula for calculating the hybrid hyperparameters is: Where N represents the total number of terminals in a wireless network environment, and U represents the total number of clusters.

[0087] Based on the partitioning methods presented above, the performance of learning accuracy and loss value was evaluated, and the performance of convergence time and bandwidth consumption was examined. Numerical simulation results were used to verify the effectiveness of the FeDSC proposed in this chapter. Comparison algorithms include:

[0088] 1) Federated Learning with Periodic Model Averaging (FedAvg): In this scheme, all terminals participate in training. When the server receives local models from all terminals within a certain time threshold, it performs global model aggregation. Otherwise, the edge server aggregates all local models received within that time threshold. After aggregation, the edge server sends the global model back to the terminal, and the terminal, upon receiving the global model, begins updating its local model in the next communication round.

[0089] 2) Federated Learning with Periodic Model Averaging based on Heuristic Clustering Algorithm (FedAHC): This invention first uses a heuristic algorithm to partition terminals into clusters based on local training time, selecting the terminal with the middle training latency estimate as the cluster head. In the heuristic clustering algorithm, the number of clusters in the cluster feature tree is fixed first, and then terminals are assigned to these clusters in order based on the ranked training time estimates. After cluster partitioning is completed, terminals within each cluster participate in intra-cluster training. When intra-cluster training is complete, the cluster head sends the cluster model to the edge server for global aggregation. Once the edge server receives the cluster model, it performs global model aggregation. After aggregation, the edge server sends the global model back to the cluster head, which then sends it back to the terminal. After receiving the global model, the terminal begins local model updates in the next communication round.

[0090] This paper also verifies the convergence of the scheme provided in this invention on the MNIST and CIFAR10 datasets, and compares the training accuracy and loss value with two other schemes. The number of samples on each terminal is randomly set in {200, 201, ..., 1000}. Figure 4 The test accuracy of the three schemes gradually converges on the MNIST dataset with the number of local training iterations. Figure 5The results show that the loss values ​​of the three schemes gradually converge on the MNIST dataset as the number of local training iterations changes. Figure 6 The test accuracy of the three schemes gradually converges on the dataset as the number of local training iterations increases. Figure 7 The results show that the loss values ​​of the three schemes gradually converge on the MNIST dataset with varying numbers of local training iterations. Figure 4 , Figure 5 , Figure 6 , Figure 7 It can be seen that the solution provided by this invention converges faster than the other two solutions. This is because the lagging solution is trained based on a cluster model that trains faster, thus enabling it to converge faster even with a slower training time.

[0091] This paper also compares the training time required to achieve 80% model accuracy. Figure 8 and Figure 9 The figures represent the time taken for the three schemes to achieve 80% model accuracy on the MNIST and CIFAR 10 datasets (recorded from the start of training at t=0 to the time it takes for the local model to achieve 80% accuracy in each communication round). Figure 8 and Figure 9 It can be seen that the proposed FeDSC consistently achieves over 80% accuracy faster than the other two schemes. This is because, in FeDSC, firstly, the lagging cluster is trained based on a faster-training cluster model, thus enabling faster convergence even with slower training times. Secondly, the cluster model performs asynchronous aggregation, allowing terminals within the cluster to obtain a more complete global model in a timely manner. Furthermore, FedAHC consistently achieves over 80% accuracy faster than FedAvg because FedAHC also performs asynchronous aggregation, allowing the lagging cluster to be trained based on a faster-training cluster model.

[0092] In summary, this invention provides a dynamic federated learning cluster partitioning method. To mitigate the impact of lagging performers, and considering the heterogeneous and limited network resources (including computing and wireless communication resources) and the dynamically changing wireless environment, a lagging performer-aware federated learning cluster partitioning scheme is designed. Specifically, the training time of terminals is evaluated based on computing and wireless resource availability. Terminals with similar training times are dynamically partitioned into multiple clusters using a balanced iterative reduction and clustering algorithm, and a terminal is dynamically selected as the cluster head during the partitioning process. Unlike the traditional federated learning training process, the cluster head first performs synchronous aggregation on the local models of each terminal within the cluster to obtain a cluster model, and then sends the cluster model to the edge server. Upon receiving any cluster model, the edge server performs an asynchronous global aggregation to obtain a global model, and then sends the global model obtained from the asynchronous global aggregation back to the corresponding cluster head, which then distributes it to the terminals within the cluster. The numerical results from the simulations show that the proposed dynamic federated learning cluster partitioning method significantly outperforms some traditional solutions in terms of accuracy and convergence time.

[0093] In another embodiment of the present invention, a terminal is also provided, the terminal including a processor, a memory, a communication interface, and at least one communication bus for connecting the processor, the memory, and the communication interface. The memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (PROM), or portable read-only memory (CD-ROM), and is used for related instructions and data.

[0094] The communication interface is used to receive and send data. The processor can be one or more CPUs; if the processor is a single CPU, it can be a single-core CPU or a multi-core CPU. The processor in the terminal reads one or more programs stored in the memory and performs the following operations: It sequentially inputs the cluster partitioning parameters of the terminals according to the training time of their local models in the r-th communication round; dynamically partitions terminals with similar training times into multiple clusters based on the cluster partitioning parameters; and selects the terminal with the shortest training time in the cluster as the cluster head. The cluster partitioning parameters are a three-dimensional vector of a cluster feature tree determined by estimating training time based on a balanced iterative reduction and clustering algorithm. This three-dimensional vector includes the cluster head, the average difference in training time between clusters, and the maximum difference in training time between terminals within the same cluster, where r is a positive integer. Based on the cluster head, it performs aggregate training of the local models of all terminals within the same cluster. When the aggregate training is complete, it obtains a cluster model and sends it to the edge server. Each cluster head receives a global model from the edge server and sends the global model to the terminals within the cluster. The terminals then perform local model updates in the (r+1)-th communication round based on the global model. The global model is obtained by the edge server performing asynchronous aggregation on all cluster models received from any cluster.

[0095] It should be noted that the specific implementation of each operation can be described above. Figure 1 The corresponding description of the method embodiment shown above indicates that the terminal can be used to execute a cluster partitioning method for dynamic federated learning provided in the above embodiment, which will not be described in detail here.

[0096] In another embodiment of the present invention, an edge server is also provided. The edge server includes a processor, a memory, a communication interface, and at least one communication bus for connecting the processor, the memory, and the communication interface. The memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (PROM), or portable read-only memory (CD-ROM), and is used for related instructions and data.

[0097] The communication interface is used to receive and send data. The processor can be one or more CPUs; if the processor is a single CPU, it can be a single-core CPU or a multi-core CPU. The processor in the terminal reads one or more programs stored in the memory and performs the following operations: receiving a cluster model sent from a terminal acting as a cluster head, wherein the cluster head determination process specifically involves: sequentially inputting the cluster partitioning parameters of the terminals according to the training time of the local model of each terminal in the r-th communication round; dynamically partitioning terminals with similar training times into multiple clusters according to the cluster partitioning parameters; and selecting the terminal with the shortest training time in the cluster as the cluster head; wherein the cluster partitioning parameters are a three-dimensional vector of a cluster feature tree determined by estimating the training time based on a balanced iterative reduction and clustering algorithm, and the three-dimensional vector of the cluster feature tree includes the cluster head, the average difference in training time of the cluster, and the maximum difference in training time between terminals within the same cluster, where r is a positive integer; the cluster model is obtained by the cluster head performing aggregate training of the local models of all terminals within the same cluster; performing an asynchronous aggregation once for any cluster model received from any cluster to obtain a global model, and distributing the global model to the cluster head of each cluster.

[0098] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to perform a cluster partitioning method for dynamic federated learning as described in the above embodiments. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.

[0099] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0100] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A cluster partitioning method for dynamic federated learning, characterized in that, Applied to terminals, the methods include: According to the training time of the local model of each terminal in the r-th communication round, the cluster partitioning parameters of the terminals are input sequentially. Based on the cluster partitioning parameters, terminals with similar training times are dynamically divided into multiple clusters, and the terminal with the shortest training time in the cluster is selected as the cluster head. The cluster partitioning parameters are three-dimensional vectors of cluster feature trees determined by estimating the training time based on balanced iterative reduction and clustering algorithms. The three-dimensional vectors of cluster feature trees include the cluster head, the average difference of training time of the cluster, and the maximum difference in training time between terminals in the same cluster, where r is a positive integer. Based on the cluster header, perform local model aggregation training on all terminals within the same cluster. When the aggregation training is completed, obtain the cluster model and send the cluster model to the edge server. Each cluster's cluster header receives the global model from the edge server and sends the global model to the terminals within the cluster. The terminals then perform local model updates in the (r+1)th communication round based on the global model. The global model is obtained by the edge server performing an asynchronous aggregation on each cluster model received from any cluster.

2. The cluster partitioning method for dynamic federated learning according to claim 1, characterized in that, Based on the update time and transmission time of the local model for each terminal in a single communication round, the training time of the local model for each terminal in the r-th communication round is calculated.

3. The cluster partitioning method for dynamic federated learning according to claim 1, characterized in that, The mathematical expression for the cluster head is: Where, n u This represents the number of terminals in the u-th cluster. Let i represent a three-dimensional vector, where i represents the i-th terminal in cluster u; The mathematical expression for the average difference in training time of the cluster is: in, A three-dimensional vector representing the cluster head; The mathematical expression for the maximum difference in training time between terminals within the same cluster is: Where j represents the j-th terminal in cluster u.

4. The cluster partitioning method for dynamic federated learning according to claim 1, characterized in that, Based on the cluster partitioning parameters, terminals with similar training times are dynamically partitioned into multiple clusters, including: Step a: Determine the order of the terminals based on their training time, and take the terminal with the shortest training time in the order as the starting point and make it the cluster head of the first cluster. Step b: For a terminal to be partitioned, if the maximum difference in training time between the terminals adjacent to the terminal to be partitioned, determined according to the arrangement order, is less than the threshold, and the difference between the number of terminals and the total number of clusters U is less than or equal to the branching factor, then the terminal to be partitioned is partitioned into the cluster to which the adjacent terminals belong, and the minimum training time of the current terminal in the cluster is re-determined. The terminal with the minimum training time is taken as the cluster head of the cluster to which it belongs. Otherwise, a new cluster is created with the terminal to be partitioned as the cluster head, and the terminal to be partitioned is taken as the cluster head of the new cluster. Step c, repeat step b, and after all the total number N terminals in a wireless network environment have been input, obtain the cluster partitioning result.

5. The cluster partitioning method for dynamic federated learning according to claim 1, characterized in that, The expression for performing local model aggregation training on all terminals within the same cluster based on the cluster header is as follows: H min <<h<<H max Where η represents the step size, t represents the training time index, r represents the communication round index, and H min and H max These represent the minimum number of local iterations and the maximum number of local iterations, respectively. This represents the local model of the nth terminal in the (h-1)th local iteration during the r-th communication round. This represents the gradient of the local loss function.

6. A cluster partitioning method for dynamic federated learning, characterized in that, Applied to edge servers, the methods include: The system receives a cluster model sent by a terminal acting as the cluster head. The determination of the cluster head involves: sequentially inputting cluster partitioning parameters for each terminal according to the training time of its local model in the r-th communication round; dynamically dividing terminals with similar training times into multiple clusters based on these parameters; and selecting the terminal with the shortest training time in each cluster as the cluster head. The cluster partitioning parameters are a three-dimensional vector of a cluster feature tree determined by estimating training time using a balanced iterative reduction and clustering algorithm. This three-dimensional vector includes the cluster head, the average difference in training time between clusters, and the maximum difference in training time between terminals within the same cluster, where r is a positive integer. The cluster model is obtained by the cluster head performing aggregated training of the local models of all terminals within the same cluster. For any cluster model received from any cluster, perform an asynchronous aggregation to obtain a global model, and then distribute the global model to the cluster header of each cluster.

7. The cluster partitioning method for dynamic federated learning according to claim 6, characterized in that, The mathematical expression for performing an asynchronous aggregation once on any cluster model received from any cluster is: ω T =(1-α) t )ω T-1 +α t ω u,r , where α t ∈(0,1) represents the mixture hyperparameter, ω T ω represents the global model generated by the T-th round of asynchronous aggregation. T-1 ω represents the global model generated by the (T-1)th round of asynchronous aggregation. u,r This represents the cluster model of cluster u at the r-th cluster iteration.

8. The cluster partitioning method for dynamic federated learning according to claim 7, characterized in that, The formula for calculating the hybrid hyperparameters is: Where N represents the total number of terminals in a wireless network environment, and U represents the total number of clusters.

9. A terminal, characterized in that, The terminal includes a processor and a memory, the memory storing at least one instruction, which is loaded and executed by the processor to perform the operation of a cluster partitioning method for dynamic federated learning as described in any one of claims 1 to 5.

10. An edge server, characterized in that, The edge server includes a processor and a memory, the memory storing at least one instruction that is loaded and executed by the processor to perform the operations performed by a dynamic federated learning cluster partitioning method as described in any one of claims 6 to 8.

Citation Information

Patent Citations

  • High-performance federated edge learning method capable of sensing availability of equipment

    CN114519387A

  • Federal learning method and device based on cluster training and gradient sparsity

    CN116910541A