Communication system and distributed learning method
The communication system optimizes data and model parameter transfer in federated learning to minimize machine learning time, enhancing training efficiency through strategic data routing and parameter synchronization.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2026-03-25
AI Technical Summary
The challenge in federated learning is determining which data to use at which location to minimize machine learning time, given that transfer time and training time at each location are affected by network bandwidth and data amount.
A communication system that optimizes data transfer and model parameter routing across a network using a first and second server with acquisition, transfer, and machine learning units, calculating data and model parameter transfer ratios and paths to minimize learning time.
This approach reduces machine learning time by optimizing data and model parameter transfer, enabling efficient distributed processing and faster training of machine learning models.
Smart Images

Figure 0007835122000005 
Figure 0007835122000006 
Figure 0007835122000007
Abstract
Description
[Technical Field]
[0001] This disclosure relates to a technology for performing distributed learning using a network, that is, a technology for collaboratively training machine learning models (deep learning models) at several locations using data acquired in a distributed manner on a network, and in particular to a technology that solves the problem of which location should receive the data collected on the network. [Background technology]
[0002] In recent years, federated learning (unlicensed literature 1) has been proposed as a distributed method for training deep learning models. This method involves individually training model parameters at each location and periodically synchronizing the model parameters. In federated learning, the transfer time of model parameters and the time it takes to train at each location affect the overall training time. The former depends on the network's available bandwidth, and the latter depends on the amount of data used for training at each location. Furthermore, these factors depend on which location receives the data generated on the network. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] WYB Lim et al., "Federated learning in mobile edge networks: A comprehensive survey" IEEE Communications Surveys & Tutorials, 2020. [Overview of the project] [Problems that the invention aims to solve]
[0004] Therefore, when collaboratively training a deep learning model at several locations using data acquired in a distributed manner across a network, the problem arises of determining which data to use at which location in order to minimize machine learning time.
[0005] This invention has been made in view of the above circumstances and aims to transfer data in a way that minimizes the machine learning time for federated learning. [Means for solving the problem]
[0006] To achieve the above objective, the invention according to claim 1 is a communication system that performs distributed processing learning using a network constructed by a first server having a first acquisition unit, a first transfer unit, a first machine learning unit, and a first machine learning model, a second server having a second acquisition unit, a second transfer unit, a second machine learning unit, and a second machine learning model, and a computing unit, wherein the computing unit determines a first data transfer ratio from the first transfer unit to the second server, and the 2The transfer unit calculates a second data transfer ratio from the transfer unit to the first server, the first transfer unit transfers the first data acquired by the first acquisition unit based on the calculation results by the calculation unit, the second transfer unit transfers the second data acquired by the second acquisition unit based on the calculation results by the calculation unit, the first machine learning unit uses the first data acquired by the first acquisition unit to train the first machine learning model, the second machine learning unit uses the second data acquired by the second acquisition unit to train the second machine learning model, and the calculation unit calculates the first path of the first model parameters for machine learning by the first machine learning unit, and the second machine The communication system is characterized in that a learning unit searches for a second path for a second model parameter for machine learning, the first transfer unit transfers the first model parameter to the second server based on the first path calculated by the calculation unit in each epoch, the second transfer unit transfers the second model parameter to the first server based on the second path calculated by the calculation unit in each epoch, the first acquisition unit acquires the second model parameter, the first machine learning unit integrates the first and second model parameters, and the second acquisition unit acquires the first model parameter, the second machine learning unit integrates the first and second model parameters. [Effects of the Invention]
[0007] As explained above, the present invention has the effect of being able to transfer data in a way that minimizes the machine learning time for federated learning. [Brief explanation of the drawing]
[0008] [Figure 1] This is an overall configuration diagram of the communication system according to the embodiment. [Figure 2] This is an electrical hardware configuration diagram of an integrated control system. [Figure 3]It is a flowchart showing the processing of a communication system. [Figure 4] It is a flowchart showing the processing of a communication system. [Figure 5] It is a diagram showing the definition of symbols. [Figure 6] It is a diagram showing various expressions. [Figure 7] It is a diagram showing various expressions. [Figure 8] It is a diagram showing various expressions. [Figure 9] It is a diagram showing various expressions.
Embodiments for Carrying Out the Invention
[0009] Hereinafter, embodiments of the present invention will be described using the drawings.
[0010] 〔System Configuration of Embodiment〕 Using FIG. 1, the outline of the configuration of the communication system of the embodiment will be described. FIG. 1 is an overall configuration diagram of the communication system according to the embodiment.
[0011] As shown in FIG. 1, the communication system 1 is constructed by a plurality of transfer devices. In FIG. 1, as the plurality of transfer devices, servers 10a, 10b and routers 30a, 30b, 30c, 30d are connected on the network. Hereinafter, the general names of servers 10a, 10b will be shown as "server 10". Also, the general names of routers 30a, 30b, 30c, 30d will be shown as "router 30". In FIG. 1, for the convenience of the drawing paper, two servers 10 and four routers are shown, but these numbers can be any number.
[0012] <Functional Configuration of Server> As shown in Figure 1, server 10a has an acquisition unit 11a and a transfer unit 12a as transfer functions. Server 10a also has a machine learning unit 13a, an inference unit 14a, a database 15a, and a machine learning model 20a as machine learning functions. Furthermore, server 10a has a calculation unit 16. Each functional unit (acquisition unit 11a, transfer unit 12a, machine learning unit 13a, inference unit 14a) is a function or means of functioning that is realized by operating according to instructions from CPU 101 that follow a program deployed on RAM 103 as shown in Figure 2 below.
[0013] Of these, the acquisition unit 11a acquires data from other transfer devices.
[0014] The transfer unit 12a transfers data to another transfer device.
[0015] The machine learning unit 13a trains the machine learning model 20a using deep learning with machine learning algorithms such as neural networks, thereby generating a trained machine learning model 20a.
[0016] The inference unit 14a performs inference for a predetermined task using the trained machine learning model 20a. If the trained machine learning model 20a is a classification model, the inference unit 14a infers the classification result for the input data, or if the trained machine learning model 20a is a future prediction model, it infers the value for the next time from the input data.
[0017] Database 15a is a collection of information organized for easy searching and storage, and is used to implement server functionality.
[0018] The calculation unit 16 is a function that performs calculations to optimize load balancing independently of the machine learning function. Note that the calculation unit 16 may be located on servers other than servers 10a and 10b within the communication system 1.
[0019] Server 10b includes an acquisition unit 11b, a transfer unit 12b, a machine learning unit 13b, an inference unit 14b, a database 15b, and a machine learning model 20b. The acquisition unit 11b, transfer unit 12b, machine learning unit 13b, inference unit 14b, database 15b, and machine learning model 20b have the same functions as the acquisition unit 11a, transfer unit 12a, machine learning unit 13a, inference unit 14a, database 15a, and machine learning model 20a, respectively, so their descriptions are omitted.
[0020] Hereafter, machine learning models 20a and 20b will be collectively referred to as "machine learning model 20." Similarly, servers 10a and 10b will be collectively referred to as "server 10."
[0021] <Router> Router 30a has an acquisition unit 31a and a forwarding unit 32a as forwarding functions. Router 30b has an acquisition unit 31b and a forwarding unit 32b as forwarding functions. Router 30c has an acquisition unit 31c and a forwarding unit 32c as forwarding functions. Router 30d has an acquisition unit 31d and a forwarding unit 32d as forwarding functions.
[0022] Since the acquisition units 31a, 31b, 31c, and 31d have the same functions as the acquisition unit 11a described above, their descriptions are omitted. Since the transfer units 32a, 32b, 32c, and 32d have the same functions as the transfer unit 12a described above, their descriptions are omitted.
[0023] Hereafter, routers 30a, 30b, 30c, and 30d will be collectively referred to as "router 30". Similarly, acquisition units 31a, 31b, 31c, and 31d will be collectively referred to as "acquisition unit 31". Forwarding units 32a, 32b, 32c, and 32d will be collectively referred to as "forwarding unit 32".
[0024] Furthermore, for the sake of simplifying subsequent formulations, we will assume that server 10 is connected to router 30 via a link with infinite bandwidth.
[0025] [Hardware configuration] Next, we will explain the electrical hardware configuration of server 10 using Figure 2. Figure 2 is an electrical hardware configuration diagram of the server.
[0026] Server 10, as a computer, is equipped with a CPU (Central Processing Unit) 101, ROM (Read Only Memory) 102, RAM (Random Access Memory) 103, SSD (Solid State Drive) 104, external device connection I / F (Interface) 105, network I / F 106, media I / F 109, and bus line 110, as shown in Figure 2.
[0027] Of these components, the CPU 101 controls the overall operation of the server 10. The ROM 102 stores programs used to drive the CPU 101, such as the IPL (Initial Program Loader). The RAM 103 is used as the work area for the CPU 101.
[0028] SSD104 reads or writes various types of data according to the control of CPU101. Note that an HDD (Hard Disk Drive) may be used instead of SSD104.
[0029] The External Device Connection I / F105 is an interface for connecting various external devices. These external devices include displays, speakers, keyboards, mice, USB (Universal Serial Bus) memory, and printers.
[0030] Network I / F106 is an interface for data communication via a communication network such as physical network 300.
[0031] The media interface 109 controls the reading or writing (storage) of data to or from the recording medium 109m, such as flash memory. The recording medium 109m includes DVDs (Digital Versatile Discs) and Blu-ray Discs (registered trademarks), among others.
[0032] Bus line 110 is an address bus, data bus, etc., for electrically connecting each component, such as the CPU 101 shown in Figure 2.
[0033] Note that the router 30 has the same configuration as the server 10, or at least one of the SSD 104, external device connection I / F 105, and media I / F 109 is omitted, so its description is omitted.
[0034] In the following sections, we will formulate methods to minimize the time required for machine learning.
[0035] [Definition of symbols] First, we will define the symbols used hereafter. The definitions are shown in Figure 5.
[0036] [Parameter determination requirements] This embodiment is (i)p ij or p i This is carried out in two stages: (ii) determination of [ab] and (ii) selection of the parameter transfer route. The requirements for determining these parameters will be described in detail below.
[0037] ●(i)p ij or p i Decision [ab] Each router 30 (or the router function of each server 10) i has λ per unit time iSuppose that data is generated. In this embodiment, assume that the machine power of each server 10 is uniform, and the synchronization of the parameters of the machine learning model 20 is performed every time one epoch of learning ends on all servers 10. In this case, the time required for one epoch of learning depends on the amount of learning data held by each server 10. Also, since parameter synchronization is not performed until learning is completed on all servers 10, the parameter synchronization interval depends on the server 10 that takes the most time for one epoch of learning, that is, the server 10 with the most learning data. Therefore, in order to shorten the learning time, it is necessary to reduce the amount of learning data of the server 10 with the most learning data. Also, since the parameter transfer speed during learning in federated learning is affected by the usage status of the network bandwidth, (1) the bandwidth utilization rate of each link or (2) the remaining bandwidth of each link is also considered. In data transfer, (a) the case of using the shortest path and (b) the case of optimizing path selection can be considered. Below, (1), (2) and (a), (b) will be formulated. Hereinafter, (a) and (b) will be formulated respectively.
[0038] (a)(1) Considering the shortest path and bandwidth utilization rate In this case, since the transfer route from router i ∈ N to server j ∈ N S is uniquely determined, the parameter to be optimized is the transfer ratio p ij which is.
[0039] The equations to be satisfied at this time are as shown in (Equation 1) to (Equation 3) of FIG. 6.
[0040] Here, (Equation 1) is a constraint on the amount of data sent to each server 10, and (Equation 2) is a constraint on the bandwidth utilization ratio of each link. δ is a margin to prevent congestion when performing parameter transfer and is given in advance. (Equation 3) is a flow conservation condition. As for how to perform optimization, two patterns can be considered: minimizing r c after fixing r or minimizing r c after fixing r.
[0041] (a)(2) Considering the shortest path and remaining bandwidth The difference from case (1) is (Equation 2), which is modified as shown in (Equation 4) in Figure 7.
[0042] The optimization strategy is r c Minimize r while keeping r fixed, or fix r and then minimize r c There are two possible ways to maximize it.
[0043] (b)(1) Route selection and consideration of bandwidth utilization (b) In this case, the transfer ratio tensor p i [ab] is optimized. The inequalities that must be satisfied are shown in Figure 7 (Equations 5) to (9) and Figure 8 (Equations 10) to (12).
[0044] Here, (Equation 5) and (Equation 6) are inequalities that include optimization parameters similar to those in (a), (Equation 7) is a constraint that a server 10 disconnected from router 30 does not generate data, (Equation 7) is a constraint that all data sent to server 10 is processed by that server, and (Equation 9) is an assumption that a router with server functionality is connected to the server by an infinite bandwidth link. (Equations 10) to (Equations 12) are equations for generation, processing, and flow conservation at transit points, respectively. In this case, the processing is the same as in (a)(1), with r and r c Fix one side (one of the two) and minimize the other side (the other) p i [ab] optimize.
[0045] (b)(2) Route selection and consideration of remaining bandwidth (Equation 6) is modified as shown in (Equation 13) in Figure 8.
[0046] This process is also the same as in (a)(2), with r and r c Fix one side (one of the two) and minimize (or maximize) the other side (the other) so that p i [ab] optimize.
[0047] Since the above optimization problem can be reduced to a linear programming problem, it can be solved using existing solvers.
[0048] ●(ii) Parameter transfer route selection To maximize the learning speed, it is necessary to transfer the parameters of the machine learning model 20 as quickly as possible. Consider the case where all servers 10 transfer parameters to all servers other than their own server 10. Parameter transfer delay is considered as an optimization of path selection, and there are three possible approaches to calculating the transfer delay: (a) calculating the queuing delay from the effective bandwidth, (b) considering only the bottleneck links of the effective bandwidth, and (c) control based on maximum-minimum fairness for the effective bandwidth.
[0049] First, based on the data transfer method determined in (i), the amount of traffic v flowing through each link ab is... ab In the case of (a), it is expressed as (Equation 14) in Figure 9, and in the case of (b), it is expressed as (Equation 15).
[0050] (a) Determine the queuing delay from the effective bandwidth. Effective bandwidth of each link
[0051]
number
[0052] The delay when traffic flows through each link is the queuing delay T. ab and propagation delay d ab Let it be expressed as the sum of . Here, we assume that the amount of traffic due to parameter transfer is small and negligible compared to the amount of data transfer traffic. In this case, the queuing delay T ab This is expressed by (Equation 17) in Figure 9.
[0053] Propagation delay d ab This is a constant quantity given by factors such as the link length.
[0054] Therefore, the time T required to pass through link ab during parameter transfer. ab This is expressed by (Equation 18) in Figure 9.
[0055] Therefore, optimization is achieved by considering (Equation 18) as the cost of each link and solving the shortest path problem for each set of servers. Dijkstra's algorithm is used to find the exact solution, while approximation methods using genetic algorithms or reinforcement learning are used for large-scale networks.
[0056] (i) Consider only the bottleneck links of the effective bandwidth. In this case, the cost of each link is determined by referring to (Equation 16) in (a), and the path is selected such that the cost of the link with the highest cost among the set of links in the path is minimized.
[0057] This problem can be solved exactly using the Bellman-Ford method.
[0058] (c) Control based on maximum / minimum fairness for the effective bandwidth In communication control where different src-dst pairs may share a single link, the maximum-minimum-fairness principle (Reference 1) may be used.
[0059] <Reference 1>Marbach, Peter. "Priority service and max-min fairness." Proceedings. Twenty-First Annual Joint Conference of the IEEE Computer and Communications Societies. Vol. 1. IEEE, 2002. As one possible route selection method to maximize the balance between maximum and minimum fairness, consider the following: 1. All n ab Initialize it to 0. 2. Select one src-dst pair whose route has not yet been determined, and the effective bandwidth
[0060]
number
[0061]
number
[0062]
number
[0063] In this method, the path determined will differ depending on the order in which the source-destination pairs are selected. Therefore, one possible approach is to randomly change the order in which the pairs are selected, perform multiple tests, and select the path that maximizes the maximum, minimum, and fairness.
[0064] [Processing or operation of communication systems] Next, the processing or operation of the communication system 1 according to the embodiment will be described using Figures 3 and 4. Figures 3 and 4 are flowcharts showing the processing of the communication system.
[0065] S11: The calculation unit 16 of server 10a calculates the data transfer ratio p from each router 30 (including the transfer units 12a and 12b of each server 10) to each server 10, according to (i) above. ij , or the data transfer ratio p of data flowing in the direction of the transit link when data is transferred from each router 30 (including the transfer units 12a and 12b of each server 10) to each server 10 via the shortest path. i [ab] is calculated. In this case, the calculation unit 16 sends information of the calculation result, including the data transfer ratio corresponding to each server 10 (including server 10a) and each router 30.
[0066] S12: The forwarding unit 12a of server 10a forwards the first data acquired by the acquisition unit 11a based on the calculation results of the calculation unit 16, and the forwarding unit 12b of server 10b forwards the second data acquired by the acquisition unit 11b based on the calculation results of the calculation unit 16. At this time, each router 30 also forwards the respective data to servers 10a and 10b based on the respective calculation results obtained from the calculation unit 16.
[0067] S13: The machine learning unit 13a of server 10a uses the first data acquired by the acquisition unit 11a to train the machine learning model 20a, and the machine learning unit 13b of server 10b uses the second data acquired by the acquisition unit 11b to train the machine learning model 20b.
[0068] S14: The calculation unit 16 searches for a first path for the first model parameters (data) for machine learning by the machine learning unit 13a of server 10a, and a second path for the second model parameters (data) for machine learning by the machine learning unit 13b of server 10b, based on the calculation in (ii) above.
[0069] S15: The transfer unit 12a of server 10a transfers the first model parameters to server 10b based on the first path calculated by the calculation unit 16 every epoch, and the transfer unit 12b of server 10b transfers the second model parameters to the first server based on the second path calculated by the calculation unit 16 every epoch. If there are three or more servers 10, server 10a also transfers the first model parameters to all servers other than server 10b. Similarly, server 10b also transfers the second model parameters to all servers other than server 10a. And, in the same way, a predetermined server other than servers 10a and 10b also transfers its own model parameters to other servers (including servers 10a and 10b).
[0070] S16: The acquisition unit 11a of server 10a acquires the second model parameter, and the machine learning unit 13a integrates the first and second model parameters. Simultaneously, the acquisition unit 11b of server 10b acquires the first model parameter, and the machine learning unit 13b integrates the first and second model parameters.
[0071] S17: If you do not want to terminate the machine learning process (NO), return to S13 and the next epoch of machine learning will be performed. If you want to terminate the machine learning process (YES), proceed to S18.
[0072] S18: The inference unit 14a of server 10a performs inference for the first task using the trained machine learning model 20a, and the inference unit 14b of server 10b performs inference for the second task using the trained machine learning model 20ba.
[0073] [Effects of the Embodiment] As described above, the communication system 1 of this embodiment can transfer data in a way that minimizes the machine learning time for federated learning by formulating which location the data generated on the network should be transferred to. Specifically, by selecting the server 10 to which the data will be transferred from the router 30 and the transfer route, and by selecting the transfer route for the machine learning model parameters of each server 10, it becomes possible to achieve optimal distributed processing learning that leads to a reduction in training time. As a result, the training time of the machine learning models 20a and 20b can be reduced, and inference with deep learning models that take more recent conditions into account becomes possible.
[0074] 〔supplement〕 As described above, the present invention is not limited to the embodiments described above, and various modifications and applications are possible, for example, as shown below.
[0075] (1) Each transfer device can be implemented using a computer and a program, and this program can be recorded on a (non-temporary) recording medium or provided via a communication network such as the Internet.
[0076] (2) The CPU 101 may be a single unit or multiple units. [Explanation of Symbols]
[0077] 1. Communication System 10, 10a, 10b Server (Example of a transfer device) 11a Acquisition section (an example of the first acquisition section) 11b Acquisition section (an example of the second acquisition section) 31a,31b,31c,31d Acquisition part 12a Transfer section (an example of the first transfer section) 12b Transfer section (an example of a second transfer section) 32a, 32b, 32c, 32d Transfer section 13a Machine Learning Department (An example of the first Machine Learning Department) 13b Machine Learning Department (An example of a second Machine Learning Department) 14a Inference Unit (An example of the first inference unit) 14b Inference Unit (An example of a second inference unit) 15a,15b Database 16 Calculation section 20a Machine Learning Model (An Example of a First Machine Learning Model) 20b Machine Learning Models (An Example of a Second Machine Learning Model) 30a, 30b, 30c, 30d Router (an example of a forwarding device)
Claims
1. A communication system that performs distributed processing learning using a network constructed by a first server having a first acquisition unit, a first transfer unit, a first machine learning unit, and a first machine learning model, a second server having a second acquisition unit, a second transfer unit, a second machine learning unit, and a second machine learning model, and a computing unit, The calculation unit calculates a first data transfer ratio from the first transfer unit to the second server, and a second data transfer ratio from the second transfer unit to the first server. The first transfer unit transfers the first data acquired by the first acquisition unit based on the calculation results of the calculation unit, and the second transfer unit transfers the second data acquired by the second acquisition unit based on the calculation results of the calculation unit. The first machine learning unit trains the first machine learning model using the first data acquired by the first acquisition unit, and the second machine learning unit trains the second machine learning model using the second data acquired by the second acquisition unit. The calculation unit searches for a first path for the first model parameters for machine learning by the first machine learning unit, and a second path for the second model parameters for machine learning by the second machine learning unit, The first transfer unit transfers the first model parameters to the second server based on a first path calculated by the calculation unit for each epoch, and the second transfer unit transfers the second model parameters to the first server based on a second path calculated by the calculation unit for each epoch. The first acquisition unit acquires the second model parameters, and the first machine learning unit integrates the first and second model parameters, and the second acquisition unit acquires the first model parameters, and the second machine learning unit integrates the first and second model parameters. A communication system characterized by the following features.
2. The communication system according to claim 1, characterized in that the calculation unit calculates, instead of calculating the first transfer ratio, the ratio of the amount of data flowing in the direction of the transit link when data is transferred from the first transfer unit to the second server via the shortest path, and, instead of calculating the second transfer ratio, calculates the ratio of the amount of data flowing in the direction of the transit link when data is transferred from the second transfer unit to the first server via the shortest path.
3. The communication system according to claim 1 or 2, characterized in that the first server has the calculation unit.
4. A communication system according to claim 1 or 2, comprising a plurality of routers, The calculation unit calculates the transfer ratio of each data from each of the plurality of routers to the first server or the second server. Each of the aforementioned routers forwards the acquired data based on the calculation results performed by the calculation unit. A communication system characterized by the following features.
5. A distributed processing learning method executed by a communication system that performs distributed processing learning using a network constructed by a first server having a first acquisition unit, a first transfer unit, a first machine learning unit, and a first machine learning model, a second server having a second acquisition unit, a second transfer unit, a second machine learning unit, and a second machine learning model, and a computation unit, The calculation unit calculates a first data transfer ratio from the first transfer unit to the second server, and a second data transfer ratio from the second transfer unit to the first server. The first transfer unit transfers the first data acquired by the first acquisition unit based on the calculation results of the calculation unit, and the second transfer unit transfers the second data acquired by the second acquisition unit based on the calculation results of the calculation unit. The first machine learning unit trains the first machine learning model using the first data acquired by the first acquisition unit, and the second machine learning unit trains the second machine learning model using the second data acquired by the second acquisition unit. The calculation unit searches for a first path for the first model parameters for machine learning by the first machine learning unit, and a second path for the second model parameters for machine learning by the second machine learning unit, The first transfer unit transfers the first model parameters to the second server based on a first path calculated by the calculation unit for each epoch, and the second transfer unit transfers the second model parameters to the first server based on a second path calculated by the calculation unit for each epoch. The first acquisition unit acquires the second model parameters, and the first machine learning unit integrates the first and second model parameters, and the second acquisition unit acquires the first model parameters, and the second machine learning unit integrates the first and second model parameters. A distributed learning method characterized by the following:
6. The distributed processing learning method according to claim 5, characterized in that the calculation unit calculates, instead of calculating the first transfer ratio, the ratio of the amount of data flowing in the direction of the transit link when data is transferred from the first transfer unit to the second server via the shortest path, and, instead of calculating the second transfer ratio, calculates the ratio of the amount of data flowing in the direction of the transit link when data is transferred from the second transfer unit to the first server via the shortest path.
Citation Information
Patent Citations
Control device, data processing method and program
JP2019148876A
Server device, method and program
JP2022037311A