Self-adaptive optimization method for privacy protection asynchronous federated learning based on compression and event-triggered communication

By adopting an adaptive optimization method of asynchronous federated learning based on compression and event-triggered communication in federated learning, the problems of low efficiency, high communication cost and malicious attacks in traditional synchronous federated learning are solved, and efficient, secure and flexible are achieved. federal learning.

CN119476525APending Publication Date: 2025-02-18HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411453759.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Traditional synchronous federated learning has challenges in the deployment of adaptive federated optimization methods and asynchronous client latency issues, and also faces the threat of malicious attacks.

Method used

A self-adaptive optimization method for privacy-protected asynchronous federated learning based on compression and event-triggered communication is proposed. By calculating the difference between the local model and the global model and performing compression and noise processing, the communication overhead is reduced, and adaptive learning rate is used to adjust the adaptation. Delay of asynchronous client.

Benefits of technology

This method can protect user data privacy while reducing communication overhead, improve the training efficiency and accuracy of the global model, and resist the influence of malicious attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476525A_ABST
    Figure CN119476525A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive optimization method of privacy protection asynchronous federated learning based on compression and event trigger communication, a server has a buffer area with the size of # imgabs0 #, when each round of global training starts, the server randomly selects a # imgabs1 # client to send an initialized global model, and the initialized global model is sent to the server; the clients perform local model training to obtain a new local model and calculate a difference value between the new local model and the old local model, and when the difference value meets an event triggering threshold value, the clients can calculate a difference value between the local model and the global model, add a compression error to the difference value and then perform compression processing. And the processed value is added into differential privacy Laplacian noise disturbance and then is transmitted to a server. And averaging all the compression values by the server side, and updating the global model according to an adaptive optimization algorithm. According to the method, time overhead and precision loss caused by delay in the asynchronous FL can be reduced, and data privacy can be protected. And the precision of model training is improved while the communication overhead is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of federated learning, and in particular to an adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication. Background Art

[0002] With the development of federated learning technology, various industries are increasingly using this technology to assist their work. Federated learning has attracted more and more attention as an efficient distributed machine learning paradigm that protects privacy. The FL framework consists of a central server and many clients, and the clients collaborate to train a global model without sharing private data. FL requires each client to perform multiple local iterations, and the central server periodically performs global model aggregation to aggregate local updates into the global model. In federated learning, the quality of local clients is often uneven. Some clients may have excessive update delays or disconnections due to attacks from the network or malicious nodes, which will greatly affect the accuracy and efficiency of the entire system training and the high communication costs. Adaptive federated learning can improve efficiency and reduce costs to a certain extent, but traditional synchronous federated learning places high demands on the actual deployment of adaptive federated optimization methods, and may also be attacked by malicious adversaries.

[0003] Asynchronous federated learning has shown excellent performance in solving the problem of inconsistent client quality. This technology enables the global model to be aggregated without waiting for other clients with poor quality to upload local updates, thereby improving the efficiency of global model training. It also provides a solution to the deployment problem of the adaptive federated optimization method. However, the delay of asynchronous clients may have a significant negative impact on the efficiency and accuracy of global model updates. At the same time, since asynchronous federated learning may require more global model communications, this brings high communication cost requirements.

[0004] In recent years, in order to address the threat of malicious attacks that federated learning may encounter, some workers have proposed that participants in federated learning can protect privacy by adding noise or perturbations to local model parameters. For example, Laplace noise can be used to perturb the parameters of local updates. The addition of noise makes the contribution of participants difficult to detect, thereby protecting the privacy of individual data, but noise perturbations also affect the accuracy of the model to a certain extent.

[0005] The problems that may be encountered in the federated learning method can be summarized into two types. The first is that the asynchronous delay caused by low-quality participating nodes is too high, resulting in the problem that the local model uploaded by the client is relatively old. Generally speaking, such nodes will have too high delays due to network or adversary attacks, so that outdated local update models are sent to the server, resulting in low global model accuracy. The second is that the communication overhead is too high. Since the client asynchronously transmits the local update model to the server, this may cause the server to aggregate the global model multiple times. At the same time, due to the large amount of data, it leads to high communication costs.

[0006] To address the above problems, we propose an adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication. Summary of the invention

