Abstract:
A machine learning method includes installing a plurality of model replicas for training on a plurality of computer learning nodes; receiving training data at a each model replica and updating parameters for the model replica after trailing; sending the parameters to other model replicas with a communication batch size; evaluating received parameters from other model replicas; and dynamically adjusting the communication batch size to balance computation and communication overhead and ensuring convergence even with a mismatch in processing abilities on different computer learning nodes.

Description:
[0001]    This application claims priority to Provisional Application 62202224, the content of which is incorporated by reference. 
     
    
     BACKGROUND 
       [0002]    The present invention relates to parallel learning. 
         [0003]    Distributed systems aim to make many machines work harmoniously together as though they were one. With an increase in the volume of data being collected today, the need to efficiently distribute computation has greatly increased. Today, distributed computation is ubiquitous. For some problems, there are many existing implementations of distributed systems that can scale out computation efficiently, but there are many other problems where significant roadblocks prevent efficient distribution. 
         [0004]    There are many platforms that implement distributed machine learning. One approach is shown in  FIG. 1 , where all models train asynchronously without any guarantees (Mini Batching). In asynchronous mini-batching, parallel models train asynchronously and exchange updates after processing a fixed number of iterations (fixed communication batch size). As different models process at different speeds, the models may diverge from one-another. Furthermore, if the developers chooses a naïve value of batch size, the computation may be imbalanced in terms of CPU and network. Another platform is called Bounded-Staleness learning shown in  FIG. 2 . The bounded staleness approach towards mini-batching trains asynchronously. Additionally, each node sends its iteration count apart from the updates. If a node notices it is too far ahead of another node, it slows down waiting for the slower node to catch up. In this approach, like mini-batching the communication batch size is fixed. 
       SUMMARY 
       [0005]    In one aspect, a machine learning method includes installing a plurality of model replicas for training on a plurality of computer learning nodes; receiving training data at a each model replica and updating parameters for the model replica after trailing; sending the parameters to other model replicas with a communication batch size; evaluating received parameters from other model replicas; and dynamically adjusting the communication batch size to balance computation and communication overhead and ensuring convergence even with a mismatch in processing abilities on different computer learning nodes. 
         [0006]    In another aspect, a machine learning method includes installing a plurality of model replicas for training on a plurality of computation nodes; receiving training data at a each model replica and updating parameters for the model replica after training; sending the parameters to all other model replicas with a starting communication batch size; evaluating received parameters from other model replicas; and adjusting the communication batch size during training to balance computation and communication overhead and ensuring convergence even with a mismatch in processing abilities on different computation nodes. 
         [0007]    In another aspect, training data is received by a model replica, which computes the new model parameters W. The new model is sent after a predetermined N iterations to all other replicas. The system then reads and counts the number of receiving replicas. Next, the system merges the received models and increases a communication batch size (cb_size) if the number of received models are below a predetermined threshold, and decreases the cb_size if the number of received models exceed another threshold called iteration counts. cb size represents a communication batch size with the number of samples trained before the updated model is sent out iter_count represents the iteration count (of data) being processed at each node. 
         [0008]    Implementations of the above aspects may include one or more of the following. The method includes sending iteration counts and counting the model updates that arrive at each model replica, and if a model replica notices too few replicas, the model replica increases the communication batch size in increments, and if the model replica notices other model replicas have higher iteration counts as compared to its iteration count, the model replica increases model update transmission frequency as other computation nodes merge their updates. The method achieves balancing computation and communication in distributed machine learning. The communication batch sizes can be adjusted to automatically balance processor and network loads. The method includes ensuring accurate convergence and high accuracy machine learning models by adjusting training sizes with communication batch sizes. A plurality of model replicas can train in parallel using parameter updates. The model replicas can train and compute new model weights. The method includes sending or receiving parameters from all other model replicas and applying the parameters to the current model replica model. 
         [0009]    Advantages of the preferred embodiments may include one or more of the following. Balancing CPU and network provides an efficient system that trains machine-learning models quickly and with low running costs. Ensuring all replicas converge at the same time, improves model accuracy. More accurate models, with faster training times ensures that all NEC businesses and applications such as job recommendations, internet helpdesks, etc. provide more accurate results. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0010]      FIG. 1  shows a conventional system, where all models train asynchronously without any guarantees (Mini Batching). 
           [0011]      FIG. 2  shows the Bounded Staleness approach. 
           [0012]      FIG. 3  shows the overall architecture of the system with data and model parameters in MALT. 
           [0013]      FIG. 4  shows an exemplary system in accordance with the present invention. 
           [0014]      FIG. 5  shows an exemplary processing system to which the present principles may be applied, in accordance with an embodiment of the present principles; 
       
    
    
     DESCRIPTION 
       [0015]      FIG. 3  shows the overall architecture of the system with data and model parameters in our implementation system MALT. In this system, a plurality of model replicas train in parallel using parameter updates. The model replicas train and compute new model weights. They send/receive parameters from everyone and apply them to their own model. 
         [0016]      FIG. 4  shows an exemplary system which balances communication with computation in addition to training with same speed. In this system, training data is received by each model replica, which computes the new model parameters W ( 1 ). The new model is sent after a predetermined N iterations to all other replicas ( 2 ). The system then reads and counts the number of receiving replicas ( 3 ). Next, the system merges the received models and increases a communication batch size cb_size if the number of received models are below a predetermined threshold, and decreases the cb_size if the number of received models exceed another threshold called iteration counts. cb size represents a communication batch size with the number of samples trained before the updated model is sent out iter_count represents the iteration count (of data) being processed at each node. The system of  FIG. 4  achieves the following: 
         [0017]    1) Balancing computation and communication in distributed machine learning. 
         [0018]    2) Adjusting the communication batch sizes at runtime (training time) to automatically balance CPU and network. 
         [0019]    3) Ensuring accurate convergence and high accuracy ML models by adjusting training sizes with communication batch sizes. 
         [0020]    The system can adjust the number of iterations before sending model updates (also called as adjusting the communication batch size). This allows the to balance CPU/network and adjust relative training speeds in parallel model replicas. 
         [0021]    The system balances CPU and network time in distributed model training to improve performance. A machine-learning model is a set of weights (or parameters), over features. Applying a new input data to this model, gives a prediction output to a classification or regression problem. Distributed machine learning involves training a machine-learning model in parallel. This consists of a cluster of machines, each one training one or more model replicas in parallel. Each replica trains on a subset of data and incrementally updates the machine-learning model, every iteration (or every few iterations). We refer the number of iterations after which models communicate model update as the communication batch size. The replicas merge the incoming models and continue training. Hence, there is a CPU cost of processing the data and computing the model parameter value and there is a network cost of sending the model parameters across the network. To ensure good performance in distributed settings, the amount of CPU and network should be balanced. If the nodes process too many examples before sending the updates, there is a high CPU cost of computing and applying the updates, while the network remains idle most of the time. If the nodes process very few examples and send updates frequently, the CPU may remain unutilized. Furthermore, in the asynchronous case, different machines may have different processing speeds, and there may be a mismatch on how quickly each node can send examples. 
         [0022]    The system tries to balance computation and communication and ensure convergence even when there is a mismatch in processing abilities on different nodes. This is done by sending the iteration counts and counting the model updates that arrive at each replica. If a replica notices too few replicas, it increases the communication batch size in small increments. If a replica, notices all replicas with very high iteration counts as compared to itself, it transmits frequently, to continue providing model updates, as other machines merge their updates. 
         [0023]    The distributed training is advantageous in many dimensions: scale, speed, with reduced costs. The distributed systems can handle more data than a single machine can. More disks, more memory, more CPUs, and other resources means that the volume of data is no longer an issue. When data is already distributed, pushing the computation to the data increases scalability. The distributed training is fast as the computation being distributed is inherently compute bound (i.e high CPU usage on all machines), or i/o bound (i.e high disk usage on all machines). In this setting adding more CPUs and more disks naturally help the cause. The system is economical as it can obtain the same level of performance with a cluster of several low-end computers. 
         [0024]    Referring now to the drawings in which like numerals represent the same or similar elements and initially to  FIG. 5 , an exemplary processing system  100 , to which the present principles may be applied, is illustratively depicted in accordance with an embodiment of the present principles. The processing system  100  includes at least one processor (CPU)  104  operatively coupled to other components via a system bus  102 . A cache  106 , a Read Only Memory (ROM)  108 , a Random Access Memo (RAM)  110 , an input/output (I/O) adapter  120 , a sound adapter  130 , a network adapter  140 , a user interface adapter  150 , and a display adapter  160 , are operatively coupled to the system bus  102 . 
         [0025]    A first storage device  122  and a second storage device  124  are operatively coupled to system bus  102  by the I/O adapter  120 . The storage devices  122  and  124  can be any of a disk storage device (e.g., a magnetic or optical disk storage device), a solid state magnetic device, and so forth. The storage devices  122  and  124  can be the same type of storage device or different types of storage devices. 
         [0026]    A speaker  132  is operatively coupled to system bus  102  by the sound adapter  130 . A transceiver  142  is operatively coupled to system bus  102  by network adapter  140 . A display device  162  is operatively coupled to system bus  102  by display adapter  160 . 
         [0027]    A first user input device  152 , a second user input device  154 , and a third user input device  156  are operatively coupled to system bus  102  by user interface adapter  150 . The user input devices  152 ,  154 , and  156  can be any of a keyboard, a mouse, a keypad, an image capture device, a motion sensing device, a microphone, a device incorporating the functionality of at least two of the preceding devices, and so forth. Of course, other types of input devices can also be used, while maintaining the spirit of the present principles. The user input devices  152 ,  154 , and  156  can be the same type of user input device or different types of user input devices. The user input devices  152 ,  154 , and  156  are used to input and output information to and from system  100 . 
         [0028]    Of course, the processing system  100  may also include other elements (not shown as readily contemplated by one of skill in the art, as well as omit certain elements. For example, various other input devices and/or output devices can be included in processing system  100 , depending upon the particular implementation of the same, as readily understood by one of ordinary skill in the art. For example, various types of wireless and/or wired input and/or output devices can be used. Moreover, additional processors, controllers, memories, and so forth, in various configurations can also be utilized as readily appreciated by one of ordinary skill in the art. These and other variations of the processing system  100  are readily contemplated by one of ordinary skill in the art given the teachings of the present principles provided herein. 
         [0029]    It should be understood that embodiments described herein may be entirely hardware, or may include both hardware and software elements which includes, but is not limited to, firmware, resident software, microcode, etc. 
         [0030]    Embodiments may include a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. A computer-usable or computer readable medium may include any apparatus that stores, communicates, propagates, or transports the program for use by or in connection with the instruction execution system, apparatus, or device. The medium can be magnetic, optical, electronic, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. The medium may include a computer-readable storage medium such as a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk, etc. 
         [0031]    A data processing system suitable for storing and/or executing program code may include at least one processor, e.g., a hardware processor, coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code to reduce the number of times code is retrieved from bulk storage during execution. Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) may be coupled to the system either directly or through intervening I/O controllers. 
         [0032]    The foregoing is to be understood as being in every respect illustrative and exemplary, but not restrictive, and the scope of the invention disclosed herein is not to be determined from the Detailed Description, but rather from the claims as interpreted according to the full breadth permitted by the patent laws. It is to be understood that the embodiments shown and described herein are only illustrative of the principles of the present invention and that those skilled in the art may implement various modifications without departing from the scope and spirit of the invention. Those skilled in the art could implement various other feature combinations without departing from the scope and spirit of the invention.