研究揭示语法稀疏度决定 Transformer 学习随机语言的顺序与速度
Grammar Sparsity Sets How Transformers Learn Random Languages
一篇挺有意思的理论论文:作者造了种可以精确算熵的随机语法,发现语法稀疏时 Transformer 学得又快又一步到位,稠密时要分两阶段还卡在平台期。做可解释性或训练动力学的人可以看看这套实验设计。
arXiv 论文(编号 2611.29692)研究了 Transformer 在 Random Language Model 上的语言习得过程,这是一种通过单一参数控制产生式规则稀疏度、且条件熵可精确计算的分层语法。在深度为二的语法上,稀疏度同时决定了学习的顺序与速度:稠密语法按层级逐步学习,token 先从兄弟节点预测(耗时 t∝V),再从完整上下文预测(耗时 t∝V³),两个阶段之间被一个随词表规模 V 增大的平台期隔开。
稀疏语法则是一次性完成全部学习,耗时仅 t∝√V,指数甚至低于稠密语法的第一阶段。指数 1 和 1/2 在深度为一的语法上就已出现,作者在线性模型配合 Adam 优化器的设定下对这两个指数给出了推导。该工作用可精确求解的合成语法,为理解 Transformer 的学习阶段与 grokking 类平台期现象提供了可控实验框架。
Grammar Sparsity Sets How Transformers Learn Random Languages
We study language acquisition by transformers trained on the Random Language Model: a synthetic hierarchical grammar with random production rules, whose sparsity is controlled by a single parameter and whose conditional entropies are known exactly. On depth-two grammars, we find that sparsity sets both the order and the speed of learning. Dense grammars are learnt one level at a time: a token is predicted from its sibling after $t\propto V$ steps and from the full context only after $t\propto V^{3}$, so the two stages are separated by a plateau that widens with $V$. Sparse grammars are learnt all at once, at $t\propto\sqrt V$, with a smaller exponent than even the first stage of a dense one. The exponents $1$ and $1/2$ already appear at depth one, where we derive them for a linear model trained with Adam.
This report is categorized under AITOP's "Papers" desk. Key entities and technical topics under continuous tracking include Transformer, Random Language Model, Adam, training dynamics.
Source attribution: curated from arXiv cs.LG (@Edgar Andres Hernandez Moreno, Francesco Cagnetta).