Grokfast:通过放大慢梯度加速顿悟
Grokfast: Accelerated Grokking by Amplifying Slow Gradients
AI总结:
本文提出Grokfast方法,通过将梯度谱分解并放大其中缓慢变化的分量,仅用少量代码即可将顿悟现象的泛化过程加速超过50倍,并在图像、语言和图任务上验证了其有效性。
摘要:
机器学习中一个令人困惑的现象被称为顿悟(grokking),即在近乎完美地过拟合训练数据之后,延迟的泛化能力要在数十倍迭代之后才得以实现。着眼于机器学习实践者所关注的这一长时间延迟本身,我们的目标是加速处于顿悟现象下的模型泛化。通过将参数在训练迭代过程中的一系列梯度视为随时间变化的随机信号,我们可以将梯度下降下的参数轨迹谱分解为两个分量:快速变化的、导致过拟合的分量,以及缓慢变化的、诱导泛化的分量。这一分析使我们能够仅用几行放大梯度中缓慢变化分量的代码,就将顿悟现象加速超过50倍。实验表明,我们的算法适用于涉及图像、语言和图的各种任务,使这一突然泛化的奇特现象具备实际可用性。我们的代码可在 https://github.com/ironjr/grokfast 获取。
英文摘要:
One puzzling artifact in machine learning dubbed grokking is where delayed generalization is achieved tenfolds of iterations after near perfect overfitting to the training data. Focusing on the long delay itself on behalf of machine learning practitioners, our goal is to accelerate generalization of a model under grokking phenomenon. By regarding a series of gradients of a parameter over training iterations as a random signal over time, we can spectrally decompose the parameter trajectories under gradient descent into two components: the fast-varying, overfitting-yielding component and the slow-varying, generalization-inducing component. This analysis allows us to accelerate the grokking phenomenon more than $\times 50$ with only a few lines of code that amplifies the slow-varying components of gradients. The experiments show that our algorithm applies to diverse tasks involving images, languages, and graphs, enabling practical availability of this peculiar artifact of sudden generalization. Our code is available at https://github.com/ironjr/grokfast.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。