Excitation optimization decentration federated learning method based on block chain

By introducing blockchain and reputation mechanisms into federated learning, the problems of single point failure, communication bottlenecks and malicious nodes in traditional federated learning are solved, and higher system stability and reliability are achieved.

CN119808993APending Publication Date: 2025-04-11CHINA UNIV OF PETROLEUM (EAST CHINA)

Patent Information

Application Number
CN202411855852.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Traditional federated learning has problems such as high risk of single point failure, serious communication bottlenecks and difficult to eliminate malicious nodes, resulting in insufficient system stability and reliability.

Method used

A decentralized federated learning method based on blockchain is adopted, and a reputation mechanism is introduced to perform node rewards and malicious node elimination through blockchain tracking and verifying the integrity of model updates. The temperature-regulated SoftMax function is used to allocate incentives, and the election proxy server is elected to perform model aggregation.

Benefits of technology

It reduces the risk of single point failure, improves the stability and reliability of the system, effectively eliminates malicious nodes, and improves model training performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FDA0005191780140000013
    Figure FDA0005191780140000013
  • Figure FDA0005191780140000015
    Figure FDA0005191780140000015
  • Figure FDA0005191780140000016
    Figure FDA0005191780140000016
Patent Text Reader

Abstract

The invention relates to an incentive optimization decentralized federated learning method based on a block chain, in particular to a federated learning system based on a block chain technology. The system aims to solve the problems of single-point failure, privacy disclosure and lack of trust mechanism in the existing federal learning method. The method comprises client model release, block chain-based model parameter sharing, node local reputation evaluation and a global incentive mechanism. The method is characterized in that data privacy protection and cooperative trust among nodes are realized by introducing a distributed account book of a block chain. Through the implementation of the invention, the decentration degree and safety of federal learning can be improved, and meanwhile, the accuracy and robustness of model training are improved. The method is suitable for scenes with wide data distribution and high privacy protection requirements, such as the fields of medical health, financial analysis, industrial Internet of Things and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to federated learning and blockchain technology, and in particular to a decentralized federated learning method combined with blockchain, and introduces a reputation mechanism for node rewards, belonging to the technical field of federated learning. Background Art

[0002] Federated Learning (FL) was proposed by Google, which allows multiple clients to collaboratively train models without sharing original data, thereby significantly enhancing data privacy. As an innovative paradigm in machine learning, it enables multiple participants to collaboratively train models while maintaining the confidentiality of their personal data. This approach has great potential in privacy protection and model enhancement, and has therefore attracted considerable interest in academia. FL is particularly suitable for mobile devices that generate a large amount of data every day. There are currently many different federated learning frameworks that are applied to different academic research fields. For example, patent CN202411472715.7 proposes a network image privacy protection federated learning method based on large-scale computing power for privacy protection; patent CN202411425785.7 proposes a scheduling method for split federated learning to improve system stability; patent CN202411404244.6 proposes a hierarchical federated learning algorithm for Internet of Vehicles for client selection.

[0003] However, traditional federated learning has many shortcomings: 1) The risk of single point failure is high. Once the server is attacked, the entire process will be interrupted; 2) Communication bottlenecks and expansion problems are difficult to solve. Once the number of clients increases, the communication pressure on the server will increase; 3) Malicious nodes are difficult to remove. The client maliciously provides low-quality models to provide aggregation, which will further deteriorate the global model. Therefore, developing a fully decentralized federated learning framework is crucial to improving the stability and reliability of the system. Summary of the invention

[0004] In view of the shortcomings of the existing technical methods, the purpose of the present invention is to provide a decentralized federated learning method based on blockchain incentive optimization, which solves the defects of traditional federated learning, uses a consensus mechanism that is more suitable for federated learning to replace the consensus mechanism of traditional blockchain, and adds an incentive mechanism to eliminate the influence of malicious nodes. To achieve the above purpose, the technical solution of the present invention is as follows:

[0005] A decentralized federated learning method based on blockchain incentive optimization includes the following steps:

[0006] 1) First, blockchain B is initialized to track and verify the integrity of model updates. Each device C in the network i are equipped with a local model, denoted as M i, which is based on a shared global model M G Initialize;

[0007] 2) Before each iteration, a client is selected as the proxy server for this round, which may be based on previous performance or randomly selected;

[0008] 3) Local model training: Each client C i By training its local dataset D i To update its local model M i , the local update △Mi calculation method is: Where η is the learning rate, is the gradient of the loss function with respect to the model parameters;

[0009] 4) Update submission: Each client C i Update it Submit to blockchain B with full proof For example, the client ID, etc., must be ensured to be tamper-proof;

