WO2019239821A1 - 分散処理システムおよび分散処理方法 - Google Patents

分散処理システムおよび分散処理方法 Download PDF

Info

Publication number
WO2019239821A1
WO2019239821A1 PCT/JP2019/020107 JP2019020107W WO2019239821A1 WO 2019239821 A1 WO2019239821 A1 WO 2019239821A1 JP 2019020107 W JP2019020107 W JP 2019020107W WO 2019239821 A1 WO2019239821 A1 WO 2019239821A1
Authority
WO
WIPO (PCT)
Prior art keywords
distributed
data
processing node
aggregation
node
Prior art date
Application number
PCT/JP2019/020107
Other languages
English (en)
French (fr)
Inventor
伊藤 猛
健治 川合
順一 加藤
フィクー ゴー
勇輝 有川
坂本 健
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to US16/973,707 priority Critical patent/US11823063B2/en
Publication of WO2019239821A1 publication Critical patent/WO2019239821A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/098Distributed learning, e.g. federated learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/41Flow control; Congestion control by acting on aggregated flows or links

Definitions

  • the present invention relates to a distributed processing system and a distributed processing method for learning a neural network by linking an aggregation processing node and a plurality of distributed processing nodes.
  • Deep learning improves the inference accuracy of the learning target consisting of multiple neuron models by updating the weight of each neuron model (the coefficient by which the value output from the previous neuron model is multiplied) based on the input sample data. To do.
  • the mini-batch method is used as a method for improving the inference accuracy.
  • a gradient calculation process for calculating a gradient for the weight for each sample data a totalization process for totaling the gradients for a plurality of different sample data (summing the gradients obtained for each sample data by weight), A weight update process for updating each weight based on the aggregated gradient is repeated.
  • a distributed processing method is used to speed up the gradient calculation process. Specifically, a plurality of distributed processing nodes are provided, and each node performs gradient calculation processing on different sample data. As a result, the number of sample data that can be processed per unit time can be increased in proportion to the number of nodes, so that the gradient calculation process can be speeded up (see Non-Patent Document 1).
  • communication obtained for each distributed processing node from each distributed processing node to the aggregation processing node to aggregate the data (distributed data) to the aggregation processing node ( (Aggregate communication), all node aggregation processing in the aggregation processing node, and communication (distribution) from the aggregation processing node to the distributed processing node to transfer the data (aggregated data) aggregated by the aggregation processing node to each distributed processing node Communication).
  • FIG. 15 shows a sequence of distributed processing for deep learning according to the prior art.
  • the period II such transmission from each node is performed, but each node does not always transmit distributed data at the same time.
  • the aggregation processing node 101 performs all node aggregation processing for adding the gradients obtained from the respective nodes by weight, and transmits the aggregation data to each distributed processing node 100 [n] in the period IV.
  • each distributed processing node 100 [n] performs weight update processing.
  • Such a processing time is not necessary in a system in which deep learning is performed by a single node, and is a factor that decreases the processing speed when performing distributed learning of deep learning.
  • deep learning has been applied to more complex problems, and the total number of weights tends to increase. For this reason, the amount of distributed data and aggregate data increases, and the aggregate communication time and distributed communication time increase. Further, the data processing load at the aggregation processing node and the distributed processing node is increased due to the increase in the aggregation communication time and the distribution communication time.
  • FIG. 16 shows the relationship between the number of distributed processing nodes and the processing performance of deep learning in a conventional distributed processing system
  • 200 shows the ideal relationship between the number of distributed processing nodes and the processing performance (performance ⁇ number of nodes).
  • 201 indicates the actual relationship between the number of distributed processing nodes and processing performance.
  • the present invention has been made in view of the above circumstances, and its purpose is to improve the learning efficiency of a neural network in a distributed processing system including an aggregation processing node and a plurality of distributed processing nodes, It is another object of the present invention to provide a distributed processing system and a distributed processing method that can reduce the processing load on a node and operate efficiently and stably.
  • the distributed processing system of the present invention includes an aggregation processing node and N (N is an integer of 2 or more) distributed processing nodes, and each distributed processing node includes M (N is 2 or more) neural networks to be learned.
  • N is an integer of 2 or more) distributed processing nodes
  • M N is 2 or more) neural networks to be learned.
  • Packets are sequentially packetized and transmitted to the aggregation processing node, packets transmitted from the aggregation processing node are received, and aggregation data R [m] is acquired in the order of number m, and the aggregation data R [m] is obtained.
  • the weight w [m] of the neural network is updated, and the aggregation processing node receives the packets transmitted from the respective distributed processing nodes and acquires the distributed data D [m, n] in the order of the number m.
  • Distributed data D [m, n] of all distributed processing nodes The aggregated data R [m] aggregated every w [m] is generated, and the aggregated data R [m] is packetized in the order of number m and transmitted to each distributed processing node.
  • the distributed data D [m, n] In the period from the start of transmission of the distributed data D [m, n] to the aggregation processing node until the completion of acquisition of the M aggregation data R [m], the distributed data D [m, n] that has already been transmitted
  • the amount of unreceived data which is the difference between the amount of data and the amount of acquired total data R [m] is monitored, and when the amount of unreceived data exceeds a threshold value Ma, the distributed data D [m , N] is stopped until the unreceived data amount becomes equal to or less than a threshold value Mb (Mb ⁇ Ma).
  • each distributed processing node packetizes the distributed data D [m, n] in the order of number m and transmits the packet to the aggregation processing node;
  • a receiving unit that receives packets transmitted from the aggregation processing node and acquires the aggregation data R [m] in the order of the number m, and a weight w [m] of the neural network based on the aggregation data R [m].
  • a weight update processing unit that updates the data, and has been transmitted in a period from the start of transmission of the distributed data D [m, n] to the aggregation processing node until acquisition of the M aggregation data R [m] is completed.
  • the transmission unit transmits the distributed data D [m, n].
  • a transmission control unit that stops until the amount of unreceived data becomes equal to or less than the threshold value Mb (Mb is a positive integer smaller than Ma).
  • the aggregation processing node receives packets transmitted from each distributed processing node and acquires the distributed data D [m, n] in the order of number m.
  • a receiving unit a totaling processing unit for generating the totaling data R [m] obtained by totaling the distributed data D [m, n] of all distributed processing nodes for each weight w [m], and the totaling data R [m]
  • a transmission unit that packetizes in the order of the number m and transmits the packet to each distributed processing node.
  • each distributed processing node receives the sample data for learning of the neural network and inputs the weight w [m] of the neural network.
  • a gradient calculation processing unit that calculates the gradient of the loss function of the neural network for each sample data, and generates the variance data D [m, n], which is a numerical value obtained by collecting the gradients for each sample data, for each weight w [m].
  • an intra-node aggregation processing unit to be held.
  • the aggregation processing node and each distributed processing node transmit distributed data D [m, n] packetized by each distributed processing node to the aggregation processing node.
  • each of N (N is an integer of 2 or more) distributed processing nodes is a weight w [m] of M (M is an integer of 2 or more) M neural networks to be learned.
  • a second step in which the aggregation processing node receives the packets transmitted from the respective distributed processing nodes and acquires the distributed data D [m, n] in the order of the number m.
  • each of the distributed processing nodes updates the weight w [m] of the neural network based on the aggregated data R [m], and each of the distributed processing nodes includes the aggregate process Data amount of distributed data D [m, n] that has been transmitted in a period from the start of transmission of the distributed data D [m, n] to the node until the completion of acquisition of M aggregated data R [m]
  • the amount of unreceived data which is the difference between the amount of data and the acquired total
  • each of the distributed processing nodes when each of the distributed processing nodes receives sample data for learning of the neural network before the first step, the neural network For each of the weights w [m], an eighth step of calculating a gradient of the loss function of the neural network for each sample data, and each of the distributed processing nodes is a numerical value obtained by aggregating the gradient for each sample data. And a ninth step of generating and holding the distributed data D [m, n] for each weight w [m].
  • one configuration example of the distributed processing method of the present invention includes the first step of the distributed processing node, the second step of the aggregation processing node, the third step of the aggregation processing node, The fourth step of the aggregation processing node, the fifth step of the distributed processing node, and the sixth step of the distributed processing node are performed in parallel for different numbers m, respectively. It is.
  • each distributed processing node sequentially packetizes distributed data for each weight of the neural network and transmits the packet to the aggregation processing node.
  • the aggregation data stored in the packet transmitted from the aggregation processing node is sequentially transmitted.
  • the aggregation processing node sequentially obtains the distributed data stored in the packets transmitted from each distributed processing node, and aggregated data that aggregates the distributed data of all the distributed processing nodes.
  • each distributed processing node monitors an unreceived data amount that is the difference between the data amount of transmitted distributed data and the acquired data amount of aggregated data, and this unreceived data amount is a threshold value Ma.
  • the transmission of the distributed data is stopped until the amount of unreceived data becomes equal to or less than the threshold value Mb, thereby suppressing the transient distributed data concentration on the aggregation processing node, thereby making the transition to the aggregation processing node transient. Therefore, the learning efficiency and stability of the neural network can be improved.
  • FIG. 1 is a block diagram showing a configuration example of a distributed learning processing system for deep learning according to a first embodiment of the present invention.
  • FIG. 2 is a block diagram showing a configuration example of a distributed processing node in the distributed processing system for deep learning according to the first embodiment of the present invention.
  • FIG. 3 is a flowchart for explaining sample data input processing, gradient calculation processing, and intra-node aggregation processing of the distributed processing node according to the first embodiment of the present invention.
  • FIG. 4 is a flowchart for explaining the aggregated communication processing of the distributed processing node according to the first embodiment of the present invention.
  • FIG. 5 is a flowchart for explaining the aggregate communication processing of the aggregation processing node according to the first embodiment of the present invention.
  • FIG. 1 is a block diagram showing a configuration example of a distributed learning processing system for deep learning according to a first embodiment of the present invention.
  • FIG. 2 is a block diagram showing a configuration example of a distributed processing node in the distributed
  • FIG. 6 is a flowchart for explaining the total node aggregation processing of the aggregation processing node according to the first embodiment of the present invention.
  • FIG. 7 is a flowchart for explaining the distributed communication processing of the aggregation processing node according to the first embodiment of the present invention.
  • FIG. 8 is a flowchart for explaining distributed communication processing of the distributed processing node according to the first embodiment of the present invention.
  • FIG. 9 is a diagram showing the transition of the unreceived data amount of the distributed processing node according to the first example of the present invention.
  • FIG. 10 is a flowchart for explaining the operation of the transmission control unit of the distributed processing node according to the first embodiment of the present invention.
  • FIG. 10 is a flowchart for explaining the operation of the transmission control unit of the distributed processing node according to the first embodiment of the present invention.
  • FIG. 11 is a flowchart illustrating the weight update process of the distributed processing node according to the first embodiment of the present invention.
  • FIG. 12 is a diagram showing a processing sequence of the aggregation processing node and the distributed processing node according to the first example of the present invention.
  • FIG. 13 is a diagram for explaining the effect of the transmission control of the distributed processing node in the first exemplary embodiment of the present invention.
  • FIG. 14 is a block diagram illustrating a configuration example of the aggregation processing node according to the second exemplary embodiment of the present invention.
  • FIG. 15 is a diagram illustrating a sequence of a conventional deep learning distributed processing.
  • FIG. 16 is a diagram showing the relationship between the number of distributed processing nodes and the processing performance of deep learning in a conventional distributed processing system.
  • FIG. 1 is a block diagram showing a configuration example of a deep learning distributed processing system according to a first embodiment of the present invention.
  • Each distributed processing node 2 [n] is connected to the aggregation processing node 1 by a network 3 capable of bidirectional communication.
  • the “node” means a device such as a server distributed on the network.
  • the network 3 is depicted as a one-to-many connection configuration in which the aggregation processing node 1 is the apex and the distributed processing nodes 2 [n] are connected in a tree shape.
  • the network 3 is not particularly limited to a tree structure. Needless to say, the network may have any configuration as long as the aggregation processing node 1 and the distributed processing node 2 [n] can perform bidirectional communication directly or indirectly.
  • FIG. 2 is a block diagram illustrating a configuration example of the distributed processing node 2 [n].
  • Each distributed processing node 2 [n] includes a sample input unit 20 that receives sample data for learning from a data collection node (not shown), and each of the weights of the neural network when the sample data is input.
  • a gradient calculation processing unit 21 that calculates the gradient of the loss function for each sample data, an intra-node total processing unit 22 that generates and holds distributed data for each weight, which is a numerical value obtained by totaling the gradients for each sample data, and distributed data Is transmitted to the aggregation processing node 1 as a packet, a reception unit 24 that receives the packets transmitted from the aggregation processing node 1 and obtains the aggregation data, and updates the weight of the neural network based on the aggregation data
  • the weight update processing unit 25 to perform, and a mathematical model constructed in software
  • the network 26 and the transmission unit 23, and the transmission count unit 27 that counts the amount (number) of distributed data that has been transmitted by the transmission unit 23 and the reception unit 24.
  • the reception count unit 28 that counts the data amount (number) of the aggregated data, and monitors the unreceived data amount that is the difference between the data amount of the distributed data that has been transmitted and the data amount of the acquired aggregated data.
  • a transmission control unit 29 that stops transmission of distributed data until the amount of unreceived data is equal to or less than a threshold value Mb (Mb ⁇ Ma) when the data amount is equal to or greater than the threshold value Ma;
  • FIG. 3 is a flowchart for explaining sample data input processing, gradient calculation processing, and intra-node aggregation processing of the distributed processing node 2 [n].
  • the present invention is not limited to the method of collecting sample data by the data collection node and the method of distributing the collected sample data to N sets and distributing them to each distributed processing node 2 [n]. This method can be applied regardless of the method.
  • the distributed data D [m, n] is generated and held for each weight w [m] (step S102 in FIG. 3).
  • the calculation formula of the distributed data D [m, n] is as follows.
  • the gradient calculation processing by the gradient calculation processing unit 21 and the intra-node aggregation processing by the intra-node aggregation processing unit 22 are pipelined in units of sample data (one of the gradient calculation processing is performed simultaneously with certain sample data). (Intra-node aggregation processing for aggregating the gradient obtained from the previous sample data can be executed simultaneously).
  • FIG. 4 is a flowchart for explaining the aggregated communication processing of the distributed processing node 2 [n].
  • the transmission counting unit 27 in the transmission unit 23 completes transmission of all Pg aggregated communication packets SP [p, n] from the start of transmission of the first aggregated communication packet SP [1, n]. Until this time is reached (YES in step S106), the number Mt of transmitted distributed data D [m, n] is counted (step S105 in FIG. 4).
  • FIG. 5 is a flowchart for explaining the aggregate communication processing of the aggregation processing node 1.
  • FIG. 6 is a flowchart for explaining the total node aggregation processing of the aggregation processing node 1.
  • S202 YES
  • all node totaling processing for totaling the distributed data D [m, n] of all acquired distributed processing nodes 2 [n] for each weight w [m] is performed to generate total data R [m].
  • FIG. 6, step S203 step S203.
  • the calculation formula of the total data R [m] is as follows.
  • the aggregation process is a process of calculating the aggregation data R [m] based on the distributed data D [m, n] acquired in the order of the number m. Therefore, the aggregation processing node 1 can generate the aggregation data R [m] in the order of the number m.
  • FIG. 7 is a flowchart for explaining the distributed communication processing of the aggregation processing node 1.
  • Ps is 2
  • Ls is an integer less than or equal to 1 and less than M
  • ⁇ M ⁇ Ls ⁇ (Ps ⁇ 1)) total data R [j] is followed by ⁇ Ls ⁇ (M ⁇ Ls ⁇ (Ps ⁇ 1)].
  • ) ⁇ Dummy numerical values may be added so that all distributed communication packets store Ls pieces of data equally.
  • FIG. 8 is a flowchart for explaining the distributed communication processing of the distributed processing node 2 [n].
  • the reception count unit 28 of the reception unit 24 is from the start of reception of the first distributed communication packet DP [1, n] to the completion of acquisition of all M total data (YES in step S110 in FIG. 8).
  • the number Mr of the acquired total data R [m] is counted (step S109 in FIG. 8).
  • FIG. 9 is a diagram showing the transition of the unreceived data amount of the distributed processing node 2 [n]
  • FIG. 10 is a flowchart for explaining the operation of the transmission control unit 29.
  • the vertical axis represents the unreceived data amount Md
  • the horizontal axis represents the monitor time t.
  • the unreceived data amount Md is a difference between the count values of the transmission count unit 27 and the reception count unit 28 (Mt ⁇ Mr), or an amount equivalent to (Mt ⁇ Mr).
  • a processing delay occurs in the aggregation processing node 1 due to, for example, transient data concentration from the plurality of distributed processing nodes 2 [n] to the aggregation processing node 1 after the monitoring time ta has elapsed.
  • the unreceived data amount Md becomes equal to or greater than a predetermined transmission stop threshold Ma (Ma is a positive integer smaller than M) (YES in step S111 in FIG. 10)
  • the transmission control unit 29 of the node 2 [n] issues a transmission stop instruction to the transmission unit 23 of its own node (step S112 in FIG. 10). Issuing this transmission stop instruction stops transmission of the aggregated communication packet SP [p, n] from the distributed processing node 2 [n] (step S104 in FIG. 4).
  • the unreceived data amount Md becomes equal to or greater than the transmission stop threshold Ma at the monitor time tb, and the transmission of the aggregated communication packet SP [p, n] is stopped.
  • the unreceived data amount Md decreases when the transmission of the aggregation communication packet SP [p, n] is stopped. I will do it.
  • the transmission control unit 29 determines the transmission unit 23 of its own node. Then, a transmission resumption instruction is issued (step S114 in FIG. 10).
  • transmission of the aggregated communication packet SP [p, n] from the distributed processing node 2 [n] (step S104 in FIG. 4) is resumed.
  • the unreceived data amount Md becomes equal to or less than the transmission restart threshold Mb at the monitor time tc, and the transmission of the aggregated communication packet SP [p, n] is restarted.
  • the transient data concentration on the aggregation processing node 1 has been described as a case where processing delay occurs, to give more examples in more detail, the distributed processing node 2 [n] or the distributed processing node 2 In [n] and the aggregation processing node 1 or in each aggregation processing node 1, single or multiple factors, that is, transfer processing at an interface such as PCI Express, transfer rate speed difference between input and output, Processing delay occurs due to various factors such as a delay due to packet accumulation in a packet buffer that absorbs a clock speed difference or the like, or a processing delay due to memory bandwidth control when acquiring data from a memory.
  • the configuration of the present embodiment can be applied to any range where such processing delay occurs.
  • a processing delay is generated so that aggregated communication packets cannot be accumulated in the packet buffer of the aggregation processing node 1, frame loss due to buffer overflow occurs, and the lost frame is the cause. May stop processing or give incorrect results.
  • transmission control is performed in the distributed processing node 2 [n] in accordance with the size of the unreceived data amount Md, so that packet loss occurs in the packet buffer of the aggregation processing node 1.
  • the transmission of the distributed processing node 2 [n] can be stopped before. As a result, packet loss can be eliminated, and processing delay due to recalculation due to unstable operation such as processing stoppage of the aggregation processing node 1 or incorrect results can be avoided, and efficient and stable processing Operation is possible.
  • FIG. 11 is a flowchart for explaining the weight update processing of the distributed processing node 2 [n].
  • the weight w [m] may be updated for each number m so that the loss function is minimized based on the gradient of the loss function indicated by the aggregate data R [m]. Since the update of the weight w [m] is a well-known technique, detailed description thereof is omitted.
  • each distributed processing node 2 [n] receives the next sample data for mini-batch learning from a data collection node (not shown), and repeats the mini-batch learning process described above, thereby improving the inference accuracy of the neural network 26.
  • mini-batch learning is as follows: (A) When the number of mini-batch learning reaches a predetermined value, (B) Inference accuracy of the neural network 26 (for example, inferring a problem with a known correct answer to the neural network 26) (C) When the improvement of the inference accuracy of the neural network 26 stops (the inference accuracy when the number of mini-batch learning specified in advance is repeated) (D) or a combination of at least two cases among (A) to (C) occurs.
  • FIG. 12 will be used to explain the sequence composed of aggregated communication processing, total node aggregation processing, distributed communication processing, and weight update processing and their effects, and then FIG. A new effect by the transmission control (transmission stop, transmission restart) of the distributed processing node 2 [n] will be described.
  • FIG. 12 shows a processing sequence of the aggregation processing node 1 and the distributed processing node 2 [n].
  • the transmission unit 23 and the aggregation processing node 1 of each distributed processing node 2 [n] have a weight w [m] of M weights w [m].
  • a weight w [m] having a number m smaller than the weight w [m] during the aggregated communication process is acquired.
  • Aggregation processing node 1 performs the total node aggregation processing described with reference to FIG. 6 for already distributed data D [m, n], and weight w [m] having a number m smaller than weight w [m] during all node aggregation processing.
  • Each distributed processing node 2 based on the [n] (n 1, ⁇ , N) weight update processing unit 25 of the performs weight update processing described in FIG. 11.
  • the conventional technique requires 4T time to complete all of these processing.
  • the time of T + ⁇ is sufficient.
  • is a delay from when the arbitrary distributed processing node 2 [n] transmits arbitrary distributed data D [m, n] to the aggregation processing node 1 until the update of the weight w [m] is completed. It's time.
  • the time ⁇ is sufficiently smaller than T. Therefore, in this embodiment, it is possible to reduce the time required for the aggregate communication process, the total node aggregation process, the distributed communication process, and the weight update process to about 1 ⁇ 4 as compared with the prior art.
  • the operation description of FIG. 12 does not consider the influence due to the processing delay of the aggregation processing node 1, that is, the influence on the sequence operation when unreceived data occurs in the distributed processing node 2 [n].
  • FIG. 13 shows communication between the distributed processing node 2 [n] and the totalization processing node 1 when a processing delay occurs in the totalization processing node 1 and the distributed processing node 2 [n] performs transmission control.
  • Each distributed communication packet indicated by each one of the arrows 131 to [n] includes total data with a data amount of one.
  • the first distributed communication packet is transmitted to 2 [n], and then the second distributed communication packet is transmitted.
  • transmission of the third distributed communication packet is delayed because the load on the aggregation processing node 1 has increased.
  • up to the 10th aggregation communication packet is continuously transmitted from the distributed processing node 2 [n].
  • the eighth aggregate communication packet is transmitted from the distributed processing node 2 [n]
  • the aggregation processing node 1 continuously transmits up to the second distributed communication packet, but the transmission of the third distributed communication packet is delayed by the processing delay indicated by the arrow 132 in FIG. .
  • the ninth aggregated communication packet is transmitted from the distributed processing node 2 [n]
  • the unreceived data amount Md remains 7, but at the timing t1 in FIG. 13, the distributed processing node 2 [n ]
  • the third distributed communication packet transmitted from the aggregated processing node 1 arrives at the distributed processing node 2 [n] with a delay.
  • the unreceived data amount Md 7.
  • the aggregation communication packet does not reach the aggregation processing node 1 due to the transmission stop of the distributed processing node 2 [n], and the processing at the aggregation processing node 1 is light. It has become. For this reason, distributed communication packets are continuously transmitted from the aggregation processing node 1.
  • the 11th to 19th aggregated communication packets continuously arrive at the aggregation processing node 1 after transmission is resumed.
  • the distribution communication packet is transmitted from the aggregation processing node 1 simultaneously with the reception of the 11th to 13th aggregated communication packets.
  • the load on the aggregation processing node 1 becomes heavy again, causing a delay in the distribution communication packet transmission. That is, after the thirteenth distributed communication packet is transmitted from the aggregation processing node 1, transmission of the next fourteenth distributed communication packet is delayed by the processing delay indicated by the arrow 133 in FIG.
  • the distributed communication packet from the aggregation processing node 1 does not reach due to the delay at the timing when the 20th aggregation communication packet is transmitted from the distributed processing node 2 [n].
  • M 20 and the 20th aggregated communication packet is transmitted from the distributed processing node 2 [n] at the timing of t3 and transmission is all completed, regardless of the unreceived data amount Md, Transmission from the distributed processing node 2 [n] stops.
  • the distributed processing node 2 [n] monitors the difference between the transmitted data amount and the received data amount, that is, the unreceived data amount Md at the distributed processing node 2 [n]. By controlling the above, it is possible to reduce a transient load on the aggregation processing node 1 and to perform stable processing.
  • FIFO First In, First Out
  • the buffer overflow problem in the reception buffer of the aggregation processing node 1 that receives the aggregated communication packet has been described.
  • the present embodiment is not limited to the reception buffer, and hardware packet processing is performed.
  • Bottleneck for all parts that become bottlenecks such as FIFO, memory, DMA (Direct Memory Access) transfer in internal buses such as PCIe (PCI Express) and other packet processing circuits
  • PCIe PCI Express
  • FIG. 14 is a block diagram illustrating a configuration example of the aggregation processing node 1.
  • a reception FIFO First In, First Out) buffer 11 [n]
  • an aggregation processing unit 12 and a transmission unit 13. [N].
  • Each receiving unit 10 [n] performs the aggregated communication processing described in FIG. Specifically, each receiving unit 10 [n] receives the aggregated communication packet SP [p, n] transmitted by the corresponding distributed processing node 2 [n], and receives the aggregated communication packet SP [p, n].
  • the reception of the aggregated communication packet SP [p, n] and the accumulation of the distributed data D [i, n] are performed Pg times, so that the M distributed data D [m, n] are received in the respective reception FIFO buffers 11 [n. ].
  • the aggregation processing unit 12 sets the distributed data to 1 from each reception FIFO buffer 11 [n]. Read one by one. Each reception FIFO buffer 11 [n] stores distributed data in the order of number m, and the aggregation processing unit 12 reads the same number of distributed data from each reception FIFO buffer 11 [n]. For this reason, the number m of the distributed data read from each reception FIFO buffer 11 [n] has the same value between the reception FIFO buffers 11 [n]. Therefore, the accumulation presence / absence signal U [n] does not need to specify the number m of the distributed data, and only needs to inform whether or not the distributed data to be read next is accumulated in each reception FIFO buffer 11 [n].
  • the aggregation processing unit 12 indicates that the accumulation presence / absence signal U [n] indicates that the distributed data D [m, n] to be read next is accumulated, and the transmission permission signal V [n] has been read.
  • the distributed communication packet including the aggregated data R [m] generated from the distributed data D [m, n] can be transmitted, the distributed data D [m, n] is sent from each reception FIFO buffer 11 [n]. read out.
  • the calculation formula of the total data R [m] is as shown in the formula (2).
  • the transmission unit 13 [n] performs the distributed communication process described with reference to FIG.
  • the aggregation processing unit 12 reads the distributed data D [m, n] from each reception FIFO buffer 11 [n] in the order of number m, and calculates the aggregated data R [m] based on the read distributed data D [m, n]. Is generated. Further, each transmission unit 13 [n] stores the generated aggregate data R [m] in the distributed communication packet in the order of the number m, and sends it to each distributed processing node 2 [n].
  • the aggregated communication process, the total node aggregated process, and the distributed communication process in the aggregation processing node 1 can be pipelined for different numbers m, so that each distributed processing node 2 [n ] After receiving the distributed data D [m, n] from the received data, the total data R [m] obtained by totaling the distributed data D [m, n] for all nodes is returned to each distributed processing node 2 [n]. Can be significantly reduced as compared with the prior art.
  • the distributed data D is received for all distributed processing nodes 2 [n] after receiving the distributed data D [m, n] from each distributed processing node 2 [n].
  • each process requires M times, so that the aggregated data R [m] is received from each distributed processing node after receiving the distributed data D [m, n] from each distributed processing node 100 [n].
  • the time until returning to 100 [n] is 4t ⁇ M.
  • the time can be shortened to 1 / M (M is the number of weights w [m] and can be about 100,000,000).
  • each distributed processing node 2 [n] monitors the unreceived data amount Md, and when the unreceived data amount Md is equal to or larger than the transmission stop threshold Ma, the aggregation processing node The transmission of the aggregated communication packet to be transmitted to 1 is stopped, and the transmission is resumed when the unreceived data amount Md is equal to or less than the transmission restart threshold Mb after the transmission is stopped.
  • the threshold values Ma and Mb can be determined so that the number of frames accumulated in the reception FIFO buffer 11 [n] of the aggregation processing node 1 does not exceed the buffer size, so-called frame loss is prevented. And stable operation can be realized. Further, since it is not necessary to increase the size of the reception FIFO buffer 11 [n] more than necessary, it is possible to contribute to optimization of the circuit scale by improving the efficiency of the memory.
  • Each of the aggregation processing node 1 and the distributed processing node 2 [n] described in the first and second embodiments includes a computer having a CPU (Central Processing Unit), a storage device and an interface, and hardware resources thereof. It can be realized by a program to be controlled.
  • the CPUs of the aggregation processing node 1 and the distributed processing node 2 [n] execute the processes described in the first and second embodiments according to the programs stored in the respective storage devices.
  • the present invention can be applied to a technique for performing machine learning of a neural network.
  • SYMBOLS 1 ... Aggregation processing node 1, 2 ... Distributed processing node, 3 ... Network, 10 ... Reception part, 11 ... Reception FIFO buffer, 12 ... Aggregation processing part, 13 ... Transmission part, 20 ... Sample input part, 21 ... Gradient calculation process , 22 ... Intra-node aggregation processing unit, 23 ... Transmission unit, 24 ... Reception unit, 25 ... Weight update processing unit, 26 ... Neural network, 27 ... Transmission count unit, 28 ... Reception count unit, 29 ... Transmission control unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

