A model comparison federated learning method for arbitrary client dropout problem

By constructing a model comparison module and a weighted aggregation module in federated learning, the problem of global model deviation caused by client exit is solved, and global model convergence and accuracy improvement are achieved in edge intelligent network interruption scenarios, adapting to data heterogeneity and complex networks.

CN118821976BActive Publication Date: 2025-11-18BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410950911.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2025-11-18
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

In federated learning, client network interruptions can cause a shift between the global model and the global optimum, reducing learning performance. Existing methods cannot effectively address this issue, especially in cases of data heterogeneity and uncontrollable client exits, where traditional methods cause the global model to deviate from the training objective.

Method used

We employ a model comparison federated learning approach. By building a model comparison module on active clients, we introduce regularization terms and adversarial strategies to update local models, thereby reducing the shift of the global objective towards the local objective. For exiting clients, we adopt a historical update reuse strategy to ensure their contribution. During the global model update phase, we use a weighted aggregation module to combine data diversity and quality differences to improve the model's convergence speed and robustness.

Benefits of technology

In edge intelligent networks where any client exits, the convergence of the global model is guaranteed, improving model accuracy and robustness, adapting to complex datasets and neural networks, enhancing generalization ability, and resisting network outage issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118821976B_ABST
    Figure CN118821976B_ABST
Patent Text Reader

Abstract

The application discloses a model comparison federated learning method for any client exit problem, and belongs to the technical field of edge intelligent calculation. The application realizes the method as follows: in the local training stage of the federated learning, a model comparison module with a regular term is constructed for active clients to reduce the deviation of the global target to the local target; for the exit clients, a historical update continuation strategy is adopted to ensure the contribution degree of the exit clients to the global update. In the global model update stage, a weighted aggregation module is adopted to first aggregate the update amount of the clients in the current round according to the contribution degree, give greater weight to the universality data, prevent the negative influence of the error data or personalized data on the model performance, utilize the weighted aggregation module to aggregate the weighted aggregation amount of the local update in the current round and the weighted aggregation of the global update in the last round, fuse the historical global update amount, improve the global model convergence speed, and enhance the robustness of the global model to data heterogeneity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a model-contrastive federated learning method for mitigating network outages, belonging to the field of edge intelligent computing technology. Background Technology

[0002] With the popularization of IoT technology, data silos and privacy breaches have become increasingly prominent issues. Federated learning, as an emerging distributed machine learning framework, has attracted widespread attention from the academic community. In federated learning, clients train local models using local datasets and upload model updates to a central server instead of the original data. Therefore, federated learning has become a privacy-preserving model training paradigm. Based on client type, federated learning can be divided into cross-device federated learning and cross-data-silo federated learning. In mobile edge networks, clients are typically edge devices with relatively small amounts of local data, such as personal computers, mobile phones, and smartwatches, falling under the cross-device federated learning framework.

[0003] When federated learning is applied to edge intelligent networks, the heterogeneity of resources (such as computing power, battery capacity, and network quality) among different clients can be significant. Unpredictable factors, such as insufficient mobile device battery or communication interruptions with the server, can cause some clients to occasionally fail to participate in certain training iterations—a network interruption problem. These withdrawn clients are called "fallen clients." In each collaborative training session, only a portion of clients can complete their local training tasks and successfully upload local model updates. This leads to a shift between the globally aggregated model and the global optimum, reducing the utility of the global model and potentially making it impossible to ensure global model convergence despite the additional communication costs.

[0004] Furthermore, the client's exit behavior is spontaneous and uncontrollable, which is fundamentally different from the common client sampling problem. Although client sampling is also a partial participation situation, it is based on a major premise assumption—the server can select each client with a certain probability, that is, each client has a certain probability of participating in iterative training.

