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

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

Info

Publication number
WO2019159784A1
WO2019159784A1 PCT/JP2019/004214 JP2019004214W WO2019159784A1 WO 2019159784 A1 WO2019159784 A1 WO 2019159784A1 JP 2019004214 W JP2019004214 W JP 2019004214W WO 2019159784 A1 WO2019159784 A1 WO 2019159784A1
Authority
WO
WIPO (PCT)
Prior art keywords
distributed
data
processing node
aggregation
distributed processing
Prior art date
Application number
PCT/JP2019/004214
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/967,463 priority Critical patent/US20210117783A1/en
Publication of WO2019159784A1 publication Critical patent/WO2019159784A1/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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0079Receiver details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0091Transmitter details

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. 12 shows a sequence of distributed processing of 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.
  • FIG. 13 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 an object of the present invention 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 an object of the present invention to provide a distributed processing system and a distributed processing method.
  • 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 for each 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. is there.
  • 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 for updating.
  • 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 includes a sixth step in which each of the distributed processing nodes updates the weight w [m] of the neural network based on the aggregated data R [m].
  • 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], a seventh step of calculating a slope 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 slope for each sample data. And an eighth 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.
  • 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 flowchart for explaining the weight update processing of the distributed processing node according to the first embodiment of the present invention.
  • FIG. 10 is a diagram showing a processing sequence of the aggregation processing node and the distributed processing node according to the first embodiment of the present invention.
  • FIG. 11 is a block diagram illustrating a configuration example of the aggregation processing node according to the second embodiment of the present invention.
  • FIG. 12 is a diagram showing a conventional deep learning distributed processing sequence.
  • FIG. 13 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.
  • 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 And a le network 26.
  • 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].
  • 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].
  • FIG. 9 is a flowchart for explaining the weight update processing of the distributed processing node 2 [n].
  • a weight update process for updating the weight w [m] of the neural network 26 in the own node is performed (step S109 in FIG. 9).
  • 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. 10 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.
  • 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.
  • FIG. 11 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].
  • This accumulation is started when each reception FIFO buffer 11 [n] is empty.
  • 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 transmitted from each reception FIFO buffer 11 [n]. read out.
  • the same aggregated data is passed to each transmitter 13 [n].
  • the calculation formula of the total data R [m] is as shown in the formula (2).
  • the transmitter 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 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, 10 ... Reception part, 11 ... Reception FIFO buffer, 12 ... Aggregation processing part, 13 ... Transmission part, 20 ... Sample input part, 21 ... Gradient calculation processing part, 22 ... Intra-node total processing unit, 23 ... transmitting unit, 24 ... receiving unit, 25 ... weight update processing unit, 26 ... neural network.

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)[n](n=1,・・・,N)は、学習対象のニューラルネットワークのM個の重みw[m]毎(m=1,・・・,M)の分散データD[m,n]を番号mの順番にパケット化して集計処理ノード(1)に送信し、集計処理ノード(1)から送信されたパケットを受信して集計データR[m]を番号mの順番に取得して、集計データR[m]に基づいてニューラルネットワークの重みw[m]を更新する。集計処理ノード(1)は、各分散処理ノード(2)[n]から送信されたパケットを受信して分散データD[m,n]を番号mの順番に取得し、全分散処理ノードの分散データD[m,n]を重みw[m]毎に集計した集計データR[m]を生成して、集計データR[m]を番号mの順番にパケット化して各分散処理ノード(2)[n]に送信する。

Description