ニューラルネットワークの学習効率を向上させ、なおかつノードの処理負荷を軽減する。 各分散処理ノード2[1]~2[N]は、学習対象のニューラルネットワークの重み毎の分散データを重みの番号の順にパケット化して集計処理ノード1に送信し、ノード1から送信された集計データを順番に取得して、ニューラルネットワークの重みを更新する。ノード1は、送信された分散データを取得し、全分散処理ノードの分散データを重み毎に集計した集計データを重みの番号の順にパケット化して各ノード2[1]~2[N]に送信する。各ノード2[1]~2[N]は、送信済みの分散データと取得済みの集計データのデータ量の差である未受信データ量を監視し、未受信データ量が閾値Ma以上となった場合に、分散データの送信を未受信データ量が閾値Mb(Mb<Ma)以下となるまで停止する。

Description

分散処理システムおよび分散処理方法
 本発明は、集計処理ノードと複数の分散処理ノードとを連携させてニューラルネットワークの学習を行う分散処理システムおよび分散処理方法に関するものである。
 深層学習では、多層のニューロンモデルからなる学習対象について、各ニューロンモデルの重み(前段のニューロンモデルが出力した値に乗じる係数)を、入力したサンプルデータに基づいて更新することにより、推論精度を改善する。
 通常、推論精度を改善する手法には、ミニバッチ法が用いられている。ミニバッチ法では、サンプルデータ毎に前記重みに対する勾配を計算する勾配計算処理と、複数の異なるサンプルデータについて前記勾配を集計する(サンプルデータ毎に得られた勾配を重み別に合算する)集計処理と、各重みを前記集計された勾配に基づいて更新する重み更新処理と、を繰り返す。
 これらの処理、特に勾配計算処理は、多数回の演算を必要とするが、推論精度を向上させるために、重みの個数や入力するサンプルデータの個数が増加すると、深層学習に要する時間が増大するという、課題がある。
 勾配計算処理を高速化するため、分散処理の手法が用いられている。具体的には、複数の分散処理ノードを設け、各ノードは、各々異なるサンプルデータについて勾配計算処理を行う。これにより、ノード数に比例して単位時間に処理できるサンプルデータ数を増加させることが可能となるため、勾配計算処理を高速化できる(非特許文献1参照)。
 深層学習の分散処理において、集計処理を行うためには、分散処理ノード毎に得られたデータ(分散データ)を集計処理ノードに集約するための、各分散処理ノードから集計処理ノードへの通信(集約通信)と、集計処理ノードでの全ノード集計処理と、集計処理ノードが集計したデータ(集計データ)を各分散処理ノードに転送するための、集計処理ノードから分散処理ノードへの通信(分配通信)と、が必要となる。
 図15に、従来技術による、深層学習の分散処理のシーケンスを示す。分散処理ノード100[n](n=1,・・・,N)は、Iの期間においてサンプルデータ入力と勾配計算処理とノード内集計処理とを行い、分散データを集計処理ノード101に送信する。IIの期間では、このような各ノードからの送信が行われるが、各ノードが同時に分散データを送信するとは限らない。
 IIIの期間では、集計処理ノード101が各ノードから得られた勾配を重み別に合算する全ノード集計処理を行い、IVの期間において集計データを各分散処理ノード100[n]に送信する。Vの期間では、各分散処理ノード100[n]が重み更新処理を行う。
 こうして、分散処理が行われることにより、深層学習には、集約通信(II)と全ノード集計処理(III)と分配通信(IV)の各処理時間が加わる。
 このような処理時間は、深層学習を単一ノードで実施するシステムでは不要であり、深層学習の分散処理を行う上で、処理速度を低下させる要因となっている。
 近年、深層学習がより複雑な問題に適用されるようになってきており、重みの総数が増加する傾向にある。このため、分散データや集計データのデータ量が増大し、集約通信時間と分配通信時間が増大している。また、集約通信時間と分配通信時間の増大によって集計処理ノードと分散処理ノードでのデータ処理負荷も増大している。
 このように、深層学習の分散システムは、集約通信時間と分配通信時間の増大および集計処理ノードと分散処理ノードでのデータ処理負荷の増大によって、各分散処理ノード数を増加させることにより、深層学習の高速化の効果が低下するという問題があった。図16は、従来の分散処理システムにおける分散処理ノード数と深層学習の処理性能との関係を示しており、200は分散処理ノード数と処理性能の理想的な関係(性能∝ノード数)を示し、201は分散処理ノード数と処理性能の実際の関係を示している。
