Optimization method of efficient asynchronous federated learning based on adaptive threshold homomorphic encryption

Through adaptive threshold homomorphic encryption and selective parameter encryption, combined with asynchronous aggregation strategy, the privacy leakage and synchronization efficiency problems in federated learning are solved, and efficient and secure asynchronous federated learning is achieved, which is suitable for training of large-scale basic models.

CN120373497APending Publication Date: 2025-07-25HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510470470.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

Existing federated learning technologies face the difficulties of privacy leakage risks, synchronization efficiency bottlenecks, and the trade-offs of encryption efficiency and security, especially in large-scale basic models, computing and communication overheads are too high, and it is difficult to adapt to the dynamic changes in asynchronous federated scenarios.

Method used

Adaptive threshold homomorphic encryption technology is adopted, combining selective parameter encryption and asynchronous aggregation strategy, dynamically adjust the encryption ratio and timing, optimize communication overhead and resist malicious attacks, and realize efficient asynchronous federated learning.

Benefits of technology

Effectively protect client privacy, reduce communication overhead, improve training efficiency, adapt to asynchronous scenarios, improve model convergence speed and accuracy, and is suitable for data scenarios of different scales.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373497A_ABST
    Figure CN120373497A_ABST
Patent Text Reader

Abstract

An efficient asynchronous federated learning optimization method based on adaptive threshold homomorphic encryption comprises the following steps: a key center generates a threshold homomorphic encryption key pair, sends a public key to a server and a client, and constructs an asynchronous buffer area to receive encryption update asynchronously uploaded by the client; and the client generates an encryption sensitivity matrix, encrypts and uploads the encryption sensitivity matrix to the server. The server generates a global privacy sensitivity graph, and first p% of high-sensitivity parameters are screened according to a preset privacy sensitivity proportion p to generate a dynamic encryption mask M; when the client is trained, only high-sensitivity parameters identified by the encryption mask are subjected to threshold homomorphic encryption, and non-sensitive parameters are transmitted in a plaintext mode. And the server processes asynchronous update by adopting a counting strategy, triggers global aggregation when encryption update covers a preset proportion of clients, and prevents collusion attacks through a threshold decryption protocol. According to the method, sensitivity-driven dynamic encryption and asynchronous federated learning are fused, the balance between privacy protection intensity and system efficiency is realized, and efficient encryption training of a multi-parameter basic model is supported.
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 particularly relates to an optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption. Background Art

[0002] With the development of federated learning technology, this technology is increasingly used in various industries to assist work. As an efficient privacy-preserving distributed machine learning paradigm, federated learning has attracted more and more attention. The FL framework consists of a central server and numerous clients. The clients cooperate to train a global model without sharing private data. FL requires each client to perform multiple local iterations, and the central server periodically performs aggregation of the global model, aggregating local updates into the global model. However, the existing federated learning technology still faces the following key challenges in practical applications:

[0003] 1. Privacy leakage risk: Although the client data does not leave the local, the model parameters or gradients transmitted in plaintext may be reconstructed into the original data by a malicious server or attacker through gradient inversion attacks (such as DLG). Existing privacy protection schemes such as differential privacy (DP) will introduce noise, resulting in a decline in model performance. Secure aggregation depends on client synchronization and is sensitive to disconnections. Homomorphic Encryption (HE) can achieve ciphertext aggregation, but its computational and communication overheads increase linearly with the model scale, and it is difficult to be practical in large-scale basic models (such as BERT, ResNet). Differential privacy (DP) protects privacy by injecting noise, but sacrifices model performance. Secure aggregation depends on client synchronization and is sensitive to disconnections. Traditional threshold encryption supports multi-party decryption, but the fixed threshold value cannot adapt to the dynamic participation of clients in the asynchronous federated scenario.

