Calculation device, associative learning system, calculation method, associative learning method, and program
By optimizing data transfer routes in federated learning systems, the method addresses dataset variation issues, resulting in faster and more accurate deep learning model training across distributed devices.
Patent Information
- Application Number
- JP2023104113
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2025-01-15
AI Technical Summary
Federated learning faces challenges in achieving high accuracy due to variations in dataset characteristics among devices, leading to inconsistent model convergence.
Optimizing the transfer route of learning data by minimizing the sum of inter-dataset distances and adjusting the flow ratio through network links using a computing device that includes an optimization unit and router units to manage data distribution.
This approach enables the creation of highly accurate deep learning models by optimizing data transfer paths, reducing learning time and enhancing model accuracy.
Smart Images

Figure 2025004427000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a computing device, a federated learning system, a computing method, a federated learning method, and a program. [Background technology]
[0002] In recent years, a method called federated learning has been proposed as a method for learning a distributed deep learning model (for example, Non-Patent Document 1). In federated learning, common model parameters are distributed to devices capable of learning a deep learning model, and each device learns individually using only its own learning data, while periodically synchronizing the model parameters learned by each device to progress the learning. [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. Summary of the Invention [Problem to be solved by the invention]
[0004] However, federated learning has the problem that its convergence varies depending on the characteristics of the dataset held by the device that trains the deep learning model, and it may not be possible to obtain a deep learning model with high accuracy.
[0005] The present disclosure has been made in consideration of the above points, and provides a technology that can obtain a highly accurate deep learning model through federated learning. [Means for solving the problem]
[0006] A computing device according to one aspect of the present disclosure is a computing device that optimizes a transfer path of learning data for learning a deep learning model through federated learning, and includes a receiving unit that receives statistical information of data generated by each router included in a target network, and an optimization unit that uses the statistical information to optimize a parameter representing the ratio of data from the router flowing in a specific direction through links that constitute the target network so as to minimize the ratio of the amount of data held by a server that learns the deep learning model and the sum, for the server, of the product of the inter-dataset distances between the dataset held by the server and a dataset that virtually combines all data into one. Effect of the Invention
[0007] A technology is provided that can obtain a highly accurate deep learning model through federated learning. [Brief description of the drawings]
[0008] [Figure 1] FIG. 2 is a diagram illustrating an example of a configuration of a target network. [Diagram 2] FIG. 2 is a diagram illustrating an example of a hardware configuration of a device according to the present embodiment. [Diagram 3] FIG. 2 is a diagram illustrating an example of a functional configuration of a calculation function unit according to the present embodiment. [Figure 4] FIG. 2 is a diagram illustrating an example of a functional configuration of a router function unit according to the present embodiment. [Diagram 5] FIG. 2 is a diagram illustrating an example of a functional configuration of a server function unit according to the embodiment. [Figure 6] 13 is a flowchart illustrating an example of a parameter determination process. [Figure 7] 1 is a flowchart illustrating an example of a learning process of a deep learning model. [Figure 8] 1 is a flowchart showing an example of an inference process using a deep learning model. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, one embodiment of the present invention will be described.
[0010] <Target network> In the following embodiment, as an example, a network 1 (hereinafter also referred to as a target network 1) shown in Fig. 1 is taken as a target. The target network 1 shown in Fig. 1 includes a plurality of devices 10. The devices 10 are, for example, various computers or computer systems such as a general-purpose server or a network device.
[0011] One of the devices 10 has a calculation function unit 110 that solves an optimization problem described below and determines optimal parameters. The remaining devices 10 have a router function unit 120 that collects and transfers data. Some of the devices 10 that have the router function unit 120 also have a server function unit 130 that manages a data set for learning a deep learning model and performs learning, inference, etc. of the deep learning model.
[0012] Hereinafter, it is assumed that each router function unit 120 is given a number in sequence starting from 1, and the i-th router function unit 120 will also be referred to as the "router i." Similarly, it is assumed that each server function unit 130 is given a number in sequence starting from 1, and the j-th server function unit 130 will also be referred to as the "server j."
[0013] Furthermore, when considering the target network 1 as a graph, each router function unit 120 and each server function unit 130 is considered as a node, and a physical or logical communication path connecting the nodes is considered as a link. However, for simplicity, in the following, the bandwidth of the link connecting the router function unit 120 and the server function unit 130 in the same device 10 is considered to be infinite (or the maximum value that can be taken in implementation).
[0014] The device 10 having the computing function unit 110 does not necessarily need to be located within the target network 1, and may be located outside the target network 1, for example. Also, for example, the computing function unit 110 may be included in any one of the devices 10 having the server function unit 130.
[0015] <Formulation of optimization problem> Below, we will explain a formulation for minimizing the time required to learn a deep learning model and obtaining a highly accurate deep learning model when performing federated learning in each server function unit 130.
[0016] <Definition of symbols> First, the symbols used hereinafter will be defined.
[0017] λ ij (y): The amount of data with label y generated by router i out of the amount of data collected per unit time by server j (Mbps) λ i (y): The amount of data with label y generated per unit time at router i (Mbps) λ j (y): The amount of data with label y received by server j per unit time (Mbps) λ(y)=Σ i λ i (y): Amount of data labeled y generated per unit time in the entire target network 1 (Mbps) ·c ab : The link bandwidth (Mbps) for traffic flowing from a to b between adjacent routers a and b (hereafter, the bandwidth vector is defined as C={c ab}) R=r i [ab]∈P: The rate at which data from router i flows from a to b on link ab (data rate) · L: A collection of links N a : A set of nodes directly connected to node a N: A set of router function units 120 N S : A set of server function units 130 However, when considering all labels, λ ij (y), λ i (y), λ j (y), λ(y) and λij , λ i , λ j , denoted as λ.
[0018] Note that a label is a value used as training data when learning a deep learning model, such as a binary label that indicates whether the data belongs to a certain class or not. P is the data ratio r i The set of all [ab]. Data ratio r i Since [ab] is the parameter to be optimized, r i [ab] will also be called a parameter.
[0019] ≪Parameter determination method≫ Below, the optimal parameter r i We will explain how to determine [ab]. i By optimizing [ab], the data transfer path from each router i to each server j is optimized, which results in minimizing the time required to train a deep learning model and obtaining a highly accurate deep learning model.
[0020] According to references 1 and 2, the final model parameter vector w f and the model parameter vector w when the deep learning model is trained in one place. c The difference between is expressed by the following formula (1).
[0021]
number
[0022] The first is (i) the distance between the number of data of each label held by each server j and the number of data of each label per server when all data is distributed to each server j on average, which is called the inter-dataset distance ||D j Let || (Reference 2).
[0023] The second is (ii) the approximation of the Kullback-Leibler divergence (KL-div) for each label between the data distribution of the dataset held by each server j and the data distribution of all the data collected virtually under the assumption that the data of each label follows a Gaussian distribution, which is the inter-dataset distance ||D j Let's say ||.
[0024] First, the distance between the data sets ||D j The case where || is defined as (i) will be described. In this case, formula (1) is expressed as formula (2) below.
[0025]
number
[0026] Next, the distance between the data sets ||D j Let us consider the case where || is defined as (ii). The average μ i (y) and variance Σ i After calculating (y), we assume a Gaussian distribution based on these. The data collected on server j is represented by a mixed normal distribution. Specifically, it is expressed by the following equation (3).
[0027]
number
[0028] On the other hand, if we assume that all data is collected on one server, the mixed normal distribution is expressed by the following equation (4).
[0029]
number
[0030] In this case, the data set distance ||D j || is calculated using the KL-div between the mixed normal distribution shown in formula (3) and the mixed normal distribution shown in formula (4). However, since the KL-div between mixed normal distributions cannot be calculated analytically, a variational approximation is used. According to Reference 3, the result of the variational approximation of the KL-div between the mixed normal distribution shown in formula (3) and the mixed normal distribution shown in formula (4) is expressed by the following formula (5).
[0031]
number
[0032] Based on the above, equation (1) can be rewritten as equation (6) below.
[0033]
number
[0034]
number
[0035]
number
[0036]
number
[0037] The constrained optimization problem shown in the above formulas (8) to (15) becomes a linear programming problem when formula (2) is adopted, and a nonlinear programming problem when formula (9) is adopted, so it can be solved by using a solver suitable for each. i After [ab] is determined, each router i sets these parameters r i Distribute the data you generate to each server j according to [ab].
[0038] <Example of hardware configuration for device 10> An example of the hardware configuration of device 10 according to this embodiment is shown in Fig. 2. As shown in Fig. 2, device 10 according to this embodiment has an input device 201, a display device 202, an external I / F 203, a communication I / F 204, a RAM (Random Access Memory) 205, a ROM (Read Only Memory) 206, an auxiliary storage device 207, and a processor 208. Each of these pieces of hardware is connected to each other via a bus 209 so as to be able to communicate with each other.
[0039] The input device 201 is, for example, a keyboard, a mouse, a touch panel, a physical button, etc. The display device 202 is, for example, a display, a display panel, etc. Note that the device 10 does not necessarily have to have at least one of the input device 201 and the display device 202, for example.
[0040] The external I / F 203 is an interface with an external device such as a recording medium 203a. Examples of the recording medium 203a include a CD (Compact Disc), a DVD (Digital Versatile Disk), an SD memory card (Secure Digital memory card), and a USB (Universal Serial Bus) memory card.
[0041] The communication I / F 204 is an interface for the device 10 to transmit and receive data to and from other devices 10. The RAM 205 is a volatile semiconductor memory (storage device) that temporarily stores programs and data. The ROM 206 is a non-volatile semiconductor memory (storage device) that can store programs and data even when the power is turned off. The auxiliary storage device 207 is a non-volatile storage device such as a hard disk drive (HDD), a solid state drive (SSD), or a flash memory. The processor 208 is various types of arithmetic devices such as a central processing unit (CPU).
[0042] 2 is merely an example, and the hardware configuration of the device 10 is not limited thereto. The device 10 may have, for example, multiple auxiliary storage devices 207 and multiple processors 208, may not have some of the hardware shown in the figure, or may have various hardware other than the hardware shown in the figure.
[0043] <Example of Functional Configuration of the Calculation Function Unit 110, the Router Function Unit 120, and the Server Function Unit 130> An example of the functional configuration of the calculation function unit 110, the router function unit 120, and the server function unit 130 will be described below.
[0044] ≪Calculation function section 110≫ An example of the functional configuration of the calculation function unit 110 according to this embodiment is shown in Fig. 3. As shown in Fig. 3, the calculation function unit 110 according to this embodiment includes an optimization unit 111 and a transmission unit 112. Note that the calculation function unit 110 is realized, for example, by a process in which one or more programs installed in the device 10 are executed by the processor 208 or the like.
[0045] The optimization unit 111 optimizes the information received from each router i (the amount of data generated for each label, λ i (y), the distance between the data sets ||D j If || is defined as (ii), then the average μ i (y) and variance Σ i(y)) to solve the constrained optimization problem shown in Eqs. (8) to (15) to obtain the optimal parameter r i Determine [ab].
[0046] The transmission unit 112 transmits the optimal parameter r determined by the optimization unit 111. i Send [ab] to each router i.
[0047] <Router function unit 120> An example of the functional configuration of the router function unit 120 according to this embodiment is shown in Fig. 4. As shown in Fig. 4, the router function unit 120 according to this embodiment includes a collection unit 121, a transfer unit 122, and a statistics unit 123. Note that the router function unit 120 is realized, for example, by a process in which one or more programs installed in the device 10 are executed by the processor 208 or the like.
[0048] The collection unit 121 collects and generates data from a predetermined target (for example, a memory, a CPU, etc.). In addition, the collection unit 121 assigns labels to the data before learning of a deep learning model. Note that the labels may be assigned manually, for example.
[0049] The transfer unit 122 transfers (sends) the data collected and generated by the collection unit 121 to the corresponding server j. At this time, if a label is attached to the data, the transfer unit 122 also transfers (sends) the label together with the data. In addition, the transfer unit 122 transfers (sends) statistical information calculated by the statistics unit 123 to the calculation function unit 110.
[0050] The statistical unit 123 calculates statistical information on the data collected and generated by the collection unit 121. The statistical unit 123 calculates the amount of data generated for each label, λ i (y), the distance between the data sets ||D j If || is defined as (ii), then the average μ i (y) and variance Σ i (y) is calculated as statistical information.
[0051] <Server function unit 130> An example of the functional configuration of the server function unit 130 according to this embodiment is shown in Fig. 5. As shown in Fig. 5, the server function unit 130 according to this embodiment includes a database management unit 131, a learning unit 132, and an inference unit 133. Note that the server function unit 130 is realized, for example, by a process in which one or more programs installed in the device 10 are executed by the processor 208 or the like.
[0052] The database management unit 131 stores the data and its label transferred from each router i in a database as learning data. The database is realized by a storage area such as the auxiliary storage device 207 of the device 10 having the server function unit 130.
[0053] The learning unit 132 learns (trains) a deep learning model through associative learning using a data set of learning data stored in a database.
[0054] The inference unit 133 performs inference on the data transferred from each router i using the trained deep learning model.
[0055] <Processing details> Below, the optimal parameter r i We will explain the process of determining [ab], the process of learning a deep learning model through federated learning, and the inference process using a trained deep learning model.
[0056] <Parameter determination process> Optimal parameter r i The process of determining [ab] will be described with reference to FIG.
[0057] The statistics unit 123 of each router function unit 120 calculates statistical information (step S101). At this time, the data set distance ||D j When || is defined as (i), the statistical unit 123 calculates the amount of data generated for each label, λ i (y) is calculated as statistical information. On the other hand, the distance between the data sets ||D jWhen || is defined as (ii), the statistical unit 123 calculates the amount of data generated for each label, λ i (y) and the average μ i (y) and variance Σ i (y) is calculated as statistical information.
[0058] Next, the transfer unit 122 of each router function unit 120 transfers (sends) the statistical information calculated in the above step S101 to the calculation function unit 110 (step S102).
[0059] Next, the optimization unit 111 of the calculation function unit 110 uses the statistical information received from each router function unit 120 to solve the conditional optimization problem shown in equations (8) to (15) by an existing solver to obtain the optimal parameter r i [ab] is calculated (step S103).
[0060] Then, the transmission unit 112 of the calculation function unit 110 transmits the optimal parameter r i [ab] is transmitted to each router function unit 120 (step S104).
[0061] <Learning process of deep learning model> The process of learning a deep learning model by federated learning will be described with reference to FIG.
[0062] The forwarding unit 122 of each router function unit 120 receives the optimal parameter r i According to [ab], the data and its label collected and generated by the collection unit 121 are distributed to the server function unit 130 (step S201). i The collected and generated data and its label are transferred (transmitted) to the server function unit 130 so as to satisfy [ab].
[0063] The database management unit 131 of each server function unit 130 stores the data and its label received from the router function unit 120 in a database as learning data (step S202). This results in a data set consisting of learning data for the deep learning model.
[0064] Then, the learning unit 132 of each server function unit 130 learns (trains) a deep learning model by federated learning using the data set obtained in step S202 (step S203). As a result, a trained deep learning model is obtained.
[0065] <Inference processing using deep learning models> The inference process using the trained deep learning model will be described with reference to Figure 8.
[0066] The transfer unit 122 of each router function unit 120 transfers (sends) the data collected and generated by the collection unit 121 to the server function unit 130 (step S301).
[0067] The inference unit 133 of each server function unit 130 performs inference with the trained deep learning model using the data received from the router function unit 120 (step S302). This allows, for example, anomaly detection, operational support, etc. to be realized according to the task to which the deep learning model belongs.
[0068] <Summary> As described above, in this embodiment, when transmitting learning data for learning a deep learning model by federated learning to each server function unit 130, a parameter r, which represents the ratio of data flowing from router i to link ab in the direction from a to b in the target network 1, is used. i [ab] can be optimized. This improves the convergence when learning a deep learning model in each server functional unit 130 by federated learning, thereby minimizing the time required to learn a deep learning model and acquiring a deep learning model with high accuracy.
[0069] The present invention is not limited to the above-described embodiments specifically disclosed, and various modifications, changes, combinations with known technologies, etc. are possible without departing from the scope of the claims.
[0070] [References] Reference 1: Y. Zhao et al.,"Federated learning with Non-IID Data"arXiv:1806.00582. Reference 2: AA Adbellatif et al., "Communication-efficient hierarchical federated learning for IoT heterogeneous systems with imbalanced data" Feture Ceneration Computer Systems 128 (2022). Reference 3: JR Hershey et al., "Approximating the Kullback Leibler Divergence between Gaussian Mixture Models" ICASSP 2007. [Explanation of symbols]
[0071] 1 Target network 10 equipment 110 Calculation function section 111 Optimization Department 112 Transmitter 120 Router function unit 121 Collection Department 122 Transfer Department 123 Statistics Department 130 Server Function Unit 131 Database Management Department 132 Learning Department 133 Reasoning part 201 Input Device 202 Display device 203 External I / F 203a Recording media 204 Communication I / F 205 RAM 206 ROM 207 Auxiliary storage 208 processors 209 Bus
Claims
1. A computing device that optimizes a transfer path of learning data for learning a deep learning model by federated learning, A receiver for receiving statistical information of data generated by each router included in the target network; an optimization unit that optimizes a parameter representing a ratio of data from the router flowing in a specific direction through links constituting the target network, so as to minimize a ratio of the amount of data held by a server that learns the deep learning model and a sum, for the server, of a product of a data set held by the server and a data set that virtually aggregates all data into one; A computing device having:
2. The distance between the data sets is An approximation of the Kullback-Leibler divergence for each label between the data distribution of the dataset held by the server and the data distribution when all data is virtually combined into one, under the assumption that the data follows a Gaussian distribution for each label assigned to the data; The statistical information is The computing device according to claim 1 , wherein the generated amount of the data for each label at the router, and the average and variance of the data for each label at the router.
3. The optimization unit is Approximating, by variational approximation, the Kullback-Leibler divergence for each label between a mixed normal distribution representing the data distribution of the data set held by the server and a mixed normal distribution representing the data distribution when all data is virtually combined into one; The computing device of claim 2 , wherein the parameters are optimized to minimize a sum, for the server, of a product of a ratio of an amount of data held by a server that trains the deep learning model and an approximation of the Kullback-Leibler divergence for each label.
4. The optimization unit is The computing device of claim 3 , further comprising: optimizing the parameters under a constraint representing a congestion avoidance requirement in the target network and a constraint representing a flow rate maintenance requirement in the target network.
5. A federated learning system including a router that generates learning data for learning a deep learning model by federated learning, a server that uses the learning data to learn the deep learning model by the federated learning, and a computing device that optimizes a transfer path of the learning data, The router A statistics unit for calculating statistical information of the learning data, The computing device comprises: an optimization unit that optimizes a parameter representing a ratio of the amount of learning data held by the server and a product of a data set distance between a data set held by the server and a data set in which all learning data is virtually combined into one, using the statistical information, so as to minimize the sum, for the server, of the product of the data set distance between the data set held by the server and a data set in which all learning data is virtually combined into one, The server, A federated learning system having a learning unit that learns the deep learning model using learning data transferred from the router according to the optimized parameters.
6. A computing device that optimizes a transfer path of learning data for learning a deep learning model by federated learning, A receiving procedure for receiving statistical information of data generated by each router included in the target network; an optimization procedure that optimizes a parameter representing a ratio of data from the router flowing in a specific direction through links constituting the target network, so as to minimize a ratio of the amount of data held by a server that learns the deep learning model and a sum, for the server, of a product of a data set held by the server and a data set that virtually aggregates all data into one; A calculation method to perform.
7. A federated learning method in a federated learning system including a router that generates training data for training a deep learning model by federated learning, a server that uses the training data to train the deep learning model by the federated learning, and a computing device that optimizes a transfer path of the training data, The router: Executing a statistical procedure for calculating statistical information of the training data; The computing device, using the statistical information, an optimization procedure is executed to optimize a parameter representing a ratio of the amount of learning data held by the server and a product of a data set distance between a data set held by the server and a data set in which all learning data is virtually combined into one, for the server; The server, A federated learning method that executes a learning procedure to learn the deep learning model using learning data transferred from the router according to the optimized parameters.
8. A program for causing a computer to function as the computing device according to claim 1, or as a router, computing device or server included in the federated learning system according to claim 5.