[0007] Purpose of the invention: In response to the problems pointed out in the background technology, the present invention proposes an adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication, which can simultaneously protect user data privacy and resist the impact of client asynchronous delays, and can also reduce communication overhead.

[0008] Technical solution: The present invention provides an adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication, comprising the following steps:

[0009] S1: Server initializes the global model x t , each client initializes all learning model parameters, initializes the first-order momentum m0 and the second-order momentum v0;

[0010] S2: Server initializes counter m and client update information summary And randomly select M clients to send the global model and record the timestamp at that time;

[0011] S3: In the tth round of global model training iteration, the selected local client c i , i∈M uses the stochastic gradient descent algorithm to train the local model, and obtains the client c in the k+1th round of local training i The latest local models

[0012] S4: Client c i Calculate the current latest local model The local model that was last sent to the server The error d i (t), determine whether the event trigger mechanism is met based on the error. If the conditions are met, calculate the latest local model With the global model x t The Difference Afterwards, the difference Model cumulative error caused by compression operation Compress and add noise processing to get the compression model Sent to the server and update the accumulated error and the latest local model sent to the server information;

[0013] S5: The remaining clients c j , Maintain model cumulative error unchanged, that is

[0014] S6: The server sends all the update information received from the client Put it together and calculate the delay time of each client

[0015] S7: After the server receives enough client model update information, it averages all the updated information and updates the first-order momentum, second-order momentum and the maximum value of the second-order momentum.

[0016] S8: The server calculates the maximum delay of the client Use the maximum delay to adaptively adjust the global model learning rate;

[0017] S9: Use the learning rate adjusted by adaptive delay and the updated first-order momentum and second-order momentum to update the global model, and then determine whether the global model has converged or reached the predetermined number of training times: if so, the algorithm ends; otherwise, return to step S2 to start the next round of training iterations.

[0018] Further: the specific process of step S1 is as follows:

[0019] S1.1: Server initializes global model x t =x1;

[0020] S1.2: The server initializes the first-order momentum parameters and the second-order momentum parameters m0=0, v0=0, and each client initializes the learning model parameters Where m is the maximum number of local client update models that the buffer can accommodate.

[0021] Further: the specific process of step S3 is as follows:

[0022] S3.1: Local client c i When using the stochastic gradient descent algorithm to train local model parameters, you need to calculate the stochastic gradient: in Represents client ci The stochastic gradient calculated at the kth local iteration of the tth round of communication, F i represents the local loss function on the client, represents the random variable associated with this calculation;

[0023] S3.2: After the local client performs the k+1th round of local training, it obtains the latest local model The training formula is: where η l is the local client learning rate, Indicates that the local model is obtained by the kth round of local training.

[0024] Further: the specific process of step S4 is as follows:

[0025] S4.1: The client calculates the latest local model The local model that was last sent to the server The error d i The formula for (t) is:

[0026]

[0027] Among them, η l The local client learning rate is used to determine whether the event trigger mechanism meets the trigger conditions. i (t)||1≥α t , that is, when the L1 norm of the error is greater than or equal to the trigger threshold α t Trigger subsequent calculation events;

[0028] S4.2: Use Calculate the difference between the latest local model and the global model, and then compare the model differences After error compensation and compression and adding noise, the compression model is obtained. The formula is: in is the cumulative model error caused by the previous round of compression operations, and Y is the randomly generated differential privacy Laplace noise Where s is the sensitivity and ε1 is the privacy budget;

[0029] S4.3: The formula for updating the cumulative error is: The formula for updating the local model information sent to the server is:

[0030] Further: the specific process of step S6 is as follows:

[0031] S6.1: Server passes Aggregate Client ci Update information of client c, and update counter m←m+1, and record i The updated timestamp t′ is calculated by the formula Calculate c i Delay time;

[0032] S6.2: Every time the server receives update information from a client, it also randomly sends the current global model to one of the other unselected clients and starts the local training in S2 on this client, and records the current timestamp information.

[0033] Further: the specific process of step S7 is as follows:

[0034] S7.1: The server aggregates and averages all detailed information:

[0035] S7.2: The updated first-order momentum is m t , the second-order momentum is v t , the maximum value of the second-order momentum is The formula used to update these parameters is:

[0036]

