Federal learning optimization method and device based on particle swarm algorithm

By introducing particle swarm optimization and gradient compression methods into federated learning, the client model parameters are optimized, solving the heterogeneity and communication overhead problems in federated learning and improving model training efficiency and accuracy.

CN116629305BActive Publication Date: 2026-04-14GUANGZHOU UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-22
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Federated learning suffers from heterogeneity and communication overhead, which leads to slow training and decreased model accuracy. This is especially true when there is a large amount of data or limited computing resources, where communication costs are high and model accuracy decreases in unstable network environments.

Method used

Particle swarm optimization is introduced to optimize federated learning. The client model parameters are simulated as particles, and optimization is performed using global and individual historical optimal information. Gradient compression methods based on weight divergence and update increment are adopted to reduce communication costs.

Benefits of technology

It improves model convergence speed and training efficiency, optimizes the communication process, adapts to dynamic heterogeneous environments, reduces communication costs, and enhances model training performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116629305B_ABST
    Figure CN116629305B_ABST
Patent Text Reader

Abstract

The application provides a federated learning optimization method and device based on a particle swarm algorithm, wherein the method comprises the following steps: a server determines target requirements of a global model according to a scene, initializes the global model, and broadcasts the global model to clients participating in federated learning; the clients participating in federated learning improve the global model by using a particle swarm optimization algorithm to obtain model update parameters; a gradient compression method based on model weight divergence and update increment is used to compress the model update parameters; the compressed model update parameters are uploaded to the server, the server aggregates the model parameters of the clients participating in federated learning on this basis, weights the data set capacity used for training the clients participating in federated learning, and aggregates to obtain new global model parameters. The application improves the training efficiency of federated learning and optimizes the federated learning communication process by using the particle swarm optimization algorithm for the client model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of federated learning technology, and in particular to a federated learning optimization method and apparatus based on particle swarm optimization algorithm. Background Technology

[0002] Federated learning is a distributed machine learning framework designed to collaboratively train a usable public model without data leaving the local client. The accuracy of models trained using federated learning is comparable to that trained through centralized learning, while possessing inherent privacy protection features. During data transmission between the client and server, only the client's model parameters are involved, while the data itself remains locally, ensuring data privacy is not compromised. Federated learning technology achieves model training by sharing virtual datasets and models across multiple devices. In this technology, each device only needs to store and process its own collected data, then uploads the data to the cloud using encryption. In the cloud, virtual datasets and models are created and shared among multiple devices. Each device only needs to interact with the virtual datasets and models using its local data to update its local model. Ultimately, the model training from multiple devices can be merged into a global model, and data privacy is protected.

[0003] Federated learning presents two main challenges: heterogeneity and communication overhead. Heterogeneity refers to the fact that participating devices or data centers have varying hardware, software, and network configurations, leading to slow training processes or difficulties in optimization. Furthermore, in real-world scenarios, clients are located in different environments with inconsistent dataset distributions, resulting in decreased accuracy of the models collected and updated through federated learning. Communication overhead refers to the computational and transmission costs incurred for data exchange between multiple devices. Devices in federated learning can be local, cloud servers, or distributed systems, requiring data synchronization and model training. Since each device has different data volumes and computing capabilities, the communication overhead varies. The amount of data and transmission speed between devices in federated learning also impacts training efficiency and quality.

[0004] Existing technologies can be broadly categorized into three types: solutions for addressing data heterogeneity in federated learning, solutions for optimizing the federated learning training process, and federated learning technologies based on biomimetic optimization algorithms.

[0005] The above solution has the following drawbacks:

[0006] Federated learning requires multiple communications between the client and server to exchange model parameters. Traditional federated learning schemes incur high communication costs in large-scale or data-heavy scenarios. As model parameters increase with training iterations, communication and transmission become impossible with limited computing resources, resulting in poor model performance. For clients with imbalanced data distribution, training time is long, impacting the overall model training efficiency. When client computing resources are limited, more time is needed to update the model, extending the overall framework iteration time. Federated learning aggregates model parameters, receiving a large number of parameters. In unstable network environments, model accuracy can significantly decrease, making it impossible to obtain better model parameters locally for uploading. Summary of the Invention

