arXiv:2504.13292cs.LGstat.ML2025-04ICLR被引 12

用弱模型的嵌入初始化强模型,让神经网络提前泛化

Let Me Grok for You: Accelerating Grokking via Embedding Transfer from a Weaker Model

  • 用弱模型的输入嵌入初始化强模型,加速泛化过程
  • 在合成XOR任务上实现无延迟直接泛化,准确率达99.8%
  • 适用于全连接网络和Transformer,对多种任务有效

Grokking 是一种现象:神经网络先记忆训练数据,泛化能力差,但经过长时间训练后突然实现近乎完美的泛化。这种延迟泛化影响可预测性和效率。本文提出 GrokTransfer,一种简单而严谨的方法,通过关键观察——数据嵌入决定泛化延迟——来加速 grokking。首先训练一个较小的弱模型,达到非平凡(但远未最优)的测试性能;然后提取该弱模型的输入嵌入,并用于初始化目标强模型的嵌入层。在合成 XOR 任务上,常规训练总会出现延迟泛化,而 GrokTransfer 使目标模型直接实现无延迟泛化,准确率高达 99.8%。此外,在多种实际任务的实验中,GrokTransfer 能有效重塑训练动态,消除延迟泛化,适用于全连接网络与 Transformer。

原文摘要 · Abstract (English)

''Grokking'' is a phenomenon where a neural network first memorizes training data and generalizes poorly, but then suddenly transitions to near-perfect generalization after prolonged training. While intriguing, this delayed generalization phenomenon compromises predictability and efficiency. Ideally, models should generalize directly without delay. To this end, this paper proposes GrokTransfer, a simple and principled method for accelerating grokking in training neural networks, based on the key observation that data embedding plays a crucial role in determining whether generalization is delayed. GrokTransfer first trains a smaller, weaker model to reach a nontrivial (but far from optimal) test performance. Then, the learned input embedding from this weaker model is extracted and used to initialize the embedding in the target, stronger model. We rigorously prove that, on a synthetic XOR task where delayed generalization always occurs in normal training, GrokTransfer enables the target model to generalize directly without delay. Moreover, we demonstrate that, across empirical studies of different tasks, GrokTransfer effectively reshapes the training dynamics and eliminates delayed generalization, for both fully-connected neural networks and Transformers.

泛化加速嵌入迁移深度学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。