[0010] 5) Local reputation evaluation: By recording the positive and negative interaction events and communication quality of the working nodes, the trust, distrust and uncertainty are calculated, and the reputation score of each node is comprehensively obtained. The calculation method is: Trust Distrust Uncertainty Local reputation score in, is a positive interaction event, is a negative interaction event, For communication quality.

[0011] 6) Global incentive score: The client's reputation score will be updated by comparing the difference between its model accuracy and the global average accuracy, so as to ensure that clients with higher contributions receive higher reputation scores. The reputation score calculation method based on global accuracy deviation is: in is the performance of each client model, is the global average accuracy.

[0012] Use the temperature-regulated SoftMax function to distribute incentives and control the degree of incentive distribution. The global incentive score calculation method is: Among them, Ω is the total incentive pool. The incentive distribution is controlled by changing τ. A lower temperature value τ will make the incentive more concentrated on high-reputation clients, while a higher τ will make the incentive more evenly distributed among all clients.

[0013] 7) Malicious node removal: Nodes with low reputation and low incentives for a long time are judged as malicious nodes. The judgment calculation method is: S(ΔM i )=α·ACC i +β·tanh(R i ). Among them, α and β are used to control the influence coefficients of accuracy and reputation score on the final score result, and tanh(·) is a hyperbolic tangent function to perform nonlinear compression on the reputation score so that the result is between -1 and 1 to avoid over-dominance.

[0014] 8) Model aggregation: The proxy server selects the model based on the predetermined scoring function S(ΔM i ) After removing malicious nodes, the model is aggregated for optimal update. The aggregation calculation method is:

[0015] 9) Proxy server election: The model contributor with the highest global incentive score in (6) will be the proxy server for the next round to implement the aggregation function of the next round, thereby eliminating the hidden danger of malicious nodes being elected as proxy servers and deteriorating the global model.

[0016] 10) Global model distribution and iterative training: After aggregation, the aggregated global model is distributed to each client C. i , continue steps (3) to (9) until the iteration reaches the predetermined round or the model converges.

[0017] Compared with the prior art, the present invention has the following technical features and effects:

[0018] (1) It is more suitable for the consensus mechanism of federated learning. Compared with the existing scheme combining blockchain and federated learning, the consensus mechanism of the proposed method is more convenient because it no longer uses consensus mechanisms such as POW and POS.

[0019] (2) The server is replaced by a proxy server. Compared with the existing federated learning scheme that requires centralized server aggregation, the proposed method can better avoid the hidden dangers caused by a single server failure.

[0020] (3) Improve the detection of malicious nodes. By combining the reputation-based reward mechanism with federated learning, the proposed method can quickly identify honest nodes and malicious nodes and punish malicious nodes, better aggregate the model of honest nodes, and accelerate the model aggregation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Flow chart of decentralized federated learning based on blockchain incentive optimization adopted by the present invention

[0022] Figure 2 This is the decentralized federated learning framework diagram based on blockchain incentive optimization adopted by the present invention

[0023] Figure 3 The MNIST experimental verification result diagram of the present invention is shown in FIG.

[0024] Figure 4 The CIFAR-10 experimental verification result diagram of the present invention is shown in FIG. DETAILED DESCRIPTION

[0025] In order to better understand the present invention, the present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be pointed out that the embodiments of the present invention are only examples, and other forms and variations should also belong to the protection scope of the present invention. Through the description of the following embodiments, those skilled in the art can better understand the technical solutions and applications of the present invention.

[0026] Federated learning is a distributed machine learning method that allows multiple participants (such as devices or nodes) to train models locally without storing or sharing data centrally. Each participant collaborates to optimize the global model by sharing model updates (rather than raw data) to ensure data privacy and security. Federated learning is widely used in scenarios where user data privacy needs to be protected, such as mobile devices, healthcare, and finance. Its core advantage is the ability to perform large-scale distributed training while ensuring data privacy.

[0027] Specifically, traditional centralized federated learning relies on a central server to aggregate model updates from various clients. Although this architecture can effectively coordinate the training process of the participants, it also brings some potential risks and hazards. First, the central server becomes a bottleneck with a single point of failure, which is vulnerable to attacks or failures, leading to the collapse of the entire system. Second, the centralized design makes the server face the risk of data leakage or privacy leakage when collecting and aggregating model updates, especially in the case of malicious clients or untrusted participants. In addition, the central server has a large computational and storage load, which may cause resource bottlenecks in large-scale applications, reducing the efficiency and scalability of the system.