[0007] This invention provides a federated learning optimization method and apparatus based on particle swarm optimization, aiming to solve the above-mentioned problems.

[0008] This invention provides a federated learning optimization method based on particle swarm optimization, comprising:

[0009] S1. The server determines the target requirements of the global model based on the scenario, initializes the global model, and broadcasts the global model to the clients participating in federated learning.

[0010] S2. After receiving the global model sent by the server, the clients participating in federated learning use the particle swarm optimization algorithm to improve the global model and obtain the model update parameters.

[0011] S3. A gradient compression method based on model weight divergence and update increment is used to compress the model update parameters.

[0012] S4. Upload the compressed model update parameters to the server for model aggregation to obtain a new global model, which will be used for the next round of federated learning iteration training until the conditions are met or the model converges.

[0013] This invention provides a federated learning optimization device based on particle swarm optimization, comprising:

[0014] The broadcast module is used by the server to determine the target requirements of the global model based on the scenario, initialize the global model, and broadcast the global model to the clients participating in federated learning.

[0015] The parameter update module is used to improve the global model after the client participating in federated learning receives the global model sent by the server, and then obtain the model update parameters by using the particle swarm optimization algorithm.

[0016] The parameter compression module is used to compress the model update parameters using a gradient compression method based on the model's weight divergence and update increment.

[0017] The global model training module is used to upload the compressed model update parameters to the server for model aggregation to obtain a new global model, which is used for the next round of federated learning iteration training until the conditions are met or the model converges.

[0018] By adopting the embodiments of the present invention, particle swarm optimization is introduced into the federated learning training process. Before the client uses local data for training, the parameters of each client model are optimized based on the global optimum and individual historical optimum information. Each client model parameter is simulated as a particle. The model to be trained is optimized based on the global optimum model parameters and individual historical optimum model parameter information sent by the server, thereby improving the model convergence speed and model training effect, and reducing communication costs. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in one or more embodiments of this specification or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a federated learning optimization method based on particle swarm optimization algorithm according to an embodiment of the present invention;

[0021] Figure 2 This is a schematic diagram of a federated learning optimization device based on particle swarm optimization algorithm according to an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of the training model in an embodiment of the present invention. Detailed Implementation

[0023] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.

[0024] Method Implementation Examples

[0025] This invention provides a federated learning optimization method based on particle swarm optimization. Figure 1This is a flowchart of a federated learning optimization method based on particle swarm optimization algorithm according to an embodiment of the present invention. Figure 1 As shown, the federated learning optimization method based on particle swarm optimization algorithm in this embodiment of the invention specifically includes:

[0026] Step S1: The server determines the target requirements of the global model based on the scenario, initializes the global model, and broadcasts the global model to the clients participating in federated learning.

[0027] Step S2: After receiving the global model sent by the server, the client participating in federated learning improves the global model using the particle swarm optimization algorithm to obtain the model update parameters. Step S2 specifically includes:

[0028] S1: After the central server initializes the global model according to its own needs, it broadcasts the global model to the participating clients.

[0029] S2: Treat each client's model parameters as a separate particle, and based on the structure of the global model, randomly initialize the velocity vector for each client's model parameters. Local model parameters for each client As the position of particles in the particle swarm optimization algorithm, it is used for particle swarm optimization updates of the local model, and performs initialization and update operations on the model parameters of each layer of the client neural network model.

[0030] S3: Participating clients, based on their own model's particle velocity vector and position, compare them with the client's stored local model's historical best model parameters w. pbest The global model parameter w of broadcasting g and the global historical optimal model parameters w gbest Together, we perform a new round of model parameter particle velocity update calculations on the client side to obtain new client model particle velocity update parameters. This process is performed on the weight parameters of each layer of the neural network model;

[0031] S4: Update particle velocity parameters Model parameters of the client in this round The model parameters are calculated and updated by addition to obtain new client-side model parameters. This new model parameter This is equivalent to updating the particle's position; the client then uses local data to train the model parameters using stochastic gradient descent. The final update parameters are obtained.

[0032] During each round of federated learning, the local client saves the locally optimal model parameters w based on the fitness values ​​of the model parameters. pbestThe server saves the globally optimal historical model parameters w based on the fitness value. gbest The fitness value is calculated from the training loss value of the model parameters. The lower the loss value, the higher the fitness value. In the process of continuous training and iteration of federated learning, the historical best model parameters are evaluated and updated.

