这些条件共同导致训练曲线出现延迟分离和突然收敛的顿悟现象<ref><ref name="Kumar_grokking_dynamics">{{cite web | author1=Kumar T | author2=Bordelon B | author3=Gershman S J | author4=Pehlevan C | year=2024 | title=Grokking as the Transition from Lazy to Rich Training Dynamics | website=Twelfth International Conference on Learning Representations (ICLR) | url=https://openreview.net/forum?id=vt5mnLVIVo }}</ref></ref>。
+
这些条件共同导致训练曲线出现延迟分离和突然收敛的顿悟现象<ref><ref name="Kumar_grokking_dynamics">{{cite web | author1=Kumar T | author2=Bordelon B | author3=Gershman S J | author4=Pehlevan C | year=2024 | title=Grokking as the Transition from Lazy to Rich Training Dynamics | website=Twelfth International Conference on Learning Representations (ICLR) | url=https://openreview.net/forum?id=vt5mnLVIVo }}</ref>。
== 促进顿悟的方法 ==
== 促进顿悟的方法 ==
第110行:
第110行:
=== 权重初始化 ===
=== 权重初始化 ===
+
权重初始化的方法即用“已顿悟”的模型部件来给新模型“开小灶”,让它提前“顿悟”<ref><ref name="Furuta2024grokked_transformers">{{cite journal | author1=Furuta, H. | author2=Minegishi, G. | author3=Iwasawa, Y. | author4=Matsuo, Y. | year=2024 | title=Towards Empirical Interpretation of Internal Circuits and Properties in Grokked Transformers on Modular Polynomials | journal=Transactions on Machine Learning Research | volume= | issue= | pages= | issn=2835-8856 | url=https://openreview.net/forum?id=MzSf70uXJO | doi= }}</ref></ref>。首先在简单任务(如模加法)上预训练一个Transformer直到其顿悟,然后将其组件——嵌入层或整个Transformer主体——取出,作为新模型在相关任务(如模减法、线性表达式)对应组件的初始化权重,并在后续训练中保持这些权重冻结(不更新),以此研究不同任务间内部表示与算法的相似性,并显著加速新任务的顿悟过程。但该方法的成功高度依赖于源任务和目标任务之间的相似性,对于更复杂的操作,简单移植基础算术的组件可能不足以提供有效的“先天知识”,复杂任务可能需要发现全新的、更复杂的算法。
=== 梯度分量增强 ===
=== 梯度分量增强 ===
+
该方法的核心思想是,在模型训练过程中,每个参数的梯度都由两种变化模式组成:一种是快速变化的部分,它让模型快速记住训练数据(即过拟合);另一种是缓慢变化的部分,它才真正引导模型学习通用的规律(即泛化)。为了让模型提前“顿悟”,我们设计了一个简单的操作:在每次参数更新时,不仅使用当前的梯度,还特意将过去一段时间内梯度的平均值(即缓慢变化的部分)放大后加进去。这样做的结果是,强化了那些对学习通用规律有益的缓慢信号,从而极大地缩短了模型从单纯记忆训练数据到真正学会通用规律所需的时间,让顿悟现象提前发生<ref><ref name="Lee2024grokfast">{{cite web | author1=Lee, J. | author2=Kang, B. G. | author3=Kim, K. | author4=Lee, K. M. | year=2024 | title=Grokfast: Accelerated Grokking by Amplifying Slow Gradients | website=arXiv | eprint=2405.20233 | archivePrefix=arXiv | primaryClass=cs.LG | url=https://arxiv.org/abs/2405.20233 }}</ref></ref>。