A distributed compressed random aggregation method for robust federated learning under Byzantine attacks

By introducing penalties and compression operators into federated learning algorithms, DCR-SGDA algorithm is proposed, which solves the shortcomings of the existing technology in Byzantine attacks and resource consumption, and achieves higher robustness and efficiency.

CN119129776BActive Publication Date: 2025-04-18ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411269775.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-04-18
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

In the face of Byzantine attacks and complex dynamic network environments, existing federated learning algorithms may be affected and their communication and computing resources are consumed more.

Method used

A distributed compression random aggregation method (DCR-SGDA) for Byzantine attacks is proposed to enhance robustness by introducing penalties and reduce the consumption of communication and computing resources by using compression operators.

Benefits of technology

This algorithm shows better robustness and convergence performance in the face of Byzantine attacks, reducing the consumption of communication and computing resources, and improving the universality and efficiency of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129776B_ABST
    Figure CN119129776B_ABST
Patent Text Reader

Abstract

The present invention discloses a distributed compression random aggregation method for robust federated learning under Byzantine attacks. Aiming at the potential vulnerabilities after Byzantine attacks faced on large-scale distributed clusters, and the impact of multi-agent information communication on communication bandwidth and computing resources, an algorithm for resisting attacks and reducing communication losses is proposed to achieve system robustness and stability, efficient communication and client privacy security. This algorithm combines the loss function with the penalty term to maintain elasticity against Byzantine attacks; introduces parameter compression operators to reduce communication costs; quantizes weights and feature dimensionality reduction to reduce data dimensions or size and accelerate algorithm convergence; uploads and sends parameters through lossy compression to achieve data encryption and ensure privacy and security. It has the advantages of strong anti-interference ability, low communication cost, and high privacy security, and can be widely used in multiple fields, especially in application systems with high data privacy requirements and limited communication resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distributed optimization, and in particular relates to a distributed compressed random aggregation method for robust federated learning under Byzantine attacks. Background Art

[0002] In recent years, the rapid development of artificial intelligence computing and its remarkable achievements in various fields are gradually becoming the key driving force leading mankind into the intelligent era. As one of the core technologies of artificial intelligence, machine learning focuses on extracting patterns and laws from data through computer systems, enabling computers to automatically perform specific tasks. The advancement of machine learning technology has made artificial intelligence applications more intelligent, adaptive and automated.

[0003] With the continuous advancement of technology and the expansion of application scenarios, federated learning, as an important branch of distributed optimization, has gradually developed into a vibrant research field. It protects user privacy while realizing collaborative machine learning by sharing model parameters among multiple nodes without sharing original data. Compared with traditional centralized algorithms, federated learning has stronger fault tolerance and privacy protection advantages. Since it can train models without leaving the local data, federated learning technology has important application prospects in fields with high requirements for data security and privacy, such as the Internet of Things, smart manufacturing, and financial technology.

[0004] Federated learning originally evolved from traditional centralized optimization algorithms. Unlike traditional centralized distributed learning, traditional centralized optimization algorithms perform well when solving simple problems, but are often inefficient or difficult to apply when facing complex, high-dimensional or large-scale problems. In federated learning, data is stored on local devices, each agent is trained on local data, and the updated model parameters are uploaded to the server for aggregation. Federated learning effectively solves privacy issues related to user data. With the rise of distributed optimization, federated learning has gradually become a research focus. Federated learning algorithms such as FedAvg, GeoMed, Krum, and RSA have achieved remarkable results in privacy issues related to user data security.

[0005] In the past decade, with the increasing demand for user data privacy protection, federated learning has gradually become an important research direction for solving data security issues. Although federated learning can effectively protect data privacy, its distributed nature makes the algorithm vulnerable to network structure and communication bandwidth limitations in practical applications. Existing algorithms have achieved some results in improving system robustness and resisting Byzantine attacks, such as the GeoMed algorithm and the Krum algorithm, but when dealing with complex and dynamically changing network environments, convergence and effectiveness may be affected.

