arXiv cs.CL· Jack T. Parley·· 10 小时前AI 评分31
Transformer 语言模型如何分阶段学会 inside-outside 计算:一项可解释性研究
Stagewise and interpretable emergence of inside-outside computation in Transformer-based language models
AI 导读
研究通过合成上下文无关文法追踪 Transformer 的学习动态,发现其损失阶段可解析计算,并对应一个隐藏的潜在树变量。探测显示模型早期仅用局部 bigram/trigram 信息、涉及少数初始层,随后逐步形成编码器-解码器结构:抽象潜在信息编码于中部,后半网络逐步精炼最终 token 预测。
正文 · 原文
Abstract:Variability in syntactic structure and parsing ambiguity are fundamental aspects of natural language which modern LLMs have to learn to deal with proficiently. Previous "post-mortem" studies have shown that fully trained Transformers indeed approximate canonical parsing algorithms such as inside-outside, but little is established theoretically about how this is actually learned. Here, we make a first step towards addressing this by studying the learning dynamics in synthetic context-free grammars with variable parse tree topology. The stagewise learning curves are fully interpretable, in the sense that all of the loss stages a) can be computed analytically, and b) can be clearly associated to the representation of a hidden latent tree variable, which allows to lift ambiguity and utilize information from wider contexts. By probing representations, we visualize the emergence of inside-outside computation across depth and during training: while during early stages local (bigram/trigram) information is used and involves only a few initial layers, gradually the Transformer develops an encoder-decoder structure where the most abstract latent information is encoded in the middle, and the latter half of the network is used to progressively refine the final token prediction. This organization of computation is reminiscent of findings in real-world LLMs, and importantly applies here to a synthetic model which allows full analytical control of the data statistics, thus opening the door to theoretical progress.
| Comments: | 20 pages, 9 figures |
| Subjects: | Computation and Language (cs.CL); Disordered Systems and Neural Networks (cond-mat.dis-nn) |
| Cite as: | arXiv:2611.14221 [cs.CL] |
| (or arXiv:2611.14221v1 [cs.CL] for this version) | |
| https://doi.org/10.48550/arXiv.2611.14221 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Jack Thomas Parley [view email]
[v1]
Tue, 10 Nov 2026 15:39:47 UTC (4,583 KB)
来源:arXiv cs.CL · arxiv.org