[0033] The update formula for the optimized federated learning client based on particle swarm optimization is:

[0034] in The client-side k simulates the current velocity of the particle. It refers to the speed after the client k is updated. These are the model parameters for the current client k. These are the model parameters updated by client k, w pbest w represents the local historical best model parameters of client k. gbest Let represent the global historical optimal model parameters, where γ is the inertia weight, c1 and c2 are learning factors, and rand1 and rand2 are two random numbers in the interval [0,1].

[0035] Step S3: Compress the model update parameters using a gradient compression method based on model weight divergence and update increment. Step S3 specifically includes:

[0036] When a client trains a model using a local dataset, the increasing depth and number of network parameters can easily lead to vanishing and exploding gradients, resulting in increasingly high communication costs. To reduce the communication overhead between the client and server, gradient pruning is used to compress the model parameters. In each round of federated learning training, the server compresses the model parameters based on the weight divergence d of the client's model. k (t) and update increment i k (t), to which a compression threshold ω is dynamically assigned.

[0037] In non-independent and identically distributed scenarios, as the number of training rounds increases, the differences in weight updates for each client become increasingly significant. This leads to a greater discrepancy between the final model aggregated by the server and the model trained in a centralized learning approach. The performance of the model trained locally on the client differs considerably from the aggregated global model. This deviation between the model parameters trained locally on the client and those aggregated on the server in federated learning is defined as weight divergence. A smaller weight divergence indicates that the model trained locally on the client is closer to the global model aggregated using the federated averaging algorithm. The weight divergence is updated as follows: Where w k(t) represents the local model parameters of client k in round t, w g (t-1) represents the global model parameters in the (t-1)th round, and ||·|| represents the L2 paradigm calculation.

[0038] In imbalanced data distribution, the accuracy of models trained on each client varies significantly. The initial aggregated global model performs poorly, requiring more frequent updates to achieve the performance of a model aggregated under balanced data distribution. Therefore, clients need larger update increments to adjust their model parameters and better adapt to changes in the dataset. Consequently, in federated learning, the update increment varies with the dataset distribution; that is, the update increment of a local model trained on a non-independent, identically distributed dataset will be much higher than the update increment of a model trained on an independent, identically distributed dataset. The update increment formula is: Where w k (t) represents the local model parameters of client k in round t, w k (t-1) represents the local model parameters of client k in round t-1.

[0039] Weight divergence d of the client model k (t) and update increment I k The smaller (t) is, the larger the assigned threshold ω is, to ensure the usability of compressed client model parameters with high degree of independence and identical distribution. Each client calculates its own gradient magnitude and compares it to the gradient compression threshold ω. If the gradient is greater than the compression threshold ω, all gradient values ​​are compressed according to the compression factor, thereby controlling the magnitude of the client gradient. The formula for calculating client gradient compression is:

[0040] Step S4: Upload the compressed model update parameters to the server for model aggregation to obtain a new global model, which will be used for the next round of federated learning iteration training until the conditions are met or the model converges.

[0041] The selected clients upload their corresponding local model parameters to the server. The server then aggregates the final selected client model parameters, weights them based on the dataset size used for training the uploaded models, and aggregates them to obtain new global model parameters. These global model parameters are used to update the global model, iteratively performing the next round of federated learning training until the model converges or meets the requirements. Figure 3 The diagram shown is a schematic representation of the training model in an embodiment of the present invention.

[0042] By employing the embodiments of the present invention, the following beneficial effects are achieved:

[0043] 1. This federated learning optimization scheme based on particle swarm optimization introduces particle swarm optimization into the federated learning training process. Before the client uses local data for training, the parameters of each client model are optimized based on the global optimum and individual historical optimum information to obtain a better neural network model, improve the training efficiency of federated learning, and optimize the federated learning communication process.