分散処理システムおよび分散処理方法
 本発明は、集計処理ノードと複数の分散処理ノードとを連携させてニューラルネットワークの学習を行う分散処理システムおよび分散処理方法に関するものである。
 深層学習では、多層のニューロンモデルからなる学習対象について、各ニューロンモデルの重み(前段のニューロンモデルが出力した値に乗じる係数)を、入力したサンプルデータに基づいて更新することにより、推論精度を改善する。
 通常、推論精度を改善する手法には、ミニバッチ法が用いられている。ミニバッチ法では、サンプルデータ毎に前記重みに対する勾配を計算する勾配計算処理と、複数の異なるサンプルデータについて前記勾配を集計する(サンプルデータ毎に得られた勾配を重み別に合算する)集計処理と、各重みを前記集計された勾配に基づいて更新する重み更新処理と、を繰り返す。
 これらの処理、特に勾配計算処理は、多数回の演算を必要とするが、推論精度を向上させるために、重みの個数や入力するサンプルデータの個数が増加すると、深層学習に要する時間が増大するという、課題がある。
 勾配計算処理を高速化するため、分散処理の手法が用いられている。具体的には、複数の分散処理ノードを設け、各ノードは、各々異なるサンプルデータについて勾配計算処理を行う。これにより、ノード数に比例して単位時間に処理できるサンプルデータ数を増加させることが可能となるため、勾配計算処理を高速化できる(非特許文献1参照)。
 深層学習の分散処理において、集計処理を行うためには、分散処理ノード毎に得られたデータ(分散データ)を集計処理ノードに集約するための、各分散処理ノードから集計処理ノードへの通信(集約通信)と、集計処理ノードでの全ノード集計処理と、集計処理ノードが集計したデータ(集計データ)を各分散処理ノードに転送するための、集計処理ノードから分散処理ノードへの通信(分配通信)と、が必要となる。
 図12に、従来技術による、深層学習の分散処理のシーケンスを示す。分散処理ノード100[n](n=1,・・・,N)は、Iの期間においてサンプルデータ入力と勾配計算処理とノード内集計処理とを行い、分散データを集計処理ノード101に送信する。IIの期間では、このような各ノードからの送信が行われるが、各ノードが同時に分散データを送信するとは限らない。
 IIIの期間では、集計処理ノード101が各ノードから得られた勾配を重み別に合算する全ノード集計処理を行い、IVの期間において集計データを各分散処理ノード100[n]に送信する。Vの期間では、各分散処理ノード100[n]が重み更新処理を行う。
 こうして、分散処理が行われることにより、深層学習には、集約通信(II)と全ノード集計処理(III)と分配通信(IV)の各処理時間が加わる。
 このような処理時間は、深層学習を単一ノードで実施するシステムでは不要であり、深層学習の分散処理を行う上で、処理速度を低下させる要因となっている。
 近年、深層学習がより複雑な問題に適用されるようになってきており、重みの総数が増加する傾向にある。このため、分散データや集計データのデータ量が増大し、集約通信時間と分配通信時間が増大している。
 このように、深層学習の分散システムは、集約通信時間と分配通信時間の増大によって、各分散処理ノード数を増加させることにより、深層学習の高速化の効果が低下するという問題があった。図13は、従来の分散処理システムにおける分散処理ノード数と深層学習の処理性能との関係を示しており、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の順番にパケット化して各分散処理ノードに送信することを特徴とするものである。
 また、本発明の分散処理システムの1構成例において、各分散処理ノードは、前記分散データD[m,n]を番号mの順番にパケット化して前記集計処理ノードに送信する送信部と、前記集計処理ノードから送信されたパケットを受信して前記集計データR[m]を番号mの順番に取得する受信部と、前記集計データR[m]に基づいて前記ニューラルネットワークの重みw[m]を更新する重み更新処理部とを備えることを特徴とするものである。
 また、本発明の分散処理システムの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のステップとを含むことを特徴とするものである。
 また、本発明の分散処理方法の1構成例は、前記第1のステップの前に、前記分散処理ノードの各々が、前記ニューラルネットワークの学習用のサンプルデータが入力されたときに、前記ニューラルネットワークの重みw[m]の各々について、前記ニューラルネットワークの損失関数の勾配をサンプルデータ毎に計算する第7のステップと、前記分散処理ノードの各々が、サンプルデータ毎の前記勾配を集計した数値である前記分散データD[m,n]を重みw[m]毎に生成して保持する第8のステップとを、さらに含むことを特徴とするものである。
 また、本発明の分散処理方法の1構成例は、前記分散処理ノードの前記第1のステップおよび前記集計処理ノードの前記第2のステップと、前記集計処理ノードの前記第3のステップと、前記集計処理ノードの前記第4のステップおよび前記分散処理ノードの前記第5のステップと、前記分散処理ノードの前記第6のステップとを、それぞれ異なる番号mについて並行して行うことを特徴とするものである。
 本発明によれば、各分散処理ノードが、ニューラルネットワークの重み毎の分散データを順番にパケット化して集計処理ノードに送信し、集計処理ノードから送信されたパケットに格納された集計データを順番に取得してニューラルネットワークの重みを更新し、集計処理ノードが、各分散処理ノードから送信されたパケットに格納された分散データを順番に取得し、全分散処理ノードの分散データを集計した集計データをパケット化して各分散処理ノードに送信することにより、各分散処理ノードから集計処理ノードに分散データを送信する処理と、集計処理ノードから各分散処理ノードに集計データを送信する処理とを同時に行うことができ、効果的な分散処理を行うことができ、ニューラルネットワークの学習効率を向上させることができる。
