arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.19449cs.LGcs.CLmath.OCstat.ML
收藏

重尾类别不平衡以及为何Adam在语言模型上表现优于梯度下降

Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language Models

University of British Columbia(不列颠哥伦比亚大学);Flatiron Institute(弗拉蒂伦研究所)

Frederik Kunstner, Robin Yadav, Alan Milligan, Mark Schmidt, Alberto Bietti

AI总结:

该研究揭示语言任务中的重尾类别不平衡是Adam在大语言模型上表现优于梯度下降的关键原因,通过多架构实验验证及理论证明,解释了两类优化器的性能差异机制。

摘要:

已有研究表明Adam在大语言模型上的表现优于梯度下降,且优势幅度比在其他任务上更大,但其中原因尚不明确。我们指出,造成这一性能差距的一个关键因素是语言任务中存在的重尾类别不平衡现象。使用梯度下降训练时,低频词的损失下降速度慢于高频词,由于大多数样本来自低频词,这会导致平均损失下降缓慢。另一方面,Adam和基于符号的方法对这一问题的敏感度更低。为证实该现象由类别不平衡导致,我们通过实验证明,这一行为可在不同架构和数据类型中复现,包括语言Transformer、视觉CNN和线性模型。在采用交叉熵损失的线性模型上,我们发现类别不平衡会导致梯度和海森矩阵出现不平衡、相关的特性,而学界此前假设这类特性会让Adam受益。我们还证明,在连续时间下,梯度下降在低频类别上收敛缓慢,而符号下降则不存在该问题。

英文摘要:

Adam has been shown to outperform gradient descent on large language models by a larger margin than on other tasks, but it is unclear why. We show that a key factor in this performance gap is the heavy-tailed class imbalance found in language tasks. When trained with gradient descent, the loss of infrequent words decreases more slowly than the loss of frequent ones. This leads to a slow decrease on the average loss as most samples come from infrequent words. On the other hand, Adam and sign-based methods are less sensitive to this problem. To establish that this behavior is caused by class imbalance, we show empirically that it can be reproduced across architectures and data types, on language transformers, vision CNNs, and linear models. On a linear model with cross-entropy loss, we show that class imbalance leads to imbalanced, correlated gradients and Hessians that have been hypothesized to benefit Adam. We also prove that, in continuous time, gradient descent converges slowly on low-frequency classes while sign descent does not.

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

↑