Security federal learning dynamic excitation method, system and device and storage medium
The secure federated learning method addresses participant engagement and privacy challenges by employing a dynamic verification committee and adaptive reward strategies, enhancing system robustness and fairness in IoT edge computing scenarios.
Patent Information
- Application Number
- CN202411159058.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-13
AI Technical Summary
Existing federated learning systems face challenges in incentivizing participant engagement due to dynamic node availability, resource heterogeneity, network security attacks, and privacy concerns, leading to fairness issues and potential malicious interference.
A secure federated learning method using a dynamic verification committee and Markov reward process to incentivize participation, ensuring data privacy through Paillier encryption and blockchain-based consensus, with adaptive reward strategies to balance participant contributions.
Enhances system robustness and fairness by protecting privacy, preventing malicious behavior, and optimizing resource allocation, thereby improving model performance and participant engagement.
Smart Images

Figure CN119135696A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of distributed machine learning, and specifically relates to a secure federated learning dynamic incentive method, system, device and storage medium for an Internet of Things edge computing scenario. Background Art
[0002] With the continuous development of information technology in the field of artificial intelligence, big data has become a key factor driving artificial intelligence (AI). Therefore, countries around the world attach great importance to the transformation of the digital field of artificial intelligence and apply it to industries, medical care, finance, and intelligent logistics and transportation. Federated learning (FL), as a new paradigm of distributed machine learning, breaks down the barriers between data through model parameter sharing. Federated learning requires participants to voluntarily share their data or model updates, and encourage different participants (such as industrial Internet of Things devices (IIOT), edge servers, smart mobile clients, etc.) to contribute their own data and participate in collaboration. The lack of incentive mechanism may lead to insufficient enthusiasm of participants and fairness issues. Therefore, it is crucial to encourage more data suppliers to participate in federated learning tasks.
[0003] Existing incentive mechanisms for federated learning can be divided into three categories: reputation-driven, contribution-driven, and resource-driven. However, in actual IoT edge computing, existing incentive methods ignore the dynamic nature of participant availability, such as device resource heterogeneity, network security attacks, and energy constraints. This puts forward more stringent requirements on the privacy security of federated learning participants and the robustness of the system. The liquidity of participants allows them to freely join or leave federated learning, while model performance is affected by multiple factors such as resource composition and cost. In addition, in the case of differentiated data model owners participating, some malicious participants may benefit from deviations. The heterogeneity of data from different participants and the dynamic nature of nodes have become key challenges facing today's application incentive mechanisms. First, the dynamic nature of participating nodes will lead to fair reward issues in the incentive mechanism if there is no flexible incentive strategy; second, malicious nodes use the liquidity of nodes to interfere with the normal operation of the system, which has an adverse effect on the robustness of the system; finally, the data results of participants' training are vulnerable to inference attacks, resulting in privacy leakage. Summary of the invention
[0004] In response to the above problems, the purpose of the present invention is to provide a secure federated learning dynamic incentive method, system, device and storage medium for IoT edge computing scenarios, which solves the problems of data privacy, node dynamics and differences in participant willingness faced by the actual deployment of IoT smart edge devices, while promoting continuous participation and cooperation based on the participants' changing behavioral states and reward contributions.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a method for dynamic incentive of secure federated learning, comprising the following steps:
[0007] 1) Initialize the data device owner and model decision owner, and the trusted authority broadcasts the training transaction to the local training layer through the blockchain;
[0008] 2) In the local training layer, each data device owner conducts local model training and jointly encrypts the gradient update parameters transmitted by model training based on the improved Paillier security aggregation method;
[0009] 3) Based on the gradient update parameters uploaded by the local training layer, the dynamic verification committee is used to cross-verify between the data device owner and the model decision owner, and the malicious data device owner is punished according to the verification results. At the same time, the model decision owner status is updated, and the block record updates the transaction status information;
[0010] 4) Use the Markov reward process to instantiate and model dynamic nodes, set different incentive functions, and formulate incentive strategies for model decision owners;
[0011] 5) Based on the updated transaction status information recorded in the block and the incentive strategy of the model decision owner, the weight of the incentive function is dynamically adjusted through the optimal strategy so that the data device owner obtains the best expected reward, and returns to step 2) to start a new round of training until the model reaches a stable convergence state or the maximum number of iterative training times.
[0012] Furthermore, in step 2), at the local training layer, each data device owner performs local model training, and jointly encrypts the gradient update parameters transmitted by the model training based on the improved Paillier security aggregation method, including the following steps:
[0013] 2.1) Generate a secret key based on a given security parameter k, which includes a public parameter PP, a private key SK of each data device owner DOi And the public key PK for decrypting the joint ciphertext leader ;
[0014] 2.2) Based on the private key of each data device owner, the model gradient parameters obtained after local model training are encrypted to generate ciphertext;
[0015] 2.3) Aggregate the ciphertexts generated by multiple data device owners to generate joint ciphertext;
[0016] 2.4) The decryption party Leader uses the public key PK leader The obtained joint ciphertext is jointly decrypted, and the decrypted data is uploaded to the consensus layer.
[0017] Furthermore, in step 3), based on the gradient update parameters uploaded by the local training layer, a dynamic verification committee is used to perform cross-verification between the data device owner and the model decision owner, and malicious data device owners are punished according to the verification results. At the same time, the model decision owner status is updated, and the block record updates the transaction status information, including the following steps:
[0018] 3.1) Conduct dynamic verification committee elections and conduct cross-verification between data device owners and model decision owners based on the election results;
[0019] 3.2) According to the verification results, restrictive penalties are imposed on malicious participants, and the model decision owner status is updated, and the transaction status information is updated through block records.
[0020] Furthermore, in step 3.1), a dynamic verification committee election is performed, and cross-verification is performed between the data device owner and the model decision owner according to the election result, including the following steps:
[0021] 3.1.1) Initialize a preset number of data device owners as validator nodes and define the voting function;
[0022] 3.1.2) All validator nodes vote to verify a certain validator node and update the voting function when the preset verification conditions are met;
[0023] 3.1.3) Update the validator node through the Verifiable Delay Functions of the Casper protocol and construct a new candidate block;
[0024] 3.1.4) Divide the new candidate block into i continuous sub-intervals, use the probability of selection by the data device owner as the score representing the priority, and determine the consensus verification committee for the next round based on the score.
[0025] Furthermore, in step 4), the Markov reward process is used to instantiate and model the dynamic nodes, and different incentive functions are set to formulate an incentive strategy for the model decision owner, including:
[0026] 4.1) Use the Markov reward process to instantiate and model dynamic nodes and determine the contribution benefits of each data device owner;
[0027] 4.2) Based on the contribution income of each data device owner, formulate an incentive strategy for model decision owners.
[0028] Furthermore, in step 4.1), the Markov reward process is used to instantiate and model the dynamic nodes, and the contribution income of each data device owner is determined, including:
[0029] 4.1.1) Obtain the status set of each data device owner according to the dynamic update mode of the validator node in the system;
[0030] 4.1.2) Determine the action decision of each data device owner based on the acquired state set and the collaboration strategy π;
[0031] 4.1.3) Based on the action decisions of each data device owner and the preset incentive function settings, the contribution income of each data device owner is calculated separately.
[0032] Furthermore, in step 4.1.3), the preset incentive function includes four aspects: training calculation cost, parameter transmission cost, consensus aggregation income and strategy service income, which are expressed as:
[0033]
[0034] in, represents the activation function at iteration step t; r i p (t) and r i s (t) represent the training computation cost, parameter transmission cost, consensus aggregation income and service strategy income at iteration step t, respectively, and η l , η c , η p and η s Represent the weights of the corresponding items respectively.
[0035] In a second aspect, the present invention provides a secure federated learning dynamic incentive system, comprising:
[0036] The system initialization module is used to initialize the data device owner and the model decision owner, and the trusted authority broadcasts the training transaction to the local training layer through the blockchain;
[0037] The local encrypted training module is used by each data device owner to perform local model training in the local training layer, and jointly encrypt the gradient update parameters transmitted by the model training based on the improved Paillier security aggregation method;
[0038] The consensus aggregation verification module is used to perform cross-verification between the data device owner and the model decision owner based on the local model parameters uploaded by the local training layer, and to punish malicious data device owners based on the verification results. At the same time, the model decision owner status is updated, and the block record updates the transaction status information;
[0039] Dynamic incentive module, which is used to instantiate and model dynamic nodes using the Markov reward process, set different incentive functions, and formulate incentive strategies for model decision owners;
[0040] The reward distribution module is used to update the transaction status information recorded in the block and the incentive strategy of the model decision owner. It dynamically adjusts the weight of the incentive function through the optimal strategy so that the data device owner can obtain the best expected reward and returns to the local encrypted training module to start a new round of training until the model reaches a stable convergence state or the maximum number of iterative training times.
[0041] In a third aspect, the present invention provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any method.
[0042] In a fourth aspect, the present invention provides a computing device, comprising: one or more processors and a memory, wherein the memory stores one or more programs and is configured to be executed by the one or more processors, and the one or more programs include instructions for executing any method.
[0043] The present invention adopts the above technical solution, which has the following advantages:
[0044] (1) The present invention adopts an improved Paillier cryptographic system to avoid the risk of privacy leakage during global model aggregation. By encrypting the user's gradient update, the decryption party can only decrypt the joint ciphertext composed of the sum of the encrypted gradients of all users, and cannot obtain specific individual gradient data information, effectively avoiding reasoning attacks while reducing privacy computing overhead.
[0045] (2) In order to prevent malicious attackers from joining the consensus layer of the system, the present invention adopts a dynamic verifier update mechanism in combination with the blockchain consensus protocol to enhance the security and stability of the system. The local model parameters that have been securely transmitted through the training layer need to be verified and added to the consensus layer of the model. Dishonest nodes and hostile participants are restricted through a supervisory access mechanism, making the system more fault-tolerant and robust.
[0046] (3) The present invention addresses the key issues of heterogeneity and dynamism of the participants. By adjusting the reward weights at the decision-making level, incentive strategies are formulated under different states to provide fair rewards, thereby implementing a dynamic incentive mechanism to attract more honest nodes to participate in the dynamic collaborative training of the model, thereby improving the performance of the system model while optimizing the system resource allocation.
[0047] Therefore, the present invention can be widely applied to the field of distributed machine learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference numerals are used to represent the same components. In the accompanying drawings:
[0049] Figure 1 This is a flow chart of the dynamic incentive method for secure federated learning in the IoT edge computing scenario of the present invention;
[0050] Figure 2 This is a schematic diagram of the framework of the secure federated learning dynamic incentive method for the IoT edge computing scenario of the present invention;
[0051] Figure 3 It is a consensus diagram of the dynamic incentive method for secure federated learning in the edge computing scenario of the Internet of Things of the present invention;
[0052] Figure 4 This is an architecture diagram of the secure federated learning dynamic incentive system for the IoT edge computing scenario of the present invention. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0054] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0055] In the dynamic executable environment of IoT edge devices, facing the challenges of unstable device online status and policy changes, how to protect user privacy and ensure the security of system models, and use real-time data to motivate participants to conduct instant task training has become a difficult problem that needs to be solved urgently.
[0056] In order to solve the above problems, the present invention intends to achieve the following objectives:
[0057] (1) Build a trusted decentralized federated learning model framework SDFL (dynamic incentive for federated learning). In the actual application of the Internet of Things, the approximate alliance with encrypted aggregation built between multiple edge nodes removes the trust assumption of the federated learning central server and effectively protects the privacy of the model training process.
[0058] (2) Realize the supervision and access mechanism of the system model. Combined with the Casper consensus mechanism improved by PoS Proof of Stake, a verification committee with dynamic round updates is designed. Malicious participants are restricted and punished according to the verification results to achieve the constraint of the model participating nodes, which ensures that the system model will not deviate and protects the interests of honest participants to the greatest extent.
[0059] (3) A strategy to balance the dynamic benefits of the alliance model under credible behavior. Through the approximate alliance built by each edge node, the MDP (Markov decision process) obtains updated block rewards based on the contribution of the participants, thereby encouraging more honest participants to join the collaborative training of federated learning.
[0060] Based on the above objectives, in some embodiments of the present invention, a method for dynamic incentive of secure federated learning in an IoT edge computing scenario is provided to solve the problems of data privacy, node dynamics and differences in participant willingness faced by the actual deployment of IoT smart edge devices, and promote continuous participation and cooperation according to the changing behavior status and reward contribution of participants. Specifically, the present invention includes five core stages: system initialization stage, local encryption training stage, consensus aggregation verification stage, dynamic incentive stage and reward distribution stage. In order to solve the data security risk, a verification committee with round dynamic updates is selected for security verification in combination with the blockchain consensus mechanism, and supervision and punishment measures are integrated to limit malicious behavior. In addition, for the problem that participants may exit due to insufficient utility or failure, the Markov decision process framework is combined to optimize node participation decision-making, and a dynamic consensus collaboration strategy is adopted to attract more honest participants to join, achieving the optimal balance between learning benefits and data collaboration to ensure the fairness of the system, and being able to more effectively utilize decentralized computing resources on resource-constrained devices, reducing the need for a large amount of centralized training data, and enabling faster actual development and deployment.
[0061] Correspondingly, in other embodiments of the present invention, a secure federated learning dynamic incentive system, device and medium for an Internet of Things edge computing scenario are provided.
[0062] Example 1
[0063] like Figure 1 to Figure 4 As shown, this embodiment provides a method for dynamic incentive of secure federated learning in edge computing scenarios of the Internet of Things, involving five main entities: TA (trusted authority), BC (blockchain), DO (data device owner), CN (dynamic verification committee), and MO (model decision owner). Specifically, it includes the following steps:
[0064] 1) System initialization phase: DO and MO are initialized, and TA broadcasts the training transaction to the local training layer through BC;
[0065] 2) Local encrypted training stage: In the local training layer, each DO performs local model training and jointly encrypts the gradient update parameters transmitted by model training based on the improved Paillier security aggregation method;
[0066] 3) Consensus aggregation verification phase: Based on the local model parameters uploaded by the local training layer, CN is used to perform cross-verification between DO and MO, and malicious DO is punished based on the verification results. At the same time, the MO status is updated, and the block records update the transaction status information;
[0067] 4) Dynamic incentive stage: Use the Markov Reward Process to instantiate and model dynamic nodes, set different incentive functions, and formulate MO incentive strategies to balance the collaboration between nodes and improve the overall performance of the system model;
[0068] 5) Reward distribution phase: Based on the updated transaction status information recorded in the block and the MO incentive strategy, the weight of the incentive function is dynamically adjusted through the optimal strategy so that DO obtains the best expected reward, and returns to step 2) to start a new round of training until the model reaches a stable convergence state or the maximum number of iterative training times.
[0069] Furthermore, in the above step 2), in federated learning, DO generates a global model by sharing the model gradient parameters trained on the local data set. Although sharing gradients can prevent direct exposure of local data, it may indirectly leak local data information. To this end, the present invention designs a secure aggregation method based on an improved Paillier, which encrypts the model gradient parameters of DO so that the decryption party Leader can only decrypt the joint ciphertext composed of the sum of all DO encrypted gradients using the public key, but cannot obtain the original information of the model gradient parameters of a specific single DO.
[0070] Specifically, the steps include:
[0071] 2.1) Generate a secret key based on the given security parameter k, which includes the public parameter PP and the private key SK of each DO DOi And the public key PK for decrypting the joint ciphertext leader , which can be expressed as: KeyGenerate(k)→(PP,SK Doi ,PK leader ).
[0072] In this embodiment, the method for generating the public parameter PP is as follows: first, according to the given security parameter k, the TA executes the Gen(k) function (abbreviation of KeyGenerate(k)) to generate the parameters of the Paillier encryption system, namely μ, λ, N, g, where μ and λ are the private key parameters of the classic Paillier cryptographic algorithm, respectively; N is the modulus of the Paillier encryption system; and g is the generator of the Paillier encryption system. Note that in the Paillier encryption system, the order of g is a multiple of N, that is, ord(g) = kN, and k is a large prime number. Then, the TA selects a random large integer γ (γ must satisfy |γ| < k / 2 and gcd(k,γ) = 1 at the same time), and calculates h = g γ mod N 2 ; Finally, TA announces the public parameter PP=<k,N,g,h> .
[0073] The method of generating DO private key is as follows: First, TA randomly divides N into m parts d1, d2, …, d m ,st, Where m is the number of DOs; then, TA selects a random number And calculate the private key of each DO
[0074] Generate public key PK leader The method is: according to the output of Gen(k), TA generates the public key PK for decrypting the joint ciphertext leader = <λ,μ,γ>.
[0075] 2.2) Based on the private key of each DO, the model gradient parameters obtained after local model training are encrypted to generate ciphertext.
[0076] Among them, data encryption can be expressed as: Encrypt(x (i) ,SK DOi )→[[x (i) ]].
[0077] DO iThe model gradient parameters obtained after local model training are used as private data, denoted as x (i) ∈Z N , which can be encrypted as:
[0078]
[0079] Among them, r i is satisfied A random number.
[0080] 2.3) Aggregate the ciphertexts generated by multiple DOs to generate a joint ciphertext.
[0081] Among them, data aggregation can be expressed as: Aggregate([[x (1) ]]),…,[[x (m) ]])→[[x]].
[0082] Given m ciphertexts from m DOs, the joint ciphertext generated by Leader aggregation is:
[0083]
[0084] 2.4) The decryption party Leader uses the public key to jointly decrypt the obtained joint ciphertext and uploads the jointly decrypted data to the consensus layer.
[0085] Among them, joint decryption can be expressed as: Decrypt([[x]],PK Leader )→x.
[0086] After aggregating the keys of m DOs, the decryption leader can use the public key PK leader Decrypt the joint ciphertext to obtain the model gradient parameters after the model is updated:
[0087]
[0088] in,
[0089] Further, in the above step 3), in this embodiment, in combination with blockchain technology, a dynamically updated verification committee is introduced to the consensus layer, and participants are evaluated for access through model cross-validation, and penalties are imposed on malicious behavior to enhance the system's risk resistance. Restrictive punishment measures are imposed on malicious nodes and corresponding equity tokens (stake coins) - Schelling Coins are rewarded to active miners to motivate them to maintain the blockchain, and a security mechanism is used to allow the verifier to change dynamically over time, thereby achieving a dynamic verifier mechanism. In each round of training, some participants are first initialized and allowed to become the consensus verifier node Validator of the participants by mortgaging half of their own Schelling Coins. In order to reduce network overhead, the Caper protocol uses Merkel trees to organize state data, and stipulates that 100 blocks are compressed into a verification node Stack.
[0090] Specifically, the steps include:
[0091] 3.1) Conduct CN elections and perform cross-validation between DO and MO based on the election results;
[0092] 3.2) According to the verification results, restrictive penalties are imposed on malicious participants, and the MO status is updated at the same time. The transaction status information is updated through block records. Honest nodes will receive corresponding block rewards in the dynamic incentive layer.
[0093] Further, the above step 3.1) includes the following steps:
[0094] 3.1.1) Data initialization: Initialize a preset number of DOs as validator nodes and define the voting function.
[0095] In this embodiment, the voting function is defined as:
[0096] vote=<SK,ρ,τ,H(p),H(τ)>
[0097] Where SK represents the verifier identity ID; ρ represents the hash value of the initial check node, which is the node that starts recording the hash value; τ represents the timestamp of the target node verification, which is the expected node that is proved to be a valid hash value after verification by the blockchain smart contract timestamp τ; H(p) and H(τ) represent the heights of ρ and τ respectively.
[0098] 3.1.2) Committee consensus election: All validator nodes vote to verify a certain validator node and update the voting function when the preset verification conditions are met.
[0099] In this embodiment, the preset verification condition is that when more than half of the verifier nodes support a specific verifier node, the voting function is updated. The updated voting function is expressed as:
[0100] vote = <SK, ρ, τ, H(v), H(u)>
[0101] In the formula, H(u) ≥ H(v) + 1 is satisfied.
[0102] 3.1.3) Penalty condition: Based on the preset penalty mechanism, the verifier nodes that violate the rules are penalized.
[0103] In this embodiment, the preset voting rule is that for the same target height, two different votes cannot be initiated. When H(v1) < H(v2) < H(u1) < H(u2), the voting range of each round is independent and there cannot be an inclusion relationship. The set penalty mechanism is that for the verifier Validator nodes that violate the rules, the mortgaged Schelling coin will be confiscated.
[0104] 3.1.4) Verifier dynamic update: The verifier nodes are updated through the Verifiable Delay Functions (VDFs) of the Casper protocol, and a new candidate block is constructed.
[0105] In this embodiment, the election function is:
[0106] VerifySort(SK,seed t , τ, miner, m, M) → <H, proof, S>
[0107] SelectShuffle(PK, H, τ, proof, miner, m, M) → S
[0108] Among them, SK and PK respectively represent the private key and public key of the miner, and seed t represents the set of seeds that have been verified. Regarding each stake coin as a DO, τ represents the target expected value of the system for the number of DOs, M represents the total number of the miner's tokens within the model range, then the probability of any one DO being selected is P = m / M. For the MO with m stake coins, it submits its private key SK and the training seed seed of this round as the input of the randao generator, obtains the proof proof and the random hash value hash after checking its validity, and constructs a new candidate block.
[0109] 3.1.5) Select dynamic validators: Divide the new candidate block into i continuous sub-intervals, use the probability of DO selection as the score representing the priority, and determine the consensus verification committee for the next round based on the score.
[0110] In this embodiment, the probability state interval distribution is expressed by the formula:
[0111]
[0112] Among them, S i The score represents the priority indicator of its verification quality. At this time, a higher score indicates that the MO is selected by DO more often. Each MO state uses a limited state set S = {S1, S2, ..., S n ,S n+1 ,…S i}, then the first n+1 with the highest priority will be elected as the consensus verification committee members for the next round. Among them, the MO with the highest priority will serve as the leader of the next round of federated learning tasks.
[0113] Furthermore, in the above step 4), in order to ensure effective data collaboration at the dynamic incentive decision-making layer of the system, a flexible training strategy should be adopted in the distributed federated learning application scenario to best adapt to the goals and constraints of all parties.
[0114] Specifically, the steps include:
[0115] 4.1) Under the SDFL framework, the Markov reward process is used to instantiate and model dynamic nodes and determine the contribution benefits of each DO;
[0116] 4.2) Formulate MO incentive strategies based on the contribution income of each DO.
[0117] Further, the above step 4.1) includes the following steps:
[0118] 4.1.1) Node status: According to the dynamic update mode of the validator node in the system, the status set of each miner is obtained.
[0119] In this embodiment, the state set of each miner is represented by S = {S1, S2, ..., S n ,S n+1 ,…S i}, because the number of miners selected by users is different, this will have an important impact on the expected returns in the foreseeable future.
[0120] 4.1.2) Action decision: Based on the acquired state set and the collaboration strategy π, the action decision of each miner is determined, that is, the conditional probability of joining or exiting the model training.
[0121] For each local model in the system, a decision will be made based on the collaborative strategy π, so the conditional probability of choosing to join or exit model training is P(s i+1 |s i ,a i ,…,s0,a0)=P(s i+1 |s i ,a i ), where a i The action selection that represents the miners' contribution to the voting rights, and the probability of a blockchain node being selected is proportional to their rights.
[0122] In this embodiment, DO i The random strategy of is represented by the collaborative strategy π, which outputs the probability distribution A of a specific collaborative action ai,0(t)~πi It is expressed as:
[0123]
[0124] Among them, a i,0 (t) is the local training indicator. If participant i can complete the training of the local model within time round t, then a i,0 (t)=1, otherwise a i,0 (t) = 0; A ai,0(t)~πi represents the probability function of collaborative actions; a i,v (t) Action-value function.
[0125] 4.1.3) Contribution income: Based on the action decisions of each miner and the preset reward function mechanism, the contribution income of each participant is calculated separately.
[0126] After taking strategic decision-making actions, the benefits of each participant will be derived from the block rewards after the system model is fully updated. to gain profits.
[0127] Furthermore, in the above step 4.1.2), due to the heterogeneity and dynamics of the participants, the rewards obtained are also different, and the update strategy π * The contribution reward to obtain the best expected reward is expressed as:
[0128]
[0129] Among them, ξ∈(0,1) represents the reward discount factor that reduces the weight as the time step increases; represents the value function; π i Indicates updating of collaboration strategy; represents the collaborative strategy for completing the task; represents the activation function.
[0130] Furthermore, in the above step 4.1.3), in order to promote data collaboration and motivate all parties to actively participate in the training process of federated learning, so that all parties can formulate dynamic incentive strategies suitable for themselves, the present invention designs four aspects of incentive functions: training computing cost, parameter transmission cost, consensus aggregation income and strategy service income. The goal of each participant is to maximize its incentive function by learning adaptive cooperation strategies.
[0131] ① Training calculation cost:
[0132] When DO decides to train its model locally, i.e., when π = a i,0 (t) = 1 requires the consumption of necessary computing resources and power. At iteration step t, the local training cost of participant i is is defined as:
[0133]
[0134] in, represents the unit cost of k iterations of local model training; Represents privacy computation cost; training cost With its dataset size |D i | Proportional to computing power Inversely proportional.
[0135] ②Parameter transmission fee:
[0136] When the relevant model parameters need to be obtained before the next stage of training operation, the necessary transmission fee should be paid as the driving cost. The parameter transmission cost of the participant model in iteration step t It is expressed as:
[0137]
[0138] Among them, S is the state set size of each miner; is the unit communication cost of participant i; θ represents the participant who can obtain benefits; Ο(i) represents the set of participants participating in the training task; a i,θ (t) represents the collaborative action taken at iteration step t; Indicates data transmission capability.
[0139] ③ Consensus aggregation income:
[0140] Each model parameter transmission target is the consensus committee to aggregate the parameters and calculate the income of the aggregated model parameters based on their value. Let Pr = [pr i ] i∈V ∈R |V|is the value vector of each party’s model, and the model parameter price of the participants is defined as:
[0141]
[0142] in, represents the priority measure of participant i’s accuracy; acc i (t) represents the accuracy of the model.
[0143] At the completion of iteration step t, the consensus aggregation income of the model is is represented as:
[0144]
[0145] ④Service strategy income:
[0146] Use the best strategy actions to improve the accuracy of the model. The higher the accuracy of the model, the higher the service strategy income obtained. The service strategy income of the model at iteration step t It is expressed as:
[0147]
[0148] Based on the above four excitation functions, the model excitation function at iterative step t is expressed as follows:
[0149]
[0150] Among them, η p , η s , η c , η l Represents the weight of the corresponding item. Each participant can customize its incentive function by adjusting the weight in the above formula. The goal of each participant is to maximize its incentive function by learning an adaptive cooperation strategy.
[0151] Furthermore, in the above step 5), considering that Shapely Value (SV) is a method for distributing rewards to participants based on their respective contributions, the present invention applies it to promote fair reward distribution.
[0152]
[0153] Among them, S r ∈N represents a subset of the edge nodes of the system, and i represents the number of DOs in the set S that join the FL system training. The calculation of SV implements fair quantification of the reward distribution for honest nodes joining the data alliance model training.
[0154] Example 2
[0155] The above-mentioned embodiment 1 provides a dynamic incentive method for secure federated learning in an IoT edge computing scenario. Correspondingly, this embodiment provides a dynamic incentive system for secure federated learning in an IoT edge computing scenario. The system provided in this embodiment can implement the dynamic incentive method for secure federated learning in an IoT edge computing scenario of embodiment 1, and the system can be implemented by software, hardware, or a combination of software and hardware. For example, the system may include integrated or separate functional modules or functional units to execute the corresponding steps in each method of embodiment 1. Since the system of this embodiment is basically similar to the method embodiment, the process described in this embodiment is relatively simple, and the relevant parts can refer to the partial description of embodiment 1. The embodiment of the system provided in this embodiment is only schematic.
[0156] The secure federated learning dynamic incentive system for the IoT edge computing scenario provided in this embodiment includes:
[0157] System initialization module, used to initialize DO and MO, and TA broadcasts training transactions to the local training layer through BC;
[0158] The local encrypted training module is used for local model training in each DO at the local training layer, and jointly encrypts the gradient update parameters transmitted by the model training based on the improved Paillier security aggregation method;
[0159] The consensus aggregation verification module is used to cross-verify between DO and MO based on the local model parameters uploaded by the local training layer using CN, and punish malicious DOs based on the verification results. At the same time, the MO status is updated, and the block records update the transaction status information;
[0160] Dynamic incentive module, which is used to instantiate and model dynamic nodes using the Markov Reward Process, set different incentive functions, and formulate MO incentive strategies to balance the collaboration between nodes and improve the overall performance of the system model;
[0161] The reward distribution module is used to update the transaction status information and MO incentive strategy based on the block record, dynamically adjust the weight of the incentive function through the optimal strategy, so that DO obtains the best expected reward, and returns to the local encrypted training module to start a new round of training until the model reaches a stable convergence state or the maximum number of iterative training times.
[0162] Example 3
[0163] This embodiment provides a processing device corresponding to the secure federated learning dynamic incentive method for the IoT edge computing scenario provided in this embodiment 1. The processing device can be a processing device for a client, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of embodiment 1.
[0164] The processing device includes a processor, a memory, a communication interface and a bus, and the processor, the memory and the communication interface are connected through the bus to complete mutual communication. The memory stores a computer program that can be run on the processor, and when the processor runs the computer program, the secure federated learning dynamic incentive method for the IoT edge computing scenario provided in this embodiment 1 is executed.
[0165] Preferably, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0166] Preferably, the processor may be a central processing unit (CPU), a digital signal processor (DSP) or other general-purpose processors of various types, which are not limited here.
[0167] Example 4
[0168] The secure federated learning dynamic incentive method for the IoT edge computing scenario of this embodiment 1 can be specifically implemented as a computer program product, which may include a computer-readable storage medium carrying computer-readable program instructions for executing the secure federated learning dynamic incentive method for the IoT edge computing scenario described in this embodiment 1.
[0169] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0170] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0171] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0172] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0174] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for dynamic incentive of secure federated learning, characterized in that: The following steps are involved: 1) Initialize the data device owner and model decision owner, and the trusted authority broadcasts the training transaction to the local training layer through the blockchain; 2) In the local training layer, each data device owner conducts local model training and jointly encrypts the gradient update parameters transmitted by model training based on the improved Paillier security aggregation method; 3) Based on the gradient update parameters uploaded by the local training layer, the dynamic verification committee is used to cross-verify between the data device owner and the model decision owner, and the malicious data device owner is punished according to the verification results. At the same time, the model decision owner status is updated, and the block record updates the transaction status information; 4) Use the Markov reward process to instantiate and model dynamic nodes, set different incentive functions, and formulate incentive strategies for model decision owners; 5) Based on the updated transaction status information recorded in the block and the incentive strategy of the model decision owner, the weight of the incentive function is dynamically adjusted through the optimal strategy so that the data device owner obtains the best expected reward, and returns to step 2) to start a new round of training until the model reaches a stable convergence state or the maximum number of iterative training times.
2. A method for dynamic incentive of secure federated learning as claimed in claim 1, characterized in that: In step 2), at the local training layer, each data device owner performs local model training, and jointly encrypts the gradient update parameters transmitted by the model training based on the improved Paillier security aggregation method, including the following steps: 2.1) Generate a secret key based on a given security parameter k, which includes a public parameter PP, a private key SK of each data device owner DOi And the public key PK for decrypting the joint ciphertext leader ; 2.2) Based on the private key of each data device owner, the model gradient parameters obtained after local model training are encrypted to generate ciphertext; 2.3) Aggregate the ciphertexts generated by multiple data device owners to generate joint ciphertext; 2.4) The decryption party Leader uses the public key PK leader The obtained joint ciphertext is jointly decrypted, and the decrypted data is uploaded to the consensus layer.
3. A method for dynamic incentive of secure federated learning as claimed in claim 1, characterized in that: In the step 3), based on the gradient update parameters uploaded by the local training layer, a dynamic verification committee is used to perform cross-verification between the data device owner and the model decision owner, and malicious data device owners are punished according to the verification results. At the same time, the model decision owner status is updated, and the block record updates the transaction status information, including the following steps: 3.1) Conduct dynamic verification committee elections and conduct cross-verification between data device owners and model decision owners based on the election results; 3.2) According to the verification results, restrictive penalties are imposed on malicious participants, and the model decision owner status is updated, and the transaction status information is updated through block records.
4. A method for dynamic incentive of secure federated learning as claimed in claim 3, characterized in that: In step 3.1), a dynamic verification committee election is performed, and cross-verification is performed between the data device owner and the model decision owner based on the election results. The following steps are involved: 3.1.1) Initialize a preset number of data device owners as validator nodes and define the voting function; 3.1.2) All validator nodes vote to verify a certain validator node and update the voting function when the preset verification conditions are met; 3.1.3) Update the validator node through the Verifiable Delay Functions of the Casper protocol and construct a new candidate block; 3.1.4) Divide the new candidate block into i continuous sub-intervals, use the probability of selection by the data device owner as the score representing the priority, and determine the consensus verification committee for the next round based on the score.
5. A method for dynamic incentive of secure federated learning as claimed in claim 3, characterized in that: In step 4), the Markov reward process is used to instantiate and model the dynamic nodes, and different incentive functions are set to formulate the model decision owner incentive strategy, including: 4.1) Use the Markov reward process to instantiate and model dynamic nodes and determine the contribution benefits of each data device owner; 4.2) Based on the contribution income of each data device owner, formulate an incentive strategy for model decision owners.
6. A method for dynamic incentive of secure federated learning as claimed in claim 5, characterized in that: In step 4.1), the Markov reward process is used to instantiate and model the dynamic nodes, and determine the contribution income of each data device owner. include: 4.1.1) Obtain the status set of each data device owner according to the dynamic update mode of the validator node in the system; 4.1.2) Determine the action decision of each data device owner based on the acquired state set and the collaboration strategy π; 4.1.3) Based on the action decisions of each data device owner and the preset incentive function settings, the contribution income of each data device owner is calculated separately.
7. A method for dynamic incentive of secure federated learning as claimed in claim 6, characterized in that: In step 4.1.3), the preset incentive function includes four aspects: training calculation cost, parameter transmission cost, consensus aggregation income and strategy service income, which are expressed as: in, represents the activation function at iteration step t; r i p (t) and r i s (t) represent the training computation cost, parameter transmission cost, consensus aggregation income and service strategy income at iteration step t, respectively, and η l , η c , η p and η s Represent the weights of the corresponding items respectively.
8. A secure federated learning dynamic incentive system, characterized in that: include: The system initialization module is used to initialize the data device owner and the model decision owner, and the trusted authority broadcasts the training transaction to the local training layer through the blockchain; The local encrypted training module is used by each data device owner to perform local model training in the local training layer, and jointly encrypt the gradient update parameters transmitted by the model training based on the improved Paillier security aggregation method; The consensus aggregation verification module is used to perform cross-verification between the data device owner and the model decision owner based on the local model parameters uploaded by the local training layer, and to punish malicious data device owners based on the verification results. At the same time, the model decision owner status is updated, and the block record updates the transaction status information; Dynamic incentive module, which is used to instantiate and model dynamic nodes using the Markov reward process, set different incentive functions, and formulate incentive strategies for model decision owners; The reward distribution module is used to update the transaction status information recorded in the block and the incentive strategy of the model decision owner. It dynamically adjusts the weight of the incentive function through the optimal strategy so that the data device owner can obtain the best expected reward and returns to the local encrypted training module to start a new round of training until the model reaches a stable convergence state or the maximum number of iterative training times.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 7.
10. A computing device, characterized in that: include: One or more processors and a memory, wherein the memory stores one or more programs and is configured to be executed by the one or more processors, wherein the one or more programs include instructions for executing any one of the methods described in claims 1 to 7.