[0006] As the scale of multi-agent systems expands and data complexity increases, although federated learning has made significant progress in protecting user data privacy, further research is still needed to consider how to develop more efficient and robust distributed algorithms under the conditions of multi-agent information communication to cope with Byzantine attacks and reduce the consumption of communication and computing resources. Summary of the invention

[0007] In view of the shortcomings of the above-mentioned prior art, the present invention proposes a distributed compression random aggregation method for robust federated learning under Byzantine attacks. By introducing a penalty term, the algorithm enhances the robustness of the federated learning algorithm in dealing with Byzantine attacks. At the same time, by introducing a compression operator, the consumption of communication and computing resources is effectively reduced, thereby improving the versatility and efficiency of the algorithm in practical applications.

[0008] In order to achieve the above technical objectives, the present invention provides the following technical solutions:

[0009] A distributed compressed random aggregation method for robust federated learning under Byzantine attacks specifically includes the following steps:

[0010] S1. Initialize the parameters of the distributed compression random aggregation algorithm DCR-SGDA and import the data set to be distributed for preprocessing; set the global objective function and the local objective function;

[0011] S2, the server broadcasts its parameters to all nodes, and iterates the parameters multiple times;

[0012] S3. For the kth iteration, the server receives node parameters from each node And calculate the stochastic gradient value of the server The node parameters Include parameters from normal nodes and parameters from the Byzantine nodes

[0013] S4, according to the random gradient value of the server in step S3 Compress it according to the compression operator definition to get the gradient value after server compression

[0014] S5, based on the server-compressed gradient Update the server parameters for the next iteration and broadcast the updated server parameters to all nodes;

[0015] S6. For the kth iteration, each node sets its node parameters Sent to the server, receiving the server parameters for the kth iteration Calculate the stochastic gradient value of each node And also compress to get the compressed gradient value of each node

[0016] S7, random gradient based on compression of each node Perform the next iteration update on each node parameter, and then upload the updated node parameters to the server.

[0017] S8. Repeat the iteration until the algorithm converges, the global objective function is minimized, and the optimal parameters are obtained.

[0018] Furthermore, in step S1, the global objective function and the local objective function are set as follows:

[0019] Global objective function:

[0020] Local objective function:

[0021] Among them, ω is the set of all node parameters in the entire distributed system, and each node i has its own node parameter ω i ξ i is the local data sample of node i; represents the d-dimensional real vector space, that is, the set of all vectors consisting of d real numbers; is the local data distribution of node i, each node i uses Update your own node parameters ω i ; To calculate the expectation, F(ω i ,ξ i ) represents the local data sample ξ i The loss function calculated above calculates the expectation Used to evaluate node parameters ω i In the local data sample ξ i The average loss on λ||ω i -ω0||1 is the regularization term; ω0 is the server parameter.

[0022] Furthermore, in step S3, the calculation formula of the stochastic gradient value of the server is:

[0023]

[0024] in, is the gradient, is the server parameter at the kth iteration, λ is the regularization parameter, and Γ is calculated using the sign function sign, and its formula is expressed as:

[0025]

[0026] in, is the set of all normal nodes participating in federated learning training. It represents the set of Byzantine nodes that are attacked by Byzantine and participate in the federated learning training.

[0027] Furthermore, the calculation formula of the gradient value after server compression in step S4 is:

[0028]

[0029] in, is a compression operator.

[0030] Furthermore, step S5 is specifically as follows:

[0031] The formula for updating server parameters is as follows:

[0032]

[0033] in, represents the server parameters for the k+1th iteration, α k+1 is the step length;

[0034] Updated k+1 iteration server parameters Broadcast to each node for the k+1th iteration of the overall model.

[0035] Furthermore, step S6 is specifically as follows:

