Linear regression model federated learning training method based on homomorphic encryption
Through the additive homomorphic encryption algorithm using the superimposed matrix multiplication protocol in the linear regression model, the ciphertext rotation operation and communication overhead is reduced, and the problem of large communication volume in the homology encryption stage in the existing technology is solved, achieving high efficiency and security federal learning training.
Patent Information
- Application Number
- CN202411031498.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-15
AI Technical Summary
In the prior art, the privacy protection machine learning model training method based on homomorphic encryption has a large communication volume during the homomorphic encryption stage, resulting in excessive computing overhead and communication overhead, affecting the training efficiency and performance of the model.
The federated learning training method of linear regression model based on homomorphic encryption is adopted. Through the additive homomorphic encryption algorithm of the superimposed matrix multiplication protocol, the linear regression model is trained to reduce the ciphertext rotation operation and communication overhead, and realize an efficient and secure two-party model. train.
It reduces the amount of computation and communication, improves the training efficiency and security of the model, solves the problem of poor online computing performance in traditional solutions, and achieves more efficient federated learning training.
Smart Images

Figure CN118966382A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a linear regression model federated learning training method, and in particular to a linear regression model federated learning training method based on homomorphic encryption, which belongs to the technical field of privacy data encryption computing. Background Art
[0002] Traditional machine learning model training is usually centralized, that is, all data is concentrated in a central node for training. However, there may be a risk of data privacy leakage, especially in joint learning scenarios involving multiple data holders. In order to solve the impact of data silos on machine learning models, federated learning came into being. Its most fundamental function is to jointly train a machine learning model without sharing the privacy data of each data participant. In most cases, the model accuracy is not significantly lower than that of centralized machine learning.
[0003] In the existing technology, federated learning is mainly divided into three types, namely horizontal federated learning, vertical federated learning and transfer federated learning. The three are aimed at different application scenarios, and the security technologies and algorithms used are also quite different. Horizontal federated learning, also known as feature-aligned federated learning, is mainly used in scenarios where the data features of participants overlap a lot but the sample IDs overlap less. It is essentially a union of samples; vertical federated learning is mainly used in scenarios where the sample IDs overlap a lot but the feature overlap is not high. Compared with horizontal federated learning, its core is how to encrypt and achieve sample alignment, that is, to combine different features and labels of different sample IDs into one piece of data in an encrypted state, which is essentially a union of features; federated transfer learning is more novel. When the features of the participants overlap little with the sample IDs, federated transfer learning can come in handy. It realizes the migration capability of the model by finding the similarities between the source domain and the target domain; FATE framework (FederatedAI Technology FATE is the world's first industrial-grade open source framework for federated learning. Its main security protocols are secure multi-party computing and homomorphic encryption technology. It has been put into practical use in thousands of enterprises and universities. As a relatively mature industrial-grade privacy computing framework, FATE's traditional machine learning model has many advantages, such as strong ease of use, high code encapsulation level, front-end interface, and less code to write. It is very user-friendly and still maintains a relatively fast update and maintenance speed. Its development prospects are very broad. The main idea of homomorphic encryption (HE) is to encrypt data using homomorphic encryption, perform operations on the encrypted data, and decrypt the data after the calculation is completed. The decrypted result is consistent with the result obtained by performing the same operation on the unencrypted data. Homomorphic encryption mainly supports addition and multiplication. When a homomorphic encryption algorithm only supports addition or multiplication, the algorithm is called a semi-homomorphic encryption algorithm (Partially Homomorphic Encryption, PHE). If both operations are supported, it is called a fully homomorphic encryption algorithm (Fully Homomorphic Encryption, PHE). Encryption, FHE).
[0004] Common privacy-preserving machine learning model training methods based on cryptographic technology are as follows: (1) Differential privacy: In neural network training, differential privacy is achieved by adding noise to the gradient calculation process, thereby protecting the privacy of the input data of each participant. In order to ensure differential privacy, it is necessary to add noise to the local model update of each participant in federated learning. The added noise is usually related to the data volume, data distribution and privacy parameters of the participant. Differential privacy can protect data privacy to a certain extent, but its disadvantage is that when adding noise to the gradient, the added noise may interfere with the true gradient signal, which may cause the model performance to degrade, thereby affecting the learning effect of the model. In addition, in order to ensure sufficient privacy protection, the noise that needs to be added may be large, which in turn affects the accuracy and performance of the model. (2) Secure multi-party computation: Neural network training can use homomorphic encryption technology to encrypt the linear layer and secret sharing to realize secure nonlinear layer, so as to update and calculate the model while protecting data privacy. The disadvantage of secure multi-party computation is that the computational overhead is large and the implementation is complex. In practice, technologies such as homomorphic encryption and secret sharing may cause a lot of computational cost and communication overhead. Especially in the scenario of processing large-scale data, deployment requires complex configuration and management, which increases the maintenance cost and risk of the system.
[0005] In summary, in order to address the privacy issues and deployment challenges in machine learning model reasoning, a privacy-preserving machine learning model training method with strong security and low computational complexity is needed. Summary of the invention
[0006] A brief overview of the present invention is provided below in order to provide a basic understanding of certain aspects of the present invention. It should be understood that this overview is not an exhaustive overview of the present invention. It is not intended to identify key or important parts of the present invention, nor is it intended to limit the scope of the present invention. Its purpose is merely to present certain concepts in a simplified form as a prelude to a more detailed description discussed later.
[0007] In view of this, in order to solve the problem of large communication volume in the homomorphic encryption stage of the traditional privacy protection machine learning model training method in the prior art, the present invention provides a linear regression model federated learning training method based on homomorphic encryption.
[0008] The technical solution is as follows: A linear regression model federated learning training method based on homomorphic encryption, which specifically includes the following steps:
[0009] S1. Build a linear regression model and its loss function. The user side holds the data features, the service side holds the initial parameters, and the data features input to the linear regression model are encrypted to obtain the input code.
[0010] S2. In the vertical federated learning scenario, the user and service parties use the additive homomorphic encryption algorithm of the superposition matrix multiplication protocol to train the linear regression model, that is, to update the initial parameters and input encoding to obtain the updated ciphertext polynomial;
[0011] S3. The updated ciphertext polynomial is decrypted by the coordinator and sent to the service provider and the user. The gradient and loss function are updated according to the gradient descent method selected by the linear regression model. The training is terminated based on the judgment conditions. The above steps are repeated until the linear regression model training is completed.
[0012] Furthermore, in the linear regression model in S1, the client C holds the private data X, and the server S holds the linear regression model parameters W, Θ j ∈W, client C is the user C i ={C1,C2,…,C n}, server S is the service provider S i ={S1,S2,…,S n}, X=(x1,y1),(x2,y2),…,(x n ,y n );
[0013] The linear regression model is expressed as:
[0014]
[0015] in, is the data feature of the first participant A, is the data feature of the second participant B, A,B∈C, x i is the data feature, Θ A is the initial parameter of the first participant A, Θ B is the initial parameter of the second participant B, Θ A ,Θ B ∈Θ j , Θ j is the initial parameter of the participants, Θ j ∈W,y i is the data label, i=1,2,...n, n is the number of samples owned by both parties;
[0016] Loss Function It is expressed as:
[0017]
[0018] Among them, λ is the normalization parameter;
[0019] The data feature x is fixed by the function fix(x) iConvert it to a fixed-point number representation, and after the truncation is accurate through the length parameter s' of the binary truncation bit, the fixed-point number is embedded in the secret sharing ring. i When it is a non-negative number, the fixed-point number embedded in the secret sharing ring, i.e., the input code a, is expressed as otherwise in, Indicates that the modulus is 2 l The ring is the secret sharing ring, and l is a positive integer, which represents the bit width of the secret sharing ring.
[0020] Further, in S2, the parameters defined by the matrix multiplication protocol include the order N of the polynomial ring, the large prime number q and the modulus p, and the additive homomorphic encryption algorithm AHE of the superposition matrix multiplication protocol is defined, AHE = (KeyGen; Enc; Dec; Eval);
[0021] Input the security parameter key into the linear regression model, and obtain the public key pk and private key sk through the key generator KeyGen, that is, KeyGen(1 key )→(pk,sk), in, represents a ring working on a large prime number q, x i N +1 is a polynomial of order N, Indicates the quotient ring;
[0022] Input plaintext polynomial into linear regression model and the public key pk, and the ciphertext polynomial is obtained through the homomorphic encryption algorithm Enc Right now The encryption algorithm Enc includes homomorphic addition, polynomial-based homomorphic multiplication, and secure matrix multiplication;
[0023] The homomorphic addition process is as follows: User C performs homomorphic encryption on the input code a and obtains the first ciphertext Sent to the corresponding service provider S, the service provider S labels the input data y i Perform homomorphic encryption to obtain the second ciphertext Calculate the first ciphertext and the second ciphertext The addition of , get the ciphertext addition result
[0024] The polynomial-based homomorphic multiplication process is as follows: represents the polynomial of the input encoding a, The i-th coefficient of the polynomial representing the input encoding a is given by Compute the first ciphertext on the quotient ring and the second ciphertext The multiplication of , get the ciphertext multiplication result definition in, is the result of ciphertext multiplication The i-th coefficient of j represents the index of other coefficients before and after the i-th coefficient, which is used to extract the encoded polynomial, i.e., the first ciphertext. and the second ciphertext The coefficients of the ciphertext are multiplied to obtain the result mod represents the modulus operation, which is used to find the remainder after a number is divided by the modulus;
[0025] The security matrix multiplication process is as follows: Define the first packaging method π L And the second packaging method π R , in, Represents a matrix of dimension m×n, whose elements are taken from the modulus 2 l The ring, Represents a matrix of dimension n×k, whose elements are taken from the matrix modulo 2 l The above packing method is used to pack the input matrix, i.e., the user-side ciphertext matrix X' and the server-side ciphertext matrix Y', into a polynomial expression on the quotient ring by extracting the matrix values from the indexes of the input matrix. The polynomial expression on the quotient ring is expressed as: in, Among them, n represents the number of rows of the user's ciphertext matrix X', m represents the number of columns of the user's ciphertext matrix X', and k represents the number of columns of the service's ciphertext matrix Y'. During the packaging process, the first ciphertext and the second ciphertext The coefficients of the initial polynomial are set to 0, and the corresponding position coefficients are updated according to the above ciphertext multiplication to obtain the security matrix multiplication result Z, Z = XY mod 2 l ;
[0026] Input the private key sk and ciphertext polynomial into the linear regression model Recover the plaintext polynomial by decryption algorithm Dec That is,
[0027] Enter the public key pk in the linear regression model, including the first plaintext polynomial The first ciphertext polynomial Contains the second plaintext polynomial The second ciphertext polynomial And the linear function Func, update the ciphertext polynomial through the operation function Eval Get the updated inclusion The ciphertext polynomial
[0028] Furthermore, in S3, the judgment condition is expressed as: by setting a threshold, the coordinator updates the loss function The difference between the loss functions of the last two rounds is compared with the threshold. If the change in the loss function is less than the threshold, it means that the linear regression model has converged. Then the linear regression model is judged to stop training, otherwise a new training cycle will be continued.
[0029] The beneficial effects of the present invention are as follows: the present invention designs a privacy-preserving linear regression protocol, i.e., a linear regression model of encrypted input data features, realizes privacy protection for both the user and the service party during the distributed training stage of the model, and designs a federated learning framework with an additive homomorphic encryption algorithm of a superposition matrix multiplication protocol based on the principle of multiple users conducting secure two-party model training with a single service party respectively; the additive homomorphic encryption algorithm of the superposition matrix multiplication protocol enables the present invention to support secure two-party linear layer operations commonly used in machine learning, including homomorphic addition, polynomial-based homomorphic multiplication, and secure matrix multiplication, among which, for homomorphic operations with larger overhead, Matrix multiplication: Traditional solutions usually require the user to encrypt private data and send it to the service provider for secure multiplication, which requires more ciphertext rotations to achieve ciphertext dot products, thereby achieving homomorphic ciphertext multiplication, and has a large performance overhead. However, the present invention reduces more ciphertext rotation operations and communication overhead compared to traditional solutions through two packaging methods. The federated learning framework introduces a secure two-party protocol with efficient online computing to achieve an efficient solution for secure training models of multiple users on the same server in federated learning, solving the problem of poor online computing performance in the training phase in traditional solutions. Therefore, the present invention has stronger security and lower computing and communication volume. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0031] Figure 1 This is a flowchart of the federated learning training method for linear regression models based on homomorphic encryption;
[0032] Figure 2 The diagram is a schematic diagram of an implementation scheme of the framework structure of a linear regression model federated learning training method based on homomorphic encryption. DETAILED DESCRIPTION
[0033] In order to make the technical solutions and advantages of the embodiments of the present invention more clearly understood, the exemplary embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other without conflict.
[0034] refer to Figure 1 and Figure 2 The present embodiment is described in detail, and the linear regression model federated learning training method based on homomorphic encryption specifically includes the following steps:
[0035] S1. Build a linear regression model and its loss function. The user side holds the data features, the service side holds the initial parameters, and the data features input to the linear regression model are encrypted to obtain the input code.
[0036] S2. In the vertical federated learning scenario, the user and service parties use the additive homomorphic encryption algorithm of the superposition matrix multiplication protocol to train the linear regression model, that is, to update the initial parameters and input encoding to obtain the updated ciphertext polynomial;
[0037] S3. The updated ciphertext polynomial is decrypted by the coordinator and sent to the service provider and the user. The gradient and loss function are updated according to the gradient descent method selected by the linear regression model. The training is terminated based on the judgment conditions. The above steps are repeated until the linear regression model training is completed.
[0038] Furthermore, in the linear regression model in S1, the client C holds the private data X, and the server S holds the linear regression model parameters W, Θ j ∈W, client C is the user C i ={C1,C2,…,C n}, server S is the service provider S i ={S1,S2,…,S n}, X=(x1,y1),(x2,y2),…,(x n ,y n );
[0039] The linear regression model is expressed as:
[0040]
[0041] in, is the data feature of the first participant A, is the data feature of the second participant B, A,B∈C, x i is the data feature, Θ Ais the initial parameter of the first participant A, Θ B is the initial parameter of the second participant B, Θ A ,Θ B ∈Θ j , Θ j is the initial parameter of the participants, Θ j ∈W,y i is the data label, i=1,2,...n;
[0042] Loss Function It is expressed as:
[0043]
[0044] Among them, λ is the normalization parameter;
[0045] The data feature x is fixed by the function fix(x) i Convert it to a fixed-point number representation, and after the truncation is accurate through the length parameter s' of the binary truncation bit, the fixed-point number is embedded in the secret sharing ring. i When it is a non-negative number, the fixed-point number embedded in the secret sharing ring, i.e., the input code a, is expressed as otherwise in, Indicates that the modulus is 2 l The ring is the secret sharing ring, l is a positive integer, which represents the bit width of the secret sharing ring;
[0046] Specifically, in the vertical linear regression of federated learning, since the first participant A and the second participant B have samples with different feature numbers, it is necessary to align the samples first. Generally, the private set intersection implemented by the conventional RSA encryption algorithm and hash function is used to obtain the linear regression data features of the two participants. and The present invention directly uses the data features of the first participant A and the data characteristics of the second participant B
[0047] During the data feature encryption stage, since the input data features, i.e., the privacy data of the data provider, are mostly represented by floating-point numbers, and only fixed-point numbers are supported in secure multi-party computing, conversion is required.
[0048] Further, in S2, the parameters defined by the matrix multiplication protocol include the order N of the polynomial ring, the large prime number q and the modulus p, and the additive homomorphic encryption algorithm AHE of the superposition matrix multiplication protocol is defined, AHE = (KeyGen; Enc; Dec; Eval);
[0049] The security parameter key is input into the linear regression model. The security parameter determines the length of the key, which directly affects the efficiency and security of the encryption algorithm. The public key pk and private key sk are obtained through the key generator KeyGen, that is, KeyGen(1 key )→(pk,sk), in, represents a ring working on a large prime number q, x i N +1 is a polynomial of order N, Indicates the quotient ring;
[0050] Input plaintext polynomial into linear regression model and the public key pk, and the ciphertext polynomial is obtained through the homomorphic encryption algorithm Enc Right now The encryption algorithm Enc includes homomorphic addition, polynomial-based homomorphic multiplication, and secure matrix multiplication;
[0051] The homomorphic addition process is as follows: User C performs homomorphic encryption on the input code a and obtains the first ciphertext Sent to the corresponding service provider S, the service provider S labels the input data y i Perform homomorphic encryption to obtain the second ciphertext Calculate the first ciphertext and the second ciphertext The addition of , get the ciphertext addition result
[0052] The polynomial-based homomorphic multiplication process is as follows: represents the polynomial of the input encoding a, The i-th coefficient of the polynomial representing the input encoding a is given by Compute the first ciphertext on the quotient ring and the second ciphertext The multiplication of , get the ciphertext multiplication result definition in, is the result of ciphertext multiplication The i-th coefficient of j represents the index of other coefficients before and after the i-th coefficient, which is used to extract the encoded polynomial, i.e., the first ciphertext. and the second ciphertext The coefficients of the ciphertext are multiplied to obtain the result mod represents the modulus operation, which is used to find the remainder after a number is divided by the modulus;
[0053] The security matrix multiplication process is as follows: Define the first packaging method π L And the second packaging method π R , in, Represents a matrix of dimension m×n, whose elements are taken from the modulus 2 l The ring, Represents a matrix of dimension n×k, whose elements are taken from the matrix modulo 2 l The above packing method is used to pack the input matrix, i.e., the user-side ciphertext matrix X' and the server-side ciphertext matrix Y', into a polynomial expression on the quotient ring by extracting the matrix values from the indexes of the input matrix. The polynomial expression on the quotient ring is expressed as: in, Among them, n represents the number of rows of the user's ciphertext matrix X', m represents the number of columns of the user's ciphertext matrix X', and k represents the number of columns of the service's ciphertext matrix Y'. During the packaging process, the first ciphertext and the second ciphertext The coefficients of the initial polynomial are set to 0, and the corresponding position coefficients are updated according to the above ciphertext multiplication to obtain the security matrix multiplication result Z, Z = XY mod 2 l ;
[0054] Input the private key sk and ciphertext polynomial into the linear regression model Recover the plaintext polynomial by decryption algorithm Dec That is,
[0055] Enter the public key pk in the linear regression model, including the first plaintext polynomial The first ciphertext polynomial Contains the second plaintext polynomial The second ciphertext polynomial And the linear function Func, update the ciphertext polynomial through the operation function Eval Get the updated inclusion The ciphertext polynomial
[0056] Specifically, the homomorphic encryption scheme (Brakerski Fan Vercauteren, BFV) adopted by the present invention is an additively homomorphic encryption algorithm (Additively Homomorphic Encryption, AHE), and this embodiment adopts the stochastic gradient descent method (SGD) for parameter update;
[0057] The gradient descent process is expressed as:
[0058]
[0059]
[0060] in, is the loss function of the first participant A, is the first parameter, is the second parameter, d i The loss function value calculated for the i-th dimension data;
[0061] The principle of the linear regression model training phase is as follows: As a homomorphic encryption operation, party takes A or B, representing the additive homomorphic ciphertext value owned by the first participant A or the second participant B. The first participant A calculates the encrypted first parameter And the loss function of the first party A after encryption Sent to the second participant B, who calculates the encrypted second parameter The encrypted loss function value [[d i ]] and the encrypted loss function The encrypted loss function Sent to the neutral service provider S, encrypted Sent to the first participant A, the first participant A and the second participant B initialize the random mask Calculate the first ciphertext gradient under the mask and the second ciphertext gradient That is, the updated The ciphertext polynomial The masked ciphertext gradient is sent to server S for decryption to obtain the first gradient and the second gradient Sent to the first participant A and the second participant B respectively, and update the loss function through the server S The coordinator determines whether the training has converged. If it has converged, the iteration is stopped; otherwise, it is continued. Thus, the first participant A and the second participant B respectively obtain the updated parameters of the gradient descent.
[0062] refer to Figure 2 , S0 is the cloud server as a service provider, {C1,C2,…,C n} represents n data providers, i.e., users.
[0063] Furthermore, in S3, the judgment condition is expressed as: by setting a threshold, the coordinator updates the loss function The difference between the loss functions of the last two rounds is compared with the threshold. If the change in the loss function is less than the threshold, it means that the linear regression model has converged. Then the linear regression model is judged to stop training, otherwise a new training cycle will be continued.
[0064] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.
Claims
1. A linear regression model federated learning training method based on homomorphic encryption, characterized in that: The following steps are involved: S1. Build a linear regression model and its loss function. The user side holds the data features, the service side holds the initial parameters, and the data features input to the linear regression model are encrypted to obtain the input code. S2. In the vertical federated learning scenario, the user and service parties use the additive homomorphic encryption algorithm of the superposition matrix multiplication protocol to train the linear regression model, that is, to update the initial parameters and input encoding to obtain the updated ciphertext polynomial; S3. The updated ciphertext polynomial is decrypted by the coordinator and sent to the user and service parties. The gradient and loss function are updated according to the gradient descent method selected by the linear regression model. The training is terminated based on the judgment conditions. The above steps are repeated until the linear regression model training is completed.
2. The linear regression model federated learning training method based on homomorphic encryption according to claim 1 is characterized in that: In S1, in the linear regression model, the client C holds the private data X, and the server S holds the linear regression model parameters W, Θ j ∈W, client C is the user C i ={C1,C2,…,C n }, server S is the service provider S i ={S1,S2,…,S n }, X=(x1,y1),(x2,y2),…,(x n ,y n ); The linear regression model is expressed as: in, is the data feature of the first participant A, is the data feature of the second participant B, A,B∈C, x i is the data feature, Θ A is the initial parameter of the first participant A, Θ B is the initial parameter of the second participant B, Θ A ,Θ B ∈Θ j , Θ j is the initial parameter of the participants, Θ j ∈W,y i is the data label, i=1,2,...n, n is the number of samples owned by both parties; Loss Function It is expressed as: Among them, λ is the normalization parameter; The data feature x is fixed by the function fix(x) i Convert it to a fixed-point number representation, and after the truncation is accurate through the length parameter s' of the binary truncation bit, the fixed-point number is embedded in the secret sharing ring. i When it is a non-negative number, the fixed-point number embedded in the secret sharing ring, i.e., the input code a, is expressed as otherwise in, The modulus is The ring is the secret sharing ring. is a positive integer representing the bit width of the secret sharing ring.
3. The linear regression model federated learning training method based on homomorphic encryption according to claim 2 is characterized in that: In S2, the parameters defined by the matrix multiplication protocol include the order N of the polynomial ring, the large prime number q and the modulus p, and the additive homomorphic encryption algorithm AHE of the superposition matrix multiplication protocol is defined, AHE = (KeyGen; Enc; Dec; Eval); Input the security parameter key into the linear regression model, and obtain the public key pk and private key sk through the key generator KeyGen, that is, KeyGen(1 key )→(pk,sk), in, represents a ring working on a large prime number q, x i N +1 is a polynomial of order N, Indicates the quotient ring; Input plaintext polynomial into linear regression model and the public key pk, and the ciphertext polynomial is obtained through the homomorphic encryption algorithm Enc Right now The encryption algorithm Enc includes homomorphic addition, polynomial-based homomorphic multiplication, and secure matrix multiplication; The homomorphic addition process is as follows: User C performs homomorphic encryption on the input code a and obtains the first ciphertext Sent to the corresponding service provider S, the service provider S labels the input data y i Perform homomorphic encryption to obtain the second ciphertext Calculate the first ciphertext and the second ciphertext The addition of , get the ciphertext addition result The polynomial-based homomorphic multiplication process is as follows: represents the polynomial of the input encoding a, The i-th coefficient of the polynomial representing the input encoding a is given by Compute the first ciphertext on the quotient ring and the second ciphertext The multiplication of , get the ciphertext multiplication result definition in, The result of ciphertext multiplication The i-th coefficient of j represents the index of other coefficients before and after the i-th coefficient, which is used to extract the encoded polynomial, i.e., the first ciphertext. and the second ciphertext The coefficients of the ciphertext are multiplied to obtain the result mod represents the modulus operation, which is used to find the remainder after a number is divided by the modulus; The security matrix multiplication process is as follows: Define the first packaging method π L And the second packaging method π R , π L : in, represents a matrix of dimension m×n, whose elements are taken from the modulus The ring, represents a matrix of dimension n×k, whose elements are taken from the modulus The above packing method is used to pack the input matrix, i.e., the user-side ciphertext matrix X' and the server-side ciphertext matrix Y', into a polynomial expression on the quotient ring by extracting the matrix values from the indexes of the input matrix. The polynomial expression on the quotient ring is expressed as: in, i∈[n],j∈[m], i∈[n],j∈[k], where n represents the number of rows of the user's ciphertext matrix X', m represents the number of columns of the user's ciphertext matrix X', and k represents the number of columns of the server's ciphertext matrix Y'. During the packaging process, the first ciphertext and the second ciphertext The coefficients of the initial polynomial are set to 0, and the corresponding position coefficients are updated according to the above ciphertext multiplication to obtain the security matrix multiplication result Z. Input the private key sk and ciphertext polynomial into the linear regression model Recover the plaintext polynomial by decryption algorithm Dec That is, Enter the public key pk in the linear regression model, including the first plaintext polynomial The first ciphertext polynomial Contains the second plaintext polynomial The second ciphertext polynomial And the linear function Func, update the ciphertext polynomial through the operation function Eval Get the updated inclusion The ciphertext polynomial 4. The linear regression model federated learning training method based on homomorphic encryption according to claim 2 is characterized in that: In S3, the judgment condition is expressed as: by setting a threshold, the coordinator updates the loss function The difference between the loss functions of the last two rounds is compared with the threshold. If the change in the loss function is less than the threshold, it means that the linear regression model has converged. Then the linear regression model is judged to stop training, otherwise a new training cycle will be continued.
Citation Information
Patent Citations
Linear regression longitudinal federated learning method based on homomorphic encryption
CN114547643A
Medical data sharing privacy protection method based on fully homomorphic encryption
CN114978467A
Dense-state longitudinal federated logistic regression training method based on batch packaging coding
CN115242372A
Systems, devices, and processes for homomorphic encryption
US10075288B1
Efficient Homomorphic Encryption Scheme For Bilinear Forms
US20110243320A1
Cited By
Longitudinal logistic regression model training method and system for privacy protection
CN120633886A
A method and system for training a longitudinal logistic regression model for privacy protection
CN120633886B
CKKS three-way decision dynamic hierarchical encryption neural network training method and system
CN120834906A
CKKS three-branch decision dynamic hierarchical encryption neural network training method and system
CN120834906B