秋葉 拓哉,"分散深層学習パッケージ ChainerMN 公開",プリファードインフラストラクチャー(Preferred Infrastructure),2017年,インターネット<https://research.preferred.jp/2017/05/chainermn-beta-release/>
 本発明は、上記のような事情を考慮してなされたものであり、その目的は、集計処理ノードと複数の分散処理ノードとを備える分散処理システムおいて、ニューラルネットワークの学習効率を向上させ、なおかつノードの処理負荷を軽減し、効率的かつ安定に動作することができる分散処理システムおよび分散処理方法を提供することにある。
 本発明の分散処理システムは、集計処理ノードとN個(Nは2以上の整数)の分散処理ノードとを備え、各分散処理ノードは、学習対象のニューラルネットワークのM個(Mは2以上の整数)の重みw[m]毎(m=1,・・・,M)の分散データD[m,n](n=1,・・・,N)を重みw[m]の番号mの順番にパケット化して前記集計処理ノードに送信し、前記集計処理ノードから送信されたパケットを受信して集計データR[m]を番号mの順番に取得して、この集計データR[m]に基づいて前記ニューラルネットワークの重みw[m]を更新し、前記集計処理ノードは、各分散処理ノードから送信されたパケットを受信して分散データD[m,n]を番号mの順番に取得し、全分散処理ノードの分散データD[m,n]を重みw[m]毎に集計した前記集計データR[m]を生成して、この集計データR[m]を番号mの順番にパケット化して各分散処理ノードに送信し、各分散処理ノードは、前記集計処理ノードに前記分散データD[m,n]を送信開始してからM個の前記集計データR[m]を取得し終えるまでの期間において、送信済みの分散データD[m,n]のデータ量と取得済みの集計データR[m]のデータ量との差である未受信データ量を監視し、この未受信データ量が閾値Ma以上となった場合に、前記分散データD[m,n]の送信を前記未受信データ量が閾値Mb(Mb<Ma)以下となるまで停止することを特徴とするものである。
 また、本発明の分散処理システムの1構成例において、各分散処理ノードは、前記分散データD[m,n]を番号mの順番にパケット化して前記集計処理ノードに送信する送信部と、前記集計処理ノードから送信されたパケットを受信して前記集計データR[m]を番号mの順番に取得する受信部と、前記集計データR[m]に基づいて前記ニューラルネットワークの重みw[m]を更新する重み更新処理部と、前記集計処理ノードに前記分散データD[m,n]を送信開始してからM個の前記集計データR[m]を取得し終えるまでの期間において、送信済みの分散データD[m,n]の個数Mt(MtはM以下の正の整数)をカウントする送信カウント部と、前記集計処理ノードに前記分散データD[m,n]を送信開始してからM個の前記集計データR[m]を取得し終えるまでの期間において、取得済みの集計データR[m]の個数Mr(MrはM以下の正の整数)をカウントする受信カウント部と、前記個数MtとMrとの差である前記未受信データ量が前記閾値Ma(MaはMより小さい正の整数)以上となった場合に、前記送信部による前記分散データD[m,n]の送信を、前記未受信データ量が前記閾値Mb(MbはMaより小さい正の整数)以下となるまで停止させる送信制御部とを備えることを特徴とするものである。
 また、本発明の分散処理システムの1構成例において、前記集計処理ノードは、各分散処理ノードから送信されたパケットを受信して前記分散データD[m,n]を番号mの順番に取得する受信部と、全分散処理ノードの分散データD[m,n]を重みw[m]毎に集計した前記集計データR[m]を生成する集計処理部と、前記集計データR[m]を番号mの順番にパケット化して各分散処理ノードに送信する送信部とを備えることを特徴とするものである。
 また、本発明の分散処理システムの1構成例において、各分散処理ノードは、前記ニューラルネットワークの学習用のサンプルデータが入力されたときに、前記ニューラルネットワークの重みw[m]の各々について、前記ニューラルネットワークの損失関数の勾配をサンプルデータ毎に計算する勾配計算処理部と、サンプルデータ毎の前記勾配を集計した数値である前記分散データD[m,n]を重みw[m]毎に生成して保持するノード内集計処理部とを、さらに備えることを特徴とするものである。
 また、本発明の分散処理システムの1構成例において、前記集計処理ノードと各分散処理ノードとは、各分散処理ノードがパケット化した分散データD[m,n]を前記集計処理ノードに送信して、前記集計処理ノードが受信したパケットから前記分散データD[m,n]を取得する集約通信処理と、前記集計処理ノードが前記集計データR[m]を生成する全ノード集計処理と、前記集計処理ノードがパケット化した前記集計データR[m]を各分散処理ノードに送信して、各分散処理ノードが受信したパケットから前記集計データR[m]を取得する分配通信処理と、各分散処理ノードが前記重みw[m]を更新する重み更新処理とを、それぞれ異なる番号mについて並行して行うことを特徴とするものである。
 また、本発明の分散処理方法は、N個(Nは2以上の整数)の分散処理ノードの各々が、学習対象のニューラルネットワークのM個(Mは2以上の整数)の重みw[m]毎(m=1,・・・,M)の分散データD[m,n](n=1,・・・,N)を重みw[m]の番号mの順番にパケット化して集計処理ノードに送信する第1のステップと、前記集計処理ノードが、各分散処理ノードから送信されたパケットを受信して前記分散データD[m,n]を番号mの順番に取得する第2のステップと、前記集計処理ノードが、全分散処理ノードの分散データD[m,n]を重みw[m]毎に集計した集計データR[m]を生成する第3のステップと、前記集計処理ノードが、前記集計データR[m]を番号mの順番にパケット化して各分散処理ノードに送信する第4のステップと、前記分散処理ノードの各々が、前記集計処理ノードから送信されたパケットを受信して前記集計データR[m]を番号mの順番に取得する第5のステップと、前記分散処理ノードの各々が、前記集計データR[m]に基づいて前記ニューラルネットワークの重みw[m]を更新する第6のステップと、前記分散処理ノードの各々が、前記集計処理ノードに前記分散データD[m,n]を送信開始してからM個の前記集計データR[m]を取得し終えるまでの期間において、送信済みの分散データD[m,n]のデータ量と取得済みの集計データR[m]のデータ量との差である未受信データ量を監視し、この未受信データ量が閾値Ma以上となった場合に、前記第1のステップによる前記分散データD[m,n]の送信を、前記未受信データ量が閾値Mb(Mb<Ma)以下となるまで停止する第7のステップとを含むことを特徴とするものである。
 また、本発明の分散処理方法の1構成例は、前記第1のステップの前に、前記分散処理ノードの各々が、前記ニューラルネットワークの学習用のサンプルデータが入力されたときに、前記ニューラルネットワークの重みw[m]の各々について、前記ニューラルネットワークの損失関数の勾配をサンプルデータ毎に計算する第8のステップと、前記分散処理ノードの各々が、サンプルデータ毎の前記勾配を集計した数値である前記分散データD[m,n]を重みw[m]毎に生成して保持する第9のステップとを、さらに含むことを特徴とするものである。
 また、本発明の分散処理方法の1構成例は、前記分散処理ノードの前記第1のステップおよび前記集計処理ノードの前記第2のステップと、前記集計処理ノードの前記第3のステップと、前記集計処理ノードの前記第4のステップおよび前記分散処理ノードの前記第5のステップと、前記分散処理ノードの前記第6のステップとを、それぞれ異なる番号mについて並行して行うことを特徴とするものである。
 本発明によれば、各分散処理ノードが、ニューラルネットワークの重み毎の分散データを順番にパケット化して集計処理ノードに送信し、集計処理ノードから送信されたパケットに格納された集計データを順番に取得してニューラルネットワークの重みを更新し、集計処理ノードが、各分散処理ノードから送信されたパケットに格納された分散データを順番に取得し、全分散処理ノードの分散データを集計した集計データをパケット化して各分散処理ノードに送信することにより、各分散処理ノードから集計処理ノードに分散データを送信する処理と、集計処理ノードから各分散処理ノードに集計データを送信する処理とを同時に行うことができ、効果的な分散処理を行うことができるので、ニューラルネットワークの学習効率を向上させることができる。さらに、本発明では、各分散処理ノードが、送信済みの分散データのデータ量と取得済みの集計データのデータ量との差である未受信データ量を監視し、この未受信データ量が閾値Ma以上となった場合に、分散データの送信を未受信データ量が閾値Mb以下となるまで停止することにより、集計処理ノードへの過渡的な分散データ集中を抑制することで集計処理ノードに対する過渡的な処理負荷を分散でき、効果的でさらに安定な分散処理を行うことができるので、ニューラルネットワークの学習効率および安定度を向上させることができる。
