A blockchain-based byzantine resilient multi-user optimization method
By constructing a blockchain-based Byzantine-based resilient multi-user optimization system, and employing smart contract-driven information exchange and coordinator collaboration, the system optimizes information exchange and collaborative work among multiple users, resolving the trade-off between robustness and convergence in federated learning, and achieving more efficient Byzantine attack defense and system stability.
Patent Information
- Application Number
- CN202411828873.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing federated learning frameworks have failed to effectively address the trade-off between system robustness and convergence in blockchain technology applications, and have not fully utilized the synergistic optimization potential of blockchain and federated learning, thus failing to effectively address complex Byzantine attacks.
We construct a blockchain-based Byzantine-based resilient multi-user optimization system, employing user update algorithms, coordinator update algorithms, topology construction algorithms, and robust aggregation rules. Through smart contract-driven information exchange and coordinator collaboration, we optimize information exchange and collaborative work among multiple users, achieving two-layer multi-region consensus and dynamic expansion.
It improves the robustness and convergence of the system, enabling it to remain stable in the face of Byzantine attacks, and has dynamic expansion and adaptive capabilities, thereby enhancing the performance and security of federated learning.
Smart Images

Figure CN119766819B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of blockchains, and particularly relates to a Byzantine resilient multi-user optimization method based on a blockchain. BACKGROUND
[0002] As a new distributed machine learning framework, federated learning (FL) is often used to solve the data privacy and security problems caused by the development of artificial intelligence. However, the traditional federated learning framework relies on a centralized server for model aggregation and updating, which has the defects of single point of failure, lack of participant behavior monitoring mechanism, low robustness, and vulnerability to attacks. The blockchain, with its characteristics of non-tamperability, high security, transparency, and decentralization, can be combined with federated learning to solve existing problems in federated learning. For example, the privacy-preserving Byzantine robust federated learning scheme (PBFL) based on the blockchain uses the blockchain to promote transparent processes and regulatory enforcement; the federated learning framework based on the blockchain uses the Intel SoftwareGuard Extension (SGX) trusted execution environment (TEE) for secure aggregation to ensure the integrity and authenticity of the local training model. However, most of these existing technologies design and implement federated learning and blockchain as two independent components, ignoring the connection between the two. Therefore, researchers have proposed a blockchain-aided decentralized federated learning (BLADE-FL) architecture that integrates the training and mining processes of federated learning, thereby preventing potential privacy leakage problems introduced by third-party blockchains. In addition, another study analyzes the impact of Byzantine node behavior on the robustness and convergence of federated learning, and optimizes the allocation of computing resources between training and mining accordingly.
[0003] Byzantine resilience optimization is a hot topic in federated learning, which is used to defend against Byzantine behavior in distributed and decentralized optimization. However, most existing algorithms focus on robust aggregation rules and do not consider the impact of network topology on system robustness and convergence.
[0004] Therefore, although the above research has achieved certain results, there are still many aspects that can be optimized in the field of federated learning based on the blockchain. For example, how to balance the robustness and convergence of the system, how to optimize the interaction and collaboration between the blockchain and federated learning, and how to better deal with complex Byzantine attacks. The present application is committed to proposing a new framework of blockchain combined with federated learning based on existing technologies to solve these problems and improve the performance of federated learning. SUMMARY
[0005] In view of the deficiencies in the prior art, the present application proposes a Byzantine resilient multi-user optimization method based on a blockchain, which comprises:
[0006] A blockchain-based Byzantine resilient multi-user optimization system is constructed, which includes users, BBMO clients, coordinators and BBMO servers;
[0007] In the blockchain-based Byzantine resilient multi-user optimization system, user update algorithm, coordinator update algorithm, topology construction algorithm and robust aggregation rule are adopted to realize information exchange and collaborative work among multiple users;
[0008] In the user update algorithm, the user realizes local estimate update by interacting with the BBMO server driven by the smart contract, and completes global variable update in collaboration with the coordinator;
[0009] In the coordinator update algorithm, the coordinator updates its regional global variable according to the local estimate uploaded by the user in its region and the regional global variable obtained from all other coordinators;
[0010] In the topology construction algorithm, the optimization parameters and virtual network topology are determined according to the user's preference for robustness, the number of users and the characteristics of the cost function, etc., to balance the convergence speed and robustness and improve the algorithm performance;
[0011] The robust aggregation rule can filter and adjust the values sent by users to aggregate more reliable global estimate values when there is interference from Byzantine users sending false information, thereby enhancing the robustness of the system to Byzantine attacks.
[0012] Preferably, the user update algorithm is as follows:
[0013] Step 1: The user sets the Lagrange operator of the optimization problem Where 0 K is a K-dimensional zero vector, and is sent to the BBMO server through the local BBMO client;
[0014] Step 2: User A n receives the initial regional global variable of the corresponding coordinator from the BBMO server through its local BBMO client
[0015] Step 3: User A n calculates the local estimate of the kth iteration according to the formula
[0016] Step 4: User A n sends to the smart contract-based BBMO server through its local BBMO client
[0017] Step 5: User A nthe local BBMO client of the user receives the regional global variable of the k+1th iteration of the corresponding coordinator from the BBMO server
[0018] Step 6: User A n According to the formula Calculate Iteration returns to step 3, and the iteration is stopped when the iteration round exceeds 4000 or the loss function converges, and the algorithm ends;
[0019] Where τ represents the user penalty parameter; h n Indicates the gradient or subgradient, Indicates the Lagrange operator of the user in the k+1th iteration.
[0020] Preferably, the coordinator update algorithm is as follows:
[0021] Step 1: Coordinator C l Set the initial regional global variable Laplacian matrix update vector And send To the local BBMO client of the corresponding user ;
[0022] Step 2: Coordinator C l Receive the user's Lagrange operator From the local BBMO client of the corresponding user Calculate the cumulative Lagrange effect by summing the Lagrange operators in the region
[0023] Step 3: Coordinator C l Receive From the local BBMO client of the corresponding user And receive the regional global variable of the kth iteration from all other coordinators On the blockchain
[0024] Step 4: Coordinator C l Calculate the regional global variable of the k+1th iteration according to
[0025] Step 5: The BBMO server sends To the local BBMO client of the corresponding user
[0026] Step 6: Coordinator C l Calculate According to
[0027] Step 7: Coordinator C l According to Calculate Iterate back to Step 4, stop iteration and end the algorithm when the iteration round exceeds 4000 or the loss function converges;
[0028] Wherein, represents the set of users associated with the coordinator C l , represents the set of adjacent coordinators of the coordinator C l , τ represents the user penalty parameter, and ρ represents the coordinator penalty parameter, represents the cumulative Lagrange effect of the region maintained by the coordinator C l , represents an auxiliary variable, represents a local variable of the region.
[0029] Preferably, the topology construction algorithm is specifically as follows:
[0030] Step 1: input the robustness preference ε provided by the user, the number of users N, the Lipschitz continuous constant M of h(v) f , and the strong convexity constant m of f(v) f ;
[0031] Step 2: calculate the integer closest to εN+(1-ε) as the number of partitions L, and divide the N users into L regions as evenly as possible;
[0032] Step 3: set Calculate the user penalty parameter and the coordinator penalty parameter
[0033] Wherein, f(v) is defined as is the objective function of the multi-user consensus optimization problem, which is composed of the local cost functions f n (v n ) of all users, and h(v) is the gradient or subgradient function of the function f(v); c represents an intermediate parameter.
[0034] Preferably, the robust aggregation rule is specifically as follows:
[0035] Step 1: the coordinator C l receives from the local BBMO client of all users
[0036] Step 2: for each dimension d, first find The minimum and maximum subsets, the subset size is b, and the average value of the remaining users after excluding the two subsets is calculated The average value of the remaining users after excluding the two subsets is calculated The average value of the remaining users after excluding the two subsets is calculated
[0037] Where χ is The average value of the remaining users after excluding the two subsets is calculated The average value of the remaining users after excluding the two subsets is calculated
[0038] Preferably, the process of realizing information exchange and cooperation among multiple users includes:
[0039] S1: User initialization and registration phase: User A n Initialize the private cost function in the local BBMO client through the user initialization and user update functions; the BBMO client analyzes the private cost function and registers the analysis information to the BBMO server driven by the smart contract through the user registration and information exchange function;
[0040] S2: BBMO server operation: the BBMO server collects the statistical data of the information registered by all local BBMO clients through the user registration and information exchange function;
[0041] S3: Topology construction: adopt a topology construction algorithm to construct a virtual topology on the blockchain;
[0042] S4: Establish an interaction channel: according to the correspondence between the coordinator and the user, the user registration and information exchange function establishes an interaction channel for different coordinators and BBMO client pairs;
[0043] S5: Parameter update: according to the correspondence between the coordinator and the user, update the corresponding regional global variable of each coordinator according to the coordinator update algorithm; the user updates the local parameter using the user update algorithm; during the update process, the values sent by the local user are filtered and adjusted using the robust aggregation rule.
[0044] The beneficial effects of the present application are:
[0045] Combination of blockchain and Byzantine resilient algorithm: the present application combines blockchain technology with Byzantine resilient algorithm, and uses the high security, non-tamperability and decentralization of blockchain to improve the fault tolerance of distributed systems. This combination enables the system to maintain good convergence and robustness when facing Byzantine attacks;
[0046] Double-layer multi-region consensus algorithm: The present application adopts a double-layer multi-region consensus algorithm, first divides the system into multiple regions, performs local optimization within each region, and ensures the correctness of the local optimization result through the consensus mechanism within the region. Then, coordinate the information between regions to achieve global optimization. By adjusting the number of regions, a compromise between convergence speed and fault tolerance can be achieved;
[0047] Smart contract execution: The present application uses smart contract execution optimization algorithm and consensus protocol to ensure the correct execution of the algorithm and the security of the system. The introduction of smart contract makes the execution process of the algorithm more transparent and credible, reducing the risk of human intervention. At the same time, smart contract can also be customized and extended according to the needs of actual application scenarios;
[0048] Dynamic expansion and adaptive adjustment: The present application supports dynamic expansion and adaptive adjustment, which can make corresponding optimization and adjustment according to the needs and changes of actual application scenarios, making the system have stronger flexibility and adaptability, further expanding the application boundary of blockchain in the field of zero-trust security. For example, when new nodes are added to the system or nodes fail, the BBMO method of the present application can automatically adjust the region division and consensus mechanism.
[0049] Good robustness: Through region division, the BBMO method of the present application achieves a compromise between convergence and robustness. At the same time, under different noise intensities, the present application can better tolerate different degrees of deviation, while the pure robust aggregation rule has poor robustness under smaller noise intensity. Finally, no matter how many Byzantine users, through region division, the present application can obtain better robustness than the robust aggregation rule. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 The present application is a schematic diagram of a Byzantine resilient multi-user optimization system based on blockchain.
[0051] Figure 2 The present application is a robustness verification result graph. DETAILED DESCRIPTION
[0052] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0053] The present application proposes a Byzantine resilient multi-user optimization method based on blockchain, which comprises:
[0054] As Figure 1A blockchain-based Byzantine resilient multi-user optimization (BBMO) system is constructed, which includes users, BBMO clients, coordinators, and BBMO servers.
[0055] The BBMO method is based on a blockchain-based smart contract, which solves the multi-user optimization problem by promoting trusted coordination among multiple users, thereby realizing decentralized, secure and transparent information exchange and collaborative work. In the present invention, the four roles of users, coordinators, BBMO clients and smart contract-driven BBMO servers work together to promote efficient operation of the system.
[0056] The model training mode in which multiple users work collaboratively and distributively in distributed training and decentralized training is called federated learning. The multi-user optimization problem of the present invention can be expressed as a general consensus optimization problem commonly seen in federated learning, that is, where f(V) is the total cost function, K is a positive integer, is the variable optimized by all users, is the user responsible for solving its distributed local cost function f n (·): is a set of users, where
[0057] The user set is represented by , and multiple users collaboratively and distributively solve the multi-user optimization problem as shown in Figure 1 The convex cost function f n (·) is private and known only to user A n In the kth iteration, user A N will update its local estimate n according to its unique knowledge of the private cost function f l (·) and the information exchanged with the smart contract-driven BBMO server by the BBMO client. They hope that their local estimates will eventually converge to a common value.
[0058] The BBMO client, as an intermediary between each user and the smart contract-driven BBMO server, is locally running on each user and is not controlled by any third party. It only contains one main function: user initialization and user update function, which is to register some necessary information to the smart contract-driven BBMO server and update the local estimate of the corresponding user.
[0059] The coordinator set is represented by , and the coordinator is a virtualized node generated on the smart contract-driven BBMO server on the blockchain. As a regional set. In region #l of , there is only one coordinator C l, which not only maintains a regional global variable for users in region #l It also serves as a hub for coordination with other regions. Due to the transparency of the blockchain, each coordinator can access the global variables uploaded by all other coordinators, making the virtual topology between them a fully connected network.
[0060] The smart contract-driven BBMO server serves as the convergence center for all users. It is not controlled by any third party and can run locally on each user. It includes four main functions: user registration and information exchange, robust aggregation rule generation, parameter optimization and topology constructor (topology construction), and coordinator update. Based on the registration information obtained from the user registration and information exchange functions, the remaining three functions generate an adaptive virtual network topology for each user and obtain the corresponding coordinator update process, thereby achieving algorithm convergence and robustness based on user preferences.
[0061] In the blockchain-based Byzantine elastic multi-user optimization system, the present invention adopts user update algorithm, coordinator update algorithm, topology construction algorithm and robust aggregation rules to realize information exchange and collaborative work among multiple users.
[0062] User update algorithm:
[0063] In this algorithm, users interact with the BBMO server driven by the smart contract to update local estimates, while collaborating with the coordinator to update global variables. The algorithm is as follows:
[0064] Step 1: The user sets the Lagrangian operator for the optimization problem Among them, 0 K is a K-dimensional all-zero vector and is sent by the local BBMO client To the BBMO server;
[0065] Step 2: User A n Receives the initial locale global variable of the corresponding coordinator from the BBMO server through its local BBMO client
[0066] Step 3: User A n According to the formula Compute the local estimate for the kth iteration
[0067] Step 4: User A n Send via its local BBMO client to the BBMO server based on the smart contract
[0068] Step 5: User A n The local BBMO client receives the corresponding coordinator from the BBMO server the region global variable of the kth iteration
[0069] Step 6: User A n According to the formula Calculate Iteration returns to step 3, and the iteration stops when the iteration round exceeds 4000 or the loss function converges, ending the algorithm;
[0070] Where τ represents the user penalty parameter, used to adjust the penalty of constraint violation in the optimization algorithm; h n Indicates the gradient or subgradient, Indicates the Lagrange operator of the user in the k+1th iteration;
[0071] Coordinator update algorithm:
[0072] In this algorithm, at the kth iteration, the coordinator C l Will update the local estimate according to the user upload of region #l And the region global variable obtained from all other coordinators Indicates the region global variable of the kth iteration. The coordinator update algorithm is as follows:
[0073] Step 1: Coordinator C l Set the initial region global variable Laplacian matrix update vector And send To the local BBMO client of the corresponding user ;
[0074] Step 2: Coordinator C l Receive the user's Lagrange operator From the local BBMO client of the corresponding user By summing the Lagrange operators within the region, the cumulative Lagrange effect is calculated
[0075] Step 3: Coordinator C l Receive From the local BBMO client of the corresponding user And receive the region global variable of the kth iteration from all other coordinators On the blockchain
[0076] Step 4: Coordinator C l According to Calculate the region global variable of the k+1th iteration
[0077] Step 5: BBMO server sends the local BBMO client of the corresponding user
[0078] Step 6: Coordinator C l According to Calculate
[0079] Step 7: Coordinator C l According to Calculate Iterate back to step 4, stop iteration when the number of iterations exceeds 4000 or the loss function converges, end the algorithm;
[0080] Where, Indicates the user set associated with the coordinator C l , determines the scope of users participating in the coordinator coordination process, and the coordinator updates the global variable and performs the optimization coordination task based on the user information in the set, Indicates the set of adjacent coordinators of the coordinator C l , used for inter-coordinator information interaction and collaborative optimization, the coordinator considers the information of adjacent coordinators when updating the global variable, to ensure the overall consistency and convergence of the system, τ represents the penalty parameter, used to adjust the constraint penalty intensity related to the user, ρ represents the penalty parameter, used to adjust the constraint penalty intensity related to the inter-coordinator interaction, Indicates the cumulative Lagrange effect of the region maintained by the coordinator C l , calculated based on the Lagrange operator in the region, used to update and reflect the comprehensive information of the user's location in the region, helping the coordinator adjust the global variable to guide the user optimization, Indicates the auxiliary variable, used for Laplace matrix update, participating in the iterative update process of the coordinator C l , and other variables work together to update the formula, to ensure that the coordinator accurately integrates information, guides user optimization, and promotes system convergence, Indicates the local variable of the region, maintained and updated by the coordinator C m .
[0081] Topology construction algorithm:
[0082] Convergence and robustness are not only affected by robust aggregation rules, but also by network topology structure. In order to adjust the network topology between users, and balance between convergence and robustness, the present invention considers creating a virtual and adaptive double-layer multi-region network topology on the blockchain through BBMO.
[0083] Each user registers and exchanges information on the BBMO server driven by smart contract and communicates with its related coordinator through its BBMO client. Specifically, the total number of users N is grouped into L regions, where 1≤L≤N, and each region is assigned a coordinator. Each region adopts a centralized scheme, and the users are arranged by the coordinator, and the coordinators of adjacent regions adopt a distributed scheme. The parameter optimization and topology construction function adjusts the number of regions, provides algorithm parameters, accelerates the convergence speed, and adapts to the virtual network topology to meet the user's preference for robustness. When L = 1, this network topology becomes a completely distributed topology, and when L = N, it evolves into a completely decentralized topology. In addition, the goal of multi-user optimization is to make the values of different users not too different under appropriate conditions. Therefore, when the Byzantine region in the distributed topology sends different values to its adjacent regions, the value difference increases, thereby damaging the robustness of the algorithm. However, the consistency provided by the blockchain allows BBMO to guarantee the global optimization of acceptable values, thereby circumventing the impact of such inconsistent numerical distribution.
[0084] The topology construction algorithm is as follows:
[0085] Step 1: Input the user-provided robustness preference ε, the number of users N, the Lipschitz continuity constant M of h(v) f , and the strong convexity constant m of f(v) f ;
[0086] Step 2: Calculate the integer closest to εN+(1-ε) as the number of partitions L, and divide the N users as evenly as possible into L regions;
[0087] Step 3: Set Calculate the user penalty parameter and the coordinator penalty parameter
[0088] where f(v) is defined as is the objective function of the multi-user consensus optimization problem, which is composed of the local cost function f n (v n ) of all users, and h(v) is the gradient or subgradient function of f(v) function. c and c t are intermediate parameters related to the number of partitions and the number of users, used to calculate the penalty parameters, reflecting the user density in the region, affecting the weight of the coordinator's regional management and information fusion, and further affecting the optimization. ε is the user-provided robustness preference parameter, with a value range of [0, 1], used to measure the user's demand for algorithm robustness. The formula L = εN+(1-ε) adjusts the robustness of the network topology, and when ε = 0, it tends to a topology with faster convergence, and when ε = 1, it focuses on a topology with strong robustness.
[0089] Robust aggregation rule:
[0090] There are five main functions in the present application: coordinator update function, topology construction function, robust aggregation rule function, user registration and information exchange function, user initialization and user update function. Among them, the coordinator update function is responsible for the update function of the coordinator, and the user update function is responsible for the update process of the user. The robust aggregation rule can eliminate the error messages sent by the user to a certain extent. Because in the multi-user consensus optimization process, there is a Byzantine attack, that is, some Byzantine users (identity and number unknown) will send arbitrary error messages in violation of the pre-defined algorithm protocol. In order to deal with this situation, a mechanism is needed to reduce the impact of error messages on the optimization result, and the robust aggregation rule is designed for this purpose.
[0091] The robust aggregation rule is as follows:
[0092] Step 1: The coordinator C l receives from all users the local BBMO client
[0093] Step 2: For each dimension d, first find the minimum and maximum subsets (size b) that make , and then calculate the average of the remaining users as the new perform k times of local loop iteration.
[0094] Specifically, the following operations are performed for d = 1, …, K:
[0095]
[0096] The following operations are performed for :
[0097]
[0098] where χ is the subset of , and represents the local estimate of the kth iteration, and b represents the size of the Byzantine user set, which is used to determine the number of extreme values excluded in the aggregation process. By removing the values affected by suspected Byzantine users, the interference of error information is reduced, ensuring that the aggregation reflects the information of honest users and maintains the effectiveness of the system under Byzantine attack.
[0099] There are five main functions in the application, including coordinator updating function, topology building function, robust aggregation rule function, user registration and information exchange function, user initialization and user updating function. Among them, the coordinator updating function is responsible for the updating function of the coordinator, and the user updating function is responsible for the updating process of the user. The robust aggregation rule can eliminate the error messages sent by the user to a certain extent. The specific process of information exchange and collaborative work among multiple users based on the blockchain-based byzantine resilient multi-user optimization system is as follows:
[0100] Step 1: User initialization and registration stage
[0101] User A n Initialize the private cost function f in the local BBMO client through the user initialization and user updating function n (·).
[0102] The BBMO client analyzes f m (·), and registers the corresponding analysis information (such as strong convexity constant, Lipschitz constant, etc.) to the BBMO server driven by the smart contract through the user registration and information exchange function.
[0103] Step 2: BBMO server operation
[0104] The BBMO server first collects the statistical data of the information registered by all local BBMO clients through the user registration and information exchange function.
[0105] Step 3: Topology building
[0106] The topology building function uses a topology building algorithm to build a virtual topology on the blockchain. Specifically, based on the statistical data collected by the user registration and information exchange function, the number of regions (i.e. the number of coordinators) needed to achieve the algorithm convergence and robustness of user preferences is calculated according to the parameter optimization and topology building function;
[0107] According to the number of regions, the corresponding relationship between users and regions is determined and the virtual topology is built on the blockchain;
[0108] Step 4: Establish interaction channel
[0109] According to the corresponding relationship between the coordinators and the users, the user registration and information exchange function establishes an interaction channel for different coordinators and BBMO client pairs.
[0110] Step 5: Parameter updating
[0111] According to the corresponding relationship between the coordinators and the users, the coordinator updating function updates the corresponding regional global variable z of each coordinator according to the coordinator updating algorithm l, users update the local parameters using the user update algorithm through the user initialization and update function. During the update process, the robust aggregation rule function will filter and adjust the values sent by the local users, and finally achieve
[0112] The coordinators C of the same region l and the users A n update the corresponding region global variables z alternately l and the local estimates v n All coordinators C update each z in parallel l All users update each v in parallel . n .
[0113] Evaluation of the present application:
[0114] Figure 2 are the experimental results of robustness verification. Figure 2 (a) shows the shortcomings of using only the robust aggregation rule, that is, smaller u b will result in a larger gap between the curves with and without Byzantine users, and worse robustness. This is because the robust aggregation rule works by eliminating outliers, so that noise sequences with larger u b are more likely to be eliminated, while noise sequences with smaller u b are less likely to produce outliers and are difficult to eliminate, resulting in worse robustness.
[0115] From Figure 2 (b)-(d), it can be seen that through region division, BBMO has stronger robustness than using only the robust aggregation rule. Increasing the number of regions can make the curves closer to the case without Byzantine users.
[0116] The above examples further illustrate the purpose, technical solutions and advantages of the present application. It should be understood that the above examples are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made to the present application within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A blockchain-based Byzantine resilient multi-user optimization method, characterized in that, The application relates to a blockchain-based Byzantine resilient multi-user optimization system, which comprises users, BBMO clients, coordinators and BBMO servers. In the blockchain-based Byzantine resilient multi-user optimization system, user update algorithms, coordinator update algorithms, topology construction algorithms and robust aggregation rules are adopted to realize information exchange and collaborative work among multiple users. In the user update algorithm, the user realizes local estimation update by interacting with the smart contract-driven BBMO server, and completes global variable update in cooperation with the coordinator. In the coordinator update algorithm, the coordinator updates its regional global variable according to the local estimation uploaded by the user in the region and the regional global variable obtained from all other coordinators. In the topology construction algorithm, the optimization parameters and virtual network topology are determined according to the user's preference for robustness, the number of users and the characteristics of the cost function, the convergence speed and robustness are balanced, and the algorithm performance is improved. When there is Byzantine user sending error information interference, the robust aggregation rule filters and adjusts the values sent by the user to aggregate reliable global estimation values, thereby enhancing the robustness of the system to Byzantine attacks. The user update algorithm is as follows: 2.The method of claim 1, wherein, The coordinator update algorithm is as follows: Step 1: User sets up Lagrangian operator for optimization problem where, is a K-dimensional all-zero vector and is sent by the local BBMO client to the BBMO server; Step 2: User Receive initial region global variables for corresponding coordinator from BBMO server through its local BBMO client ; Step 3: User According to the formula Calculate the local estimate of the (k+1)th iteration ; Step 4: User sends to the smart contract based BBMO server via its local BBMO client ; Step 5: User The local BBMO client of the user receives the region global variable of the k+1th iteration of the corresponding coordinator from the BBMO server ; Step 6: User According to the formula Calculate , iteration returns to step 3, when the iteration round exceeds 4000 or the loss function converges, stop iteration and end the algorithm; wherein, represents a user penalty parameter; represents a gradient or subgradient, represents the Lagrangian operator of the user in the th iteration. 3.The method of claim 2, wherein, The topology construction algorithm is as follows: Step 1: Coordinator Set the initial region global variables , the Laplacian matrix update vector , and Send to the corresponding user Local BBMO client; Step 2: Coordinator From the local BBMO client of the corresponding user Receives the user's Lagrangian operator Calculates the cumulative Lagrangian effect by summing the Lagrangian operators within the region ; Step 3: Coordinator from the local BBMO client of the corresponding user receives and from all other coordinators on the blockchain receives the regional global variables of the kth iteration ; Step 4: Coordinator According to Compute the region global variable for the k+1 iteration ; Step 5: The BBMO server sends to the local BBMO client of the corresponding user ; and Step 6: Coordinator According to Computing ; Step 7: Coordinator According to Computing , iteration returns to step 4, when the iteration round exceeds 4000 or the loss function converges, stop iteration and end the algorithm; wherein, denotes a set of users associated with a coordinator denotes a set of users associated with a coordinator denotes a set of neighboring coordinators of a coordinator denotes a set of neighboring coordinators of a coordinator denotes a user penalty parameter, denotes a coordinator penalty parameter, denotes a coordinator maintains a cumulative Lagrangian effect of the region, denotes an auxiliary variable, denotes a region-local variable. 4.The method of claim 1, wherein, The robust aggregation rule is as follows: Step 1: Input user-provided robustness preferences , number of users , Lipschitz continuity constant of and strong convexity constant of ; Step 2: Calculate the number of partitions that is the integer closest to the number of users divided by the number of zones Step 3: Distribute the users as evenly as possible into the zones. Step 3: Set , compute user penalty parameter and coordinator penalty parameter ; wherein is defined as , is the objective function of the multi-user consensus optimization problem, which is accumulated by the local cost functions of all users, is the gradient or subgradient function of the function; denotes an intermediate parameter. 5.The method of claim 1, wherein, The process of realizing information exchange and collaborative work among multiple users comprises the following steps: Step 1 : Coordinator from all users of local BBMO clients ; Step 2: For each dimension , find the subsets that make min and max, size of subsets is b, after excluding these two subsets, calculate the average of of the remaining users as the new , total loop times, where ; wherein, is a subset of denotes the local estimate at the kth iteration, denotes the size of the set of Byzantine users. 6.The method of claim 1, wherein, S2: BBMO server operation: the BBMO server collects statistical data of the information registered by all local BBMO clients through the user registration and information exchange function; S1: User initialization and registration phase: User Initialize the private cost function through the user initialization and user update functions in its local BBMO client; the BBMO client analyzes the private cost function and registers the analysis information to the BBMO server driven by the smart contract through the user registration and information exchange functions; S3: topology construction: the topology construction algorithm is adopted to construct the virtual topology on the blockchain; S4: establish an interaction channel: according to the corresponding relationship between the coordinators and the users, the user registration and information exchange function establishes an interaction channel for different coordinators and BBMO clients; S5: parameter update: according to the corresponding relationship between the coordinators and the users, the regional global variable of each coordinator is updated according to the coordinator update algorithm; the user updates the local parameter by using the user update algorithm; in the updating process, the robust aggregation rule is used to filter and adjust the values sent by the local user.
Citation Information
Patent Citations
Federal learning method, system and device based on hierarchical and fragmented block chain
CN113159333A
Federal learning energy efficiency optimization method based on block chain technology in Internet of Things
CN116055488A