Efficient extensible federated learning system construction method, device and product based on P2P (Peer-to-Peer)

By introducing P2P communication and guided client selection algorithms into the federated learning system, model distribution and client selection are optimized, communication bottlenecks and client selection problems in the federated learning system are solved, and training efficiency and reliability of simulation results are improved.

CN119449810AActive Publication Date: 2025-02-14WUHAN UNIV

Patent Information

Application Number
CN202411481422.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-02-14
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

In the existing federated learning system, parameter servers communicate with a large number of clients through slow wireless networks, resulting in communication bottleneck problems; the existing P2P communication protocols fail to make full use of the idle bandwidth of clients, and there are defects in client selection schemes and simulation platform design. .

Method used

A highly efficient and scalable federated learning system based on P2P is designed, and the model distribution process is optimized through a guided client selection algorithm and random rare priority model block selection strategy; a simulation platform supporting real communication is built to simulate between clients. parallel computing and communication behavior.

Benefits of technology

It effectively alleviates the communication bottleneck of parameter servers in traditional federated learning and improves model training efficiency; by optimizing client selection and simulation platform design, the system training efficiency and the reliability of simulation results are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449810A_ABST
    Figure CN119449810A_ABST
Patent Text Reader

Abstract

The invention discloses a P2P (Peer-to-Peer)-based efficient extensible federated learning system construction method, equipment and a product. Firstly, a parameter server selects a client based on statistical efficiency, processing speed, distribution contribution and other historical information, and a client distributor assigns a special actuator to the selected client. The actuator operates in an isolated container environment, carries out real communication through a special network card, and distributes a global model by using a P2P communication library; the actuator sends the training configuration, the local data set and the global model to the computing node, and the computing node performs a plurality of rounds of local training and then returns model update to the actuator; the parameter server receives a model update of the actuator and generates a new global model. According to the method, model distribution is optimized through P2P communication, and a client selection scheme comprehensively considering various historical information is designed. In addition, the FedP2P constructs a high-fidelity simulation platform to accurately simulate calculation and communication behaviors in actual federation training, and then the effectiveness of scheme design is verified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer network communication and distributed machine learning, and relates to a method, device and product for constructing a federated learning system, and specifically to a method, device and product for constructing a system based on P2P (peer-to-peer) communication and cross-device federated learning. Background Art

[0002] Machine learning has achieved remarkable results in many fields such as translation and speech-to-text conversion. Training a high-performance model usually requires a large amount of user data, but due to people's growing concerns about data privacy in recent years, model developers cannot directly collect user data. As a new distributed training paradigm, federated learning (FL) enables tens of thousands of clients to collaboratively train a global model without leaking local privacy data, effectively solving data privacy and security issues in distributed training.

[0003] In traditional FL systems, the parameter server (PS) is responsible for coordinating the clients participating in the training, including selecting clients, distributing models, aggregating models, etc. However, in actual FL, the number of clients can usually reach hundreds or even tens of thousands. Since the bandwidth of the PS is limited, the communication between the PS and a large number of client devices through a slow wireless network will become the main performance bottleneck of the system. In response to this bottleneck, the main problem with existing solutions is that model distribution is still based on the original one-to-many communication, and algorithm-level optimization is performed, such as using momentum-based model updates, improving federated learning aggregation algorithms, etc., but does not focus on the communication itself.

[0004] As a distributed communication protocol, P2P not only allows PS to communicate with clients, but also allows clients to communicate directly with each other, which means that clients can send received model blocks to other clients, thereby reducing the communication burden of PS and accelerating the model distribution process. Although P2P architecture has been applied to FL to improve communication efficiency, existing solutions mainly focus on decentralized model aggregation, which removes PS and allows clients to communicate and aggregate models directly. In addition, these designs do not change the underlying communication primitives.

