A blockchain-based group learning incentive method
By constructing a consortium blockchain and designing identity access contracts, homomorphic encryption, and a credit calculation mechanism, the problems of inaccurate credit estimation and insufficient computing power of model publishing nodes in group learning are solved, realizing a secure and sustainable group learning incentive mechanism and ensuring the security and accuracy of the training process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2023-03-01
- Publication Date
- 2026-05-01
AI Technical Summary
Existing blockchain-based group learning incentive methods cannot achieve secure and sustainable closed-loop operation, and suffer from problems such as inaccurate credit estimation and insufficient computing power of model publishing nodes.
By constructing a consortium blockchain, designing identity access contracts and margin contracts, employing homomorphic encryption and correctness proofs, and combining integrity calculation and verification mechanisms, we can achieve incentives and credit management for data nodes and computing nodes, ensuring the security and accuracy of the training process.
It enables safe and sustainable operation of group learning, prevents malicious behavior by nodes, ensures the accuracy of credit information and the reliable sharing of training results, and improves the security and efficiency of model use.
Smart Images

Figure CN116028978B_ABST
Abstract
Description
A Blockchain-Based Group Learning Incentive Method Technical Field
[0001] This invention relates to the fields of blockchain, federated learning, and incentive mechanisms, and in particular to a blockchain-based group learning incentive method. Background Technology
[0002] Currently, there are no publicly available solutions for incentivizing blockchain-based group learning. Nevertheless, the industry has proposed many incentive methods related to federated learning. For example, selling data or models through auctions can truly reflect the real value of the data or models; setting game rules and payoff functions for cooperating parties based on game theory can significantly reduce the possibility of malicious behavior. However, the drawbacks of these methods are that they cannot integrate historical data, leading to inaccurate credit and value estimates in the current round; furthermore, these methods only propose solutions for specific scenarios and do not construct a complete architecture for group learning.
[0003] Another recent type of federated learning incentive method is the blockchain-based reputation method. This approach uses a subjective weighting algorithm to calculate the reputation of each data node, then selects nodes with reputations exceeding a certain threshold as the actual participants in training. However, this method doesn't account for the possibility that model publishers might conceal their reputations, a vulnerability that can be exploited by malicious actors in real-world applications. Furthermore, this method assigns the task of aggregating gradients and updating the global model to the model publishing nodes, which may lack the necessary computing power.
[0004] Among the incentive methods for federated learning, the DeepChain method, based on privacy protection measures, incentive mechanisms, and blockchain, has been proposed. The main goal of this type of method is to enable federated learning to operate securely and sustainably, assigning different tasks to different nodes. This method can effectively implement blockchain-based federated learning training, but it lacks consideration for the model usage phase. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention aims to solve the problem of how to enable secure, sustainable, and closed-loop group learning based on consortium blockchains. To achieve this, this invention proposes a blockchain-based group learning incentive method.
[0006] This invention is achieved through the following technical solutions:
[0007] A blockchain-based method for incentivizing group learning includes the following steps:
[0008] (1) Node preprocessing, which includes the following sub-steps:
[0009] (1.1) Construct the consortium blockchain and the identity access contract contract1 and the margin contract contract2;
[0010] (1.2) After dividing the nodes into network nodes (network_node), data nodes (data_node), worker nodes with incentive mechanisms (worker_node), and user nodes (user_node), verify the identity according to contract1 and pay the deposit m according to contract2. i Join the consortium blockchain built in step (1.1);
[0011] (1.3) The consortium blockchain contains several organizations with similar functions. i It consists of a network node, several data nodes, and computing nodes with incentive mechanisms within an organization;
[0012] (2) Network nodes pre-train and filter data nodes, which includes the following sub-steps:
[0013] (2.1) Network nodes publish model tasks to the blockchain for query by various data nodes. Data nodes voluntarily join the pre-training phase so that network nodes can select suitable participants.
[0014] (2.2) During the pre-training phase, network nodes calculate the credit value of the evaluated data nodes, i.e., tot_reputation; where tot_reputation = direct_reputation + indirect_reputation, direct_reputation refers to the credit value of the data node calculated by the network nodes during the pre-training phase, and indirect_reputation refers to the credit value referenced on the chain.
[0015] (2.3) Data nodes sign a corresponding smart contract (task_contract) with network nodes based on the data types, quality, and scale they can provide. The contract should specify the reward the data node should receive upon successful completion of training. If the data node meets the contract requirements after training, it receives the reward, and the network node uploads its actual reputation. If the data node intentionally misbehaves or fails to meet the contract requirements, its deposit m... iIt will be confiscated and used to compensate other data nodes and network nodes. At the same time, the network node will give a 50% reputation evaluation to this data node and upload it. If the malicious data node wants to join the training again, it must first pay twice the previous deposit as the current deposit.
[0016] (2.4) After the network node completes the selection of data nodes, it entrusts the subsequent calculations to the computing nodes with an incentive mechanism and pays the commission to the computing nodes with an incentive mechanism. The computing nodes with an incentive mechanism will inform the network node of multiple results generated during the training process through the form of homomorphic encryption. To prevent the computing nodes from obtaining additional gradient information, the gradient information of the data nodes is also transmitted to the computing nodes with an incentive mechanism in the form of homomorphic encryption. The multiple results include the final model parameters, the reputation of the data nodes, and the detailed information of each round. The gradient information refers to the gradient value generated by each data node during each round of training.
[0017] (3) The computing nodes with an incentive mechanism perform the calculation and consensus of the global model and credit value, specifically including the following sub-steps:
[0018] (3.1) The initial trust value of each computing node is 100 points, and trust > 0. Assume that the system has n computing nodes at this time, and the subscripts of the computing nodes can be set as 0, 1,... n - 1. The system also maintains a trust array, where trust[i] represents the trustworthiness of the computing node with subscript i. The system calculates the prefix sum array preSum_trust of the trust array, and the last element of the prefix sum array is the total trust value tot_trust of all computing nodes. The system uses the blockchain random number algorithm to generate a random number r within the range of [0, tot_trust], and then efficiently finds the position of r in the prefix sum array preSum_trust through the binary search algorithm. Assume preSum_trust[j] < r <= preSum_trust[j + 1], and specify the j-th computing node as the leader.
[0019] The leader node needs to complete the update of the global gradient G of the global model M, and at the same time needs to calculate the reputation of the i-th data node. The mathematical expression is:
[0020]
[0021] where j (1 ≤ j ≤ n) represents the j-th round of training.
[0022] The leader computes homomorphically encrypted data and needs to attach a proof of correctness V. If other computing nodes want to verify the correctness of the leader's result, they can join the verification committee, which uses the PBFT consensus protocol.
[0023] (3.2) After the leader completes the computation task delegated by the network nodes, the verification committee verifies the leader's result. If the leader's result is not recognized by more than 2 / 3 of the other incentive-based computation nodes, the leader is considered to have acted maliciously, and the leader's deposit will be equally distributed among the other computation nodes. If an incentive-based computation node that acted maliciously wants to rejoin the training, it must first pay twice the deposit it paid last time as its deposit for this training. Simultaneously, the leader's trust value will be reduced. i This will result in a deduction of points, and the probability of being randomly selected again next time will be lower; subsequently, the election-computation-verification steps need to be executed again among the remaining incentive-enabled computing nodes; if the leader's result is recognized by more than 2 / 3 of the other incentive-enabled computing nodes, the trust value will increase. i It will add points, and will also receive the block reward for this round as well as the delegation fee from the model publisher; for other nodes that help verify the data, the node's trust value will be increased. i Bonus points are awarded to nodes that belong to the minority group, based on their trust value. i Deduct points;
[0024] (3.3) After verification, the leader records the encrypted results of the training process on the blockchain in the form of transactions so that network nodes can obtain and decrypt the training data.
[0025] (4) Trustworthy sharing of reputation information among network nodes of different institutions, specifically including the following sub-steps:
[0026] (4.1) In the same block, there may be transactions that store the results of different training processes. The same data node may join the training initiated by different network nodes and will obtain the reputation[j] of different network nodes, where j represents the j-th network node.
[0027] (4.2) To prevent network nodes from maliciously misreporting the reputation information of data nodes, outlier analysis is needed for m reputation values of the same data node within the same block; specifically, assuming the reputation follows a normal distribution, outliers must satisfy... Where s represents the standard deviation of all reputations; for network nodes that report outliers, their deposit is equally distributed among other network nodes participating in outlier detection. If a malicious network node wants to rejoin training, it must first pay twice its previous deposit as its current deposit; at this point, outlier reputations need to be removed, and then, assuming m1 normal reputations remain, their average value is calculated. And record it on the blockchain; the 0 <m1≤m;
[0028] (5) The model uses a pre-trained model, which includes the following sub-steps:
[0029] (5.1) Model-using nodes can be any node in the consortium blockchain, including model publishing nodes, data nodes, computing nodes with incentive mechanisms, and other nodes; when using the model, model-using nodes need to pay a corresponding fee w to the model publishing node. i The network node will write the result C(ans) encrypted with the public key of the model using the node and the proof of the correctness of the result V(params, ans) into the transaction package and put it on the chain. Only the model using the node can decrypt the result.
[0030] (5.2) Computation nodes with incentive mechanisms can verify the returned result by checking the correctness proof. If more than 2 / 3 of the nodes confirm the result, the result is considered credible, the transaction is successful, the transaction result is recorded on the blockchain, network nodes can obtain the relevant fees, and the computing nodes that assisted in the verification can also share the transaction fee of 1% w. i At the same time, it assists in verifying the honesty and integrity of the computing nodes. i It will add points; if less than 2 / 3 of the computing nodes support the result, the transaction will fail, and the network node's deposit will be distributed equally among the model-using nodes and the computing nodes with incentive mechanisms participating in the verification. That is, if a malicious network node wants to rejoin the training, it must first pay twice the previous deposit as the current deposit.
[0031] Furthermore, in step (1.3), the network node is responsible for publishing the training model task and recording the credit value of the data node during training; the data node is responsible for providing data and local gradients during training; the computation node with incentive mechanism is responsible for helping the network node complete all model-related computations and verifying correctness; the model-using node is used to pay the network node fees and use its trained model.
[0032] Further, in step (2.2), the network node calculates the credit value of the evaluated data node, specifically as follows:
[0033] During pre-training, network nodes can calculate the probability P of a data node potentially acting maliciously using gradient attack detection. A local direct_reputation = (1-P)*acc*log(size) / t is then calculated by statistically analyzing the total training time t, model accuracy acc, and data size for each data node during the pre-training phase. Simultaneously, assuming there are k records [i] (1≤i≤k) for this data node on the chain, the following calculations are performed: Where the later the publication time of record_reputation[i], the higher the corresponding weight w. i The larger it is, the more it ensures... Finally, calculate tot_reputation = direct_reputation + indirect_reputation, and select the data nodes whose tot_reputation is in the top 50% as the actual participating nodes.
[0034] Further, in step (3.1), the system calculates the prefix sum array preSum_trust of the trust array, whose mathematical expression is:
[0035]
[0036] Here, we set preSum_trust[0] = 0 and tot_trust = preSum_trust[-1].
[0037] Furthermore, since the functions of the institutions are similar, the trained models have high similarity in step (4.1), so reputation[j] should show high consistency.
[0038] The beneficial effects of this invention are as follows:
[0039] 1) Based on the blockchain architecture, the incentive mechanism design for group learning is improved; in order to solve the problem of underreporting in the reputation-based incentive mechanism, a game theory-based reward and punishment method is designed to maximize the benefit of network nodes honestly reporting their reputation; and a novel computing node election mechanism based on trust is designed; through homomorphic encryption and correctness proof, the data privacy and security of all parties in the training process are guaranteed. Attached Figure Description
[0040] Figure 1 is a flowchart of the method of the present invention. Detailed Implementation
[0041] The objective of this invention is achieved through the following technical solution: a blockchain-based group learning incentive method, comprising the following steps:
[0042] As shown in Figure 1:
[0043] (1) Node preprocessing, which includes the following sub-steps:
[0044] (1.1) Construct the consortium blockchain and the identity verification contract contract1 and the margin contract contract2;
[0045] (1.2) Nodes pass identity verification and pay a security deposit m i Later, it joined the consortium blockchain;
[0046] (1.3) Each node assigns itself a label to identify itself as a network node, a data node, a computation node with an incentive mechanism, and a model user node. Among them, the network node is responsible for issuing training model tasks and recording the credit value of data nodes during training; the data node is responsible for providing data and local gradients during training; the computation node with an incentive mechanism is responsible for helping the network node complete all model-related calculations and verifying correctness; and the model user node pays the network node a fee and uses the trained model.
[0047] (1.4) Organization O i The functions are similar, and the same organization has one network node, multiple data nodes, and computing nodes with incentive mechanisms, where it is assumed that the data dimensions of different data nodes are similar.
[0048] (2) Network nodes pre-train and filter data nodes, which includes the following sub-steps:
[0049] (2.1) Network nodes publish model tasks to the blockchain for query by various data nodes. Data nodes voluntarily join the pre-training phase so that network nodes can select suitable participants.
[0050] (2.2) During the pre-training phase, network nodes need to calculate a credit value for evaluating data nodes, called tot_reputation, where tot_reputation = direct_reputation + indirect_reputation
[0051] Direct_reputation refers to the credit value of a data node calculated by network nodes during the pre-training phase, while indirect_reputation refers to the credit value referenced on-chain. The specific calculation methods for both are as follows:
[0052] (2.2.1) The calculation of direct_reputation is related to the probability P of a data node potentially acting maliciously, the total training time t during the pre-training phase, the model accuracy acc, and the data size. The probability P of malicious behavior can be calculated using common gradient attack detection algorithms such as RONI. The model accuracy acc is calculated by the network node using test data through the local model provided by the data node. Therefore, we define direct_reputation = (1-P)*acc*log(size) / t;
[0053] (2.2.2) Since the historical reputation of a data node is recorded on the chain, we can obtain k recorded records[i] (1≤i≤k) of that data node on the chain. We select the five most recent records as reference values, i.e. Specifically, when k=1, w=(1); when k=2, w=(0.7,0.3); when k=3, w=(0.5,0.3,0.2); when k=4, w=(0.4,0.3,0.2,0.1); when k>=5, w=(0.1,0.15,0.2,0.25,0.3);
[0054] (2.2.3) Finally, calculate tot_reputation = direct_reputation + indirect_reputation, and select the data nodes whose tot_reputation is in the top 50% as the real participating nodes.
[0055] (2.3) The selected data node signs a corresponding smart contract (task_contract) with the network node based on the data type, data quality, and data scale it can provide. The contract should specify the reward that the data node should receive after completing the training as required. There are two specific cases:
[0056] (2.3.1) If a data node meets the contract requirements after training, it can obtain the relevant reward, and the network node will upload its actual reputation.
[0057] (2.3.2) If a data node intentionally acts maliciously or fails to meet the requirements of the contract, its security deposit m i The deposit will be confiscated and used to compensate other data nodes and network nodes. Simultaneously, the network node will provide the data node with a result equal to 50% of its actual reputation and upload it. If a malicious data node wants to rejoin the training, it must first pay twice the amount of its previous deposit as a new deposit.
[0058] (2.4) After selecting data nodes, network nodes delegate subsequent computations to incentive-enabled computing nodes and pay them a delegation fee. To prevent computing nodes from learning additional information, network nodes select homomorphic encryption keys and distribute the public key to both data nodes and incentive-enabled computing nodes. The gradient information of data nodes is uploaded to the blockchain using homomorphic encryption, while incentive-enabled computing nodes also encrypt and upload the parameters of intermediate model results generated during training. This allows both incentive-enabled and data nodes to train under the supervision of network nodes.
[0059] Homomorphic encryption is a conventional technique that involves homomorphically encrypting the original data, performing specific operations on the resulting ciphertext, and then homomorphically decrypting the result to obtain plaintext, which is equivalent to the data result obtained by directly performing the same calculation on the original plaintext data.
[0060] The gradient information refers to the gradient value generated by each data node in each round of training.
[0061] (2.5) After training, the computing nodes with incentive mechanisms will put the final model parameters and the reputation of the data nodes that participated in the training on the chain. Network nodes can download and decrypt the information on the chain.
[0062] (3) Computation nodes with incentive mechanisms perform global model and credit value calculation and consensus, specifically including the following sub-steps:
[0063] (3.1) The trust value of each computing node (which will not be lower than 0) is initially 100 points. Assume that the system has n computing nodes at this time, and their indices can be set to 0, 1, ... n-1. The system also maintains a trust array, where trust[i] represents the trust value of the computing node with index i.
[0064] (3.2) The system calculates the prefix sum array preSum_trust of the trust array, where Where preSum_trust[0] = 0, tot_trust = preSum_trust[-1];
[0065] (3.3) Generate a random number r within the range of [0, tot_trust] through the blockchain random number algorithm (the random seed is related to the hash of the current block). Then, efficiently find the position of r in the prefix sum array preSum_trust through the binary search algorithm. Suppose preSum_trust[j] < r <= preSum_trust[j + 1], then at this time, we designate the j-th computing node as the leader;
[0066] (3.4) The leader node needs to complete the update of the global gradient G of the global model M and calculate the of the i-th data node. Here, j (1 ≤ i ≤ n) represents the j-th round of training. All the data calculated by the leader is homomorphic encrypted, and the leader needs to attach the proof of correctness V.
[0067] (3.5) If the remaining workers hope to verify the correctness of the leader's result, they can join the verification committee, where the PBFT consensus protocol is used in the verification committee. After the leader completes the computing tasks entrusted by the network nodes, the verification committee verifies the leader's result. Specifically:
[0068] (3.5.1) If the leader's result is not recognized by more than 2 / 3 of the other computing nodes with incentive mechanisms, it can be considered that the leader is deliberately malicious. At this time, the leader's deposit will be evenly distributed to other computing nodes (if the malicious computing node with incentive mechanism wants to join the training again, it must first pay twice the previous deposit as the current deposit). At the same time, the leader's integrity value trust i will be reduced by 20 points, which means that the probability of it being drawn by the random number algorithm next time becomes lower. The remaining computing nodes with incentive mechanisms need to execute the steps of election - calculation - verification again;
[0069] (3.5.2) If the leader's result is recognized by more than 2 / 3 of the other computing nodes with incentive mechanisms, the integrity value trust i will increase by 5 points. At the same time, it will be able to obtain the block reward for this round and the commission from the model publisher;
[0070] (3.5.3) For other computing nodes with incentive mechanisms that help with verification, the integrity value trust of the nodes belonging to the majority i increases by 1 point, and the integrity value trust of the nodes belonging to the minority i decreases by 1 point;
[0071] (3.6) If the leader's result is verified, the leader will record the encrypted result of the training process on the chain in the form of a transaction so that network nodes can obtain and decrypt the training data.
[0072] (4) Trustworthy sharing of reputation information among network nodes of different institutions, specifically including the following sub-steps:
[0073] (4.1) In the same block, there may be transactions that store the results of different training processes. The same data node may join the training initiated by different network nodes. Therefore, this data node may obtain the reputation[j] of different network nodes, where j represents the j-th network node.
[0074] (4.2) We assume that the training behavior of the same data node tends to be stable and the trained models are similar, then reputation[j] should show a high degree of consistency;
[0075] (4.3) To prevent network nodes from maliciously misreporting the reputation information of data nodes, we need to perform outlier analysis on the m reputation values of the same data node within the same block. Specifically:
[0076] (4.3.1) We construct a smart contract similar to a blind auction contract that periodically publishes reputation. Before publication, all reputation sent by network nodes to the smart contract is not visible to the outside world. All the sent reputation is published only at a specific time to prevent network nodes from obtaining additional information.
[0077] (4.3.2) Due to the similarity of the institutions and the consistency of the data node behavior, we can assume that the reputation follows a normal distribution, and outliers must satisfy... Where s represents the standard deviation of all reputations;
[0078] (4.3.3) For network nodes that report outliers, we distribute their deposit equally among the other network nodes that participate in outlier judgment (if a malicious network node wants to rejoin the training, it must first pay twice the deposit of the previous time as the deposit for this time).
[0079] (4.3.4) We need to remove outlier reputations, and then, assuming that m1 normal reputations remain, calculate their average. And record it on the blockchain so that subsequent network nodes can use it as a reference for indirect_reputation; the 0 <m1≤m;
[0080] (5) The model uses a pre-trained model, which includes the following sub-steps:
[0081] (5.1) Model-using nodes can be any node in the consortium blockchain, including model-publishing nodes, data nodes, computation nodes with incentive mechanisms, and other nodes. When using a model, a model-using node needs to pay a corresponding fee w to the model-publishing node. i And provide the public key;
[0082] (5.2) The network node will write the result C(ans) encrypted with the public key of the model user node and the proof of the correctness of the result V(params, ans) into the transaction package and put it on the chain. Only the model user node can decrypt the result.
[0083] (5.3) Computation nodes with incentive mechanisms can verify the correctness of the returned results by checking the correctness proof. If so, they can vote in the designated voting contract. The specific voting situation is discussed below:
[0084] (5.3.3) If more than 2 / 3 of the nodes consider the result credible, then the transaction is successful, the transaction result is recorded on the blockchain, the network nodes can obtain the relevant fees, and the computing nodes that assisted in the verification can also share the transaction fee of 1% w. i At the same time, it assists in verifying the honesty and integrity of the computing nodes. i It will increase by 1 point;
[0085] (5.3.4) If less than 2 / 3 of the computing nodes support the result, the transaction fails and the network node's margin is distributed equally among the model-using nodes and the computing nodes with incentive mechanisms that participated in the verification (if a malicious network node wants to rejoin the training, it must first pay twice the previous margin as the current margin).
[0086] The above embodiments are merely illustrative of the technical concept and features of the present invention, enabling those skilled in the art to understand the content of the present invention and implement it accordingly, and should not be construed as limiting the scope of protection of the present invention. All equivalent changes made based on the substance of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A blockchain-based group learning incentive method, characterized in that, The process includes the following steps: (1) Node preprocessing, specifically including the following sub-steps: (1.1) Constructing the consortium blockchain and the identity access contract contract1 and the security deposit contract contract2; (1.2) After dividing the nodes into network nodes, data nodes, computing nodes with incentive mechanisms, and model user nodes, verifying the identity according to the contract1 contract and paying the security deposit m according to the contract2 contract. i Join the consortium blockchain constructed in step (1.1); (1.3) the consortium blockchain contains several organizations with similar functions. i The organization contains a network node, several data nodes, and computing nodes with incentive mechanisms; (2) The network node pre-trains and screens the data nodes, specifically including the following sub-steps: (2.1) The network node publishes the model task on the blockchain for each data node to query, and the data nodes voluntarily join the pre-training stage so that the network node can select suitable participants; (2.2) In the pre-training stage, the network node calculates and evaluates the credit value of the data node, i.e., tot_reputation; where tot_reputation = direct_reputation + indirect_reputation, direct_reputation refers to the credit value of the data node calculated by the network node during the pre-training phase, and indirect_reputation refers to the credit value referenced on the chain; (2.3) The data node signs the corresponding smart contract task_contract with the network node according to the data type, data quality and data scale it can provide, and the contract should specify the reward that the data node should receive after completing the training as required; if the data node meets the requirements of the contract after the training is completed, it will obtain the relevant reward, and the network node will upload its actual reputation; if the data node deliberately acts maliciously or fails to meet the requirements of the contract, its deposit m i The deposit will be confiscated and used to compensate other data nodes and network nodes. At the same time, the network node will give the data node a 50% reputation rating and upload it. If a malicious data node wants to rejoin the training, it must first pay twice the previous deposit as the current deposit. (2.4) After completing the selection of data nodes, the network node delegates the subsequent computation to the computing node with incentive mechanism and pays the computing node with incentive mechanism a delegation fee. The computing node with incentive mechanism will inform the network node of multiple results generated during the training process through homomorphic encryption. In order to prevent the computing node from knowing additional gradient information, the gradient information of the data node is also transmitted to the computing node with incentive mechanism through homomorphic encryption. The multiple results include the final model parameters, the reputation of the data node and detailed information of each round. The gradient information refers to the gradient value generated by each data node in each round of training. (3) The computing node with incentive mechanism performs global model and credit value calculation and consensus, which specifically includes the following sub-steps: (3.1) The initial trust value of each computing node is 100 points, and trust 0; Assume the system has n computing nodes, whose indices can be set to 0, 1, ..., n - 1; The system also maintains a trust array, where trust[i] represents the trustworthiness of the computing node at index i; The system calculates the prefix sum array preSum_trust of the trust array, where the last element of the prefix sum array is the sum of the trust values of all computing nodes tot_trust; The system uses a blockchain random number algorithm to generate a random number r between [0, tot_trust], and then uses a binary search algorithm to efficiently find the position of r in the prefix sum array preSum_trust. Let preSum_trust[j] < r <= preSum_trust[j + 1], and designate the j-th computing node as the leader; The leader node needs to update the global gradient G of the global model M, and also needs to calculate the reputation of the i-th data node; Its mathematical expression is: , where j represents the j-th round of training, where The leader computes homomorphically encrypted data and needs to attach a correctness proof V. If other computing nodes want to verify the correctness of the leader's result, they can join the verification committee, which uses the PBFT consensus protocol. (3.2) After the leader completes the computing task delegated by the network nodes, the verification committee verifies the leader's result. If the leader's result is not recognized by more than 2 / 3 of the other computing nodes with incentive mechanisms, it is considered that the leader is deliberately malicious. In this case, the leader's deposit will be equally distributed to the other computing nodes. If a malicious computing node with incentive mechanisms wants to rejoin the training, it must first pay twice the deposit of the previous time as the deposit for this time. At the same time, the leader's trust value will be increased. i This will result in a deduction of points, and the probability of being randomly selected again next time will be lower; subsequently, the election-computation-verification steps need to be executed again among the remaining incentive-enabled computing nodes; if the leader's result is recognized by more than 2 / 3 of the other incentive-enabled computing nodes, the trust value will increase. i It will add points, and it will also receive the block reward for this round as well as the delegation fee from the model publisher; For other nodes that help verify the information, if they belong to the majority, the trust value is [assigned]. i Bonus points are awarded to nodes that belong to the minority group, based on their trust value. i Deduct points; (3.3) After verification, the leader records the encrypted results of the training process on the chain in the form of transactions so that network nodes can obtain and decrypt the training data; (4) Network nodes of different institutions can share reputation information in a reliable manner, which includes the following sub-steps: (4.1) In the same block, there will be transactions that store the results of different training processes. When the same data node joins the training initiated by different network nodes, it will obtain the reputation[j] evaluated by different network nodes, where j represents the j-th network node; (4.2) In order to prevent network nodes from maliciously reporting the reputation information of data nodes, it is necessary to verify the reputation information of the same data node in the same block. Outlier analysis is performed on each reputation value; specifically, assuming the reputation follows a normal distribution, outliers must satisfy the following conditions: ,in Let represent the standard deviation of all reputations. For network nodes that report outliers, their deposit is equally distributed among the other network nodes participating in outlier detection. If a malicious network node wants to rejoin training, it must first pay twice its previous deposit as its current deposit. At this point, outlier reputations need to be removed, and then the remaining denominator is set as... Calculate the average of a normal reputation. And record it on the blockchain; the (5) The model-using node uses the trained model, specifically including the following sub-steps: (5.1) The model-using node can be any node in the consortium blockchain, including model publishing nodes, data nodes, computing nodes with incentive mechanisms, and other nodes; when using the model, the model-using node needs to pay the corresponding fee w to the model publishing node. i The network nodes will use the model to encrypt the result using the node's public key. Proof of the correctness of the results The transaction is packaged and uploaded to the blockchain, and only the nodes using the model can decrypt the result; (5.2) Computational nodes with incentive mechanisms can verify the returned result by checking the correctness proof. If more than 2 / 3 of the nodes are involved, the result is considered credible, the transaction is successful, the transaction result is recorded on the blockchain, network nodes can obtain the relevant fees, and the computational nodes that assist in the verification can also share the transaction fee of 1%w. i At the same time, it assists in verifying the honesty and integrity of the computing nodes. i It will add points; If less than 2 / 3 of the computing nodes support the result, the transaction fails, and the network node's margin is distributed among the model-using nodes and the computing nodes with incentive mechanisms participating in the verification. That is, if a malicious network node wants to rejoin the training, it must first pay twice the previous margin as the current margin.
2. The blockchain-based group learning incentive method according to claim 1, characterized in that, In step (1.3), the network node is responsible for publishing the training model task and recording the credit value of the data node during training; the data node is responsible for providing data and local gradients during training; the computing node with incentive mechanism is responsible for helping the network node complete all model-related calculations and verifying correctness; the model-using node is used to pay the network node and use its trained model.
3. The blockchain-based group learning incentive method according to claim 1, characterized in that, In step (2.2), the network node calculates the credit value of the data node, specifically as follows: During the pre-training process, the network node can calculate the probability P of the data node acting maliciously through gradient attack detection, and calculate a local direct_reputation = (1-P)*acc*log(size) / t by statistically analyzing the total training time t, model accuracy acc, and data size of each data node during the pre-training phase; it is also assumed that there are k records of this data node on the chain. , ; calculate If The later the release time, the higher the corresponding weight. The larger it is, the more it ensures... Finally, calculate tot_reputation = direct_reputation + indirect_reputation, and select the data nodes whose tot_reputation is in the top 50% as the actual participating nodes.
4. The blockchain-based group learning incentive method according to claim 1, characterized in that, In step (3.1), the system calculates the prefix sum array preSum_trust of the trust array, whose mathematical expression is: , ; where, let preSum_trust[0] = 0, tot_trust = preSum_trust[-1].
5. The blockchain-based group learning incentive method according to claim 1, characterized in that, In step (4.1), since the functions of the institutions are similar, the trained models are similar, so reputation[j] should be highly consistent.
Citation Information
Patent Citations
Federal learning-oriented cross-chain consensus method and system
CN113704810A
Federal learning incentive mechanism method based on block chain
CN114170021A