[0044] 2. This federated learning optimization scheme based on particle swarm optimization (PSO) improves the federated learning process, increasing model update speed. It utilizes PSO for optimization during federated learning training, obtaining the optimal solution through a random method, consistent with the training mechanism in federated learning. This makes it suitable for dynamic and heterogeneous federated learning environments. Before training with local data, each client's model parameters are simulated as particles. The model to be trained is optimized based on the globally optimal model parameters sent by the server and the individual client's historical optimal model parameters, improving model convergence speed and training effectiveness while reducing communication costs.

[0045] Device Examples

[0046] This invention provides a federated learning optimization device based on particle swarm optimization algorithm. Figure 2 This is a schematic diagram of a federated learning optimization device based on particle swarm optimization algorithm according to an embodiment of the present invention. Figure 2 As shown, the federated learning optimization device based on particle swarm optimization algorithm in this embodiment of the invention specifically includes:

[0047] Broadcast module 20 is used by the server to determine the target requirements of the global model according to the scenario, initialize the global model, and broadcast the global model to the clients participating in federated learning;

[0048] The parameter update module 22 is used to obtain the model update parameters after the client participating in federated learning receives the global model sent by the server and improves the global model using the particle swarm optimization algorithm.

[0049] The parameter compression module 24 is used to compress the model update parameters using a gradient compression method based on the model's weight divergence and update increment.

[0050] The global model training module 26 is used to upload the compressed model update parameters to the server for model aggregation to obtain a new global model, which is used for the next round of federated learning iteration training until the conditions are met or the model converges.

[0051] The parameter update module 22 is specifically used for:

[0052] S1: After the central server initializes the global model according to its own needs, it broadcasts the global model to the participating clients.

[0053] S2: Treat each client's model parameters as a separate particle, and based on the structure of the global model, randomly initialize the velocity vector for each client's model parameters. Local model parameters for each client As the position of particles in the particle swarm optimization algorithm, it is used for particle swarm optimization updates of the local model, and performs initialization and update operations on the model parameters of each layer of the client neural network model.

[0054] S3: Participating clients, based on their own model's particle velocity vector and position, compare them with the client's stored local model's historical best model parameters w. pbest The global model parameter w of broadcasting g and the global historical optimal model parameters w gbest Together, we perform a new round of model parameter particle velocity update calculations on the client side to obtain new client model particle velocity update parameters. This process is performed on the weight parameters of each layer of the neural network model;

[0055] S4: Update particle velocity parameters Model parameters of the client in this round The model parameters are calculated and updated by addition to obtain new client-side model parameters. This new model parameter This is equivalent to updating the particle's position; the client then uses local data to train the model parameters using stochastic gradient descent. The final update parameters are obtained.

[0056] During each round of federated learning, the local client saves the locally optimal model parameters w based on the fitness values ​​of the model parameters. pbest The server saves the globally optimal historical model parameters w based on the fitness value. gbest The fitness value is calculated from the training loss value of the model parameters. The lower the loss value, the higher the fitness value. In the process of continuous training and iteration of federated learning, the historical best model parameters are evaluated and updated.

[0057] The update formula for the optimized federated learning client based on particle swarm optimization is:

[0058] in The client-side k simulates the current velocity of the particle. It refers to the speed after the client k is updated. These are the model parameters for the current client k. These are the model parameters updated by client k, w pbestw represents the local historical best model parameters of client k. gbest Let represent the global historical optimal model parameters, where γ is the inertia weight, c1 and c2 are learning factors, and rand1 and rand2 are two random numbers in the interval [0,1].

[0059] The parameter compression module 24 is specifically used for:

[0060] When a client trains a model using a local dataset, the increasing depth and number of network parameters can easily lead to vanishing and exploding gradients, resulting in increasingly high communication costs. To reduce the communication overhead between the client and server, gradient pruning is used to compress the model parameters. In each round of federated learning training, the server compresses the model parameters based on the weight divergence d of the client's model. k (t) and update increment I k (t), to which a compression threshold ω is dynamically assigned.

[0061] In non-independent and identically distributed scenarios, as the number of training rounds increases, the differences in weight updates for each client become increasingly significant. This leads to a greater discrepancy between the final model aggregated by the server and the model trained in a centralized learning approach. The performance of the model trained locally on the client differs considerably from the aggregated global model. This deviation between the model parameters trained locally on the client and those aggregated on the server in federated learning is defined as weight divergence. A smaller weight divergence indicates that the model trained locally on the client is closer to the global model aggregated using the federated averaging algorithm. The weight divergence is updated as follows: Where w k (t) represents the local model parameters of client k in round t, w g (t-1) represents the global model parameters in the (t-1)th round, and ||·|| represents the L2 paradigm calculation.

