arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2105.10762cs.LGcs.AI
收藏

AutoLRS:动态贝叶斯优化的自动学习率调度

AutoLRS: Automatic Learning-Rate Schedule by Bayesian Optimization on the Fly

University of Washington(华盛顿大学);ByteDance Inc.(字节跳动公司);KAUST(阿卜杜拉国王科技大学)

Yuchen Jin, Tianyi Zhou, Liangyu Zhao, Yibo Zhu, Chuanxiong Guo, Marco Canini, Arvind Krishnamurthy

摘要:

学习率(LR)调度是训练DNN时需要仔细调整的最重要的超参数之一。然而,它也是机器学习系统中自动化程度最低的部分之一,通常需要大量的人工努力和计算。虽然有预定义的LR调度和具有自适应LR的优化器,但它们引入了新的超参数,需要针对不同的任务/数据集单独进行调整。在本文中,我们考虑的问题:我们可以自动调整LR在培训过程中没有人的参与?我们提出了一种有效的方法,AutoLRS,自动优化LR为每个训练阶段的建模训练动态。AutoLRS旨在找到应用于每个$τ$步骤的LR,以最大限度地减少验证损失。我们通过贝叶斯优化(BO)来解决这个黑盒优化。然而,为BO收集训练实例需要系统针对$τ$步骤评估由BO的获取功能查询的每个LR,这在实践中是非常昂贵的。相反,我们只对$τ'\llτ$步骤应用每个候选LR,并训练指数模型来预测$τ$步骤后的验证损失。BO和损失预测模型之间的这种相互训练过程允许我们限制BO搜索中投入的训练步骤。我们通过使用不同的优化器为不同领域的任务训练DNN的广泛实验,展示了AutoLRS的优势和通用性。与原始论文中的LR调度相比,AutoLRS自动生成的LR调度分别在训练ResNet-50、Transformer和BERT时导致$1.22\times$、$1.43\times$和$1.5\times$的加速,并且与最先进的高度调优的LR调度相比,平均加速为$1.31\times$。

英文摘要:

The learning rate (LR) schedule is one of the most important hyper-parameters needing careful tuning in training DNNs. However, it is also one of the least automated parts of machine learning systems and usually costs significant manual effort and computing. Though there are pre-defined LR schedules and optimizers with adaptive LR, they introduce new hyperparameters that need to be tuned separately for different tasks/datasets. In this paper, we consider the question: Can we automatically tune the LR over the course of training without human involvement? We propose an efficient method, AutoLRS, which automatically optimizes the LR for each training stage by modeling training dynamics. AutoLRS aims to find an LR applied to every $τ$ steps that minimizes the resulted validation loss. We solve this black-box optimization on the fly by Bayesian optimization (BO). However, collecting training instances for BO requires a system to evaluate each LR queried by BO's acquisition function for $τ$ steps, which is prohibitively expensive in practice. Instead, we apply each candidate LR for only $τ'\llτ$ steps and train an exponential model to predict the validation loss after $τ$ steps. This mutual-training process between BO and the loss-prediction model allows us to limit the training steps invested in the BO search. We demonstrate the advantages and the generality of AutoLRS through extensive experiments of training DNNs for tasks from diverse domains using different optimizers. The LR schedules auto-generated by AutoLRS lead to a speedup of $1.22\times$, $1.43\times$, and $1.5\times$ when training ResNet-50, Transformer, and BERT, respectively, compared to the LR schedules in their original papers, and an average speedup of $1.31\times$ over state-of-the-art heavily-tuned LR schedules.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