现代机器学习模型通常使用随机梯度下降(SGD)在诸如GPU的大规模并行计算资源上进行训练。增加小批量是利用并行计算能力的一种简单而直接的方法。对于小批量,批量大小的增加会导致训练时间的成比例减少,这种现象称为线性缩放。但是,将批大小增加到超过某个值不会进一步改善训练时间。在本文中,我们开发的第一个分析框架,扩展线性缩放,以匹配并行计算能力的资源。该框架是为一类经典的内核机器设计的。它自动修改标准内核机器以输出数学上等效的预测函数,但允许扩展的线性缩放,即,在给定硬件上实现更高效的并行化和更快的训练时间。由此产生的算法是准确的,原则性和非常快。例如,使用单个Titan Xp GPU,在ImageNet上使用$1.3\times 10^6$数据点和$1000$标签进行训练需要不到一个小时,而较小的数据集(如MNIST)需要几秒钟。由于参数是基于理论界解析地选择的,因此除了选择核和核参数之外,几乎不需要调整,进一步促进了这些方法的实际使用。
英文摘要:
Modern machine learning models are typically trained using Stochastic Gradient Descent (SGD) on massively parallel computing resources such as GPUs. Increasing mini-batch size is a simple and direct way to utilize the parallel computing capacity. For small batch an increase in batch size results in the proportional reduction in the training time, a phenomenon known as linear scaling. However, increasing batch size beyond a certain value leads to no further improvement in training time. In this paper we develop the first analytical framework that extends linear scaling to match the parallel computing capacity of a resource. The framework is designed for a class of classical kernel machines. It automatically modifies a standard kernel machine to output a mathematically equivalent prediction function, yet allowing for extended linear scaling, i.e., higher effective parallelization and faster training time on given hardware.
The resulting algorithms are accurate, principled and very fast. For example, using a single Titan Xp GPU, training on ImageNet with $1.3\times 10^6$ data points and $1000$ labels takes under an hour, while smaller datasets, such as MNIST, take seconds. As the parameters are chosen analytically, based on the theoretical bounds, little tuning beyond selecting the kernel and the kernel parameter is needed, further facilitating the practical use of these methods.
AdaBatch: Adaptive Batch Sizes for Training Deep Neural Networks
University of California, Berkeley(加州大学伯克利分校);NVIDIA(英伟达)
使用随机梯度下降或其变体训练深度神经网络需要仔细选择学习率和批量大小。虽然较小的批量大小通常在较少的训练时期内收敛,但较大的批量大小提供更多的并行性,因此具有更好的计算效率。我们已经开发了一种新的训练方法,而不是静态地为所有时期选择单个批量大小,而是在训练过程中自适应地增加批量大小。我们的方法提供了小批量的收敛速度,同时实现类似于大批量的性能。我们使用标准的AlexNet,ResNet和VGG网络在流行的CIFAR-10,CIFAR-100和ImageNet数据集上运行来分析我们的方法。我们的研究结果表明,自适应批量大小的学习可以在4个NVIDIA Tesla P100 GPU上将性能提高高达6.25倍,同时相对于固定批量大小的训练,准确率的变化不到1%。
Communication-Efficient Adaptive Batch Size Strategies for Distributed Local Gradient Methods
Perelman School of Medicine, University of Pennsylvania(宾夕法尼亚大学佩雷尔曼医学院);The University of Chicago Booth School of Business(芝加哥大学布斯商学院);Northwestern University(西北大学);University of Southern California Marshall School of Business(南加州大学马歇尔商学院)
AdaBatchGrad: Combining Adaptive Batch Size and Adaptive Step Size
Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学);Moscow Institute of Physics and Technology(莫斯科物理技术学院);Institute for Information Transmission Problems RAS(俄罗斯科学院信息传输问题研究所);Innopolis University(因诺波利斯大学);Skoltech(斯科尔科沃科学技术研究院)
Adaptive Batch Size Schedules for Distributed Training of Language Models with Data and Model Parallelism
Perelman School of Medicine, University of Pennsylvania(宾夕法尼亚大学佩雷尔曼医学院);The University of Chicago Booth School of Business(芝加哥大学布斯商学院);Northwestern University(西北大学);University of Southern California Marshall School of Business(南加州大学马歇尔商学院)