図1は、本発明の第1の実施例に係る深層学習用分散処理システムの構成例を示すブロック図である。 図2は、本発明の第1の実施例に係る深層学習用分散処理システムの分散処理ノードの構成例を示すブロック図である。 図3は、本発明の第1の実施例に係る分散処理ノードのサンプルデータ入力処理と勾配計算処理とノード内集計処理を説明するフローチャートである。 図4は、本発明の第1の実施例に係る分散処理ノードの集約通信処理を説明するフローチャートである。 図5は、本発明の第1の実施例に係る集計処理ノードの集約通信処理を説明するフローチャートである。 図6は、本発明の第1の実施例に係る集計処理ノードの全ノード集計処理を説明するフローチャートである。 図7は、本発明の第1の実施例に係る集計処理ノードの分配通信処理を説明するフローチャートである。 図8は、本発明の第1の実施例に係る分散処理ノードの分配通信処理を説明するフローチャートである。 図9は、本発明の第1の実施例に係る分散処理ノードの未受信データ量の推移を示す図である。 図10は、本発明の第1の実施例に係る分散処理ノードの送信制御部の動作を説明するフローチャートである。 図11は、本発明の第1の実施例に係る分散処理ノードの重み更新処理を説明するフローチャートである。 図12は、本発明の第1の実施例に係る集計処理ノードと分散処理ノードの処理のシーケンスを示す図である。 図13は、本発明の第1の実施例における分散処理ノードの送信制御の効果を説明する図である。 図14は、本発明の第2の実施例に係る集計処理ノードの構成例を示すブロック図である。 図15は、従来の深層学習の分散処理のシーケンスを示す図である。 図16は、従来の分散処理システムにおける分散処理ノード数と深層学習の処理性能との関係を示す図である。
[第1の実施例]
 以下、本発明の実施例について図面を参照して説明する。図1は本発明の第1の実施例に係る深層学習用分散処理システムの構成例を示すブロック図である。図1の分散処理システムは、1個の集計処理ノード1と、ニューラルネットワークのサンプルデータ(学習データ)の集合毎に設けられたN個(Nは2以上の整数)の分散処理ノード2[n](n=1,・・・,N)とを備える。各分散処理ノード2[n]は、双方向の通信が可能なネットワーク3により、集計処理ノード1と接続されている。
 なお、本発明において、「ノード」とは、ネットワーク上に分散配置されているサーバ等の機器を意味する。また、ネットワーク3は、集計処理ノード1を頂点に、分散処理ノード2[n]がツリー状に接続された1対多の接続構成として描かれているが、特にツリー構造に限定されるものではなく、集計処理ノード1と分散処理ノード2[n]とが直接、間接を問わず双方向の通信が可能であれば、どのような構成のネットワークであってもよいことは言うまでもない。
 図2は分散処理ノード2[n]の構成例を示すブロック図である。各分散処理ノード2[n]は、それぞれ図示しないデータ収集ノードから学習用のサンプルデータを受け取るサンプル入力部20と、サンプルデータが入力されたときに、ニューラルネットワークの重みの各々について、ニューラルネットワークの損失関数の勾配をサンプルデータ毎に計算する勾配計算処理部21と、サンプルデータ毎の勾配を集計した数値である分散データを重み毎に生成して保持するノード内集計処理部22と、分散データをパケット化して集計処理ノード1に送信する送信部23と、集計処理ノード1から送信されたパケットを受信して集計データを取得する受信部24と、集計データに基づいてニューラルネットワークの重みを更新する重み更新処理部25と、ソフトウェア的に構築された数学モデルであるニューラルネットワーク26と、送信部23に内包され、送信部23の送信済みの分散データのデータ量(個数)をカウントする送信カウント部27と、受信部24に内包され、受信部24の取得済みの集計データのデータ量(個数)をカウントする受信カウント部28と、送信済みの分散データのデータ量と取得済みの集計データのデータ量との差である未受信データ量を監視し、この未受信データ量が閾値Ma以上となった場合に、分散データの送信を未受信データ量が閾値Mb(Mb<Ma)以下となるまで停止する送信制御部29とを備えている。
 図3は分散処理ノード2[n]のサンプルデータ入力処理と勾配計算処理とノード内集計処理を説明するフローチャートである。各分散処理ノード2[n](n=1,・・・,N)のサンプル入力部20は、図示しないデータ収集ノードから異なるS個(Sは2以上の整数)のサンプルデータx[n,s](s=1,・・・,S)をミニバッチ毎に入力する(図3ステップS100)。
 なお、本発明は、データ収集ノードによるサンプルデータの収集方法、および収集したサンプルデータをN個の集合に振り分けて各分散処理ノード2[n]へ分配する方法に限定されるものではなく、これらの方法の如何を問わず適用が可能である。
 各分散処理ノード2[n](n=1,・・・,N)の勾配計算処理部21は、サンプルデータx[n,s]が入力されたとき、学習対象のニューラルネットワーク26のM個(Mは2以上の整数)の重みw[m](m=1,・・・,M)の各々について、ニューラルネットワーク26の損失関数の勾配G[m,n,s]をサンプルデータx[n,s]毎に計算する(図3ステップS101)。
 ニューラルネットワーク26を各分散処理ノード2[n]にソフトウェアで構築する方法、ニューラルネットワーク26の重みw[m]、ニューラルネットワーク26の性能の悪さを示す指標である損失関数、および損失関数の勾配G[m,n,s]については周知の技術であるので、詳細な説明は省略する。
 続いて、各分散処理ノード2[n](n=1,・・・,N)のノード内集計処理部22は、サンプルデータ毎の勾配G[m,n,s]を集計した数値である分散データD[m,n]を、重みw[m]毎に生成して保持する(図3ステップS102)。分散データD[m,n]の計算式は以下のとおりである。