[0005] Therefore, mitigating network outages in federated learning presents several key challenges. Since edge device datasets are typically non-independent and identically distributed, and federated learning does not allow for the transfer or exchange of local datasets, it cannot mitigate heterogeneity. Current research on client dropout issues in federated learning is insufficient. Simply ignoring dropout clients using traditional federated averaging methods (FedAvg, FedProx, etc.) leads to global aggregated model updates being biased towards the local models of clients that have not yet exited, deviating from the global training objective and reducing learning performance. Simply using the latest historical update instead of the model update uploaded during the dropout period (MIFA) alleviates the deviation from the global objective to some extent, but if some clients exit for extended periods, the obsolescence of the latest historical update gradually becomes apparent, the contribution of dropout clients gradually weakens, and the improvement in global model learning performance is severely limited. Summary of the Invention

[0006] To address the issue of global objective deviation caused by client network interruptions in existing federated learning methods, this invention provides a model comparison federated learning method for the problem of arbitrary client exits. This method constructs a model comparison module for active clients during the local training phase of federated learning. By adding a regularization term to the model comparison module, the local and global models are made as close as possible, reducing the shift of the global objective towards the local objective. For exiting clients, a historical update reuse strategy is adopted to ensure the contribution of exiting clients to the global update, improving the generalization and robustness of the global model. In the global model update phase, a weighted aggregation module is used. First, the update amounts from clients in the current round are weighted and aggregated according to their contribution. Considering the diversity and quality differences of data from different clients, more weight is given to general data to prevent the negative impact of erroneous or personalized data on model performance, resulting in the weighted aggregation amount of the local update in this round. This weighted aggregation module is then used to aggregate the weighted aggregation amount of the local update in this round with the weighted aggregation of the global update in the previous round, fusing historical global update amounts to improve the convergence speed of the global model and enhance its robustness to data heterogeneity. This invention can guarantee the convergence of the global model in edge intelligent network interruption scenarios where any client exits, while improving the accuracy of the global model.

[0007] The objective of this invention is achieved through the following technical solution.

[0008] This invention discloses a model-contrastive federated learning method for the problem of arbitrary client logout, comprising the following steps:

[0009] Step 1: A cross-device federated learning system is constructed consisting of a central server and N clients, where N clients are represented as follows: The local dataset of client i is represented as The dataset set of all clients is defined as follows: Client-side collaborative training of a network model with M adjustable parameters The goal of training the network model is to minimize the loss value of all clients on the data samples using an empirical risk minimization method, without exchanging the original data. In other words, the goal of the federated learning task is to minimize the global objective loss function through collaborative training among the clients, thus obtaining the minimized global objective loss function. The entire network model training process consists of T communication iterations. In the t∈[T]-th iteration, all clients receive the global model ω broadcast from the central server. t and the global model ω t As the initial values ​​for the local model trained locally, i.e.

[0010] The minimized global objective loss function obtained in step one is shown in equation (1):

[0011]

[0012] in: Let ξ be the empirical loss function for client i. i Let i be the sampled dataset for client i.

[0013] Step Two: For active clients, a model comparison module is constructed by introducing regularization terms. In edge intelligent network interruption scenarios where any client exits, an adversarial strategy is employed to update the local model of the active client. This ensures that the global model update direction is as far away as possible from the local optimum of the active client and as close as possible to the direction of the global model optimum, reducing the shift of the global objective towards the local objective. The local optimum refers to the minimum value of the local objective loss function; the global model optimum refers to the minimum value of the global objective loss function.

[0014] For active clients, a local objective loss function is constructed by introducing a regularization term in the model comparison module, as shown in Equation (3). This local objective loss function consists of two parts. The first part is the cross-entropy loss term from the supervised learning task, denoted as l. cro The second part is the model comparison loss term, denoted as l. mc The regularization term is the model contrastive loss function shown in equation (2):

[0015]

[0016] Where κ is the temperature parameter.

[0017] For client i, the local loss function for data sample (x, y) is as follows:

[0018]

[0019] Where λ is a hyperparameter that adjusts the weights of the contrastive loss in the model.

[0020] In edge intelligent network interruption scenarios where any client exits, an adversarial strategy is employed to update the local model of the active client. During the t-th round of local training, client i first receives the global model ω from the server. t As the initial values ​​for the local model in this round of local training, the active clients perform K steps of local training on the local model. In the k∈[K]th step of local training, the local data of client i is... The local model update process is shown in equation (4) below:

[0021]

[0022] Where, η L This is the local learning rate.

