A privacy-preserving verifiable federated learning approach
By using zero-knowledge proof and commitment schemes in federated learning, a privacy-protecting verifiable federated learning system is constructed, which solves the contradiction between data privacy and verifiability in federated learning and achieves third-party public verification and data privacy. Protection, enhancing model transparency and accuracy.
Patent Information
- Application Number
- CN202410259087.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-07
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When federated learning provides verification to a third party, it is difficult to ensure data privacy protection and the verifiability of the model training process. Existing technologies cannot effectively solve this problem, especially the insufficient verification capabilities of third-party verification agencies.
Using zero-knowledge proof technology and commitment scheme, a verifiable federated learning system is built through entities such as data owners, clients, servers, model users, and bulletin boards to achieve data privacy protection and public verification of the model training process to ensure data privacy. Not leaked.
It enables a third party to publicly verify the federated learning process without leaking the original data, which enhances the transparency of the training process and the accuracy of the model. It also protects data privacy, can effectively defend against attacks by malicious players, and improves performance. Evaluation shows low latency and efficient execution.
Smart Images

Figure CN118114300B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of privacy protection in machine learning and relates to privacy protection technology in federated learning. Background Art
[0002] In recent years, collaborative machine learning has become increasingly important and has been widely used in various scenarios. Federated learning, as a form of collaborative machine learning, allows multiple players (i.e., participants) to jointly train models while ensuring that their respective data remains local. Despite the remarkable achievements of federated learning, its problems in providing verifiability of the training process to third-party verification agencies (i.e., model users) and protecting the privacy of original data are receiving increasing attention.
[0003] As a new paradigm for privacy-preserving machine learning, the key advantage of federated learning is the ability to federate decentralized data to train global models while keeping data localized. Although this approach mitigates the risk of data leakage, it comes with verifiable restrictions on the model training process. This restriction makes it difficult for external verifiers to monitor the model training process and the specific use of data. In addition, both clients and servers have incentives to incorrectly train model parameters in federated learning. For example, the client may submit random parameters based on non-actual data, or the server may attempt to infer sensitive data when processing model parameters, increasing the risk of privacy leakage.
[0004] These situations urgently require a solution to ensure the correct execution of the entire federated learning process. However, it is difficult to publicly verify all local training results without making local data public.
[0005] An intuitive approach is to make the entire training process of federated learning public so that verifiers can verify it easily. This approach can indeed provide verifiers with verifiability of the model training process. However, once the training process is made public, it may expose sensitive features or indirect information of the original data, which runs counter to the privacy protection problem that federated learning aims to solve.
[0006] Another approach is to release federated learning models as black-box test software, but this approach does not solve the problem at all because it may lead to users illegally using these models without paying.
[0007] In addition, some researchers have used technologies such as homomorphic encryption or secure multi-party computation to protect the privacy of original data while providing local verifiability for internal players (i.e., clients or servers). However, these works focus on providing verification to internal players in federated learning, but do not consider how to provide verification to third-party verification agencies.
[0008] Therefore, there is an urgent need to provide an effective solution to achieve public verifiability of the federated learning process to third-party verification agencies without disclosing sensitive data. Summary of the invention
[0009] The purpose of this invention is to address the privacy and verifiability issues existing in existing federated learning, and to propose a verifiable federated learning method with privacy protection by combining zero-knowledge proof technology and commitment scheme.
[0010] The present invention proposes to use zero-knowledge proof technology to solve the problems of public verification and data privacy in federated learning. The present invention allows the model users of federated learning to effectively verify the federated learning situation while ensuring the data privacy of the data owner.
[0011] To implement the above method, the present invention adopts the following technical solutions:
[0012] One aspect of the present invention is to propose a new system model that includes six entities: data owner, client, server, model user, auditor and bulletin board.
[0013] Each data owner has his or her own original data, and the data of a data owner can be sent to one or more clients. At the same time, the data is verified by the authentication data structure to ensure that the client correctly stores the data of the data owner.
[0014] The client stores the data provided by the data owner in the database and maintains the data on the authentication data structure. In addition, the client uses the data stored in the local database to train local model parameters and generate range proofs, and then sends the local model parameters and range proofs to the server.
[0015] The server summarizes the local model parameters from the clients and aggregates them to generate the global model parameters and generate the summation proof.
[0016] The model user is a representative of a third party and is responsible for verifying the correctness of the entire federated learning process.
[0017] The auditor is responsible for verifying the consistency of information, including the consistency of data, the consistency of local model parameters, and the consistency of global model parameters.
[0018] Bulletin boards are secure storage systems that allow a single entity to publish information and download information from other entities. At the same time, bulletin boards allow participants to publish information in an untrusted communication environment, ensuring the integrity and immutability of the information, thereby preventing information leakage or tampering.
[0019] The present invention modularizes the above six entities into a verifiable federated learning system, including a data generation module, a model training module, a model aggregation module, a model verification module, a security audit module, and an information announcement module, wherein:
[0020] The data generation module is used by data owners to send data, the model training module is used to implement client functions, the model aggregation module is used to implement server functions, the model verification module is used by model users to verify the correctness of the entire federated learning process, the security audit module is used by auditors to verify the consistency of information, and the information announcement module is used to implement the bulletin board function.
[0021] Another aspect of the present invention provides a verifiable federated learning method (VPFL) with privacy protection based on the above system model, which can ensure that the data owner enables a third party to publicly verify the federated learning process without leaking the original data.
[0022] This method mainly includes three stages: data publishing, model training and model aggregation.
[0023] The data release stage refers to all data owners uploading original data to the client and performing verification queries on the client, that is, the data owner verifies whether his or her data is correctly stored by the client.
[0024] The model training phase refers to the client using the data in the local database to train the model and generate a range proof for verification by the server and model users.
[0025] The model aggregation phase refers to the server aggregating and generating global model parameters and generating a summation proof to send to the model user for verification.
[0026] In the above three stages, each stage mainly includes four steps: initialization, round secret generation, evidence generation and evidence verification.
[0027] Initialization refers to the phase in which participants agree on the protocol parameters and security settings to be used together.
[0028] Round secret generation means that a round secret needs to be generated or allocated to each participant during each round of training. These round secrets maintain the communication security of each round.
[0029] Evidence generation means that the prover uses zero-knowledge proof to generate a proof for his model parameters in this step so that the verifier can believe the validity of his evidence without leaking private information. Specifically, evidence generation means that the prover generates a proof of inclusion based on the Merkle commitment tree or uses zero-knowledge proof to generate a range proof for his private information in this step so that the verifier can believe the validity of his evidence without leaking private information.
[0030] Evidence verification means that the verifier can verify whether the evidence provided by the prover is valid. If the evidence verification passes, the verifier accepts the information submitted by the prover, otherwise it is rejected.
[0031] Beneficial effects of the present invention:
[0032] First, the present invention adopts zero-knowledge proof technology to allow a third party to publicly verify the training process of federated learning, which enhances the transparency of the training process and the accuracy of the model.
[0033] At the same time, in order to further protect privacy, the present invention introduces a commitment scheme, which ensures that any subsequent information of the original data will not be leaked to a third party during the verification process.
[0034] The present invention provides the possibility of public verification to a third party while achieving privacy protection.
[0035] The present invention also conducts a comprehensive performance evaluation on the proposed scheme, and it can be found that the execution time of each player is in milliseconds.
[0036] In addition, the present invention evaluates the model accuracy under different situations, and the results show that the method of the present invention can effectively defend against attacks by malicious players to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A system model diagram of an embodiment of the present invention;
[0038] Figure 2 A Merkle commitment tree according to an embodiment of the present invention;
[0039] Figure 3 A comparison chart of the accuracy of an embodiment of the present invention in different situations;
[0040] Figure 4 Evidence generation time cost graph of one embodiment of the present invention;
[0041] Figure 5 A time cost diagram of evidence verification according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings so that the purpose, features and advantages of the present invention can be more clearly understood. It should be understood that the embodiments shown in the accompanying drawings are not intended to limit the scope of the present invention, but are only intended to illustrate the essential spirit of the technical solution of the present invention.
[0043] In the following description, certain specific details are set forth for the purpose of illustrating the various disclosed embodiments to provide a thorough understanding of the various disclosed embodiments. However, those skilled in the relevant art will recognize that the embodiments may be practiced without one or more of these specific details. In other cases, well-known devices, structures, and techniques associated with the present application may not be shown or described in detail to avoid unnecessarily obscuring the description of the embodiments.
[0044] References throughout the specification to "one embodiment" or "an embodiment" indicate that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout the specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any manner in one or more embodiments.
[0045] Embodiment 1:
[0046] The present invention provides a verifiable federated learning method with privacy protection, which proposes a new system model (see Figure 1 ), the main entities include: data owner, client, server, model user, auditor and bulletin board. The main stages include: data release stage, model training stage and model local stage. Each stage includes four steps, namely: initialization, round secret generation, evidence generation and evidence verification, as follows:
[0047] Phase 1: Data release phase.
[0048] Step 1: Initialization (P vpfl ,k c )←VPFL.Initialize(1 λ ): The client generates a key k using a pseudo-random function PRF c :=PRF.Setup(1 λ ), and initialize the commitment scheme cp:=COM.Setup(1 λ ), signature algorithm sp:=SIG.Setup(1 λ ) and the zero-knowledge proof scheme zp:=NIZK.Setup(1 λ ). The client publishes system parameters P vpfl =(cp,sp,zp) and keep the key k privatelyc .
[0049] Step 2: Round secret generation (r i,t ) i∈[m] ←VPFL.RSGen(P vpfl ,k c ,i,t): The client uses the key k c In round t, each data owner i generates a round secret r i,t :=PRF.Eval(k c ,i||t). Each client privately stores the round secret r i,t And through the safe channel to the wheel secret r i,t is sent to the corresponding data owner i. In addition, each data owner i generates a public-private key pair (sk i,t ,pk i,t ): = SIG.KeyGen (sp). Where sk i,t Privately stored by data owner i, public key pk i,t Sent to model consumers.
[0050] Step 3: Generate Data Evidence (DE i,t ) i∈[m] :=VPFL.DataEvidenceGen(P vpfl ,(d i,t ,r i,t ) i∈[m] ,i,t): Client calculates c i,t :=COM.Cmt(cp,d i,t ,r i,t ) and c i,t Sent to data owner i for signature σ i,t :=SIG.Sign(sp,sk i,t ,c i,t ), then data owner i will i,t Sent to the model user for verification. When the data owner i queries the client for his own data d i,t Whether it is stored correctly by the client, the client stores the data d of the data owner i in the form of a Merkle commitment tree i,t Generate an inclusion proof π i,t Finally, the client will Merkle commitment tree root c root Posted on the bulletin board.
[0051] Step 4: Verify data evidence {0,1}←VPFL.VerifyDataEvidence(P vpfl ,d i,t ,r i,t,i,t): The data evidence verification algorithm contains four sub-algorithms. When all sub-algorithms return 1, the data evidence verification algorithm returns 1.
[0052] Step 4.1: Verify data consistency {0,1}←VerifyDataConsistency(P vpfl ,π i,t ,c root ,i,t): The auditor downloads the root c from the bulletin board root And verify whether this root is consistent with the inclusion proof π i,t The root of the tree matches. If it matches, output 1, otherwise output 0;
[0053] Step 4.2: Verify Commitment {0,1}←VerifyCommitment(P vpfl ,d i,t ,c i,t ,i,t): data owner i calculates if Output 1, otherwise output 0;
[0054] Step 4.3: Verify inclusion proof {0,1}←VerifyInclusionProof(P vpfl ,π i,t ,i,t): Data owner i verifies whether the commitment value of each intermediate node v on the proof path is indeed calculated based on the commitment value of v's child nodes. If so, output 1, otherwise output 0.
[0055] Step 4.4: Verify signature {0,1}←VerifySignature(P vpfl ,pk i,t ,c i,t ,σ i,t ,i,t): Model users download the signature σ uploaded by the data owner from the bulletin board i,t If the signature is valid, output 1, otherwise output 0.
[0056] Phase 2: Model training phase.
[0057] Step 1: Initialization (P vpfl ,k s )←VPFL.Initialize(1 λ ): The server generates a key k using a pseudo-random function PRF s :=PRF.Setup(1 λ ), and initialize the commitment scheme cp:=COM.Setup(1 λ ), signature algorithm sp:=SIG.Setup(1 λ) and the zero-knowledge proof scheme zp:=NIZK.Setup(1 λ ). The server publishes system parameters P vpfl =(cp,sp,zp,v max ) and keep the key k privately s . Where v max is the maximum threshold of the local model parameters.
[0058] Step 2: Round secret generation (r i',t ) i'∈[n] ←VPFL.RSGen(P vpfl ,k s ,i',t): The server uses the key k s Generate a round secret r for each client i' in round t i',t :=PRF.Eval(k s ,i'||t). The server privately stores the round secret r i',t And through the safe channel to the wheel secret r i',t Send to the corresponding client i'. In addition, each client i' generates a public-private key pair (sk i',t ,pk i',t ): = SIG.KeyGen (sp). Where sk i',t Privately stored by client i', public key pk i',t Sent to model consumers.
[0059] Step 3: Generate local model parameter evidence (LE i',t ) i'∈[n] :=VPFL.LocalEvidenceGen(P vpfl ,(w i',t ,r i',t ) i∈[n] ,i',t): server computing c i',t :=COM.Cmt(cp,w i',t ,r i',t ) and c i',t Sent to client i' for signature
[0060] σ i',t :=SIG.Sign(sp,sk i',t ,c i',t ), then client i' will i',t Sent to model users for verification. At the same time, each client i' generates a range proof π i',t :=NIZK.Proof(zp,(c i',t ,v max ),(w i',t ,ri',t )) and prove the range π i',t In addition, when client i' queries the server for local model parameters w i',t When the server stores the data correctly, the server generates the local model parameter w of client i' in the form of a Merkle commitment tree. i',t Generate an inclusion proof π i',t Finally, client i' will commit to the root c of the tree root' Posted on the bulletin board.
[0061] Step 4: Verify local model parameter proof
[0062] {0,1}←VPFL.VerifyLocalEvidence(P vpfl ,k s ,w i',t ,E i',t ,i',t): The verification algorithm of local model evidence contains four sub-algorithms. When all sub-algorithms return 1, the local model parameter evidence verification algorithm returns 1.
[0063] Step 4.1: Verify the consistency of local model parameters
[0064] {0,1}←VerifyLocalCon istency(P vpfl ,π' i',t ,c root' ,i',t): The auditor downloads the root c from the bulletin board root' And verify that the root of the tree contains proof π' i',t The root of the tree matches. If it matches, output 1, otherwise output 0;
[0065] Step 4.2: Verify Commitment {0,1}←VerifyCommitment(P vpfl ,w i',t ,c i',t ,i',t): Client i' verifies local model parameters w' i',t The commitment value is calculated if Output 1, otherwise output 0;
[0066] Step 4.3: Verify inclusion proof {0,1}←VerifyInclusionProof(P vpfl ,π i',t ,i',t): Client i' verifies whether the commitment value of each intermediate node v' on the proof path is calculated based on the commitment values of v''s child nodes. If so, output 1, otherwise output 0.
[0067] Step 4.4: Verify Range Proof {0,1}←VerifyRangeProof(P vpfl ,c i',t ,π i',t ,i',t): The server executes NIZK.Verify(zp,(c i',t ,v max ),π i',t ) Check the range proof π submitted by each client i' i',t If the proof is valid, output 1, otherwise output 0.
[0068] Step 4.5: Verify signature {0,1}←VerifySignature(P vpfl ,pk i',t ,c i',t ,σ i',t ,i',t): Model users download client π from the bulletin board i',t Uploaded signature i',t If the signature is valid, it outputs 1, otherwise it outputs 0.
[0069] Phase 3: Model aggregation phase.
[0070] Step 1: Initialization (P vpfl ,k s )←VPFL.Initialize(1 λ ): The server generates a key k using a pseudo-random function PRF s :=PRF.Setup(1 λ ), and initialize the commitment scheme cp:=COM.Setup(1 λ ), signature algorithm sp:=SIG.Setup(1 λ ) and the zero-knowledge proof scheme zp:=NIZK.Setup(1 λ ). The server publishes system parameters P vpfl =(cp,sp,zp,V max ) and store the key k privately s .in is the maximum threshold of the global model parameters.
[0071] Step 2: Generate round secret r s,t ←VPFL.RSGen(P vpfl ,k s ,s,t): The server calculates the global round secret And r s,t Sent to model consumers.
[0072] Step 3: Generate global model parameter evidence (GE s,t):=VPFL.GlobalEvidenceGen(P vpfl ,w s,t ,r s,t ,s,t): server computing global model and the global commitment c s,t :=COM.Cmt(cp,w s,t ,r s,t ). The server generates a global proof π s,t :=NIZK.Proof(zp,(c s,t ,V max ),(w s,t ,r s,t )) and will globally prove π s,t Sent to model consumers.
[0073] Step 4: Verify the data proof {0,1}←VPFL.VerifyGlobalEvidence(P vpfl ,w s,t ,r s,t ,E s,t ,s,t): The verification algorithm of the global model evidence contains two sub-algorithms. When all sub-algorithms return 1, the global model parameter evidence verification algorithm returns 1.
[0074] Step 4.1: Verify Commitment {0,1}←VerifyCommitment(P vpfl ,w s,t ,c s,t ,s,t): Model user calculation if Output 1, otherwise output 0;
[0075] Step 4.2: Verify the sum proof {0,1}←VerifySumProof(P vpfl ,c i',t ,π s,t ,s,t): Model users execute NIZK.Verify(zp,(c s,t ,V max ),π s,t ) Check the summation proof uploaded by the server. If the proof is valid, output 1, otherwise output 0.
[0076] In addition, the present invention tests the accuracy of federated learning in different situations on two real datasets (see Figure 3 ). The experimental results show that the accuracy is the highest in the normal case, which is because it does not encounter any attacks and it is regarded as an optimal result.
[0077] However, when subjected to label flipping attacks, the model accuracy of both datasets was significantly affected. Subsequently, by applying the scheme proposed in the present invention, the accuracy of the model was restored and was close to the original accuracy.
[0078] In addition, the present invention analyzes the performance overhead of the entire method (see Figure 4 and Figure 5 ), the results show that the time overhead of this method is extremely small, and the execution time of each participant is only a few milliseconds.
[0079] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A verifiable federated learning method with privacy protection, characterized in that: The method includes at least the following three stages: data publishing stage, model training stage and model aggregation stage; in The data publishing stage refers to all data owners uploading original data to the client and performing verification queries on the client; The model training phase refers to the client using data in the local database to train the model and generate a range proof for verification by the server and the model user; The model aggregation phase refers to the server aggregating and generating global model parameters and generating a summation proof to send to the model user for verification; In the above three stages, each stage includes at least the following four steps: initialization, round secret generation, evidence generation and evidence verification; Initialization means that the participants reach an agreement on the protocol parameters and security settings to be used together at this stage; The round secret generation means that a round secret needs to be generated or allocated to each participant in each round of training, and these round secrets maintain the communication security of each round; The evidence generation means that the prover generates a piece of evidence for his model parameters using zero-knowledge proof in this step so that the verifier can believe the validity of his evidence without leaking private information. The evidence verification means that the verifier verifies whether the evidence provided by the prover is valid. If the evidence verification passes, the verifier accepts the information submitted by the prover, otherwise it rejects it; The data release phase includes: Step 1: Initialization (P vpfl ,k c )←VPFL.Initialize(1 λ ): The client generates a key k using a pseudo-random function PRF c :=PRF.Setup(1 λ ), and initialize the commitment scheme cp:=COM.Setup(1 λ ), signature algorithm sp:=SIG.Setup(1 λ ) and the zero-knowledge proof scheme zp:=NIZK.Setup(1 λ ); The client publishes system parameters P vpfl =(cp,sp,zp) and keep the key k privately c ; Step 2: Round secret generation (r i,t ) i∈[m] ←VPFL.RSGen(P vpfl ,k c ,i,t): The client uses the key k c In round t, each data owner i generates a round secret r i,t :=PRF.Eval(k c ,i||t); Each client privately stores the round secret r i,t And through the safe channel to the wheel secret r i,t is sent to the corresponding data owner i; in addition, each data owner i generates a public-private key pair (sk i,t ,pk i,t ):=SIG.KeyGen(sp); where sk i,t Privately stored by data owner i, public key pk i,t is sent to the model user; Step 3: Generate Data Evidence (DE i,t ) i∈[m] :=VPFL.DataEvidenceGen(P vpfl ,(d i,t ,r i,t ) i∈[m] ,i,t): Client calculates c i,t :=COM.Cmt(cp,d i,t ,r i,t ) and c i,t Sent to data owner i for signature σ i,t :=SIG.Sign(sp,sk i,t ,c i,t ), then data owner i will i,t Sent to the model user for verification; when the data owner i queries the client for his own data d i,t Whether it is stored correctly by the client, the client stores the data d of the data owner i in the form of a Merkle commitment tree i,t Generate an inclusion proof π i,t ; Finally, the client will Merkle commitment tree root c root Post to a bulletin board; Step 4: Verify data evidence {0,1}←VPFL.VerifyDataEvidence(P vpfl ,d i,t ,r i,t ,i,t): The data evidence verification algorithm contains four sub-algorithms. When all sub-algorithms return 1, the data evidence verification algorithm returns 1.
2. The verifiable federated learning method with privacy protection according to claim 1, characterized in that: The step 4 comprises the following steps: Step 4.1: Verify data consistency {0,1}←VerifyDataConsistency(P vpfl ,π i,t ,c root ,i,t): The auditor downloads the root c from the bulletin board root And verify whether this root is consistent with the inclusion proof π i,t The root of the tree matches; if it matches, output 1, otherwise output 0; Step 4.2: Verify Commitment {0,1}←VerifyCommitment(P vpfl ,d i,t ,c i,t ,i,t): data owner i calculates if Output 1, otherwise output 0; Step 4.3: Verify inclusion proof {0,1}←VerifyInclusionProof(P vpfl ,π i,t ,i,t): Data owner i verifies whether the commitment value of each intermediate node v on the proof path is indeed calculated based on the commitment value of v's child nodes; if so, output 1, otherwise output 0; Step 4.4: Verify signature {0,1}←VerifySignature(P vpfl ,pk i,t ,c i,t ,σ i,t ,i,t): Model users download the signature σ uploaded by the data owner from the bulletin board i,t And verify it; if the signature is valid, output 1, otherwise output 0.
3. A system for implementing the verifiable federated learning method with privacy protection as claimed in claim 1 or 2, characterized in that: It includes data generation module, model training module, model aggregation module, model verification module, security audit module and information announcement module. The data generation module is used by data owners to send data, the model training module is used to implement client functions, the model aggregation module is used to implement server functions, the model verification module is used by model users to verify the correctness of the entire federated learning process, the security audit module is used by auditors to verify the consistency of information, and the information announcement module is used to implement the bulletin board function.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed, the verifiable federated learning method with privacy protection as described in claim 1 or 2 is implemented.
5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the verifiable federated learning method with privacy protection as described in claim 1 or 2 is implemented.
Citation Information
Patent Citations
Verifiable privacy protection federated learning method and system
CN116467736A
Trusted model training method based on federal learning
CN116628504A