Figure JPOXMLDOC01-appb-M000001
 なお、勾配計算処理部21による勾配計算処理とノード内集計処理部22によるノード内集計処理とは、サンプルデータ単位でパイプライン化する(あるサンプルデータに対して勾配計算処理を行うと同時にその一つ前のサンプルデータから得た勾配を集計するノード内集計処理とを同時に実行する)ことができる。
 図4は分散処理ノード2[n]の集約通信処理を説明するフローチャートである。各分散処理ノード2[n](n=1,・・・,N)の送信部23は、重みw[m]毎の分散データD[m,n](m=1,・・・,M)を、重みw[m]の番号mの順番にパケット化して集計処理ノード1に送信する集約通信を行う。また、集約通信パケット送信では、集約通信パケット送信完までの間、分散データD[m,n]の振り分けが完了後、送信開始されてからの送信済みの分散データD[m,n]の数Mtをカウントする。
 このとき、各分散処理ノード2[n](n=1,・・・,N)の送信部23は、保持するM個の分散データD[m,n](m=1,・・・,M)を、Lg(Lgは1以上M未満の整数)個ずつPg個(Pgは2以上の整数)の集約通信パケットに振り分けて(図4ステップS103)、全ての集約通信パケットを送信し終えるまで(図4ステップS106においてYES)、Pg個の集約通信パケットを順番に集計処理ノード1に送信する(図4ステップS104)。すなわち、p番目(p=1,・・・,Pg)に送信する集約通信パケットSP[p,n]には、Lg個の分散データD[i,n](i=Lg×(p-1)+l、l=1,・・・,Lg)が格納される。
 なお、MがLgで割り切れない条件では、Pg個目の集約通信パケットSP[Pg,n]には、(M-Lg×(Pg-1))個の分散データD[i,n](i=Lg×(Pg-1)+q、q=1,・・・,M-Lg×(Pg-1))が格納される。
 Pg番目の集約通信パケットSP[Pg,n]については、(M-Lg×(Pg-1))個の分散データD[i,n]の後に、{Lg-(M-Lg×(Pg-1))}個のダミーの数値を追加し、全ての集約通信パケットが等しくLg個のデータを格納するようにしてもよい。
 また、上記のとおり、送信部23内の送信カウント部27は、1番目の集約通信パケットSP[1,n]の送信開始からPg個の全ての集約通信パケットSP[p,n]の送信完了までの間(ステップS106においてYES)、送信済みの分散データD[m,n]の数Mtをカウントする(図4ステップS105)。
 p番目の集約通信パケットSP[p,n]を送信した時点では、送信開始からp×Lg個の分散データD[m,n]を送信していることになるため、Mtの値はp×Lgである。なお、送信カウント部27は、Pg個全ての集約通信パケットSP[p,n]を送信した時点では、p×Lgの値に関わらずMt=Mとする。
 図5は集計処理ノード1の集約通信処理を説明するフローチャートである。集約通信において、集計処理ノード1は、各分散処理ノード2[n]が送信した各集約通信パケットSP[p,n](p=1,・・・,Pg)を受信する(図5ステップS200)。
 集計処理ノード1は、受信した集約通信パケットSP[p,n]から、分散処理ノード2[n]が保持していたLg個の分散データD[i,n](i=Lg×(p-1)+l、l=1,・・・,Lg)を取得する(図5ステップS201)。
 このように、集計処理ノード1は、各分散処理ノード2[n](n=1,・・・,N)が保持していた分散データD[m,n](m=1,・・・,M)を、重みw[m]の番号mの順番に取得することができる。
 図6は集計処理ノード1の全ノード集計処理を説明するフローチャートである。集計処理ノード1は、各分散処理ノード2[n](n=1,・・・,N)から重みw[m]の分散データD[m,n]を取得し終えた後に(図6ステップS202においてYES)、取得した全分散処理ノード2[n]の分散データD[m,n]を重みw[m]毎に集計する全ノード集計処理を行い、集計データR[m]を生成する(図6ステップS203)。集計データR[m]の計算式は、以下のとおりである。
