Decentralized federated learning method based on client reputation proof mechanism in IIOT
By introducing a client reputation proof mechanism in the industrial Internet of Things environment, combining distributed review and reputation proof consensus, the security and reward and punishment mechanism problems of malicious clients in federated learning are solved, and the security and fairness of the system are achieved. Ensures the reliability and accuracy of the model.
Patent Information
- Application Number
- CN202410888973.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-11-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the industrial Internet of Things environment, traditional centralized machine learning methods face the risk of data privacy leakage, and blockchain-based decentralized aggregation algorithm has problems such as poor security and unclear reward and punishment mechanisms, which are difficult to effectively identify and punish malicious intentions and are difficult to effectively identify and punish malicious intentions. Client.
Adopt a decentralized federated learning method based on client reputation proof, identify and punish malicious clients through distributed review mechanisms and reputation proof consensus mechanisms, and dynamically adjust client roles and rewards through adaptive client reward mechanisms to ensure that System security and impartiality.
Effectively prevent malicious clients from destroying the global model, improve the security and stability of the system, ensure the reliability and accuracy of the model, and promote the fairness and healthy development of the system by dynamically adjusting the client role and reward mechanism.
Smart Images

Figure CN118890158A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of federated learning data security, and specifically relates to a decentralized federated learning method based on a client reputation certification mechanism in an IIoT environment. Background Art
[0002] With the popularity of smart devices and sensors, the Industrial Internet of Things (IIoT) generates a large amount of real-time data, which is essential for training and optimizing machine learning models. However, due to the wide distribution and sensitivity of data, traditional centralized machine learning methods face the risk of data privacy leakage. Federated learning, as a new machine learning training paradigm, aims to solve the problems of traditional machine learning in data privacy protection. The core idea is to distribute the training process of machine learning models to various IIoT devices instead of collecting all data to a central server. However, due to the potential threat of malicious clients launching poisoning attacks to destroy the global model, it is necessary to design a more secure aggregation algorithm for FL.
[0003] In FL under the background of IIoT, traditional security protection algorithms mainly focus on the aggregation stage on the server side, and use security aggregation algorithms to detect and filter out malicious models or gradients to ensure the normal convergence of the global model. Such algorithms use gradients of different dimensions. p The norm distance is used to select the most representative normal gradient for updating the global model. Specifically, the main idea of this algorithm is to assume that the malicious gradient is different from other normal gradients in l p There are significant differences under the norm distance metric, and potential malicious gradients are excluded by comparing the similarities between different gradients. This method regards the local model as a black box model and no longer explores its internal model parameters in depth, but instead focuses on the external output of the model. By observing the performance of the local model on the verification dataset, the algorithm can evaluate the reputation value of each client and accurately identify malicious clients.
[0004] In order to further improve the security and stability of FL in the IIoT environment, decentralized aggregation algorithms are widely used. FL introduces blockchain to replace servers to achieve serverless system, thereby avoiding single point failure and server-side privacy leakage. However, the current decentralized aggregation algorithm based on blockchain has the problem of weak security and vulnerability to external attacks, and malicious clients can manipulate the federated learning system. In addition, FL manages client behavior by introducing a reward and punishment mechanism, but there are still shortcomings such as unclear reward and punishment mechanism, strong subjectivity of reputation value evaluation, and lack of dynamic adjustment of reward and punishment mechanism. In order to solve these problems, this paper introduces digital signature technology to prevent external models from illegally flowing into the system, and uses a distributed review mechanism to strictly evaluate local models to ensure the reliability and accuracy of the model. In addition, in order to further ensure the stability and security of the system, this paper also assigns roles to clients through a reputation proof consensus mechanism to effectively prevent clients with low reputation values from becoming aggregation nodes. At the same time, this paper also adopts an adaptive client reward mechanism to punish malicious clients to ensure the fairness and justice of the system.
[0005] At present, the relevant research literature on security protection algorithms and decentralized aggregation algorithms is as follows:
[0006] 1. In 2017, Blanchard et al. proposed the Krum algorithm in "Machine learning with adversaries: Byzantinetolerant gradient descent". The algorithm uses the l2 norm to calculate the distance between each gradient and other gradients and sums them up. Finally, the gradient with the smallest distance is selected as the global model gradient. Multi-Krum is an advanced algorithm of Krum. It selects multiple gradients with the smallest distance and calculates the average of these gradients for global model update.
[0007] 2. In 2020, Fung et al. proposed using cosine similarity as a method to calculate the similarity between malicious gradients and normal gradients in "The limitations of federated learning in sybil settings". The algorithm collects a certain number of normal gradients as a reference, then calculates the cosine similarity between the gradients uploaded by each client and these normal gradients, and finally determines whether the gradient comes from a malicious client based on the value of the similarity. If the similarity of a gradient is much lower than that of other gradients, it will be regarded as a malicious gradient and excluded from the global model update.
[0008] 3. In 2021, Bao et al. proposed the Bift algorithm in "Bift: A blockchain-based federated learning system for connected and autonomous vehicles", which applies blockchain to the federated learning system of the Internet of Vehicles. The blockchain is responsible for storing historical model information, transaction and balance information, private information of participants, etc. The participants in Bift are autonomous vehicles. The training tasks are proposed by the participants and the initial model information is stored in the blockchain, which is then broadcast to other vehicles by the signal tower to start training. In each round of iteration, Bift will reject other subsequent delayed uploads after collecting a certain number of local models, and then use the PoFL consensus mechanism to remove malicious models and elect new aggregation nodes. Among them, PoFL is a consensus mechanism for electing aggregation nodes that combines the PoW proof-of-work mechanism, Krum, Trimmed mean, and Bulyan algorithms. The node is responsible for packaging the model information generated by this round of training into a new block and linking it to the blockchain, and the node will also receive corresponding rewards.
[0009] 4. In 2022, Qi et al. proposed the BFL algorithm in "High-quality model aggregation for blockchain-based federated learning via reputation-motivated task participation", which designed a reputation mechanism to motivate data owners to participate in learning tasks and contribute high-quality data. This mechanism uses smart contracts to enable training to be performed transparently and fairly on the blockchain. At the same time, the reputation of the data owner is updated based on the local model evaluation results of his contribution, thereby ensuring the quality of the BFL model. Summary of the invention
[0010] In view of the above-mentioned problems in the prior art, the present invention provides a decentralized federated learning method based on a client reputation proof mechanism in IIoT. It is used to deal with the problem that malicious clients upload poisoned models to destroy the performance of the global model during model training. Votes are cast for the local model based on its performance on the review client data set, and the aggregation client decides whether it enters the model aggregation pool; the client reputation value is updated and the role is reallocated based on the voting results and changes in global model performance; an adaptive client reward mechanism based on voting results and historical reputation values is proposed to reasonably allocate rewards to clients and punish malicious clients.
[0011] To achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:
[0012] A decentralized federated learning method based on a client reputation proof mechanism in IIoT includes the following steps:
[0013] Step 1: Establish and initialize the decentralized training framework
[0014] The decentralized training framework consists of several clients and blockchain. The client is an edge device distributed in the industrial Internet of Things environment that collects local data and uses local data to participate in model training. According to the client reputation ranking, the client is divided into three roles: training client, review client, and aggregation client. The responsibilities of each type of client are as follows: the training client is responsible for training and uploading the local model using its own local data set, the review client is responsible for receiving the local model uploaded by the training client and verifying its legitimacy, and using the local data set to evaluate its performance and vote on it, and the aggregation client is responsible for aggregating local models that have been verified and voted through, updating the global model and packaging new blocks. The blockchain is responsible for recording information related to the current training task and making it public to all clients; the decentralized training framework also includes algorithm parameter settings and block structure settings.
[0015] Step 2: Distributed Review Mechanism
[0016] After receiving the local model sent by the training client, the review client verifies its legitimacy and evaluates its performance. After obtaining the voting results of the review client, the aggregation client determines the local model for model aggregation and updates the global model.
[0017] Step 3: Proof of Reputation Consensus Mechanism (PoCR)
[0018] The aggregate client identifies the poisoning model and analyzes the client behavior pattern based on the voting results, thereby updating the reputation value for all clients. In the preparation stage for the next iteration, all clients reach a consensus based on their reputation scores to determine the new role allocation problem.
[0019] Step 4: Adaptive Client Reward Mechanism
[0020] An adaptive reward is assigned to the training client based on its contribution in this round of iterations and the role it plays.
[0021] In the above step 1, the algorithm parameter settings and block structure settings are as follows:
[0022] (1) Algorithm parameter setting
[0023] 40 edge nodes in the industrial Internet of Things are set as clients participating in federated learning, including 1 aggregation client, 10 review clients, and 29 training clients. Global training is 100 rounds, local training is 5 epochs, the batch size is 10, and the learning rate is 0.01. Asymmetric encryption algorithm is used to sign and verify the transmission information. The global model adopts two structures: Mnist_2NN and MLP.
[0024] (2) Block structure setting
[0025] The block is divided into two parts: the block header and the block body. The block header mainly includes five fields: the previous block hash value previous_hash, index index, timestamp timestamp, current block hash value hash, Merkle root. When a new block is packaged by the aggregation client and is ready to be linked to the blockchain, all clients will verify its legitimacy.
[0026] In the above step 2, the specific steps of the distributed review mechanism are as follows:
[0027] Taking the tth iteration as an example, first, the training client obtains the latest global model parameter w from the blockchain t , and use it as a local model; then, the model is trained using the locally collected industrial data to obtain a model update for aggregating the global model And upload it to the corresponding review client e x ; Secondly, review the client e x After receiving the model update, update the model using the local dataset Conduct legality verification and parameter evaluation voting The aggregator client then collects the votes from all review clients on the model update. To decide whether the model update can enter the aggregate model pool AP; finally, after obtaining enough legitimate model updates, the aggregate client rejects subsequent model updates and aggregates the model, and then broadcasts the new block to all clients in the industrial Internet of Things.
[0028] In step 3 above, the specific steps of the Proof of Reputation consensus mechanism PoCR are as follows:
[0029] PoCR runs in the preparation phase before each round of iteration. Taking the t+1th round of iteration as an example, although the client was assigned different roles in the previous round (tth round), all clients will return to the basic role of "client" before the start of the t+1th round of iteration. In the preparation phase, the client obtains the reputation record from the block body of the new block mined by the aggregation server in the tth round. The reputation record lists the reputation scores of all clients in detail, so that each client can clearly understand its reputation ranking in the client cluster. Subsequently, according to the reputation ranking, the top c% of clients are designated as review clients, and the remaining 1-c% of clients are arranged as training clients. Finally, the client with the highest reputation score is further selected from the review clients, and this client will serve as the aggregation client.
[0030] In step 4 above, the specific steps of the adaptive client reward mechanism are as follows:
[0031] When executing the adaptive client reward algorithm, the blockchain will take different approaches based on its role, voting results, and historical reputation score. There are three main cases:
[0032] (1) The following is the reward function for training the client: Where ψ is the basic reward unit hyperparameter, representing the budget of the federated learning task, The historical reputation score of the client. Calculate the voting results received by the training client The average difference between all voting results is used to determine the contribution of the client in this round of iterations and the high-quality model parameters. The difference from the mean value must be greater than zero, and the low-quality model parameters will be less than zero accordingly. In addition, The proportion of the client's historical reputation value among all clients is used as the weight of the reward it receives, so as to balance the impact of historical behavior on the client. Once the client behaves maliciously, it will affect the rewards it receives in subsequent iterations.
[0033]
[0034] (2) The reward function of the review client is shown below: This function also uses the difference between the voting results of the review client and the average value to reflect the behavior pattern of the review client and characterize the fairness of its behavior. If the review client gives a fair evaluation, the difference will be greater than zero; when the review client deliberately gives multiple low-scoring evaluations, the difference will be less than zero. In terms of historical behavior norms, The size of the reward is also determined by the proportion of historical credit value.
[0035]
[0036] (3) The reward function of the aggregate client is shown below: in is the aggregate client reward unit hyperparameter, Much larger than ψ, so the reward obtained by the aggregation client is generally greater than that of other clients, which encourages the client to improve its reputation and compete for the role of aggregation client. The rewards are calculated by comprehensively considering the changes in the accuracy of the global model in this round and the historical reputation of the client, so as to regulate the behavior of the aggregated client and ensure the normal execution of the model aggregation.
[0037]
[0038] Due to the lack of unified supervision by a central server in the IIoT environment, some dishonest device nodes may try to obtain more rewards by exaggerating their own contributions, which will undoubtedly undermine the fairness and stability of the entire system. To address this challenge, this method proposes an adaptive device node reward mechanism. This mechanism dynamically adjusts the rewards obtained by device nodes by deeply analyzing the voting results of device nodes and combining the historical reputation values accumulated by their historical behaviors. This reward mechanism can not only encourage benign device nodes to participate more actively in system activities, but also promote the healthy development of the IIoT system and ensure the security and reliability of the entire network.
[0039] The beneficial effects of the present invention are as follows:
[0040] The present invention first removes the server role, and assigns the client to three roles: training client, review client, and aggregation client according to the reputation value, and dynamically adjusts the client role as the reputation value changes. In addition, a consensus mechanism based on client reputation proof is proposed, which makes the election of block miners no longer depend only on the amount of computing power, but on the historical behavior of the client. Finally, an adaptive client reward algorithm based on the client's contribution and the role it belongs is proposed to identify and punish malicious clients, and encourage honest clients to participate more actively in the training process. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a structural diagram of the system model of the present invention;
[0042] Figure 2 It is a block structure diagram;
[0043] Figure 3 This is a schematic diagram of the consensus mechanism; DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the technical solution in the present application, the present invention will be further described below in conjunction with the accompanying drawings.
[0045] A decentralized federated learning method based on a client reputation proof mechanism in IIoT, the steps of which include:
[0046] Step 1: Establish and initialize the dual-server training framework
[0047] like Figure 1 As shown, the system model consists of the following parts: client cluster, blockchain. Clients are assigned different roles based on their reputation values, and the functions performed by each type of client are as follows:
[0048] (1) Training clients: The largest role in the client cluster, they use their own local datasets to assist in the training of the global model and hope to benefit from the final global model obtained through training. However, they are also curious about the privacy of other clients’ local data. i} represents, |T| represents the total number of set T.
[0049] (2) Review client: responsible for receiving the local model uploaded by the training client and verifying its legitimacy, and using the local dataset to evaluate its performance and vote on it. j} represents, |E| represents the total number of set E.
[0050] (3) Aggregation client: responsible for aggregating local models that have been verified and voted through, updating the global model and packaging new blocks. The aggregation client is unique and is represented by A = {a}.
[0051] All participating clients are represented by the set Client = {client1, client2, ..., client n} indicates that based on the above client role assignment, the following corresponding relationships exist:
[0052] |Client|=|T|+|E|+|A|
[0053] All clients need to use a key to digitally sign before sending training-related information. Therefore, before the training starts, a third-party key agency will distribute the public and private key pairs (pk, sk) of all clients to help clients conduct legal verification and improve information reliability.
[0054] The algorithm parameter settings and block structure settings are as follows:
[0055] (1) Algorithm parameter setting
[0056] 40 edge nodes in the industrial Internet of Things are set as clients participating in federated learning, including 1 aggregation client, 10 review clients, and 29 training clients. Global training is 100 rounds, local training is 5 epochs, the batch size is 10, and the learning rate is 0.01. Asymmetric encryption algorithm is used to sign and verify the transmission information. The global model adopts two structures: Mnist_2NN and MLP.
[0057] (2) Block structure setting
[0058] like Figure 2 As shown in the figure, the block is divided into two parts: block header and block body. The block header mainly includes five fields: previous block hash value previous_hash, index index, timestamp timestamp, current block hash value hash, Merkleroot. When a new block is packaged by the aggregation client and is ready to be linked to the blockchain, all clients will verify its legitimacy to ensure the stability and credibility of the entire blockchain in industrial IoT applications.
[0059] Step 2: Distributed Review Mechanism
[0060] Taking the tth iteration as an example, first, the training client obtains the latest global model parameter w from the blockchain t , and use it as a local model; then, the model is trained using the locally collected industrial data to obtain a model update for aggregating the global model And upload it to the corresponding review client e x ; Secondly, review the client e x After receiving the model update, update the model using the local dataset Conduct legality verification and parameter evaluation voting The aggregator client then collects the votes from all review clients on the model update. To decide whether the model update can enter the aggregate model pool AP; finally, after obtaining enough legitimate model updates, the aggregate client rejects subsequent model updates and aggregates the model, and then broadcasts the new block to all clients in the industrial Internet of Things.
[0061] The main responsibilities of the review client are digital signature verification and model parameter evaluation. Using pk x Verify that the message comes from a legitimate training client, and then broadcast it to other review clients, so that Able to obtain full evaluation from all review clients and obtain corresponding voting results Finally, the review client uses the local private key sk yVoting results Sign and upload to the aggregation client
[0062]
[0063] The aggregation client is responsible for collecting and aggregating local models. First, the aggregation client receives the review client's response Voting results Using pk y Verify the legitimacy of the message; then, collect all relevant The voting results are summed Repeat the above steps until all The sum of the votes; secondly, select The first k with the highest value And from the blockchain BC t Obtain the reputation scores of the corresponding training clients for weighted aggregation; finally, the aggregation client packages the new global model into a block and broadcasts it to all clients.
[0064] Step 3: Proof of Reputation Consensus Mechanism PoCR
[0065] like Figure 3 As shown in the figure, PoCR runs in the preparation phase before each round of iteration. Taking the t+1th round of iteration as an example, although the client was assigned different roles in the previous round (tth round), all clients will return to the basic role of "client" before the start of the t+1th round of iteration. In the preparation phase, the client obtains the reputation record from the block body of the new block mined by the aggregation server in the tth round. The reputation record lists the reputation scores of all clients in detail, so that each client can clearly understand its reputation ranking in the client cluster. Subsequently, according to the reputation ranking, the top c% of clients are designated as review clients, and the remaining 1-c% of clients are arranged as training clients. Finally, the client with the highest reputation score is further selected from the review clients, and this client will serve as the aggregation client.
[0066] In PoCR, the election of clients is based on their reputation scores. Clients with higher scores will play a more critical role in the next round of iterations and have the opportunity to obtain richer reputation updates. And because the rewards obtained by the client participating in FL are also closely related to its reputation, the training client needs to be committed to training a better local model to improve its own reputation ranking and obtain more rewards. The review client should evaluate the local model submitted by the training client as objectively as possible and give fair voting results. To achieve this goal, appropriate data needs to be selected to represent the client's behavioral tendencies. There are |T| training clients and |E| review clients in this paper. In the distributed review stage, each review client will evaluate the local model of the training client and upload the voting results. All voting results constitute a review matrix of |T|*|E| dimensions:
[0067]
[0068] As shown above, the sum of the elements in each row of the matrix is represents the comprehensive evaluation of the quality of the model uploaded by a training client by all review clients. This value fully reflects the ability and level of the training client in model training and is an important basis for determining its reputation update. At the same time, the sum of the elements in each column of the matrix, that is, It reflects the total votes of a review client for all training clients. This value reveals the behavior pattern of the review client during the review process, including its review criteria, tendency, and potential bias. By analyzing this value, the review client can be objectively evaluated to ensure the fairness and effectiveness of the review process.
[0069] After selecting appropriate client behavior data, in order to standardize the behavior of different client roles, it is necessary to design a corresponding reputation value update function. Taking the tth iteration as an example, the client reputation value is expressed as and The update functions of are divided into the following three categories according to the role played by the client in the tth round of iteration:
[0070] (1) The following is the reputation update function of the training client, where α and β are hyperparameters used to solve the problem of The overflow range problem caused by too high a value. For the training client, the above mentioned It not only reflects the client's ability in model training, but also reveals to a certain extent whether the client is malicious. When the training client launches a poisoning attack, its relative voting result When the training client trains a high-quality model, its voting results will be significantly higher than the average level.
[0071]
[0072] (2) The reputation update function of the review client is shown below. For the potential properties of the review client, its voting result It can reflect its behavior pattern. When the review client tends to support the training direction of the FL task, It will be significantly higher than other review clients; and when the review client deviates from the training direction of the FL task or even deliberately gives low scores to disrupt the system, its voting results will also be lower than the average level, thus reflecting its malicious behavior.
[0073]
[0074] (3) The following is the reputation update function of the aggregation client. Because the responsibility of the aggregation client is mainly to aggregate models, its quality can be evaluated by observing the performance changes of the global model before and after aggregation. The performance of the global model can be evaluated by the global model accuracy contained in the model information in the block body. When the accuracy rate is on the rise, it indicates that the aggregation client strictly fulfills its responsibilities and effectively promotes the improvement of model performance; on the contrary, when the accuracy rate drops significantly, it may mean that the aggregation client makes mistakes in the aggregation process or even has malicious behavior, and its reputation value will be reduced accordingly.
[0075]
[0076] The client can obtain the reputation value of any client with the help of the public blockchain. Once a client with a low reputation value is found, other clients will immediately regard it as a malicious client. Since the client role assignment is strictly ranked according to the reputation value, malicious clients that exhibit attacking behavior are often quickly downgraded to the role of training clients, and their reputation values will be much lower than other benign training clients. When a malicious client attempts to continue to participate in training and upload a local model, the review client cluster will quickly reach a consensus and refuse to accept the local model uploaded by it. Through this mechanism, the algorithm in this paper can effectively exclude malicious clients from the federated learning system, thereby ensuring the security of the entire system.
[0077] Step 4: Adaptive Client Reward Mechanism
[0078] When executing the adaptive client reward algorithm, the blockchain will take different approaches based on its role, voting results, and historical reputation score. There are three main cases:
[0079] (1) The following is the reward function for training the client: Where ψ is the basic reward unit hyperparameter, representing the budget of the federated learning task, The historical reputation score of the client. Calculate the voting results received by the training client The average difference between all voting results is used to determine the contribution of the client in this round of iterations and the high-quality model parameters. The difference from the mean value must be greater than zero, and the low-quality model parameters will be less than zero accordingly. In addition, The proportion of the client's historical reputation value among all clients is used as the weight of the reward it receives, so as to balance the impact of historical behavior on the client. Once the client behaves maliciously, it will affect the rewards it receives in subsequent iterations.
[0080]
[0081] (2) The reward function of the review client is shown below: This function also uses the difference between the voting results of the review client and the average value to reflect the behavior pattern of the review client and characterize the fairness of its behavior. If the review client gives a fair evaluation, the difference will be greater than zero; when the review client deliberately gives multiple low-scoring evaluations, the difference will be less than zero. In terms of historical behavior norms, The size of the reward is also determined by the proportion of historical credit value.
[0082]
[0083] (3) The reward function of the aggregate client is shown below: in is the aggregate client reward unit hyperparameter, Much larger than ψ, so the reward obtained by the aggregation client is generally greater than that of other clients, which encourages the client to improve its reputation and compete for the role of aggregation client. The rewards are calculated by comprehensively considering the changes in the accuracy of the global model in this round and the historical reputation of the client, so as to regulate the behavior of the aggregated client and ensure the normal execution of the model aggregation.
[0084]
[0085] Due to the lack of unified supervision by a central server in the IIoT environment, some dishonest device nodes may try to obtain more rewards by exaggerating their own contributions, which will undoubtedly undermine the fairness and stability of the entire system. To address this challenge, this method proposes an adaptive device node reward mechanism. This mechanism dynamically adjusts the rewards obtained by device nodes by deeply analyzing the voting results of device nodes and combining the historical reputation values accumulated by their historical behaviors. This reward mechanism can not only encourage benign device nodes to participate more actively in system activities, but also promote the healthy development of the IIoT system and ensure the security and reliability of the entire network.
Claims
1. A decentralized federated learning method based on client reputation proof mechanism in IIoT, characterized in that: The following steps are involved: (1) Establish a decentralized training framework The decentralized training framework consists of several clients and blockchains; the clients are edge devices distributed in the industrial Internet of Things environment that collect local data and use local data to participate in model training. According to the client reputation ranking, the clients are divided into three roles: training clients, review clients, and aggregation clients; The training client is responsible for training the local model using its own local data set and uploading it; the review client is responsible for receiving the local model uploaded by the training client and verifying its legitimacy, as well as using the local data set to evaluate its performance and vote on it; The aggregation client is responsible for aggregating local models that have been verified and voted through, updating the global model and packaging new blocks; the blockchain is responsible for recording information related to the current training task and making it public to all clients; the decentralized training framework also includes block structure settings and algorithm parameter settings; (2) Distributed Review Mechanism After receiving the local model sent by the training client, the review client verifies its legitimacy and evaluates its performance. After obtaining the voting results of the review client, the aggregation client determines the local model for model aggregation and updates the global model. (3) Proof of Credibility Consensus Mechanism Aggregate clients identify poisoning models and analyze client behavior patterns based on voting results, thereby updating reputation values for all clients. In the preparation phase for the next iteration, all clients reach a consensus based on their reputation scores to determine new role allocation issues. (4) Adaptive Client Reward Mechanism According to the contribution of the training client in this round of iteration and the role it plays, adaptive rewards are allocated to it, providing an adaptive method for rewarding and punishing clients in the Industrial Internet of Things.
2. The decentralized federated learning method based on client reputation proof mechanism in IIoT according to claim 1, characterized in that: In step (1), the specific method for setting the algorithm parameters is as follows: 40 edge nodes in the industrial Internet of Things are set as clients participating in federated learning, including 1 aggregation client, 10 review clients, and 29 training clients. Global training is 100 rounds, local training is 5 epochs, the batch size is 10, and the learning rate is 0.
01. Asymmetric encryption algorithm is used to sign and verify the transmission information. The global model adopts two structures: Mnist_2NN and MLP.
3. The decentralized federated learning method based on client reputation certification mechanism in IIoT according to claim 1, characterized in that: In step (1), the block structure is set as follows: The block is divided into two parts: the block header and the block body; the block header includes five fields: the hash value of the previous block previous_hash, the index index, the timestamp timestamp, the hash value of the current block hash, and the Merkle root; when the new block is packaged by the aggregation client and is ready to be linked to the blockchain, all clients will verify its legitimacy to ensure the stability and credibility of the entire blockchain in industrial IoT applications.
4. The decentralized federated learning method based on client reputation proof mechanism in IIoT according to claim 1, characterized in that: In step (2), the specific method of the distributed review mechanism is as follows: First, the training client obtains the latest global model parameter w from the blockchain t , and use it as a local model; then, the model is trained using the locally collected industrial data to obtain a model update for aggregating the global model And upload it to the corresponding review client e x ; Secondly, review the client e x After receiving the model update, update the model using the local dataset Conduct legality verification and parameter evaluation voting The aggregator client then collects the votes from all review clients on the model update. To decide whether the model update can enter the aggregate model pool AP; finally, after obtaining enough legitimate model updates, the aggregate client rejects subsequent model updates and aggregates the model, and then broadcasts the new block to all clients in the industrial Internet of Things.
5. The decentralized federated learning method based on client reputation proof mechanism in IIoT according to claim 4 is characterized in that: In step (3), the credibility proof consensus mechanism is as follows: PoCR runs in the preparation phase before each round of iteration. In the tth round of iteration, clients are assigned different roles, but before the start of the t+1th round of iteration, all clients will return to the basic role of "client". In the preparation phase, the client obtains the reputation record from the block body of the new block mined by the aggregation server in the tth round. The reputation record lists the reputation scores of all clients in detail, so that each client can clearly know its reputation ranking in the client cluster. Subsequently, according to the reputation ranking, the top c% of clients are designated as review clients, and the remaining 1-c clients are arranged as training clients. Finally, the client with the highest reputation score is further selected from the review clients, and this client will serve as the aggregation client.
6. The decentralized federated learning method based on client reputation certification mechanism in IIoT according to claim 5, characterized in that: In step (4), the specific steps of the adaptive client reward mechanism are as follows: When executing the adaptive client reward algorithm, the blockchain will take different approaches based on its role, voting results, and historical reputation score, which can be divided into the following three cases: 6-1) As shown in formula (1), the reward function of the training client is Where ψ is the basic reward unit hyperparameter, representing the budget of the federated learning task, is the client's historical reputation score, Calculate the voting results received by the training client The average difference between all voting results is used to determine the contribution of the client in this round of iterations and the high-quality model parameters. The difference from the mean value must be greater than zero, and the low-quality model parameters will be less than zero accordingly; in addition, The proportion of the client's historical reputation value among all clients is used as the weight of the reward it receives, so as to balance the impact of historical behavior on the client. Once the client behaves maliciously, it will affect the rewards it receives in subsequent iterations. 6-2) As shown in formula (2), the reward function of the review client is This function also uses the difference between the voting results of the review client and the average value to reflect the behavior pattern of the review client and characterize the fairness of its behavior; if the review client gives a fair evaluation, the difference will be greater than zero; and when the review client deliberately gives multiple low-scoring evaluations, the difference will be less than zero; in terms of historical behavior norms, The size of the reward is also determined by the historical reputation ratio; 6-3) As shown in formula (3), the reward function of the aggregate client is in is the aggregate client reward unit hyperparameter, Greater than ψ, so the reward obtained by the aggregation client will be greater than that of other clients, thus motivating the client to improve its reputation and compete for the role of aggregation client; The rewards are calculated by comprehensively considering the changes in the accuracy of the global model in this round and the historical reputation of the client, so as to regulate the behavior of the aggregated client and ensure the normal execution of the model aggregation;
Citation Information
Patent Citations
Robustness federated learning model aggregation method based on truth value discovery
CN114186237A
Asynchronous federal learning method and system based on block chain
CN114491623A
Crowd sensing excitation method based on block chain and federal learning
CN115292413A
Client category aggregation-based joint risk assessment method and related device
WO2022110721A1