図1は、本発明の第1の実施例に係る深層学習用分散処理システムの構成例を示すブロック図である。 図2は、本発明の第1の実施例に係る深層学習用分散処理システムの分散処理ノードの構成例を示すブロック図である。 図3は、本発明の第1の実施例に係る分散処理ノードのサンプルデータ入力処理と勾配計算処理とノード内集計処理を説明するフローチャートである。 図4は、本発明の第1の実施例に係る分散処理ノードの集約通信処理を説明するフローチャートである。 図5は、本発明の第1の実施例に係る集計処理ノードの集約通信処理を説明するフローチャートである。 図6は、本発明の第1の実施例に係る集計処理ノードの全ノード集計処理を説明するフローチャートである。 図7は、本発明の第1の実施例に係る集計処理ノードの分配通信処理を説明するフローチャートである。 図8は、本発明の第1の実施例に係る分散処理ノードの分配通信処理を説明するフローチャートである。 図9は、本発明の第1の実施例に係る分散処理ノードの重み更新処理を説明するフローチャートである。 図10は、本発明の第1の実施例に係る集計処理ノードと分散処理ノードの処理のシーケンスを示す図である。 図11は、本発明の第2の実施例に係る集計処理ノードの構成例を示すブロック図である。 図12は、従来の深層学習の分散処理のシーケンスを示す図である。 図13は、従来の分散処理システムにおける分散処理ノード数と深層学習の処理性能との関係を示す図である。
[第1の実施例]
 以下、本発明の実施例について図面を参照して説明する。図1は本発明の第1の実施例に係る深層学習用分散処理システムの構成例を示すブロック図である。図1の分散処理システムは、1個の集計処理ノード1と、ニューラルネットワークのサンプルデータ(学習データ)の集合毎に設けられたN個(Nは2以上の整数)の分散処理ノード2[n](n=1,・・・,N)とを備える。各分散処理ノード2[n]は、双方向の通信が可能なネットワーク3により、集計処理ノード1と接続されている。
 なお、本発明において、「ノード」とは、ネットワーク上に分散配置されているサーバ等の機器を意味する。
 図2は分散処理ノード2[n]の構成例を示すブロック図である。各分散処理ノード2[n]は、それぞれ図示しないデータ収集ノードから学習用のサンプルデータを受け取るサンプル入力部20と、サンプルデータが入力されたときに、ニューラルネットワークの重みの各々について、ニューラルネットワークの損失関数の勾配をサンプルデータ毎に計算する勾配計算処理部21と、サンプルデータ毎の勾配を集計した数値である分散データを重み毎に生成して保持するノード内集計処理部22と、分散データをパケット化して集計処理ノード1に送信する送信部23と、集計処理ノード1から送信されたパケットを受信して集計データを取得する受信部24と、集計データに基づいてニューラルネットワークの重みを更新する重み更新処理部25と、ソフトウェア的に構築された数学モデルであるニューラルネットワーク26とを備えている。
 図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に送信する集約通信を行う。
 このとき、各分散処理ノード2[n](n=1,・・・,N)の送信部23は、保持するM個の分散データD[m,n](m=1,・・・,M)を、Lg(Lgは1以上M未満の整数)個ずつPg個(Pgは2以上の整数)の集約通信パケットに振り分けて(図4ステップS103)、全ての集約通信パケットを送信し終えるまで(図4ステップS105において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個のデータを格納するようにしてもよい。
 図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ステップS106)。
 そして、各分散処理ノード2[n](n=1,・・・,N)の受信部24は、受信した分配通信パケットDP[p,n]から、集計処理ノード1が生成したLs個の集計データR[j](j=Ls×(p-1)+k、k=1,・・・,Ls)を取得する(図8ステップS107)。
 このように、各分散処理ノード2[n](n=1,・・・,N)は、集計処理ノード1が生成した集計データR[m](m=1,・・・,M)を、重みw[m]の番号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]を送信してもよい。
 図9は分散処理ノード2[n]の重み更新処理を説明するフローチャートである。各分散処理ノード2[n](n=1,・・・,N)の重み更新処理部25は、集計処理ノード1から重みw[m]の集計データR[m]を取得し終えた後に(図9ステップS108においてYES)、取得した集計データR[m]に基づいて、それぞれ自ノード内のニューラルネットワーク26の重みw[m]を更新する重み更新処理を行う(図9ステップS109)。
 重み更新処理においては、集計データ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が総合的に判断してもよい。
 図10に、集計処理ノード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の順番に更新する重み更新処理を行う。
 本実施例では、集約通信処理と全ノード集計処理と分配通信処理と重み更新処理とを、並行してほぼ同時に(パイプラインで)行うことが可能であり、各通信や各処理が終了するまで、次の処理を開始できなかった従来技術によるシーケンス(図12)と比較したとき、処理時間の大幅な短縮が可能となる。
 すなわち、各分散処理ノード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が図9で説明した重み更新処理を行う。
 したがって、例えば、集約通信処理と全ノード集計処理と分配通信処理と重み更新処理のそれぞれで時間Tを要する場合、従来技術では、これらの全ての処理を終えるのに4Tの時間を要したが、本実施例ではT+αの時間で済む。ここで、前記αは、任意の分散処理ノード2[n]が任意の分散データD[m,n]を集計処理ノード1に送信した時点から重みw[m]の更新が完了するまでの遅延時間である。本実施例では、重みw[m]の番号mの単位で処理をパイプライン化しているため、時間αはTと比較すると十分に小さい時間である。したがって、本実施例では、従来技術と比較して、集約通信処理と全ノード集計処理と分配通信処理と重み更新処理とに要する時間を、約1/4に短縮することが可能である。