[0036] The calculation formula of the stochastic gradient value of each node is:

[0037]

[0038] in, is the local gradient; is a local data sample, sampled from the data set; is the parameter for local update, λ is the regularization parameter;

[0039] The calculation formula for the gradient value of each node after compression is:

[0040]

[0041] in, is the compression operator.

[0042] Further, step S7 is specifically as follows:

[0043] The formula for updating the parameters of each node is:

[0044]

[0045] in, represents the node parameters of the k+1th iteration of the node, α k+1 is the step length;

[0046] The updated parameters of each node in the k+1th iteration are uploaded to the server and used in the k+1th iteration of the overall model.

[0047] Based on the above technical solution, the algorithm proposed in the present invention has the following beneficial effects:

[0048] (1) By introducing the penalty term, the robustness of the federated learning algorithm in dealing with Byzantine attacks is enhanced. Compared with the existing federated learning algorithms such as GeoMed, Krum, Median, and RSA, this algorithm shows better performance. Under the strong convexity condition, this algorithm can converge to the global optimal solution faster and ensure a smaller error bound; under the Lipschitz continuity condition and bounded variance, this algorithm has better stability and convergence accuracy.

[0049] (2) By introducing the compression operator, the parameter information of the server and client are lossily compressed respectively, which effectively reduces the consumption of communication and computing resources.

[0050] (3) In this algorithm, the parameters uploaded by each node and sent by the server are lossily compressed, which achieves data encryption to a certain extent and ensures user privacy and security.

[0051] In summary, compared with traditional algorithms, the algorithm proposed in the present invention has the advantages of strong anti-interference ability (especially against Byzantine attacks), low communication cost, and high privacy security. It is more suitable for multiple fields, especially application systems with high data privacy requirements and limited communication resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flow chart of the DCR-SGDA algorithm of the present invention.

[0053] Figure 2 The DCR-SGDA algorithm framework of the present invention

[0054] Figure 3 This is a comparison chart of the training loss value results of the DCR-SGDA algorithm of the present invention and the other four known algorithms on the same data set when the number of Byzantine nodes accounts for 40%.

[0055] Figure 4 This is a comparison chart of the training loss value results of the DCR-SGDA algorithm of the present invention and the other four known algorithms on the same data set when the number of known Byzantine nodes accounts for 50%.

[0056] Figure 5 This is a comparison chart of the training loss value results of the DCR-SGDA algorithm of the present invention and the other four known algorithms on the same data set when the number of Byzantine nodes accounts for 60%.

[0057] Figure 6 This is a comparison chart of the training loss value results of the DCR-SGDA algorithm of the present invention and the other four known algorithms on the same data set when the number of Byzantine nodes accounts for 70%. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0059] Although the steps in the present invention are arranged with numbers, they are not used to limit the order of the steps. Unless the order of the steps is clearly stated or the execution of a certain step requires other steps as a basis, the relative order of the steps can be adjusted. It is understood that the term "and / or" used in this article involves and covers any and all possible combinations of one or more of the associated listed items.

[0060] Please refer to Figure 1 , showing a distributed compressed random aggregation method for robust federated learning under Byzantine attacks proposed by the present invention, which specifically includes the following steps:

[0061] S1. Initialize the parameters of the distributed compression random aggregation algorithm DCR-SGDA and import the data set to be distributed for preprocessing; set the global objective function and the local objective function;

[0062] As a preferred implementation of step S1, the global objective function and the local objective function are specifically set as follows:

[0063] Global objective function:

[0064] Local objective function:

[0065] Among them, ω is the set of all node parameters in the entire distributed system, and each node i has its own node parameter ω i ξ i is the local data sample of node i; represents the d-dimensional real vector space, that is, the set of all vectors consisting of d real numbers; is the local data distribution of node i, each node i uses Update your own node parameters ωi ; To calculate the expectation, F(ω i ,ξ i ) represents the local data sample ξ i The loss function calculated above calculates the expectation Used to evaluate node parameters ω i In the local data sample ξ i The average loss on λ||ω i -ω0||1 is the regularization term; ω0 is the server parameter.

