解耦权重衰减正则化

Decoupled Weight Decay Regularization

弗兰克·胡特 Frank Hutter · University of Freiburg · 2017-11-14 · arXiv:1711.05101 ↗ · 被引 2700

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

L2 正则化与权重衰减正则化在标准随机梯度下降中(按学习率重新缩放后)是等价的,但我们证明对于自适应梯度算法(如 Adam)并非如此。尽管这些算法的常见实现采用 L2 正则化(由于我们揭示的不等价性,将其称为“权重衰减”可能具有误导性),我们提出了一种简单的修改,通过将权重衰减与相对于损失函数的优化步骤解耦,恢复权重衰减正则化的原始形式。我们提供的经验证据表明,我们提出的修改(i)将权重衰减因子的最优选择与标准 SGD 和 Adam 的学习率设置解耦,(ii)显著提高了 Adam 的泛化性能,使其能够与带动量的 SGD 在图像分类数据集上竞争(此前 Adam 通常被后者超越)。我们提出的解耦权重衰减已被许多研究者采用,社区已在 TensorFlow 和 PyTorch 中实现;我们实验的完整源代码可在 https://github.com/loshchil/AdamW-and-SGDW 获取。

L$_2$ regularization and weight decay regularization are equivalent for standard stochastic gradient descent (when rescaled by the learning rate), but as we demonstrate this is \emph{not} the case for adaptive gradient algorithms, such as Adam. While common implementations of these algorithms employ L$_2$ regularization (often calling it "weight decay" in what may be misleading due to the inequivalence we expose), we propose a simple modification to recover the original formulation of weight decay regularization by \emph{decoupling} the weight decay from the optimization steps taken w.r.t. the loss function. We provide empirical evidence that our proposed modification (i) decouples the optimal choice of weight decay factor from the setting of the learning rate for both standard SGD and Adam and (ii) substantially improves Adam's generalization performance, allowing it to compete with SGD with momentum on image classification datasets (on which it was previously typically outperformed by the latter). Our proposed decoupled weight decay has already been adopted by many researchers, and the community has implemented it in TensorFlow and PyTorch; the complete source code for our experiments is available at https://github.com/loshchil/AdamW-and-SGDW

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 12)

阅读逐段中英对照全文 →