Computational integrity verification method and system in the scenario of confidential outsourcing model training
Select cloud service providers through multi-attribute scoring and entropy weighting method, combine blockchain and zero-knowledge proof technology to verify model parameters and structures, and use threshold secret sharing to detect cheat servers, solving the computational integrity and calculation of the training of the secret outsourcing model The problem of cheat detection improves the reliability and security of model training.
Patent Information
- Application Number
- CN202411027078.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-30
AI Technical Summary
The existing technology cannot effectively verify the computational integrity during the training process of the dense outsourcing model, especially the effectiveness of model parameters and structures, and cannot accurately detect cheating cloud servers, making it difficult to guarantee the credibility and accuracy of model training results.
Use a reverse auction mechanism with multi-attribute scoring to select cloud service providers, combine entropy weight method and autonomous weight determination method for scoring, use blockchain and zero-knowledge proof technology to verify model parameters and structures, and pass threshold secret sharing detection Cheating cloud server.
It realizes effective verification of the integrity of the training of the dense outsourcing model, ensures the correctness of model parameters and structures, accurately detects cheating cloud servers, improves the reliability and security of the system, and ensures fair competition among cloud service providers. Client trust.
Smart Images

Figure CN118573469B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security, and in particular to a method and system for verifying computational integrity in a confidential outsourcing model training scenario. Background Art
[0002] With the development of information technology, the era of digital economy has arrived. The extensive application of machine learning, deep learning and other algorithms and the full use of the value of data elements have become a necessary trend for the digitalization and intelligence of various industries and fields. Weather forecasting, intelligent driving, medical disease prediction, earthquake warning, commodity marketing and other aspects of social life use machine learning and other models for classification and prediction. In particular, with the rise of AI (artificial intelligence), large model training with large data volume and large number of features such as computer vision and natural language processing has received more attention. Due to the increasing computing resources required for model training, not all enterprises or organizations with data have the corresponding model training capabilities, or there is no need to purchase computing equipment such as medical institutions. As clients, these enterprises or organizations often use cloud computing to outsource computing, which often becomes a feasible option.
[0003] However, due to the privacy attributes and economic value of data, the outsourcing of model training calculations needs to pay attention to the following two points: (1) When outsourcing local data, data masking should be performed to achieve confidential data upload and calculation. For example, data in the fields of medicine and finance are high-risk, high-privacy data. Random data out of the domain and exposure may infringe on the privacy of related persons and touch the legal red line; (2) Ensure that the model parameters returned by the cloud server are calculated correctly in the specified manner. Since the model training process is executed by the cloud server from beginning to end, the client cannot determine whether the calculation process of model training is carried out in accordance with the agreement. If a dishonest cloud server does not perform model training due to its own economic and time issues, but chooses to return random values, the client should be able to verify and verify its calculation integrity.
[0004] The patent application with publication number CN117454431A discloses a verifiable data privacy protection system and method for computing service outsourcing, including: a verification client, a first proof server and a second proof server perform initialization operations; the verification client sends the data shares required for machine learning reasoning to the first proof server and the second proof server respectively; the verification client receives the calculation result shares and the calculation process proof fed back by the first proof server and the second proof server; the verification client verifies the calculation process according to the obtained calculation process proof, and if the calculation process is verified to be correct, it secretly reconstructs according to the calculation result shares to obtain the final machine learning reasoning result.
[0005] In this patent application, a model reasoning process for secret outsourcing calculations is constructed based on additive secret sharing technology and VOLE-based zero-knowledge proof technology, and there are two verifiable solutions for cloud servers. The correctness of the calculation is verified by zero-knowledge proof technology, and then the additive secret sharing technology is used to ensure the data privacy of the verification client. There are the following disadvantages:
[0006] The method of this patent application verifies the computational integrity of the confidential outsourced computation of model reasoning. It can only verify whether the cloud server has executed the process of verifying the model reasoning, but cannot verify the validity of the model reasoning results. The validity of the model parameters obtained after the model training process determines the validity and credibility of the model reasoning results. This patent application lacks computational integrity verification of the model training process and cannot guarantee the validity of the model reasoning results.
[0007] Compared with the computational integrity verification of model reasoning, the computational integrity verification of model training includes not only the verification of the validity of the confidential outsourced computing model parameters and the verification of the confidential outsourced computing operation relationship, but also the verification of the accuracy of the confidential outsourced computing model. It is necessary to design a computational integrity verification scheme that matches the computational integrity of model training.
[0008] In the process of dense outsourcing model training, there is greater resource consumption than model reasoning, and a more complete computing integrity verification technology is needed. It should be able to accurately check cheating cloud servers so that the cloud servers can be accurately replaced without recalculating all shares, thereby saving the computing resources of the entire system composed of clients and cloud servers. Summary of the invention
[0009] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a method and system for verifying the computational integrity in a confidential outsourced model training scenario are provided, which verify the validity of the model parameters trained by the cloud server and the correctness of the model structure, and realize the correctness verification of the model accuracy, thereby ensuring that the cloud server performs the correct model training process according to the correct data, i.e., the computational integrity of the confidential outsourced model training, and can accurately determine the cheating cloud server, and can also select the outsourced cloud computing service that is most suitable for the client computing task while ensuring quality and delivery.
[0010] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0011] A method for verifying computational integrity in a confidential outsourcing model training scenario includes the following steps:
[0012] The client comprehensively scores the cloud service providers that meet the attribute threshold requirements and determines the winning cloud service provider. The present invention selects scoring attributes from three aspects: cost, performance, and reliability. There are seven scoring attributes in total, where cost includes quotation, performance includes GPU computing power, response time, network bandwidth, and read and write speed, and reliability includes the number of cheating times and fault recovery time.
[0013] The client secretly shares the training set data with the cloud server of the winning cloud service provider, and the cloud server uses the secret share of the training set data to perform model training;
[0014] The client uploads the hash value of the validation set data label to the blockchain for evidence storage, and secretly shares the validation set data features to the corresponding cloud server. The cloud server uses the trained model to infer the secret share of the validation set data to obtain the inference result; the cloud server also constructs a zero-knowledge proof circuit based on the secret share of the validation set data, the inference result and the computational relationship of the trained model, and then uses the zero-knowledge proof circuit to assist in verification, output the inference result and the zero-knowledge proof Proof, and upload them to the blockchain;
[0015] The client calls the blockchain smart contract, uses the inference result of the cloud server to restore the inference label of the verification set, and then compares the hash value of the inference label of the verification set with the data label of the verification set, calculates the inference accuracy to verify the validity of the model parameters and the correctness of the model precision, and also uses the key of the zero-knowledge proof circuit to verify the zero-knowledge proof Proof to verify the correctness of the model structure;
[0016] The blockchain smart contract broadcasts the verification results of each cloud server to the corresponding cloud server and client.
[0017] Furthermore, the method further includes the steps of locating the cheating cloud server, including:
[0018] exist After the inference of the cloud server is completed, the client calls the blockchain smart contract and randomly selects The first inference result and / or the second inference result of the selected cloud server are used to restore the verification set inference label, and then the verification set inference label is compared with the verification set data label by hash value, and the inference accuracy is calculated to verify the validity of the model parameters and the correctness of the model accuracy until Cloud Servers All necessary combinations of cloud servers are selected, and the total operation wheel;
[0019] If the combination of cloud servers in each round verifies the validity of model parameters and the correctness of model accuracy, there is no cheating cloud server;
[0020] If there is a combination of cloud servers that fails to verify the validity of model parameters and the correctness of model accuracy in at least one round, remove the non-cheating cloud server from the combination of cloud servers to obtain a cheating cloud server, where the non-cheating cloud server is a cloud server in the combination of cloud servers that pass the verification of the validity of model parameters and the correctness of model accuracy in other rounds;
[0021] The winning cloud service provider updates the number of cheating in the attribute value according to the number of times the cheating cloud server is detected.
[0022] Furthermore, when calculating the inference accuracy to verify the validity of the model parameters and the correctness of the model accuracy, it specifically includes:
[0023] Calculate the inference accuracy of the current round based on the comparison between the hash value of the validation set inference label and the hash value of the validation set data label;
[0024] Execute the step again where the client uploads the hash value of the validation set data label in the local data to the blockchain for storage until the specified round is reached. ;
[0025] Calculate the average value of the inference accuracy of all rounds. If the average value of the inference accuracy is greater than the preset threshold, the validity of the cloud server model parameters and the correctness verification of the model accuracy pass. If the average value of the inference accuracy is less than the preset threshold, the validity of the cloud server model parameters and the correctness verification of the model accuracy fail.
[0026] Furthermore, when the client comprehensively scores the cloud service providers that meet the attribute threshold requirements and determines the winning cloud service provider, it includes:
[0027] The client subjectively determines the first weight of each attribute;
[0028] The client broadcasts the attribute threshold requirements of the cloud service provider on the blockchain, and the cloud service provider that meets the attribute threshold requirements responds and submits the attribute value;
[0029] The client determines the second weight of each attribute of the responding cloud service provider according to the entropy weight method, and weights the second weight of each attribute of each cloud service provider with the corresponding first weight according to a given ratio to obtain the corresponding final scoring attribute weight;
[0030] The weighted comprehensive score of each cloud service provider is calculated based on the attribute value of each cloud service provider and the corresponding final score attribute weight.
[0031] Furthermore, when the client determines the second weight of each attribute of the responding cloud service provider according to the entropy weight method, the following steps are included:
[0032] Establishing an attribute value matrix of the responding cloud service providers, wherein each row of the attribute value matrix represents each attribute value of a cloud service provider;
[0033] Normalizing each attribute in the attribute value matrix to obtain a normalized matrix, then calculating the proportion of each cloud service provider under each attribute in the normalized matrix, and using the proportion as a probability value used in information entropy calculation to obtain a probability matrix;
[0034] The information entropy of each attribute is calculated according to the probability matrix, and then the information utility value of each attribute is calculated according to the information entropy of each attribute. Finally, the entropy weight of each attribute is calculated according to the information utility value of each attribute as the second weight of each attribute.
[0035] Furthermore, after the winning cloud service provider is determined, the following also includes: the client promises a token for training the model to the cloud server of the winning cloud service provider;
[0036] After the blockchain smart contract broadcasts the verification result of each cloud server to the corresponding cloud server and the client, it also includes: the blockchain smart contract executes the delivery of tokens between the client and the cloud server according to the verification result.
[0037] Furthermore, when the cloud server uses the secret share of the training set data to perform model training, it includes:
[0038] The cloud server randomly extracts sample data with the same ID from the training set as test data, and the other data is training data;
[0039] Each cloud server uses its own share of training data to synchronously train the neural network model throughout the entire process until the specified number of epochs is reached, and the secret share corresponding to the model parameters is obtained;
[0040] If the trained neural network model is a classification model, use the test data to perform joint prediction between cloud servers to determine whether the model training accuracy reaches the client's required accuracy. If it reaches the required accuracy, stop training. If it does not reach the required accuracy, adjust the training strategy according to the information given in the training process and continue or retrain until the required training accuracy is reached.
[0041] If the trained neural network model is a regression model, the test data is used for joint prediction between servers to determine whether the model training accuracy reaches the performance threshold required by the client. If the required performance is reached, the training is stopped. Otherwise, the training strategy is adjusted according to the training process data to continue or retrain until the required performance threshold is reached.
[0042] Furthermore, the input of the zero-knowledge proof circuit includes the secret share of the model parameters of the corresponding cloud server, the secret share of the intermediate calculation results of each layer of the neural network of the trained model, and the secret share of the neural network reasoning output result; the output of the zero-knowledge proof circuit includes the zero-knowledge proof Proof, the hash commitment of the secret share of the model parameters of the corresponding cloud server, and the secret share of the verification set reasoning label.
[0043] Furthermore, when the zero-knowledge proof circuit is used to assist in verifying the output of the inference result and the zero-knowledge proof Proof, the following steps are included:
[0044] The cloud server combines the secret shares of the corresponding model parameters to fit the model reasoning process, and generates a zero-knowledge proof witness based on the model reasoning results and the intermediate parameters generated by the reasoning process. , and then witness it based on zero-knowledge proof Generate and output zero-knowledge proof Proof; and store the model inference results in the public output public.json file for output;
[0045] The cloud server uploads the output of the zero-knowledge proof circuit to the blockchain, and also uploads the verification key generated when the zero-knowledge proof circuit is generated. To verify the zero-knowledge proof.
[0046] The present invention also proposes a computing integrity verification system in a confidential outsourcing model training scenario, including a client and a cloud service provider, wherein:
[0047] The client is used to:
[0048] Comprehensively score the cloud service providers that meet the attribute threshold requirements and determine the winning cloud service provider;
[0049] Secretly share the training set data to the cloud server of the winning cloud service provider;
[0050] Upload the hash value of the validation set data label to the blockchain for evidence storage, and secretly share the validation set data features to the corresponding cloud server;
[0051] Call the blockchain smart contract, use the inference results of the cloud server to restore the verification set inference label, then compare the hash value of the verification set inference label with the verification set data label, calculate the inference accuracy to verify the validity of the model parameters and the correctness of the model precision, and use the key of the zero-knowledge proof circuit to verify the zero-knowledge proof Proof to verify the correctness of the model structure, and then broadcast the verification results of each cloud server;
[0052] The cloud service provider is used to:
[0053] If the cloud service provider is determined to be the winning bidder, the corresponding cloud server uses the secret share of the training set data to perform model training, and then uses the trained model to infer the secret share of the verification set data to obtain an inference result; the cloud server also constructs a zero-knowledge proof circuit based on the secret share of the verification set data, the inference result, and the operational relationship between the trained model, and then uses the zero-knowledge proof circuit to perform auxiliary verification, output the inference result and the zero-knowledge proof Proof, and upload them to the blockchain.
[0054] Compared with the prior art, the advantages of the present invention are:
[0055] (1) Reverse auction mechanism based on multi-attribute scoring: The present invention calculates a comprehensive score based on the cloud service provider's own attributes, and selects a cloud service provider through seller bidding based on a reverse auction, including seven cloud service provider scoring attributes in three dimensions of cost, performance, and reliability - quotation, GPU computing power, response time, network bandwidth, read and write speed, fault recovery time, and number of cheating; cloud service providers consider the "quotation" attribute value according to the reverse auction mechanism, and the "number of cheating" attribute constrains cloud service providers to correctly perform outsourcing agreements; the client uses an autonomous weight determination method to determine the subjective weight of each attribute based on its own needs and preferences; the client uses an entropy weight method to calculate the objective weight of each attribute based on the attribute values provided by all cloud service providers that meet the threshold; the subjective weight and the objective weight are weighted to calculate the final attribute weight; the corresponding attribute values submitted by each cloud service provider are weighted according to the final attribute weight to obtain a comprehensive score, and the cloud service provider with a high comprehensive score obtains the qualification for dense outsourcing model training. This technology achieves fairness and uses reverse auctions to ensure that all cloud service providers have equal opportunities and transparent rules in the bidding process. The auction process follows open and fair procedures to avoid any form of bias or discrimination, ensuring the fairness and credibility of the auction results and enhancing the trust and enthusiasm of cloud service providers.
[0056] (2) Result-driven outsourced training computational integrity verification method: When verifying the computational integrity of confidential outsourced model training, the present invention uses the inference accuracy of the verification set to verify the validity of the model training parameters and the accuracy of the model, and uses non-interactive zero-knowledge proof to perform supplementary verification of the correctness of the model structure, including the client saving the verification set, sending the hash value of the original label to the blockchain for storage, and sending the feature value to the cloud server side in the form of threshold secret sharing; the cloud server side uses a zero-knowledge proof circuit to perform multiple rounds of reasoning and generates a confidential outsourced computing model structure zero-knowledge proof Proof; the blockchain receives the secret share of the verification set inference label output by the inference, restores the verification set inference label value, compares it with the hash value of the original label to calculate the verification set accuracy, and receives the Proof; the blockchain smart contract compares the verification set accuracy with the model accuracy expected by the client side to verify the validity of the model parameters and the correctness of the model precision, and uses the verification key to verify the Proof to verify the correctness of the model structure, and finally determines whether the verification is passed and broadcasts the verification result. This technology has the ability to effectively verify the effectiveness of the computational integrity of the dense outsourcing model training - including the validity of the dense outsourcing computing model parameters, the verification of the accuracy of the dense outsourcing computing model, and the structural verification of the dense outsourcing model.
[0057] (3) Threshold-based cheating cloud server detection technology: This invention uses The threshold property of threshold secret sharing encryption enables accurate detection of cheating cloud servers in secret outsourcing training scenarios, including After the inference of the cloud server is completed, select The cloud server inference label secret share is used to recover the inference label value; the inference label is compared with the real label on the blockchain to calculate the inference accuracy; the round is judged based on the inference accuracy Whether there is a cheating cloud server among the cloud servers; adopt the selection strategy of replacing one cloud server in each round and repeat the above operation wheel; integration The judgment results of the round can accurately determine the cheating cloud server. This technology has the specificity to clearly identify which cloud server is the cheating one. In addition, it supports the "number of cheating" attribute scoring in the reverse auction mechanism based on multi-attribute scoring, ensuring the credibility of the cloud server and the overall security of the system, and improving the reliability and accuracy of the intensive outsourcing training. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a schematic diagram of the full process design of the confidential outsourced model training calculation integrity verification system according to an embodiment of the present invention.
[0059] Figure 2 This is an overall design structure diagram of the method for verifying the integrity of calculations in a confidential outsourced model training according to an embodiment of the present invention.
[0060] Figure 3 The figure is a schematic diagram of the overall process of the computational integrity verification method in the confidential outsourcing model training scenario according to an embodiment of the present invention.
[0061] Figure 4 The figure is a schematic diagram of the process of determining a cloud service provider by reverse auction in an embodiment of the present invention.
[0062] Figure 5 Schematic diagram of input and output of a zero-knowledge proof circuit according to an embodiment of the present invention.
[0063] Figure 6 This is a timing diagram of the result-driven outsourced model training calculation integrity verification in an embodiment of the present invention.
[0064] Figure 7 This is a schematic diagram of a cheating cloud server detection principle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0066] Before introducing the specific embodiments of the present invention, the relevant concepts are first explained.
[0067] (1) Machine Learning Outsourcing Computing Technology
[0068] Machine learning outsourcing computing refers to a business model in which computing tasks, data processing or model training in machine learning tasks are outsourced to a third-party service provider or cloud computing platform for processing. In this model, the data holder or the client of the machine learning task can entrust its computing needs to a third party with computing resources and algorithm expertise to achieve efficient and scalable machine learning task processing. The machine learning outsourcing computing described in this patent application involves the model training part. The outsourcing service provider uses its own computing resources and algorithm technology to train and tune the model of the data, and performs different model parameter adjustments on different machine learning algorithms to obtain the best model performance.
[0069] The advantage of outsourcing machine learning computing is that it can help data holders or machine learning task clients use advanced machine learning technology to solve problems without sufficient computing resources or expertise. At the same time, outsourcing computing can also reduce the cost of machine learning tasks and improve the efficiency and flexibility of task processing. However, there are also some challenges in outsourcing machine learning computing, including data privacy and security, service credibility and other considerations. Therefore, when choosing an outsourcing service provider, it is necessary to carefully evaluate its technical strength, data protection measures and other factors. After the outsourcing computing is completed, the outsourcing service provider must verify the correctness of the calculation to ensure that the cooperation goes smoothly and achieves the expected results.
[0070] (2) Blockchain technology
[0071] Blockchain technology is a distributed database technology that is characterized by decentralization, immutability, transparency and trustworthiness. It is widely used in fields such as cryptocurrency, smart contracts, supply chain management, and digital identity authentication. The core idea is to link data in the form of blocks to form a growing chain structure. Each block contains the hash value of the previous block, ensuring the continuity and security of the data. The main features of blockchain are as follows:
[0072] 1) Decentralization: The blockchain network does not rely on a centralized management agency or server, but rather the nodes in the network jointly maintain and manage data, which improves the system's anti-attack capabilities and stability.
[0073] 2) Unalterable: The data in the blockchain is encrypted and verified through cryptographic technology. Each block contains the hash value of the previous block. Any tampering with the data will be immediately identified and rejected.
[0074] 3) Transparency and credibility: Data on the blockchain is publicly visible, and anyone can view and verify the integrity of the data, which enhances the transparency and credibility of the data.
[0075] 4) Smart Contracts: Blockchain technology supports the execution of smart contracts, which are pre-written automated contract codes that can be automatically executed without the need for a trusted third party and under specific conditions, without human intervention.
[0076] This patent application regards all clients and cloud service providers as participating nodes of the blockchain, uses reverse auctions to achieve a fair and transparent bidding process, and utilizes blockchain smart contracts to perform the final verification step of the computational integrity verification method for outsourced computing, thereby achieving fair transactions between outsourced computing participants.
[0077] (3) Zero-knowledge proof technology
[0078] Zero-knowledge proof technology is a cryptographic tool for protecting privacy. It allows the prover to prove the authenticity of a statement or proposition to the verifier without revealing the specific content of the statement between two distrustful communicating parties. The prover proves to the verifier that he knows a certain information through a series of interactions or calculations. The verifier only needs to confirm the validity of the proof without knowing the specific content of the information. Zero-knowledge proof has the following three properties:
[0079] (1) Correctness: The prover cannot deceive the verifier, that is, if the statement or proposition made by the prover is true, then the verifier will believe the statement or proposition made by the prover.
[0080] (2) Completeness: The verifier cannot deceive the prover, that is, if the statement or proposition made by the prover is false, then the verifier will not believe the statement or proposition made by the prover.
[0081] (3) Zero-knowledge: During the entire zero-knowledge proof process, the verifier cannot obtain any additional knowledge other than the truth or falsity of the statement or proposition.
[0082] Embodiment 1
[0083] This embodiment proposes a computational integrity verification method in a confidential outsourcing model training scenario, which needs to solve the following technical problems:
[0084] (1) A computational integrity verification technology for confidential outsourced model training is proposed. Starting from the result side, this technology verifies the inference accuracy of the validation set on the confidential outsourced training model after training, and supplements it with zero-knowledge proof technology. It verifies the validity of the model parameters trained by the cloud server and the correctness of the model structure, and realizes the correctness verification of the model accuracy, ensuring that the cloud server performs the correct model training process according to the correct data, that is, the computational integrity of confidential outsourced model training.
[0085] (2) A threshold-based cheating cloud server detection technology is proposed. The threshold property of threshold secret sharing can accurately identify cheating cloud servers through multiple rounds of verification between different clients and cloud servers.
[0086] (3) A reverse auction mechanism based on multi-attribute scoring is proposed, which combines the entropy weight method and the autonomous weight determination method to weight the attribute values. While considering the objectivity of data-driven, it reflects the actual needs and preferences of decision makers, obtains more scientific and reasonable scoring results, and uses fair competition to determine the selected cloud service provider, reducing procurement costs. Under the premise of ensuring quality and delivery, the most suitable outsourced cloud computing service for client computing tasks can be selected.
[0087] The method of this embodiment is applied to the computational integrity verification system in the scenario of confidential outsourcing model training, such as Figure 1 As shown in the figure, the system includes three roles: client, cloud service provider, and blockchain. The client and cloud service provider are participating nodes on the blockchain. Before the model training begins, the cloud service provider on the blockchain bids for outsourcing services based on a reverse auction mechanism with multi-attribute scoring. The cloud service provider with the highest comprehensive score will be qualified to perform the confidential outsourcing model training task. After the model training is completed, the client uses the result-driven outsourcing training computational integrity verification method to verify the computational integrity. After the computational integrity verification is completed, the blockchain smart contract performs delivery between the two parties based on the verification results. The system tracks and designs the entire process of confidential outsourcing model training, realizes computational integrity verification, and encourages and constrains the client and cloud service provider to conduct honest and fair model training transactions.
[0088] The method implementation idea and structure of this embodiment are as follows Figure 2 As shown in the figure, the computational integrity verification target of the secret state outsourcing computational model training is decomposed into the secret state outsourcing computational model parameters Verification of effectiveness and accuracy of the confidential outsourcing calculation model Verification and confidentiality outsourcing computing model structure The three verification targets of the verification are the so-called model parameters The validity of this parameter means that the parameter is not a random value returned by the cloud server at will. It means that the trained model has reached the required accuracy and has a certain degree of generalization. The dense outsourcing calculation model structure This means that the model that has reached a certain accuracy is the model required by the client, and the cloud server has not replaced the model for its own economic efficiency. For the three verification goals, this embodiment verifies the computational integrity through a result-driven outsourced model training computational integrity verification method. This method uses the inference accuracy of the verification set retained by the client as the judgment standard. Verify the model accuracy while verifying the effectiveness , for the model structure The verification method introduces non-interactive zero-knowledge proof technology for auxiliary and supplementary verification. The method of the present invention has the effectiveness of verifying the integrity of the calculation of the confidential outsourcing model training, and also has the specificity of checking which servers have cheating behavior.
[0089] Based on the above concept, Figure 3 As shown, the method of this embodiment includes the following steps:
[0090] S101) The client comprehensively scores the cloud service providers that meet the attribute threshold requirements and determines the winning cloud service provider. After the winning cloud service provider is determined, the client commits the token paid for training the model to the cloud server of the winning cloud service provider;
[0091] S102) The client secretly shares the training set data with the cloud server of the successful cloud service provider, and the cloud server uses the secret share of the training set data to perform model training;
[0092] S103) The client uploads the hash value of the validation set data label to the blockchain for evidence storage, and secretly shares the validation set data features to the corresponding cloud server. The cloud server uses the trained model to infer the secret share of the validation set data to obtain an inference result. The cloud server also constructs a zero-knowledge proof circuit based on the secret share of the validation set data, the inference result, and the computational relationship of the trained model, and then uses the zero-knowledge proof circuit to assist in verification, output the inference result and the zero-knowledge proof Proof, and upload them to the blockchain.
[0093] S104) The client calls the blockchain smart contract, uses the inference result of the cloud server to restore the verification set inference label, then compares the verification set inference label with the verification set data label by hash value, calculates the inference accuracy to verify the validity of the model parameters and the correctness of the model precision, and also uses the key of the zero-knowledge proof circuit to verify the zero-knowledge proof Proof to verify the correctness of the model structure; and calculates the inference accuracy corresponding to the combination of a specified number of cloud servers through multiple rounds, and determines the cheating cloud server according to the inference accuracy corresponding to the combination of cloud servers in each round;
[0094] S105) The blockchain smart contract broadcasts the verification result of each cloud server to the corresponding cloud server and client, and then executes the delivery of tokens between the client and the cloud server based on the verification result.
[0095] Each step is described in detail below.
[0096] The reverse auction mechanism based on multi-attribute scoring proposed in step S101 of this embodiment is used for the selection of cloud service providers. The corresponding indicators are extracted as scoring attributes according to the needs of dense outsourcing model training, and the above attributes are weighted by combining the entropy weight method and the autonomous weight determination method to calculate the comprehensive score of each cloud service provider. The cloud service provider with the highest comprehensive score is selected according to the reverse auction mechanism. Here, the so-called reverse auction refers to an auction method in which the auctioneer is the buyer and the bidder is the seller. Compared with a conventional auction, the reverse auction is bid by the seller and the lowest bidder wins, which is beneficial for the buyer to obtain the corresponding service at a lower price. Figure 4As shown, when the client comprehensively scores the cloud service providers that meet the attribute threshold requirements and determines the winning cloud service provider, the following steps are included:
[0097] S201) Determine scoring attributes: To evaluate the quality of the cloud service provider, this embodiment selects scoring attributes from three aspects: cost, performance, and reliability, with a total of seven scoring attributes, where cost includes quotation, performance includes GPU computing power, response time, network bandwidth, and read and write speed, and reliability includes the number of cheating times and fault recovery time. The "number of cheating times" is associated with the cheating cloud server determined in step S104 and is determined by the number of cheating detections.
[0098] S202) Determine attribute weights by autonomous weight determination method: For the above seven attributes, the client subjectively determines the weighted weights of each attribute, which is referred to as the first weight in this embodiment for distinction. Specifically, the client can subjectively determine the weighted weights of each of the seven attributes according to the focus and preference of the dense state outsourcing model training task, such as the need for faster computing speed and the lowest possible outsourcing cost;
[0099] S203) Determine and publish attribute thresholds: The client broadcasts the attribute threshold requirements of the cloud service provider on the blockchain. Specifically, the client, as a buyer, determines the highest cost it can pay, the minimum performance it needs, and the relevant reliability requirements based on its own situation, and publishes the above attributes and their requirements as bidding requirements or broadcasts them on the blockchain to start a reverse auction;
[0100] S204) Cloud service provider bidding: Cloud service providers that meet the attribute threshold requirements respond and submit attribute values. Specifically, cloud service providers that meet the attribute thresholds respond to the seven published attributes respectively, submit attribute values about their own performance and reliability, and consider their bids according to the reverse auction rules in order to win the bid;
[0101] S205) Calculating attribute weights using the entropy weight method: After the client receives the seven attribute value data submitted by all cloud service providers, the client determines the weight of each attribute of the responding cloud service provider according to the entropy weight method, which is referred to as the second weight in this embodiment for distinction;
[0102] S206) Scoring attribute weight calculation: The client weights the second weight of each attribute of each cloud service provider with the corresponding first weight according to a given ratio to obtain the corresponding final scoring attribute weight;
[0103] S207) Determine the winning cloud service provider: Calculate the weighted comprehensive score of each cloud service provider based on the seven attribute values of each cloud service provider and the corresponding final score attribute weights. The cloud service provider with the highest comprehensive score wins the bid and obtains the qualification for dense outsourcing model training.
[0104] The entropy weight method in step S205 is an objective weight determination method, which is often used in multi-attribute decision analysis. It determines the weight of each attribute by calculating its entropy value. The entropy value reflects the distribution of the attribute value: the smaller the entropy value, the greater the amount of information of the attribute, and the higher its importance in the decision. The following is an example of three cloud service providers. When the client determines the second weight of each attribute of the responding cloud service provider according to the entropy weight method, the following steps are included:
[0105] S301) Determine the attribute value matrix: Establish an attribute value matrix of the responding cloud service providers, where each row of the attribute value matrix represents each attribute value of a cloud service provider. Specifically, after receiving bids from each cloud service provider, a matrix of size Attribute value matrix (three cloud service providers, seven scoring attributes), as follows:
[0106]
[0107] in , , , , , , They represent seven attributes respectively: price, GPU computing power, response time, network bandwidth, read and write speed, number of cheating, and fault recovery time. Indicates The first cloud service provider attribute value;
[0108] S302) Attribute value normalization: Use the range transformation method to normalize each attribute in the attribute value matrix to unify the dimensions of each attribute and obtain a normalized matrix GPU computing power, response time, network bandwidth, read / write speed, and fault recovery time are five benefit attributes (the larger the value, the better), and quotation and cheating times are two cost attributes (the smaller the value, the better). For benefit attributes and cost attributes, the range transformation method has different formulas for normalization, as follows:
[0109] For benefit-type attributes, the normalization formula is:
[0110] For cost attributes, the normalization is:
[0111]
[0112] in, Indicates The minimum value of the attribute value, Indicates The maximum value of attribute values;
[0113] S303) Calculate probability: Calculate the proportion of each cloud service provider under each attribute in the normalized matrix, and use it as the probability value used in the information entropy calculation to obtain the probability matrix , calculated as follows:
[0114]
[0115]
[0116] in, Represents the normalized matrix Attributes The proportion of cloud service providers;
[0117] S304) Calculate the information entropy of each attribute: Calculate the information entropy of each attribute according to the probability value of the probability matrix. The formula is as follows:
[0118]
[0119] S305) Calculate the information utility value of each attribute: Calculate the information utility value of each attribute according to the information entropy of each attribute, and the formula is as follows:
[0120]
[0121] Information utility value:
[0122] S306) Calculate the entropy weight of each attribute: Calculate the entropy weight of each attribute according to the information utility value of each attribute, and the formula is as follows:
[0123]
[0124] The entropy weight is the weight value of each attribute calculated using the entropy weight method, that is, the second weight of each attribute.
[0125] After the winning cloud service provider is selected, the model training can be completed on the cloud server side of the winning cloud service provider before the training convergence model saved on the server side can be verified accordingly. Step S102 of this embodiment is as follows: Figure 3 As shown in steps ① and ②, during the model training process, the specific operations of the client and the cloud server are as follows:
[0126] S401) Dataset upload: Step ① is completed by the client. Take two clients and three cloud servers participating in the secret state outsourcing neural network classification model training as an example. The two clients have local data, including training set and verification set. The two clients save the verification set locally, encrypt the data set using secret sharing, and send the generated three secret shares to the three cloud servers respectively. When the cloud server uses the secret share of the training set data for model training, the cloud server side randomly extracts sample data with the same ID from the training set as test data (here the extraction percentage is set to =30%), and the rest of the data are training data.
[0127] S401) Model training: Step ② is completed by the cloud server. When the cloud server uses the secret share of the training set data to perform model training, it uses the additive homomorphism of secret sharing and the multiplicative homomorphism realized by the multiplication triples. Each cloud server uses its own share of training data to synchronously perform the whole process of neural network model training until the specified number of epochs (here set = 1000), and get the secret share corresponding to the model parameters. Figure 3 After obtaining the converged model secret share, the model parameters The secret share , , The forms are stored in cloud server 1, cloud server 2 and cloud server 3 respectively;
[0128] If the trained neural network model is a classification model, use the test data to perform joint prediction between cloud servers (joint prediction refers to the recovery of secret shares) to determine whether the model training accuracy meets the client's required accuracy (here, the client requires the model accuracy ), if the required accuracy is reached, stop training; if the required accuracy is not reached, adjust the training strategy (change hyperparameters, optimize algorithms, etc.) according to the information given in the training process and continue or retrain until the required training accuracy is reached ;
[0129] If the trained neural network model is a regression model, the test data is used to perform joint prediction between servers to determine whether the model training accuracy reaches the performance threshold (average loss ), if the required performance is achieved, stop training, otherwise adjust the training strategy (change hyperparameters, optimize algorithms, etc.) according to the training process data and continue or retrain until the required performance threshold is reached .
[0130] After the model training accuracy meets the client requirements, the subsequent model verification process begins.
[0131] Steps S103 and S104 of this embodiment use result-driven outsourcing model training calculation integrity verification technology, which specifically refers to using the cloud server trained and converged secret state outsourcing calculation model to reason on the verification set saved by the client, verifying the correctness of the cloud server calculation result based on the reasoning accuracy of the verification set, and using zero-knowledge proof for supplementary verification. Here, the cloud server calculation result refers to the client secret state outsourcing calculation model parameters When zero-knowledge proof is not used, this method implements the parameters of the secret state outsourcing calculation model The validity of the parameters While verifying the non-random value, the accuracy of the secret outsourcing calculation model can be achieved The effectiveness verification is described by taking two clients and three cloud servers participating in the dense state outsourcing neural network classification model training as an example. The specific steps of step S103 are as follows:
[0132] S501) Verification set feature upload: The client side agrees that a certain client uses a secret sharing protocol for encryption and divides the local verification set features into three secret sharing shares , , , uploaded to cloud server 1, cloud server 2, and cloud server 3 respectively. At the same time, the local validation set labels The hash value of the plaintext data is uploaded to the blockchain for original data storage;
[0133] S502) Model inference: After training, the model parameters are calculated in secret shares. , , The secret shares of the model parameters are used to store the secret shares of the validation set features uploaded by the client. , , Perform reasoning and obtain the final reasoning result , , ;
[0134] S503) Inference results are uploaded to the chain for evidence storage: The three cloud servers upload their respective inference results, i.e., the inference label secret shares , , Upload to the blockchain to prepare for the calculation of inference accuracy.
[0135] Step S503 also includes the steps of constructing a zero-knowledge proof circuit and using the zero-knowledge proof for auxiliary verification. When using the zero-knowledge proof for auxiliary verification, the server needs to generate the zero-knowledge proof circuit and implement the model reasoning process in the zero-knowledge proof circuit. When the cloud server constructs the zero-knowledge proof circuit according to the secret share of the verification set data, the reasoning result and the operational relationship of the trained model, the model structure or operational relationship required to be trained is obtained. Write the circuit file with the verification set feature secret share, combine it with the public parameters (collectively referred to as the universal reference code, generated by the zero-knowledge proof trusted setup phase to ensure the reliability of the zero-knowledge proof) to compile it into the R1CS constraint and generate the verification key at the same time , you can use the verification key Upload to the blockchain for evidence storage and public verification of the final zero-knowledge proof. Figure 5 As shown, the input of the zero-knowledge proof circuit includes the model parameters of the corresponding cloud server Secret shares, intermediate calculation results of each layer of the neural network of the trained model (output of matrix multiplication of each layer of the neural network , the activation function output of each layer ), and the neural network inference output result (i.e., inference label) The output of the zero-knowledge proof circuit includes the zero-knowledge proof Proof and the model parameters of the corresponding cloud server. Hash commitment of secret shares, validation set reasoning labels The secret share.
[0136] In this embodiment, when a zero-knowledge proof circuit is used to assist in verifying the output of the inference result and the zero-knowledge proof Proof, the detailed process executed by the zero-knowledge proof circuit includes the following steps:
[0137] The cloud server combines the secret shares of the corresponding model parameters to fit the model reasoning process, and generates a zero-knowledge proof witness based on the model reasoning results and the intermediate parameters generated by the reasoning process. , and then witness it based on zero-knowledge proof Generate and output zero-knowledge proof Proof; and store the model inference results in the public output public.json file for output;
[0138] The cloud server uploads the output of the zero-knowledge proof circuit to the blockchain, and also uploads the verification key generated when the zero-knowledge proof circuit is generated. To verify the zero-knowledge proof.
[0139] Specifically, cloud server 1, cloud server 2, and cloud server 3 each combine the secret shares of the model parameters , , Fit the model reasoning process, and generate a zero-knowledge proof witness based on the model reasoning results and the intermediate parameters generated by the reasoning process The three cloud servers are based on their respective Generate and output proofs Proof1, Proof2, Proof3, which are used to verify the key generated when the circuit is generated , , Perform zero-knowledge proof verification; and output public output, stored in the public.json file - public output includes neural network parameters The secret share , , Hash commitment, validation set reasoning label The secret share , , The circuit output is uploaded to the blockchain for subsequent use, the zero-knowledge proof Proof is used for zero-knowledge proof verification, and the verification set reasoning label is used. The secret share is used to calculate the accuracy of neural network model inference , neural network parameters The secret share , , The hash commitment ensures the fairness of subsequent transactions. At the same time, upload the verification key of each server , which is used to verify the zero-knowledge proof Proof. After adding the zero-knowledge proof, a complete result-driven outsourced model training calculation integrity verification method is formed, such as Figure 6 shown.
[0140] Taking two clients and three cloud servers participating in the training of a dense state outsourcing neural network classification model as an example, in step S104, the specific steps of calculating the inference accuracy to verify the validity of the model parameters and the correctness of the model accuracy are as follows:
[0141] Computational integrity verification: The client calls the blockchain smart contract and uses the secret share on the chain , , Recover validation set inference labels , and take its hash value, and compare it with the verification set label on the blockchain Compare the hash values of the validation set and calculate the inference accuracy of the validation set How to calculate the inference accuracy by comparing the Hash values is well known to those skilled in the art, and the specific calculation process will not be described in detail in this embodiment.
[0142] In order to prevent the accidental nature of the inference accuracy, in this embodiment, the inference accuracy is calculated to verify the validity of the model parameters and the correctness of the model precision, specifically including:
[0143] Calculate the inference accuracy of the current round based on the comparison between the hash value of the validation set inference label and the hash value of the validation set data label;
[0144] Execute step S103 again until the specified round is reached ;
[0145] Calculate the average value of the inference accuracy of all rounds. If the average value of the inference accuracy is greater than the preset threshold, the validity of the cloud server model parameters and the correctness verification of the model accuracy pass. If the average value of the inference accuracy is less than the preset threshold, the validity of the cloud server model parameters and the correctness verification of the model accuracy fail.
[0146] By repeatedly executing step S103 and step S104, the average value of the inference accuracy of all rounds of validation sets is calculated. , judge the inequality Is it established? The training accuracy required by the client The allowable loss coefficient on the validation set. If the judgment result is , the verification is passed, indicating the parameters of the dense state outsourcing calculation model The secret share is effective (and thus the parameter Effective), Accuracy of the intensive outsourcing calculation model Valid; otherwise invalid.
[0147] It should be noted that the multiple rounds of verification in step S104 are closely related to the threshold-based cheating cloud service detection.
[0148] Taking two clients and three cloud servers participating in the training of a secret state outsourced neural network classification model as an example, in step S104, when the key of the zero-knowledge proof circuit is used to verify the correctness of the model structure, the verification key is obtained. , , Verify the zero-knowledge proofs Proof1, Proof2, and Proof3. If the verification is successful, the corresponding model structure is correct. If the verification fails, the corresponding model structure is incorrect. How to use the verification key to verify the zero-knowledge proof is well known to those skilled in the art and will not be described in detail in this embodiment.
[0149] In step S104, when determining the cheating cloud server, a threshold-based cheating cloud server detection technology is used to identify the cheating client when the outsourced model training calculation integrity verification fails, so as to save the system's computing resources. This technology uses the property of the secret state outsourced model training process using threshold secret sharing for encryption, and screens the cheating cloud server through different cloud server combinations.
[0150] If exists The winning cloud service provider performs model training, and in step S501, uses The encryption method of threshold secret sharing is used to encrypt the verification set. Step S104 can randomly select Cloud servers for inference labeling Recovery, if there is a cheating cloud server, after After multiple rounds of verification, the cheating cloud server can be accurately located. The implementation of threshold-based cheating cloud server detection technology requires the use of appropriate combination strategies in the process of multiple rounds of reasoning verification.
[0151] Therefore, in step S104, the step of determining the cheating cloud server according to the inference accuracy corresponding to the combination of cloud servers in each round specifically includes:
[0152] exist After the inference of the cloud server is completed, the client calls the blockchain smart contract and randomly selects The inference results of the selected cloud servers are used to restore the inference labels of the validation set, and then the hash values of the inference labels of the validation set are compared with the data labels of the validation set. The inference accuracy is calculated to verify the validity of the model parameters and the correctness of the model accuracy until Cloud Servers All necessary combinations of cloud servers are selected, and the total operation wheel;
[0153] If the combination of cloud servers in each round verifies the validity of model parameters and the correctness of model accuracy, there is no cheating cloud server;
[0154] If there is a combination of cloud servers that fails to verify the validity of model parameters and the correctness of model accuracy in at least one round, remove the non-cheating cloud server from the combination of cloud servers to obtain a cheating cloud server, where the non-cheating cloud server is a cloud server in the combination of cloud servers that pass the verification of the validity of model parameters and the correctness of model accuracy in other rounds;
[0155] The winning cloud service provider updates the number of cheating in the attribute value according to the number of times the cheating cloud server is detected.
[0156] Taking two clients and three cloud servers participating in the training of a secret-state outsourced neural network classification model as an example, when there is a cheating cloud server, it is assumed that the (3,2) Shamir threshold secret sharing method is used to encrypt the feature data of the verification set. The cheating client can be detected by rounds, such as Figure 7 As shown in (a), Figure 7 (a) indicates a situation where there is a cheating cloud server. The specific steps are as follows:
[0157] (1) , that is, in the first round of verification, since the threshold is 2, it is necessary to select two cloud servers to recover the secret value. In this round, the inference result secret shares of cloud server 1 and cloud server 2 are selected to recover the inference label value, and the inference accuracy of the verification set is calculated to see whether it meets (The meaning of the symbols is the same as above) for verification, assuming that the verification result is passed.
[0158] (2) , select the inference result secret shares of cloud server 1 and cloud server 3, perform the inference label value recovery in the same way, and calculate the inference accuracy of the verification set for verification. Assume that the verification result is failed.
[0159] (3) , select cloud server 2 and cloud server 3, and perform the same operations as steps (1) and (2) above, assuming that the verification result is failed.
[0160] From the above steps, after 3 rounds of verification, it can be determined that there is a cheating cloud server and the cheating cloud server is cloud server 3. When there is no cheating cloud server, such as Figure 7 As shown in (b), Figure 7 (b) indicates the case where there is no cheating cloud server and all three rounds of verification should pass.
[0161] In step S105 of this embodiment, when the blockchain smart contract broadcasts the verification results of each cloud server to the corresponding cloud server and client, specifically, the corresponding model parameter secret share validity verification results, model accuracy The verification results of the verification set data secret share reasoning operation relationship zero-knowledge proof are returned to the corresponding cloud servers respectively, and all verification results are returned to all clients on the client side.
[0162] Taking two clients and three cloud servers participating in the secret outsourcing neural network classification model training as an example, the smart contract execution result will be the corresponding model parameter secret share , , Effectiveness and Model Accuracy The verification results are returned to cloud server 1, cloud server 2, and cloud server 3 respectively; all verification results are returned to all clients on the client side.
[0163] In step S105 of this embodiment, when the blockchain smart contract executes the delivery of tokens between the client and the cloud server according to the verification result, it specifically includes:
[0164] Determine the cloud server's model parameter secret share validity verification results and model accuracy The verification result of the verification set data secret share reasoning operation relationship zero-knowledge proof is verified to see whether they are all passed, and it is determined whether the cloud server's model parameter secret share Hash value is consistent with the hash commitment output by the zero-knowledge proof circuit. After step S104 of this embodiment is completed, each cloud server will also upload the corresponding model parameter The secret shares are sent to the blockchain, which calculates the hash value of each share. The blockchain will compare the model parameters output by the zero-knowledge proof circuit The model parameters uploaded to the cloud server after the hash commitment and verification of the secret share are completed The hash values of the secret shares are consistent to prevent the model parameters that have passed the calculation integrity verification from being inconsistent with the model parameters delivered by the cloud server;
[0165] If the cloud server's model parameter secret share validity verification results and model accuracy The verification results of the verification set data secret share reasoning operation relationship zero-knowledge proof are all verified, and the model parameters output by the zero-knowledge proof circuit are Hash commitment of secret shares and model parameters delivered by cloud servers to blockchain If the consistency verification of the hash value calculated by the secret share is passed, the token that the client promised to pay for training the model will be delivered to the cloud server, and the model parameters will be used Secret Share Recovery Model Parameters , the restored model parameters Broadcast to clients;
[0166] If the cloud server's model parameter secret share validity verification results and model accuracy The verification results of the secret share reasoning operation relationship of the verification set data, the verification results of the zero-knowledge proof, and the model parameters If at least one of the verification results of the secret share fails, the token that the client promised to pay for training the model will be returned to the client.
[0167] Embodiment 2
[0168] This embodiment proposes a computing integrity verification system in a confidential outsourcing model training scenario, including a client and a cloud service provider, wherein:
[0169] The client is used to:
[0170] Comprehensively score the cloud service providers that meet the attribute threshold requirements and determine the winning cloud service provider;
[0171] Secretly share the training set data to the cloud server of the winning cloud service provider;
[0172] Upload the hash value of the validation set data label to the blockchain for evidence storage, and secretly share the validation set data features to the corresponding cloud server;
[0173] Call the blockchain smart contract, use the inference results of the cloud server to restore the verification set inference label, then compare the hash value of the verification set inference label with the verification set data label, calculate the inference accuracy to verify the validity of the model parameters and the correctness of the model precision, and use the key of the zero-knowledge proof circuit to verify the zero-knowledge proof Proof to verify the correctness of the model structure, and then broadcast the verification results of each cloud server;
[0174] The cloud service provider is used to:
[0175] If the cloud service provider is determined to be the winning cloud service provider, the corresponding cloud server uses the secret share of the training set data to perform model training, and then uses the trained model to infer the secret share of the verification set data to obtain the inference result; the cloud server also constructs a zero-knowledge proof circuit based on the operational relationship between the secret share of the verification set data and the trained model, and then uses the zero-knowledge proof circuit to assist in verification, output the inference result and the zero-knowledge proof Proof, and upload them to the blockchain.
[0176] In summary, the present invention proposes a computational integrity verification method in a confidential outsourcing model training scenario, which is applied to a computational integrity verification system in a confidential outsourcing model training scenario. It aims to verify the computational integrity of confidential outsourcing model training, has the advantages of fairness, effectiveness, and specificity, and realizes transaction tracking from the bidding to the delivery of confidential outsourcing models and verification of the computational integrity of model training.
[0177] (1) The system of the present invention includes cloud service provider selection before confidential outsourcing model training, confidential outsourcing model training process, computational integrity verification after confidential outsourcing model training and final model delivery; for different links of the full process system of confidential outsourcing model training, a reverse auction mechanism based on multi-attribute scoring is proposed to achieve fair competition among cloud service providers, a result-driven outsourcing training computational integrity verification method is proposed to test and verify the parameters of the trained model, a threshold-based cheating cloud server detection technology is proposed to detect cheating cloud servers to achieve resource conservation, and finally a blockchain smart contract is used for delivery to achieve transaction fairness.
[0178] (2) Reverse auction mechanism based on multi-attribute scoring: The key to this mechanism is that the present invention proposes seven attributes related to intensive outsourcing training, and the "bid" attribute value is weighed by the cloud service provider through the reverse auction mechanism. Each attribute value is weighted according to the final weight determined by the autonomous weight determination method and the entropy weight method, taking into account both subjective needs and objective rationality.
[0179] (3) Result-driven outsourced training computational integrity verification method: The key to this method is that each client retains part of the data as a verification set, uses threshold secret sharing to upload the verification set for inference, and performs computational integrity verification based on the inference accuracy of the verification set. At the same time, zero-knowledge proof is used to prove the model structure, making this method more complete.
[0180] (4) Threshold-based cheating cloud server detection technology: The key to this technology is to use the threshold property when recovering the inference label value, and select different cloud server combinations in each round to recover the inference label secret share. Based on this, the cheating cloud server can be identified after the execution is completed.
[0181] The above is only a preferred embodiment of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. For example, the method of the present invention can be extracted as a widely used verification system and framework. Since the framework as a whole verifies the computational integrity of model training from the result side, the use of the framework can be plaintext confidential outsourced computing but not limited to confidential outsourced computing. The confidential outsourced computing is not limited to the encryption method of data using secret sharing (other data encryption methods, such as homomorphic encryption), not limited to the number of clients and servers, not limited to whether the specific structure of the machine learning model is a neural network, not limited to the use of blockchain to achieve the fairness of transactions, and can implement computational integrity verification by adding and deleting components of the framework according to different outsourced model training scenarios. The method proposed by the present invention has certain versatility in the training scenarios of outsourced models.
[0182] It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications without departing from the principle of the present invention should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for verifying computational integrity in a confidential outsourcing model training scenario, characterized in that: The following steps are involved: The client will comprehensively score the cloud service providers that meet the attribute threshold requirements and determine the winning cloud service provider, including: The client subjectively determines the first weight of each attribute; The client broadcasts the attribute threshold requirements of the cloud service provider on the blockchain, and the cloud service provider that meets the attribute threshold requirements responds and submits the attribute value; The client determines the second weight of each attribute of the responding cloud service provider according to the entropy weight method, including the following steps: Establishing an attribute value matrix of the responding cloud service providers, wherein each row of the attribute value matrix represents each attribute value of a cloud service provider; Normalizing each attribute in the attribute value matrix to obtain a normalized matrix, then calculating the proportion of each cloud service provider under each attribute in the normalized matrix, and using the proportion as a probability value used in information entropy calculation to obtain a probability matrix; The information entropy of each attribute is calculated according to the probability matrix, and then the information utility value of each attribute is calculated according to the information entropy of each attribute. Finally, the entropy weight of each attribute is calculated according to the information utility value of each attribute as the second weight of each attribute. The second weight of each attribute of each cloud service provider is weighted with the corresponding first weight according to a given ratio to obtain the corresponding final scoring attribute weight; Calculate a weighted comprehensive score for each cloud service provider based on the attribute value of each cloud service provider and the corresponding final score attribute weight; The client secretly shares the training set data with the cloud server of the winning cloud service provider, and the cloud server uses the secret share of the training set data to perform model training; The client uploads the hash value of the validation set data label to the blockchain for evidence storage, and secretly shares the validation set data features to the corresponding cloud server. The cloud server uses the trained model to infer the secret share of the validation set data to obtain the inference result; the cloud server also constructs a zero-knowledge proof circuit based on the secret share of the validation set data, the inference result and the computational relationship of the trained model, and then uses the zero-knowledge proof circuit to assist in verification, output the inference result and the zero-knowledge proof Proof, and upload them to the blockchain; The client calls the blockchain smart contract, uses the inference result of the cloud server to restore the inference label of the verification set, and then compares the hash value of the inference label of the verification set with the data label of the verification set, calculates the inference accuracy to verify the validity of the model parameters and the correctness of the model precision, and also uses the key of the zero-knowledge proof circuit to verify the zero-knowledge proof Proof to verify the correctness of the model structure; The blockchain smart contract broadcasts the verification results of each cloud server to the corresponding cloud server and client.
2. According to the method for verifying computational integrity in a confidential outsourcing model training scenario according to claim 1, it is characterized in that: It also includes steps to locate the cheating cloud server, including: The client calls the blockchain smart contract and randomly selects a specified number of cloud servers in each round. It uses the inference results of the selected cloud servers to restore the inference labels of the validation set. It then compares the hash values of the inference labels of the validation set with the data labels of the validation set, and calculates the inference accuracy to verify the validity of the model parameters and the correctness of the model accuracy, until all combinations of the specified number of cloud servers are selected. If the combination of cloud servers in each round verifies the validity of model parameters and the correctness of model accuracy, there is no cheating cloud server; If there is a combination of cloud servers that fails to verify the validity of model parameters and the correctness of model accuracy in at least one round, remove the non-cheating cloud server from the combination of cloud servers to obtain a cheating cloud server, where the non-cheating cloud server is a cloud server in the combination of cloud servers that pass the verification of the validity of model parameters and the correctness of model accuracy in other rounds; The winning cloud service provider updates the number of cheating in the attribute value according to the number of times the cheating cloud server is detected.
3. The method for verifying computational integrity in a confidential outsourcing model training scenario according to claim 1 is characterized in that: When calculating the inference accuracy to verify the validity of the model parameters and the correctness of the model precision, it specifically includes: Calculate the inference accuracy of the current round based on the comparison between the hash value of the validation set inference label and the hash value of the validation set data label; Execute the step again where the client uploads the hash value of the validation set data label in the local data to the blockchain for storage until the specified round is reached. K ; Calculate the average value of the inference accuracy of all rounds. If the average value of the inference accuracy is greater than the preset threshold, the validity of the cloud server model parameters and the correctness verification of the model accuracy pass. If the average value of the inference accuracy is less than the preset threshold, the validity of the cloud server model parameters and the correctness verification of the model accuracy fail.
4. The method for verifying computational integrity in a confidential outsourcing model training scenario according to claim 1, characterized in that: After the winning cloud service provider is determined, the following also includes: the client promises a token to the winning cloud service provider's cloud server to pay for training the model; After the blockchain smart contract broadcasts the verification result of each cloud server to the corresponding cloud server and the client, it also includes: the blockchain smart contract executes the delivery of tokens between the client and the cloud server according to the verification result.
5. The method for verifying computational integrity in a confidential outsourcing model training scenario according to claim 1, characterized in that: When the cloud server uses the secret share of the training set data to perform model training, it includes: The cloud server randomly extracts sample data with the same ID from the training set as test data, and the other data is training data; Each cloud server uses its own share of training data to synchronously train the neural network model throughout the entire process until the specified number of epochs is reached, and the secret share corresponding to the model parameters is obtained; If the trained neural network model is a classification model, use the test data to perform joint prediction between cloud servers to determine whether the model training accuracy reaches the client's required accuracy. If it reaches the required accuracy, stop training. If it does not reach the required accuracy, adjust the training strategy according to the information given in the training process and continue or retrain until the required training accuracy is reached. If the trained neural network model is a regression model, the test data is used for joint prediction between servers to determine whether the model training accuracy reaches the performance threshold required by the client. If the required performance is reached, the training is stopped. Otherwise, the training strategy is adjusted according to the training process data to continue or retrain until the required performance threshold is reached.
6. The method for verifying computational integrity in a confidential outsourcing model training scenario according to claim 1, characterized in that: The input of the zero-knowledge proof circuit includes the secret share of the model parameters of the corresponding cloud server, the secret share of the intermediate calculation results of each layer of the neural network of the trained model, and the secret share of the neural network reasoning output result. The output of the zero-knowledge proof circuit includes the zero-knowledge proof Proof, the hash commitment of the secret share of the model parameters of the corresponding cloud server, and the secret share of the verification set reasoning label.
7. The method for verifying computational integrity in a dense outsourcing model training scenario according to claim 6 is characterized in that: When the zero-knowledge proof circuit is used to assist in verifying the output of the inference result and the zero-knowledge proof Proof, the following steps are included: The cloud server combines the secret shares of the corresponding model parameters to fit the model reasoning process, and generates a zero-knowledge proof witness based on the model reasoning results and the intermediate parameters generated by the reasoning process. , and then witness it based on zero-knowledge proof Generate and output zero-knowledge proof Proof; and store the model reasoning results in the public output public.json file for output; The cloud server uploads the output of the zero-knowledge proof circuit to the blockchain, and also uploads the verification key generated when the zero-knowledge proof circuit is generated. To verify the zero-knowledge proof.
8. A computational integrity verification system in a confidential outsourcing model training scenario, characterized in that: Includes clients and cloud service providers, where: The client is used to: Comprehensively score the cloud service providers that meet the attribute threshold requirements and determine the winning cloud service provider, including: The client subjectively determines the first weight of each attribute; The client broadcasts the attribute threshold requirements of the cloud service provider on the blockchain, and the cloud service provider that meets the attribute threshold requirements responds and submits the attribute value; The client determines the second weight of each attribute of the responding cloud service provider according to the entropy weight method, including the following steps: Establishing an attribute value matrix of the responding cloud service providers, wherein each row of the attribute value matrix represents each attribute value of a cloud service provider; Normalizing each attribute in the attribute value matrix to obtain a normalized matrix, then calculating the proportion of each cloud service provider under each attribute in the normalized matrix, and using the proportion as a probability value used in information entropy calculation to obtain a probability matrix; The information entropy of each attribute is calculated according to the probability matrix, and then the information utility value of each attribute is calculated according to the information entropy of each attribute. Finally, the entropy weight of each attribute is calculated according to the information utility value of each attribute as the second weight of each attribute. The second weight of each attribute of each cloud service provider is weighted with the corresponding first weight according to a given ratio to obtain the corresponding final scoring attribute weight; Calculate a weighted comprehensive score for each cloud service provider based on the attribute value of each cloud service provider and the corresponding final score attribute weight; Secretly share the training set data to the cloud server of the winning cloud service provider; Upload the hash value of the validation set data label to the blockchain for evidence storage, and secretly share the validation set data features to the corresponding cloud server; Call the blockchain smart contract, use the inference results of the cloud server to restore the verification set inference label, then compare the hash value of the verification set inference label with the verification set data label, calculate the inference accuracy to verify the validity of the model parameters and the correctness of the model precision, and use the key of the zero-knowledge proof circuit to verify the zero-knowledge proof Proof to verify the correctness of the model structure, and then broadcast the verification results of each cloud server; The cloud service provider is used to: If the cloud service provider is determined to be the winning bidder, the corresponding cloud server uses the secret share of the training set data to perform model training, and then uses the trained model to infer the secret share of the verification set data to obtain an inference result; the cloud server also constructs a zero-knowledge proof circuit based on the secret share of the verification set data, the inference result, and the operational relationship between the trained model, and then uses the zero-knowledge proof circuit to perform auxiliary verification, output the inference result and the zero-knowledge proof Proof, and upload them to the blockchain.
Citation Information
Patent Citations
Verifiable data privacy protection system and method for computing service outsourcing
CN117454431A
Trust evaluation method based on characteristic factors and SLA in cloud environment
CN113364844A
Block chain data privacy protection and sharing method based on zero knowledge proof
CN114143080A
Method for protecting model privacy, data privacy and model consistency of decision tree model
CN117077038A
Cloud computing electronic information security storage system
CN118075029A