[0066] In this embodiment, parameter initialization sets the initial server parameters and node parameters as follows: Step size α 0 , regularization parameter λ>0, and initialization assignment is performed:

[0067] Set 20 nodes, and set 8, 10, 12, and 14 of them to be attacked by Byzantine respectively. The regularization parameter is set to 0.07, the fixed step size is 0.001 in α, and the step size is decreased.

[0068] Import the dataset and preprocess it. First, load the MNIST dataset from the pre-saved file, including the training image train_img, training label train_lbl, one-hot encoded training label one_train_lbl, test image test_img, and test label test_lbl. The MNIST dataset contains 60,000 training samples and 10,000 test samples, distributed in 10 categories. Each data sample is represented as a one-dimensional matrix of length 784, corresponding to a 28x28 pixel handwritten image. In order to enhance the computational stability and accuracy of the model, first add bias terms to the training and test image data. The specific operation is to create a column of all 1s and append it to the last column of the training image and test image data to generate the training image train_img_bias and test image test_img_bias with bias terms. Each row of the matrix data represents a sample and each column represents a feature. In addition, one_train_lbl is the one-hot encoded representation of the training label. Each row has 10 elements, representing 10 categories respectively. samples_per_machine is the number of samples allocated to each node, which is used to simulate data distribution in a distributed environment.

[0069] In the embodiment, the environment of distributed computing is simulated, and the training data set is divided according to the predefined number of machine nodes. Each machine is allocated part of the training data to ensure that the data sets received by each machine are independent and identically distributed. The number of data samples allocated to each machine is the same, and they are randomly allocated in a uniform distribution manner to ensure that the data load is balanced among the various computing nodes. In model training, the Softmax regression algorithm is used, and the batch size is set to 32. Top-1 accuracy and loss are used as performance indicators.

[0070] S2, the server broadcasts its parameters to all nodes, and iterates the parameters multiple times;

[0071] S3. For the kth iteration, if Figure 2 As shown, the server receives node parameters from each node And calculate the stochastic gradient value of the server The node parameters Include parameters from normal nodes and parameters from the Byzantine nodes

[0072] As a preferred implementation of step S3, in step S3, the calculation formula of the stochastic gradient value of the server is:

[0073]

[0074] in, is the gradient, is the server parameter at the kth iteration, λ is the regularization parameter, and Γ is calculated using the sign function sign, and its formula is expressed as:

[0075]

[0076] in, is the set of all normal nodes participating in federated learning training. It represents the set of Byzantine nodes that are attacked by Byzantine and participate in the federated learning training.

[0077] S4, according to the random gradient value of the server in step S3 Compress it according to the compression operator definition to obtain the gradient value after server compression The specific formula is:

[0078]

[0079] in, is a compression operator.

[0080] The definition of the compression operator in this embodiment is as follows:

[0081] remember is a random mapping that satisfies the following conditions, for all node parameters satisfy (in is expected); if there is no compression, that is Then ζ=0. The random k sparsification operator is represented as where ξ k is a random binary vector of length d containing k uniformly randomly selected non-zero vectors, and ⊙ is the element-wise product of matrices. This operator also satisfies conditions, and

[0082] In the absence of compression, k=d and ζ=0 also hold.

[0083] S5, based on the server-compressed gradient Perform the next iteration of server parameters update, and broadcast the updated server parameters to all nodes;

[0084] As a preferred implementation of step S5, step S5 is specifically:

[0085] The formula for updating server parameters is as follows:

[0086]

[0087] in, represents the server parameters for the k+1th iteration, α k+1 is the step length;

[0088] Updated k+1 iteration server parameters Broadcast to each node for the k+1th iteration of the overall model.