[0023] The local model parameters are continuously adjusted according to equation (4) to minimize the local loss function value. After completing K steps of local training, each active client uploads the local update as shown in equation (5) to the server.

[0024]

[0025] Based on equations (4) and (5), complete the local training in the t-th iteration and update the local model to... Thus increase and The difference between them reduces ω t and The difference between them is that the global model update direction should be as far away from the local optimum of the active client as possible, and as close as possible to the direction of the global model optimum, so as to reduce the offset of the global target from the local target.

[0026] Step 3: During each round of local model update, for exiting clients, a historical update reuse strategy is adopted to perform local model updates on exiting clients, ensuring the contribution of exiting clients to the global update and improving the generalization and robustness of the global model.

[0027] During each round of local model updates, to account for the heterogeneity of the local datasets of exiting clients, a historical update reuse strategy is adopted to update the local model for exiting clients. Up to the t-th iteration, the duration of this exit for client i is defined as... Indicates that client i is in continuous The client i was in an inactive state during the training iterations, meaning that the last time the client i was active before the t-th iteration was the t-th iteration. When a client exits, the local model update from the last training iteration before the client exits is used as the local model update at the time of the client's exit. This ensures the exiting client's contribution to the global update and improves the generalization and robustness of the global model. The last training iteration before the client exits refers to the... Training round t. Client exit behavior includes two situations: inability to update in round t, or inability to upload the model update for that round before completing round t training.

[0028] Step 4: In the global model update phase, the server stores or updates the model update amounts from each client. A weighted aggregation module is used to first aggregate the update amounts from each client in the current round according to their contribution. Considering the diversity and quality differences in data from different clients, greater weight is given to general data to prevent the negative impact of erroneous or personalized data on model performance, resulting in the weighted aggregate amount for the local update in this round. This weighted aggregation module is then used to aggregate the weighted aggregate amount of the local update in this round with the global update from the previous round to obtain the global model update for this round. By incorporating historical global update amounts, the convergence speed of the global model is improved, and the robustness of the global model to data heterogeneity is enhanced. The global model is iterated based on the global model update until the Tth iteration ends, resulting in the global model after the Tth iteration. This global model after the Tth iteration is used as the model comparison model for the final neural network global model trained using the federated learning method.

[0029] Step 4.1: During the global model update phase, after the central server receives the model updates uploaded by each client, it first needs to store or update the model update amounts for each client. (Definition) This is the update storage array for round t. For active clients, the server updates the array with the latest parameters uploaded in the new round. For inactive clients, there's no need to wait for communication to resume; the server reuses their latest historical model update as a response. This accelerates convergence while preventing excessive shift of the global model to the local model of active clients.

[0030] Step 4.2: Using the weighted aggregation module, the server first performs weighted aggregation on the local model update according to Equation (6) to obtain the local weighted update for this round. The weight parameter depends on the proportion of the local data volume of the client to the total data volume of all clients.

[0031]

[0032] In this weighted aggregation module, the server then merges the local weighted update of the current round with the global update of the previous round according to equation (7) to obtain the global update of the current round, thereby enhancing the robustness of the global model to data heterogeneity and accelerating the convergence speed.

[0033] vt = α * g t-1 + (1 - α) * g t , α ∈ [0, 1] (7)

[0034] Where α is the weight parameter for adjusting the local weighted update of this round and the global update of the previous round.

[0035] The server adjusts the global model according to Equation (8) to obtain the global model ω of this round. t+1 :

[0036] ω t+1 ← ω t + ηv t (8)

[0037] Where η is the global learning rate.

[0038] Step 4.3: When t < T, the server broadcasts the global model ω obtained in Step 4.2 to each client. Each client uses the global model ω as the initial value of the local model for the next round of local training and returns to Step 2 for iteration; when t = T, the T - th round of iteration ends, and the global model obtained in Step 4.2 is used as the final neural network global model trained by the model - comparison federated learning method. t+1 The server broadcasts the global model ω obtained in Step 4.2 to each client. Each client uses the global model ω as the initial value of the local model for the next round of local training and returns to Step 2 for iteration; when t = T, the T - th round of iteration ends, and the global model obtained in Step 4.2 is used as the final neural network global model trained by the model - comparison federated learning method. t+1 as the initial value of the local model for the next round of local training and returns to Step 2 for iteration; when t = T, the T - th round of iteration ends, and the global model obtained in Step 4.2 is used as the final neural network global model trained by the model - comparison federated learning method.