[0028] Blockchain-based decentralized federated learning combines the security of blockchain with the privacy protection of federated learning, but there are still some defects when using consensus mechanisms such as proof of work (POW) and proof of stake (POS). The high computational and energy consumption of the POW mechanism leads to resource waste, increasing system latency and inefficiency. On the other hand, the POS mechanism concentrates power in the hands of nodes with a large number of tokens, which may affect the fairness and decentralization of the system. Therefore, these consensus mechanisms face the dual challenges of efficiency and fairness in the scenario of combining blockchain with federated learning.

[0029] In order to solve at least one of the above technical problems, the present application provides a decentralized federated learning method based on blockchain incentive optimization. Compared with the prior art, the present application proposes a consensus mechanism that is more suitable for federated learning. Instead of using a single server, a proxy server is elected in each round in the client. At the same time, an incentive mechanism based on a reputation mechanism is combined to reward and punish nodes with different behaviors, better eliminate the damage to the system by malicious nodes, and help improve the performance of model training in federated learning.

[0030] Decentralized federated learning methods based on blockchain incentive optimization, such as Figure 1 As shown, including:

[0031] 1) The client will use the global model to train the local model on the local dataset;

[0032] 2) Upload the local model trained by the client to the blockchain for storage to ensure that it cannot be tampered with;

[0033] 3) Evaluate the reputation score of the local model, and then evaluate the incentive score based on it, and use the score for proxy server election;

[0034] 4) In the first round, any client can be randomly selected as a proxy server for aggregation. After one round, each client has its own incentive score. Starting from the second round, the proxy server is selected based on the incentive score of each client.

[0035] 5) Each client downloads the global model from the blockchain for the next round of initialization and training; repeat the above operations until the model converges or reaches the specified round.

[0036] Specifically, the decentralized federated learning method based on blockchain incentive optimization, such as Figure 2 As shown, including:

[0037] Step 1: First, initialize blockchain B to track and verify the integrity of model updates. Each device C in the network i are equipped with a local model, denoted as M i , which is based on a shared global model M G Initialize;

[0038] Step 2: Before each iteration, a client is selected as the proxy server for this round, which may be based on previous performance or randomly selected;

[0039] Step 3: Local model training: Each client C i By training its local dataset D i To update its local model M i , the local update △Mi calculation method is: Where η is the learning rate, is the gradient of the loss function with respect to the model parameters;

[0040] Step 4: Update submission: Each client C i Update it Submit to blockchain B with full proof For example, the client ID, etc., must be ensured to be tamper-proof;

[0041] Step 5: Local reputation evaluation: By recording the positive and negative interaction events and communication quality of the working nodes, the trust, distrust and uncertainty are calculated, and the reputation score of each node is comprehensively obtained. The calculation method is: Trust Distrust Uncertainty Local reputation score in, is a positive interaction event, is a negative interaction event, For communication quality.

[0042] Step 6: Global Incentive Scoring: The client's reputation score is updated by comparing the difference between its model accuracy and the global average accuracy, ensuring that clients with higher contributions receive higher reputation scores. The reputation score calculation method based on global accuracy deviation is: in is the model of each client -

[0043] Performance, ACC (t) is the global average accuracy.

[0044] Use the temperature-regulated SoftMax function to distribute incentives and control the degree of incentive distribution. The global incentive score calculation method is: Among them, Ω is the total incentive pool. The incentive distribution is controlled by changing τ. A lower temperature value τ will make the incentive more concentrated on high-reputation clients, while a higher τ will make the incentive more evenly distributed among all clients.

[0045] Step 7: Malicious node removal: Nodes with low reputation and low incentives for a long time are judged as malicious nodes. The calculation method is: S(ΔM i )=α·ACC i +β·tanh(R i ). Among them, α and β are used to control the influence coefficients of accuracy and reputation score on the final score result, and tanh(·) is a hyperbolic tangent function to perform nonlinear compression on the reputation score so that the result is between -1 and 1 to avoid over-dominance.

[0046] Step 8: Model aggregation: The proxy server aggregates the model according to the predetermined scoring function S(ΔM i ) After removing malicious nodes, the model is aggregated for optimal update. The aggregation calculation method is:

[0047] Step 9: Proxy server election: The model contributor with the highest global incentive score in step 6 is selected as the proxy server for the next round to implement the aggregation function for the next round, thereby eliminating the risk of malicious nodes being elected as proxy servers to deteriorate the global model.

[0048] Step 10: Global model distribution and iterative training: After aggregation, the aggregated global model is distributed to each client C. i , continue steps 3 to 9 until the iteration reaches the predetermined round or the model converges.

