Federal learning communication method based on adaptive-random client selection and dynamic regularization

By employing an adaptive-random client selection and dynamic regularization federated learning approach, the problem of low communication resource utilization in existing technologies is addressed, resulting in more efficient model convergence and improved accuracy. This approach is suitable for collaborative training of IoT edge devices, collaborative medical data privacy protection, and optimization of financial risk control models.

CN121859993APending Publication Date: 2026-04-14XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing federated learning methods fail to adaptively adjust the client participation mechanism based on the differences in global model convergence contributions, resulting in low efficiency in communication resource utilization. Furthermore, the regularization intensity does not differentiate between client data holding differences, affecting the convergence efficiency of the global model.

Method used

We employ an adaptive-random client selection and dynamic regularization federated learning approach. By adaptively selecting active clients and adjusting the regularization strength based on client weights, we combine adaptive and random selection methods to balance communication resource utilization and model convergence speed at different stages.

Benefits of technology

It improves the communication efficiency and model convergence accuracy of federated learning, reduces the number of communication rounds required to reach the target accuracy, and enhances resource utilization and model stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121859993A_ABST
    Figure CN121859993A_ABST
Patent Text Reader

Abstract

The invention provides a federated learning communication method based on adaptive-random client selection and dynamic regularization. The method comprises the following implementation steps: a central server initializes federated learning communication parameters and sends the parameters; the central server adaptively and randomly selects an active client; the active client performs iterative training on the local model; and the central server obtains a federal learning result. According to the method, the active clients are selected by adopting a self-adaptive and random combined method, so that communication resources are prevented from being frequently consumed on the clients with relatively small data contribution at the initial stage of communication; after training enters a stable stage, active clients are randomly selected based on a fixed activation probability, so that overfitting is prevented, convergence speed and generalization ability are balanced more efficiently, coefficients of dynamic regularization items in loss values of a global model are calculated through weights of the active clients, and the robustness of the overall model is improved. Different clients are subjected to dynamic constraints of different degrees when executing local optimization, so that the convergence precision is improved while the training stability and robustness are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of distributed machine learning technology and relates to a federated learning method. Specifically, it relates to a federated learning communication method based on adaptive-random client selection and dynamic regularization, which can be used for collaborative training of IoT edge devices, medical data privacy collaboration, financial risk control model optimization, and other application scenarios with distributed data storage and privacy sensitivity. Background Technology

[0002] Federated learning is a distributed machine learning framework that allows multiple participants to collaboratively train a global model without sharing the original data, thus ensuring data privacy and security to a certain extent. In a federated learning system, multiple clients train their models on their respective local datasets and upload the updated local model parameters to a central server for aggregation, ultimately obtaining the global model. However, in real-world deployments, the data distribution held by different clients varies significantly, and the direction of local model updates often deviates from the globally optimal direction, affecting the convergence rate and accuracy of the global model in federated learning. Furthermore, most clients are typically limited by bandwidth, computing power, and energy consumption; large-scale parameter transmission can easily cause communication congestion and reduced training efficiency. Therefore, improving communication efficiency while ensuring model performance has become a critical issue that urgently needs to be addressed in the field of federated learning.

[0003] To balance communication efficiency and model performance in federated learning, for example, Durmus Alp Emre Acar et al., in their 2021 ICLR paper "Federated Learning Based on Dynamic Regularization," proposed a federated learning method called FedDyn based on dynamic regularization. In each communication round, the central server randomly selects a subset of clients to participate in training and distributes the current global model to these clients. During local training, each client constrains its local model update direction by introducing a regularization term dynamically updated based on historical communication processes into its local empirical loss function. This ensures that when the models finally reach consensus, the consistent solution aligns with the stationary point of the global empirical loss. Subsequently, the clients upload their updated local model parameters to the central server, which aggregates the client models and generates a new global model, continuing until the preset number of communication rounds is reached to end training. Through this dynamic regularization mechanism, FedDyn addresses the slow convergence and inefficient communication issues caused by the inconsistency between local and global optima in scenarios with heterogeneous data and partial participation, significantly reducing the number of communication rounds required to achieve the target accuracy and improving the communication efficiency of federated learning. However, this method primarily relies on random sampling for client participation, failing to adaptively adjust for differences in the contributions of different clients to the global model convergence across communication rounds. Therefore, there is still room for improvement in communication resource utilization efficiency. Furthermore, its regularization strength is controlled by a globally uniform weight coefficient, without differentiating based on the data holding differences among clients. This may result in insufficient or excessive constraints on local model updates for some clients, thereby affecting the convergence efficiency of the global model. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the existing technology and propose an adaptive-random client selection and dynamic regularization federated learning communication method to solve the technical problems of low communication efficiency and resource utilization in the existing technology.