[0062] In imbalanced data distribution, the accuracy of models trained on each client varies significantly. The initial aggregated global model performs poorly, requiring more frequent updates to achieve the performance of a model aggregated under balanced data distribution. Therefore, clients need larger update increments to adjust their model parameters and better adapt to changes in the dataset. Consequently, in federated learning, the update increment varies with the dataset distribution; that is, the update increment of a local model trained on a non-independent, identically distributed dataset will be much higher than the update increment of a model trained on an independent, identically distributed dataset. The update increment formula is: Where w k (t) represents the local model parameters of client k in round t, w k (t-1) represents the local model parameters of client k in round t-1.

[0063] Weight divergence d of the client model k (t) and update increment I k The smaller (t) is, the larger the assigned threshold ω is, to ensure the usability of compressed client model parameters with high degree of independence and identical distribution. Each client calculates its own gradient magnitude and compares it to the gradient compression threshold ω. If the gradient is greater than the compression threshold ω, all gradient values ​​are compressed according to the compression factor, thereby controlling the magnitude of the client gradient. The formula for calculating client gradient compression is:

[0064] S6: The client uploads the updated parameters to the server for model parameter aggregation to obtain a new global model, which is used for the next round of federated learning iteration training until the conditions are met or the model converges.

[0065] Global model training module 26 is specifically used for:

[0066] The compressed model update parameters are uploaded to the server. The server then aggregates the client model parameters participating in federated learning, assigns weights based on the dataset size used for training the clients participating in federated learning, and aggregates them to obtain new global model parameters. These global model parameters are used to update the global model, and the next round of federated learning training is iterated until the global model converges or meets the requirements.

