arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.18824cs.LG
收藏

批量大小不变的 Adam

Batch size invariant Adam

Manning College of Information and Computer Sciences(曼宁信息与计算机科学学院);University of Massachusetts Amherst(马萨诸塞大学阿默斯特分校);University of Bristol(布里斯托大学)

Xi Wang, Laurence Aitchison

AI总结:

针对分布式训练中 Adam 随 micro-batch 划分而改变更新尺度的问题,本文通过先平方后平均梯度构造 v 项,在无需梯度方差主导假设的情况下实现批量大小不变性。

摘要:

我们提出了一种批量大小不变版本的 Adam,用于大规模分布式环境;在这种环境中,mini-batch 被划分为若干 micro-batch,并分布到工作节点之间。对于 v 项,标准 Adam 首先对各 micro-batch 梯度求平均,然后再平方;而在本文提出的批量大小不变 Adam 中,我们首先对各 micro-batch 梯度平方,然后再求平均。以往工作(例如 Malladi 等人,2022)采用了另一种方法,其中涉及学习率的平方根缩放,但这种方法需要很强的假设才能奏效;特别是需要假设梯度方差主导期望梯度的平方。相比之下,本文提出的方法无需该假设即可获得批量大小不变性。我们通过实验确认,在实践中,与以往方法相比,我们的方案能在范围大得多的场景中给出批量大小不变性。

英文摘要:

We propose a batch size invariant version of Adam, for use in large-scale, distributed settings, in which the mini-batch is divided into micro-batches which are distributed among worker nodes. For the v term, standard Adam first computes the average over micro-batch gradients, then squares, while in the batch size invariant Adam proposed here, we first square the micro-batch gradients, then average. Previous work (e.g. Malladi et al. 2022) used an alternative approach that involved a square-root scaling of the learning rate, but this approach requires strong assumptions to work; in particular that the gradient variance dominates the square of the expected gradient. In contrast, the approach proposed here gives batch size invariance without this assumption. We confirm that in practice our scheme gives batch size invariance in a much larger range of scenarios than the previous approach.

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

↑