[0039] It further includes Step Five: According to the final neural network global model obtained in Step Four, ensure the convergence of the global model and improve the accuracy of the global model in the scenario of edge intelligent network interruption when any client exits.

[0040] Beneficial effects:

[0041] 1. A model - comparison federated learning method for the problem of any client exiting. In the local training stage of federated learning, a model - comparison module is constructed for active clients. Compared with traditional federated averaging, it improves the model accuracy, enhances the generalization and robustness of the model, adapts to more complex data sets and neural networks, and also fully considers the impact of client data heterogeneity. Through the regularization constraints on the global model and local models, the local model and the global model are made as close as possible, reducing the deviation of the global objective towards the local objective, and effectively preventing the client deviation problem.

[0042] 2. This invention discloses a model-contrastive federated learning method for the arbitrary client exit problem. For exiting clients, a historical update reuse strategy is adopted to ensure the exiting client's contribution to the global update, preventing excessive shift of the global objective towards the local objective of active clients and enhancing the generalization ability of the global model. Especially when the local dataset information of exiting clients is important, the historical update reuse strategy can provide a broader dataset guarantee, thereby improving the robustness and accuracy of the global model.

[0043] 3. This invention discloses a model-contrastive federated learning method for the problem of arbitrary client exit. It employs different strategies for clients in different states: for active clients, a model comparison module standardizes the update direction of the local model; for exiting clients, a historical update reuse strategy ensures the generalization of the global model. The combination of these two approaches constitutes the local training method of the model-contrastive federated learning method. This optimizes the update direction of the local model in the context of data heterogeneity while enhancing the universality of the global model, thus resisting network interruption problems in federated learning scenarios.

[0044] 4. This invention discloses a model-comparative federated learning method for the arbitrary client exit problem. A weighted aggregation module is constructed in the global model. Local updates from each client are aggregated using a contribution-weighted approach, which better considers the diversity and quality differences of data from different clients compared to the traditional average aggregation method. Furthermore, by weighting the client-weighted updates of the current round with the global updates of the previous round, the robustness of the global model to data heterogeneity is enhanced, and the convergence of the global model is accelerated. Attached Figure Description

[0045] Figure 1 This is a flowchart of a model comparison federated learning method (FedMC) for the arbitrary client exit problem disclosed in this invention;

[0046] Figure 2 Embodiment 1 of the present invention employs an exit simulation scenario 1 (τ) in 30 heterogeneous clients. max =20) Under the setting of participating in the global model training task, the final test accuracy of the global model on the FMNIST dataset is shown in the figure;

[0047] Figure 3 This is a schematic diagram of the training accuracy (a) and test accuracy (b) of the global model on the CIFAR100 dataset, obtained in Embodiment 1 of the present invention under the setting of exiting simulation scenario 3 (P=0.5) to participate in the global model training task among 30 heterogeneous clients. Detailed Implementation

[0048] To better illustrate the purpose and advantages of the present invention, the invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0049] Example 1

[0050] like Figure 1 As shown in the figure, this embodiment discloses a model-contrastive federated learning method for the arbitrary client exit problem, also known as the FedCM method. The specific implementation steps are as follows:

[0051] Step 1: A cross-device federated learning system is constructed consisting of a central server and N=30 clients. The local dataset of client i is represented as follows: The dataset set of all clients is defined as follows: Experiments were conducted using three benchmark image datasets: FMNIST, CIFAR10, and CIFAR100. The FMNIST and CIFAR10 datasets each contain 10 classes, with 60,000 and 50,000 data samples respectively. To achieve the non-independent and identically distributed (IAD) property of the client datasets, the training datasets were divided into 60 partitions, each containing a random data sample class, and randomly assigned to each client in three partitions, meaning each client received data with only three label classes. The CIFAR100 dataset contains 100 classes and 60,000 data samples. The Dirichlet method (parameter set to 0.5) was used to partition the CIFAR100 dataset into non-independent and identically distributed (IAD) data.

