arXiv:2602.02859cs.LG2026-02被引 2

发现模型训练后期的泛化崩溃现象,提出用权重分析工具检测反过拟合。

Late-Stage Generalization Collapse in Grokking: Detecting anti-grokking with Weightwatcher

  • 通过分析权重矩阵特征谱,识别出异常大特征值(相关陷阱)
  • 模型在测试准确率骤降至随机水平时仍保持100%训练准确率
  • 该方法无需测试数据,适用于小模型和大语言模型

神经网络中的记忆现象缺乏精确的操作定义,通常通过过拟合阶段推断。我们发现了过拟合阶段中此前未被报道的第三阶段:反过拟合,即晚期泛化能力的崩溃。在两个经典过拟合设置下——3层MLP在MNIST子集上训练,以及变换器在模加法任务上训练——我们延长训练时间远超常规。模型从预过拟合进入成功泛化后,测试准确率再次下降至随机水平,而训练准确率保持100%,表明存在一种独立的后泛化失败模式。我们使用基于HTSR/SETOL理论的开源工具WeightWatcher进行诊断,主要信号为:洗牌权重矩阵的经验谱密度中出现显著超出Marchenko-Pastur主干的异常大特征值,称为‘相关陷阱’,预测会损害泛化。次要信号是平均HTSR层质量指标α偏离2.0。这些指标无需访问训练或测试数据。我们对比了ℓ₂范数、激活稀疏性、绝对权重熵和局部电路复杂度等替代诊断方法,它们能追踪预过拟合和过拟合,但无法识别反过拟合。最后,我们发现相关陷阱可引发灾难性遗忘和原型记忆,并在大规模LLM(如OSS GPT 20/120B)中观察到类似病理。

原文摘要 · Abstract (English)

\emph{Memorization} in neural networks lacks a precise operational definition and is often inferred from the grokking regime, where training accuracy saturates while test accuracy remains very low. We identify a previously unreported third phase of grokking in this training regime: \emph{anti-grokking}, a late-stage collapse of generalization. We revisit two canonical grokking setups: a 3-layer MLP trained on a subset of MNIST and a transformer trained on modular addition, but extended training far beyond standard. In both cases, after models transition from pre-grokking to successful generalization, test accuracy collapses back to chance while training accuracy remains perfect, indicating a distinct post-generalization failure mode. To diagnose anti-grokking, we use the open-source \texttt{WeightWatcher} tool based on HTSR/SETOL theory. The primary signal is the emergence of \emph{Correlation Traps}: anomalously large eigenvalues beyond the Marchenko--Pastur bulk in the empirical spectral density of shuffled weight matrices, which are predicted to impair generalization. As a secondary signal, anti-grokking corresponds to the average HTSR layer quality metric $α$ deviating from $2.0$. Neither metric requires access to the test or training data. We compare these signals to alternative grokking diagnostic, including $\ell_2$ norms, Activation Sparsity, Absolute Weight Entropy, and Local Circuit Complexity. These track pre-grokking and grokking but fail to identify anti-grokking. Finally, we show that Correlation Traps can induce catastrophic forgetting and/or prototype memorization, and observe similar pathologies in large-scale LLMs, like OSS GPT 20/120B.

过拟合泛化崩溃权重分析大模型

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