计算机科学 > 计算与语言
[提交于 2026年11月10日 (v1),最后修订于 2026年11月23日 (此版本, v2)]
标题:Stagewise and interpretable emergence of inside-outside computation in Transformer-based language models
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Jack Thomas Parley[v1] 2026年11月10日 星期二 15:39:47 UTC (4,582 KB)
[v2] 2026年11月23日 星期一 09:51:26 UTC (4,601 KB)