隐式算法结构先于掌握:对ReLU多层感知机在模运算中的机制研究
Latent Algorithmic Structure Precedes Grokking: A Mechanistic Study of ReLU MLPs on Modular Arithmetic
AI总结:
研究发现ReLU MLP在模运算中学习近二进制方波输入权重,输出权重满足相位和关系,即使在噪声数据下也能实现高准确率,表明掌握是记忆中编码算法的细化过程。
摘要:
掌握现象即神经网络在模加法上的验证准确率在训练数据被记忆后才提升,此前研究表明会产生正弦输入权重分布。我们发现ReLU MLP在实验设置中学习近二进制方波输入权重,中间值权重仅出现在符号变化边界附近,输出权重的主导傅里叶相位满足相位和关系ϕ_out=ϕ_a+ϕ_b;即使模型在噪声数据上训练且未能掌握,此关系仍成立。通过DFT提取每个神经元权重的频率和相位,构建理想化MLP:输入权重替换为完美二进制方波,输出权重替换为余弦,均由提取的傅里叶成分参数化。理想化模型在从噪声数据训练的模型权重中提取频率和相位时,实现95.5%的准确率,而该模型本身仅达到0.23%的准确率。这表明掌握并非发现正确算法,而是记忆中编码算法的细化过程,逐步将输入权重二进制化为更干净的方波,并对齐输出权重,直到泛化成为可能。
英文摘要:
Grokking on modular addition has been characterized by sinusoidal representations in transformers and MLPs. We find that ReLU MLPs in our setting instead learn near-binary square-wave input weights, with intermediate values appearing only near sign-change boundaries, and output weights whose dominant Fourier phases satisfy $ϕ_{\mathrm{out}} \approx ϕ_a + ϕ_b$. These relations persist under label noise and even in models that do not grok. Using DFT-extracted frequencies and phases to replace learned weights with ideal square/cosine waves yields 95.8% accuracy from noisy models that achieve only 0.40%. This suggests that grokking sharpens an algorithm already encoded during memorization.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。