[0005] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:

[0006] (1) The central server initializes the federated learning communication parameters and sends them:

[0007] The central server initializes communication rounds as follows: The maximum number of communication rounds is The client selects the critical communication round as The number of clients is , No. The number of samples, sample size weights, and auxiliary vectors for each client are respectively: , and The activation probability is The global model is and will , and Send to each client, making ,in, , ;

[0008] (2) Central server adaptive selection - random selection of active clients:

[0009] when At that time, through the first Weight of each client Calculate the activation probability under adaptive selection. Otherwise, the activation probability will be... As the activation probability of each client under random selection, let And will be combined with random numbers satisfy of The client is designated as the active client; then the client is designated as the active client; Global model parameters of round communication Send to each active client;

[0010] (3) Active clients iteratively train the local model:

[0011] Each active client sends a global model to the central server. Iteratively train it as a local model, and use the trained local model parameters from this communication. Uploaded to the central server, during the training process The coefficient of the dynamic regularization term in the loss value is determined by the weights of active clients. Calculated;

[0012] (4) The central server retrieves the federated learning results:

[0013] Central server The local model parameters uploaded by each active client are federated and aggregated to obtain the aggregation result of this round of communication. and judge If true, obtain the trained global model parameters. Otherwise, through the global model parameters issued in this round and the parameters of the trained local model right Update to obtain ,make And perform step (2).

[0014] Compared with the prior art, the present invention has the following advantages:

[0015] 1. The central server of this invention selects active clients based on critical communication rounds and using a combination of adaptive and random methods. In the early stage of communication, clients with larger sample sizes are selected to participate in training by making the activation probability positively correlated with the sample size weight, thus avoiding frequent consumption of communication resources on clients with smaller data contributions. After the training enters a stable stage, active clients are randomly selected based on a fixed activation probability to prevent overfitting and more efficiently balance convergence speed and generalization ability.

[0016] 2. In the process of iterative training of the local model by the active client in this invention, the coefficient of the dynamic regularization term in the loss value of the global model is calculated through the weights of the active client, so that different clients are subject to different degrees of dynamic constraints when performing local optimization: the regularization coefficient of the client with a small sample size is larger, so as to avoid the local model from deviating from the global target by strengthening the regularization constraint; the regularization coefficient of the client with a large sample size is reduced, so as to preserve the feature complementarity of local data, ensure training stability and robustness, and improve convergence accuracy. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the implementation of the present invention.

[0018] Figure 2 This is a graph showing the relationship between the classification accuracy of the present invention and existing technologies on the CIFAR-10 dataset, with 100 clients and independent, identically distributed scenarios, and the number of communication rounds.

[0019] Figure 3 This is a graph showing the relationship between the classification accuracy of the present invention and existing technologies on the CIFAR-10 dataset, with 500 clients and independent, identically distributed scenarios, and the number of communication rounds.

[0020] Figure 4 This is a graph showing the relationship between the classification accuracy and communication rounds of the present invention and existing technologies in the CIFAR-10 dataset, with 500 clients and a Dirichlet heterogeneous scenario.

[0021] Figure 5 This is a graph showing the relationship between the classification accuracy and communication rounds of the present invention and existing technologies in the CIFAR-100 dataset, with 100 clients and a Dirichlet heterogeneous scenario. Detailed Implementation

[0022] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0023] Step 1) The central server initializes the federated learning communication parameters and sends them:

[0024] The central server initializes communication rounds as follows: The maximum number of communication rounds is The client selects the critical communication round as The number of clients is , No. The number of samples, sample size weights, and auxiliary vectors for each client are respectively: , and The activation probability is The global model is and will , and Send to each client, making ,in, , ;

[0025] In this embodiment, , , The global model employs a convolutional neural network model comprising a cascaded feature extraction module, a feature dimension transformation module, and a classification module. The feature extraction module consists of two stacked feature extraction units, each composed of a convolutional layer, a ReLU activation function layer, and a max-pooling layer connected sequentially. The feature dimension transformation module includes a flattening operator. The classification module comprises three stacked fully connected layers, with two ReLU activation functions applied between adjacent fully connected layers. Sample size weights for each client The calculation formula is as follows:

[0026] ;

[0027] in, This indicates a summation operation.

[0028] Step 2) Central server adaptive selection - randomly selects active clients:

[0029] when At that time, through the first Weight of each client Calculate the activation probability under adaptive selection. Otherwise, the activation probability will be... As the activation probability of each client under random selection, let And will be combined with random numbers satisfy of The client is designated as the active client; then the client is designated as the active client; Global model parameters of round communication Send to each active client;

[0030] This embodiment uses critical communication rounds. The global model is divided into two phases: the first 100 rounds of communication constitute the initial phase, where the central server adaptively selects active clients by adjusting the activation probability of each client. Weight with the client A positive correlation is established, resulting in clients with larger sample sizes receiving higher activation probabilities, thus fully utilizing client sample resources. The period from 100 rounds until the end of training is the later stage, where the central server randomly selects active clients, with each client having an equal activation probability. To avoid overfitting due to a single training sample, the central server generates a range of training samples for each client. Random numbers that follow a uniform distribution The random numbers corresponding to each client With activation probability In comparison, satisfying The active client is the one selected in the current round. If no active client is selected in the current round, a new random number is generated and the selection process continues until at least one active client is selected. When using adaptive selection, the first active client is selected in the next round. Activation probability of each client The calculation formula is:

[0031] .

[0032] Step 3) Active clients iteratively train the local model:

[0033] Each active client sends a global model to the central server. Iteratively train it as a local model, and use the trained local model parameters from this communication. Uploaded to the central server, during the training process The coefficient of the dynamic regularization term in the loss value is determined by the weights of active clients. Calculated;

[0034] (3a) Initialize the number of iterations to be The maximum number of iterations is , No. Second iteration local model The local parameters are The dataset used for iterative training on the client side is either CIFAR-10 or CIFAR-100. Both datasets contain 60,000 32×32 pixel RGB color images. The number of target categories in the CIFAR-10 dataset is... The CIFAR-100 dataset covers ten categories, including airplanes, cars, and birds. Each category contains 5000 training images and 1000 test images. The number of target categories in the CIFAR-100 dataset is [number missing]. The dataset is divided into several categories, including animals, vehicles, natural objects, and artifacts. Each category contains 500 training images and 100 test images. There are two dataset partitioning rules: First, it is partitioned to each client according to the independent and identically distributed (IOD) rule. Each client's dataset typically contains all or most of the target categories, and the proportion of each category in the client's data is generally consistent with the overall dataset's category distribution, but the number of samples held by each client differs. Second, it is partitioned according to the concentration parameter vector... The Dirichlet distribution rules were used to partition the datasets, and the local datasets obtained by different clients showed significant differences in both class distribution and number of classes. Specifically, the Dirichlet distribution rules were used to partition the datasets. The training sample set for each active client includes Target categories The first RGB image and the second Image category labels and order ;

[0035] (3b) Each active client uses the training sample set as its local model. The input will be the first The training images are used as input to the feature extraction module for feature extraction. Each feature extraction unit's convolutional layer extracts local features through convolution operations. A ReLU activation function layer performs a non-linear transformation on the feature map, and a pooling layer downsamples the feature map to obtain the first... The output of each training image is a 64×5×5 feature map. The feature dimension transformation module flattens the multi-channel, multi-dimensional feature map to form a one-dimensional feature vector of length 1600. Each fully connected layer of the classification module linearly maps the input one-dimensional feature vector to a 384-dimensional output. The ReLU activation function layer loaded between adjacent fully connected layers performs a non-linear transformation on the intermediate features, finally yielding a one-dimensional vector of length 10, which is the first training image. The training images correspond to the classification scoring vectors of each category. ;

[0036] (3c) The cross-entropy loss function is used, and the classification score vector of each image is used. Calculate the empirical loss value of the local model ; through auxiliary vectors Current local model parameters and global model parameters issued by the central server Calculate the dynamic regularization term The value; through Calculate the L2 regularization term The value; then the stochastic gradient descent method is used, and through... , and The calculated loss value of the local model For local model parameters Update the model to obtain the local model parameters for this iteration. Loss value of the local model The calculation formula and The update formulas are as follows:

[0037] ;

[0038] ;

[0039] ;

[0040] ;

[0041] ;

[0042] ;