[0037] Among them, β1 is a hyperparameter that controls the decay rate of the first-order momentum; β2 is a hyperparameter that controls the decay rate of the second-order momentum; m t-1 Represents the gradient momentum of the previous round, v t-1 represents the gradient variance of the previous round, Represents the modified second-order momentum estimate at the tth round, taking the maximum value of the current and all previous rounds to prevent the update step from being too large due to the second-order momentum being too small.

[0038] Further: In step S8, the maximum delay of the client is Then use the maximum delay and the set delay threshold τ c Adaptively adjust the global learning rate:

[0039]

[0040] Where exp(x) = e x , λ is a parameter used to control the smoothness of the function, which means that the learning rate will decrease as the delay increases; η represents the global model learning rate given in advance, η t Represents the global model learning rate after adaptive adjustment of the formula.

[0041] Further: the global model is updated in step S9, specifically:

[0042]

[0043] Here, ε is a small constant used to avoid division by zero errors.

[0044] Beneficial effects:

[0045] The present invention uses adaptive asynchronous federated learning to propose an adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication, which achieves the effect of reducing communication overhead and solving the problem of excessive asynchronous delay on the client side. At the same time, by calculating the difference between the local model and the global model and adding the compression error of the previous iteration, the model is processed for privacy protection with differential privacy noise, so that the accuracy of the local model is guaranteed while reducing communication overhead and preventing attacks from malicious adversaries. At the same time, the server will only start a round of global model aggregation after receiving a certain number of local models, which also greatly reduces communication overhead. At the same time, the delay of the asynchronous client is adapted by adaptively adjusting the learning rate, so that the learning rate is reduced when the delay is too high, which can improve the accuracy of the global model.

[0046] The present invention can reduce communication overhead and resist the negative impact of excessive asynchronous client delays when conducting federated learning, while also protecting personal privacy information from being stolen. It has high scalability and performance and can meet data scenarios of different scales. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a schematic diagram of the overall structural flow of the present invention. DETAILED DESCRIPTION

[0048] In order to achieve the technical goal of the privacy-preserving federated learning method against Byzantine attacks of the present invention, the method structure designed by the present invention consists of the following parts:

[0049] 1. Client: Assume that there are n participating nodes in total, and the node is recorded as c 1 ,c 2 ,...,c n , each node c i Each has a local dataset The client is usually a personal device that holds sensitive data, such as a mobile phone, tablet computer, laptop computer, etc. The letter K is a general term, indicating any local model from 1 to lowercase letter k+1.

[0050] 2. Server: Receives messages from clients after local training is completed, aggregates and updates global model parameters. The server is usually provided by the machine learning model owner.

[0051] A federated learning method that can simultaneously achieve privacy protection and high precision in large-scale data scenarios, while reducing communication overhead, thereby improving the system's work efficiency, overcoming performance bottlenecks, and making the entire model more practical.

[0052] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the protection scope of the present invention.

[0053] The present invention provides an adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication, comprising the following steps:

[0054] S1: The server initializes the global model, the first-order momentum parameters and the second-order momentum parameters. At the same time, each client also initializes the learning model parameters, including the following steps:

[0055] S1.1: Server initializes global model x t =x1.

[0056] S1.2: The server initializes each momentum parameter m0=0, v0=0, and each client initializes the learning model parameters Where m is the maximum number of local client update models that the buffer can accommodate.

[0057] S2: The server aggregates the value of counter m and the client update information All are set to 0, and M clients are randomly selected from all clients to send the global model and record the timestamp at the same time. These clients start local model training.

[0058] S3: In the tth round of global model training iteration, the selected local client c i (i∈M) uses the stochastic gradient descent algorithm to train the local model. The client obtains the client c in the k+1th round of local training. i The latest local models The following steps are involved:

[0059] S3.1: Local client c i (i∈M) When using the stochastic gradient descent algorithm to train local model parameters, it is necessary to calculate the stochastic gradient: in Represents client c i The stochastic gradient calculated at the kth local iteration of the tth round of communication, F i represents the local loss function on the client, and Represents a random variable associated with this computation (e.g., a data point randomly sampled from a local dataset).

[0060] S3.2: After the local client performs the k+1th round of local training, it obtains the latest local model The training formula is: where η l is the local client learning rate.

[0061] S4: Client c i Calculate the current latest local model The local model that was last sent to the server The error d i (t), and judge whether the trigger threshold α of the event trigger mechanism is met according to the error t , if the conditions are met, the latest local model is calculated With the global model x t The Difference Then the model difference Model cumulative error caused by compression operation Compress and add noise processing, and the result Sent to the server and update the accumulated error and the latest local model sent to the server The information includes the following steps:

[0062] S4.1: Client calculates error d i The formula for (t) is ||d is used to determine whether the event trigger mechanism meets the trigger conditions i (t)||1≥α t , that is, when the L1 norm of the error is greater than or equal to the trigger threshold α t , triggers subsequent calculation events.

[0063] S4.2: Use Calculate the difference between the latest local model and the global model, and then compare the model differences After error compensation and compression and adding noise, the compression model is obtained. The formula is: in is the cumulative model error caused by the previous round of compression operations, and Y is the randomly generated differential privacy Laplace noise Where s is the sensitivity and ε1 is the privacy budget.

[0064] S4.3: The formula for updating the cumulative error is: The formula for updating the local model information sent to the server is:

[0065] S5: When the selected client c iWhile (i∈M) is training locally, the remaining clients will maintain their model's accumulated error constant:

[0066] S6: The server sends all the update information received from the client. Summarize them together and use the value of counter m to calculate the number of client update information received. At the same time, record the timestamp of each client sending the update information and calculate the delay time of each client. At the same time, every time the server receives an update message from a client, it randomly sends the current global model to other clients. A client in S2 is selected and local training in S2 is started on this client, and the current timestamp information is recorded. This operation can ensure that at any time, there are enough clients performing local model training, including the following steps:

[0067] S6.1: Server passes Aggregate Client c i Update information of client c, and update counter m←m+1, and record i The updated timestamp t′ is calculated by the formula Calculate c i delay time.

[0068] S6.2: The server sends the latest global model x t Send to And record the timestamp information in c j Start local training on .

[0069] S7: After the server receives enough client model update information, it will average all the updated information and update the first-order momentum, second-order momentum, and second-order momentum maximum parameters, including the following steps:

[0070] S7.1: The server aggregates and averages all detailed information:

[0071] S7.2: The updated first-order momentum is m t , the second-order momentum is v t , the maximum value of the second-order momentum is The formula used to update these parameters is:

[0072]

[0073] Among them, β1 is a hyperparameter that controls the decay rate of the first-order momentum; β2 is a hyperparameter that controls the decay rate of the second-order momentum; mt-1 Represents the gradient momentum of the previous round, v t-1 represents the gradient variance of the previous round, Represents the modified second-order momentum estimate at the tth round, taking the maximum value of the current and all previous rounds to prevent the update step from being too large due to the second-order momentum being too small.

[0074] S8: The server calculates the maximum delay of this batch of clients The maximum delay is used to adaptively adjust the global model learning rate in preparation for S9's global model training, where the maximum delay of the client is Then use the maximum delay and the set delay threshold τ c Adaptively adjust the global learning rate:

[0075]

[0076] where exp(x) = e x , λ is a parameter used to control the smoothness of the function, which means that the learning rate will decrease as the delay increases; η represents the global model learning rate given in advance, η t Represents the global model learning rate after adaptive adjustment of the formula.

[0077] S9: Update the global model using the learning rate adjusted by adaptive delay and the updated momentum parameter. The algorithm formula for updating the global model is: Then determine whether the global model has converged or reached the predetermined number of training times: if so, the algorithm ends; otherwise, return to step S2 to start the next round of training iterations. ε is a very small constant (such as 10 to the negative 8th power) to avoid division by zero errors. When the value is very small, it prevents the value from being unstable during the update process.

[0078] At this point, the specific implementation steps of the present invention are all completed.

