Associative learning method, device, equipment and medium
By deploying multiple work nodes on a single computing device based on resource availability, the method addresses inefficiencies in federated learning, enhancing computing efficiency and resource utilization for large datasets.
Patent Information
- Application Number
- JP2023036909
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-03-10
- Filing Date
- 2023-03-09
- Publication Date
- 2024-09-26
- Estimated Expiration
- 2043-03-09
AI Technical Summary
Conventional federated learning tasks often suffer from low efficiency due to the inability of computing devices to allocate all or most computing resources to a single computing node, especially when dealing with large datasets, leading to inefficient utilization of resources and reduced algorithm performance.
The implementation of multiple work nodes on the same computing device based on preset conditions, such as resource availability, to optimize resource allocation and enhance computing efficiency for both horizontal and vertical federated modeling.
This approach efficiently utilizes computing resources, enabling parallel processing and improving the efficiency of federated learning tasks on large datasets by optimizing resource allocation and reducing communication overhead.
Smart Images

Figure 0007556188000005 
Figure 0007556188000006 
Figure 0007556188000001
Abstract
Description
[Technical field]
[0001] The present disclosure relates to the field of artificial intelligence, in particular to the field of machine learning and federated learning, and in particular to a federated learning method, a federated learning device, an electronic device, a computer-readable storage medium and a computer program product. [Background technology]
[0002] Artificial intelligence is the study of the discipline of simulating certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.) using computers, and includes both hardware and software level technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, etc. AI software technologies mainly include computer vision technology, voice recognition technology, natural language processing technology, machine learning / deep learning, big data processing technology, knowledge graph technology, etc.
[0003] Federated learning is an emerging artificial intelligence-based technology, whose initial design purpose is to carry out machine learning or deep learning among multiple participants or multiple computing nodes under the premise of ensuring information security during big data exchange, protecting the privacy of terminal data and personal data, and ensuring legal compliance. Currently, federated learning has become one of the research focuses in the current data science field, but federated learning algorithms generally ensure data security through cryptography techniques, which greatly reduces the efficiency of the algorithm.
[0004] The approaches described in this section are not necessarily approaches that have been previously conceived or adopted. Unless otherwise expressly stated, it should not be assumed that any approach described in this section qualifies as prior art by virtue of its inclusion in this section. Similarly, unless otherwise expressly stated, it should not be assumed that any problem addressed in this section is an admission in the prior art. Summary of the Invention [Problem to be solved by the invention]
[0005] The present disclosure provides a federated learning method, a federated learning device, an electronic device, a computer-readable storage medium, and a computer program product. [Means for solving the problem]
[0006] According to one aspect of the present disclosure, a federated learning method is provided, the method including receiving data related to a federated learning task of a target participant, determining computing resources of a first computing device capable of performing the federated learning task, and in response to determining that the data and computing resources satisfy a predetermined condition, generating a first deployment plan for performing the federated learning task, wherein the target participant includes at least a first computing device for performing the federated learning task, and the first deployment plan instructs generating at least a first work node and a second work node on the first computing device.
[0007] According to another aspect of the present disclosure, a federated learning apparatus is provided, the federated learning apparatus including a receiving unit configured to receive data related to a federated learning task of a target participant, a determination unit configured to determine computing resources of a first computing device capable of executing the federated learning task, and a first generation unit configured to generate a first deployment plan for executing the federated learning task in response to determining that the data and the computing resources satisfy a predetermined condition, wherein the target participant includes at least a first computing device for executing the federated learning task, and the first deployment plan instructs generating at least a first work node and a second work node on the first computing device.
[0008] According to another aspect of the present disclosure, there is provided an electronic device including at least one processor and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above method.
[0009] According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the above method.
[0010] According to another aspect of the present disclosure there is provided a computer program product comprising a computer program which, when executed by a processor, implements the above method. Effect of the Invention
[0011] According to one or more embodiments of the present disclosure, a deployment plan is generated to execute multiple work nodes on the same computing device when the data of the target participant and the computing resources of the computing device of the target participant satisfy predetermined conditions, thereby solving the problem of low utilization of computing resources caused by a computing device being unable to allocate all or most of the computing resources of the computing device to a single computing node, thereby efficiently and fully utilizing the computing resources of the single computing device to perform horizontal or vertical federated modeling on large amounts of data, and improving the efficiency of federated learning.
[0012] As will be understood, the contents described in this section are not intended to identify key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood from the following specification. [Brief description of the drawings]
[0013] The drawings illustratively illustrate the embodiments, constitute a part of the specification, and together with the description serve to explain exemplary embodiments of the embodiments. The illustrated embodiments are used for illustrative purposes only and do not limit the scope of the claims. In all the drawings, the same drawing reference numbers indicate similar, but not necessarily identical, elements. [Figure 1] 1 shows a schematic diagram of an exemplary system capable of implementing the various methods described herein in accordance with embodiments of the present disclosure. [Diagram 2] 1 shows a flowchart of a federated learning method according to an exemplary embodiment of the present disclosure. [Diagram 3] 1 illustrates a flowchart of a first deployment plan generated according to an exemplary embodiment of the present disclosure. [Figure 4] 1 shows a flowchart of a federated learning method according to an exemplary embodiment of the present disclosure. [Diagram 5] 1 illustrates a flowchart of a vertical federation learning task according to an exemplary embodiment of the present disclosure. [Figure 6] FIG. 2 illustrates a structural block diagram of a federated learning device according to an exemplary embodiment of the present disclosure. [Figure 7] FIG. 2 illustrates a structural block diagram of a first generating unit according to an exemplary embodiment of the present disclosure; [Figure 8] FIG. 2 illustrates a structural block diagram of a federated learning device according to an exemplary embodiment of the present disclosure. [Figure 9] FIG. 1 illustrates a structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings. The following description includes various details of the embodiments of the present disclosure for ease of understanding, but such details should be regarded as merely exemplary. Therefore, as would be obvious to one skilled in the art, various changes and modifications can be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, in the following description, well-known functions and structures are omitted for clarity and simplicity.
[0015] In this disclosure, unless otherwise specified, when terms such as "first", "second", etc. are used to describe various elements, they are not intended to limit the location, timing, or importance of these elements, but are merely used to distinguish one element from another. In some examples, a first element and a second element can refer to the same instance of the element, and in some cases, they can refer to different instances based on the context description.
[0016] In this disclosure, the terms used in the description of various examples are merely for describing specific examples and are not intended to be limiting. Unless otherwise specified in the context, when the number of elements is not specifically limited, the elements may be one or more. In addition, the term "and / or" used in this disclosure covers any one and all possible combinations of the items shown.
[0017] In related art, most of the traditional federated learning tasks are executed on a single node, and cannot be executed in the business scenario of large amounts of data. Some federated learning frameworks are executed on multiple computing nodes with the help of distributed thinking, but some federated learning algorithms do not support parallel computing in principle, and therefore cannot be well applied to these federated learning frameworks, so the improvement of algorithm efficiency is not noticeable or large data sets cannot be processed.
[0018] To solve the above problem, the present disclosure solves the problem of low utilization of computing resources caused by a computing device being unable to allocate all or most of the computing resources in the computing device to a single computing node by generating a deployment plan to execute multiple work nodes on the same computing device when the data of the target participant and the computing resources of the computing device of the target participant meet predetermined conditions, thereby efficiently and fully utilizing the computing resources of the single computing device to perform horizontal or vertical federated modeling on large amounts of data, and improving the efficiency of federated learning.
[0019] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0020] Figure 1 illustrates a schematic diagram of an example system 100 in which various methods and apparatus described herein may be implemented in accordance with embodiments of the present disclosure. As shown in Figure 1, the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.
[0021] In an embodiment of the present disclosure, server 120, when executed, can perform one or more services or software applications of a federated learning methodology.
[0022] In some embodiments, server 120 may provide other services or software applications, which may include non-virtualized and virtualized environments. In some embodiments, such services may be provided as web-based or cloud services, such as software as a service (SaaS) provided to users of client devices 101, 102, 103, 104, 105, and / or 106 over the Internet.
[0023] In the configuration shown in FIG. 1A, server 120 may include components that implement one or more of the functions performed by server 120. These components may include software components executable by one or more processors, hardware components, or a combination thereof. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may utilize the services provided by these components by interacting with server 120 using one or more client applications in turn. It should be noted that various system configurations are possible and may differ from system 100. Thus, FIG. 1A is intended as an example, not a limitation, of a system for implementing the various methods described herein.
[0024] A user may use client devices 101, 102, 103, 104, 105, and / or 106 to process information. The client devices may provide an interface that allows a user of the client device to interact with the client device, e.g., a user may use the client to input instructions related to a federated learning task to a server via various input devices. The client devices may also output information to the user via the interface, e.g., a client may output to the user the results of performing the federated learning task and the results of predicting samples using a trained federated learning model. Although only six types of client devices are shown in FIG. 1, one of ordinary skill in the art will recognize that the present disclosure may support any number of client devices.
[0025] The client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computing devices, such as service robots, self-service terminals, portable handheld devices, general purpose computers (e.g., personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computing devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (e.g., GOOGLE Chrome OS), or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smartphones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (e.g., smart glasses) and other devices. The gaming system includes various handheld gaming devices, gaming devices that support the Internet, etc. The client devices may run various applications, such as various Internet-related applications, communication applications (e.g., email applications), Short Message Service (SMS) applications, and may use various communication protocols.
[0026] Network 110 may be any type of network known to those skilled in the art and may support data communications using any of a variety of available protocols, including, but not limited to, TCP / IP, SNA, IPX, etc. By way of example, one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0027] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, midrange servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain a virtual storage facility for the server). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0028] The computing units of server 120 may run one or more operating systems, including any of the operating systems listed above, as well as any commercially available server operating system. Server 120 may also run any of a variety of additional server and / or mid-tier applications, including an HTTP server, an FTP server, a CGI server, a JAVA server, a database server, etc.
[0029] In some embodiments, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display the data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.
[0030] In some embodiments, the server 120 may be a server of a distributed system or may be a server incorporating blockchain. The server 120 may be a cloud server, or a smart cloud computing server or a smart cloud host equipped with artificial intelligence technology. The cloud server is one of the host products in the cloud computing service system, and aims to solve the shortcomings of difficult management and low business scalability that exist in traditional physical hosts and virtual private server (VPS) services.
[0031] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of databases 130 may be used to store information such as audio and video files. Databases 130 may be located in a variety of locations. For example, a data repository used by server 120 may be local to server 120 or may be remote from server 120 and in communication with server 120 via a network-based or dedicated connection. Databases 130 may be of a variety of types. In some embodiments, a data repository used by server 120 may be a database, such as a relational database. One or more of these databases may store, update, and retrieve data from the database and the database in response to instructions.
[0032] In some embodiments, one or more of databases 130 may also be used by an application to store data for the application. The databases used by the application may be different types of databases, such as a key-value repository, an object repository, or a regular repository supported by a file system.
[0033] The system 100 of FIG. 1 can be configured and operated in a variety of ways to accommodate the various methods and apparatus described in this disclosure.
[0034] According to one aspect of the present disclosure, a federated learning method is provided, as shown in Fig. 2, the method includes the steps of receiving data related to a federated learning task of a target participant S201, determining computing resources of a first computing device capable of performing the federated learning task S202, and generating a first deployment plan for performing the federated learning task S203 in response to determining that the data and computing resources satisfy a preset condition, where the target participant includes at least a first computing device for performing the federated learning task, and the first deployment plan instructs to at least generate a first work node and a second work node on the first computing device.
[0035] This solves the problem of low computing resource utilization caused by a computing device being unable to allocate all or most of its computing resources to a single computing node by generating a deployment plan to execute multiple work nodes on the same computing device when the data of the target participant and the computing resources of the target participant's computing device meet predetermined conditions, thereby efficiently and fully utilizing the computing resources of the single computing device to perform horizontal or vertical federated modeling on large amounts of data, and improving the efficiency of federated learning.
[0036] In some embodiments, the methods of the present disclosure may be applied to participants in federated learning, including any participant in horizontal federated learning and participants with feature data in vertical federated learning.
[0037] In some embodiments, step S201 of receiving data related to the federated learning task of the target participant may include aligning data owned by each of the multiple participants performing the federated learning task to obtain data actually used for federated training by each participant.
[0038] In actual business scenarios participating in federated modeling, the data formats and data types of the participants are diverse, so the federated learning platform needs to support these multi-source data, shield the differences in lower-level data, and make the upper-level modeling process transparent. In some embodiments, the federated learning platform can access source data of types such as data tables, databases, Hadoop Distributed File System (HDFS), cloud storage, and online input through file upload and table creation statements, and these data sources can generate a generic data interface DataFrame through the SQL engine. DataFrame is a general java object that does not store raw data files, but records the data transformation process and supports various tansform and action operators. The transformation of DataFrame is completed by the tansform operator, and the tansform operator is executed only when the action operator is triggered, which belongs to a delayed execution mechanism. This method can reduce the storage space occupied by data and improve the utilization rate of storage resources. DataFrame can also support stream reading and column reading of data. As can be understood, when receiving data, information related to the data (e.g., number of rows, number of columns) may be obtained without first reading the data, and the data may be further divided into blocks based on the data information and read by the corresponding portion of the work node data when the data needs to be processed using the work node.
[0039] In some embodiments, the target participant may include multiple computing devices and may determine whether to generate a deployment plan for placing multiple work nodes at the computing device based on the data assigned to each computing device and the computing resources of the computing device that can perform the federated learning task.
[0040] In some embodiments, the computing resources used for the federated learning task of the first computing device may include at least one of a processor resource, a memory resource, and a bandwidth resource.
[0041] According to some embodiments, the preset condition may indicate that the size of the maximum computing resource that the first computing device allocates from the computing resource to a single work node is smaller than the data size. That is, if the first computing device determines that the size of the maximum computing resource that the first computing device can allocate to a single work node from the computing resource is smaller than the size of the amount of data for performing the federated learning task, a deployment plan for at least two work nodes may be generated in the first computing device, thereby improving the utilization of the computing resources of the first computing device. If there is only one computing node in a single computing device and the amount of data for the federated learning task is large, the computing device may not allocate sufficient computing resources to the computing node. In one exemplary embodiment, the data for the federated learning task needs to occupy 200 GB of memory resources, but the computing device may not allocate such memory resources to a single computing node. By generating 10 work nodes, the computing device may allocate 20 GB of memory resources to each work node, thereby making great use of the computing resources of the computing device. In addition, distributing multiple work nodes on one computing device may also avoid communication overhead caused by distributing multiple work nodes on multiple computing devices. As can be understood, the preset condition can be set in other manners, such as, for example, the ratio of data size to computing resource size is greater than the preset threshold, and is not limited thereto.
[0042] In some embodiments, the number of work nodes executing simultaneously may be referred to as the degree of parallelism.
[0043] According to some embodiments, the first work node and the second work node are two processes running on a first computing device, thereby realizing the federated learning task for the target participant to be executed in parallel on the same computing device, and the work nodes may further include multiple threads to further improve the processing efficiency of the federated learning task.
[0044] According to some embodiments, as shown in FIG. 3, in response to determining that the data and the computing resources satisfy the predetermined condition, step S203 of generating a first deployment plan for performing the federated learning task may include step S301 of determining a number of candidate nodes; step S302 of calculating, for each number of candidate nodes among the plurality of candidate nodes, a planned processing time for work nodes of the number of candidate nodes to cooperatively perform the federated learning task; and step S303 of determining each number of candidate nodes among the plurality of candidate nodes and the planned processing time corresponding to the candidate node number as the first deployment plan, wherein each number of candidate nodes among the plurality of candidate nodes instructs a first computing device to generate work nodes for the number of candidate nodes, and each work node among the work nodes of the number of candidate nodes can perform the federated learning task based on a portion of the data of the data using a portion of the computing resources of the computing resources.
[0045] Thus, by determining the number of multiple candidate nodes, and determining the planned processing time for the work nodes of the number of candidate nodes to execute the federated learning task with the arrangement of the current computing resources, the amount of data, the selected federated learning algorithm, etc., multiple work node deployment plans and the planned processing time corresponding to each deployment plan can be obtained, and further, the first computing device or the user of the target joining side can determine an optimal plan from these plans and apply the plan to execute the federated learning task, thereby realizing efficient utilization of computing resources and improving the processing speed of the federated learning task.
[0046] In some embodiments, it may be assumed that computing resources and data are evenly distributed among the work nodes of the candidate number of work nodes to obtain the expected processing time under the optimal situation. The computing resources used by these work nodes and the processed data, parameters, and models can all be independent, and therefore can be executed in parallel, thereby realizing the cooperative execution of the federated learning task.
[0047] According to some embodiments, when calculating the usage of memory resources corresponding to each number of candidate nodes, it is necessary to consider the memory expansion rate of the used federated learning algorithm. The memory expansion rate is the memory size occupied by the model of the federated learning algorithm when the federated learning task is executed, and the size of the space required to store the model of the federated learning algorithm. In some embodiments, the memory expansion rate is related to the data amount of the federated learning algorithm and the corresponding model, so it is necessary to calculate the corresponding memory expansion rate according to the selected federated learning algorithm and the data amount of the corresponding model, calculate the size of the memory resources required by each node of the number of candidate nodes according to the memory expansion rate, and further obtain the size of the memory resources required to execute the federated learning task corresponding to the number of candidate nodes. This makes it possible to determine whether the computing resources used for the federated learning of the target participant side can support these numbers of candidate nodes.
[0048] In some embodiments, when a user intends to execute a federated learning task using only a part of the computing resources of the target participant, the size and parallelism of the computing resources for executing the federated learning task (i.e., the number of work nodes to be executed simultaneously) can be determined based on multiple planned processing times corresponding to the combinations of the sizes of multiple computing resources, multiple federated learning algorithms, and multiple parallelism degrees stored in advance. In this way, the planned processing times in multiple different deployment plans are stored in advance and sent to the corresponding users, which helps the users to select the size and parallelism of the computing resources to be used for executing the federated learning task, thereby providing a more flexible method to make full use of the computing resources of the target participant.
[0049] In some embodiments, when the computing resources of a single computing device are insufficient to process a federated learning task, multiple work nodes may be placed on multiple computing devices, but the methods of the present disclosure may allow some of these computing devices to run multiple work nodes to improve the utilization of the computing resources of the computing devices.
[0050] According to some embodiments, as shown in Fig. 4, the federated learning method may further include the steps of: generating at least a first work node and a second work node on a first computing device based on the first deployment plan in response to determining to apply the first deployment plan, block-segmenting data to obtain a data block corresponding to the first work node and a data block corresponding to the second work node, allocating computing resources to the first work node and the second work node based on the size of the data block corresponding to each of the first work node and the second work node, and instructing the first work node and the second work node to execute the federated learning task in parallel. The operations of steps S401 to S403 in Fig. 4 are similar to those of steps S201 to S203 in Fig. 2, and will not be described here.
[0051] Thus, after applying the first deployment plan, at least two work nodes may be generated in the first computing device, data may be blocked to obtain data blocks processed by each work node, computing resources may be allocated to each work node based on the size of the corresponding data block, and the work nodes may be instructed to use the corresponding computing resources to perform the federated learning task, thereby realizing parallel processing for the federated learning task at the target participant side and improving the execution efficiency of the federated learning task.
[0052] In some embodiments, the decision to apply the first deployment plan may be determined, for example, by a user or by the first computing device, and in one example embodiment, the first computing device may determine a first deployment plan among the plurality of first deployment plans that has the least expected processing time and apply the first deployment plan.
[0053] According to some embodiments, the first deployment plan may further instruct to generate a parameter node on the first computing device. The generated parameter node may be used to perform data partitioning, parameter distribution, and self-side result aggregation, and the generated work node may be used to read corresponding data and perform parameter computing and updating. Such a node configuration method allows for efficient parallel execution of federated learning tasks for target participants. In some embodiments, step S405 may be performed by the parameter node. In some embodiments, the parameter node may be executed on the first computing device in cooperation with the first work node and the second work node.
[0054] According to some embodiments, the data used in the federated learning task of the target participant may include a plurality of feature data of each of the plurality of samples. If the federated learning task is a vertical federated learning task, the step S405 of blocking the data includes blocking the data based on the plurality of features included in the data to obtain a first data block corresponding to the first work node and a second data block corresponding to the second work node, where the first data block includes first partial feature data of the plurality of samples and the second data block includes second partial feature data of the plurality of samples.
[0055] In some embodiments, in the vertical federated learning task, each participant has some feature data or tag data of all samples. The vertical federated learning algorithm does not support parallel computing as a whole, but divides the feature data into multiple data blocks by feature (i.e., columns) inside each participant having feature data, instructs each work node to process the corresponding data block, and further instructs the parameter node to aggregate the processing results (e.g., the sum of encrypted gradients), thereby improving the efficiency of training the model of the federated learning algorithm of the target participant. Specific steps of the parameter node and the work node performing the vertical federated learning task will be described later.
[0056] In some embodiments, the first partial feature data and the second partial feature data are both feature data of some features of all samples in the data, and may not overlap. Therefore, the first work node and the second work node can both process the encrypted gradient data using the allocated computing resources and corresponding data blocks based on the received encrypted gradient data to obtain encrypted split gains. The encrypted split gains can also be sent to corresponding parameter nodes for aggregation and consolidation, as described below.
[0057] According to some embodiments, when the associative learning task is a horizontal associative learning task, the step S405 of blocking the data includes blocking the data based on a plurality of samples contained in the data, and obtaining a third data block corresponding to the first work node and a fourth data block corresponding to the second work node, where the third data block includes a plurality of feature data of a first partial sample among the plurality of samples, and the fourth data block includes a plurality of feature data of a second partial sample among the plurality of samples.
[0058] In some embodiments, in a horizontal federated learning task, each participant has all the feature data and tag data of some samples, and thus these participants can perform the federated learning task in parallel. The participants are divided into multiple data blocks according to samples (i.e., rows), instruct each work node to process the corresponding data block, and further instruct the parameter node to aggregate the processing results (e.g., gradients or updated model parameters) to improve the efficiency of training the model of the federated learning algorithm. Specific steps of the parameter node and the work node performing the horizontal federated learning task will be described later.
[0059] According to some embodiments, the first and second partial samples are both partial samples in the data and may not overlap. Thus, the first and second work nodes can both utilize the allocated computing resources to process the corresponding data blocks to obtain gradient parameters or directly obtain the trained model. Furthermore, the gradient parameters or the trained model can be sent to the corresponding parameter node for aggregation and consolidation, as described below.
[0060] According to some embodiments, the computing resources may include memory resources. The step S406 of allocating computing resources to the first work node and the second work node may include determining the size of memory resources allocated to the first work node and the size of memory resources allocated to the second work node based on the size of the data block corresponding to each of the first work node and the second work node and a memory expansion rate of a federated learning algorithm used for the federated learning task, the memory expansion rate indicating the ratio of the memory size occupied by the federated learning model trained by the federated learning algorithm to the raw data size of the federated learning model when the federated learning task is performed. In this manner, it is possible to ensure that each work node performs work normally and efficiently, and to make full use of memory resources. As can be understood, other computing resources can be allocated to the work nodes based on information such as the characteristics of the algorithm and the size of the data block, and the description thereof is omitted here.
[0061] In some embodiments, the target participant includes feature data, and the other participants only include tag data. As shown in FIG. 5, when the federated learning task is a vertical federated learning task, the complete flow of executing the federated learning task includes: step S501 in which the target participant and the other participants align samples; step S502 in which the parameter node of the target participant divides the data by column; step S503 in which the parameter node of the target participant sends the divided column names to each work node of the target participant, and each node reads the data according to the column names; step S504 in which the other participants calculate and encrypt gradient data; step S505 in which the other participants send the encrypted gradient data to the parameter node of the target participant; step S506 in which the parameter node of the target participant sends the encrypted gradient data to each work node; step S507 in which each work node of the target participant calculates multiple encrypted split gains corresponding to the feature data of the node; step S508 in which the parameter node of the target participant aggregates the multiple encrypted split gains of each work node; step S509 in which the parameter node of the target participant aggregates the multiple encrypted split gains of each work node; step S501 in which the parameter node of the target participant calculates the multiple encrypted split gains corresponding to the feature data of the node; step S502 in which the parameter node of the target participant aggregates the multiple encrypted split gains of each work node; step S503 in which the parameter node of the target participant calculates the multiple encrypted split gains corresponding to the feature data of the node; step S504 in which the parameter node of the target participant calculates the multiple encrypted split gains corresponding to the feature data of the node; step S505 in which the parameter node of the target participant aggregates the multiple encrypted split gains of each work node; step S506 in which the parameter node of the target participant calculates the multiple encrypted split gains corresponding to the feature data of the node; step S507 in which the parameter node of the target participant aggregates the multiple encrypted split gains of each work node; step S508 in which the parameter node of the target participant calculates the multiple encrypted split The method may include a step S509 in which the parameter node of the target participant transmits a plurality of encrypted split gains after aggregation to the other participant, a step S510 in which the other participant decrypts the encrypted split gains returned from all the participants including the feature data, and determines a target feature and split point information that may include a split threshold according to the decrypted split gain, a step S511 in which the other participant transmits the target feature and split point information to the participant including the feature data of the target feature (for convenience of explanation, it is assumed that the target participant is the participant including the feature data of the target feature), a step S512 in which the parameter node of the target participant acquires a corresponding split feature value from the work node including the feature data of the target feature, a step S513 in which the parameter node of the target participant determines a split result for a plurality of samples based on the split feature value, a step S514 in which the parameter node of the target participant transmits the split result to the other participant, and a step S515 in which the other participant records the split result and updates the model. The above steps S504 to S514 can be repeatedly executed until a preset end condition is satisfied.In this manner, multiple worker nodes can be used to parallelize the vertical federation learning tasks performed by the target participant, thereby improving the efficiency of vertical federation learning.
[0062] In some embodiments, the federated learning algorithm used for the federated learning task performed in FIG. 5 may be the XGBooSt algorithm. The other participants including the tag data may calculate first-order gradient data (Gradient) and second-order gradient data (Hessian) and send the first-order gradient data and second-order gradient data encrypted using a homomorphic encryption algorithm to the target participants. For each feature in the data block, the work nodes of the target participants may sort the feature data of the feature for all samples to obtain multiple candidate split points. The work nodes may calculate encrypted split gains for each candidate split point based on the encrypted gradient data, and the parameter node aggregates these encrypted split gains and then sends them to the other participants including the tag data. The other participants decrypt all encrypted split gains for all candidate split points for all features of all participants, determine the target feature and split point information with the largest split gain from among them, and send these information to the participants including the feature data of the target feature. The parameter node of the participating side obtains the feature value corresponding to the division point information from the corresponding work node, and determines the division result according to the feature value and the feature data of the feature of the plurality of samples, and then synchronizes the division result to other participating sides to complete the current iteration. It can be understood that the above flow can be applied to other federated learning algorithms for vertical federated learning tasks, and is not limited here.
[0063] In some embodiments, when the federated learning task is a horizontal federated learning task, both the target participant and the other participants may include all the feature data and tag data of each of some samples among the multiple samples. At this time, the work nodes can fully update the federated learning algorithm models in parallel and merge these models using the parameter node, and the target participant and the other participants can update their respective federated learning algorithm models in parallel and send encrypted model parameters to each other, such as updating their own model parameters using the model parameters of the other participants.
[0064] According to some embodiments, when the federated learning task is a horizontal federated learning task, the step S407 of performing the federated learning task may further include instructing the first work node and the second work node to stream read corresponding data blocks, so that the stream reading manner allows the work node to collectively read data of some samples in each iteration, thereby realizing training data whose data amount far exceeds the size of the computing resource through multiple iterations.
[0065] According to some embodiments, as shown in FIG. 4 , the federated learning method further includes: in response to receiving an instruction to expand computing resources during execution of the federated learning task, step S408: generating a second deployment plan for continuing execution of the federated learning task based on the expanded computing resources; in response to deciding to apply the second deployment plan, step S409: stopping the first work node and the second work node and generating at least a third work node and a fourth work node on the first computing device based on the second deployment plan; and step S410: instructing the third work node and the fourth work node to continue execution of the federated learning task, where the second deployment plan instructs to generate at least the third work node and the fourth work node on the first computing device.
[0066] In some embodiments, during the execution of the federated learning task, as the amount of data increases, the participating server may encounter a problem that the computing resources are insufficient to launch or efficiently execute multiple parallel computing tasks, and the computing resources are flexibly expanded, a second deployment plan is generated based on the expanded computing resources, and new work nodes corresponding to the expanded computing resources are further generated after determining to apply the second deployment plan, and the new work nodes are instructed to continue executing the federated learning task, thereby ensuring that the federated learning task can be completed efficiently.
[0067] In some embodiments, computing resources may be expanded by expanding more computing devices, and data may be reallocated to each computing device based on the expanded computing devices, and data may be processed in parallel on these computing devices in the manner disclosed herein.
[0068] According to another aspect of the present disclosure, a federated learning apparatus is provided. As shown in Fig. 6, the federated learning apparatus 600 includes a receiving unit 601 configured to receive data related to a federated learning task of a target participant, a determining unit 602 configured to determine a computing resource capable of performing the federated learning task of a first computing device, and a first generating unit 603 configured to generate a first deployment plan for performing the federated learning task in response to determining that the data and the computing resource satisfy a preset condition, where the target participant includes at least the first computing device for performing the federated learning task, and the first deployment plan instructs to generate at least a first work node and a second work node on the first computing device.
[0069] As can be understood, the operations and effects of units 601 to 603 in associative learning device 600 are similar to those of steps S201 to S203 in FIG. 2, and the description thereof will be omitted here.
[0070] According to some embodiments, the preset condition may indicate that a size of a maximum computing resource that the first computing device allocates from the computing resources to a single work node is less than a size of the data.
[0071] According to some embodiments, the first work node and the second work node may be two processes executing on a first computing device.
[0072] According to some embodiments, as shown in Fig. 7, the first generating unit 700 may include: a first determining subunit 701 configured to determine a number of candidate nodes; a computing subunit 702 configured to calculate, for each number of candidate nodes among the number of candidate nodes, a planned processing time for the work nodes of the number of candidate nodes to cooperatively execute a federated learning task; and a second determining subunit 703 configured to determine each number of candidate nodes among the number of candidate nodes and the planned processing time corresponding to the number of candidate nodes as a first deployment plan, and each number of candidate nodes among the number of candidate nodes instructs a first computing device to generate work nodes of the number of candidate nodes. Each work node of the number of candidate nodes can execute a federated learning task based on a portion of the data of the data using a portion of the computing resources of the computing resources.
[0073] According to some embodiments, as shown in FIG. 8 , the federated learning device 800 may further include: a second generation unit 804 configured to generate at least a first work node and a second work node on a first computing device based on the first deployment plan in response to determining to apply the first deployment plan; a data blocking unit 805 configured to block data and obtain a data block corresponding to the first work node and a data block corresponding to the second work node; a computing resource allocation unit 806 configured to allocate computing resources to the first work node and the second work node based on sizes of the data blocks corresponding to the first work node and the second work node, respectively; and a first execution unit 807 configured to instruct the first work node and the second work node to execute the federated learning task in parallel. The operations and effects of each unit 801-803 of the federated learning device 800 are similar to those of each unit 601-603 of the federated learning device 600, and will not be described here.
[0074] According to some embodiments, the data may include a plurality of feature data of each of a plurality of samples. When the associative learning task is a vertical associative learning task, the data blocking unit is further configured to block the data based on a plurality of features included in the data to obtain a first data block corresponding to the first work node and a second data block corresponding to the second work node, where the first data block includes a first partial feature data of the plurality of samples and the second data block includes a second partial feature data of the plurality of samples.
[0075] According to some embodiments, when the associative learning task is a horizontal associative learning task, the data blocking unit is further configured to block the data based on a plurality of samples included in the data to obtain a third data block corresponding to the first work node and a fourth data block corresponding to the second work node, where the third data block may include a plurality of feature data of a first partial sample of the plurality of samples, and the fourth data block includes a plurality of feature data of a second partial sample of the plurality of samples.
[0076] According to some embodiments, the computing resource may include a memory resource. The computing resource allocation unit may be further configured to determine a size of the memory resource allocated to the first work node and a size of the memory resource allocated to the second work node based on sizes of data blocks corresponding to the first work node and the second work node, respectively, and a memory expansion rate of a federated learning algorithm used for the federated learning task, where the memory expansion rate indicates a ratio of a memory size occupied by a federated learning model trained with the federated learning algorithm to a raw data size of the federated learning model when the federated learning task is performed.
[0077] According to some embodiments, the federated learning task may be a vertical federated learning task.The first deployment plan may further direct generating, at the first computing device, the parameter node. The first execution unit may be further configured to receive a first parameter, which is encrypted gradient data corresponding to the plurality of samples, from the other participants including tag data of each of the plurality of samples, instruct the parameter node to send the first parameter to the first work node and the second work node, calculate a second parameter based on the first parameter and a data block corresponding thereto using corresponding computing resources, and instruct the first work node and the second work node to send the second parameter to the parameter node, aggregate the second parameters received from the first work node and the second work node, and instruct the parameter node to send the aggregated second parameter to the other participants, receive split point information of a target feature from the other participants, instruct the parameter node to send the split point information to a work node corresponding to the target feature, determine a split feature value based on the split point information and the data block corresponding to the work node, instruct the work node to send the split feature value to the parameter node, instruct the parameter node to determine a split result for the plurality of samples based on the split feature value, and instruct the parameter node to send the split result to the other participants, wherein the second parameter is an encrypted split gain determined based on the sorted result of the feature data of each of the plurality of samples included in the corresponding data block and the encrypted gradient data.
[0078] According to some embodiments, the federated learning task may be a horizontal federated learning task. The first execution unit may be further configured to instruct the first work node and the second work node to stream read the corresponding data blocks.
[0079] According to some embodiments, as shown in FIG. 8 , the federated learning device 800 may further include: a third generation unit 808 configured to generate a second deployment plan for continuing the execution of the federated learning task based on the expanded computing resources in response to receiving an instruction to expand computing resources during the execution of the federated learning task; a fourth generation unit 809 configured to stop the first work node and the second work node and generate at least a third work node and a fourth work node on the second computing device based on the second deployment plan in response to deciding to apply the second deployment plan; and a second execution unit S810 configured to instruct the third work node and the fourth work node to continue the execution of the federated learning task, where the second deployment plan instructs to generate at least the third work node and the fourth work node on the first computing device.
[0080] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure and other processing of user personal information shall all comply with the provisions of relevant laws and regulations and shall not violate public order or morals.
[0081] According to embodiments of the present disclosure, an electronic device, a readable storage medium, and a computer program product are further provided.
[0082] Referring to FIG. 9, a structural block diagram of an electronic device 900 that can be used as a server or client of the present disclosure is described, which is an example of a hardware device applicable to each aspect of the present disclosure. The electronic device is intended to represent various types of digital electronic computing devices, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various types of mobile devices, such as, for example, personal digital processing, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0083] 9, the device 900 includes a computing unit 901 that can perform various suitable executions and processes according to a computer program stored in a read only memory (ROM) 902 or loaded from a storage unit 908 into a random access memory (RAM) 903. The RAM 903 may store various programs and data necessary for the execution of the device 900. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0084] The components of the device 900 are connected to an I / O interface 905, and include an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 may be any type of device capable of inputting information to the device 900, which can receive input digital or textual information and generate key signal inputs related to user settings and / or function control of the electronic device, and includes, but is not limited to, a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote control. The output unit 907 may be any type of device capable of displaying information, and includes, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 908 includes, but is not limited to, a magnetic disk, an optical disk. The communications unit 909 enables the device 900 to exchange information / data with other devices via, for example, the Internet computer network and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communications device, a wireless communications transceiver and / or a chipset, such as, for example, a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communications device, and / or the like.
[0085] The computing unit 901 may be various general-purpose and / or special-purpose processing components having processing and calculation capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphic processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units that perform machine learning internet algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs various methods and processes described above, such as the federated learning method. For example, in some embodiments, the federated learning method may be realized as a computer software program physically included in a machine-readable medium such as the storage unit 908. In some embodiments, some or all of the computer program may be loaded and / or installed in the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the federated learning method described above may be performed. Optionally, in another embodiment, the computing unit 901 may be configured to perform the federated learning method in any other suitable manner (e.g., by firmware).
[0086] Various embodiments of the systems and techniques described herein may be realized in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on a chip systems (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may be embodied in one or more computer programs that may be executed and / or interpreted by a programmable system that includes at least one programmable processor, which may be a special purpose or general purpose programmable processor, and that may receive data and instructions from and transmit data and instructions to a storage system, at least one input device, and at least one output device.
[0087] The program codes for implementing the methods of the present disclosure can be programmed in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, a special purpose computer, or other programmable data processing apparatus, such that when the program codes are executed by the processor or controller, the functions / executions specified in the flowcharts and / or block diagrams are performed. The program codes can be fully executed on a machine, partially executed on a machine, or as a separate software package, partially executed on a machine and partially executed on a remote machine, or entirely executed on a remote machine or server.
[0088] In the context of the present disclosure, a machine-readable medium may be a tangible medium that contains or stores a program, which may be used by or in combination with an instruction execution system, device, or machine. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or machine, or any combination of the above. More specific examples of machine-readable storage media include an electrical connection by one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0089] To allow interaction with a user, the systems and techniques described herein can be implemented in a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user, a keyboard and a pointing device (e.g., a mouse or trackball) by which the user can provide input to the computer. Other types of devices can provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0090] The systems and techniques described herein can be implemented in a computing system that includes a back-end component (e.g., as a data server), or a computing system that includes a middleware component (e.g., an application server), or a computing system that includes a front-end component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected via any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0091] The computer system may include a client and a server. The client and the server are usually remote from each other and interact through a communication network. The relationship between the client and the server is generated by a computer program that runs on a corresponding computer and has a client-server relationship with each other. The server may be a cloud server, also called a cloud computing server or cloud host, which is one host product of a cloud computing service system to solve the defects of the traditional physical host and VPS service (abbreviated as "Virtual Private Server" or "VPS"), such as high management difficulty and weak traffic scalability. The server may be a server of a distributed system or a server combined with a blockchain.
[0092] It should be noted that, using the various forms of the above processes, steps can be rearranged, added, or removed. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different sequence, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this specification is not limited thereto.
[0093] Although the embodiments or examples of the present disclosure have been described with reference to the drawings, the above methods, systems, and devices are merely illustrative embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but is limited by the scope of the granted claims and their equivalents. Various elements in the embodiments or examples can be omitted or replaced with other equivalent elements. In addition, each step can be performed according to a different order from that described in this disclosure. Furthermore, various elements of the embodiments or examples can be combined in various ways. Importantly, with the development of technology, many elements described herein can be replaced by equivalent elements appearing later in this disclosure.
Claims
1. A computer-implemented method for associative learning, comprising: receiving data related to a target participant's associative learning task; determining computing resources of a first computing device capable of performing the federated learning task; and in response to determining that the data and the computing resources satisfy a predetermined condition, generating a first deployment plan for performing the federated learning task; The target participant includes at least a first computing device for performing the federated learning task, and the first deployment plan instructs the first computing device to generate at least a first work node and a second work node; in response to determining to apply the first deployment plan, generating at least a first work node and a second work node on the first computing device based on the first deployment plan; Blocking the data to obtain a data block corresponding to the first work node and a data block corresponding to the second work node; allocating computing resources to the first work node and the second work node based on sizes of data blocks corresponding to each of the first work node and the second work node; instructing the first work node and the second work node to perform the federated learning task in parallel.
2. Generating the first deployment plan includes: determining a number of candidate nodes; Calculating, for each number of candidate nodes among the plurality of numbers of candidate nodes, a projected processing time for work nodes of the number of candidate nodes to cooperatively execute the federated learning task; determining each number of candidate nodes among the plurality of numbers of candidate nodes and a scheduled processing time corresponding to the number of candidate nodes as a first deployment plan; 2. The federated learning method of claim 1, wherein each of the plurality of candidate node numbers instructs the first computing device to generate work nodes for the candidate node number, and each of the work nodes for the candidate node number can perform a federated learning task based on a portion of the data of the data using a portion of the computing resources of the computing resources.
3. The computing resources include memory resources, and allocating computing resources to the first work node and the second work node based on sizes of data blocks corresponding to each of the first work node and the second work node includes: determining a size of a memory resource allocated to the first work node and a size of a memory resource allocated to the second work node based on sizes of data blocks corresponding to the first work node and the second work node, respectively, and a memory expansion rate of a federated learning algorithm used for the federated learning task; The federated learning method according to claim 1 , wherein the memory expansion rate indicates a ratio between a memory size occupied by a federated learning model trained by the federated learning algorithm and a raw data size of the federated learning model when the federated learning task is executed.
4. in response to receiving an instruction to expand computing resources during execution of the federated learning task, generating a second deployment plan for continuing execution of the federated learning task based on the expanded computing resources, the second deployment plan instructing to generate at least a third work node and a fourth work node on the first computing device; in response to determining to apply the second deployment plan, shutting down the first work node and the second work node and generating at least a third work node and a fourth work node on the first computing device based on the second deployment plan; The method of claim 1 , further comprising: instructing the third work node and the fourth work node to continue performing the federated learning task.
5. The data includes a plurality of feature data for each of a plurality of samples, the association learning task is a vertical association learning task, and blocking the data includes: and dividing the data into blocks based on a plurality of features included in the data to obtain a first data block corresponding to the first work node and a second data block corresponding to the second work node; 2. The method according to claim 1, wherein the first data block includes first partial feature data of the plurality of samples, and the second data block includes second partial feature data of the plurality of samples.
6. the federated learning task is a vertical federated learning task, and the first deployment plan further instructs generating a parameter node at the first computing device; performing the associative learning task receiving first parameters from other participants including tag data for each of the samples, the first parameters being encrypted gradient data corresponding to the samples, and instructing the parameter node to transmit the first parameters to the first work node and the second work node; instructing the first work node and the second work node to use corresponding computing resources to calculate a second parameter based on the first parameter and the corresponding data block, and to send the second parameter to the parameter node; instructing the parameter node to aggregate second parameters received from the first work node and the second work node, respectively, and transmit the aggregated second parameters to the other participants; receiving segmentation point information of a target feature from the other participants, and instructing the parameter node to transmit the segmentation point information to a work node corresponding to the target feature; determining a split feature value based on the split point information and a data block corresponding to the work node, and instructing the work node to send the split feature value to the parameter node; instructing the parameter node to determine a segmentation result for the plurality of samples based on the segmentation feature values; instructing the parameter node to transmit the division result to the other participants; 6. The federated learning method according to claim 5, wherein the second parameter is an encrypted split gain determined based on a sorted result of a portion of feature data of each of the plurality of samples included in the corresponding data block and the encrypted gradient data.
7. The data includes a plurality of feature data for each of a plurality of samples, the association learning task is a horizontal association learning task, and blocking the data includes:
2. The method of claim 1, further comprising: dividing the data into blocks based on a plurality of samples included in the data to obtain a third data block corresponding to the first work node and a fourth data block corresponding to the second work node, the third data block including a plurality of feature data of a first partial sample of the plurality of samples, and the fourth data block including a plurality of feature data of a second partial sample of the plurality of samples.
8. performing the associative learning task The method of claim 7 , further comprising instructing the first work node and the second work node to stream read corresponding data blocks.
9. The federated learning method according to claim 1 , wherein the preset condition indicates that a size of a maximum computing resource that the first computing device allocates from the computing resources to a single work node is smaller than a size of the data.
10. The method of claim 1 , wherein the first work node and the second work node are two processes executing on the first computing device.
11. An associative learning device, comprising: a receiving unit configured to receive data related to a target participant's federated learning task; a determining unit configured to determine computing resources of a first computing device capable of performing the federated learning task; a first generation unit configured to generate a first deployment plan for performing the federated learning task in response to determining that the data and the computing resources satisfy a predetermined condition; The target participant includes at least a first computing device for performing the federated learning task, and the first deployment plan instructs the first computing device to generate at least a first work node and a second work node; a second generation unit configured to generate at least a first work node and a second work node on the first computing device based on the first deployment plan in response to determining to apply the first deployment plan; a data blocking unit configured to block the data to obtain a data block corresponding to the first work node and a data block corresponding to the second work node; a computing resource allocation unit configured to allocate computing resources to the first work node and the second work node based on sizes of data blocks corresponding to the first work node and the second work node, respectively; a first execution unit configured to instruct the first work node and the second work node to execute the federated learning task in parallel.
12. The first generation unit is A first determination subunit configured to determine a number of a plurality of candidate nodes; a computing subunit configured to calculate, for each of the plurality of candidate node numbers, a projected processing time for work nodes of the candidate node number to cooperatively execute the federated learning task; a second determination subunit configured to determine each candidate node number among the plurality of candidate node numbers and a scheduled processing time corresponding to the candidate node number as a first deployment plan; The federated learning device of claim 11, wherein each of the plurality of candidate node numbers instructs the first computing device to generate work nodes for the candidate node number, and each of the work nodes for the candidate node number is capable of performing a federated learning task based on a portion of the data of the data using a portion of the computing resources of the computing resources.
13. The computing resources include memory resources, and the computing resource allocation unit further comprises: determining a size of a memory resource allocated to the first work node and a size of a memory resource allocated to the second work node based on sizes of data blocks corresponding to the first work node and the second work node, respectively, and a memory expansion rate of a federated learning algorithm used for the federated learning task; The federated learning device according to claim 11 , wherein the memory expansion rate indicates a ratio between a memory size occupied by a federated learning model trained by the federated learning algorithm and a raw data size of the federated learning model when the federated learning task is executed.
14. a third generating unit configured to, in response to receiving an instruction to expand computing resources during execution of the federated learning task, generate a second deployment plan for continuing execution of the federated learning task based on the expanded computing resources, the second deployment plan instructing the first computing device to generate at least a third work node and a fourth work node; a fourth generating unit configured, in response to determining to apply the second deployment plan, to stop the first work node and the second work node and generate at least a third work node and a fourth work node on the first computing device based on the second deployment plan; The federated learning apparatus of claim 11 , further comprising: a second execution unit configured to instruct the third work node and the fourth work node to continue execution of the federated learning task.
15. The data includes a plurality of feature data of a plurality of samples, the associative learning task is a vertical associative learning task, and the data blocking unit further comprises: configured to block the data based on a plurality of features included in the data to obtain a first data block corresponding to the first work node and a second data block corresponding to the second work node; The associative learning device according to claim 11 , wherein the first data block includes first partial feature data of the plurality of samples, and the second data block includes second partial feature data of the plurality of samples.
16. the federated learning task is a vertical federated learning task, and the first deployment plan further instructs generating a parameter node at the first computing device; The first execution unit further comprises: receiving first parameters from other participants including tag data for each of the samples, the first parameters being encrypted gradient data corresponding to the samples, and instructing the parameter node to transmit the first parameters to the first work node and the second work node; instructing the first work node and the second work node to use corresponding computing resources to calculate a second parameter based on the first parameter and the corresponding data block, and to send the second parameter to the parameter node; instructing the parameter node to aggregate second parameters received from the first work node and the second work node, and to transmit the aggregated second parameters to the other participants; receiving segmentation point information of a target feature from the other participants, and instructing the parameter node to transmit the segmentation point information to a work node corresponding to the target feature; determining a split feature value based on the split point information and a data block corresponding to the work node, and instructing the work node to send the split feature value to the parameter node; instructing the parameter node to determine a segmentation result for the plurality of samples based on the segmentation feature values; configured to instruct the parameter node to transmit the division result to the other participants; 16. The federated learning device according to claim 15, wherein the second parameter is an encrypted split gain determined based on a sorted result of a portion of feature data of each of the plurality of samples included in the corresponding data block and the encrypted gradient data.
17. The data includes a plurality of feature data of a plurality of samples, the association learning task is a horizontal association learning task, and the data blocking unit further comprises: configured to block the data based on a plurality of samples included in the data to obtain a third data block corresponding to the first work node and a fourth data block corresponding to the second work node; 12. The associative learning device according to claim 11, wherein the third data block includes a plurality of feature data of a first subsample of the plurality of samples, and the fourth data block includes a plurality of feature data of a second subsample of the plurality of samples.
18. The first execution unit further comprises: The apparatus of claim 17 , further configured to instruct the first work node and the second work node to stream read corresponding data blocks.
19. The federated learning apparatus of claim 11 , wherein the preset condition indicates that a size of a maximum computing resource that the first computing device allocates from the computing resources to a single work node is smaller than a size of the data.
20. The federated learning apparatus of claim 11 , wherein the first work node and the second work node are two processes executing on the first computing device.
21. At least one processor; a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the associative learning method described in any one of claims 1 to 10.
22. A non-transitory computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the associative learning method according to any one of claims 1 to 10.
23. A program for causing a computer to execute the associative learning method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Control program, control method, and control apparatus
JP2021144401A
Parameter sharing in federated learning
WO2021191750A1