[0005] Although the technical route of accelerating cross-device federated learning training through P2P communication is very clear, there are many challenges in the specific implementation process. First, the existing P2P communication protocols, such as BitTorrent, are used to ensure fair file transfer between clients, but the goal of the solution is only to maximize the efficiency of model distribution in FL, and does not involve fairness issues. In addition, in order to improve training efficiency, the solution hopes that all read and write operations do not involve slow devices such as hard disks, so it is also necessary to transplant the original protocol and perform memory management to ensure that all read and write operations are completed in high-speed memory. Second, the existing client selection scheme needs to collect historical information such as the client's statistical efficiency and processing speed. Since they are all based on a one-to-many communication architecture, when using P2P communication, it is also necessary to consider the client's distribution process and select those clients that contribute more to the distribution process. Third, the actual use of hundreds or even tens of thousands of devices for training usually incurs a lot of overhead, so it is necessary to develop a simulation platform that supports the simulation of hundreds or tens of thousands of devices. The communication time of existing FL simulation platforms is usually calculated rather than actually measured. In addition, they do not support simulated communication, which makes it impossible to verify new communication architectures on these platforms.

[0006] Therefore, how to accelerate federated learning training through P2P communication, how to design new client selection schemes, and how to build a simulation platform to verify the effectiveness of these designs are challenges that need to be solved urgently. Summary of the invention

[0007] The present invention aims to solve three challenges in the prior art: (1) How to design a P2P communication backend so that the idle bandwidth of the client can be fully utilized during the distribution process and ultimately accelerate FL training. (2) How to design a client selection scheme so that the client's statistical efficiency, processing speed, distribution contribution and other information can be comprehensively considered to improve the system's training efficiency. (3) How to design an FL simulation platform so that clients can communicate with each other in real time and ensure the authenticity of the simulation platform's running results.

[0008] The technical solution adopted by the method of the present invention is: a method for constructing an efficient and scalable federated learning system based on P2P, wherein the global model of the efficient and scalable federated learning system is obtained through training, and the training process includes the following steps:

[0009] Step 1: The parameter server PS selects the client based on historical information, which includes statistical efficiency, processing speed, and distribution contribution;

[0010] Step 2: Each selected client specifies a dedicated executor for P2P communication and sends the client's training configuration to the computing node; the executor runs in an isolated container environment and is equipped with a dedicated network card for real communication;

[0011] Step 4: The executor sends the training configuration, local data set, and global model to the computing node. After the computing node performs several rounds of local training, it sends the global model update to the executor.

[0012] Step 5: The parameter server PS receives global model updates from all executors;

[0013] Step 6: The parameter server PS generates a new global model based on the received global model update.

[0014] Preferably, in step 1, a guided client selection algorithm is used to select a client by comprehensively considering three factors: statistical performance, processing speed, and P2P contribution of the client;

[0015] The guided client selection algorithm collects the time required for the clients selected in the previous round to complete the training and the parameter gradient information, and completes the exploration of the client set. Update the statistical performance set U, the last selected round set L, and the current round time set D; for each explored client According to its statistical performance U(i), the last selected round L(i), processing speed D(i) and upload contribution u i Calculate its utility Among them, R represents the current round; then the clients are sorted in descending order according to the utility Util, and (1-∈)×N clients are selected and put into S according to the probability generated by Util t Among them, the client selected in the tth round is denoted as S t , N is the number of clients, ∈ represents the exploration factor, and ∈×N clients are randomly selected from the unexplored client set and put into S t middle.

[0016] Preferably, the specific implementation of step 3 includes the following sub-steps:

[0017] Step 3.1: The P2P communication library selects a predetermined number of relatively scarce model blocks from all model blocks;

[0018] Step 3.2: The P2P communication library selects the peer with the best service capability from all peers that have established connections;

[0019] Step 3.3: The client requests the model block from the selected peer;

[0020] Step 3.4: The peer transmits the model block to the client.

[0021] Preferably, in step 3.1, the P2P communication library selects a relatively scarce model block from all model blocks according to a random rare-first model block selection algorithm;