[0052] Clients collaboratively train a network model For the FMNIST dataset, a Convolutional Neural Network (CNN) model is used, consisting of two 5×5 convolutional layers, two 2×2 max-pooling layers, and a fully connected layer with ReLU activation. For the CIFAR10 dataset, a VGG-11 model is used. For the CIFAR100 dataset, a ResNet18 model is used. The goal of training the network model is to minimize the loss value of all clients on the data samples using an empirical risk minimization method, without exchanging the original data. In other words, the goal of the federated learning task is to minimize the global objective loss function through collaborative training among the clients. The entire network model training process includes a total of T communication iterations, where T = 300 communication rounds are performed for the FMNIST dataset, and T = 400 communication rounds are performed for the CIFAR10 and CIFAR100 datasets. In the t∈[T]-th iteration, all clients receive the global model ω broadcast from the central server. t and the global model ω t As the initial values ​​for the local model trained locally, i.e.

[0053] For any client exit behavior, this invention sets up three exit simulation scenarios to test the effectiveness of the design method. The specific scenarios are as follows:

[0054] Scenario 1: The number of consecutive exit iterations by the client is limited. In this task, to ensure the effective collaborative training of the model, τ is specified. max =20 is the upper limit for the number of iterations that a client will continue to fall behind. Each client randomly generates a constant τ. i ∈[0,20], repeating cyclically every τ i The next iteration becomes active.

[0055] Scenario 2: Clients have a static and fixed activity probability. Let p be the activity probability of all clients. In this specific embodiment, p can take values ​​of 0.1, 0.3, 0.5, and 0.7. In the t-th iteration, each client generates a random number. like If client i is active in the t-th iteration, then client i will be active; otherwise, client i will exit.

[0056] Scenario 3: Clients have time-varying activity probabilities. Let P∈[0,1] represent the proportion of active clients. In this experiment, P=0.5, meaning 15 clients are active in each iteration. In the t-th iteration, a weight is randomly generated for each client. Using probability vectors The active clients in this round are determined by a random sampling method without replacement. The larger the weight, the higher the probability of the client being active, but this does not mean that the active clients are necessarily the 15 clients with the highest weight.

[0057] The minimized global objective loss function obtained in step one is shown in equation (9).

[0058]

[0059] Step Two: For active clients, a model comparison module is constructed by introducing regularization terms. In edge intelligent network interruption scenarios where any client exits, an adversarial strategy is employed to update the local model of the active client. This ensures that the global model update direction is as far away as possible from the local optimum of the active client and as close as possible to the direction of the global model optimum, reducing the shift of the global objective towards the local objective. The local optimum refers to the minimum value of the local objective loss function; the global model optimum refers to the minimum value of the global objective loss function.

[0060] For active clients, a local objective loss function is constructed by introducing a regularization term in the model comparison module, as shown in Equation (10). This local objective loss function consists of two parts. The first part is the cross-entropy loss term from the supervised learning task, denoted as l. cro The second part is the model comparison loss term, denoted as l. mc The temperature parameter is set to 0.5.

[0061]

[0062] For client i, the local loss function for data sample (x,y) is shown in equation (11), where the hyperparameter λ is set to 0.5.

[0063]

[0064] In edge intelligent network interruption scenarios where any client exits, an adversarial strategy is employed to update the local model of the active client. During the t-th round of local training, client i first receives the global model ω from the server. t As the initial values ​​of the local model for this round of local training, the active clients perform 5 local training steps on the local model respectively. In the k∈[5]th local training step, the local data of client i is The local learning rate is set to 0.01, and the SGD optimizer is used to implement the local model update process, as shown in equation (12) below:

[0065]

[0066] The local model parameters are continuously adjusted according to equation (12) to minimize the local loss function value. After completing 5 steps of local training, each active client uploads the local update as shown in equation (13) to the server.

[0067]

[0068] Based on equations (12) and (13), complete the local training in the t-th iteration and update the local model to... Thus increase and The difference between them reduces ω t and The difference between them is that the global model update direction should be as far away from the local optimum of the active client as possible, and as close as possible to the direction of the global model optimum, so as to reduce the offset of the global target from the local target.

