Privacy protection asynchronous federated learning method based on block chain
By introducing blockchain technology and differential privacy into federated learning, combined with asynchronous federated learning strategies, the security and efficiency problems in traditional federated learning are solved, and higher data security and learning efficiency are achieved.
Patent Information
- Application Number
- CN202411244092.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Traditional federated learning faces security and efficiency issues in network applications, including data breach risks, single point of failure risks, and delay problems caused by synchronous updates.
The blockchain-based privacy protection asynchronous federated learning method is adopted to ensure the security of model data through blockchain, use differential privacy to protect sensitive information in model updates, and use asynchronous federated learning strategy to reduce the latency of synchronous updates.
It improves the transparency and reliability of the system, reduces the risk of data leakage and single point failure, reduces the delay in the learning process, and improves the overall learning efficiency.
Smart Images

Figure CN119760786A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of blockchain and federated learning, and specifically to a privacy-preserving asynchronous federated learning method based on blockchain. Background Art
[0002] Federated learning allows multiple participants to collaborate on machine learning tasks without directly exchanging data, thus protecting data privacy to a certain extent. However, traditional federated learning still faces many challenges in network applications. The first is security. Although federated learning does not directly share raw data, model updates may contain sensitive information that may be inferred by malicious attackers, leading to data leakage and privacy issues. In addition, federated learning usually relies on central servers to aggregate models, which not only increases the risk of single point failures, but may also cause the entire model to be contaminated due to malicious behavior of the central server. The second is the efficiency issue. The synchronous update in the traditional federated learning process requires that all devices must complete the update in each round of training, which will lead to low overall learning efficiency due to uneven device performance or network latency issues.
[0003] Blockchain technology has excellent performance in data security due to its decentralized, transparent and tamper-proof characteristics. As a distributed learning architecture, federated learning can provide a foundation for the integration of blockchain technology. In order to enhance security, blockchain is becoming an important complementary technology for federated learning. By using blockchain technology, failures of a single central server can be prevented, and decentralized and secure data storage can be guaranteed. Combining blockchain technology with federated learning can not only solve the problem of centralized aggregation, but also improve the transparency and reliability of the system and reduce the risk of being attacked. Differential privacy technology protects the privacy of local model data by adding noise to model updates, which can prevent malicious attackers from inferring private information of participating devices through reasoning attacks. Asynchronous federated learning allows each device to perform local training and updates independently without waiting for other devices to complete, thereby reducing the delay problem caused by synchronous updates. Summary of the invention
[0004] In response to the security issues faced by the above-mentioned traditional federated learning methods, the present invention provides a privacy-preserving asynchronous federated learning method based on blockchain.
[0005] The present invention combines blockchain with asynchronous federated learning, uses blockchain to ensure that model data will not be tampered with, and uses differential privacy to ensure that the federated model training process is not affected by inference attacks. At the same time, an asynchronous federated learning strategy is used to allow each device to upload a local model when global aggregation needs to quickly converge the global model, without waiting for other devices to complete, reducing the delay problem caused by synchronous updates and accelerating the aggregation of the global model. The entropy weight method, an objective weighting method, is used to evaluate the credibility of miners, improve the objectivity and accuracy of the evaluation, effectively prevent malicious behavior, and ensure the stability and robustness of the system.
[0006] The overall architecture of the privacy-preserving asynchronous federated learning method based on blockchain in the present invention includes the following two parts:
[0007] (1) Application layer: It is composed of a variety of basic network devices and is located at the top level of the entire architecture. To protect data privacy, network devices participating in the federated learning task use local data sets for model training. These devices are connected to the blockchain’s miner nodes. In each round of iteration, the device obtains the latest global model from the blockchain system and uses local data for a new round of model training. After training, the device uploads the updated model to nearby miners and then starts the global arbitration process. This process ensures that all devices can obtain the latest data from neighboring miners, including updated information about the global model. After each device uploads the complete global model, a new iteration cycle begins until the accuracy and convergence of the global model reach a satisfactory level.
[0008] (2) Blockchain layer: The core of the entire architecture, responsible for consensus among miner nodes and block generation. The distributed ledger is maintained by all miners in the network, who record models in federated learning. Each miner is responsible for generating or checking transactions, executing consensus mechanisms, and creating blocks to ensure the accuracy of the model. Among them, the leader miner (who is the miner with the highest reputation) plays a key role in the consensus mechanism, guiding other miners to reach consensus and is responsible for proposing new blocks. Each block consists of a header and a body. The header contains a link to the next block, and the body contains a series of verified transaction information. In each round of iteration, miners receive local models, global models and other information from nearby devices, and store this information in the distributed ledger after cross-verifying it through the blockchain. The decentralization and tamper-proof characteristics of the blockchain ensure the security of the miner reputation and models stored therein. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A privacy-preserving asynchronous federated learning framework based on blockchain.
[0010] Figure 2 Accuracy of different federated learning algorithms. DETAILED DESCRIPTION
[0011] (1) Blockchain network initialization: Determine the initialization parameters and write them into the genesis block.
[0012] (2) Local model update: The device performs model training on its local data and iteratively updates the global model to the local model. The goal of local training is to minimize the loss function: ; The local model of the lth global epoch and the hth local iteration is expressed as: .
[0013] (a) The client device initializes the model parameters as follows: , set the number of iterations of local training to E, and the learning rate Perform stochastic gradient descent.
[0014] (b) Setting privacy parameters based on differential privacy mechanism and , and ensure that the privacy cost does not exceed the maximum value S. For each iteration e, if , then terminate.
[0015] (c) Otherwise, update the model parameters , calculate the sensitivity s and noise scale , and then returns the perturbed parameters .
[0016] (3) Local model upload:
[0017] (a) The device uploads the updated local model to its associated miner node.
[0018] (b) Miner nodes perform preliminary verification and broadcast these model updates to the blockchain network.
[0019] (4) Leader selection: Miner nodes select leader nodes based on their reputation; the leader node is responsible for further verifying the local models uploaded by the miner nodes and aggregating the global model.
[0020] (a) Use cosine similarity to judge the difference between models; the cosine similarity between miner k’s model at epoch h and the global model at epoch h - 1 is: .
[0021] (b) The cosine similarity is calculated using the parameters of the penultimate layer of the neural network; for miner k, Represents the normalized value of the jth indicator, and its ratio is: .
[0022] (c) Then calculate the entropy weight of indicator j ; The greater the entropy weight, the greater the contribution to credibility.
[0023] (d) The reputation of miner k in period h is obtained by the following formula: .
[0024] (5) Local model cross-validation:
[0025] (a) After the leader node receives the local model uploaded and broadcast by the miner node, it performs detailed cross-validation to ensure the accuracy of the model update.
[0026] (b) After verification, the leader node records it in a new block and broadcasts it to other nodes in the blockchain network.
[0027] (6) Global model aggregation:
[0028] (a) After the leader node completes the verification of all local models, it aggregates these models to update the global model parameters.
[0029] (b) In asynchronous federated learning, the aggregation process uses a weighted average method to combine all verified local models into a new global model.
[0030] (c) The polymerization process is defined as follows: , the larger the weight, the greater the impact of the new model on the global model update.
[0031] (7) Block generation and chain entry:
[0032] (a) After completing the global model aggregation, the leader node generates a new block containing the updated global model parameters and miner reputation.
[0033] (b) The leader node executes the consensus mechanism to ensure that the content of the new block is agreed upon by all participants in the network.
[0034] (c) Once consensus is reached, the new block will be added to the blockchain and broadcast to all nodes in the blockchain network for all miner nodes and devices to download and verify.
[0035] (8) Global model download:
[0036] (a) After the system status is updated, all devices download the latest global model from the blockchain network.
[0037] (b) A new round of local model training is then started until the global model converges or reaches the required accuracy.
Claims
1. A privacy-preserving asynchronous federated learning method based on blockchain, whose overall architecture includes the following two parts: (1) Application layer: It consists of a variety of basic network devices and is located at the top layer of the entire architecture; (a) Network devices participating in the federated learning task use local datasets to train models; these devices are all connected to the blockchain’s miner nodes; (b) In each iteration, the device obtains the latest global model from the blockchain system and uses local data to perform a new round of model training; (c) After training is complete, the device uploads the updated model to nearby miners and then initiates the global arbitration process; This process ensures that all devices can obtain the latest data from neighboring miners, including updates to the global model; (d) After each device uploads the complete global model, a new iteration cycle begins until the accuracy and convergence of the global model reach a satisfactory level; (2) Blockchain layer: The core of the entire architecture, responsible for consensus among miner nodes and block generation; (a) The distributed ledger is maintained by all miners in the network, who record the model in federated learning; (b) Each miner is responsible for generating or checking transactions, executing consensus mechanisms, and creating blocks to ensure the accuracy of the model. The leader miner (the miner with the highest reputation) plays a key role in the consensus mechanism, guiding other miners to reach consensus and is responsible for proposing new blocks. Each block consists of a header and a body. The header contains a link to the next block, and the body contains a series of verified transaction information. (c) In each iteration, miners receive local models, global models and other information from nearby devices, and store them in a distributed ledger after cross-verifying the information through the blockchain. The decentralized and tamper-proof nature of the blockchain ensures the credibility of the miners and the security of the models stored therein.
2. A privacy-preserving asynchronous federated learning method based on blockchain, comprising the following steps: (1) Blockchain network initialization: determine initialization parameters and write them into the genesis block; (2) Local model update: The device performs model training on its local data and iteratively updates the global model to the local model. The goal of local training is to minimize the loss function: ; The local model of the lth global epoch and the hth local iteration is expressed as: ; (a) The client device initializes the model parameters as follows: , set the number of iterations of local training to E, and the learning rate Perform stochastic gradient descent; (b) Setting privacy parameters based on differential privacy mechanism and , and ensure that the privacy cost does not exceed the maximum value S. For each iteration e, if , then terminate; (c) Otherwise, update the model parameters , calculate the sensitivity s and noise scale , and then returns the perturbed parameters ; (3) Upload local model; (a) The device uploads the updated local model to the miner node associated with it; (b) Miner nodes will perform preliminary verification and broadcast these model updates to the blockchain network; (4) Leader selection: Miner nodes select leader nodes based on their reputation; leader nodes are responsible for further verifying the local models uploaded by miner nodes and aggregating the global model; (a) Use cosine similarity to judge the difference between models; the cosine similarity between miner k’s model at epoch h and the global model at epoch h - 1 is: ; (b) The cosine similarity is calculated using the parameters of the penultimate layer of the neural network; for miner k, Represents the normalized value of the jth indicator, and its ratio is: ; (c) Then calculate the entropy weight of indicator j ; The greater the entropy weight, the greater the contribution to reputation; (d) The reputation of miner k in period h is obtained by the following formula: ; (5) local model cross-validation; (a) After receiving the local model uploaded and broadcast by the miner node, the leader node performs detailed cross-validation to ensure the accuracy of the model update; (b) After verification, the leader node records it in a new block and broadcasts it to other nodes in the blockchain network; (6) Global model aggregation; (a) After completing the verification of all local models, the leader node aggregates these models to update the global model parameters; (b) In asynchronous federated learning, the aggregation process uses a weighted average method to combine all verified local models into a new global model; (c) The polymerization process is defined as follows: , the larger the weight, the greater the impact of the new model on the global model update; (7) Block generation and chain entry; (a) After completing the global model aggregation, the leader node generates a new block containing the updated global model parameters and miner reputation; (b) The leader node executes the consensus mechanism to ensure that the content of the new block is agreed upon by all participants in the network; (c) Once consensus is reached, the new block will be added to the blockchain and broadcast to all nodes in the blockchain network for all miner nodes and devices to download and verify; (8) Global model download; (a) After the system status is updated, all devices download the latest global model from the blockchain network; (b) A new round of local model training is then started until the global model converges or reaches the required accuracy.
Citation Information
Patent Citations
Privacy protection method based on federal learning of alliance chain
CN115952532A
Dynamic differential privacy federal learning system based on block chain
CN116127519A
Robust federated learning privacy protection system based on block chain
CN117113413A
Federal learning privacy protection system and method based on block chain and privacy computing technology
CN117852068A
Federated learning method and system suitable for carbon credit assessment, electronic device, and computer readable storage medium
WO2024002389A1