[0089] In this embodiment, steps S2-S5 are an iterative process of the server.

[0090] S6. For the kth iteration, each node sets its parameters Sent to the server, receiving the server parameters for the kth iteration Calculate the stochastic gradient value of each node And also compress to get the compressed gradient value of each node

[0091] As a preferred implementation of step S6, step S6 is specifically:

[0092] The calculation formula of the stochastic gradient value of each node is:

[0093]

[0094] in, is the local gradient; is a local data sample, sampled from the data set; is the parameter for local update, λ is the regularization parameter;

[0095] The calculation formula for the gradient value of each node after compression is:

[0096]

[0097] in, is the compression operator.

[0098] S7, random gradient based on compression of each node Perform the next iteration update on each node parameter, and then upload the updated node parameters to the server.

[0099] As a preferred implementation of step S7, step S7 is specifically:

[0100] The formula for updating the parameters of each node is:

[0101]

[0102] in, represents the node parameters of the node k+1 iteration, α k+1 is the step length;

[0103] The updated parameters of each node in the k+1th iteration are uploaded to the server and used in the k+1th iteration of the overall model.

[0104] In this embodiment, steps S6-S7 are an iterative process of each node.

[0105] S8. Repeat the iteration until the algorithm converges, the global objective function is minimized, and the optimal parameters are obtained.

[0106] In addition, in this embodiment, strong convexity conditions, Lipschitz continuity conditions and bounded variance are pre-set. The global objective function and the local objective function are evaluated as follows:

[0107] Let the local objective function f i (ω) and the regularization term f0(ω) satisfy strong convexity, that is:

[0108]

[0109] Among them, μi and μ0 are strong convex constants for evaluating node parameters and server parameters, respectively;

[0110] Let the local objective function f i (ω) and f0(ω) satisfy the Lipschitz continuity condition, that is:

[0111]

[0112] Among them, L i and L0 are the corresponding Lipschitz constants;

[0113] In this embodiment, λ‖ω in step S1 i -ω0‖1 and f0(ω) in this step are both regularization terms, but their functions are different; λ‖ω i -ω0‖1 is used to control the parameter ω of each node i The distance between the server parameter ω0 emphasizes the consistency between updates of different nodes. Its role is to constrain the parameters through the l1 norm to prevent excessive deviation between them and to coordinate parameter updates between different nodes; f0(ω0) is part of the global objective function, which is used to control the overall model complexity or prevent overfitting.

[0114] Furthermore, the local gradient The variance of is the upper bound, specifically expressed as:

[0115]

[0116] Bounded variance is a common assumption in stochastic gradient descent (SGD), which is used to analyze the impact of random gradient interference and noise. It is also an important prerequisite for ensuring the stability of the algorithm.

[0117] Under the above three assumptions, the overall model is iterated multiple times. After each iteration, the node will update the parameter ω i It is sent to the server and acts together with the global parameter ω0 on the server to calculate the global objective function and the local objective function. In this process, by combining the assumptions of strong convexity, Lipschitz continuity conditions, and bounded variance, the parameter update effect is gradually evaluated and optimized until the global objective function reaches the minimum value. Finally, the node parameters are as close to the global parameters on the server as possible, and the algorithm converges and obtains the optimal parameters.

[0118] Finally, in this embodiment, the Softmax regression problem in machine learning is also used to test the effectiveness of the proposed algorithm. First, the problem is described as:

[0119]

[0120] Where: m is the number of samples, k is the number of categories, y ij is the true label of sample i (one-hot encoding), and θ is the predicted probability that sample i belongs to category j, calculated by the Softmax function:

[0121]

[0122] Loss Function for Softmax Regression In this embodiment, the same as F(ω) in step S1 i ,ξ i ), that is, F(ω i ,ξ i ) represents the sample ξ i Based on the parameter ω i The loss value of the Softmax regression model. It represents the average loss of the Softmax regression model.

