Transformer何时选择推理还是记忆,关键在训练中一个短暂窗口。
Critical Windows of Complexity Control: When Transformers Decide to Reason or Memorize

- 发现模型命运由训练中一个25%时段的权重衰减决定。
- 中期施加正则化可使分布外准确率提升5-9倍。
- 窗口起始点仅差100步,性能从随机水平跃升至推理水平。
近期研究发现,Transformer的组合泛化能力受复杂度控制影响,包括初始化尺度和权重衰减,这些因素引导训练朝向低复杂度的推理而非高复杂度的记忆。然而,现有分析将复杂度控制视为单一静态超参数,未揭示其在训练过程中的具体作用时机。本文发现,Transformer是记忆还是推理的命运,在一个明确且狭窄的训练窗口内即被决定。在可控的组合任务上,我们发现:(i) 在训练周期25%的时间段内应用权重衰减,其分布外(OOD)准确率(0.93)与全程施加(0.91)相当;(ii) 在总正则化预算不变前提下,将正则化置于训练中段,其OOD准确率比早期施加高出5-9倍;(iii) 关键窗口的边界极为敏锐,仅提前或推迟100个优化步骤,平均OOD准确率便从随机水平(0.15)跃升至推理状态(0.61);(iv) 窗口位置系统性依赖于初始化尺度,但小初始化时推理解的吸引域反而缩小,这与普遍认为小初始化更优的观点相悖。此外,该现象具有任务特异性:在模算术的grokking任务中,恒定权重衰减与调度式衰减效果一致,无此窗口现象。
原文摘要 · Abstract (English)
Recent work has shown that Transformers' compositional generalization is governed by \emph{complexity control}, initialization scale and weight decay, which steers training toward low-complexity reasoning solutions rather than high-complexity memorization. Existing analyses, however, treat complexity control as a single static hyperparameter choice, leaving open \emph{when} during training this control is actually decisive. We show that the memorization-versus-reasoning fate of a Transformer is determined within a sharp, identifiable window of training. On a controlled compositional task we find that (i)~weight decay applied for a single 25\%-of-training window matches full-training weight decay in out-of-distribution (OOD) accuracy ($0.93$ vs $0.91$); (ii)~holding total regularization budget constant, placing it in the middle of training yields $5{-}9\times$ higher OOD accuracy than placing it early; (iii)~the boundary of the critical window is remarkably sharp, window onset shifted by as little as $100$ optimization steps causes mean OOD to jump from chance ($0.15$) to reasoning-regime ($0.61$); (iv)~the window's position depends systematically on initialization scale, but the basin of attraction for reasoning solutions \emph{shrinks} at small initialization, contradicting the prevailing recommendation that smaller initialization is uniformly better. We further show that the critical-window phenomenon is task-specific: it does not appear on grokking with modular arithmetic, where properly tuned constant weight decay matches scheduled weight decay.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。