Byzantine elastic multi-user optimization method based on block chain

By introducing Byzantine elastic multi-user optimization method in blockchain technology and federated learning, the problem of difficult trade-offs of the existing technology's robustness and convergence in the face of Byzantine attacks is solved, and higher system fault tolerance and performance are achieved, suitable for complex Byzantine attack scenarios.

CN119766819AActive Publication Date: 2025-04-04BEIJING UNIV OF POSTS & TELECOMM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411828873.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-04
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

Existing blockchain-based federated learning technologies are difficult to trade off between robustness and convergence in the face of Byzantine attacks, and the interaction and collaborative work of blockchain and federated learning is not fully utilized, resulting in poor performance in complex Byzantine attacks.

Method used

A Byzantine elastic multi-user optimization method based on blockchain is proposed. By building a system including users, BBMO clients, coordinators and BBMO servers, user update algorithms, coordinator update algorithms, topology construction algorithms and robust aggregation rules, information exchange and collaborative work between multiple users is realized, and the system is enhanced to enhance the robustness of the system to Byzantine attacks.

Benefits of technology

By combining blockchain technology and Byzantine elastic algorithms, the fault tolerance and convergence of distributed systems can be improved, and good robustness and performance can be maintained in the face of Byzantine attacks, and dynamic expansion and adaptive adjustment of the system can be achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766819A_ABST
    Figure CN119766819A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of block chains, and particularly relates to a Byzantine elastic multi-user optimization method based on a block chain. The method comprises the following steps: constructing a Byzantine elastic multi-user optimization system based on a block chain, wherein the system comprises a user, a BBMO client, a coordinator and a BBMO server; in the Byzantine elastic multi-user optimization system based on the block chain, information exchange and cooperative work among multiple users are realized by adopting a user updating algorithm, a coordinator updating algorithm, a topology construction algorithm and a robust aggregation rule; according to the method, good convergence and robustness can be kept in the face of the Byzantine attack, and compromise between the convergence speed and fault tolerance can be achieved; the method has higher flexibility and adaptability, and the application boundary of the block chain in the zero-trust security field is further expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of blockchain, and in particular relates to a Byzantine elastic multi-user optimization method based on blockchain. Background Art

[0002] Federated learning (FL), as an emerging distributed machine learning framework, is often used to solve data privacy and security issues caused by the development of artificial intelligence. However, traditional federated learning frameworks rely on centralized servers for model aggregation and updating, and have defects such as single point failure, lack of participant behavior supervision mechanism, low robustness and vulnerability to attacks. Blockchain, with its characteristics of immutability, high security, transparency and decentralization, can be combined with federated learning to solve the existing problems of federated learning. For example, the blockchain-based privacy-preserving Byzantine robust federated learning scheme (PBFL) uses blockchain to promote transparent processes and regulatory execution; the blockchain-based federated learning framework uses Intel SoftwareGuard Extension (SGX) trusted execution environment (TEE) for secure aggregation to ensure the integrity and authenticity of local training models. However, most of these existing technologies design and implement federated learning and blockchain as two independent components, ignoring the connection between the two. Therefore, the researchers proposed a blockchain-assisted decentralized federated learning (BLADE-FL) architecture, which integrates the training and mining processes of federated learning, thereby preventing potential privacy leakage problems introduced by third-party blockchains. In addition, other studies analyzed the impact of Byzantine node behavior on the robustness and convergence of federated learning, and optimized the allocation of computing resources between training and mining accordingly.

[0003] As a hot topic in federated learning, Byzantine resilience optimization 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 studies have achieved certain results, there are still many aspects that can be optimized in the field of blockchain-based federated learning. For example, how to balance the robustness and convergence of the system, how to optimize the interaction and collaboration between blockchain and federated learning, and how to better deal with complex Byzantine attacks. This invention is committed to proposing a new blockchain combined with federated learning framework based on the existing technology to solve these problems and improve the performance of federated learning. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention proposes a Byzantine elastic multi-user optimization method based on blockchain, which includes:

[0006] Build a blockchain-based Byzantine-resilient multi-user optimization system, which includes users, BBMO clients, coordinators, and BBMO servers;

[0007] In the blockchain-based Byzantine elastic multi-user optimization system, user update algorithm, coordinator update algorithm, topology construction algorithm and robust aggregation rules are used to realize information exchange and collaborative work among multiple users;

[0008] In the user update algorithm, users interact with the BBMO server driven by the smart contract to update local estimates, and collaborate with the coordinator to update global variables;