[0004] 2. Synchronization efficiency bottleneck: Traditional federated learning adopts a synchronous aggregation mechanism, which needs to wait for all clients to complete local training before updating the global model, resulting in high latency and resource waste. Although asynchronous federated learning alleviates the synchronization problem by allowing clients to dynamically upload updates, the timeliness difference (stale updates) of parameter updates in the asynchronous scenario may affect model convergence, and the existing asynchronous schemes lack adaptive optimization for the dynamic heterogeneous environment. In asynchronous federated learning, clients may cause delays in model updates due to network fluctuations or insufficient computing resources. Outdated local models (stale updates) will significantly reduce the convergence speed and accuracy of the global model, especially in heterogeneous device scenarios (such as edge computing nodes), and traditional asynchronous aggregation strategies are difficult to dynamically balance the timeliness of updates and model stability.

[0005] 3. Trade-off between Encryption Efficiency and Security: Existing homomorphic encryption schemes (such as Paillier and CKKS) usually require full-parameter encryption, resulting in high computational and bandwidth overheads. Although some studies have reduced the overhead through selective parameter encryption (such as FedML-HE), its static encryption mask is difficult to adapt to changes in dynamic data distribution and attack intensity. In addition, although traditional threshold encryption (Threshold HE) supports multi-party collaborative decryption, the fixed threshold value cannot be flexibly adapted to the dynamic participation of clients in the asynchronous federated scenario. Although homomorphic encryption can achieve ciphertext aggregation to resist gradient inversion attacks, its computational and communication overheads increase linearly with the model scale (for example, full-parameter encryption of the BERT model requires a 40-fold increase in overhead). Existing schemes (such as Paillier encryption) are difficult to support the training of large-scale basic models, and the static encryption strategy cannot adapt to changes in dynamic data distribution and attack intensity. Summary of the Invention

[0006] In view of the above technical problems, the present technical solution provides an optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption, which can improve the training speed, reduce the impact of client asynchronous latency, better protect client privacy, reduce communication overhead, and has stronger practicability; it can effectively solve the above problems.

[0007] The present invention is achieved through the following technical solutions:

[0008] An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption, comprising the steps of:

[0009] S1: The key generation center KGC initializes and generates a threshold key pair: Send the public key pk to all clients and servers, and distribute the private key sk i to the client C i (i ∈ N);

[0010] S2: Client initialization, the client C i Based on the local dataset D i Initializes a local model W i,0 , after receiving the private key sk sent by the KGC i , according to the local model W i,k (the local iteration number k = 0 during initialization) calculates the sensitivity analysis graph S of the local data i , C i Uses the public key to encrypt the sensitivity analysis graph S i to obtain and sends it to the server;

[0011] S3: The server initializes the global model, constructs an asynchronous buffer that can accommodate the parameters of m clients and a threshold τ for threshold decryption, as well as a counter a for recording the number of subsequent client sensitivity analysis graphs, and accepts from the clients Each time it receives one it marks the client and sets a = a + 1;

[0012] S4: When the server receives m sensitivity analysis graphs, the server adaptively calculates the current appropriate partial encryption ratio p, then calculates the encryption mask M for selective parameter encryption, and at the same time sets a = 0; After the calculation is obtained the server will and the initialized global model W (when initializing, the global iteration number t = 0) and sends them to the m clients that uploaded before g,t (when initializing, the global iteration number t = 0) and sends them to the m clients that uploaded before ;

[0013] S5: After the client receives the encryption mask and the global model W g,t , it trains the local model using the stochastic gradient descent algorithm, and at the same time uses the private key sk i to decrypt to obtain M;

[0014] S6: The client obtains the latest local model parameters through training, and quantifies the sensitivity of each parameter to label changes through second-order gradient analysis, generates an encrypted sensitivity matrix and encrypts and uploads it to the server; The specific operation steps include:

[0015] S6.1: When the client trains the (k + 1)-th round locally, it obtains the latest local model parameters ΔW i of client C i,k+1 , and uses M to distinguish them into model parameters with high sensitivity and low-sensitivity model parameters