[第2の実施例]
 次に、本発明の第2の実施例について説明する。本実施例は、第1の実施例の深層学習用分散処理システムの構成要素である集計処理ノード1の構成例を説明するものである。図11は集計処理ノード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)として送信する。
 図11に示したように、集計処理ノード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]に渡す。
 また、図11に示すように、集計処理ノード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]に送出する。
 図12で説明した従来技術では、集計処理ノード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の実施例で説明した集計処理ノード1と分散処理ノード2[n]の各々は、CPU(Central Processing Unit)、記憶装置及びインタフェースを備えたコンピュータと、これらのハードウェア資源を制御するプログラムによって実現することができる。集計処理ノード1と分散処理ノード2[n]の各々のCPUは、各々の記憶装置に格納されたプログラムに従って第1、第2の実施例で説明した処理を実行する。
 本発明は、ニューラルネットワークの機械学習を行う技術に適用することができる。
 1…集計処理ノード1、2…分散処理ノード、10…受信部、11…受信FIFOバッファ、12…集計処理部、13…送信部、20…サンプル入力部、21…勾配計算処理部、22…ノード内集計処理部、23…送信部、24…受信部、25…重み更新処理部、26…ニューラルネットワーク。

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の順番にパケット化して各分散処理ノードに送信することを特徴とする分散処理システム。
  2.  請求項1記載の分散処理システムにおいて、
     各分散処理ノードは、
     前記分散データD[m,n]を番号mの順番にパケット化して前記集計処理ノードに送信する送信部と、
     前記集計処理ノードから送信されたパケットを受信して前記集計データR[m]を番号mの順番に取得する受信部と、
     前記集計データR[m]に基づいて前記ニューラルネットワークの重みw[m]を更新する重み更新処理部とを備えることを特徴とする分散処理システム。
  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のステップとを含むことを特徴とする分散処理方法。
  7.  請求項6記載の分散処理方法において、
     前記第1のステップの前に、前記分散処理ノードの各々が、前記ニューラルネットワークの学習用のサンプルデータが入力されたときに、前記ニューラルネットワークの重みw[m]の各々について、前記ニューラルネットワークの損失関数の勾配をサンプルデータ毎に計算する第7のステップと、
     前記分散処理ノードの各々が、サンプルデータ毎の前記勾配を集計した数値である前記分散データD[m,n]を重みw[m]毎に生成して保持する第8のステップとを、さらに含むことを特徴とする分散処理方法。
  8.  請求項6または7記載の分散処理方法において、
     前記分散処理ノードの前記第1のステップおよび前記集計処理ノードの前記第2のステップと、前記集計処理ノードの前記第3のステップと、前記集計処理ノードの前記第4のステップおよび前記分散処理ノードの前記第5のステップと、前記分散処理ノードの前記第6のステップとを、それぞれ異なる番号mについて並行して行うことを特徴とする分散処理方法。