[0009] In the coordinator update algorithm, the coordinator updates its own regional global variables based on the local estimates uploaded by users in its region and the regional global variables obtained from all other coordinators;

[0010] In the topology construction algorithm, the optimization parameters and virtual network topology are determined based on the user's preference for robustness, the number of users, and the characteristics of the cost function, so as to balance the convergence speed and robustness and improve the algorithm performance.

[0011] The robust aggregation rule can aggregate more reliable global estimates by filtering and adjusting the values ​​sent by users when there is interference from Byzantine users sending erroneous information, thereby enhancing the system's robustness against Byzantine attacks.

[0012] Preferably, the user update algorithm is as follows:

[0013] 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;

[0014] Step 2: User A n Receives the initial locale global variable of the corresponding coordinator from the BBMO server through its local BBMO client

[0015] Step 3: User A n According to the formula Compute the local estimate for the kth iteration

[0016] Step 4: User A n Sending to the BBMO server based on smart contract through its local BBMO client

[0017] Step 5: User A nThe local BBMO client receives the k+1th iteration of the regional global variable of the corresponding coordinator from the BBMO server

[0018] Step 6: User A n According to the formula calculate Iterate back to step 3. When the number of iterations exceeds 4000 or the loss function converges, stop iterating and end the algorithm.

[0019] Among them, τ represents the user penalty parameter; h n represents the gradient or subgradient, represents the Lagrangian 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 region global variables Laplacian matrix update vector and will Send to corresponding users The local BBMO client;

[0022] Step 2: Coordinator C l From the corresponding user The local BBMO client receives the user's Lagrangian operator The cumulative Lagrangian effect is calculated by summing the Lagrangian operators in the region

[0023] Step 3: Coordinator C l From the corresponding user The local BBMO client receives And from all other coordinators on the blockchain Receives the local global variable for the kth iteration

[0024] Step 4: Coordinator C l according to Calculate the local global variable for the k+1th iteration

[0025] Step 5: BBMO server sends a The local BBMO client sends

[0026] Step 6: Coordinator C l according to calculate

[0027] Step 7: Coordinator C l according to calculate Iterate back to step 4. When the number of iterations exceeds 4000 or the loss function converges, stop iterating and end the algorithm.

[0028] in, Representation and Coordinator C l The associated user collection, Represents the coordinator C l The set of neighboring coordinators, τ represents the user penalty parameter, ρ represents the coordinator penalty parameter, Represents the coordinator C l The cumulative Lagrangian effect of the maintenance area, represents auxiliary variables, Represents a local variable.

[0029] Preferably, the topology construction algorithm is as follows:

[0030] Step 1: Input the robust preference ε provided by the user, the number of users N, and 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 areas as evenly as possible;

[0032] Step 3: Set Calculate user penalty parameters and coordinator penalty parameters

[0033] Where f(v) is defined as is the objective function of the multi-user consensus optimization problem, which is determined by the local cost function f of all users. n (v n ) are accumulated, h(v) is the gradient or subgradient function of the f(v) function; c represents the intermediate parameter.

[0034] Preferably, the robust aggregation rules are as follows:

[0035] Step 1: Coordinator C l From all users The local BBMO client receives

[0036] Step 2: For each dimension d, first find The smallest and largest subsets, with a subset size of b, are excluded. Calculate the remaining users The average value is taken as the new The calculation is performed in a total of K cycles, where d = 1,…,K.

[0037] Among them, χ is A subset of represents the local estimate of the kth iteration, and b represents the size of the Byzantine user set.

[0038] Preferably, the process of realizing information exchange and collaborative work among multiple users includes:

[0039] S1: User initialization and registration phase: User A n Initialize the private cost function in its local BBMO client through 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 user registration and information exchange functions;

[0040] S2: BBMO server operation: The BBMO server collects statistics of information registered by all local BBMO clients through user registration and information exchange functions;

[0041] S3: Topology construction: Use the topology construction algorithm to construct a virtual topology on the blockchain;

[0042] S4: Establishing interactive channels: According to the corresponding relationship between the coordinator and the user, the user registration and information exchange functions establish interactive channels for different coordinators and BBMO client pairs;

[0043] S5: Parameter update: According to the correspondence between the coordinator and the user, the corresponding regional global variables of each coordinator are updated according to the coordinator update algorithm; the user uses the user update algorithm to update the local parameters; during the update process, the robust aggregation rules are used to filter and adjust the values ​​sent by the local user.

[0044] The beneficial effects of the present invention are:

[0045] Combination of blockchain and Byzantine resilience algorithm: This invention combines blockchain technology with Byzantine resilience algorithm, and utilizes the high security, immutability and decentralization of blockchain to improve the fault tolerance of distributed systems. This combination enables the system to maintain good convergence and robustness in the face of Byzantine attacks;

[0046] Double-layer multi-region consensus algorithm: This invention adopts a double-layer multi-region consensus algorithm. First, the system is divided into multiple regions. Local optimization is performed within each region. The correctness of the local optimization results is ensured by the consensus mechanism within the region. Then, the information between the regions is coordinated 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: This invention uses smart contracts to execute optimization algorithms and consensus protocols to ensure the correct execution of the algorithm and the security of the system. The introduction of smart contracts makes the algorithm execution process more transparent and reliable, reducing the risk of human intervention. At the same time, smart contracts can also be customized and expanded according to the needs of actual application scenarios;

[0048] Dynamic expansion and adaptive adjustment: The present invention supports dynamic expansion and adaptive adjustment, and can be optimized and adjusted accordingly according to the needs and changes of actual application scenarios, making the system more flexible and adaptable, and further expanding the application boundary of blockchain in the field of zero-trust security. For example, when a new node is added to the system or a node fails, the BBMO method of the present invention can automatically adjust the regional division and consensus mechanism.

[0049] Good robustness: Through regional division, the BBMO method of the present invention achieves a compromise between convergence and robustness. At the same time, under different noise intensities, the present invention can better tolerate different degrees of deviation, while the pure robust aggregation rule has poor robustness under smaller noise intensities. Finally, no matter how many Byzantine users there are, through regional division, the present invention can obtain better robustness than the robust aggregation rule. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a schematic diagram of the Byzantine elastic multi-user optimization system based on blockchain in the present invention;

[0051] Figure 2 This is a diagram of the robustness verification results in the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] The present invention proposes a Byzantine elastic multi-user optimization method based on blockchain, the method comprising:

[0054] like Figure 1As shown, a 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 blockchain-based smart contracts and solves multi-user optimization problems by promoting trusted coordination among multiple users, thereby achieving decentralized, secure and transparent information exchange and collaborative work. In the present invention, the four roles of user, coordinator, BBMO client and smart contract-driven BBMO server each perform their respective duties and jointly promote the efficient operation of the system.

[0056] The model training mode in which multiple users work collaboratively and distributedly in distributed training and decentralized training is called federated learning. The multi-user optimization problem of the present invention can be expressed as a common general consensus optimization problem in federated learning, namely Where f(V) is the total cost function, K is a positive integer, variables that are optimized for all users, is responsible for solving its distributed local cost function f n (·): A collection of users, where

[0057] User collections are composed of Indicates that multi-user collaborative and distributed solutions such as Figure 1 The multi-user optimization problem shown in Figure 1. Convex cost function f n (·) is private and only available to user A n In the kth iteration where k is a positive integer, user A N According to its private cost function f n The BBMO client updates its local estimate of The hope is that their local estimates will eventually converge to a common value.

[0058] The BBMO client acts as a medium between each user and the smart contract-driven BBMO server, running locally on each user and not controlled by any third party. It contains only one main function: user initialization and user update functions, which register some necessary information to the smart contract-driven BBMO server and update the corresponding user's local estimate.

[0059] The coordinator set consists of It indicates that the coordinator is a virtualized node generated on the BBMO server driven by smart contracts on the blockchain. As a region set. In area #l, 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 fusion center for all users. It is not controlled by any third party and can run locally on each user. It contains four main functions: user registration and information exchange function, robust aggregation rule function, parameter optimization and topology constructor (topology construction function), and coordinator update function. Based on the registration information obtained in the user registration and information exchange functions, the remaining three functions are used to generate an adaptive virtual network topology for the user and obtain the corresponding update process of the coordinator, thereby achieving the algorithm convergence and robustness of user preferences.

[0061] In the Byzantine elastic multi-user optimization system based on blockchain, the present invention adopts a user update algorithm, a coordinator update algorithm, a topology construction algorithm and a robust aggregation rule 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, and collaborate 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 Sending to the BBMO server based on smart contract through its local BBMO client

[0068] Step 5: User A n The local BBMO client receives the corresponding coordinator from the BBMO server The local global variable for the kth iteration of

[0069] Step 6: User A n According to the formula calculate Iterate back to step 3. When the number of iterations exceeds 4000 or the loss function converges, stop iterating and end the algorithm.