[0016] S6.2: Encrypt with pk to obtain Subsequently, pack the two to get [ΔW i and send it to the server side. At the same time, according to the new local model parameters W i,k+1 recalculate the sensitivity analysis graph of the local data wait to be selected next time and send it to the server. The method of calculating the new sensitivity analysis graph of the local data is the same as S2;

[0017] S7: When the server collects m partially encrypted local model update parameters [W i , for the m and Separate individual weighted average calculations are performed to obtain and

[0018] S8: Every time the server collects the updated parameters of the local model, it randomly selects one from the clients C j (j ∈ N - m) and collects C j 's and sends the current latest global model and partial encryption masks Let C j start local model training, and at the same time let a = a + 1; when a = m, the server executes step S4 to update p and M;

[0019] S9: The server randomly selects τ clients required for threshold decryption and sends for partial decryption, and then passes it to the client for final decryption to obtain the plaintext state of The client will and aggregate them together to calculate a new global model W g,t+1 , and then W g,t+1 and the new encryption mask are sent to the subsequent clients for training together, and step S5 is executed for a new round of training.

[0020] Furthermore, the key pair generated in step S1 adopts the method of

[0021] Furthermore, the specific process of calculating the sensitivity analysis graph S of the local data according to the local model W described in step S2 i,k includes: Client C i calculates according to the local model W i According to the local model W i,k Calculate Calculate using the Jacobian matrix of the gradient; for a given local model W i,k and K data samples, input matrix X and true label vector y, calculate the sensitivity analysis graph through the following formula (1);

[0022]

[0023] In the above formula, J m (yk) is the Jacobian matrix, and the Jacobian matrix is as follows:

[0024]

[0025] In the above formula, l(·) is the loss function, ||·|| is the absolute value, w mis the gradient in the model, y k is the k-th true label vector in the model, R represents the set of real numbers, is the partial derivative operator;

[0026] The described C i Encrypt the sensitivity analysis graph S using the public key i The specific operation method is: The client encrypts the sensitivity analysis graph using homomorphic encryption to obtain:

[0027] Furthermore, the specific process of step S4 includes:

[0028] S4.1: When the server collects m sensitivity analysis graphs, the server calculates the partial encryption ratio p according to formula (3);

[0029] p = σ(b(cr - d)) (3)

[0030] Where, is the sigmoid function, b is the sensitivity parameter that controls the change of the p value with cr, d is the sensitivity ratio threshold set to trigger the adjustment of the p value, is the ratio of the number of high-sensitivity parameters to the total number of parameters, where is the number of high-sensitivity parameters whose sensitivity exceeds the threshold d, is the total number of parameters, such as S where the proportion of sensitive parameters is greater than or equal to 30% i ;

[0031] S4.2: Calculate the encryption mask for selective parameter encryption The formula for is:

[0032]

[0033] Where, α i is the aggregation weight of client i, M is a mask with the same dimension as the model parameters, where:

[0034] Furthermore, the specific operation steps of step S5 include:

[0035] S5.1: When the local client C i uses the stochastic gradient descent algorithm to train the local model parameters, the stochastic gradient is calculated using formula (5):

[0036] g i,k = ▽l i (W i,k ; ξ i,k ) (5)

[0037] Where, g i,kDenote the client as C i The stochastic gradient computed at the k-th local iteration of a certain round of communication, l i Denote the local loss function on the client, ξ i,k Denote the random variable related to this computation, for example, the data point randomly sampled from the local dataset;

[0038] S5.2: Local client C i After the (k + 1)-th round of local training, obtain the latest local model W i,k+1 , and its training formula is:

[0039]

[0040] where η l is the learning rate of the local client;

[0041] S5.3: The operation to decrypt is as follows:

[0042] Furthermore, the latest local model parameters described in step S6.1 include:

[0043] The updated gradient of the local model: ΔW i,k+1 ←W i,k+1 -W g,t ;

[0044] Model parameters with high sensitivity:

[0045] Model parameters with low sensitivity:

[0046] Furthermore, the operation of encrypting with pk to obtain Subsequently, pack the two to obtain [ΔW i , and the specific encryption and packing operation methods are as follows:

[0047] The encryption operation for is as follows:

[0048] The packing operation is:

[0049] Furthermore, the operation method of the weighted average calculation described in step S7 is:

[0050] Use to perform weighted aggregation on the ciphertext parameters;

[0051] Use to perform weighted aggregation on the plaintext parameters.

[0052] Further, the specific process of step S9 is as follows:

[0053] S9.1: The server first randomly sends to τ marked clients for partial decryption: and then sends it back to the client for final decryption: to obtain the plaintext state of

[0054] S9.2: The new global model

[0055] (III) Beneficial effects

[0056] An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption proposed by the present invention has the following beneficial effects compared with the prior art:

[0057] (1) By combining adaptive homomorphic encryption with selective parameter encryption technology and a dynamic encryption adjustment mechanism, and combining client real-time data distribution and privacy sensitivity analysis, the present invention adaptively adjusts the proportion parameter of partial encryption (such as the sensitivity threshold that needs to be encrypted), optimizes communication overhead and resists malicious attacks. For example, when the proportion of highly sensitive parameters in the client's local data is relatively large, the sensitivity threshold is automatically increased to enhance the privacy protection effect, while selective parameter encryption only performs threshold homomorphic encryption on highly sensitive parameters (such as the weights of the feedforward layer and the gradients of the output layer) through privacy sensitivity analysis (such as encrypting 10% of the parameters in ResNet-50), significantly reducing the ciphertext calculation amount, where the encryption mask is generated from the global privacy sensitivity map to ensure that attackers cannot reverse-engineer the complete data from the plaintext part.

[0058] (2) The present invention can achieve asynchronous ciphertext aggregation and timeliness optimization. The asynchronous aggregation strategy: when the server receives locally updated data uploaded asynchronously, it selects the timing of aggregating the global model based on the number of clients uploading updates, preventing a reduction in global efficiency caused by dropped clients while also ensuring the number of clients in the working state, further improving the efficiency of global training. And the server only triggers the aggregation of the global model when it receives a sufficient number of local updates, also reducing the communication frequency.

[0059] (3) When performing federated learning, the present invention can not only reduce communication overhead but also resist the negative impact caused by overly long asynchronous client delays, while protecting personal privacy information, and has high scalability and performance, and can meet data scenarios of different scales. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 is a schematic diagram of the overall architecture of the system in the present invention.

[0061] Figure 2 This is the overall process schematic diagram of the present invention. Specific implementation manners

[0062] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Without departing from the design concept of the present invention, various variations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention should all fall within the protection scope of the present invention.

[0063] Embodiment 1:

[0064] As Figure 1 shown, an optimization system for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption, the specific architecture includes:

[0065] 1. Client: Assume that there are a total of n participating nodes, and the nodes are denoted as C1, C2,..., C n , and each node C i has a local dataset D i . The client is usually a personal device holding sensitive data, such as mobile phones, tablets, laptops, etc.

[0066] 2. Server: Receive the messages after the local training of the client, aggregate and update the global model parameters. The server is usually provided by the owner of the machine learning model.

[0067] For the federated learning method that can achieve both privacy protection and high accuracy in large-scale data scenarios, while reducing communication overhead, thereby improving the working efficiency of the system, overcoming the performance bottleneck, and making the entire model more practical.

[0068] Embodiment 2

[0069] As Figure 2 shown, an optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption, including the steps:

[0070] S1: The key generation center (KGC) is initialized to generate a threshold key pair: Send the public key pk to all clients and the server, and distribute the private key sk i to the client C i (i ∈ N). The method used by the KGC to generate the key is:

[0071] S2: The client is initialized. The client C i initializes a local model W based on the local dataset D i i,0 ​, receive the private key sk sent by KGC i After that, according to the local model W i,k (when initializing, the local iteration number k = 0), calculate the sensitivity analysis graph S of the local data i , C i Use the public key to encrypt the sensitivity analysis graph S i to obtain and send it to the server; including the steps:

[0072] S2.1: The client C i According to the local model W i,k Calculate Calculate using the Jacobian matrix of the gradient, that is, for the given model W i,k and K data samples of the data, through the input matrix X and the true label vector y,

[0073] Calculate the sensitivity analysis graph through the following formula (1);

[0074]

[0075] In the above formula, J m (y k ) is the Jacobian matrix, and the Jacobian matrix is as follows:

[0076]

[0077] In the above formula, l(·) is the loss function, ||·|| is the absolute value, w m is the gradient in the model, y k is the kth true label vector in the model, R represents the set of real numbers, is the partial derivative operator.

[0078] S2.2: The client encrypts the sensitivity analysis graph using homomorphic encryption:

[0079] S3: The server initializes the global model, an asynchronous buffer that can accommodate the parameters of m clients and the threshold τ for threshold decryption, and a counter a for recording the number of subsequent client sensitivity analysis graphs, and accepts from the client Every time it receives one it marks the client and sets a = a + 1.

[0080] S4: When the server receives m sensitivity analysis graphs, the server adaptively calculates the current appropriate partial encryption ratio p, then calculates the encryption mask M for selective parameter encryption, and at the same time sets a = 0. After calculating the server will and the initialized global model W and the initialized global model Wg,0 Sent to the m clients that uploaded previously , including the steps of:

[0081] S4.1: When the server collects m sensitivity analysis graphs, the server calculates the partial encryption ratio p according to formula (3);

[0082] p = σ(b(cr - d)) (3)

[0083] where is the sigmoid function, b is the sensitivity parameter that controls the change of the p value with cr, d is the sensitivity ratio threshold for setting the trigger of the p value adjustment, is the ratio of the number of high - sensitive parameters to the total number of parameters, where is the number of high - sensitive parameters whose sensitivity exceeds the threshold d, is the total number of parameters, such as S where the proportion of sensitive parameters is greater than or equal to 30% i .

[0084] S4.2: Calculate the encryption mask for selective parameter encryption The formula for

[0085]

[0086] where α i is the aggregation weight of client i, M is a mask with the same dimension as the model parameters, where:

[0087] S5: The client that receives the encryption mask and the global model W g,0 uses the stochastic gradient descent algorithm to train the local model, and at the same time uses the private key sk i to decrypt to obtain M, including the following steps:

[0088] S5.1: When the local client C i uses the stochastic gradient descent algorithm to train the local model parameters, it calculates the stochastic gradient using formula (5):

[0089] g i,k =▽l i (W i,k ; ξ i,k ) (5)

[0090] where g i,k represents the stochastic gradient calculated by client C i at the k - th local iteration of a certain round of communication, l i represents the local loss function on the client,,ξ i,kDenote the random variables related to this calculation, for example, the data points randomly sampled from the local dataset.

[0091] S5.2: Local client C i After the (k + 1)-th round of local training, obtain the latest local model W i,k+1 , and its training formula is:

[0092] W i,k+1 = W i,k -η l g i,k (6);

[0093] where η l is the local client learning rate.

[0094] S5.3: The operation of decrypting is as follows:

[0095] S6: The client obtains the latest local model parameters through training, and quantifies the sensitivity of each parameter to label changes through second-order gradient analysis, generates an encrypted sensitivity matrix and encrypts and uploads it to the server; the specific operation steps include:

[0096] S6.1: When the client performs the (k + 1)-th round of local training, obtain the latest local model parameters ΔW i of client C i,k+1 , and use M to distinguish them into model parameters with high sensitivity and low-sensitivity model parameters The latest local model parameters include:

[0097] The updated gradient of the local model: ΔW i,k+1 ←W i,k+1 -W g,t ;

[0098] Model parameters with high sensitivity:

[0099] Model parameters with low sensitivity:

[0100] S6.2: Encrypt with pk to obtain Then pack the two to get [ΔW i and send it to the server side. At the same time, recalculate the sensitivity analysis graph of the local data according to the new local model parameters W i,k+1 and wait to send it to the server when being selected next time. The specific encryption and packing operation methods are as follows:

[0101] For The encryption operation is as follows:

[0102] The packaging operation is as follows:

[0103] S6.3: Calculate the sensitivity analysis diagram of the new local data The steps are the same as those in S2.

[0104] S7: When the server collects m partially encrypted local model update parameters [W i , for the m and Separate weighted average calculations are performed respectively to obtain and The operation method of the weighted average calculation described above is:

[0105] Use To perform weighted aggregation on the ciphertext parameters.

[0106] Use To perform weighted aggregation on the plaintext parameters.

[0107] S8: Every time the server collects a local model update parameter, it randomly selects a client C outside the asynchronous buffer j (j ∈ N - m) and selects one, collects C j 's And send the current latest global model and partial encryption mask Let C j Start local model training, and at the same time let a = a + 1. When a = m, the server will execute the update of p and M in step S4.

[0108] S9: The server randomly selects τ clients required for threshold decryption and sends For partial decryption;

[0109] First, Randomly send it to τ marked clients for partial decryption:

[0110] Then send it back to the client for final decryption: Get the plaintext state of

[0111] Then pass it to the client for final decryption to get the plaintext state of The client will And Aggregate them together to calculate the new global model W g,t+1 ; The new global model is:

[0112]

[0113] Finally, put W g,t+1 With the new encryption mask Send it to subsequent clients for training.

[0114] Execute step S5 to carry out a new round of training. At this point, all the specific implementation steps are completed.

[0115] 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 optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption, characterized in that: Including the steps: S1: The key generation center KGC initializes and generates a threshold key pair: Send the public key pk to all clients and servers, and distribute the private key sk i to the client C i (i ∈ N); S2: Client Initialization, Client C i Initialize based on the local dataset D i Initialize a local model W i,k (At initialization, the local iteration number k = 0), receive the private key sk sent by the KGC i After that, according to the local model W i,k Calculate the sensitivity analysis graph S of the local data i , C i Use the public key to encrypt the sensitivity analysis graph S i to obtain and send it to the server; S3: The server initializes the global model, constructs an asynchronous buffer that can accommodate the parameters of m clients and a threshold τ for threshold decryption, as well as a counter a for recording the number of subsequent client sensitivity analysis graphs, and accepts from the clients Every time it receives one it marks the client and sets a = a + 1; S4: When the server receives m sensitivity analysis graphs, the server adaptively calculates the currently appropriate partial encryption ratio p according to and then calculates the encryption mask M for selective parameter encryption. At the same time, let a = 0; Calculated After that, the server will and the initialized global model W g,t (when initializing, the global iteration number t = 0) to the m clients that uploaded before previously; S5: The client receives the encrypted mask and the global model W g,t After that, the local model is trained using the stochastic gradient descent algorithm, and at the same time, the private key sk i is used to decrypt to obtain M; S6: The client obtains the latest local model parameters through training, quantifies the sensitivity of each parameter to label changes through second-order gradient analysis, generates an encrypted sensitivity matrix, and encrypts and uploads it to the server; the specific operation steps include: S6.1: When the client performs the (k + 1)-th round of local training, it obtains the latest local model parameter ΔW i of client C i,k+1 , and uses M to classify it into model parameters with high sensitivity and model parameters with low sensitivity S6.2: Encrypt with pk to obtain Subsequently, pack the two to obtain [ΔW i and send it to the server side. At the same time, according to the new local model parameter W i,k+1 recalculate the sensitivity analysis diagram of the local data Wait to send it to the server when selected next time, and calculate the sensitivity analysis diagram of the new local data in the same way as S2; S7: When the server collects m partially encrypted local model update parameters [W i , for the m and perform separate weighted average calculations respectively to obtain and S8: Every time the server collects the local model update parameters, randomly select one from the clients C j (j ∈ N - m), and collect C j 's and send the current latest global model and partial encryption masks Let C j start local model training, and at the same time let a = a + 1; when a = m, the server executes step S4 to update p and M; S9: The server randomly selects τ clients required for threshold decryption and sends them to perform partial decryption, and then sends it to the client for final decryption to obtain the plaintext state The client will and aggregate them together to calculate a new global model W g,t+1 , and then it will send W g,t+1 and the new encryption mask to the subsequent clients for training, execute step S5, and conduct a new round of training.

2. The optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption according to claim 1, wherein: The key pair generated in step S1 The method adopted is 3. An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption according to claim 1, characterized in that: The local model W described in step S2 i,k Calculate the sensitivity analysis diagram S of the local data i The specific process of which includes: Client C i According to the local model W i,k Calculate Calculate using the Jacobian matrix of the gradient; for a given local model W i,k And K data samples, input matrix X and true label vector y, calculate the sensitivity analysis diagram through the following formula (1); In the above formula, J m (y k ) is the Jacobian matrix, and the Jacobian matrix is as follows: In the above formula, is the loss function, ||·|| is the absolute value, and w m is the gradient in the model, and y k is the k-th true label vector in the model. R represents the set of real numbers, is the partial derivative operator; The described C i Use the public key to encrypt the sensitivity analysis diagram S i The specific operation method is as follows: The client uses homomorphic encryption to encrypt the sensitivity analysis diagram and obtains:

4. An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption according to claim 1, characterized in that: The specific process of step S4 includes: S4.1: When the server collects m sensitivity analysis diagrams, the server calculates the partial encryption ratio p according to formula (3); p = σ(b(cr - d)) (3) Among them, is the sigmoid function, b is the sensitivity parameter that controls the change of the p value with cr, and d is the threshold of the sensitivity ratio for setting the trigger of the p value adjustment. is the ratio of the number of high-sensitivity parameters to the total number of parameters, where is the number of high-sensitivity parameters whose sensitivity exceeds the threshold d, is the total number of parameters. For example, if the proportion of sensitive parameters is greater than or equal to 30% of S i ; S4.2: Calculate the encryption mask for selective parameter encryption The formula is as follows: where α i is the aggregation weight of client i, and M is a mask with the same dimension as the model parameters, where:

5. An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption according to claim 1, characterized in that: The specific operation steps of step S5 include: S5.1: Local client C i When training the local model parameters using the stochastic gradient descent algorithm, the stochastic gradient is calculated using formula (5): Among them, g i,k represents the random gradient calculated by the client C i at the k-th local iteration of a certain round of communication, represents the local loss function on the client, ξ i,k represents the random variable related to this calculation. For example, the data point randomly sampled from the local dataset; S5.2: Local client C i After the (k + 1)-th round of local training, the latest local model W is obtained i,k+1 , and its training formula is: W i,k+1 = W i,k - η l g i,k (6); Among them, η l is the local client learning rate; S5.3: The operation of decrypting is as follows:

6. An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption according to claim 5, characterized in that: The latest local model parameters described in step S6.1 include: Updated gradient of the local model: ΔW i,k+1 ←W i,k+1 -W g,t ; Model parameters with high sensitivity: Model parameters with low sensitivity:

7. An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption according to claim 6, characterized in that: The encryption using pk in step S6.2 yields Subsequently, the two are packaged to obtain [ΔW i , and the specific encryption and packaging operation methods are as follows: For the encryption operation is as follows: The packing operation is as follows:

8. An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption according to claim 1, characterized in that: The operation method of the weighted average calculation described in step S7 is: Use to perform weighted aggregation on the ciphertext parameters; Use Perform weighted aggregation on the plaintext parameters.

9. An optimization method for efficient asynchronous federated learning based on adaptive threshold homomorphic encryption according to claim 1, characterized in that: The specific process of step S9 is as follows: S9.1: First, the server randomly sends to τ marked clients for partial decryption: Then it sends it back to the clients for final decryption: to obtain the plaintext state of S9.2: New Global Model

Citation Information

Cited By

  • Big data privacy computing method and system based on cloud computing, electronic equipment and storage medium

    CN120880800A