[0069] Step 3: During each round of local model update, for exiting clients, a historical update reuse strategy is adopted to perform local model updates on exiting clients, ensuring the contribution of exiting clients to the global update and improving the generalization and robustness of the global model.

[0070] During each round of local model updates, to account for the heterogeneity of the local datasets of exiting clients, a historical update reuse strategy is adopted to update the local model for exiting clients. Up to the t-th iteration, the duration of this exit for client i is defined as... Indicates that client i is in continuous The client i was in an inactive state during the training iterations, meaning that the last time the client i was active before the t-th iteration was the t-th iteration. The next step is to update the local model using the last trained model before the client exits. The local model update during the training round is used as the local model update during the client's exit period.

[0071] Step 4: In the global model update phase, the server stores or updates the model update amounts from each client. A weighted aggregation module is used to first aggregate the update amounts from each client in the current round according to their contribution. Considering the diversity and quality differences in data from different clients, greater weight is given to general data to prevent the negative impact of erroneous or personalized data on model performance, resulting in the weighted aggregate amount for the local update in this round. This weighted aggregation module is then used to aggregate the weighted aggregate amount of the local update in this round with the global update from the previous round to obtain the global model update for this round. By incorporating historical global update amounts, the convergence speed of the global model is improved, and the robustness of the global model to data heterogeneity is enhanced. The global model is iterated based on the global model update until the Tth iteration ends, resulting in the global model after the Tth iteration. This global model after the Tth iteration is used as the model comparison model for the final neural network global model trained using the federated learning method.

[0072] Step 4.1: During the global model update phase, after the central server receives the model updates uploaded by each client, it first needs to store or update the model update amounts for each client. (Definition) This is the update storage array for round t. For active clients, the server updates the array with the latest parameters uploaded in the new round. For inactive clients, there's no need to wait for communication to resume; the server reuses their latest historical model update as a response. This accelerates convergence while preventing excessive shift of the global model to the local model of active clients.

[0073] Step 4.2: Using the weighted aggregation module, the server first performs weighted aggregation on the local model update according to Equation (14) to obtain the local weighted update for this round. The weight parameter depends on the proportion of the local data volume of the client to the total data volume of all clients.

[0074]

[0075] In this weighted aggregation module, the server further fuses the local weighted update of this round with the global update of the previous round according to Equation (15), and sets the weight parameter to 0.2 to obtain the global update of this round.

[0076] v t = 0.2 * g t-1 + 0.8 * g t , α ∈ [0,1] (15)

[0077] The learning rate of the server is set as follows: for the CNN network model, it is 0.01 * 0.95 t-1 , and for the VGG-11 network model and the ResNet18 network model, it is 0.01 * 0.99 t-1 . Adjust the global model according to Equation (16) to obtain the global model ω of this round t+1 .

[0078] ω t+1 ← ω t + ηv t , t = 0,1,...,T (16)

[0079] Step 4.3: When t < T, the server broadcasts the global model ω obtained in Step 4.2 to each client. Each client uses the global model ω t+1 as the initial value of the local model for the next round of local training and returns to Step 2 for iteration; when t = T, the T-th round of iteration ends, and the global model obtained in Step 4.2 is used as the final neural network global model trained by the model comparison federated learning method. t+1

[0080] It further includes Step Five: According to the final neural network global model obtained in Step Four, ensure the convergence of the global model and improve the accuracy of the global model in the edge intelligent network interruption scenario where any client exits.

[0081] This embodiment will illustrate the effects of the present invention from two aspects.

[0082] 1. Experimental conditions

[0083] A model comparison federated learning method for the problem of any client exiting disclosed in this embodiment is used to train and test the global model in the environment of NVIDIA RTX 3090 GPU using the Pytorch deep learning framework.

[0084] 2. Experimental results

[0085] This experiment considers different datasets, network models, and client exit scenarios to verify the usability and efficiency of the present invention. The experimental content is mainly divided into the following three parts:

[0086] (1) Using a CNN model and the FMNIST dataset in exit scenario 1 (τ) max =20) The model collaborative training task was carried out under the setting, with a total of 300 communication rounds.