[0022] The random rare priority model block selection algorithm first evaluates the rarity of model block j in client i r(i,j)=∑ k∈c(i) (1-P(k,j)), where client i has established a connection with peers k∈c(i), and the set of peers to which client i has established a connection is c(i); whether client i owns model block j, P(i,j)=1 means yes, P(i,j)=0 means no; the higher r(i,j), the rarer model block j is in client i’s network; then, all unowned blocks are grouped according to the rarity r(i,j), and within each group, the block indexes are randomly shuffled; finally, the model blocks in each group are merged in descending order of rarity to form the final block request order.

[0023] Preferably, the P2P communication library selects the peer with the best service capability from all peers with established connections according to an active peer selection algorithm;

[0024] The peer selection algorithm checks all peers k∈c(i) that have established connections with client i. If peer k has the model block j required by peer i and the maximum number of requests initiated by peer i to peer k does not exceed the limit, peer i will request model block j from peer k. At the same time, the window mechanism in TCP is used to dynamically adjust the maximum number of requests, that is, if peer k completes the request target, the window will increase, and if not, the window will be reduced to a non-zero value.

[0025] Preferably, the federated learning system introduces a computing node architecture based on the executor, each computing node is responsible for computing tasks of multiple clients on the same physical host, and each computing node allocates GPU resources on demand to ensure efficient use of the GPU.

[0026] Preferably, the federated learning system adopts a synchronization barrier mechanism. At the end of each round of training, all clients must complete the model update before the aggregation step to ensure that the computing and communication time of all clients are effectively synchronized and avoid time misalignment problems caused by executor resource limitations.

[0027] The present invention also provides a P2P-based efficient and scalable federated learning system construction device, comprising:

[0028] one or more processors;

[0029] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the P2P-based efficient and scalable federated learning system construction method.

[0030] The present invention also provides a P2P-based efficient and scalable federated learning system construction product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the P2P-based efficient and scalable federated learning system construction method.

[0031] Compared with the prior art, the beneficial effects of the present invention are:

[0032] (1) The present invention proposes an efficient and scalable federated learning system based on P2P, FedP2P, which for the first time applies the peer-to-peer (P2P) communication protocol to the model distribution stage of federated learning and adaptively optimizes the client selection strategy, effectively alleviating the communication bottleneck problem at the parameter server (PS) in the traditional federated learning model distribution stage and improving the model training efficiency.

[0033] (2) FedP2P has developed a dedicated P2P communication backend. Through the randomized rarity-first model block selection strategy and the active peer selection strategy, it fully utilizes the client's upload and download bandwidth in the model distribution phase, significantly eliminates the communication bottleneck of the PS in the model distribution phase, and speeds up the model distribution.

[0034] (3) FedP2P designs a guided client selection algorithm that comprehensively considers the client's statistical performance, processing speed, and contribution to P2P distribution, guides the selection of the best participants in subsequent rounds, and improves the training efficiency of federated learning.

[0035] (4) FedP2P builds a high-fidelity simulation platform that accurately simulates the actual federated learning training process, supports accurate client communication and runtime computing calibration, and precisely replicates the parallel computing and communication behaviors of large-scale devices, ensuring the reliability and authenticity of the simulation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The technical solution of the present invention is further described below using embodiments and specific implementation methods. In addition, in the process of describing the technical solution, some drawings are also used. For those skilled in the art, other drawings and the intention of the present invention can also be obtained based on these drawings without paying creative work.

[0037] Figure 1Schematic diagram of the method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0039] Please see Figure 1 This embodiment provides an efficient and scalable method for constructing a federated learning system based on P2P. First, the formal definition of the t-th round symbol of the federated learning system (FedP2P) of this example is given:

[0040] Client Collection

[0041] Client Parameters

[0042] The client's local dataset

[0043] Number of local samples on the client

[0044] Aggregate weight of the client

[0045] Client S selected in round t t ;

[0046] The total number of training rounds T, the number of local training rounds per client E, the learning rate η, and the global model w at round t t ;