Figure JPOXMLDOC01-appb-M000002
 このように、集計処理は、番号mの順番に取得した分散データD[m,n]に基づいて、集計データR[m]を計算する処理である。このため、集計処理ノード1は、番号mの順番に集計データR[m]を生成することができる。
 図7は集計処理ノード1の分配通信処理を説明するフローチャートである。集計処理ノード1は、重みw[m]毎の集計データR[m](m=1,・・・,M)を、重みw[m]の番号mの順番にパケット化して各分散処理ノード2[n](n=1,・・・,N)に送信する分配通信を行う。
 このとき、集計処理ノード1は、M個の集計データR[m](m=1,・・・,M)を、Ls個(Lsは1以上M未満の整数)ずつPs個(Psは2以上の整数)の分配通信パケットに振り分けて(図7ステップS204)、全ての分配通信パケットを送信し終えるまで(図7ステップS206においてYES)、Ps個の分配通信パケットを順番に各分散処理ノード2[n](n=1,・・・,N)に送信する(図7ステップS205)。すなわち、分散処理ノード2[n]に向けてp番目(p=1,・・・,Ps)に送信する分配通信パケットDP[p,n]には、Ls個の集計データR[j](j=Ls×(p-1)+k、k=1,・・・,Ls)が格納される。
 なお、MがLsで割り切れない条件では、Ps個目の分配通信パケットDP[Ps,n]には、(M-Ls×(Ps-1))個の集計データR[j](j=Ls×(Ps-1)+o、o=1,・・・,M-Ls×(Ps-1))が格納される。
 Ps番目の分配通信パケットDP[Ps,n]については、(M-Ls×(Ps-1))個の集計データR[j]の後に、{Ls-(M-Ls×(Ps-1))}個のダミーの数値を追加し、全ての分配通信パケットが等しくLs個のデータを格納するようにしてもよい。
 図8は分散処理ノード2[n]の分配通信処理を説明するフローチャートである。分配通信において、各分散処理ノード2[n](n=1,・・・,N)の受信部24は、集計処理ノード1が送信した各分配通信パケットDP[p,n](p=1,・・・,Ps)を順番に受信する(図8ステップS107)。
 そして、各分散処理ノード2[n](n=1,・・・,N)の受信部24は、受信した分配通信パケットDP[p,n]から、集計処理ノード1が生成したLs個の集計データR[j](j=Ls×(p-1)+k、k=1,・・・,Ls)を取得する(図8ステップS108)。また、受信部24の受信カウント部28は、1番目の分配通信パケットDP[1,n]の受信開始からM個の全ての集計データの取得完了までの間(図8ステップS110においてYES)、取得済みの集計データR[m]の数Mrをカウントする(図8ステップS109)。
 このように、各分散処理ノード2[n](n=1,・・・,N)は、集計処理ノード1が生成した集計データR[m](m=1,・・・,M)を、重みw[m]の番号mの順番に取得することができる。
 p番目の分配通信パケットDP[p,n]から集計データR[m]を取得した時点では、取得開始からp×Ls個の集計データR[j]を受信していることになるため、Mrの値はp×Lsである。なお、受信カウント部28は、Ps個全ての分配通信パケットDP[p,n]を受信した時点では、p×Lsの値に関わらずMr=Mとする。
 なお、集計処理ノード1がp番目に送信する分配通信パケットDP[p,n]には、全ての分散処理ノード2[n]に関して同じ集計データR[j](j=Ls×(p-1)+k、k=1,・・・,Ls)が格納されている。したがって、分配通信パケットDP[p,n]の宛先を指定する必要がない場合(例えば図1のように分散処理ノード別に経路が異なる場合や、全分散処理ノード宛にマルチキャストできるネットワークを介する場合)は、全ての分散処理ノード2[n]に同じ分配通信パケットDP[p]を送信してもよい。
 以上説明した集計処理ノード1と各分散処理ノード2[n]との間の一連の処理において、各分散処理ノード2[n]の送信制御部29の役割について説明する。図9は分散処理ノード2[n]の未受信データ量の推移を示す図、図10は送信制御部29の動作を説明するフローチャートである。図9の縦軸は未受信データ量Md、横軸はモニタ時間tである。なお、未受信データ量Mdは、送信カウント部27と受信カウント部28のカウント値の差(Mt-Mr)、あるいは(Mt-Mr)と等価な量である。
 この図9の例では、モニタ時間taの経過後、例えば複数の分散処理ノード2[n]から集計処理ノード1への過渡的なデータ集中によって集計処理ノード1で処理遅延が発生したとする。この処理遅延を契機に集計処理ノード1から各分散処理ノード2[n]への分配通信パケットDP[p,n]の送信速度が遅くなり、分散処理ノード2[n]の未受信データ量、すなわち、送信カウント部27と受信カウント部28のカウント値の差Md=Mt-Mrが増大する。
 このような処理遅延が引き続き発生する状況において、未受信データ量Mdが予め定められた送信停止閾値Ma(MaはMより小さい正の整数)以上になると(図10ステップS111においてYES)、分散処理ノード2[n]の送信制御部29は、自ノードの送信部23に対して送信停止指示を発行する(図10ステップS112)。この送信停止指示の発行により、分散処理ノード2[n]からの集約通信パケットSP[p,n]の送信(図4のステップS104)が停止する。例えば図9の例では、モニタ時間tbにおいて未受信データ量Mdが送信停止閾値Ma以上となり、集約通信パケットSP[p,n]の送信が停止する。
 集計処理ノード1からは送信が遅れていた分配通信パケットDP[p,n]が送られてくるので、集約通信パケットSP[p,n]の送信停止を契機に、未受信データ量Mdは減少していく。未受信データ量Mdが予め定められた送信再開閾値Mb(MbはMaより小さい正の整数)以下になると(図10ステップS113においてYES)、送信制御部29は、自ノードの送信部23に対して送信再開指示を発行する(図10ステップS114)。この送信再開指示の発行により、分散処理ノード2[n]からの集約通信パケットSP[p,n]の送信(図4のステップS104)が再開される。例えば図9の例では、モニタ時間tcにおいて未受信データ量Mdが送信再開閾値Mb以下となり、集約通信パケットSP[p,n]の送信が再開される。
 なお、処理遅延が発生するケースとして集計処理ノード1への過渡的なデータ集中を述べたが、より詳細に多くの例を挙げれば、分散処理ノード2[n]内、あるいは、分散処理ノード2[n]と集計処理ノード1間、あるいは、集計処理ノード1内のそれぞれにおいて、単一あるいは複合的な要因、すなわち、PCI Expressなどのインタフェースでの転送処理、入出力間の転送レート速度差、クロック速度差などを吸収するパケットバッファへのパケット蓄積による遅延、あるいは、メモリからデータを取得する際のメモリ帯域律速による処理遅延など、さまざまな要因で処理遅延が生じる。本実施例の構成では、このような処理遅延となるあらゆる範囲に適応できる。
 また、本実施例の構成が採用されていない場合、集計処理ノード1のパケットバッファに集約通信パケットを蓄積できなくなる程の処理遅延が生じ、バッファあふれによるフレーム欠損が生じて、欠損したフレームが原因で処理が停止したり、誤った結果が得られたりする可能性がある。しかし、本実施例の構成であれば、未受信データ量Mdの大きさに応じて分散処理ノード2[n]において送信制御を行うので、集計処理ノード1のパケットバッファでのパケット欠損が発生する前に分散処理ノード2[n]の送信を停止することができる。その結果、パケット欠損をなくすことができ、集計処理ノード1の処理停止や誤った結果が出るといった不安定な動作による再計算などによる処理遅延を回避することが可能となり、効率的かつ安定な処理動作が可能となる。
 図11は分散処理ノード2[n]の重み更新処理を説明するフローチャートである。各分散処理ノード2[n](n=1,・・・,N)の重み更新処理部25は、集計処理ノード1から重みw[m]の集計データR[m]を取得し終えた後に(図11ステップS115においてYES)、取得した集計データR[m]に基づいて、それぞれ自ノード内のニューラルネットワーク26の重みw[m]を更新する重み更新処理を行う(図11ステップS116)。
 重み更新処理においては、集計データR[m]が示す、損失関数の勾配に基づいて損失関数が最小になるように重みw[m]を番号m毎に更新すればよい。重みw[m]の更新は周知の技術であるので、詳細な説明は省略する。
 このように、重み更新処理は、重みw[m]の番号mの順番に取得した集計データR[m]に基づいて、重みw[m]を更新する処理である。このため、各分散処理ノード2[n](n=1,・・・,N)は、重みw[m]に対する重み更新処理を、番号mの順番に行うことができる。
 重み更新処理の終了により、1回のミニバッチ学習が終了し、各分散処理ノード2[n](n=1,・・・,N)と集計処理ノード1とは、更新された重みに基づき、次のミニバッチ学習の処理を継続して行う。すなわち、各分散処理ノード2[n]は、次のミニバッチ学習用のサンプルデータを図示しないデータ収集ノードから受け取り、上記で説明したミニバッチ学習の処理を繰り返すことにより、ニューラルネットワーク26の推論精度を向上させる。
 なお、ミニバッチ学習の繰り返しの終了は、(A)ミニバッチ学習の回数が予め指定された値に到達した場合、(B)ニューラルネットワーク26の推論精度(例えば正答が既知の問題をニューラルネットワーク26に推論処理させたときの正答率)が予め指定された閾値を超過した場合、(C)ニューラルネットワーク26の推論精度の向上が停止した場合(予め指定されたミニバッチ学習の回数を繰り返したときに推論精度の上昇が予め指定された閾値を下回った場合)、(D)あるいは、(A)~(C)のうち少なくとも2つの場合の組み合わせが発生した場合、とする。このようなミニバッチ学習の繰り返しの終了は、各分散処理ノード2[n](n=1,・・・,N)が個別に判断してもよいし、集計処理ノード1が総合的に判断してもよい。
 ここから図12を用いて、まず集約通信処理、全ノード集計処理、分配通信処理、および重み更新処理で構成されるシーケンスとその効果を説明し、その後、図13を用いて、本実施例の分散処理ノード2[n]の送信制御(送信停止、送信再開)による新たな効果を説明する。
 図12に、集計処理ノード1と分散処理ノード2[n]の処理のシーケンスを示す。上記のように、各分散処理ノード2[n](n=1,・・・,N)は、M個の分散データD[m,n](m=1,・・・,M)を重みw[m]の番号mの順番にパケット化して集計処理ノード1に送信し、集計処理ノード1は、M個の分散データD[m,n](m=1,・・・,M)を番号mの順番に取得する、という集約通信処理を行う。
 さらに、集計処理ノード1は、重みw[m]の番号mの順番に取得したM個の分散データD[m,n](m=1,・・・,M)に基づき、集計データR[m](m=1,・・・,M))を番号mの順番に生成する全ノード集計処理を行う。
 さらに、集計処理ノード1は、重みw[m]の番号mの順番に生成したM個の集計データR[m](m=1,・・・,M)を番号mの順番にパケット化して各分散処理ノード2[n](n=1,・・・,N)に送信し、各分散処理ノード2[n](n=1,・・・,N)は、M個の集計データR[m](m=1,・・・,M)を番号mの順番に取得する、という分配通信処理を行う。
 さらに、各分散処理ノード2[n](n=1,・・・,N)は、番号mの順番に取得したM個の集計データR[m](m=1,・・・,M)に基づき、M個の重みw[m]を番号mの順番に更新する重み更新処理を行う。
 本実施例では、集約通信処理と全ノード集計処理と分配通信処理と重み更新処理とを、並行してほぼ同時に(パイプラインで)行うことが可能であり、各通信や各処理が終了するまで、次の処理を開始できなかった従来技術によるシーケンス(図15)と比較したとき、処理時間の大幅な短縮が可能となる。
 すなわち、各分散処理ノード2[n](n=1,・・・,N)の送信部23と集計処理ノード1とがM個の重みw[m]の内のある重みw[m]の分散データD[m,n]について図4、図5で説明した集約通信処理を行っているときに、集約通信処理中の重みw[m]よりも番号mの小さい重みw[m]の取得済みの分散データD[m,n]について集計処理ノード1が図6で説明した全ノード集計処理を行い、全ノード集計処理中の重みw[m]よりも番号mの小さい重みw[m]の集計処理済みの集計データR[m]について集計処理ノード1と各分散処理ノード2[n](n=1,・・・,N)の受信部24とが図7、図8で説明した分配通信処理を行い、分配通信処理中の重みw[m]よりも番号mの小さい重みw[m]の取得済みの集計データR[m]に基づき各分散処理ノード2[n](n=1,・・・,N)の重み更新処理部25が図11で説明した重み更新処理を行う。
 したがって、例えば、集約通信処理と全ノード集計処理と分配通信処理と重み更新処理のそれぞれで時間Tを要する場合、従来技術では、これらの全ての処理を終えるのに4Tの時間を要したが、本実施例ではT+αの時間で済む。ここで、前記αは、任意の分散処理ノード2[n]が任意の分散データD[m,n]を集計処理ノード1に送信した時点から重みw[m]の更新が完了するまでの遅延時間である。本実施例では、重みw[m]の番号mの単位で処理をパイプライン化しているため、時間αはTと比較すると十分に小さい時間である。したがって、本実施例では、従来技術と比較して、集約通信処理と全ノード集計処理と分配通信処理と重み更新処理とに要する時間を、約1/4に短縮することが可能である。
 次に、本実施例の分散処理ノード2[n]の送信制御(送信停止、送信再開)による効果を説明する。図12の動作説明では、集計処理ノード1の処理遅延による影響、すなわち、分散処理ノード2[n]において未受信データが発生する際のシーケンス動作への影響を考慮していない。
 図13は、集計処理ノード1において処理遅延が生じ、分散処理ノード2[n]が送信制御を行った場合の分散処理ノード2[n]と集計処理ノード1間での通信を示している。この図13の例では、M=20、Lg=Ls=1、Ma=8、Mb=6としている。すなわち、分散処理ノード2[n]から集計処理ノード1への矢印130の1本1本が示す各集約通信パケットにデータ量が1の分散データが含まれ、集計処理ノード1から分散処理ノード2[n]への矢印131の1本1本が示す各分配通信パケットにデータ量が1の集計データが含まれていることになる。
 図13の例では、分散処理ノード2[n]から集約通信パケットが連続して送信され、2番目の集約通信パケットが集計処理ノード1で受信されるタイミングで、集計処理ノード1から分散処理ノード2[n]へ1番目の分配通信パケットが送信され、さらに続けて2番目の分配通信パケットが送信されている。しかし、3番目の集約通信パケットが集計処理ノード1で受信されてからは、集計処理ノード1の負荷が高くなったため、3番目の分配通信パケットの送信が遅れている。一方で、集計処理ノード1での処理が遅延しているのとは対照的に、分散処理ノード2[n]からは、10番目までの集約通信パケットが連続して送信されている。
 ここで、分散処理ノード2[n]の送信カウント部27と受信カウント部28のカウント値Mt,Mrに着目すると、分散処理ノード2[n]から7番目の集約通信パケットを送信した直後の時点では、集計処理ノード1からの分配通信パケットが到着していないため、未受信データ量Md=Mt-Mrは、集約通信パケットの送信毎に初期値のMd=1(1×Lg)からMd=7(7×Lg)まで増大する。分散処理ノード2[n]から8番目の集約通信パケットが送信された際に、集計処理ノード1から送信された分配通信パケットが到着するが、この状況では、未受信データ量はMd=Mt-Mr=8-1で、7のままである。
 上記で説明したとおり、集計処理ノード1からは2番目の分配通信パケットまでは連続的に送信されるが、3番目の分配通信パケットの送信は図13の矢印132で示す処理遅延で遅れていた。この場合、分散処理ノード2[n]から9番目の集約通信パケットが送信された時点では、未受信データ量Mdは7のままであるが、図13のt1のタイミングで分散処理ノード2[n]から10番目の集約通信パケットが送信されると、集計処理ノード1から3番目の分配通信パケットが到着していないために、未受信データ量Mdは1つカウントアップし、Md=8となる。
 未受信データ量Mdが送信停止閾値Ma=8に到達したため、分散処理ノード2[n]の送信制御部29から送信部23に対して送信停止指示が発行され、分散処理ノード2[n]の集約通信パケット送信が停止する。
 分散処理ノード2[n]からの集約通信パケットの送信が停止してから暫くすると、遅れて集計処理ノード1から送信された3番目の分配通信パケットが分散処理ノード2[n]に到達する。これにより、未受信データ量Md=7となる。集計処理ノード1から4番目の分配通信パケットが送信されるタイミングでは、分散処理ノード2[n]の送信停止によって集約通信パケットが集計処理ノード1に届かず、集計処理ノード1での処理が軽くなっている。このため、集計処理ノード1から分配通信パケットが連続送信される。図13のt2のタイミングで4番目の分配通信パケットを分散処理ノード2[n]が受信すると、未受信データ量Mdが1つカウントダウンされ、Md=6となる。
 未受信データ量Mdが送信再開閾値Mb=6に到達したため、分散処理ノード2[n]の送信制御部29から送信部23に対して送信再開指示が発行され、集約通信パケットの送信が再開される。10番目の集約通信パケットを送信した時点で送信停止していたため、11番目の集約通信パケットから送信が再開される。送信再開後、集計処理ノード1からの分配通信パケットが到着するので、未受信データ量はMd=Mt-Mr=7-1で、6のままである。このような状態が19番目の集約通信パケットが送信されるまで続き、Md=6のままとなる。
 一方、集計処理ノード1に到着する集約通信パケットに着目すると、送信再開後、11番目から19番目の集約通信パケットまで連続的に集計処理ノード1へ到着する。特に11番目から13番目の集約通信パケットの受信と同時に、集計処理ノード1から分配通信パケットが送信されている。この状況で再び集計処理ノード1の負荷が重くなり、分配通信パケット送信の遅延が発生する。すなわち、13番目の分配通信パケットが集計処理ノード1から送信された後、次の14番目の分配通信パケットの送信が図13の矢印133で示す処理遅延で遅れる。
 この処理遅延によって、分散処理ノード2[n]から20番目の集約通信パケットが送信されたタイミングで、集約処理ノード1からの分配通信パケットが遅延により届かなくなる。図13のケースでは、M=20であり、t3のタイミングで分散処理ノード2[n]から20番目の集約通信パケットを送信して、送信が全て完了したため、未受信データ量Mdに関わらず、分散処理ノード2[n]からの送信は停止する。
 さらに、集計処理ノード1からの14番目の分配通信パケットの送信後、図13の矢印134で示す処理遅延が発生した場合、15番目の分配通信パケットが集計処理ノード1から遅れて送信される。既に分散処理ノード2[n]から集計処理ノード1への集約通信パケット送信が完了しているので、集計処理ノード1の負荷は軽くなっており、集約処理ノード1は、処理遅延の解消後に15番目から20番目まで連続的に分配通信パケットを送信する。20番目の分配通信パケットを分散処理ノード2[n]が受信した時点で、未受信データ量Md=0となる。
 なお、集計処理ノード1からPs=20個の分配通信パケットを受信して、M=20個の集計データR[m]を取得し終えた時点で(図8ステップS110においてYES)、分散処理ノード2[n]の送信カウント部27と受信カウント部28とは、それぞれカウント値Mt,Mrを0に初期化する。これにより、未受信データ量Mdも0となり、送信カウント部27と受信カウント部28とは、次のミニバッチでのデータの集約送信開始の待機状態となる。
 以上説明したように、本実施例では、分散処理ノード2[n]において、送信データ量と受信データ量の差、すなわち、分散処理ノード2[n]で未受信データ量Mdを監視し、送信を制御することによって、集計処理ノード1への過渡的な負荷を低減し、安定した処理が可能となる。
 なお、集計処理ノード1の負荷が重くなることについて、さらに詳細に説明すると、例えば、集計処理ノード1の処理にソフトウェアが介在する際には、大量の処理によってCPU(Central Processing Unit)が逼迫することによって、処理遅延が発生する。また、ハードウェア的に集約通信パケットを処理する場合、ハードウェア処理の前に一時的に受信バッファ、いわゆるFIFO(First In,First Out)のようなメモリにパケットを保存する際、FIFOの深さ(メモリサイズ)が有限のために、バッファ溢れが起きて処理すべきパケットが消失してしまい、集計処理ノード1の負荷が重くなる。
 このような集計処理ノード1の負荷が重くなる問題を解決するために、未受信データ量Mdが増えたときに、分散処理ノード2[n]からの送信を停止し、集計処理ノード1のCPUの負荷増大やFIFOのバッファ溢れによるパケット消失を防止することによって安定な処理を実現することが可能となる。
 なお、上記の説明では、集約通信パケットを受信する集計処理ノード1の受信バッファでのバッファ溢れの問題について説明しているが、本実施例は、受信バッファに限らず、ハードウェア的なパケット処理でボトルネックとなる全ての部分、例えばPCIe(PCI Express)などの内部バスや、その他のパケット処理回路に搭載されるFIFO、メモリ、DMA(Direct Memory Access)転送等の様々な部分についてボトルネックを解消する分散処理方法を提供するものである。