[0087] (2) The VGG-11 model and the CIFAR10 dataset were used to perform a collaborative training task in exit scenario 2 (p = {0.1, 0.3, 0.5, 0.7}) for a total of 400 communication rounds.

[0088] (3) The model collaborative training task was carried out using the ResNet18 model and the CIFAR100 dataset in the exit scenario 3 (P=0.5) setting, with a total of 500 communication rounds.

[0089] Figure 2 In Embodiment 1 of the present invention, a fallback simulation scenario 1 (τ) is used among 30 heterogeneous clients. max =20) Schematic diagram of the test accuracy of the global model on the FMNIST dataset under the model training task settings.

[0090] Table 1 shows the test accuracy results of the global model on the CIFAR10 dataset in Embodiment 1 of the present invention, under the setting of exiting simulation scenario 2 (p={0.1,0.3,0.5,0.7}) to participate in the model training task in 30 heterogeneous clients.

[0091]

[0092] Figure 3 This is a schematic diagram of the training accuracy (a) and test accuracy (b) of the global model on the CIFAR100 dataset under the setting of exiting simulation scenario 3 (P=0.5) in 30 heterogeneous clients participating in the model training task.

[0093] The experimental results above show that, compared with existing federated learning algorithms, the method disclosed in this invention exhibits better convergence performance and higher test accuracy under different datasets, network models, and exit scenarios. The effect is even more prominent when the dataset and model complexity are higher, indicating that our proposed algorithm has stronger robustness and learning ability.

[0094] The specific embodiments described above are merely implementation methods adopted to facilitate understanding of the present invention and are not intended to limit the present invention. All equivalent changes and improvements made within the scope of the present invention should be included within the protection scope of the present invention.

Claims

1. A model comparison federated learning method for arbitrary client exit problems, characterized in that: Comprising the following steps, Step one: a cross-device federated learning system is composed of a central server and N clients, where N clients are represented as The local data set of client i is represented as The data set collection of all clients is defined as The client collaborates to train a network model with M adjustable parameters The goal of training the network model is to minimize the loss value of all clients on the data sample without exchanging the original data, that is, the goal of the federated learning task is to minimize the global target loss function through the collaborative training of each client, and the minimum global target loss function is obtained; the whole network model training process includes T communication iterations in total, in the tth iteration, all clients receive the global model ω t broadcasted by the central server, and the global model ω t is taken as the initial value of the local training local model, that is Step two: for active clients, a model comparison module is constructed by introducing a regularization term; in the edge intelligent network interruption scenario of any client exit, an active state client local model is updated using an adversarial strategy, so that the global model update direction is as far as possible from the local optimal solution of the active state client, as close as possible to the global model optimal solution direction, and the deviation of the global target to the local target is reduced; the local optimal solution refers to the minimum value of the local target loss function; The global model optimal solution refers to the minimum value of the global target loss function; Step three: in each round of local model updating process, for the exited client, the local model of the exited client is updated by using a historical update continuation strategy, so as to ensure the contribution of the exited client to the global update and improve the generalization and robustness of the global model; Step four: in the global model updating stage, the server stores or updates the model updating amount of each client; a weighted aggregation module is used to first aggregate the updating amount of the client in this round according to the contribution, combine the diversity and quality difference of the data of different clients, give greater weight to the universal data, prevent the negative influence of error data or personalized data on the model performance, and obtain the weighted aggregation amount of the local update in this round; the weighted aggregation module is also used to aggregate the weighted aggregation amount of the local update in this round and the global update weighted aggregation in the last round, so as to obtain the global model update in this round, improve the convergence speed of the global model, and enhance the robustness of the global model to data heterogeneity; According to the global model update, the global model is iterated until the Tth iteration is completed, and the global model after the Tth iteration is obtained as the final neural network global model trained by the model comparison federated learning method.

2. The model comparison federated learning method for arbitrary client dropout issues of claim 1, wherein: Step five: according to the final neural network global model obtained in step four, the convergence of the global model is ensured in the edge intelligent network interruption scenario of any client exit, and the accuracy of the global model is improved.

