A homomorphic encryption federated learning method based on polynomial decomposition problem
By adopting the homomorphic encryption method of polynomial decomposition problem in federated learning, the local model parameters of the client are converted into polynomial fractional matrix, and anomalous integral calculation is performed on the server side, data privacy protection and security issues are solved, and efficient data utilization and attack protection are achieved.
Patent Information
- Application Number
- CN202411019509.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2044-07-29
AI Technical Summary
How to effectively utilize data while protecting data privacy, especially in federated learning how to ensure data security during parameter exchange and prevent gradient inversion and data inference attacks.
The homomorphic encryption method based on polynomial decomposition problem is adopted to convert the local model parameters of the client into a polynomial fraction matrix, and the encryption is performed through a third-party encryption module, and the anomalous integral calculation is finally performed on the server side to restore the aggregated model.
Reduces computational complexity, is suitable for federated learning scenarios with frequent communication, enhances privacy and security, and prevents poisoning and inference attacks of model parameters.
Smart Images

Figure CN119011114B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of federated learning technology, and in particular to a homomorphic encryption federated learning method based on the polynomial decomposition problem. Background Art
[0002] Federated Learning is a distributed machine learning method that can achieve "data does not leave the local machine". Its idea is: let the client complete local training and then aggregate it uniformly. The steps are as follows: the server broadcasts the global model to the client; the client begins to train the global model into a local model; after training is complete, the client uploads the local model back to the server; the server performs a special aggregation operation to obtain a global model that meets all requirements, thus achieving the effect of "data does not leave the client, but model training is completed", eliminating the possibility of data leakage due to the needs of machine learning.
[0003] However, how to effectively utilize data while protecting its privacy has become a pressing technical challenge. FHE, with its unique ability to maintain computational capabilities on encrypted data, offers a new avenue for addressing this challenge. FHE allows specific operations to be performed on encrypted data without decrypting it, with the core goal of preserving the computational integrity of the data.
[0004] However, the computational complexity and performance overhead of homomorphic encryption (FHE) limit its widespread deployment in practical applications. Federated learning, as an emerging distributed machine learning paradigm, effectively addresses data privacy and centralized storage issues, offering a certain level of security. However, when model training involves sensitive data, ensuring data security during parameter exchange remains a pressing challenge, as federated learning is still vulnerable to gradient inversion and data inference attacks. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present invention provides a homomorphic encryption federated learning method based on the polynomial decomposition problem to further improve the privacy security of federated learning.
[0006] The technical solution of the present invention is: a homomorphic encryption federated learning method based on the polynomial decomposition problem, comprising the following steps:
[0007] S1) The server starts a round of federated learning training, initializes the global model parameters, and broadcasts the global model parameters to each client;
[0008] S2) After receiving the global model parameters, the client uses local data to train the global model as its own local model;
[0009] S3) After all client training is completed, the local model parameters are sent to the designated trusted third-party encryption module;
[0010] S4), the third-party encryption module converts the received local model parameters of the client into a parameter matrix of the same type; initializes the element positions in the parameter matrix to polynomial fractions; and sends the polynomial fractions of all clients to the server;
[0011] S5) After receiving the polynomial fraction from the third-party encryption module, the server uses the definition method to calculate the corresponding abnormal integral and gradually restores the aggregated model.
[0012] Preferably, the third-party encryption module is a third-party encryption platform or client.
[0013] Preferably, if the third-party encryption module is a client, the client does not participate in the training of the local model.
[0014] The beneficial effects of the present invention are:
[0015] 1. The polynomial design of the present invention is based on polynomial interpolation of parameters. Ultimately, each parameter maintains a polynomial. During homomorphic encryption calculations, the weighted average of the ciphertext parameters of all clients can be obtained by only performing a single polynomial anomalous integral calculation. Its computational complexity is very low, making it particularly suitable for scenarios such as federated learning where there are many communication interactions.
[0016] 2. The present invention can further prevent privacy leakage and enhance the privacy security of the federated learning framework; the present invention has the advantage of being able to resist poisoning attacks on client model parameters, and model reasoning and inversion attacks. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is a framework diagram of the method of Example 1 of the present invention;
[0018] Figure 2 Schematic diagram of the process of Example 1 of the present invention;
[0019] Figure 3 This is a framework diagram of the method of Example 2 of the present invention; DETAILED DESCRIPTION
[0020] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:
[0021] like Figure 1 and 2As shown, this embodiment provides a homomorphic encryption federated learning method based on the polynomial decomposition problem. The federated learning framework of this embodiment uses the client to upload local model parameters. During a round of learning, the client is allowed to perform multiple gradient descents locally. The server obtains the final model by weighted aggregation of parameters. It includes the following steps:
[0022] S1) The server starts a round of federated learning training, initializes the global model parameter w0, and broadcasts the global model parameter w0 to each client;
[0023] S2) After receiving the global model parameters w0, the client uses local data to train the global model as its own local model;
[0024] S3) After all clients have completed training, the local model parameters Uploaded to the designated trusted third-party encryption module in the form of a matrix; Represents the local model parameters of the k-th client in the t+1-th round of training;
[0025] S4), the third-party encryption module converts the local model parameters received from the client into a parameter matrix of the same type; and initializes the element positions in the parameter matrix to polynomial fractions.
[0026] In this embodiment, the third-party encryption module receives the local model parameters Convert to a parameter matrix of the same type In this embodiment, the n-dimensional local model parameter vector Expand the a dimension downward based on , and fill in the 0 element so that is an integer; then all elements are arranged in the order of "row first, column later" to form an n'-dimensional parameter matrix Its expression is as follows:
[0027]
[0028] Among them, b i,j for The parameter of the i-th row and j-th column.
[0029] In addition, this embodiment initializes an n′-dimensional polynomial fraction matrix M for placing polynomial fractions; the corresponding local model parameters in the matrix M are The transformed parameter matrix The element positions of are initialized to the polynomial fraction f i,j (x)=0.
[0030] Each time a client's local model parameters are received According to its transformed parameter matrix The value of the parameter in the polynomial fraction matrix M corresponds to the position f i,j (x) Make changes until all clients’ local model parameters are received.
[0031] When all local model parameters are encrypted, all f in the polynomial fraction matrix M are encrypted. i,j (x) Simplify the polynomial fraction into a scrambled one.
[0032] The parameter matrix of the third-party encryption module for the local model parameters Do the following:
[0033]
[0034] In the formula, W is xe x The inverse function of b i,j is the parameter matrix The parameter of row i and column j; x is the function f i,j (x) is the unknown independent variable.
[0035] S5), the third-party encryption module sends the final polynomial fraction matrix M to the server;
[0036] S6) After receiving the polynomial fraction matrix M from the third-party encryption module, the server uses the definition method to calculate the specified abnormal integral, and uses the abnormal integral to gradually restore the aggregated model.
[0037] The server receives the polynomial fraction element f in the matrix M from the third-party encryption module. i,j (x) Calculate the abnormal integral parameter i,j ; Gradually restore the aggregation parameters of each element position; then restore the first n elements in M in the order of "row first, column later" to the aggregation parameter vector w t+1 .
[0038] In this embodiment, the calculation formula of the abnormal integral is:
[0039]
[0040] Among them, parameter i,j is the aggregated model parameter of row i and column j, that is, Among them, b i,j,k is the element in row i and column j corresponding to the matrixed parameter of the local model of the kth client; K represents the number of clients participating in the training; x is the function f i,j (x)cos x is the unknown independent variable.
[0041] After completing this round of training, the server will set the new global model parameters w t+1 Sent to each client participating in the training as the initial parameters for the next round of training;
[0042] Repeat the above steps until the maximum number of training rounds is reached.
[0043] Example 2
[0044] like Figure 3 As shown, this embodiment provides a homomorphic encryption federated learning method based on the polynomial decomposition problem. The federated learning framework of this embodiment uses the client to upload local model parameters. During a round of learning, the client is allowed to perform multiple gradient descents locally. The server obtains the final model by weighted aggregation of parameters. It includes the following steps:
[0045] S1) The server starts a round of federated learning training, initializes the global model parameter w0, and broadcasts the global model parameter w0 to each client;
[0046] S2) After receiving the global model parameters w0, the client uses local data to train the global model as its own local model;
[0047] S3) When the training of the 1st to K-1th clients is completed, the local model parameters Uploaded to the K-th client in the form of a matrix; among them, represents the parameters of the t+1th training of the sth client (s≤K-1);
[0048] S4), the K-th client converts the received local model parameters of the client into a parameter matrix of the same type; and initializes the element positions in the parameter matrix to polynomial fractions.
[0049] In this embodiment, the local model parameters received by the K-th client are Convert to parameter matrix In this embodiment, the n-dimensional local model parameter vector Expand the a dimension downward based on , and fill in the 0 element so that is an integer; then all elements are arranged in the order of "row first, column later" to form an n'-dimensional parameter matrix Its expression is as follows:
[0050]
[0051] Among them, b i,j for The parameter of the i-th row and j-th column.
[0052] In addition, this embodiment initializes an n′-dimensional polynomial fraction matrix M for placing polynomial fractions; the corresponding local model parameters in the matrix M are The transformed parameter matrix The element positions of are initialized to the polynomial fraction f i,j (x)=0.
[0053] Each time a client's local model parameters are received According to its transformed parameter matrix The value of the parameter in the polynomial fraction matrix M corresponds to the position f i,j (x) Make changes until all clients’ local model parameters are received.
[0054] When all local model parameters are encrypted, all f in the polynomial fraction matrix M are encrypted. i,j (x) Simplify the polynomial fraction into a scrambled one.
[0055] The parameter matrix of the local model parameters of the K-th client including itself Do the following:
[0056]
[0057] In the formula, W is xe x The inverse function of b i,j is the parameter matrix The parameter of row i and column j; x is the function f i,j (x) is the unknown independent variable.
[0058] S5), the Kth client sends the final polynomial fraction matrix M to the server;
[0059] S6) After receiving the polynomial fraction matrix M from the K-th client, the server uses the definition method to calculate the specified abnormal integral, and uses the abnormal integral to gradually restore the aggregated model.
[0060] The server receives the polynomial fraction element f in the matrix M from the Kth client. i,j (x) Calculate the abnormal integral parameter i,j ; Gradually restore the aggregation parameters of each element position; then restore the first n elements in M in the order of "row first, column later" to the aggregation parameter vector w t+1 .
[0061] In this embodiment, the calculation formula of the abnormal integral is:
[0062]
[0063] Among them, parameter i,j is the aggregated model parameter of row i and column j, that is, Among them, b i,j,k is the element in row i and column j corresponding to the matrixed parameter of the local model of the kth client; K represents the number of clients participating in the training; x is the function f i,j (x)cos x is the unknown independent variable.
[0064] After completing this round of training, the server will set the new global model parameters w t+1 Sent to each client participating in the training as the initial parameters for the next round of training;
[0065] Repeat the above steps until the maximum number of training rounds is reached.
[0066] The above embodiments and descriptions are only for explaining the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, which shall fall within the scope of the invention to be protected.
Claims
1. A homomorphic encryption federated learning method based on the polynomial decomposition problem, characterized in that: The following steps are involved: S1) The server starts a round of federated learning training, initializes the global model parameters, and broadcasts the global model parameters to each client; S2) After receiving the global model parameters, the client uses local data to train the global model as its own local model; S3) After all client training is completed, the local model parameters are sent to the designated trusted third-party encryption module; S4), the third-party encryption module converts the received local model parameters of the client into a parameter matrix of the same type; Initialize the element positions in the parameter matrix to polynomial fractions; and send the polynomial fractions of all clients to the server; The third-party encryption module will receive the local model parameters Convert to a parameter matrix of the same type The local model parameter vector in n dimensions Expand the a dimension downward based on , and fill in the 0 element so that is an integer; then all elements are arranged in the order of "row first, column later" to form an n'-dimensional parameter matrix Its expression is as follows: Among them, b i,j for The parameter of row i and column j; The parameter matrix of the local model parameter conversion by the third-party encryption module Do the following: In the formula, W is xe x The inverse function of b i,j is the parameter matrix The parameter of row i and column j; x is the function f i,j (x) is the unknown number of independent variables; S5), after receiving the polynomial fraction from the third-party encryption module, the server uses the definition method to calculate the corresponding abnormal integral and gradually restore the aggregated model; The server receives the polynomial fraction element f in the matrix M from the third-party encryption module. i,j (x) Calculate the abnormal integral parameter i,j ; Gradually restore the aggregation parameters of each element position; then restore the first n elements in M in the order of "row first, column later" to the aggregation parameter vector w t+1 ; The calculation formula of the abnormal integral is: Among them, parameter i,j is the aggregated model parameter of row i and column j, that is, Among them, b i,j,k is the element in row i and column j corresponding to the matrixed parameter of the local model of the kth client; K represents the number of clients participating in the training; x is the function f i,j (x)The independent variable of cosx is unknown.
2. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 1 is characterized by: The third-party encryption module is a third-party encryption platform or client.
3. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 1 is characterized by: If the third-party encryption module is a client, the client does not participate in the training of the local model.
4. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 1 is characterized by: Initialize an n′-dimensional polynomial fraction matrix M to place the polynomial fraction; the corresponding local model parameters in the matrix M The transformed parameter matrix The element positions of are initialized to the polynomial fraction f i,j (x)=0.
5. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 1 is characterized by: After completing this round of training, the server will set the new global model parameters w t+1 Sent to each client participating in the training as the initial parameters for the next round of training.
Citation Information
Patent Citations
Federal learning privacy protection method based on block chain and homomorphic encryption
CN115549888A