arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.18741cs.CL
收藏

普通 Transformer 中层次结构的顿悟(Grokking)现象

Grokking of Hierarchical Structure in Vanilla Transformers

Stanford University(斯坦福大学)

Shikhar Murty, Pratyusha Sharma, Jacob Andreas, Christopher D. Manning

AI总结:

本文发现普通 Transformer 在远超域内准确率饱和的极长训练后会出现“结构顿悟”,实现层次化泛化,且该现象随模型深度呈倒 U 形缩放,最优深度可由树结构度指标识别。

摘要:

对人类而言,语言的生成与理解对句子的层次结构十分敏感。在自然语言处理中,过去的研究曾质疑 Transformer 等神经序列模型在泛化到结构新颖的输入时,能在多大程度上有效捕捉这种层次结构。我们表明,Transformer 语言模型在经过极长时间的训练后——远远超过域内准确率已经饱和的时间点——可以学会进行层次化泛化。我们将这一现象称为“结构顿悟(structural grokking)”。在多个数据集上,结构顿悟在模型深度上呈现出倒 U 形缩放规律:中等深度的模型比非常深和非常浅的 Transformer 都泛化得更好。在分析模型内部属性与顿悟之间的关系时,我们发现顿悟的最优深度可以通过 Murty 等人(2023)提出的树结构度(tree-structuredness)指标来识别。总体而言,我们的工作提供了强有力的证据,表明经过延长训练后,普通 Transformer 能够发现并使用层次结构。

英文摘要:

For humans, language production and comprehension is sensitive to the hierarchical structure of sentences. In natural language processing, past work has questioned how effectively neural sequence models like transformers capture this hierarchical structure when generalizing to structurally novel inputs. We show that transformer language models can learn to generalize hierarchically after training for extremely long periods -- far beyond the point when in-domain accuracy has saturated. We call this phenomenon \emph{structural grokking}. On multiple datasets, structural grokking exhibits inverted U-shaped scaling in model depth: intermediate-depth models generalize better than both very deep and very shallow transformers. When analyzing the relationship between model-internal properties and grokking, we find that optimal depth for grokking can be identified using the tree-structuredness metric of \citet{murty2023projections}. Overall, our work provides strong evidence that, with extended training, vanilla transformers discover and use hierarchical structure.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