3. The model comparison federated learning method for arbitrary client dropout issues according to claim 1 or 2, characterized in that: The minimized global target loss function obtained in step one is shown in formula (1): where: is the experience loss function for client i, ξ i is the sampled dataset for client i.

4. The model comparison federated learning method for arbitrary client dropout issues of claim 3, wherein: The implementation method of step two is, The local target loss function in the contrast module is constructed by introducing a regular term for the active client, as shown in equation (3); the local target loss function is composed of two parts, the first part is the cross-entropy loss term in the supervised learning task, denoted as l cro , and the second part is the model contrast loss term, denoted as l mc ; the regular term is the model contrast loss function as shown in equation (2): Wherein, κ is a temperature parameter; The local loss function of the client i for the data sample (x, y) is as follows: Wherein, λ is a hyperparameter for adjusting the model comparison loss weight; In the edge intelligent network interruption scenario of any client exit, the active state client local model is updated by adopting the countermeasure strategy. In the tth round of local training process, the client i first receives the global model ω from the server t As the initial value of the local model of this round of local training, the active client respectively performs K-step local training on the local model. In the k∈[K] step of local training, the local data of the client i is The local model updating process is shown in the following formula (4): where η L is the local learning rate; According to formula (4), the local model parameters are continuously adjusted to minimize the local loss function value; after K steps of local training, each active client uploads the local update as shown in formula (5) to the server; According to formula (4), formula (5), the local training in the tth round of iteration is completed, and the local model is updated to So as to increase The difference between And t And The difference between and, that is, make the global model update direction as far as possible from the local optimal solution of the active client, as close as possible to the global model optimal solution direction, and reduce the deviation of the global target to the local target.

5. The model comparison federated learning method for arbitrary client dropout issues of claim 4, wherein: The implementation method of step three is, In each round of local model updating process, the historical update continuation strategy is adopted to update the local model of the exiting client; until the tth iteration, the duration of the current exit of the client i is defined as , which means that the client i is in an inactive state for consecutive training iterations, i.e., the last time the client i is in an active state before the tth iteration is the th iteration; when the client exits, the local model update of the last training before the client exits is used as the local model update of the exit period of the client, which ensures the contribution of the exiting client to the global update and improves the generalization and robustness of the global model; the last training before the client exits refers to the th training; the exit of the client includes two cases: unable to update in the tth iteration and unable to upload the model update of the tth training.

6. The model comparison federated learning method for arbitrary client dropout issues of claim 5, wherein: The implementation method of step four is, Step 4.1: In the global model updating stage, after the center server receives the model updates uploaded by each client, it first needs to store or update the model update amount of each client; define the update storage array for the t-th round; that is, for active clients, the server uploads the new round of parameter updates to the array, and for non-active clients, there is no need to wait for communication to resume, and the latest historical model update is reused as a response, which accelerates convergence while avoiding excessive deviation of the global model from the local model of active clients; Step 4.2: using a weighted aggregation module, the server first aggregates the local model update according to formula (6) to obtain the local weighted update in this round, and the weight parameter depends on the proportion of the local data amount of the client in the total data set of all clients; In the weighted aggregation module, the server further combines the local weighted update in this round and the global update in the last round according to formula (7) to obtain the global update in this round, enhance the robustness of the global model to data heterogeneity, and accelerate the convergence speed; v t = a * g t-1 + (1 - a) * g t , a e [0, 1] (7) Wherein, a is the weight parameter adjusting the local weighted update of this round and the global update of the last round; The server adjusts the global model according to formula (8) to obtain the global model ω of this round t+1 : ω t+1 ← ω t + ηv t (8) where η is the global learning rate; Step 4.3: When t < T, the server will take the global model ω t+1 broadcast to each client; each client will take the global model ω t+1 as the initial value of the local model for the next round of local training, return to step two iteration; when t = T, the Tth round of iteration is completed, and the global model obtained in step 4.2 is taken as the final neural network global model trained by the model comparison federated learning method.

Citation Information

Patent Citations

  • Power-saving method for centralized wireless video monitoring system

    CN103945200A

  • Message pushing method and device, electronic equipment and medium

    CN111079006A