[0047] Client i has established a connected peer c(i);

[0048] Whether client i has model block j, P(i,j);

[0049] The rarity assigned by client i to model block j, r(i,j);

[0050] The global model of the efficient and scalable federated learning system is obtained through training, and the training process includes the following steps:

[0051] Step 1: The parameter server PS selects the client based on historical information, which includes statistical efficiency, processing speed, and distribution contribution;

[0052] Traditional methods of selecting clients for federated learning are mainly based on the statistical performance of the client (such as the representativeness of data distribution) or processing speed (such as local computing power), but fail to fully consider the client's contribution to P2P model distribution. This single-dimensional selection strategy may lead to the following problems: (1) Inefficiency. Without considering P2P contribution, the client's upload bandwidth may not be fully utilized, limiting the speed of model propagation. (2) System instability: If the selected client has a low contribution in P2P propagation, it may become a laggard, prolonging the overall training time.

[0053] In one implementation, the guided client selection algorithm proposed by FedP2P comprehensively considers the three factors of client statistical performance, processing speed, and P2P contribution, making it more suitable for FedP2P systems that accelerate model distribution through P2P. Specifically, for the clients selected in the previous round, PS collects information such as the time required for them to complete training, parameter gradients, etc., and completes the exploration of the client set. Updates to the statistical performance U, the last selected round L, the time consumed in this round D, etc. For each explored client According to its statistical performance U(i), the last selected round L(i), processing speed D(i) and upload contribution u i Calculate its utility Among them, R represents the current round. Then, the clients are sorted in descending order according to the utility Util, and (1-∈)×N clients are selected and put into S according to the probability generated by Util t In order to avoid long-term dependence on a fixed client subset and improve the robustness and adaptability of the system, the algorithm adds an exploration factor ∈, randomly selecting ∈×N clients from the client set that has never been explored and putting them into S t middle.

[0054]

[0055]

[0056] In the above client selection algorithm, α is a penalty factor that penalizes the utility of clients whose processing time is higher than the expected time. β is a factor that rewards clients whose upload contribution is larger than the model file size or penalizes clients whose upload contribution is smaller than the model file size, and F represents the size of the model file. c is a decimal less than 1, representing the confidence coefficient, which is used to set the utility threshold in the participant selection process. For example, c = 0.95 means that the algorithm will select participants whose utility is at least 95% of the utility value of the (1-∈)×Kth participant.

[0057] Step 2: Each selected client specifies a dedicated executor for P2P communication and sends the client's training configuration to the computing node; the executor runs in an isolated container environment and is equipped with a dedicated network card for real communication;

[0058] Cross-device federated learning involves parallel computing and communication of large-scale clients. In reality, deploying thousands or even millions of clients is extremely difficult and resource-intensive. Therefore, a simulation platform that can truly simulate the complex communication and computing behaviors in a federated learning environment is of great significance for verifying the effectiveness and scalability of FedP2P.

[0059] In one embodiment, FedP2P builds a simulation platform that can realistically simulate complex communication and computing behaviors in a federated learning environment from three aspects: communication, GPU utilization, and simulation reliability. (1) Communication. FedP2P uses containerization technology to allocate an independent operating environment (executor) to each client. Each container has an independent network interface and can simulate the network behavior of a real client. This method is not only lightweight, but also allows a large number of client instances to run on a single physical machine, greatly improving the scalability of the simulation platform. FedP2P uses Linux traffic control tools to accurately configure the network bandwidth and latency of each client at runtime, so that the simulation platform can simulate the heterogeneous network conditions of different clients and ensure the authenticity of communication behavior. (2) GPU utilization. FedP2P introduces a computing node architecture based on the executor. Each computing node is responsible for the computing tasks of multiple clients on the same physical host, avoiding frequent switching of GPU resources between multiple executors and reducing the repeated occupation of GPU memory. Each computing node allocates GPU resources on demand to ensure efficient use of the GPU. (3) Simulation reliability. Simulation reliability requires ensuring the accuracy of communication time, computing time, and the alignment of the two. First, FedP2P uses containerized operating environment and network configuration control to truly simulate the parallel communication behavior between clients and ensure the accuracy of communication time. In the simulation, the actual client does not perform real local training tasks, but estimates the calculation time based on the client's computing power and local data volume as well as the real-world computing power data set to ensure that the calculation time in the simulation is highly consistent with the actual situation. In order to accurately simulate the synchronization behavior in parallel training, FedP2P introduces a synchronization barrier mechanism. At the end of each round of training, all clients must complete the model update before the aggregation step to ensure that the calculation and communication time of all clients are effectively synchronized to avoid time misalignment problems caused by executor resource limitations.