[0043] in, Indicates the weighting coefficient. It is the weight decay parameter. This represents the summation operation. Indicates an indicator function, Represents the natural logarithm function. Indicates the first The image belongs to the first The original score of the class, Indicates the first Image in its true category The corresponding original score, This indicates the inner product operation. This indicates the L2 norm operation. It is the basic dynamic regularization coefficient.

[0044] (3d) judgment Is it true? If so, obtain the first... The first client Local model parameters trained subglobally Otherwise, let Then proceed with step (3b).

[0045] Step 4) The central server retrieves the federated learning results:

[0046] Central server The local model parameters uploaded by each active client are federated and aggregated to obtain the aggregation result of this round of communication. and judge If true, obtain the trained global model parameters. Otherwise, the global model parameters issued at the start of this round of communication will be used. Number and trained local model parameters right Update to obtain ,make Perform step (2) to The update formula and the formula for federated aggregation are as follows:

[0047] ;

[0048] .

[0049] in, Indicates the first Round communication Local model parameters for each client Relative to global model parameters Auxiliary variables formed by the accumulation of offsets The updated results.

[0050] The technical effects of the present invention will be further explained below with reference to simulation results:

[0051] 1. Experimental conditions and contents:

[0052] The simulation experiment was conducted in a Linux operating system environment using the Visual Studio Code v1.98.2 integrated development environment. The experimental program was implemented using the Python 3.7 programming language and the PyTorch 1.5.0 deep learning framework.

[0053] Experiment 1 compares the number of communication rounds required for the present invention and existing technologies to achieve the same classification accuracy. The results are shown in Table 1. The classification accuracy is defined as:

[0054] ,

[0055] ;

[0056] in, The total number of test samples, For the first Number of test samples per client, This is represented as an indicator function; it takes a value of 1 if the condition is true and a value of 0 if the condition is false. This indicates the operation of retrieving the maximum value index.

[0057] Experiment 2: The present invention and existing technologies are compared in a preset number of communication rounds. By comparing the classification accuracy with the number of communication rounds, the performance of both methods under different data distribution conditions and client scales is obtained, as shown in the figure. Figure 2 , Figure 3 , Figure 4 , Figure 5 As shown.

[0058] 2. Analysis of experimental results:

[0059] The results of Experiment 1 are shown in Table 1:

[0060] Table 1. Comparison of the performance of the present invention with existing technologies.

[0061]

[0062] Where Divice represents the number of clients, Dataset represents the dataset, FedDynS represents the federated learning communication method used in this invention, FedDyn represents the prior art, IID represents the independent and identically distributed partitioning rule, and Dirichlet(0.3) represents the Dirichlet distribution partitioning rule.

[0063] As shown in Table 1, compared with the prior art, in independent and heterogeneous scenarios with different client scales, the present invention can achieve the same classification accuracy as the prior art in fewer communication rounds and has a faster convergence speed under the same communication conditions.

[0064] The results of Experiment 2 are as follows Figure 2 , Figure 3 , Figure 4 , Figure 5 As shown.

[0065] Depend on Figure 2 , Figure 3 , Figure 4 As can be seen, the FedDynS method of this invention improves accuracy faster than the existing FedDyn technology in the early stages of communication, achieves high test accuracy in fewer communication rounds, and maintains stable convergence in the later stages of training; Figure 5 It is evident that FedDynS outperforms FedDyn for almost the entire training process, with faster convergence and significantly higher final test accuracy.

[0066] The results show that the present invention, through adaptive-random client selection and regularization of weight coefficients based on client sample weights, enables training to make fuller use of the data advantages of high-contribution clients in the early stages, thereby accelerating model convergence and improving communication efficiency and accuracy.

Claims

1. A federated learning communication method based on adaptive-random client selection and dynamic regularization, characterized in that, Includes the following steps: (1) The central server initializes the federated learning communication parameters and sends them: The central server initializes communication rounds as follows: The maximum number of communication rounds is The client selects the critical communication round as The number of clients is , No. The number of samples, sample size weights, and auxiliary vectors for each client are respectively: , and The activation probability is The global model is and will , and Send to each client, making ,in, , ; (2) Central server adaptive selection - random selection of active clients: when At that time, through the first Weight of each client Calculate the activation probability under adaptive selection. Otherwise, the activation probability will be... As the activation probability of each client under random selection, let And will be combined with random numbers satisfy of The client is designated as the active client; then the client is designated as the active client; Global model parameters of round communication Send to each active client; (3) Active clients iteratively train the local model: Each active client sends a global model to the central server. Iteratively train it as a local model, and use the trained local model parameters from this communication. Uploaded to the central server, during the training process The coefficient of the dynamic regularization term in the loss value is determined by the sample size weights of active clients. Calculated; (4) The central server retrieves the federated learning results: Central server The local model parameters uploaded by each active client are federated and aggregated to obtain the aggregation result of this round of communication. and judge If true, obtain the trained global model parameters. Otherwise, the global model parameters issued at the start of this round of communication will be used. Number and trained local model parameters right Update to obtain ,make Execute step (2).