[0079] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. An adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication, characterized in that: The following steps are involved: S1: Server initializes the global model x t , each client initializes all learning model parameters, initializes the first-order momentum m0 and the second-order momentum v0; S2: Server initializes counter m and client update information summary And randomly select M clients to send the global model and record the timestamp at that time; S3: In the tth round of global model training iteration, the selected local client c i , i∈M uses the stochastic gradient descent algorithm to train the local model, and obtains the client c in the k+1th round of local training i The latest local models S4: Client c i Calculate the current latest local model The local model that was last sent to the server The error d i (t), determine whether the event trigger mechanism is met based on the error. If the conditions are met, calculate the latest local model With the global model x t The Difference Afterwards, the difference Model cumulative error caused by compression operation Compress and add noise processing to get the compression model Sent to the server and update the accumulated error and the latest local model sent to the server information; S5: The remaining clients c j , Maintain model cumulative error unchanged, that is S6: The server sends all the update information received from the client Put it together and calculate the delay time of each client S7: After the server receives enough client model update information, it averages all the updated information and updates the first-order momentum, second-order momentum and the maximum value of the second-order momentum. S8: The server calculates the maximum delay of the client Use the maximum delay to adaptively adjust the global model learning rate; S9: Use the learning rate adjusted by adaptive delay and the updated first-order momentum and second-order momentum to update the global model, and then determine whether the global model has converged or reached the predetermined number of training times: if so, the algorithm ends; otherwise, return to step S2 to start the next round of training iterations.

2. The adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication according to claim 1, characterized in that: The specific process of step S1 is as follows: S1.1: Server initializes global model x t =x1; S1.2: The server initializes the first-order momentum parameters and the second-order momentum parameters m0=0, v0=0, and each client initializes the learning model parameters Where m is the maximum number of local client update models that the buffer can accommodate.

3. The adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication according to claim 1, characterized in that: The specific process of step S3 is as follows: S3.1: Local client c i When using the stochastic gradient descent algorithm to train local model parameters, you need to calculate the stochastic gradient: in Represents client c i The stochastic gradient calculated at the kth local iteration of the tth round of communication, F i represents the local loss function on the client, represents the random variable associated with this calculation; S3.2: After the local client performs the k+1th round of local training, it obtains the latest local model The training formula is: where η l is the local client learning rate, Indicates that the local model is obtained by the kth round of local training.

4. The adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication according to claim 1, characterized in that: The specific process of step S4 is as follows: S4.1: The client calculates the latest local model The local model that was last sent to the server The error d i The formula for (t) is: Among them, η l The local client learning rate is used to determine whether the event trigger mechanism meets the trigger conditions. i (t)||1≥α t , that is, when the L1 norm of the error is greater than or equal to the trigger threshold α t Trigger subsequent calculation events; S4.2: Use Calculate the difference between the latest local model and the global model, and then compare the model differences After error compensation and compression and adding noise, the compression model is obtained. The formula is: in is the cumulative model error caused by the previous round of compression operations, and Y is the randomly generated differential privacy Laplace noise Where s is the sensitivity and ε1 is the privacy budget; S4.3: The formula for updating the cumulative error is: The formula for updating the local model information sent to the server is:

5. The adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication according to claim 1, characterized in that: The specific process of step S6 is as follows: S6.1: Server passes Aggregate Client c i Update information of client c, and update counter m←m+1, and record i The updated timestamp t′ is calculated by the formula Calculate c i Delay time; S6.2: Every time the server receives update information from a client, it also randomly sends the current global model to one of the other unselected clients and starts the local training in S2 on this client, and records the current timestamp information.

6. The adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication according to claim 1, characterized in that: The specific process of step S7 is as follows: S7.1: The server aggregates and averages all detailed information: S7.2: The updated first-order momentum is m t , the second-order momentum is v t , the maximum value of the second-order momentum is The formula used to update these parameters is: Among them, β1 is a hyperparameter that controls the decay rate of the first-order momentum; β2 is a hyperparameter that controls the decay rate of the second-order momentum; m t-1 Represents the gradient momentum of the previous round, v t-1 represents the gradient variance of the previous round, Represents the modified second-order momentum estimate at the tth round, taking the maximum value of the current and all previous rounds to prevent the update step from being too large due to the second-order momentum being too small.

7. The adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication according to claim 1, characterized in that: In step S8, the maximum delay of the client is Then use the maximum delay and the set delay threshold τ c Adaptively adjust the global learning rate: Where exp(x) = e x , λ is a parameter used to control the smoothness of the function, which means that the learning rate will decrease as the delay increases; η represents the global model learning rate given in advance, η t Represents the global model learning rate after adaptive adjustment of the formula.

8. The adaptive optimization method for privacy-preserving asynchronous federated learning based on compression and event-triggered communication according to claim 7, characterized in that: In step S9, the global model is updated, specifically: Here, ε is a small constant used to avoid division by zero errors.

Citation Information

Cited By

  • Privacy-protected multi-hospital cooperation disease prediction method and system

    CN120781381A