[0060] Step 3: The executor uses the P2P communication library to complete the global model distribution;

[0061] In one embodiment, the specific implementation includes the following sub-steps:

[0062] Step 3.1: According to the Randomized Rarity-First (RRF) model block selection algorithm, the P2P communication library selects a certain number of relatively scarce model blocks from all model blocks;

[0063] RRF aims to improve the efficiency of model distribution and the scalability of the system in FedP2P systems. Compared with the traditional rarity-first (RF) model block selection algorithm, RRF introduces a randomization factor into model blocks of the same rarity, making the requests of different client nodes more diverse, avoiding clients with scarce model blocks from being overwhelmed by requests from a large number of nodes, and also facilitating the diffusion of model blocks among clients, thereby making better use of the client's uplink and downlink bandwidth. Specifically, the algorithm first evaluates the rarity of model block j in client i, r(i,j)=∑ k∈c(i) (1-P(k,j)), where client i has established a connection with peers k∈c(i), and the set of peers to which client i has established a connection is c(i); whether client i owns model block j, P(i,j)=1 means yes, P(i,j)=0 means no; the higher r(i,j), the rarer model block j is in client i's network. Subsequently, all unowned blocks are grouped according to the rarity r(i,j), and within each group, the index of the block is randomly shuffled to avoid too concentrated requests to certain nodes, which will cause network congestion and reduce communication efficiency. Finally, the model blocks in each group are merged in order from high to low rarity to form the final block request order.

[0064]

[0065]

[0066] Step 3.2: According to the active peer selection algorithm, the P2P communication library selects the peer with the best service capability from all the peers that have established connections;

[0067] Active peer selection algorithm is a key technology to improve model distribution efficiency and system scalability. Traditional BitTorrent adopts tit-for-tat and optimistic unchoking mechanism. This passive decision mechanism is to ensure fairness in the transmission process and avoid some nodes only downloading but not uploading, which affects the overall communication efficiency of the system. Federated learning assumes that clients conduct collaborative training. It is the common goal of each client to complete training quickly and efficiently. Therefore, it is necessary to remove the fairness mechanism in BitTorrent and propose an active peer selection algorithm to ensure that each peer can obtain the upload service of the best node, improve bandwidth utilization and the overall communication efficiency of the system. Specifically, the algorithm checks all peers k∈c(i) that have established a connection with client i. If peer k has the model block j required by peer i and the maximum number of requests initiated by peer i to peer k does not exceed the limit, peer i will request model block j from peer k. The algorithm uses the window mechanism in TCP to dynamically adjust the maximum number of requests, that is, if peer k completes the request target, the window will increase, if not, the window will be reduced to a non-zero value.

[0068]

[0069] Step 3.3: The client requests the model block from the selected peer;

[0070] Step 3.4: The peer transmits the model block to the client.

[0071] Step 4: The executor sends the training configuration, local data set, and global model to the computing node. After the computing node performs several rounds of local training, it sends the global model update to the executor.

[0072] Step 5: The parameter server PS receives global model updates from all executors;

[0073] Step 6: The parameter server PS generates a new global model based on the received global model update.

[0074]

[0075]