[第2の実施例]
 次に、本発明の第2の実施例について説明する。本実施例は、第1の実施例の深層学習用分散処理システムの構成要素である集計処理ノード1の構成例を説明するものである。図14は集計処理ノード1の構成例を示すブロック図である。
 集計処理ノード1は、受信部10[n](n=1,・・・,N)と、受信FIFO(First In, First Out)バッファ11[n]と、集計処理部12と、送信部13[n]とを備えている。
 第1の実施例で説明したように、集計処理ノード1は、集約通信処理において、分散処理ノード2[n](n=1,・・・,N)の各々から、M個の分散データD[m,n](m=1,・・・,M)を、Lg個ずつに振り分けられたPg個の集約通信パケットSP[p,n](p=1,・・・,Pg)として受信する。集約通信パケットSP[p,n](p=1,・・・,Pg)には、Lg個の分散データD[i,n](i=Lg×(p-1)+l、l=1,・・・,Lg)が格納されている。
 また、集計処理ノード1は、分配通信処理において、分散処理ノード2[n](n=1,・・・,N)の各々に向けて、M個の集計データR[m](m=1,・・・,M)を、Ls個ずつに振り分けてPs個の集約通信パケットDP[p,n](p=1,・・・,Ps)として送信する。
 図14に示したように、集計処理ノード1は、各分散処理ノード2[n](n=1,・・・,N)から集約通信パケットSP[p,n]を受信するための受信部10[n]を、分散処理ノード2[n]別に備える。
 各受信部10[n]は、図5で説明した集約通信処理を行うものである。具体的には、各受信部10[n]は、対応する分散処理ノード2[n]が送信した集約通信パケットSP[p,n]を受信し、この集約通信パケットSP[p,n]に重みw[m]の番号mの順に格納されたLg個の分散データD[i,n](i=Lg×(p-1)+l、l=1,・・・,Lg)を番号i(iは重みw[m]の番号mの一部)の順に取得して、後段の受信FIFOバッファ11[n]に渡す。
 また、図14に示すように、集計処理ノード1は、受信部10[n]別(分散処理ノード2[n]別)に、受信FIFOバッファ11[n]を備える。さらに、集計処理ノード1は、各受信FIFOバッファ11[n](n=1,・・・,N)に蓄積されている、番号m(m=1,・・・,M)の分散データD[m,n]を各受信FIFOバッファ11[n]から読み出して集計する集計処理部12を備える。受信FIFOバッファ11[n]と集計処理部12とは、図6で説明した全ノード集計処理を行うものである。
 具体的には、受信FIFOバッファ11[n]は、対応する受信部10[n]から渡されたLg個の分散データD[i,n](i=Lg×(p-1)+l、l=1,・・・,Lg)を、番号i(iは番号mの一部)の順に蓄積する。この蓄積は各受信FIFOバッファ11[n]が空の状態から開始される。集約通信パケットSP[p,n]の受信と分散データD[i,n]の蓄積とがPg回行われることで、M個の分散データD[m,n]が各受信FIFOバッファ11[n]に蓄積される。
 したがって、各受信FIFOバッファ11[n]に蓄積された分散データを同じ個数ずつ読み出した場合、各受信FIFOバッファ11[n]から読み出された分散データD[m,n]はm=1,・・・,Mの順に並んでいる。
 各受信FIFOバッファ11[n](n=1,・・・,N)は、集計処理部12に対して、それぞれ分散データの蓄積の有無を示す蓄積有無信号U[n]を出力する。
 集計処理部12は、全ての蓄積有無信号U[n](n=1,・・・,N)が分散データの蓄積有を示す場合に、各受信FIFOバッファ11[n]から分散データを1個ずつ読み出す。なお、各受信FIFOバッファ11[n]は番号mの順番で分散データを蓄積しており、集計処理部12は各受信FIFOバッファ11[n]から同数の分散データを読み出す。このため、各受信FIFOバッファ11[n]から読み出された分散データの番号mは、各受信FIFOバッファ11[n]間で同じ値となる。したがって、蓄積有無信号U[n]は分散データの番号mを特定する必要はなく、次に読み出すべき分散データが各受信FIFOバッファ11[n]に蓄積されているか否かを知らせるだけでよい。
 ただし、後述するように、集計処理部12において、読み出し済みの分散データD[m,n]に基づいて生成した集計データR[m]を分配通信パケットに格納し、各送信部13[n](n=1,・・・,N)から送出するが、集計処理部12は、分配通信パケットを送出する状態にない場合(例えば別の分配通信パケットを送出中である場合)は、次の分散データD[m,n]の読み出しを、分配通信パケットを送出可能となるまで保留する。
 このため、各送信部13[n](n=1,・・・,N)は、分配通信パケットが送出可能になったときに、分配通信パケットが送出可能であることを示す送出許可信号V[n]を集計処理部12に対して出力する。
 集計処理部12は、各受信FIFOバッファ11[n](n=1,・・・,N)からの蓄積有無信号U[n]と、各送信部13[n](n=1,・・・,N)からの送出許可信号V[n](n=1,・・・,N)とを受けて、各受信FIFOバッファ11[n]から分散データの読み出しを行うか否かを判定する。
 具体的には、集計処理部12は、蓄積有無信号U[n]が、次に読み出すべき分散データD[m,n]の蓄積有りを示し、送出許可信号V[n]が、読み出し済みの分散データD[m,n]から生成された集計データR[m]を含む分配通信パケットの送出可能を示しているとき、分散データD[m,n]を各受信FIFOバッファ11[n]から読み出す。
 さらに、集計処理部12は、各受信FIFOバッファ11[n]から番号mの順に読み出した分散データD[m,n](n=1,・・・,N)に基づいて、集計データR[m]を番号mの順に生成し、集計データR[m]を番号mの順に後段の送信部13[n]に渡す。ここでは、各送信部13[n]に同一の集計データが渡される。集計データR[m]の計算式は、式(2)に示したとおりである。
 各分散処理ノード2[n](n=1,・・・,N)に分配通信パケットを送信するための送信部13[n]は、分散処理ノード2[n]別に設けられている。送信部13[n]は、図7で説明した分配通信処理を行うものである。
 各送信部13[n]は、集計処理部12から番号mの順番に渡された集計データR[m](m=1,・・・,M)を、Ls個ずつPs個の分配通信パケットに振り分けて送信する。すなわち、分散処理ノード2[n]に向けてp番目(p=1,・・・,Ps)に送信する分配通信パケットDP[p,n]には、Ls個の集計データR[j](j=Ls×(p-1)+k、k=1,・・・,Ls)が格納される。上記のとおり、各送信部13[n]は、分配通信パケットDP[p,n]が送出可能になったときに、集計処理部12に対して送出許可信号V[n]を出力する。
 第1の実施例で説明したように、各送信部13[n]は、MがLsで割り切れない条件では、Ps個目の分配通信パケットDP[Ps,n]に、(M-Ls×(Ps-1))個の集計データR[j](j=Ls×(Ps-1)+o、o=1,・・・,M-Ls×(Ps-1))を格納する。また、各送信部13[n]は、Ps番目の分配通信パケットDP[Ps,n]について、(M-Ls×(Ps-1))個の集計データR[j]の後に、{Ls-(M-Ls×(Ps-1))}個のダミーの数値を追加し、全ての分配通信パケットが等しくLs個のデータを格納するようにしてもよい。
 以上のように、各受信部10[n](n=1,・・・,N)は、分散処理ノード2[n]から受信した集約通信パケットから、重みw[m]の番号m(m=1,・・・,M)の順に分散データD[m,n]を取り出して、番号mの順に、分散処理ノード別の受信FIFOバッファ11[n]に格納する。
 集計処理部12は、分散データD[m,n]を番号mの順に各受信FIFOバッファ11[n]から読み出して、読み出した分散データD[m,n]に基づいて集計データR[m]を生成する。さらに、各送信部13[n]は、生成された集計データR[m]を番号mの順に分配通信パケットに格納して、各分散処理ノード2[n]に送出する。
 図15で説明した従来技術では、集計処理ノード101が全ての分散データD[m,n](m=1,・・・,M)を分散処理ノード100[n]から受け、その後、分散データD[m,n]を集計して全ての集計データR[m](m=1,・・・,M)を生成し、その後、集計データR[m]を分散処理ノード100[n]に返していた。
 これに対して、本実施例では、集計処理ノード1における集約通信処理と全ノード集計処理と分配通信処理とを互いに異なる番号mについてパイプライン化することができるので、各分散処理ノード2[n]から分散データD[m,n]を受けてから、全ノードについて分散データD[m,n]を集計した集計データR[m]を、各分散処理ノード2[n]に返すまでの時間を、従来技術と比較して大幅に短縮することができる。
 例えば、番号mに関わる各処理に要する時間をtとすると、各分散処理ノード2[n]から分散データD[m,n]を受けてから、全分散処理ノード2[n]について分散データD[m,n]を集計した集計データR[m]を、各分散処理ノード2[n]に返すまでの時間は、本発明では4t(パイプライン段数=4)となる。
 一方、従来技術では、各処理にM倍の時間を要するので、各分散処理ノード100[n]から分散データD[m,n]を受けてから、集計データR[m]を各分散処理ノード100[n]に返すまでの時間が4t×Mとなる。このように、本実施例では、1/M(Mは重みw[m]の個数であり100,000,000程度の値になり得る)に時間を短縮することができる。
 分散処理システムの他の構成要素については、第1の実施例で説明したものと同じであるため、本実施例では説明を省略する。
 また、第1の実施例で述べたように、各分散処理ノード2[n]は、未受信データ量Mdを監視して、未受信データ量Mdが送信停止閾値Ma以上の場合に集計処理ノード1へ送信する集約通信パケットの送信を停止し、この送信停止後に未受信データ量Mdが送信再開閾値Mb以下の場合に送信を再開する。
 このような送信制御においては、集計処理ノード1の受信FIFOバッファ11[n]に蓄積するフレーム数がバッファサイズを超過しないように閾値Ma,Mbを決めることができるため、いわゆるフレーム欠損を防止することができ、安定な動作を実現することができる。また、必要以上に受信FIFOバッファ11[n]のサイズを大きくする必要がなくなるため、メモリの効率化による回路規模の適正化にも資することができる。
 第1、第2の実施例で説明した集計処理ノード1と分散処理ノード2[n]の各々は、CPU(Central Processing Unit)、記憶装置及びインタフェースを備えたコンピュータと、これらのハードウェア資源を制御するプログラムによって実現することができる。集計処理ノード1と分散処理ノード2[n]の各々のCPUは、各々の記憶装置に格納されたプログラムに従って第1、第2の実施例で説明した処理を実行する。
 本発明は、ニューラルネットワークの機械学習を行う技術に適用することができる。
 1…集計処理ノード1、2…分散処理ノード、3…ネットワーク、10…受信部、11…受信FIFOバッファ、12…集計処理部、13…送信部、20…サンプル入力部、21…勾配計算処理部、22…ノード内集計処理部、23…送信部、24…受信部、25…重み更新処理部、26…ニューラルネットワーク、27…送信カウント部、28…受信カウント部、29…送信制御部。