[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A federated learning optimization method based on particle swarm optimization, characterized in that, include: S1. The server determines the target requirements of the global model based on the scenario, initializes the global model, and broadcasts the global model to the clients participating in federated learning. S2. After receiving the global model sent by the server, the client participating in federated learning uses the particle swarm optimization algorithm to improve the global model and obtain the model update parameters. S2 specifically includes: S21. Treat the model parameters owned by the client as a single particle, and based on the structure of the global model, randomly initialize the velocity vector for each model parameter owned by the client. Local model parameters of the client As the position of particles in the particle swarm optimization algorithm, it is used for particle swarm optimization updates of the local model, and performs initialization and update operations on the model parameters of each layer of the client neural network model. S22. Participating clients, based on their own model's particle velocity vector and particle position, compare these parameters with the historical best model parameters stored in their local model database. Global model parameters of broadcasting and global historical optimal model parameters Together, we perform a new round of model parameter particle velocity update calculations on the client side to obtain new client model particle velocity update parameters. Each layer of the neural network model performs the particle velocity update calculation process for the weight parameters of each layer. S23. Update the particle velocity parameters. Model parameters of the client in this round The model parameters are calculated and updated by addition to obtain new client-side model parameters. ,Will As the updated position of the particles, the client then uses local data to train the model parameters using stochastic gradient descent. This yields the final model update parameters; S3. A gradient compression method based on model weight divergence and update increment is used to compress the model update parameters. S3 specifically includes: The server uses the weight divergence of the client model. and update increment Dynamically allocate compression thresholds to it. ; The weight divergence is obtained using Formula 3. : Official 3; in, Indicates the client In the The local model parameters of the wheel, Indicates the first Global model parameters of the wheel, Indicates L2 normal form computation; Obtain the update increment using Formula 4. : Official 4; in, Indicates the client No. The local model parameters of the wheel; The client calculates its own gradient size and compares it with the compression threshold. Comparison: If the gradient is greater than the compression threshold Then all gradient values ​​will be compressed according to the compression factor using Formula 5; Official 5; S4. Upload the compressed model update parameters to the server for model aggregation to obtain a new global model, which will be used for the next round of federated learning iteration training until the conditions are met or the model converges.

2. The method according to claim 1, characterized in that, The particle velocity update parameters and new client model parameters Obtain it using formulas 1 and 2: Formula 1; Official 2; in, It is a client Simulate the current velocity of the particle. It is a client The updated speed Is the current client Model parameters, It is a client Updated model parameters, Indicates the client The local historical optimal model parameters, Represents the global historical optimal model parameters, where It is inertia weight. and It is a learning factor. and These are two random numbers within the interval [0,1].

3. The method according to claim 1, characterized in that... S4 specifically includes: The compressed model update parameters are uploaded to the server. The server then aggregates the client model parameters participating in federated learning, assigns weights based on the dataset size used for training the clients participating in federated learning, and aggregates them to obtain new global model parameters. These global model parameters are used to update the global model, and the next round of federated learning training is iterated until the global model converges or meets the requirements.

4. An apparatus based on the federated learning optimization method based on particle swarm optimization algorithm as described in any one of claims 1-3, characterized in that, include: The broadcast module is used by the server to determine the target requirements of the global model based on the scenario, initialize the global model, and broadcast the global model to the clients participating in federated learning. The parameter update module is used to obtain model update parameters by improving the global model after the client participating in federated learning receives the global model sent by the server using the particle swarm optimization algorithm. The parameter compression module is used to compress the model update parameters using a gradient compression method based on the model's weight divergence and update increment. The global model training module is used to upload the compressed model update parameters to the server for model aggregation to obtain a new global model, which is used for the next round of federated learning iteration training until the conditions are met or the model converges.

5. The apparatus according to claim 4, characterized in that, The parameter update module is specifically used for: Treating the model parameters owned by each client as individual particles, and based on the structure of the global model, a velocity vector is randomly initialized for each client's model parameters. Local model parameters of the client As the position of particles in the particle swarm optimization algorithm, it is used for particle swarm optimization updates of the local model, and performs initialization and update operations on the model parameters of each layer of the client neural network model. Participating clients use their own model's particle velocity vector and particle position, along with the historical best model parameters stored locally, to determine the optimal model parameters. Global model parameters of broadcasting and global historical optimal model parameters Together, we perform a new round of model parameter particle velocity update calculations on the client side to obtain new client model particle velocity update parameters. This process is performed on the weight parameters of each layer of the neural network model; Update the particle velocity parameters Model parameters of the client in this round The model parameters are calculated and updated by addition to obtain new client-side model parameters. ,Will As the updated position of the particles, the client then uses local data to train the model parameters using stochastic gradient descent. This yields the final model update parameters.

6. The apparatus according to claim 4, characterized in that, The particle velocity update parameter in the parameter update module and client model parameters Obtain it using formulas 1 and 2: Official 1; Official 2; in, It is a client Simulate the current velocity of the particle. It is a client The updated speed Is the current client Model parameters, It is a client Updated model parameters, Indicates the client The local historical optimal model parameters, Represents the global historical optimal model parameters, where It is inertia weight. and It is a learning factor. and These are two random numbers within the interval [0,1].

7. The apparatus according to claim 4, characterized in that, The parameter compression module is specifically used for: The server uses the weight divergence of the client model. and update increment Dynamically allocate compression thresholds to it. ; The weight divergence is obtained using Formula 3. : Official 3; in, Indicates the client In the The local model parameters of the wheel, Indicates the first Global model parameters of the wheel, Indicates L2 normal form computation; Obtain the update increment using Formula 4. : Official 4; in, Indicates the client No. The local model parameters of the wheel; The client calculates its own gradient size and compares it with the compression threshold. Comparison: If the gradient is greater than the compression threshold Then all gradient values ​​will be compressed according to the compression factor using Formula 5; Official 5.

8. The apparatus according to claim 4, characterized in that, The global model training module is specifically used for: The compressed model update parameters are uploaded to the server. The server then aggregates the client model parameters participating in federated learning, assigns weights based on the dataset size used for training the clients participating in federated learning, and aggregates them to obtain new global model parameters. These global model parameters are used to update the global model, and the next round of federated learning training is iterated until the global model converges or meets the requirements.

Citation Information

Patent Citations

  • Federal learning client scheduling method based on weight divergence and update increment

    CN115454608A

  • Federal learning method based on client selection and gradient compression

    CN115796271A