[0070] Where τ represents the user penalty parameter, which is used to adjust the penalty intensity of constraint violation in the optimization algorithm; h n represents the gradient or subgradient, represents the Lagrangian 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 Based on the local estimates uploaded by users in region #l and regional global variable updates from all other coordinators Represents the regional global variable of the kth iteration. The coordinator update algorithm is as follows:

[0073] Step 1: Coordinator C l Set the initial region global variables Laplacian matrix update vector and will Send to corresponding users The local BBMO client;

[0074] Step 2: Coordinator C l From the corresponding user The local BBMO client receives the user's Lagrangian operator By summing the Lagrangian operators in the region, the cumulative Lagrangian effect is calculated

[0075] Step 3: Coordinator C l From the corresponding user The local BBMO client receives And from all other coordinators on the blockchain Receives the local global variable for the kth iteration

[0076] Step 4: Coordinator C l according to Calculate the local global variable for the k+1th iteration

[0077] Step 5: BBMO server sends a The local BBMO client sends

[0078] Step 6: Coordinator C l according to calculate

[0079] Step 7: Coordinator C l according to calculate Iterate back to step 4. When the number of iterations exceeds 4000 or the loss function converges, stop iterating and end the algorithm.

[0080] in, Representation and Coordinator C l The associated user set determines the scope of users participating in the coordination process of the coordinator. The coordinator updates global variables and performs optimization coordination tasks based on the user information in the set. Represents the coordinator C l The set of neighboring coordinators is used for information interaction and collaborative optimization between coordinators. When the coordinator updates the global variables, the information of neighboring coordinators is considered to ensure the overall consistency and convergence of the system. τ represents the penalty parameter, which is used to adjust the constraint penalty strength related to the user. ρ represents the penalty parameter, which is used to adjust the constraint penalty strength related to the interaction between coordinators. Represents the coordinator C l The cumulative Lagrangian effect of the maintenance area is based on the Lagrangian operator in the area Calculate for update and Reflects the comprehensive information of user locations in the area, helps the coordinator adjust global variables to guide user optimization, Represents auxiliary variables, used for Laplace matrix update, participating in the coordinator C l The iterative update process works with other variables in the update formula to ensure that the coordinator accurately integrates information, guides user optimization, and promotes system convergence. Represents a local variable, which is controlled by the coordinator C m Maintenance updates.

[0081] Topology construction algorithm:

[0082] Convergence and robustness are not only affected by robust aggregation rules, but also by network topology. In order to adjust the network topology between users and balance convergence and robustness, the present invention considers creating a virtual and adaptive dual-layer multi-region network topology on the blockchain through BBMO.

[0083] Each user communicates with its associated coordinator through the user registration and information exchange functions on the BBMO server driven by smart contracts and through its BBMO client. Specifically, a total of N users are grouped into L regions, where 1≤L≤N, and each region is assigned a coordinator. Each region adopts a centralized scheme, where the coordinator orchestrates the users, and the coordinators of adjacent regions adopt a distributed scheme. Parameter optimization and topology constructors provide algorithm parameters to speed up convergence and adapt virtual network topology to meet users' preferences for robustness by adjusting the number of regions. When L=1, this network topology becomes a fully distributed topology, and when L=N, it evolves into a fully decentralized topology. In addition, the goal of multi-user optimization is to make the values ​​of different users not differ too much under suitable conditions. Therefore, when the Byzantine region in the distributed topology sends different values ​​to its neighboring regions, the value difference increases, thereby compromising 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 this inconsistent distribution of values.

[0084] The topology construction algorithm is as follows:

[0085] Step 1: Input the robust preference ε provided by the user, the number of users N, and the Lipschitz continuous 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 into L areas as evenly as possible;

[0087] Step 3: Set Calculate user penalty parameters and coordinator penalty parameters

[0088] Where f(v) is defined as is the objective function of the multi-user consensus optimization problem, which is determined by the local cost function f of all users. n (v n ) are accumulated, h(v) is the gradient or subgradient function of f(v). c and c t It is an intermediate parameter, which indicates the parameter related to the number of partitions and the number of users. It is used to calculate the penalty parameter, which reflects the user density in the area, affects the coordinator's weight of regional management and information fusion, and thus affects the optimization process. ε is the robustness preference parameter provided by the user, with a value range of [0,1], which is used to measure the user's demand for algorithm robustness. The formula L = εN + (1-ε) adjusts the robustness of the network topology. When ε = 0, it tends to converge faster, and when ε = 1, it focuses on the topology with strong robustness.