Claims (8)

  1.  集計処理ノードとN個(Nは2以上の整数)の分散処理ノードとを備え、
     各分散処理ノードは、学習対象のニューラルネットワークのM個(Mは2以上の整数)の重みw[m]毎(m=1,・・・,M)の分散データD[m,n](n=1,・・・,N)を重みw[m]の番号mの順番にパケット化して前記集計処理ノードに送信し、前記集計処理ノードから送信されたパケットを受信して集計データR[m]を番号mの順番に取得して、この集計データR[m]に基づいて前記ニューラルネットワークの重みw[m]を更新し、
     前記集計処理ノードは、各分散処理ノードから送信されたパケットを受信して分散データD[m,n]を番号mの順番に取得し、全分散処理ノードの分散データD[m,n]を重みw[m]毎に集計した前記集計データR[m]を生成して、この集計データR[m]を番号mの順番にパケット化して各分散処理ノードに送信し、
     各分散処理ノードは、前記集計処理ノードに前記分散データD[m,n]を送信開始してからM個の前記集計データR[m]を取得し終えるまでの期間において、送信済みの分散データD[m,n]のデータ量と取得済みの集計データR[m]のデータ量との差である未受信データ量を監視し、この未受信データ量が閾値Ma以上となった場合に、前記分散データD[m,n]の送信を前記未受信データ量が閾値Mb(Mb<Ma)以下となるまで停止することを特徴とする分散処理システム。
  2.  請求項1記載の分散処理システムにおいて、
     各分散処理ノードは、
     前記分散データD[m,n]を番号mの順番にパケット化して前記集計処理ノードに送信する送信部と、
     前記集計処理ノードから送信されたパケットを受信して前記集計データR[m]を番号mの順番に取得する受信部と、
     前記集計データR[m]に基づいて前記ニューラルネットワークの重みw[m]を更新する重み更新処理部と、
     前記集計処理ノードに前記分散データD[m,n]を送信開始してからM個の前記集計データR[m]を取得し終えるまでの期間において、送信済みの分散データD[m,n]の個数Mt(MtはM以下の正の整数)をカウントする送信カウント部と、
     前記集計処理ノードに前記分散データD[m,n]を送信開始してからM個の前記集計データR[m]を取得し終えるまでの期間において、取得済みの集計データR[m]の個数Mr(MrはM以下の正の整数)をカウントする受信カウント部と、
     前記個数MtとMrとの差である前記未受信データ量が前記閾値Ma(MaはMより小さい正の整数)以上となった場合に、前記送信部による前記分散データD[m,n]の送信を、前記未受信データ量が前記閾値Mb(MbはMaより小さい正の整数)以下となるまで停止させる送信制御部とを備えることを特徴とする分散処理システム。
  3.  請求項1または2記載の分散処理システムにおいて、
     前記集計処理ノードは、
     各分散処理ノードから送信されたパケットを受信して前記分散データD[m,n]を番号mの順番に取得する受信部と、
     全分散処理ノードの分散データD[m,n]を重みw[m]毎に集計した前記集計データR[m]を生成する集計処理部と、
     前記集計データR[m]を番号mの順番にパケット化して各分散処理ノードに送信する送信部とを備えることを特徴とする分散処理システム。
  4.  請求項1乃至3のいずれか1項に記載の分散処理システムにおいて、
     各分散処理ノードは、
     前記ニューラルネットワークの学習用のサンプルデータが入力されたときに、前記ニューラルネットワークの重みw[m]の各々について、前記ニューラルネットワークの損失関数の勾配をサンプルデータ毎に計算する勾配計算処理部と、
     サンプルデータ毎の前記勾配を集計した数値である前記分散データD[m,n]を重みw[m]毎に生成して保持するノード内集計処理部とを、さらに備えることを特徴とする分散処理システム。
  5.  請求項1乃至4のいずれか1項に記載の分散処理システムにおいて、
     前記集計処理ノードと各分散処理ノードとは、
     各分散処理ノードがパケット化した分散データD[m,n]を前記集計処理ノードに送信して、前記集計処理ノードが受信したパケットから前記分散データD[m,n]を取得する集約通信処理と、前記集計処理ノードが前記集計データR[m]を生成する全ノード集計処理と、前記集計処理ノードがパケット化した前記集計データR[m]を各分散処理ノードに送信して、各分散処理ノードが受信したパケットから前記集計データR[m]を取得する分配通信処理と、各分散処理ノードが前記重みw[m]を更新する重み更新処理とを、それぞれ異なる番号mについて並行して行うことを特徴とする分散処理システム。
  6.  N個(Nは2以上の整数)の分散処理ノードの各々が、学習対象のニューラルネットワークのM個(Mは2以上の整数)の重みw[m]毎(m=1,・・・,M)の分散データD[m,n](n=1,・・・,N)を重みw[m]の番号mの順番にパケット化して集計処理ノードに送信する第1のステップと、
     前記集計処理ノードが、各分散処理ノードから送信されたパケットを受信して前記分散データD[m,n]を番号mの順番に取得する第2のステップと、
     前記集計処理ノードが、全分散処理ノードの分散データD[m,n]を重みw[m]毎に集計した集計データR[m]を生成する第3のステップと、
     前記集計処理ノードが、前記集計データR[m]を番号mの順番にパケット化して各分散処理ノードに送信する第4のステップと、
     前記分散処理ノードの各々が、前記集計処理ノードから送信されたパケットを受信して前記集計データR[m]を番号mの順番に取得する第5のステップと、
     前記分散処理ノードの各々が、前記集計データR[m]に基づいて前記ニューラルネットワークの重みw[m]を更新する第6のステップと、
     前記分散処理ノードの各々が、前記集計処理ノードに前記分散データD[m,n]を送信開始してからM個の前記集計データR[m]を取得し終えるまでの期間において、送信済みの分散データD[m,n]のデータ量と取得済みの集計データR[m]のデータ量との差である未受信データ量を監視し、この未受信データ量が閾値Ma以上となった場合に、前記第1のステップによる前記分散データD[m,n]の送信を、前記未受信データ量が閾値Mb(Mb<Ma)以下となるまで停止する第7のステップとを含むことを特徴とする分散処理方法。
  7.  請求項6記載の分散処理方法において、
     前記第1のステップの前に、前記分散処理ノードの各々が、前記ニューラルネットワークの学習用のサンプルデータが入力されたときに、前記ニューラルネットワークの重みw[m]の各々について、前記ニューラルネットワークの損失関数の勾配をサンプルデータ毎に計算する第8のステップと、
     前記分散処理ノードの各々が、サンプルデータ毎の前記勾配を集計した数値である前記分散データD[m,n]を重みw[m]毎に生成して保持する第9のステップとを、さらに含むことを特徴とする分散処理方法。
  8.  請求項6または7記載の分散処理方法において、
     前記分散処理ノードの前記第1のステップおよび前記集計処理ノードの前記第2のステップと、前記集計処理ノードの前記第3のステップと、前記集計処理ノードの前記第4のステップおよび前記分散処理ノードの前記第5のステップと、前記分散処理ノードの前記第6のステップとを、それぞれ異なる番号mについて並行して行うことを特徴とする分散処理方法。
PCT/JP2019/020107 2018-06-15 2019-05-21 分散処理システムおよび分散処理方法 WO2019239821A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/973,707 US11823063B2 (en) 2018-06-15 2019-05-21 Distributed processing system and distributed processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018114349A JP7010153B2 (ja) 2018-06-15 2018-06-15 分散処理システムおよび分散処理方法
JP2018-114349 2018-06-15

Publications (1)

Publication Number Publication Date
WO2019239821A1 true WO2019239821A1 (ja) 2019-12-19

Family

ID=68842459

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/020107 WO2019239821A1 (ja) 2018-06-15 2019-05-21 分散処理システムおよび分散処理方法

Country Status (3)

Country Link
US (1) US11823063B2 (ja)
JP (1) JP7010153B2 (ja)
WO (1) WO2019239821A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3996005A1 (en) 2020-11-06 2022-05-11 Fujitsu Limited Calculation processing program, calculation processing method, and information processing device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021214863A1 (ja) * 2020-04-21 2021-10-28 日本電信電話株式会社 分散処理システムおよび分散処理方法
US20230273835A1 (en) 2020-08-05 2023-08-31 Nippon Telegraph And Telephone Corporation Computer System and Arithmetic Processing Method
US20230239239A1 (en) * 2022-01-25 2023-07-27 Qualcomm Incorporated Upper analog media access control (mac-a) layer functions for analog transmission protocol stack

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0637855A (ja) * 1992-07-15 1994-02-10 Hitachi Cable Ltd 受信バッファ資源管理方式
WO2017167044A1 (zh) * 2016-03-26 2017-10-05 阿里巴巴集团控股有限公司 一种分布式集群训练方法和装置

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0637855A (ja) * 1992-07-15 1994-02-10 Hitachi Cable Ltd 受信バッファ資源管理方式
WO2017167044A1 (zh) * 2016-03-26 2017-10-05 阿里巴巴集团控股有限公司 一种分布式集群训练方法和装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3996005A1 (en) 2020-11-06 2022-05-11 Fujitsu Limited Calculation processing program, calculation processing method, and information processing device

Also Published As

Publication number Publication date
JP2019219714A (ja) 2019-12-26
US11823063B2 (en) 2023-11-21
JP7010153B2 (ja) 2022-01-26
US20210216866A1 (en) 2021-07-15

Similar Documents

Publication Publication Date Title
WO2019239821A1 (ja) 分散処理システムおよび分散処理方法
US10679145B2 (en) System and method for balancing computation with communication in parallel learning
CN106815254B (zh) 一种数据处理方法和装置
CN100531129C (zh) 用于在网络处理器中记帐的装置和方法
CN110149282B (zh) 流量调度方法和装置
CN112000457A (zh) 管理处理系统中的任务的方法、设备和计算机程序产品
US20210357723A1 (en) Distributed Processing System and Distributed Processing Method
WO2019159784A1 (ja) 分散処理システムおよび分散処理方法
CN114205310A (zh) 一种基于时间敏感网络的数据传输方法、装置和电子设备
JP7420228B2 (ja) 分散処理システムおよび分散処理方法
KR102153814B1 (ko) 로드 균형을 위한 확률 기반 적응형 라우팅 알고리즘
US10200296B2 (en) Packet transport apparatus, packet transport system and packet transport method
US20220398431A1 (en) Distributed Deep Learning System and Data Transfer Method
JP7192984B2 (ja) 分散処理システムおよび分散処理方法
US9887928B2 (en) System and method for identifying performance characteristics in asynchronous networks
TW201631927A (zh) 用於在網路交換機收集針對封包流的多個並行查找查詢的回應的裝置和方法
KR20210137472A (ko) 파이프라인 연산 장치, 프로그래머블 로직 콘트롤러, 및 파이프라인 처리의 실행 방법
Meyer et al. Low latency packet processing in software routers
US11966310B1 (en) Analysis of events in an integrated circuit using cause tree and buffer
JP7074017B2 (ja) 分散処理システムおよび分散処理方法
CN115250251B (zh) 片上网络仿真中的传输路径规划方法、装置、电子设备及计算机可读存储介质
CN107544788B (zh) 一种带时间印记的数据流图拥塞检测方法
JP7074018B2 (ja) 分散処理システムおよび分散処理方法
US20240152438A1 (en) Analysis of Events in an Integrated Circuit Using Cause Tree and Buffer
CN110442612B (zh) 一种数据查询方法、电子设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19820182

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19820182

Country of ref document: EP

Kind code of ref document: A1