模型学完规律却迟迟不推理,根源在解码器瓶颈
The Long Delay to Arithmetic Generalization: When Learned Representations Outrun Behavior

- 编码器早期就掌握数的奇偶与余数结构
- 解码器受限导致准确率延迟达数万步
- 不同进制影响学习难度,24进制最优
在训练用于算法任务的Transformer时,会出现训练集拟合后长期无泛化表现的现象。我们研究单步柯拉茨预测任务发现:编码器在前几千步内已组织好奇偶性和余数结构,但输出准确率仍接近随机水平,持续数万步。因果干预验证了解码器瓶颈假设:将训练好的编码器移植到新模型可使突现现象提前2.75倍;而移植训练好的解码器反而恶化性能。冻结收敛编码器仅重训解码器可彻底消除平台期,达到97.6%准确率,远超联合训练的86.1%。数值表示方式决定解码器难易度——15种进制中,与柯拉茨映射算术对齐的进制(如24进制)可达99.8%准确率,而二进制因表示坍塌完全失效。进制选择作为归纳偏置,显著影响局部数字结构的可利用性,导致同一任务下学习能力差异巨大。
原文摘要 · Abstract (English)
Grokking in transformers trained on algorithmic tasks is characterized by a long delay between training-set fit and abrupt generalization, but the source of that delay remains poorly understood. In encoder-decoder arithmetic models, we argue that this delay reflects limited access to already learned structure rather than failure to acquire that structure in the first place. We study one-step Collatz prediction and find that the encoder organizes parity and residue structure within the first few thousand training steps, while output accuracy remains near chance for tens of thousands more. Causal interventions support the decoder bottleneck hypothesis. Transplanting a trained encoder into a fresh model accelerates grokking by 2.75 times, while transplanting a trained decoder actively hurts. Freezing a converged encoder and retraining only the decoder eliminates the plateau entirely and yields 97.6% accuracy, compared to 86.1% for joint training. What makes the decoder's job harder or easier depends on numeral representation. Across 15 bases, those whose factorization aligns with the Collatz map's arithmetic (e.g., base 24) reach 99.8% accuracy, while binary fails completely because its representations collapse and never recover. The choice of base acts as an inductive bias that controls how much local digit structure the decoder can exploit, producing large differences in learnability from the same underlying task.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。