arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.06110stat.MLcond-mat.dis-nncs.LG
收藏

Grokking:从懒惰训练动力学到丰富训练动力学的转变

Grokking as the Transition from Lazy to Rich Training Dynamics

Harvard University(哈佛大学)

Tanishq Kumar, Blake Bordelon, Samuel J. Gershman, Cengiz Pehlevan

AI总结:

该研究提出grokking现象源于神经网络从懒惰训练动力学过渡到特征学习的丰富训练阶段,通过两层神经网络多项式回归实验验证机制,明确特征学习速率等关键决定因素及延迟泛化条件,并证实该机制在MNIST等更通用场景中同样适用。

摘要:

我们提出,grokking现象(即神经网络的训练损失下降远早于测试损失下降的现象),可能源于神经网络从懒惰训练动力学过渡到丰富的特征学习阶段。为阐明这一机制,我们研究了一个简单场景:采用两层神经网络解决多项式回归问题并使用 vanilla 梯度下降,该场景下无正则化时也会出现grokking,这一现象无法用现有理论解释。我们确定了此类网络测试损失的充分统计量,在训练过程中追踪这些统计量后发现,该场景下出现grokking的原因是:网络首先尝试用其初始特征拟合核回归解,随后进入后期特征学习阶段——在训练损失已经很低之后,才找到具有泛化能力的解。我们发现,grokking的关键决定因素包括特征学习速率(可通过缩放网络输出的参数精确调控),以及初始特征与目标函数$y(x)$的对齐程度。我们认为,这种延迟泛化现象出现的条件是:(1)初始神经正切核的顶部特征向量与任务标签$y(x)$不对齐,但(2)数据集规模足够大,使网络最终能够实现泛化,但又不会大到训练损失在所有训练轮次都与测试损失完全同步,且(3)网络从懒惰阶段开始训练,因此不会立即学习特征。最后我们提供证据表明,这种从懒惰(线性模型)到丰富训练(特征学习)的转变,在更通用的场景中也能调控grokking现象,比如MNIST数据集、单层Transformer以及师生网络场景。

英文摘要:

We propose that the grokking phenomenon, where the train loss of a neural network decreases much earlier than its test loss, can arise due to a neural network transitioning from lazy training dynamics to a rich, feature learning regime. To illustrate this mechanism, we study the simple setting of vanilla gradient descent on a polynomial regression problem with a two layer neural network which exhibits grokking without regularization in a way that cannot be explained by existing theories. We identify sufficient statistics for the test loss of such a network, and tracking these over training reveals that grokking arises in this setting when the network first attempts to fit a kernel regression solution with its initial features, followed by late-time feature learning where a generalizing solution is identified after train loss is already low. We find that the key determinants of grokking are the rate of feature learning -- which can be controlled precisely by parameters that scale the network output -- and the alignment of the initial features with the target function $y(x)$. We argue this delayed generalization arises when (1) the top eigenvectors of the initial neural tangent kernel and the task labels $y(x)$ are misaligned, but (2) the dataset size is large enough so that it is possible for the network to generalize eventually, but not so large that train loss perfectly tracks test loss at all epochs, and (3) the network begins training in the lazy regime so does not learn features immediately. We conclude with evidence that this transition from lazy (linear model) to rich training (feature learning) can control grokking in more general settings, like on MNIST, one-layer Transformers, and student-teacher networks.

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

↑