We investigate grokking in transformers through the lens of inductive bias: dispositions arising from architecture or optimization that let the network prefer one solution over another. We first show that architectural choices such as the position of Layer Normalization (LN) strongly modulates grokking speed. This modulation is explained by isolating how LN on specific pathways shapes shortcut-learning and attention entropy. Subsequently, we study how different optimization settings modulate grokking, inducing distinct interpretations of previously proposed controls such as readout scale. Particularly, we find that using readout scale as a control for lazy training can be confounded by learning rate and weight decay in our setting. Accordingly, we show that features evolve continuously throughout training, suggesting grokking in transformers can be more nuanced than a lazy-to-rich transition of the learning regime. Finally, we show how generalization predictably emerges with feature compressibility in grokking, across different modulators of inductive bias. Our code is released at https://tinyurl.com/y52u3cad.


翻译:本研究从归纳偏置的视角探究Transformer中的顿悟现象:即由架构或优化过程产生的、使网络倾向于选择特定解决方案的内在倾向。我们首先证明,层归一化(LN)的位置等架构选择会显著调节顿悟速度。通过分离特定路径上LN对捷径学习与注意力熵的影响机制,我们解释了这种调节作用。随后,我们研究了不同优化设置如何调节顿悟现象,并对先前提出的控制变量(如读出尺度)给出了新的解释。特别地,我们发现将读出尺度作为惰性训练的控制变量时,其作用可能受到学习率与权重衰减的干扰。基于此,我们证明特征在整个训练过程中持续演化,表明Transformer中的顿悟现象可能比学习机制从惰性到丰富的转变更为复杂。最后,我们展示了在不同归纳偏置调节因子作用下,顿悟过程中特征可压缩性与泛化能力的可预测协同演化。代码已发布于https://tinyurl.com/y52u3cad。

0
下载
关闭预览

相关内容

144页ppt!《Transformers》全面讲解,附视频
专知会员服务
118+阅读 · 2023年1月1日
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
Transformer模型-深度学习自然语言处理,17页ppt
专知会员服务
108+阅读 · 2020年8月30日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
从头开始了解Transformer
AI科技评论
25+阅读 · 2019年8月28日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
多图带你读懂 Transformers 的工作原理
AI研习社
10+阅读 · 2019年3月18日
国家自然科学基金
1+阅读 · 2016年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
VIP会员
相关资讯
相关基金
国家自然科学基金
1+阅读 · 2016年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员