PCT/JP2019/004214 2018-02-16 2019-02-06 分散処理システムおよび分散処理方法 WO2019159784A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/967,463 US20210117783A1 (en) 2018-02-16 2019-02-06 Distributed processing system and distributed processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-025942 2018-02-16
JP2018025942A JP6915562B2 (ja) 2018-02-16 2018-02-16 分散処理システムおよび分散処理方法

Publications (1)

Publication Number Publication Date
WO2019159784A1 true WO2019159784A1 (ja) 2019-08-22

Family

ID=67619370

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/004214 WO2019159784A1 (ja) 2018-02-16 2019-02-06 分散処理システムおよび分散処理方法

Country Status (3)

Country Link
US (1) US20210117783A1 (ja)
JP (1) JP6915562B2 (ja)
WO (1) WO2019159784A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220398457A1 (en) * 2019-12-02 2022-12-15 Nippon Telegraph And Telephone Corporation Distributed Deep Learning System and Distributed Deep Learning Method
CN115282401B (zh) * 2022-07-22 2023-04-21 深圳市第二人民医院(深圳市转化医学研究院) 静脉输液泵控制系统、静脉输液泵控制方法和存储介质

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
21 March 2016 (2016-03-21), Retrieved from the Internet <URL:https://qiita.com/sz_dr/items/800d043f8ff92f49c18c> [retrieved on 20190422] *
LI,MU ET AL.: "Scaling Distributed Machine Learning with the Parameter Server", PROCEEDINGS OF THE 11TH USENIX SYMPOSIUM ON OPERATING SYSTEMS DESIGN AND IMPLEMENTATION, USENIX, 8 October 2014 (2014-10-08), pages 583 - 598, ISBN: 978-1-931971-16-4, Retrieved from the Internet <URL:https://www.cs.cmu.edu/~muli/file/parameter_server_osdi14.pdf> [retrieved on 20190422] *
YAMAZAKI, MASAFUMI ET AL.,: "Accelerating Deep Learning Framework with MPI", IPSJ SIG TECHNICAL REPORT:HIGH-PERFORMANCE COMPUTING (HPC), vol. 2016-HPC-155, no. 6, 8 August 2016 (2016-08-08), pages 1 - 8, ISSN: 2188-8841 *

Also Published As

Publication number Publication date
JP6915562B2 (ja) 2021-08-04
JP2019144643A (ja) 2019-08-29
US20210117783A1 (en) 2021-04-22

Similar Documents

Publication Publication Date Title
WO2019239821A1 (ja) 分散処理システムおよび分散処理方法
WO2019181374A1 (ja) 分散深層学習システム
JP6753874B2 (ja) 分散深層学習システム
WO2019159784A1 (ja) 分散処理システムおよび分散処理方法
US20210357723A1 (en) Distributed Processing System and Distributed Processing Method
WO2020003849A1 (ja) 分散深層学習システム、分散深層学習方法、およびコンピューティングインタコネクト装置
US9385940B2 (en) Distributed processing system, distributed processing device, routing table creation method and program recording medium
JP7192984B2 (ja) 分散処理システムおよび分散処理方法
US10200296B2 (en) Packet transport apparatus, packet transport system and packet transport method
JP7021132B2 (ja) 学習装置、学習方法およびプログラム
JP7420228B2 (ja) 分散処理システムおよび分散処理方法
JP7074017B2 (ja) 分散処理システムおよび分散処理方法
WO2019239802A1 (ja) 分散処理システムおよび分散処理方法
JP2019003405A (ja) 行動決定装置、方法、及びプログラム
JP7074018B2 (ja) 分散処理システムおよび分散処理方法
De Nicola et al. Stationary Characteristics Of Homogenous Geo/Geo/2 Queue With Resequencing In Discrete Time.
JP7248110B2 (ja) 分散深層学習システム
US20220391666A1 (en) Distributed Deep Learning System and Distributed Deep Learning Method
JP7102952B2 (ja) データ中継装置およびプログラム
Ferreira et al. On the Blocking Probability and Loss Rates in Nonpreemptive Oscillating Queueing Systems

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: 19753692

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: 19753692

Country of ref document: EP

Kind code of ref document: A1