arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2202.00980cs.LGstat.ML
收藏

基于尺度不变结构的神经网络鲁棒训练

Robust Training of Neural Networks Using Scale Invariant Architectures

Princeton University(普林斯顿大学);Google Research(谷歌研究院);Google DeepMind(谷歌DeepMind)

Zhiyuan Li, Srinadh Bhojanapalli, Manzil Zaheer, Sashank J. Reddi, Sanjiv Kumar

摘要:

与SGD相比,像Adam这样的自适应梯度方法允许对现代深度网络进行鲁棒训练,特别是大语言模型。然而,自适应的使用不仅以额外内存为代价,而且还提出了一个基本问题:像SGD这样的非自适应方法是否可以享受类似的好处?在本文中,我们对这个问题提供了肯定的答案,建议通过以下通用配方实现鲁棒性和记忆效率的训练:(1)修改结构,使其具有尺度不变性,即参数的尺度不影响网络的输出;(2)采用SGD和权重衰减进行训练,以及可选地(3)与权重范数乘以$\sqrt{\tfrac{2λ}η}$成比例地裁剪全局梯度范数,其中$η$是学习率,而$λ$是权重衰减。我们表明,这种一般的方法是强大的参数和损失的重新调整,证明其收敛性只依赖于规模的初始化和损失,而标准的SGD甚至可能不会收敛许多初始化。按照我们的配方,我们设计了一个规模不变版本的BERT,称为SI BERT,当简单地用香草SGD训练时,它的性能与用自适应方法训练的BERT相当,比如亚当在下游任务上。

英文摘要:

In contrast to SGD, adaptive gradient methods like Adam allow robust training of modern deep networks, especially large language models. However, the use of adaptivity not only comes at the cost of extra memory but also raises the fundamental question: can non-adaptive methods like SGD enjoy similar benefits? In this paper, we provide an affirmative answer to this question by proposing to achieve both robust and memory-efficient training via the following general recipe: (1) modify the architecture and make it scale invariant, i.e. the scale of parameter doesn't affect the output of the network, (2) train with SGD and weight decay, and optionally (3) clip the global gradient norm proportional to weight norm multiplied by $\sqrt{\tfrac{2λ}η}$, where $η$ is learning rate and $λ$ is weight decay. We show that this general approach is robust to rescaling of parameter and loss by proving that its convergence only depends logarithmically on the scale of initialization and loss, whereas the standard SGD might not even converge for many initializations. Following our recipe, we design a scale invariant version of BERT, called SIBERT, which when trained simply by vanilla SGD achieves performance comparable to BERT trained by adaptive methods like Adam on downstream tasks.

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

↑