[0089] Robust aggregation rules:

[0090] The present invention has five main functions: 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 quantity unknown) will violate the predefined algorithm protocol and send arbitrary error messages. In order to deal with this situation, a mechanism is needed to reduce the impact of error messages on the optimization results, and the robust aggregation rule is designed for this purpose.

[0091] The robust aggregation rules are as follows:

[0092] Step 1: Coordinator C l From all users The local BBMO client receives

[0093] Step 2: For each dimension d, first find The smallest and largest subsets (size b), after excluding these two subsets, calculate the remaining users The average value is taken as the new The loop iterates k times in total.

[0094] Specifically, for d=1,…,K, the following operations are performed:

[0095]

[0096] for Do the following:

[0097]

[0098] Among them, χ is A subset of represents the local estimate of the kth iteration, 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 ​​suspected to be affected by Byzantine users, the interference of false information is reduced, ensuring that the aggregation reflects the honest user information and maintaining the effectiveness of the system under Byzantine attacks.

[0099] The present invention has five main functions: 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 user's update process. The robust aggregation rule can eliminate error messages sent by users to a certain extent. The specific process of realizing information exchange and collaborative work among multiple users in the Byzantine elastic multi-user optimization system based on blockchain is as follows:

[0100] Step 1: User initialization and registration phase

[0101] User A n Initialize the private cost function f in its local BBMO client through the user initialization and user update functions n (·).

[0102] BBMO Client Analysis m (·), and register 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 functions.

[0103] Step 2: BBMO Server Operation

[0104] The BBMO server first collects statistical data of the information registered by all local BBMO clients through user registration and information exchange functions.

[0105] Step 3: Topology Construction

[0106] The topology construction function uses the topology construction algorithm to construct a virtual topology on the blockchain. Specifically: based on the statistical data collected by the user registration and information exchange functions, the number of regions (i.e., the number of coordinators) that need to be created in order to achieve the algorithm convergence and robustness of the user's preference is calculated according to the parameter optimization and topology construction function;

[0107] Determine the correspondence between users and regions based on the number of regions and construct a virtual topology on the blockchain;

[0108] Step 4: Establish an interactive channel

[0109] According to the corresponding relationship between the coordinator and the user, the user registration and information exchange functions establish interactive channels for different coordinators and BBMO client pairs.

[0110] Step 5: Parameter Update

[0111] According to the corresponding relationship between the coordinator and the user, the coordinator update function updates the corresponding regional global variable z of each coordinator according to the coordinator update algorithm. l,The user uses the user update algorithm to update local parameters through the user initialization and update functions. During the update process, the robust aggregation rule function will filter and adjust the values ​​sent by the local user, and finally achieve;

[0112] Coordinator C in the same area l and User A n Alternately update the corresponding regional global variable z l and the local estimate v n , all coordinators C for each Update z in parallel l , all users For each Parallel Update V n .

[0113] Evaluation of the present invention:

[0114] Figure 2 This is the experimental result of robustness verification. Figure 2 (a) shows the disadvantage of using only the robust aggregation rule, i.e., for small u b This will result in a larger difference between the curves with Byzantine users and those without Byzantine users, and worse robustness. This is because the robust aggregation rule works by eliminating extreme values, making the larger u b The noise sequence with smaller u is easier to be eliminated. b The noise sequence is unlikely to produce extreme values ​​and is difficult to eliminate, resulting in worse robustness.

[0115] from Figure 2 (b)-(d) show that, through region partitioning, BBMO is more robust than using only the robust aggregation rule. Adding regions can make the curve closer to the case without Byzantine users.

[0116] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A Byzantine elastic multi-user optimization method based on blockchain, characterized in that: include: Build a blockchain-based Byzantine-resilient multi-user optimization system, which includes users, BBMO clients, coordinators, and BBMO servers; In the blockchain-based Byzantine elastic multi-user optimization system, user update algorithm, coordinator update algorithm, topology construction algorithm and robust aggregation rules are used to realize information exchange and collaborative work among multiple users; In the user update algorithm, users interact with the BBMO server driven by the smart contract to update local estimates, and collaborate with the coordinator to update global variables; In the coordinator update algorithm, the coordinator updates its own regional global variables based on the local estimates uploaded by users in its region and the regional global variables 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, so as to balance the convergence speed and robustness and improve the algorithm performance; When there is interference from Byzantine users sending erroneous information, the robust aggregation rule aggregates more reliable global estimates by filtering and adjusting the values ​​sent by users, thereby enhancing the system's robustness against Byzantine attacks.