[0123] In the Softmax regression loss function, x i Represents the feature vector of the i-th sample. Each row in train_img_bias and test_img_bias represents an x i one_train_lbl is the one-hot encoding representation of the training label, with 10 elements in each row, representing 10 categories. ij Represents the true label of sample i belonging to category j. Each row in one_train_lbl is the corresponding y i , whose jth element is y ij , samples_per_machine is the number of samples assigned to each node, which is used to simulate the data distribution in a distributed environment. Specifically: First, calculate the scores of all samples in each category (i.e., the dot product ω j ·x i ); For numerical stability, subtract the maximum value from the score of each category to prevent excessively large values ​​from appearing when calculating the exponent; calculate the Softmax function to obtain the probability θ that each sample belongs to each category, and calculate the cross entropy loss; finally add the L2 regularization term Prevent overfitting.

[0124] During the algorithm model training process, the algorithm will try to minimize this loss function That is, by continuously adjusting the parameter ω, the model's prediction is made more accurate. If the proposed algorithm can effectively reduce the loss function value and converge to a smaller loss value within a reasonable time, it indicates that the algorithm performs well in solving the optimization problem. If the loss function decreases rapidly and tends to stabilize, it indicates that the algorithm exhibits good efficiency and stability in the optimization process.

[0125] In addition, since the Softmax regression problem contains a regularization term Not only is the convergence of the algorithm tested, but also its ability to prevent overfitting is verified.

[0126] In actual testing, the effectiveness of the algorithm can be judged by comparing the loss function values ​​of different algorithms on the same Softmax regression problem. A low loss value means that the algorithm fits the data better and the regularization term ensures the generalization ability of the model. If the algorithm can still maintain a low loss function value when processing a data set containing noise or outliers, it means that the algorithm has a certain degree of robustness and can resist uncertainty or malicious attacks in the data. Therefore, if Figure 3-6 As shown in the figure, the actual effect difference between this algorithm and several traditional algorithms under different Byzantine node proportions is given:

[0127] The DCR-SGDA algorithm proposed in this method is better than the current optimal RSA algorithm on the loss value comparison curve when the number of known Byzantine nodes is 40% of the total. At 50%, 60%, and 70%, it can also maintain the same level of loss as RSA, with little difference. However, considering that the distributed optimization problem is a huge system problem, the information transmission between nodes and servers is a huge amount of work. When the gradient is transmitted, this algorithm adds a compression step, which can effectively compress the transmitted gradient information, that is. The figure shown is a figure drawn when the compression operator is d / 4, where d is the dimension of the gradient. After experiments, when the compression operator takes d / 4, this algorithm can still retain the useful information of the gradient, and also reduce the loss of computing resources. In this regard, compared with other algorithms, it saves 4 times the computing resources.

[0128] In summary, the method proposed in the present invention has the advantages of strong anti-interference ability (especially Byzantine attacks), low communication cost, and high privacy security. It can be widely used in multiple fields, especially in application systems with high data privacy requirements and limited communication resources.

[0129] In this specification, the terms "one embodiment", "some embodiments", "examples", "specific examples" or "some examples" refer to at least one embodiment or example described in combination with specific features, structures, materials or characteristics. These described specific features, structures, materials or characteristics can be combined in an appropriate manner in one or more embodiments or examples. In addition, the technician can combine and combine different embodiments or examples and their features described in this specification without contradiction.

[0130] The logic and / or steps shown in the flowchart or described in other ways can be regarded as a sequence of executable instructions for implementing logical functions. These instructions can be implemented in any computer-readable medium for use by instruction execution systems, devices or equipment. These systems, devices or equipment include processor systems or other systems capable of receiving and executing instructions.

[0131] The above embodiments have described the principles and implementations of the present invention in detail, and have used specific examples to illustrate the working principles thereof. These examples are only used to help understand the method of the present invention and its core concept. Meanwhile, according to the concept of the present invention, the actual implementation methods and application scope may vary. Therefore, the contents of this specification should not be construed as limiting the present invention.