[0076] This embodiment also provides a P2P-based efficient and scalable federated learning system construction device, including:

[0077] one or more processors;

[0078] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the P2P-based efficient and scalable federated learning system construction method.

[0079] This embodiment also provides a P2P-based efficient and scalable federated learning system construction product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the P2P-based efficient and scalable federated learning system construction method.

[0080] The present invention is further described below through specific experiments.

[0081] In terms of the configuration of the experimental environment, this experiment was conducted on a GPU cluster with seven physical servers, and the servers were connected via 10Gbps Ethernet. Each server is equipped with 128GB of memory and an NVIDIA GeForce RTX 4070 GPU with 12GB of video memory. In order to simulate heterogeneous clients, this experiment sampled from real-world computing power and bandwidth datasets and used the computing power and communication capabilities of the client. The upload and download bandwidth of PS was configured to 1000Mbps. 50 executors were deployed in the cluster through docker, corresponding to 50 participants in each round.

[0082] In terms of model and dataset selection, this experiment trained the ResNet-18 model on the FEMNIST dataset for image classification tasks, trained the ShuffleNet V2 model on the OpenImage dataset for image classification tasks, and trained the ResNet-34 model on the Google Speech dataset for speech recognition tasks.

[0083] In terms of the selection of the baseline method, this experiment compares FedAvg and Oort with the method of the present invention, calculates the time taken to reach the target test accuracy, and uses FedAvg as the baseline for comparison to calculate the speedup ratio.

[0084] In terms of experimental results, for the FEMNIST dataset, the time consumption of these three methods is 6.70h, 6.64h, and 4.73h, respectively, and the acceleration ratios are 1.00x, 1.01x, and 1.41x, respectively; for the OpenImage dataset, the time consumption of these three methods is 33.92h, 27.74h, and 19.97h, respectively, and the acceleration ratios are 1.00x, 1.22x, and 1.70x, respectively; for the Google Speech dataset, the time consumption of these three methods is 10.21h, 8.35h, and 7.40h, respectively, and the acceleration ratios are 1.00x, 1.22x, and 1.38x, respectively. It can be seen that the method of the present invention can effectively alleviate the communication bottleneck problem at the parameter server PS in the model distribution stage of federated learning and speed up the training process of the system.

[0085] The FedP2P system of the present invention is implemented in the form of a Python library, which is compatible with existing communication backends (such as MPI, Gloo, and gRPC), providing an easy-to-migrate, integrate, and deploy solution, enabling researchers and developers to easily apply and expand the functionality of FedP2P.

[0086] It should be understood that the embodiments described above are part of the embodiments of the present invention, rather than all of the embodiments. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be combined with each other arbitrarily to form a feasible technical solution. Such combination is not restricted by the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the protection scope required by the present invention.

[0087] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A method for constructing an efficient and scalable federated learning system based on P2P, characterized in that: The global model of the efficient and scalable federated learning system is obtained through training, and the training process includes the following steps: Step 1: The parameter server PS selects the client based on historical information, which includes statistical efficiency, processing speed, and distribution contribution; Step 2: Each selected client specifies a dedicated executor for P2P communication and sends the client's training configuration to the computing node; the executor runs in an isolated container environment and is equipped with a dedicated network card for real communication; Step 3: The executor uses the P2P communication library to complete the global model distribution; Step 4: The executor sends the training configuration, local data set, and global model to the computing node. After the computing node performs several rounds of local training, it sends the global model update to the executor. Step 5: The parameter server PS receives global model updates from all executors; Step 6: The parameter server PS generates a new global model based on the received global model update.