2. The method according to claim 1, characterized in that, The first step described in step (1) Sample size weights for each client The calculation formula is: ; in, This indicates a summation operation.

3. The method according to claim 1, characterized in that, The global model described in step (1) adopts a convolutional neural network model that includes a cascaded feature extraction module, a feature dimension transformation module, and a classification module. The feature extraction module includes multiple stacked feature extraction units, each of which is composed of a convolutional layer, a ReLU activation function layer, and a max pooling layer connected in sequence. The feature dimension transformation module includes a flattening operator. The classification module includes multiple stacked fully connected layers and a ReLU activation function loaded between adjacent fully connected layers.

4. The method according to claim 3, characterized in that, The adaptive selection of the next step described in step (2) Activation probability of each client The calculation formula is: 。 5. The method according to claim 4, characterized in that, The active client described in step (3) iteratively trains the local model, and the steps are as follows: (3a) Initialize the number of iterations to be The maximum number of iterations is , No. Second iteration local model The local parameters are , No. The training sample set for each client includes Target categories The first RGB image and the second Image category labels and order ; (3b) Each active client uses the training sample set as its local model. The input is used to extract features from each training sample step by step. The feature dimension transformation module transforms the extracted first dimension. The feature maps of the first image undergo dimensionality rearrangement; the classification module classifies the one-dimensional feature vectors obtained from the dimensionality rearrangement to obtain the first... Classification scoring vectors of images ; (3c) The cross-entropy loss function is used, and the classification score vector of each image is used. Calculate the empirical loss value of the local model ; through auxiliary vectors Current local model parameters and global model parameters issued by the central server Calculate the dynamic regularization term The value; through Calculate the L2 regularization term The value; then the stochastic gradient descent method is used, and through... , and The calculated loss value of the local model For local model parameters Update the model to obtain the local model parameters for this iteration. ; (3d) judgment Is it true? If so, obtain the first... The first client Local model parameters trained subglobally Otherwise, let Then proceed with step (3b).

6. The method according to claim 5, characterized in that, The feature extraction module described in step (3b) extracts features for each training sample. The steps are as follows: The convolutional layer in the feature extraction unit performs convolution operations on each training sample, the ReLU activation function layer performs non-linear activation processing on the feature map obtained from the convolution operation, and the max pooling layer performs downsampling processing on the feature map after non-linear activation processing to obtain the first... Feature map of the image.

7. The method according to claim 5, characterized in that, The classification module described in step (3b) classifies the one-dimensional feature vector obtained by dimensional rearrangement. The implementation steps are as follows: Multiple fully connected layers perform linear mapping operations on the one-dimensional feature vector obtained after dimension rearrangement. ReLU activation function layers between adjacent fully connected layers perform non-linear activation processing on the intermediate features output by the fully connected layers. The final fully connected layer maps the non-linearly transformed intermediate features to the category space, outputting the first... The classification scoring vector corresponding to each image .

8. The method according to claim 5, characterized in that, The loss value of the local model described in step (3c) The calculation formula is: ; ; ; ; ; in, Indicates the weighting coefficient. It is the weight decay parameter. This represents the summation operation. Indicates an indicator function, Represents the natural logarithm function. Indicates the first The image belongs to the first The original score of the class, Indicates the first Image in its true category The corresponding original score, This indicates the inner product operation. This indicates the L2 norm operation. It is the basic dynamic regularization coefficient.

9. The method according to claim 5, characterized in that, The step (3c) described above The update is performed using the following formula: ; in, It's the learning rate. For gradient operators, It is the loss value Regarding local parameters The gradient.

10. The method according to claim 1, characterized in that, The step (4) described above The update formula and the formula for federated aggregation are as follows: ; ; in, Indicates the first Round communication Local model parameters for each client Relative to global model parameters The auxiliary vector formed by the accumulation of offsets The updated results.