Claims

1. A distributed compressed random aggregation method for robust federated learning under Byzantine attacks, characterized in that: include: S1. Initialize the parameters of the distributed compression random aggregation algorithm DCR-SGDA and import the data set to be distributed for preprocessing; set the global objective function and local objective function, specifically: Global objective function: Local objective function: Among them, ω is the set of all node parameters in the entire distributed system, and each node i has its own node parameter ω i ξ i is the local data sample of node i; represents the d-dimensional real vector space, that is, the set of all vectors consisting of d real numbers; is the local data distribution of node i, each node i uses Update your own node parameters ω i ; To calculate the expectation, F(ω i ,ξ i ) represents the local data sample ξ i The loss function calculated above calculates the expectation Used to evaluate node parameters ω i In the local data sample ξ i The average loss on λ||ω i -ω0||1 is the regularization term; ω0 is the server parameter; S2, the server broadcasts its parameters to all nodes, and iterates the parameters multiple times; S3. For the kth iteration, the server receives node parameters from each node And calculate the stochastic gradient value of the server The node parameters Include parameters from normal nodes and parameters from the Byzantine nodes S4, according to the random gradient value of the server in step S3 Compress it according to the compression operator to obtain the gradient value after server compression S5, based on the server-compressed gradient Update the server parameters for the next iteration and broadcast the updated server parameters to all nodes; S6. For the kth iteration, each node sets its node parameters Sent to the server, receiving the server parameters for the kth iteration Calculate the stochastic gradient value of each node And also compress to get the compressed gradient value of each node S7, random gradient based on compression of each node Perform the next iteration update on each node parameter, and then upload the updated node parameters to the server; S8. Repeat the iteration until the algorithm converges, the global objective function is minimized, and the optimal parameters are obtained.

2. According to claim 1, a distributed compressed random aggregation method for robust federated learning under Byzantine attacks is characterized in that: The calculation formula of the stochastic gradient value of the server in step S3 is: in, is the gradient, is the server parameter at the kth iteration, λ is the regularization parameter, and Γ is calculated using the sign function sign, and its formula is expressed as: in, is the set of all normal nodes participating in federated learning training. It represents the set of Byzantine nodes that are attacked by Byzantine and participate in the federated learning training.

3. According to claim 1, a distributed compressed random aggregation method for robust federated learning under Byzantine attacks is characterized in that: The calculation formula of the gradient value after server compression in step S4 is: in, is a compression operator.

4. According to claim 1, a distributed compressed random aggregation method for robust federated learning under Byzantine attacks is characterized in that: Step S5 is specifically as follows: The formula for updating server parameters is as follows: in, represents the server parameters for the k+1th iteration, α k+1 is the step length; Updated k+1 iteration server parameters Broadcast to each node for the k+1th iteration of the overall model.

5. According to claim 1, a distributed compressed random aggregation method for robust federated learning under Byzantine attacks is characterized in that: Step S6 is specifically as follows: The calculation formula of the stochastic gradient value of each node is: in, is the local gradient; is a local data sample, sampled from the data set; are the parameters of each node at the kth iteration, and λ is the regularization parameter; The calculation formula for the gradient value of each node after compression is: in, is the compression operator.

6. According to claim 1, a distributed compressed random aggregation method for robust federated learning under Byzantine attacks is characterized in that: Step S7 is specifically as follows: The formula for updating the parameters of each node is: in, represents the node parameters of the k+1th iteration of the node, α k+1 is the step length; The updated parameters of each node in the k+1th iteration are uploaded to the server and used in the k+1th iteration of the overall model.

Citation Information

Patent Citations

  • Federal learning method with efficient communication, privacy protection and attack resistance

    CN115329981A

  • Distributed cooperation method for communication optimization

    CN116468133A