2. According to a blockchain-based Byzantine elastic multi-user optimization method according to claim 1, it is characterized in that: The user update algorithm is as follows: 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; Step 2: User A n Receives the initial locale global variable of the corresponding coordinator from the BBMO server through its local BBMO client Step 3: User A n According to the formula Compute the local estimate for the kth iteration Step 4: User A n Sending to the BBMO server based on smart contract through its local BBMO client Step 5: User A n The local BBMO client receives the k+1th iteration of the regional global variable of the corresponding coordinator from the BBMO server Step 6: User A n According to the formula calculate Iterate back to step 3. When the number of iterations exceeds 4000 or the loss function converges, stop iterating and end the algorithm. Among them, τ represents the user penalty parameter; h n represents the gradient or subgradient, represents the Lagrangian operator of the user in the A+1th iteration.

3. According to a blockchain-based Byzantine elastic multi-user optimization method according to claim 1, it is characterized in that: The coordinator update algorithm is as follows: Step 1: Coordinator C l Set the initial region global variables Laplacian matrix update vector and will Send to corresponding users The local BBMO client; Step 2: Coordinator C l From the corresponding user The local BBMO client receives the user's Lagrangian operator The cumulative Lagrangian effect is calculated by summing the Lagrangian operators in the region Step 3: Coordinator C l From the corresponding user The local BBMO client receives And from all other coordinators on the blockchain Receives the local global variable for the kth iteration Step 4: Coordinator C l according to Calculate the local global variable for the k+1th iteration Step 5: BBMO server sends a The local BBMO client sends Step 6: Coordinator C l according to calculate Step 7: Coordinator C l according to calculate Iterate back to step 4. When the number of iterations exceeds 4000 or the loss function converges, stop iterating and end the algorithm. in, Representation and Coordinator C l The associated user collection, Represents the coordinator C l The set of neighboring coordinators, τ represents the user penalty parameter, ρ represents the coordinator penalty parameter, Represents the coordinator C l The cumulative Lagrangian effect of the maintenance area, represents auxiliary variables, Represents a region-local variable.

4. According to a blockchain-based Byzantine elastic multi-user optimization method according to claim 1, it is characterized in that: The topology construction algorithm is as follows: Step 1: Input the robust preference ε provided by the user, the number of users N, and the Lipschitz continuous constant M of h(v) f and the strong convexity constant m of f(v) f ; Step 2: Calculate the integer closest to εN+(1-ε) as the number of partitions L, and divide the N users into L areas as evenly as possible; Step 3: Set Calculate user penalty parameters and coordinator penalty parameters Where f(v) is defined as is the objective function of the multi-user consensus optimization problem, which is determined by the local cost function f of all users. n (v n ) are accumulated, h(v) is the gradient or subgradient function of the f(v) function; c represents the intermediate parameter.

5. According to a blockchain-based Byzantine elastic multi-user optimization method according to claim 1, it is characterized in that: The robust aggregation rules are as follows: Step 1: Coordinator C l From all users The local BBMO client receives Step 2: For each dimension d, first find The smallest and largest subsets, with a subset size of b, are excluded. Calculate the remaining users The average value is taken as the new The calculation is performed in a total of K cycles, where d = 1,…,K. Among them, χ is A subset of represents the local estimate of the kth iteration, and b represents the size of the Byzantine user set.

6. According to a blockchain-based Byzantine elastic multi-user optimization method according to claim 1, it is characterized in that: The process of achieving information exchange and collaborative work among multiple users includes: S1: User initialization and registration phase: User A n Initialize the private cost function in its local BBMO client through 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 user registration and information exchange functions; S2: BBMO server operation: The BBMO server collects statistics of information registered by all local BBMO clients through user registration and information exchange functions; S3: Topology construction: Use the topology construction algorithm to construct a virtual topology on the blockchain; S4: Establishing interactive channels: According to the corresponding relationship between the coordinator and the user, the user registration and information exchange functions establish interactive channels for different coordinators and BBMO client pairs; S5: Parameter update: According to the correspondence between the coordinator and the user, the corresponding regional global variables of each coordinator are updated according to the coordinator update algorithm; the user uses the user update algorithm to update the local parameters; during the update process, the robust aggregation rules are 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

  • Byzantine robust federated learning method and system based on block chain

    CN116796830A

  • Trusted federal learning method and system based on alliance chain

    CN116957110A

  • Topology-driven byzantine fault-tolerant consensus protocol with vote aggregation

    US20220158892A1