[0049] Figure 3 :The MNIST dataset was used and the dataset was divided into IID and No-IID types to conduct experimental verification of the accuracy of the test set. In the experiment, the number of clients was set to 10 to participate in the federated learning process, and the dataset was label-flipped to simulate malicious nodes. Attacks were simulated by setting different proportions of malicious nodes (0%, 10%, 30%, 50%). A simple convolutional neural network with two convolutional layers and two fully connected layers was used. The results are shown in Figure 2. Figure 3 The results show that under different malicious node proportion conditions, the present invention has shown good performance advantages.

[0050] Figure 4 :The CIFAR-10 dataset was used and the dataset was divided into IID and No-IID types to conduct experimental verification of the accuracy of the test set. In the experiment, the number of clients was set to 10 to participate in the federated learning process, and the dataset was label-flipped to simulate malicious nodes. Attacks were simulated by setting different ratios of malicious nodes (0%, 10%, 30%, 50%). The number of training rounds on each client was 3, and a more complex ResNet-18 model was used. The results are shown below. Figure 4 The results show that on the CIFAR-10 dataset, the method mentioned in the present invention exhibits stronger robustness, especially under the IID condition, where it can achieve an accuracy of 61.4% even with a 50% adversarial node ratio, while the FedAvg method drops to 28.76%.

[0051] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention. For example, the specific selection of technical details, implementation methods or algorithms, etc., may be adjusted or optimized according to actual application requirements. All of these modifications or equivalent replacements should be included in the scope of the claims of the present invention.

Claims

1. A decentralized federated learning method based on blockchain incentive optimization, which improves the traditional federated learning algorithm and includes the following steps: 1) First, blockchain B is initialized to track and verify the integrity of model updates. Each device C in the network i are equipped with a local model, denoted as M i , which is based on a shared global model M G Initialize; 2) Before each iteration, a client is selected as the proxy server for this round, which may be based on previous performance or randomly selected; 3) Local model training: Each client C i By training its local dataset D i To update its local model M i , the local update ΔMi calculation method is: in, η is the learning rate, is the gradient of the loss function with respect to the model parameters; 4) Update submission: Each client C i Update it Submit to blockchain B with full proof For example, the client ID, etc., must be ensured to be tamper-proof; 5) Local reputation evaluation: By recording the positive and negative interaction events and communication quality of the working nodes, the trust, distrust and uncertainty are calculated, and the reputation score of each node is comprehensively obtained. The calculation method is: Trust Distrust Uncertainty Local reputation score in, is a positive interaction event, is a negative interaction event, For communication quality. 6) Global incentive score: The client's reputation score will be updated by comparing the difference between its model accuracy and the global average accuracy, so as to ensure that clients with higher contributions receive higher reputation scores. The reputation score calculation method based on global accuracy deviation is: in is the performance of each client model, is the global average accuracy. Use the temperature-regulated SoftMax function to distribute incentives and control the degree of incentive distribution. The global incentive score calculation method is: Among them, Ω is the total incentive pool, and the incentive distribution is controlled by changing τ. A lower temperature value τ will make the incentive more concentrated on high-reputation clients, while a higher τ will make the incentive more evenly distributed among all clients. 7) Malicious node removal: Nodes with low reputation and low incentives for a long time are judged as malicious nodes. The judgment calculation method is: S(ΔM i )=α·ACC i +β·tanh(R i ). Among them, α and β are used to control the influence coefficients of accuracy and reputation score on the final score result, and tanh(·) is a hyperbolic tangent function to perform nonlinear compression on the reputation score so that the result is between -1 and 1 to avoid over-dominance. 8) Model aggregation: The proxy server selects the model based on the predetermined scoring function S(ΔM i ) After removing malicious nodes, the model is aggregated for optimal update. The aggregation calculation method is: 9) Proxy server election: The model contributor with the highest global incentive score in (6) will be the proxy server for the next round to implement the aggregation function of the next round, thereby eliminating the hidden danger of malicious nodes being elected as proxy servers and deteriorating the global model. 10) Global model distribution and iterative training: After aggregation, the aggregated global model is distributed to each client C. i , continue steps (3) to (9) until the iteration reaches the predetermined round or the model converges.

Citation Information

Patent Citations

  • Layered federal learning client selection method for Internet of Vehicles

    CN118900423A

  • A distributed scheduling method based on split federated learning

    CN118939404B

  • Federal learning method and system based on large model computing power network image privacy protection

    CN119004517A

Cited By

  • Dynamic incentive federal learning method based on trusted execution environment and block chain

    CN120875092A