Weight decay (WD) is a traditional regularization technique in deep learning, but despite its ubiquity, its behavior is still an area of active research. Golatkar et al. have recently shown that WD only matters at the start of the training in computer vision, upending traditional wisdom. Loshchilov et al. show that for adaptive optimizers, manually decaying weights can outperform adding an $l_2$ penalty to the loss. This technique has become increasingly popular and is referred to as decoupled WD. The goal of this paper is to investigate these two recent empirical observations. We demonstrate that by applying WD only at the start, the network norm stays small throughout training. This has a regularizing effect as the effective gradient updates become larger. However, traditional generalizations metrics fail to capture this effect of WD, and we show how a simple scale-invariant metric can. We also show how the growth of network weights is heavily influenced by the dataset and its generalization properties. For decoupled WD, we perform experiments in NLP and RL where adaptive optimizers are the norm. We demonstrate that the primary issue that decoupled WD alleviates is the mixing of gradients from the objective function and the $l_2$ penalty in the buffers of Adam (which stores the estimates of the first-order moment). Adaptivity itself is not problematic and decoupled WD ensures that the gradients from the $l_2$ term cannot "drown out" the true objective, facilitating easier hyperparameter tuning.
First Order Model-Based RL through Decoupled Backpropagation
Machines in Motion Laboratory, New York University, USA(纽约大学运动机器实验室);LAAS-CNRS, Université de Toulouse, CNRS, Toulouse, France(图卢兹大学LAAS-CNRS);Artificial and Natural Intelligence Toulouse Institute, Toulouse, France(图卢兹人工智能与自然智能研究所)
On the Equivalence of Decoupled Graph Convolution Network and Label Propagation
University of Science and Technology of China(中国科学技术大学);National University of Singapore(新加坡国立大学);North Carolina State University(北卡罗来纳州立大学);Tsinghua University(清华大学)
L $_2$正则化和权重衰减正则化对于标准的随机梯度下降是等价的(当通过学习率重新缩放时),但是正如我们所证明的,这是自适应梯度算法的\emph{not}情况,例如Adam。虽然这些算法的常见实现采用L $_2$正则化(通常称之为“权重衰减”,由于我们暴露的不等价性,可能会产生误导),但我们提出了一个简单的修改,以通过\emph{decoupling}从w.r.t.损失函数。我们提供的经验证据表明,我们提出的修改(i)从标准SGD和Adam的学习率设置中获得了权重衰减因子的最佳选择,(ii)大大提高了Adam的泛化性能,使其能够在图像分类数据集上与具有动量的SGD竞争(在此之前,后者通常优于前者)。我们提出的解耦权重衰减已经被许多研究人员采用,社区已经在TensorFlow和PyTorch中实现了它;我们实验的完整源代码可以在https://github.com/loshchil/AdamW-and-SGDW上获得
University of California, Berkeley(加州大学伯克利分校);Lawrence Berkeley National Laboratory(劳伦斯伯克利国家实验室);Tel-Aviv University(特拉维夫大学);École Polytechnique Fédérale de Lausanne (EPFL)(洛桑联邦理工学院)
pQuant: Towards Effective Low-Bit Language Models via Decoupled Linear Quantization-Aware Training
School of Computer Science, Peking University(北京大学计算机学院);College of Future Information Technology, Fudan University(复旦大学未来信息技术学院);Center for Information Research, Academy of Military Sciences(军事科学院信息研究所);Advanced Institute of Big Data(大数据高级研究所);Center of Machine Learning Research, Peking University(北京大学机器学习研究中心)
Fine-Tuning Pretrained Language Models: Weight Initializations, Data Orders, and Early Stopping
Language Technologies Institute, School of Computer Science, Carnegie Mellon University(卡内基梅隆大学计算机科学学院语言技术研究所);Allen Institute for Artificial Intelligence(艾伦人工智能研究所);Paul G. Allen School of Computer Science and Engineering, University of Washington(华盛顿大学保罗·G·艾伦计算机科学与工程学院)