2. The method for constructing an efficient and scalable federated learning system based on P2P according to claim 1, characterized in that: In step 1, a guided client selection algorithm is used to select a client by comprehensively considering the three factors of the client's statistical performance, processing speed, and P2P contribution; The guided client selection algorithm collects the time required for the clients selected in the previous round to complete the training and the parameter gradient information, and completes the exploration of the client set. Update the statistical performance set U, the last selected round set L, and the current round time set D; for each explored client According to its statistical performance U(i), the last selected round L(i), processing speed D(i) and upload contribution u i Calculate its utility Among them, R represents the current round; then the clients are sorted in descending order according to the utility Util, and (1-∈)×N clients are selected and put into S according to the probability generated by Util t Among them, the client selected in the tth round is denoted as S t , N is the number of clients, ∈ represents the exploration factor, and ∈×N clients are randomly selected from the unexplored client set and put into S t middle.

3. The method for constructing an efficient and scalable federated learning system based on P2P according to claim 1, characterized in that: The specific implementation of step 3 includes the following sub-steps: Step 3.1: The P2P communication library selects a predetermined number of relatively scarce model blocks from all model blocks; Step 3.2: The P2P communication library selects the peer with the best service capability from all peers that have established connections; Step 3.3: The client requests the specified model block from the selected peer; Step 3.4: The peer transmits the model block to the client.

4. The method for constructing an efficient and scalable federated learning system based on P2P according to claim 3, characterized in that: In step 3.1, according to the random rare-first model block selection algorithm, the P2P communication library selects a relatively scarce model block from all model blocks; The random rare-first model block selection algorithm first evaluates the rarity of model block j in client i r(i, j)=∑ k∈c(i) (1-P(k, j)), where k∈c(i) is the peer to which client i has established a connection, and the set of peers to which client i has established a connection is c(i); whether client i owns model block j, P(i, j)=1 means yes, P(i, j)=1=0 means no; the higher r(i, j), the rarer the model block j is in the network of client i; then, all unowned blocks are grouped according to the rarity r(i, j), and within each group, the index of the blocks is randomly shuffled; finally, the model blocks in each group are merged in order of rarity from high to low to form the final block request order.

5. The method for constructing an efficient and scalable federated learning system based on P2P according to claim 3, characterized in that: In step 3.2, according to the active peer selection algorithm, the P2P communication library selects the peer with the best service capability from all peers with which connections have been established; The peer selection algorithm checks all peers k∈c(i) that have established connections with client i. If peer k has the model block j required by peer i and the maximum number of requests initiated by peer i to peer k does not exceed the limit, peer i will request model block j from peer k. At the same time, the window mechanism in TCP is used to dynamically adjust the maximum number of requests, that is, if peer k completes the request target, the window will increase, and if not, the window will be reduced to a non-zero value.

6. The method for constructing an efficient and scalable federated learning system based on P2P according to any one of claims 1 to 5, characterized in that: The federated learning system introduces a computing node architecture based on the executor. Each computing node is responsible for computing tasks of multiple clients on the same physical host. Each computing node allocates GPU resources on demand to ensure efficient use of the GPU.

7. The method for constructing an efficient and scalable federated learning system based on P2P according to any one of claims 1 to 5, characterized in that: The federated learning system adopts a synchronization barrier mechanism. At the end of each round of training, all clients must complete the model update before the aggregation step to ensure that the calculation and communication time of all clients are effectively synchronized and avoid time misalignment problems caused by executor resource limitations.

8. An efficient and scalable federated learning system construction device based on P2P, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the P2P-based efficient and scalable federated learning system construction method as described in any one of claims 1 to 7.

9. A product for building an efficient and scalable federated learning system based on P2P, including computer program instructions, characterized in that: When the computer program instructions are executed on a computer, the computer is enabled to execute the P2P-based efficient and scalable federated learning system construction method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for deploying federal learning task based on container

    CN113672352A

  • Federal learning aggregation optimization system and method for power data sharing

    CN115358487A

  • Federal learning method, system and device based on user grouping collaboration

    CN115759289A

  • Programmable data processing method and system based on trusted execution environment

    CN116992458A

  • Method and device for trusted federated intelligent security computing platform

    CN117714217A

Cited By

  • Industrial data processing method based on encryption processing, medium and equipment

    CN120512301A