Homomorphic encryption federated learning method based on polynomial decomposition problem
By adopting a homomorphic encryption method of polynomial decomposition problem in federated learning, and using anomalous integral to calculate the aggregation model parameters, the problems of data privacy protection and attack defense are solved, and low-complexity parameter weighted average and enhanced privacy security are achieved.
Patent Information
- Application Number
- CN202411019509.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-29
AI Technical Summary
In federated learning, how to effectively utilize data while protecting data privacy and prevent gradient inversion and data inference attacks remains a challenge that needs to be solved, especially when model training involves sensitive data.
Using homomorphic encryption federated learning method based on polynomial decomposition problem, the global model parameters are initialized through the server, the client trains and uploads the local model parameters to a trusted third-party encryption module, and converts them into polynomial fractions. The server uses anomalous integral to calculate the aggregate model parameters. , reduces computing complexity and enhances privacy and security.
It realizes low computational complexity of parameter ciphertext weighted average in federated learning, enhances privacy security, resists poisoning and inversion attacks of client model parameters, and improves data privacy protection capabilities.
Smart Images

Figure CN119011114A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of federated learning, and in particular to a homomorphic encryption federated learning method based on a polynomial decomposition problem. Background Art
[0002] Federated Learning is a distributed machine learning method that can achieve "data does not leave the local server". Its idea is: let the client complete the local training and then aggregate it uniformly. The steps are: the server broadcasts the global model to the client; the client starts to train the global model as a local model; after the training is completed, the clients upload the local model back to the server; the server performs a special aggregation operation to obtain a global model that meets all requirements, thereby achieving the effect that the data does not leave the client, but the model training is completed, eliminating the possibility of data leakage due to the needs of machine learning.
[0003] However, how to achieve effective use of data while protecting data privacy has become an urgent technical problem to be solved. Homomorphic encryption technology (FHE) provides a new direction for solving this problem with its unique feature that encrypted data can still be calculated. Homomorphic encryption (FHE) allows specific operations to be performed on encrypted data without decryption. Its core is to maintain the operational integrity of the data.
[0004] However, the computational complexity and performance overhead of homomorphic encryption (FHE) limit its widespread deployment in practical applications. As an emerging distributed machine learning paradigm, federated learning effectively solves the problems of data privacy and centralized storage and has a certain degree of security. However, when model training involves sensitive data, how to ensure data security during parameter exchange remains a challenge that needs to be solved, because federated learning may still be subject to gradient inversion and data inference attacks. Summary of the invention
[0005] In view of the deficiencies in the prior art, 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 the local data to train the global model as its own local model;
[0009] S3) After all clients have completed training, 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 design of the polynomial of the present invention is based on the polynomial interpolation of parameters. Finally, each parameter maintains a polynomial. During homomorphic encryption calculation, the weighted average of the ciphertext state of the parameters of all clients only needs to be calculated by a polynomial anomalous integral once. The calculation complexity is very small, which is 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 strengthen 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 reasoning and inversion attacks on the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a framework diagram of the method of Example 1 of the present invention;
[0018] Figure 2 Schematic diagram of the process of the method of Example 1 of the present invention;
[0019] Figure 3 It is a framework diagram of the method of embodiment 2 of the present invention; DETAILED DESCRIPTION
[0020] The specific implementation of the present invention will be further described below in conjunction with 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 framework of the federated learning of this embodiment uses the client to upload local model parameters, allowing the client to perform multiple gradient descents locally in one round of learning; the server obtains the final model by parameter weighted aggregation. 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 parameter w0, the client uses the 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 a 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 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.
[0026] In this embodiment, the third-party encryption module receives the local model parameters Transformed into 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 0 elements 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 of .
[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 the transformed parameter matrix The value of the parameter in the polynomial fraction matrix M corresponds to the position of f i,j (x) Make changes until local model parameters are received from all clients.
[0031] When all local model parameters are encrypted, all f in the polynomial fraction matrix M are encrypted. i,j (x) is scrambled by simplifying it into a polynomial fraction.
[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 i,j is the parameter matrix The parameter of the i-th row and j-th column; 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 the i-th row and j-th column, that is, Among them, b i,j,k is the i-th row and j-th column element corresponding to the matrixed parameter of the local model of the k-th 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 framework of the federated learning of this embodiment uses the client to upload local model parameters, allowing the client to perform multiple gradient descents locally in one round of learning; the server obtains the final model by parameter weighted aggregation. 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 parameter w0, the client uses the 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 Kth 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 Kth 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 0 elements 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 of .
[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 the 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 local model parameters are received from all clients.
[0054] When all local model parameters are encrypted, all f in the polynomial fraction matrix M are encrypted. i,j (x) can be scrambled by simplifying it into a polynomial fraction.
[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 i,j is the parameter matrix The parameter of the i-th row and j-th column; 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 inverse 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 the i-th row and j-th column, that is, Among them, b i,j,k is the i-th row and j-th column element corresponding to the matrixed parameter of the local model of the k-th 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 illustrating 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, all of which fall within the scope of the present invention to be protected.
Claims
1. A homomorphic encryption federated learning method based on 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 the local data to train the global model as its own local model; S3) After all clients have completed training, 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; 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.
2. According to claim 1, a homomorphic encryption federated learning method based on polynomial decomposition problem is characterized by: The third-party encryption module is a third-party encryption platform or client.
3. According to claim 1, a homomorphic encryption federated learning method based on polynomial decomposition problem is characterized in that: If the third-party encryption module is a client, the client does not participate in the training of the local model.
4. According to claim 2, a homomorphic encryption federated learning method based on polynomial decomposition problem is characterized in that: The third-party encryption module receives the local model parameters Transformed into 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 0 elements so that is an integer; then arrange all elements in the order of "row first then column" to n ′ Dimensional parameter matrix Its expression is as follows: Among them, b i,j for The parameter of the i-th row and j-th column of .
5. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 4 is characterized in that: Initialize an n ′ The polynomial fraction matrix M of dimension is used to place the 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.
6. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 5, characterized in that: The parameter matrix of the third-party encryption module for converting the local model parameters Do the following: In the formula, W is xe x The inverse function of i,j is the parameter matrix The parameter of the i-th row and j-th column; x is the function f i,j (x) is the unknown independent variable.
7. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 6 is characterized by: 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 .
8. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 7 is characterized by: The calculation formula of the abnormal integral is: Among them, parameter i,j is the aggregated model parameter of the i-th row and j-th column, that is, Among them, b i,j,k is the i-th row and j-th column element corresponding to the matrixed parameter of the local model of the k-th 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.
9. The homomorphic encryption federated learning method based on the polynomial decomposition problem according to claim 8, characterized in that: 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
Verifiable privacy protection federated learning method and system
CN116467736A
Verifiable federated learning method based on hybrid homomorphic encryption
CN116667996A
Secret sharing-based model aggregation method in federated learning
CN117131537A
Federal learning privacy protection method based on differential privacy and homomorphic encryption
CN117421762A
Cited By
Data privacy protection method under federated learning framework and medical service system
CN119312400A
A data privacy protection method and medical service system under a federated learning framework
CN119312400B
Data privacy protection method under federated learning framework and medical service system
CN119862605A
Multi-party data model training method and device based on privacy protection
CN120373396A
Multi-party data model training method and device based on privacy protection
CN120373396B
