Weight decay is a standard regularization technique for training large language models (LLMs). While it is common to assign a uniform decay rate to every layer, this approach overlooks the structural diversity of LLMs and the varying spectral properties across modules. In this paper, we introduce AlphaDecay, a simple yet effective method that adaptively assigns different weight decay strengths to each module of an LLM. Our approach is guided by Heavy-Tailed Self-Regularization (HT-SR) theory, which analyzes the empirical spectral density (ESD) of weight correlation matrices to quantify "heavy-tailedness." Modules exhibiting more pronounced heavy-tailed ESDs, reflecting stronger feature learning, are assigned weaker decay, while modules with lighter-tailed spectra receive stronger decay. Our method leverages tailored weight decay assignments to balance the module-wise differences in spectral properties, leading to improved performance. Extensive pre-training tasks with various model sizes from 60M to 1B demonstrate that AlphaDecay achieves better perplexity and generalization than conventional uniform decay and other adaptive decay baselines. Our code is available at https://github.com/hed-ucas/AlphaDecay.


翻译:权重衰减是训练大语言模型(LLMs)的标准正则化技术。尽管通常为每一层分配统一的衰减率,但这种方法忽略了大语言模型的结构多样性以及模块间谱特性的差异。本文提出AlphaDecay,一种简单而有效的方法,能够自适应地为大语言模型的每个模块分配不同的权重衰减强度。该方法以重尾自正则化(HT-SR)理论为指导,通过分析权重相关矩阵的经验谱密度(ESD)来量化“重尾性”。对于表现出更显著重尾ESD(反映更强的特征学习能力)的模块,分配较弱的衰减;而对于谱分布较轻尾的模块,则分配较强的衰减。我们的方法利用定制化的权重衰减分配来平衡模块间谱特性的差异,从而提升模型性能。在参数量从60M到1B的不同规模模型上进行的大量预训练实验表明,AlphaDecay在困惑度和泛化能力上均优于传统的统一衰减方法及其他自适应衰减基线。代码已开源:https://github.com/hed-ucas/AlphaDecay。

0
下载
关闭预览

相关内容

【ICML2022】Sharp-MAML:锐度感知的模型无关元学习
专知会员服务
17+阅读 · 2022年6月10日
【ICML2021】因果匹配领域泛化
专知
12+阅读 · 2021年8月12日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员